Skip to content

Commit 260f31c

Browse files
EvilOlafigorpecovnik
authored andcommitted
sun55i: rewrite recent uboot patches
1 parent 3267727 commit 260f31c

11 files changed

+50
-167
lines changed

patch/u-boot/v2026.01/arm64-dts-allwinner-sun55i-a523-add-pcie-spi-combophy.patch

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,22 @@ Subject: arm64: dts: allwinner: sun55i-a523: Add SPI0, PCIe and Combophy nodes
55

66
Signed-off-by: Marvin Wewer <mwewer37@proton.me>
77
---
8-
dts/upstream/src/arm64/allwinner/sun55i-a523.dtsi | 66 ++++++++++
9-
1 file changed, 66 insertions(+)
8+
dts/upstream/src/arm64/allwinner/sun55i-a523.dtsi | 65 ++++++++++
9+
1 file changed, 65 insertions(+)
1010

1111
diff --git a/dts/upstream/src/arm64/allwinner/sun55i-a523.dtsi b/dts/upstream/src/arm64/allwinner/sun55i-a523.dtsi
1212
index 111111111111..222222222222 100644
1313
--- a/dts/upstream/src/arm64/allwinner/sun55i-a523.dtsi
1414
+++ b/dts/upstream/src/arm64/allwinner/sun55i-a523.dtsi
15-
@@ -1,9 +1,10 @@
16-
// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
15+
@@ -2,6 +2,7 @@
1716
// Copyright (C) 2023-2024 Arm Ltd.
1817

1918
#include <dt-bindings/interrupt-controller/arm-gic.h>
2019
+#include <dt-bindings/phy/phy.h>
2120
#include <dt-bindings/clock/sun6i-rtc.h>
2221
#include <dt-bindings/clock/sun55i-a523-ccu.h>
2322
#include <dt-bindings/clock/sun55i-a523-r-ccu.h>
24-
#include <dt-bindings/reset/sun55i-a523-ccu.h>
25-
#include <dt-bindings/reset/sun55i-a523-r-ccu.h>
26-
@@ -607,10 +608,38 @@
27-
clocks = <&r_ccu CLK_BUS_R_PPU1>;
28-
resets = <&r_ccu RST_BUS_R_PPU1>;
23+
@@ -609,6 +610,34 @@
2924
#power-domain-cells = <1>;
3025
};
3126

@@ -60,11 +55,7 @@ index 111111111111..222222222222 100644
6055
r_ccu: clock-controller@7010000 {
6156
compatible = "allwinner,sun55i-a523-r-ccu";
6257
reg = <0x7010000 0x250>;
63-
clocks = <&osc24M>,
64-
<&rtc CLK_OSC32K>,
65-
@@ -624,10 +653,46 @@
66-
"pll-audio";
67-
#clock-cells = <1>;
58+
@@ -626,6 +655,42 @@
6859
#reset-cells = <1>;
6960
};
7061

@@ -107,8 +98,6 @@ index 111111111111..222222222222 100644
10798
nmi_intc: interrupt-controller@7010320 {
10899
compatible = "allwinner,sun55i-a523-nmi";
109100
reg = <0x07010320 0xc>;
110-
interrupt-controller;
111-
#interrupt-cells = <2>;
112101
--
113102
Armbian
114103

patch/u-boot/v2026.01/board_orangepi-4a/arm64-dts-sun55i-t527-orangepi-4a-enable-spi0-pcie-combophy.patch

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22
From: Marvin Wewer <mwewer37@proton.me>
33
Date: Sun, 4 Jan 2026 21:16:16 +0000
4-
Subject: arm64: dts: allwinner: sun55i-t527-orangepi-4a: Enable SPI0 and PCIe with ComboPHY
4+
Subject: arm64: dts: allwinner: sun55i-t527-orangepi-4a: Enable SPI0 and PCIe
5+
with ComboPHY
56

67
Signed-off-by: Marvin Wewer <mwewer37@proton.me>
78
---
8-
dts/upstream/src/arm64/allwinner/sun55i-t527-orangepi-4a.dts | 38 ++++++++--
9-
1 file changed, 38 insertions(+)
9+
dts/upstream/src/arm64/allwinner/sun55i-t527-orangepi-4a.dts | 39 ++++++++++
10+
1 file changed, 39 insertions(+)
1011

1112
diff --git a/dts/upstream/src/arm64/allwinner/sun55i-t527-orangepi-4a.dts b/dts/upstream/src/arm64/allwinner/sun55i-t527-orangepi-4a.dts
1213
index 111111111111..222222222222 100644
1314
--- a/dts/upstream/src/arm64/allwinner/sun55i-t527-orangepi-4a.dts
1415
+++ b/dts/upstream/src/arm64/allwinner/sun55i-t527-orangepi-4a.dts
15-
@@ -152,10 +152,22 @@
16-
vcc-pg-supply = <&reg_bldo1>;
17-
vcc-ph-supply = <&reg_cldo3>; /* via VCC-IO */
16+
@@ -154,6 +154,18 @@
1817
vcc-pi-supply = <&reg_cldo3>;
1918
vcc-pj-supply = <&reg_cldo1>;
2019
vcc-pk-supply = <&reg_cldo1>;
@@ -33,11 +32,7 @@ index 111111111111..222222222222 100644
3332
};
3433

