Skip to content

Instantly share code, notes, and snippets.

View apritzel's full-sized avatar

Andre Przywara apritzel

View GitHub Profile
@apritzel
apritzel / allwinner_a20_no_remux.patch
Created March 23, 2026 15:56
Only apply GPIO IRQ remux for A10, not the A20
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
index b2e82bf927b3..5c24e86c9cad 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
@@ -1295,12 +1295,28 @@ static const struct sunxi_pinctrl_desc sun4i_a10_pinctrl_data = {
.disable_strict_mode = true,
};
+static const struct sunxi_pinctrl_desc sun4i_a20_pinctrl_data = {
+ .pins = sun4i_a10_pins,
@apritzel
apritzel / cubie_a5e_1gb.patch
Created November 3, 2025 22:10
Cubie A5E 1GB board U-Boot defconfig
commit 20d96345a913b95680b2bfe640bbb6207f87c361
Author: Andre Przywara <andre.przywara@arm.com>
Date: Mon Nov 3 21:58:29 2025 +0000
add defconfig for 1GB Cubie 5AE board
diff --git a/configs/radxa-cubie-a5e_defconfig b/configs/radxa-cubie-a5e-1gb_defconfig
similarity index 85%
copy from configs/radxa-cubie-a5e_defconfig
copy to configs/radxa-cubie-a5e-1gb_defconfig
@apritzel
apritzel / h616_hdmi_boards_dts.patch
Created October 3, 2025 19:38
enable HDMI in DTs of H616 boards
commit 9e2d6f74b455f255a0399886915b1a380de8d215
Author: Andre Przywara <andre.przywara@arm.com>
Date: Fri Oct 3 00:26:07 2025 +0100
arm64: dts: allwinner: h616: boards: enable HDMI
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h313-tanix-tx1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h313-tanix-tx1.dts
index 7906b79c03898..af479489216cb 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h313-tanix-tx1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h313-tanix-tx1.dts
@apritzel
apritzel / sun60i-a733.dts
Created September 4, 2025 14:03
Basic Allwinner A733 devicetree file (just pinctrl + serial + PMIC)
// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
// Copyright (C) 2025 Arm Ltd.
/dts-v1/;
//#include <dt-bindings/interrupt-controller/arm-gic.h>
/ {
interrupt-parent = <&gic>;
#address-cells = <2>;
@apritzel
apritzel / uboot_sunxi_tanix_tx1_32bit.patch
Created July 20, 2025 15:57
HACK to compile Tanix TX1 U-Boot as a 32-bit binary
commit 39b43797f21f3ba85ce54618b4cce7dc644bfd6d
Author: Andre Przywara <andre.przywara@arm.com>
Date: Sun Jul 20 16:49:52 2025 +0100
HACK: sunxi: h616: tanix-tx1: use 32-bit compilation
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 0a7c029b15a..2655aa4c7d6 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@apritzel
apritzel / ccu-sun55i-a523-cpu.c
Created July 18, 2025 09:21
Allwinner A523 CPU Linux clock driver sketch
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2023-2024 Arm Ltd.
*
* Covers the two CPU PLLs: CPU_L for the "little" cluster, covering
* cores 0-3, CPU_B for the "big" cluster, covering cores 4-7.
* There is also the DSU PLL.
*/
#include <linux/clk-provider.h>
@apritzel
apritzel / uboot_allwinner_b288_pinctrl.diff
Created June 17, 2025 13:57
Allwinner B288 U-Boot pinctrl sketch
diff --git a/drivers/pinctrl/sunxi/Kconfig b/drivers/pinctrl/sunxi/Kconfig
index 54314992299..114632307b8 100644
--- a/drivers/pinctrl/sunxi/Kconfig
+++ b/drivers/pinctrl/sunxi/Kconfig
@@ -149,4 +149,8 @@ config PINCTRL_SUN55I_A523_R
default MACH_SUN55I_A523
select PINCTRL_SUNXI
+config PINCTRL_SUN8I_B288
+ bool "Support for the Allwinner B288 PIO"
@apritzel
apritzel / fel_boot_kernel.sh
Created May 11, 2025 18:19
Shell script to boot a 64-bit Allwinner SoC with a given kernel and initrd via FEL
#!/bin/sh
# ADJUST to match your setup
INITRD=/srv/tftp/busybox.initrd.gz
UBOOT_DIR=/src/u-boot.git
if [ $# -eq 0 -o "$1" = "-h" ]
then
echo "usage: %0 <kernel.img> [<cmdline>]"
exit 0
@apritzel
apritzel / u_boot_liontron_h-a133l_support.patch
Created January 25, 2025 13:48
Liontron H-A133L U-Boot board support, on top of posted A133 patches
commit 3a4c07b5f6db324a27b16e40d4185479752401b5
Author: Andre Przywara <andre.przywara@arm.com>
Date: Wed Jan 8 00:36:38 2025 +0000
add first Liontron-A133 board support
diff --git a/configs/liontron-h-a133l_defconfig b/configs/liontron-h-a133l_defconfig
new file mode 100644
index 00000000000..bb8a1cdfb57
--- /dev/null
@apritzel
apritzel / tfa_mpidr_hack.patch
Created January 13, 2025 21:27
Hack to switch TF-A Allwinner to modern MPIDR encoding
diff --git a/plat/allwinner/common/include/platform_def.h b/plat/allwinner/common/include/platform_def.h
index c9d075ac8..9543dbeaa 100644
--- a/plat/allwinner/common/include/platform_def.h
+++ b/plat/allwinner/common/include/platform_def.h
@@ -72,7 +72,7 @@
#define PLATFORM_CLUSTER_COUNT U(1)
#define PLATFORM_CORE_COUNT (PLATFORM_CLUSTER_COUNT * \
PLATFORM_MAX_CPUS_PER_CLUSTER)
-#define PLATFORM_MAX_CPUS_PER_CLUSTER U(4)
+#define PLATFORM_MAX_CPUS_PER_CLUSTER U(8)