3534
&r_i2c0 {
36-
status = "okay";
37-
38-
@@ -368,10 +390,36 @@
39-
host-wakeup-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
40-
shutdown-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
35+
@@ -370,6 +382,32 @@
4136
};
4237
};
4338

@@ -70,11 +65,7 @@ index 111111111111..222222222222 100644
7065
&usb_otg {
7166
/*
7267
* The OTG controller is connected to one of the type-A ports.
73-
* There is a regulator, controlled by a GPIO, to provide VBUS power
74-
* to the port, and a VBUSDET GPIO, to detect externally provided
75-
@@ -386,5 +414,6 @@
76-
usb0_vbus-supply = <&reg_otg_vbus>;
77-
usb0_vbus_det-gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
68+
@@ -388,3 +426,4 @@
7869
usb1_vbus-supply = <&reg_usb_vbus>;
7970
status = "okay";
8071
};

patch/u-boot/v2026.01/board_orangepi-4a/edit-orangepi-4a-defconfig.patch

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22
From: Marvin Wewer <mwewer37@proton.me>
33
Date: Mon, 12 Jan 2026 13:45:24 +0000
4-
Subject: Enable PCIe, NVMe, SPI and additional commands in orangepi_4a_defconfig
4+
Subject: Enable PCIe, NVMe, SPI and additional commands in
5+
orangepi_4a_defconfig
56

67
Signed-off-by: Marvin Wewer <mwewer37@proton.me>
78
---
@@ -12,9 +13,7 @@ diff --git a/configs/orangepi_4a_defconfig b/configs/orangepi_4a_defconfig
1213
index 111111111111..222222222222 100644
1314
--- a/configs/orangepi_4a_defconfig
1415
+++ b/configs/orangepi_4a_defconfig
15-
@@ -28,5 +28,25 @@ CONFIG_AXP717_POWER=y
16-
CONFIG_AXP_I2C_ADDRESS=0x35
17-
CONFIG_AXP_DCDC2_VOLT=920
16+
@@ -30,3 +30,23 @@ CONFIG_AXP_DCDC2_VOLT=920
1817
CONFIG_AXP_DCDC3_VOLT=1160
1918
CONFIG_USB_EHCI_HCD=y
2019
CONFIG_USB_OHCI_HCD=y

patch/u-boot/v2026.01/board_radxa-cubie-a5e/arm64-dts-sun55i-a527-cubie-a5e-enable-spi0-pcie-combophy.patch

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22
From: Marvin Wewer <mwewer37@proton.me>
33
Date: Sat, 25 Oct 2025 16:50:43 +0000
4-
Subject: arm64: dts: allwinner: sun55i-a527-cubie-a5e: Enable SPI0 and PCIe with ComboPHY
4+
Subject: arm64: dts: allwinner: sun55i-a527-cubie-a5e: Enable SPI0 and PCIe
5+
with ComboPHY
56

67
Signed-off-by: Marvin Wewer <mwewer37@proton.me>
78
---
8-
dts/upstream/src/arm64/allwinner/sun55i-a527-cubie-a5e.dts | 84 ++++++++++
9-
1 file changed, 84 insertions(+)
9+
dts/upstream/src/arm64/allwinner/sun55i-a527-cubie-a5e.dts | 83 ++++++++++
10+
1 file changed, 83 insertions(+)
1011

1112
diff --git a/dts/upstream/src/arm64/allwinner/sun55i-a527-cubie-a5e.dts b/dts/upstream/src/arm64/allwinner/sun55i-a527-cubie-a5e.dts
1213
index 111111111111..222222222222 100644
1314
--- a/dts/upstream/src/arm64/allwinner/sun55i-a527-cubie-a5e.dts
1415
+++ b/dts/upstream/src/arm64/allwinner/sun55i-a527-cubie-a5e.dts
15-
@@ -43,10 +43,34 @@
16-
regulator-max-microvolt = <5000000>;
17-
vin-supply = <&reg_vcc5v>;
16+
@@ -45,6 +45,30 @@
1817
gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
1918
enable-active-high;
2019
};
@@ -45,11 +44,7 @@ index 111111111111..222222222222 100644
4544
};
4645

4746
&ehci0 {
48-
status = "okay";
49-
};
50-
@@ -102,10 +126,34 @@
51-
vcc-pg-supply = <&reg_bldo1>;
52-
vcc-ph-supply = <&reg_cldo3>; /* via VCC-IO */
47+
@@ -104,6 +128,30 @@
5348
vcc-pi-supply = <&reg_cldo3>;
5449
vcc-pj-supply = <&reg_cldo4>;
5550
vcc-pk-supply = <&reg_cldo1>;
@@ -80,11 +75,7 @@ index 111111111111..222222222222 100644
8075
};
8176

8277
&r_i2c0 {
83-
status = "okay";
84-
85-
@@ -280,18 +328,53 @@
86-
* Specifying the supply would create a circular dependency.
87-
*
78+
@@ -282,6 +330,14 @@
8879
* vcc-pl-supply = <&reg_aldo3>;
8980
*/
9081
vcc-pm-supply = <&reg_aldo3>;
@@ -99,8 +90,7 @@ index 111111111111..222222222222 100644
9990
};
10091

10192
&uart0 {
102-
pinctrl-names = "default";
103-
pinctrl-0 = <&uart0_pb_pins>;
93+
@@ -290,6 +346,33 @@
10494
status = "okay";
10595
};
10696

@@ -134,8 +124,6 @@ index 111111111111..222222222222 100644
134124
&usb_otg {
135125
/*
136126
* The USB-C port is the primary power supply, so in this configuration
137-
* relies on the other end of the USB cable to supply the VBUS power.
138-
* So use this port in peripheral mode.
139127
--
140128
Armbian
141129

patch/u-boot/v2026.01/board_radxa-cubie-a5e/edit-radxa-cubie-a5e-defconfig.patch

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@ Subject: Enable PCIe, NVMe, SPI and GPIO support in radxa-cubie-a5e_defconfig
55

66
Signed-off-by: Marvin Wewer <mwewer37@proton.me>
77
---
8-
configs/radxa-cubie-a5e_defconfig | 55 ++++++++++
9-
1 file changed, 55 insertions(+)
8+
configs/radxa-cubie-a5e_defconfig | 20 ++++++++++
9+
1 file changed, 20 insertions(+)
1010

1111
diff --git a/configs/radxa-cubie-a5e_defconfig b/configs/radxa-cubie-a5e_defconfig
1212
index 111111111111..222222222222 100644
1313
--- a/configs/radxa-cubie-a5e_defconfig
1414
+++ b/configs/radxa-cubie-a5e_defconfig
15-
@@ -28,5 +28,25 @@ CONFIG_REGULATOR_AXP=y
16-
CONFIG_AXP717_POWER=y
17-
CONFIG_AXP_DCDC2_VOLT=920
15+
@@ -30,3 +30,23 @@ CONFIG_AXP_DCDC2_VOLT=920
1816
CONFIG_AXP_DCDC3_VOLT=1100
1917
CONFIG_USB_EHCI_HCD=y
2018
CONFIG_USB_OHCI_HCD=y

patch/u-boot/v2026.01/clk-sunxi-add-sun55i-a523-pcie-usb3-clocks.patch

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ diff --git a/drivers/clk/sunxi/clk_a523.c b/drivers/clk/sunxi/clk_a523.c
1313
index 111111111111..222222222222 100644
1414
--- a/drivers/clk/sunxi/clk_a523.c
1515
+++ b/drivers/clk/sunxi/clk_a523.c
16-
@@ -44,10 +44,12 @@ static struct ccu_clk_gate a523_gates[] = {
17-
[CLK_BUS_OHCI0] = GATE(0xa8c, BIT(0)),
18-
[CLK_BUS_OHCI1] = GATE(0xa8c, BIT(1)),
16+
@@ -46,6 +46,8 @@ static struct ccu_clk_gate a523_gates[] = {
1917
[CLK_BUS_EHCI0] = GATE(0xa8c, BIT(4)),
2018
[CLK_BUS_EHCI1] = GATE(0xa8c, BIT(5)),
2119
[CLK_BUS_OTG] = GATE(0xa8c, BIT(8)),
@@ -24,27 +22,19 @@ index 111111111111..222222222222 100644
2422
};
2523

2624
static struct ccu_reset a523_resets[] = {
27-
[RST_BUS_MMC0] = RESET(0x84c, BIT(16)),
28-
[RST_BUS_MMC1] = RESET(0x84c, BIT(17)),
29-
@@ -73,10 +75,11 @@ static struct ccu_reset a523_resets[] = {
30-
[RST_BUS_OHCI0] = RESET(0xa8c, BIT(16)),
31-
[RST_BUS_OHCI1] = RESET(0xa8c, BIT(17)),
25+
@@ -75,6 +77,7 @@ static struct ccu_reset a523_resets[] = {
3226
[RST_BUS_EHCI0] = RESET(0xa8c, BIT(20)),
3327
[RST_BUS_EHCI1] = RESET(0xa8c, BIT(21)),
3428
[RST_BUS_OTG] = RESET(0xa8c, BIT(24)),
3529
+ [RST_BUS_PCIE_USB3] = RESET(0xaac, BIT(24)),
3630
};
3731

3832
const struct ccu_desc a523_ccu_desc = {
39-
.gates = a523_gates,
40-
.resets = a523_resets,
4133
diff --git a/dts/upstream/include/dt-bindings/clock/sun55i-a523-ccu.h b/dts/upstream/include/dt-bindings/clock/sun55i-a523-ccu.h
4234
index 111111111111..222222222222 100644
4335
--- a/dts/upstream/include/dt-bindings/clock/sun55i-a523-ccu.h
4436
+++ b/dts/upstream/include/dt-bindings/clock/sun55i-a523-ccu.h
45-
@@ -183,7 +183,8 @@
46-
#define CLK_FANOUT_27M 174
47-
#define CLK_FANOUT_PCLK 175
37+
@@ -185,5 +185,6 @@
4838
#define CLK_FANOUT0 176
4939
#define CLK_FANOUT1 177
5040
#define CLK_FANOUT2 178

patch/u-boot/v2026.01/pcie-sunxi-add-dw-pcie-support-for-sun55i.patch

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
1616
index 111111111111..222222222222 100644
1717
--- a/drivers/pci/Kconfig
1818
+++ b/drivers/pci/Kconfig
19-
@@ -462,6 +462,14 @@ config PCIE_DW_IMX
20-
select SYSCON
21-
help
19+
@@ -464,4 +464,12 @@ config PCIE_DW_IMX
2220
Say Y here if you want to enable DW PCIe controller support on
2321
iMX SoCs.
2422

@@ -35,9 +33,7 @@ diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
3533
index 111111111111..222222222222 100644
3634
--- a/drivers/pci/Makefile
3735
+++ b/drivers/pci/Makefile
38-
@@ -55,5 +55,6 @@ obj-$(CONFIG_PCIE_DW_SIFIVE) += pcie_dw_sifive.o
39-
obj-$(CONFIG_PCIE_UNIPHIER) += pcie_uniphier.o
40-
obj-$(CONFIG_PCIE_XILINX_NWL) += pcie-xilinx-nwl.o
36+
@@ -57,3 +57,4 @@ obj-$(CONFIG_PCIE_XILINX_NWL) += pcie-xilinx-nwl.o
4137
obj-$(CONFIG_PCIE_PLDA_COMMON) += pcie_plda_common.o
4238
obj-$(CONFIG_PCIE_STARFIVE_JH7110) += pcie_starfive_jh7110.o
4339
obj-$(CONFIG_PCIE_DW_IMX) += pcie_dw_imx.o

patch/u-boot/v2026.01/phy-allwinner-add-pcie-usb3-driver.patch

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ diff --git a/drivers/phy/allwinner/Kconfig b/drivers/phy/allwinner/Kconfig
1414
index 111111111111..222222222222 100644
1515
--- a/drivers/phy/allwinner/Kconfig
1616
+++ b/drivers/phy/allwinner/Kconfig
17-
@@ -31,5 +31,13 @@ config PHY_SUN50I_USB3
18-
depends on ARCH_SUNXI
19-
select PHY
17+
@@ -33,3 +33,11 @@ config PHY_SUN50I_USB3
2018
help
2119
Enable this to support the USB3 transceiver that is part of
2220
Allwinner sun50i SoCs.
@@ -32,9 +30,7 @@ diff --git a/drivers/phy/allwinner/Makefile b/drivers/phy/allwinner/Makefile
3230
index 111111111111..222222222222 100644
3331
--- a/drivers/phy/allwinner/Makefile
3432
+++ b/drivers/phy/allwinner/Makefile
35-
@@ -3,5 +3,6 @@
36-
# Copyright (C) 2016 Amarula Solutions
37-
#
33+
@@ -5,3 +5,4 @@
3834

3935
obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o
4036
obj-$(CONFIG_PHY_SUN50I_USB3) += phy-sun50i-usb3.o

0 commit comments

Comments
 (0)