Skip to contentSkip to conversation

arm64: dts: allwinner: add A733 and Radxa Cubie A7 support

PATCH In review Enzo Adriano 10 participants 43 messages Nov 26 – Dec 1

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v6 cover arm64: dts: allwinner: add A733 and Radxa Cubie A7 support

Add the common Allwinner A733 device tree and initial Radxa Cubie A7A, A7S and A7Z support. V6 adds the tested A7A and A7Z board descriptions and their shared pin and binding updates. The A7S ELDO1 voltage range remains open pending Chen-Yu's answer on LPDDR5 VDD2L.

Base: sunxi/for-next (abcb290978fbfddb56fc77171918dd8b8ef3e81b).
V5: https://lore.kernel.org/r/[email protected]

Schema check: arm/sunxi.yaml and all three DTBs with arm64 defconfig and W=2 CHECK_DTBS=y. The three schema prerequisites, in apply order:

AXP318W PMIC v8, 3/5
https://lore.kernel.org/r/[email protected]
Pinctrl IRQ-bank RESEND v3, 2/3
https://lore.kernel.org/r/[email protected]
A733 UART binding v2, 3/4
https://lore.kernel.org/r/09f3a181436e6f19317224e583c2fdaa787797d7.1792439398.git.vinicius.eduardo.pedrosa@gmail.com

The A733 CCU support is in the base. The remaining runtime dependencies are the full PMIC, IRQ-bank and UART series, firmware clocks for warm reboot with vendor firmware, and automatic pinctrl voltage detection:

https://lore.kernel.org/r/[email protected]
https://lore.kernel.org/r/[email protected]
https://lore.kernel.org/r/[email protected]
https://lore.kernel.org/r/[email protected]
https://lore.kernel.org/r/[email protected]

The card-detect EINT-mux fix is in pinctrl fixes as a256b8c8083e. It is outside the stated sunxi base.
https://lore.kernel.org/r/[email protected]

Boot: the v6 DTBs have yet to run on hardware.

- A7S v5 booted with vendor firmware and the runtime dependencies. Console, PMIC readback, MMC enumeration, LED and EEPROM probe, and warm reboot worked. A follow-up with the EINT-mux fix read a matching 16 MiB MMC prefix at 50 MHz and 3.3 V. An earlier read from a different offset returned an unexplained digest mismatch.
- Norman tested A7S v5 with his own firmware and a 2 MiB RAM reservation. He verified PMIC readback, PMU counting and overflow on all CPUs, MMC reads and write/readback, EEPROM reads, visible LEDs, warm reboot and power-off.
https://lore.kernel.org/r/CqGMQaDysL6l016qtEM8oOEnYUMKACgmwLUbb0wruVAzPcwiqrz00WCOhTrhkVEaZt1YB3xfucXdEc-ZFi-sCPgn69RNqtW0v4Gn_HjQZXs=@proton.me
- Vinicius tested A7Z v1.11 with a local 16 MiB RAM reservation and a subset of the dependencies. Eight CPUs, PMU counting and overflow, PMIC probe, MMC readback and the LED worked. He tested card hotplug on the preceding DTS with the EINT-mux fix.
https://lore.kernel.org/r/[email protected]
- Andre tested A7A with pinctrl and PMIC patches. MMC and its card-detect IRQ, LEDs and EEPROM reads worked. The external RTC probed and reported an invalid calendar format.
https://lore.kernel.org/r/[email protected]

Still untested: physical rail voltages and CPU/cache topology, EL2 interrupts, ITS/MSI, stimulated PMIC/NMI interrupts, suspend, 1.8 V SD signalling, A7S card hotplug, EEPROM writes and write protection, A7Z v1.10 pull-up behaviour and A7Z v2.00.

Andre Przywara (1):
arm64: dts: allwinner: add Radxa Cubie A7A board

Enzo Adriano (3):
dt-bindings: arm: sunxi: document Radxa Cubie A7A, A7S and A7Z
arm64: dts: allwinner: add A733 SoC description
arm64: dts: allwinner: add Radxa Cubie A7S board

Vinicius Pedrosa (1):
arm64: dts: allwinner: add Radxa Cubie A7Z board

 .../devicetree/bindings/arm/sunxi.yaml        |  15 +
 arch/arm64/boot/dts/allwinner/Makefile        |   3 +
 .../dts/allwinner/sun60i-a733-cubie-a7a.dts   | 385 ++++++++++
 .../dts/allwinner/sun60i-a733-cubie-a7s.dts   | 333 +++++++++
 .../dts/allwinner/sun60i-a733-cubie-a7z.dts   | 349 +++++++++
 .../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 671 ++++++++++++++++++
 6 files changed, 1756 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi

base-commit: abcb290978fbfddb56fc77171918dd8b8ef3e81b

#1 lore raw

PATCH v6 1/5 dt-bindings: arm: sunxi: document Radxa Cubie A7A, A7S and A7Z

Document the Radxa Cubie A7A, A7S and A7Z with their Allwinner A733 SoC compatible. The initial device trees for all three boards are ready to use these entries. Radxa's Linux 5.15 A7A DTS already uses the same compatible pair.

---
Changes since v5:
- Fold in the A7Z compatible from Vinicius's binding patch.
- Drop Alexander's Reviewed-by, which covered the A7S entry alone. Krzysztof acked the A7S and A7Z entries separately. Leave the Acked-by off the combined patch since it also includes the A7A entry.

 Documentation/devicetree/bindings/arm/sunxi.yaml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Documentation/devicetree/bindings/arm/sunxi.yaml +15 -0
index 7da84e2de748..7a7f96f21f57 100644
@@ -857,6 +857,21 @@ properties:
           - const: radxa,cubie-a5e
           - const: allwinner,sun55i-a527
 
+      - description: Radxa Cubie A7A
+        items:
+          - const: radxa,cubie-a7a
+          - const: allwinner,sun60i-a733
+
+      - description: Radxa Cubie A7S
+        items:
+          - const: radxa,cubie-a7s
+          - const: allwinner,sun60i-a733
+
+      - description: Radxa Cubie A7Z
+        items:
+          - const: radxa,cubie-a7z
+          - const: allwinner,sun60i-a733
+
       - description: Remix Mini PC
         items:
           - const: jide,remix-mini-pc
Reviewed-by on v6 1/5
#2 lore raw

Re: [PATCH v6 1/5] dt-bindings: arm: sunxi: document Radxa Cubie A7A, A7S and A7Z

Hi,

Quoted 3 lines · Enzo Adriano

Document the Radxa Cubie A7A, A7S and A7Z with their Allwinner A733 SoC compatible.
The initial device trees for all three boards are> ready to use these entries.

Not sure what this sentence is supposed to mean. Please look at other commit messages for that file to see what should be in here.

Quoted 1 line

Radxa's Linux 5.15 A7A DTS already uses the same compatible pair.

That's irrelevant, please drop.

Quoted 1 line

Please no links to dodgy vendor patches.

Quoted 4 lines

The patch itself looks fine, thanks for putting them all together. With the commit message fixed:

Cheers,
Andre

Quoted 36 lines

---
Changes since v5:
- Fold in the A7Z compatible from Vinicius's binding patch.
- Drop Alexander's Reviewed-by, which covered the A7S entry alone. Krzysztof acked the A7S and A7Z entries separately. Leave the Acked-by off the combined patch since it also includes the A7A entry.

  Documentation/devicetree/bindings/arm/sunxi.yaml | 15 +++++++++++++++
  1 file changed, 15 insertions(+)
Documentation/devicetree/bindings/arm/sunxi.yaml +15 -0
index 7da84e2de748..7a7f96f21f57 100644
@@ -857,6 +857,21 @@ properties:
            - const: radxa,cubie-a5e
            - const: allwinner,sun55i-a527
 
+      - description: Radxa Cubie A7A
+        items:
+          - const: radxa,cubie-a7a
+          - const: allwinner,sun60i-a733
+
+      - description: Radxa Cubie A7S
+        items:
+          - const: radxa,cubie-a7s
+          - const: allwinner,sun60i-a733
+
+      - description: Radxa Cubie A7Z
+        items:
+          - const: radxa,cubie-a7z
+          - const: allwinner,sun60i-a733
+
        - description: Remix Mini PC
          items:
            - const: jide,remix-mini-pc
#3 lore raw

Re: [PATCH v6 1/5] dt-bindings: arm: sunxi: document Radxa Cubie A7A, A7S and A7Z

In reply to Enzo Adriano
Quoted 32 lines · Enzo Adriano

Document the Radxa Cubie A7A, A7S and A7Z with their Allwinner A733 SoC compatible. The initial device trees for all three boards are ready to use these entries. Radxa's Linux 5.15 A7A DTS already uses the same compatible pair.

---
Changes since v5:
- Fold in the A7Z compatible from Vinicius's binding patch.
- Drop Alexander's Reviewed-by, which covered the A7S entry alone. Krzysztof acked the A7S and A7Z entries separately. Leave the Acked-by off the combined patch since it also includes the A7A entry.

 Documentation/devicetree/bindings/arm/sunxi.yaml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Documentation/devicetree/bindings/arm/sunxi.yaml +4 -0
index 7da84e2de748..7a7f96f21f57 100644
@@ -857,6 +857,21 @@ properties:
           - const: radxa,cubie-a5e
           - const: allwinner,sun55i-a527
 
+      - description: Radxa Cubie A7A
+        items:
+          - const: radxa,cubie-a7a
+          - const: allwinner,sun60i-a733

Documentation/devicetree/bindings/arm/sunxi.yaml properties: · line 873

Quoted 10 lines
Documentation/devicetree/bindings/arm/sunxi.yaml +10 -0
+
+      - description: Radxa Cubie A7S
+        items:
+          - const: radxa,cubie-a7s
+          - const: allwinner,sun60i-a733
+
+      - description: Radxa Cubie A7Z
+        items:
+          - const: radxa,cubie-a7z
+          - const: allwinner,sun60i-a733

So when patch is combined into one you can spot the redundancy. This should be just one list (items) with enum, because you have same fallback.

Best regards,
Krzysztof

#4 lore raw

PATCH v6 2/5 arm64: dts: allwinner: add A733 SoC description

In reply to Enzo Adriano

The Allwinner A733 combines six Cortex-A55 and two Cortex-A76 cores. Add the common device tree for the first Cubie A7A, A7S and A7Z board DTS files. Describe the CPUs, PSCI, architectural timers, GIC, RTC, main and always-on clock/reset and pin controllers, UART, I2C and MMC. The preceding revision booted on the A7S and A7Z.

The A7S schematic, sheets 7 and 16, shows the EEPROM wired to I2C0 on PG8/PG9. Use mux 6 as documented in the A733 Datasheet v1.00, section 4.2.6, table 4-36. The A7A schematic shows the external RTC on S_TWI1. Add its R-I2C1 pin group on PL12/PL13, mux 3.

The GIC maintenance PPI 9 and ARMv8.2 EL2 virtual-timer PPI 12 follow the A733 User Manual v1.00, section 12.2.3. The GICD/GICR/ITS windows and noncoherent attributes follow Andre Przywara's A733 reference and the A523 precedent. The CPUX interconnect diagram in section 5.1.2 supports the noncoherency inference. Leave the ITS disabled pending clock/reset and MSI integration.

Describe the single DynamIQ unit and shared L3 shown in section 5.1.2, figure 5-1. Partition PPI 7 (section 12.2.3, table 12-1) between the Cortex-A55 and Cortex-A76 PMUs so each probes its own core type. Defer capacity-dmips-mhz until it is measured on A733.

---
Changes since v5:
- Mark the I2C0 PG8/PG9 group /omit-if-no-ref/, as requested. This satisfies Andre's review condition.
- Move the RTC clock include after the A733 clock headers and cite the A733 datasheet and A7S schematic for the I2C0 pins.
- Fold in Andre's R-I2C1 pin group for A7A. A7S and A7Z leave it unused. A7S still references the I2C0 group.
- Vinicius tested the v5 DTSI with his A7Z v1.11 board DT. Norman tested the v5 series on A7S. Their tags here cover the SoC DTSI.

 .../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 671 ++++++++++++++++++
 1 file changed, 671 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +671 -0
new file mode 100644
index 000000000000..e062b08006da
@@ -0,0 +1,671 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+
+#include <dt-bindings/clock/allwinner,sun60i-a733-ccu.h>
+#include <dt-bindings/clock/allwinner,sun60i-a733-r-ccu.h>
+#include <dt-bindings/clock/sun6i-rtc.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/allwinner,sun60i-a733-ccu.h>
+#include <dt-bindings/reset/allwinner,sun60i-a733-r-ccu.h>
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <2>;
+	interrupt-parent = <&gic>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu0>;
+				};
+
+				core1 {
+					cpu = <&cpu1>;
+				};
+
+				core2 {
+					cpu = <&cpu2>;
+				};
+
+				core3 {
+					cpu = <&cpu3>;
+				};
+
+				core4 {
+					cpu = <&cpu4>;
+				};
+
+				core5 {
+					cpu = <&cpu5>;
+				};
+
+				core6 {
+					cpu = <&cpu6>;
+				};
+
+				core7 {
+					cpu = <&cpu7>;
+				};
+			};
+		};
+
+		cpu0: cpu@0 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x0>;
+			enable-method = "psci";
+		};
+
+		cpu1: cpu@100 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x100>;
+			enable-method = "psci";
+		};
+
+		cpu2: cpu@200 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x200>;
+			enable-method = "psci";
+		};
+
+		cpu3: cpu@300 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x300>;
+			enable-method = "psci";
+		};
+
+		cpu4: cpu@400 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x400>;
+			enable-method = "psci";
+		};
+
+		cpu5: cpu@500 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x500>;
+			enable-method = "psci";
+		};
+
+		cpu6: cpu@600 {
+			compatible = "arm,cortex-a76";
+			device_type = "cpu";
+			reg = <0x600>;
+			enable-method = "psci";
+		};
+
+		cpu7: cpu@700 {
+			compatible = "arm,cortex-a76";
+			device_type = "cpu";
+			reg = <0x700>;
+			enable-method = "psci";
+		};
+	};
+
+	hosc: clock-hosc {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+	};
+
+	pmu-a55 {
+		compatible = "arm,cortex-a55-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_a55>;
+	};
+
+	pmu-a76 {
+		compatible = "arm,cortex-a76-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_a76>;
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+		arm,no-tick-in-suspend;
+	};
+
+	soc@0 {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x0 0x0 0x40000000>;
+
+		pio: pinctrl@2000000 {
+			compatible = "allwinner,sun60i-a733-pinctrl";
+			reg = <0x02000000 0x800>;
+			interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_APB1>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			/omit-if-no-ref/
+			i2c0_pg_pins: i2c0-pg-pins {
+				pins = "PG8", "PG9";
+				function = "i2c0";
+				allwinner,pinmux = <6>;
+			};
+
+			mmc0_pins: mmc0-pins {
+				pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
+				function = "mmc0";
+				allwinner,pinmux = <2>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc1_pins: mmc1-pins {
+				pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5";
+				function = "mmc1";
+				allwinner,pinmux = <2>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc2_pins: mmc2-pins {
+				pins = "PC5", "PC6", "PC8", "PC9", "PC10", "PC11",
+				       "PC13", "PC14", "PC15", "PC16";
+				function = "mmc2";
+				allwinner,pinmux = <3>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			uart0_pb_pins: uart0-pb-pins {
+				pins = "PB9", "PB10";
+				function = "uart0";
+				allwinner,pinmux = <2>;
+			};
+		};
+
+		ccu: clock-controller@2002000 {
+			compatible = "allwinner,sun60i-a733-ccu";
+			reg = <0x02002000 0x2000>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&rtc CLK_OSC32K_FANOUT>;
+			clock-names = "hosc", "losc", "iosc", "losc-fanout";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		uart0: serial@2500000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02500000 0x400>;
+			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART0>;
+			resets = <&ccu RST_BUS_UART0>;
+			status = "disabled";
+		};
+
+		uart1: serial@2501000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02501000 0x400>;
+			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART1>;
+			resets = <&ccu RST_BUS_UART1>;
+			status = "disabled";
+		};
+
+		uart2: serial@2502000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02502000 0x400>;
+			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART2>;
+			resets = <&ccu RST_BUS_UART2>;
+			status = "disabled";
+		};
+
+		uart3: serial@2503000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02503000 0x400>;
+			interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART3>;
+			resets = <&ccu RST_BUS_UART3>;
+			status = "disabled";
+		};
+
+		uart4: serial@2504000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02504000 0x400>;
+			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART4>;
+			resets = <&ccu RST_BUS_UART4>;
+			status = "disabled";
+		};
+
+		uart5: serial@2505000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02505000 0x400>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART5>;
+			resets = <&ccu RST_BUS_UART5>;
+			status = "disabled";
+		};
+
+		uart6: serial@2506000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02506000 0x400>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART6>;
+			resets = <&ccu RST_BUS_UART6>;
+			status = "disabled";
+		};
+
+		i2c0: i2c@2510000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02510000 0x400>;
+			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C0>;
+			resets = <&ccu RST_BUS_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c1: i2c@2511000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02511000 0x400>;
+			interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C1>;
+			resets = <&ccu RST_BUS_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c2: i2c@2512000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02512000 0x400>;
+			interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C2>;
+			resets = <&ccu RST_BUS_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c3: i2c@2513000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02513000 0x400>;
+			interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C3>;
+			resets = <&ccu RST_BUS_I2C3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c4: i2c@2514000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02514000 0x400>;
+			interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C4>;
+			resets = <&ccu RST_BUS_I2C4>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c5: i2c@2515000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02515000 0x400>;
+			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C5>;
+			resets = <&ccu RST_BUS_I2C5>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c6: i2c@2516000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02516000 0x400>;
+			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C6>;
+			resets = <&ccu RST_BUS_I2C6>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c7: i2c@2517000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02517000 0x400>;
+			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C7>;
+			resets = <&ccu RST_BUS_I2C7>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c8: i2c@2518000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02518000 0x400>;
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C8>;
+			resets = <&ccu RST_BUS_I2C8>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c9: i2c@2519000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02519000 0x400>;
+			interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C9>;
+			resets = <&ccu RST_BUS_I2C9>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c10: i2c@251a000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251a000 0x400>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C10>;
+			resets = <&ccu RST_BUS_I2C10>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c11: i2c@251b000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251b000 0x400>;
+			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C11>;
+			resets = <&ccu RST_BUS_I2C11>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c12: i2c@251c000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251c000 0x400>;
+			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C12>;
+			resets = <&ccu RST_BUS_I2C12>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		gic: interrupt-controller@3400000 {
+			compatible = "arm,gic-v3";
+			reg = <0x03400000 0x10000>, <0x03460000 0x100000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+			dma-noncoherent;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			its: msi-controller@3440000 {
+				compatible = "arm,gic-v3-its";
+				reg = <0x03440000 0x20000>;
+				msi-controller;
+				#msi-cells = <1>;
+				dma-noncoherent;
+				status = "disabled";
+			};
+
+			ppi-partitions {
+				ppi_a55: interrupt-partition-0 {
+					affinity = <&cpu0 &cpu1 &cpu2 &cpu3 &cpu4 &cpu5>;
+				};
+
+				ppi_a76: interrupt-partition-1 {
+					affinity = <&cpu6 &cpu7>;
+				};
+			};
+		};
+
+		mmc0: mmc@4020000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04020000 0x1000>;
+			interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc1: mmc@4021000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04021000 0x1000>;
+			interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC1>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc1_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc2: mmc@4022000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04022000 0x1000>;
+			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC2>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc2_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_ccu: clock-controller@7010000 {
+			compatible = "allwinner,sun60i-a733-r-ccu";
+			reg = <0x07010000 0x250>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&ccu CLK_SYS_24M>, <&ccu CLK_PLL_PERIPH0_200M>,
+				 <&ccu CLK_PLL_PERIPH0_300M>,
+				 <&ccu CLK_PLL_PERIPH1_300M>;
+			clock-names = "hosc", "losc", "iosc", "sys-24m",
+				      "pll-periph0-200m", "pll-periph0-300m",
+				      "pll-periph1-300m";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		nmi_intc: interrupt-controller@7010320 {
+			compatible = "allwinner,sun60i-a733-nmi",
+				     "allwinner,sun55i-a523-nmi";
+			reg = <0x07010320 0xc>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH 0>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		r_pio: pinctrl@7025000 {
+			compatible = "allwinner,sun60i-a733-r-pinctrl";
+			reg = <0x07025000 0x800>;
+			interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_R_APB0>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			r_i2c0_pl_pins: r-i2c0-pl-pins {
+				pins = "PL0", "PL1";
+				function = "r_i2c0";
+				allwinner,pinmux = <2>;
+			};
+
+			/omit-if-no-ref/
+			r_i2c1_pl_pins: r-i2c1-pl-pins {
+				pins = "PL12", "PL13";
+				function = "r_i2c1";
+				allwinner,pinmux = <3>;
+			};
+		};
+
+		r_uart0: serial@7080000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07080000 0x400>;
+			interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART0>;
+			resets = <&r_ccu RST_BUS_R_UART0>;
+			status = "disabled";
+		};
+
+		r_uart1: serial@7081000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07081000 0x400>;
+			interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART1>;
+			resets = <&r_ccu RST_BUS_R_UART1>;
+			status = "disabled";
+		};
+
+		r_i2c0: i2c@7083000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07083000 0x400>;
+			interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C0>;
+			resets = <&r_ccu RST_BUS_R_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c1: i2c@7084000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07084000 0x400>;
+			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C1>;
+			resets = <&r_ccu RST_BUS_R_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c2: i2c@7085000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07085000 0x400>;
+			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C2>;
+			resets = <&r_ccu RST_BUS_R_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		rtc: rtc@7090000 {
+			compatible = "allwinner,sun60i-a733-rtc",
+				     "allwinner,sun50i-r329-rtc";
+			reg = <0x07090000 0x400>;
+			interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_RTC>, <&hosc>, <&r_ccu CLK_R_AHB>;
+			clock-names = "bus", "hosc", "ahb";
+			#clock-cells = <1>;
+		};
+	};
+};
#5 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [High] arm64: dts: allwinner: missing Port A interrupt in A733 pio node - [Low] arm64: dts: allwinner…

Thank you for your contribution! Sashiko AI review found 3 potential issues to consider:
- [High] arm64: dts: allwinner: missing Port A interrupt in A733 pio node
- [Low] arm64: dts: allwinner: undocumented allwinner,sun60i-a733-uart compatible
- [Low] arm64: dts: allwinner: commit message claims shared L3 is described in DT
--

commit ca507efa367e6e97ea2be259dd6d3577602268a3
Author: Enzo Adriano <[email protected]>

arm64: dts: allwinner: add A733 SoC description

This commit adds the base SoC Devicetree description for the Allwinner A733, covering the CPUs, PSCI, timers, GIC, RTC, clock/reset and pin controllers, UART, I2C, and MMC.

Quoted 4 lines

Describe the single DynamIQ unit and shared L3 shown in section 5.1.2, figure 5-1. Partition PPI 7 (section 12.2.3, table 12-1) between the Cortex-A55 and Cortex-A76 PMUs so each probes its own core type. Defer capacity-dmips-mhz until it is measured on A733.

[Severity: Low]
Does the Devicetree actually describe the shared L3 cache as stated here? The /cpus node defines cluster0 in cpu-map and cpu0 through cpu7, without any cache nodes or next-level-cache properties.

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +0 -0
new file mode 100644
index 0000000000000..e062b08006da0

[ ... ]

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 160

Quoted 13 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +13 -0
+		pio: pinctrl@2000000 {
+			compatible = "allwinner,sun60i-a733-pinctrl";
+			reg = <0x02000000 0x800>;
+			interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH 0>;

[Severity: High]
Should pio include the Port A interrupt (GIC_SPI 67) as the first entry so that interrupts has 11 items?

The binding in allwinner,sun55i-a523-pinctrl.yaml requires 11 interrupts for allwinner,sun60i-a733-pinctrl (matching the A523 fix in commit 6b81aa0c8a4f ("arm64: dts: allwinner: a523: Add missing GPIO interrupt")). In the driver, prepare_function_table() starts at bank 1 for Port B because Port A has 0 pins, and sunxi_irq_base_reg() indexes Port A at bank 0 and Ports B through K at banks 1 through 10. Omitting GIC_SPI 67 shifts pctl->irq[] by one bank, so any GPIO interrupt on Ports B through K reads and clears the preceding bank's status register and leaves the actual interrupt unhandled.

[ ... ]

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 219

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +3 -0
+		uart0: serial@2500000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";

[Severity: Low]
As reported by Chen-Yu Tsai on v5 [1], the compatible string "allwinner,sun60i-a733-uart" used on uart0 through uart6 and r_uart0 through r_uart1 is not documented in Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml, which causes dtbs_check validation failures.

[1] https://lore.kernel.org/r/CAGb2v64c5oirvfq7R3a1CWQCydfOOipcRD7dhSFAb=zczRdTHw@mail.gmail.com

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
maintainer
#6 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

In reply to Enzo Adriano

Dne četrtek, 26. november 2026 ob 21:35:40 Srednjeevropski standardni čas je Enzo Adriano napisal(a):

Quoted 545 lines

The Allwinner A733 combines six Cortex-A55 and two Cortex-A76 cores. Add the common device tree for the first Cubie A7A, A7S and A7Z board DTS files. Describe the CPUs, PSCI, architectural timers, GIC, RTC, main and always-on clock/reset and pin controllers, UART, I2C and MMC. The preceding revision booted on the A7S and A7Z.

The A7S schematic, sheets 7 and 16, shows the EEPROM wired to I2C0 on PG8/PG9. Use mux 6 as documented in the A733 Datasheet v1.00, section 4.2.6, table 4-36. The A7A schematic shows the external RTC on S_TWI1. Add its R-I2C1 pin group on PL12/PL13, mux 3.

The GIC maintenance PPI 9 and ARMv8.2 EL2 virtual-timer PPI 12 follow the A733 User Manual v1.00, section 12.2.3. The GICD/GICR/ITS windows and noncoherent attributes follow Andre Przywara's A733 reference and the A523 precedent. The CPUX interconnect diagram in section 5.1.2 supports the noncoherency inference. Leave the ITS disabled pending clock/reset and MSI integration.

Describe the single DynamIQ unit and shared L3 shown in section 5.1.2, figure 5-1. Partition PPI 7 (section 12.2.3, table 12-1) between the Cortex-A55 and Cortex-A76 PMUs so each probes its own core type. Defer capacity-dmips-mhz until it is measured on A733.

---
Changes since v5:
- Mark the I2C0 PG8/PG9 group /omit-if-no-ref/, as requested. This satisfies Andre's review condition.
- Move the RTC clock include after the A733 clock headers and cite the A733 datasheet and A7S schematic for the I2C0 pins.
- Fold in Andre's R-I2C1 pin group for A7A. A7S and A7Z leave it unused. A7S still references the I2C0 group.
- Vinicius tested the v5 DTSI with his A7Z v1.11 board DT. Norman tested the v5 series on A7S. Their tags here cover the SoC DTSI.

 .../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 671 ++++++++++++++++++
 1 file changed, 671 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +493 -0
new file mode 100644
index 000000000000..e062b08006da
@@ -0,0 +1,671 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+
+#include <dt-bindings/clock/allwinner,sun60i-a733-ccu.h>
+#include <dt-bindings/clock/allwinner,sun60i-a733-r-ccu.h>
+#include <dt-bindings/clock/sun6i-rtc.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/allwinner,sun60i-a733-ccu.h>
+#include <dt-bindings/reset/allwinner,sun60i-a733-r-ccu.h>
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <2>;
+	interrupt-parent = <&gic>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu0>;
+				};
+
+				core1 {
+					cpu = <&cpu1>;
+				};
+
+				core2 {
+					cpu = <&cpu2>;
+				};
+
+				core3 {
+					cpu = <&cpu3>;
+				};
+
+				core4 {
+					cpu = <&cpu4>;
+				};
+
+				core5 {
+					cpu = <&cpu5>;
+				};
+
+				core6 {
+					cpu = <&cpu6>;
+				};
+
+				core7 {
+					cpu = <&cpu7>;
+				};
+			};
+		};
+
+		cpu0: cpu@0 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x0>;
+			enable-method = "psci";
+		};
+
+		cpu1: cpu@100 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x100>;
+			enable-method = "psci";
+		};
+
+		cpu2: cpu@200 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x200>;
+			enable-method = "psci";
+		};
+
+		cpu3: cpu@300 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x300>;
+			enable-method = "psci";
+		};
+
+		cpu4: cpu@400 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x400>;
+			enable-method = "psci";
+		};
+
+		cpu5: cpu@500 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x500>;
+			enable-method = "psci";
+		};
+
+		cpu6: cpu@600 {
+			compatible = "arm,cortex-a76";
+			device_type = "cpu";
+			reg = <0x600>;
+			enable-method = "psci";
+		};
+
+		cpu7: cpu@700 {
+			compatible = "arm,cortex-a76";
+			device_type = "cpu";
+			reg = <0x700>;
+			enable-method = "psci";
+		};
+	};
+
+	hosc: clock-hosc {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+	};
+
+	pmu-a55 {
+		compatible = "arm,cortex-a55-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_a55>;
+	};
+
+	pmu-a76 {
+		compatible = "arm,cortex-a76-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_a76>;
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+		arm,no-tick-in-suspend;
+	};
+
+	soc@0 {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x0 0x0 0x40000000>;
+
+		pio: pinctrl@2000000 {
+			compatible = "allwinner,sun60i-a733-pinctrl";
+			reg = <0x02000000 0x800>;
+			interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_APB1>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			/omit-if-no-ref/
+			i2c0_pg_pins: i2c0-pg-pins {
+				pins = "PG8", "PG9";
+				function = "i2c0";
+				allwinner,pinmux = <6>;
+			};
+
+			mmc0_pins: mmc0-pins {
+				pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
+				function = "mmc0";
+				allwinner,pinmux = <2>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc1_pins: mmc1-pins {
+				pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5";
+				function = "mmc1";
+				allwinner,pinmux = <2>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc2_pins: mmc2-pins {
+				pins = "PC5", "PC6", "PC8", "PC9", "PC10", "PC11",
+				       "PC13", "PC14", "PC15", "PC16";
+				function = "mmc2";
+				allwinner,pinmux = <3>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			uart0_pb_pins: uart0-pb-pins {
+				pins = "PB9", "PB10";
+				function = "uart0";
+				allwinner,pinmux = <2>;
+			};
+		};
+
+		ccu: clock-controller@2002000 {
+			compatible = "allwinner,sun60i-a733-ccu";
+			reg = <0x02002000 0x2000>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&rtc CLK_OSC32K_FANOUT>;
+			clock-names = "hosc", "losc", "iosc", "losc-fanout";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		uart0: serial@2500000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02500000 0x400>;
+			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART0>;
+			resets = <&ccu RST_BUS_UART0>;
+			status = "disabled";
+		};
+
+		uart1: serial@2501000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02501000 0x400>;
+			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART1>;
+			resets = <&ccu RST_BUS_UART1>;
+			status = "disabled";
+		};
+
+		uart2: serial@2502000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02502000 0x400>;
+			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART2>;
+			resets = <&ccu RST_BUS_UART2>;
+			status = "disabled";
+		};
+
+		uart3: serial@2503000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02503000 0x400>;
+			interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART3>;
+			resets = <&ccu RST_BUS_UART3>;
+			status = "disabled";
+		};
+
+		uart4: serial@2504000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02504000 0x400>;
+			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART4>;
+			resets = <&ccu RST_BUS_UART4>;
+			status = "disabled";
+		};
+
+		uart5: serial@2505000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02505000 0x400>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART5>;
+			resets = <&ccu RST_BUS_UART5>;
+			status = "disabled";
+		};
+
+		uart6: serial@2506000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02506000 0x400>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART6>;
+			resets = <&ccu RST_BUS_UART6>;
+			status = "disabled";
+		};
+
+		i2c0: i2c@2510000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02510000 0x400>;
+			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C0>;
+			resets = <&ccu RST_BUS_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c1: i2c@2511000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02511000 0x400>;
+			interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C1>;
+			resets = <&ccu RST_BUS_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c2: i2c@2512000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02512000 0x400>;
+			interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C2>;
+			resets = <&ccu RST_BUS_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c3: i2c@2513000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02513000 0x400>;
+			interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C3>;
+			resets = <&ccu RST_BUS_I2C3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c4: i2c@2514000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02514000 0x400>;
+			interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C4>;
+			resets = <&ccu RST_BUS_I2C4>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c5: i2c@2515000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02515000 0x400>;
+			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C5>;
+			resets = <&ccu RST_BUS_I2C5>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c6: i2c@2516000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02516000 0x400>;
+			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C6>;
+			resets = <&ccu RST_BUS_I2C6>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c7: i2c@2517000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02517000 0x400>;
+			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C7>;
+			resets = <&ccu RST_BUS_I2C7>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c8: i2c@2518000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02518000 0x400>;
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C8>;
+			resets = <&ccu RST_BUS_I2C8>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c9: i2c@2519000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02519000 0x400>;
+			interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C9>;
+			resets = <&ccu RST_BUS_I2C9>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c10: i2c@251a000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251a000 0x400>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C10>;
+			resets = <&ccu RST_BUS_I2C10>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c11: i2c@251b000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251b000 0x400>;
+			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C11>;
+			resets = <&ccu RST_BUS_I2C11>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c12: i2c@251c000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251c000 0x400>;
+			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C12>;
+			resets = <&ccu RST_BUS_I2C12>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		gic: interrupt-controller@3400000 {
+			compatible = "arm,gic-v3";
+			reg = <0x03400000 0x10000>, <0x03460000 0x100000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+			dma-noncoherent;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			its: msi-controller@3440000 {
+				compatible = "arm,gic-v3-its";
+				reg = <0x03440000 0x20000>;
+				msi-controller;
+				#msi-cells = <1>;
+				dma-noncoherent;
+				status = "disabled";
+			};
+
+			ppi-partitions {
+				ppi_a55: interrupt-partition-0 {
+					affinity = <&cpu0 &cpu1 &cpu2 &cpu3 &cpu4 &cpu5>;
+				};

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 503

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +10 -0
+
+				ppi_a76: interrupt-partition-1 {
+					affinity = <&cpu6 &cpu7>;
+				};
+			};
+		};
+
+		mmc0: mmc@4020000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";

That's not really the case, is it? A733 emmc has support for voltage switching, so regulator should be added here for voltage switching.

I suggest that you drop this node until proper adjustment is made.

Best regards,
Jernej

Quoted 170 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +168 -0
+			reg = <0x04020000 0x1000>;
+			interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc1: mmc@4021000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04021000 0x1000>;
+			interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC1>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc1_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc2: mmc@4022000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04022000 0x1000>;
+			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC2>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc2_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_ccu: clock-controller@7010000 {
+			compatible = "allwinner,sun60i-a733-r-ccu";
+			reg = <0x07010000 0x250>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&ccu CLK_SYS_24M>, <&ccu CLK_PLL_PERIPH0_200M>,
+				 <&ccu CLK_PLL_PERIPH0_300M>,
+				 <&ccu CLK_PLL_PERIPH1_300M>;
+			clock-names = "hosc", "losc", "iosc", "sys-24m",
+				      "pll-periph0-200m", "pll-periph0-300m",
+				      "pll-periph1-300m";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		nmi_intc: interrupt-controller@7010320 {
+			compatible = "allwinner,sun60i-a733-nmi",
+				     "allwinner,sun55i-a523-nmi";
+			reg = <0x07010320 0xc>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH 0>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		r_pio: pinctrl@7025000 {
+			compatible = "allwinner,sun60i-a733-r-pinctrl";
+			reg = <0x07025000 0x800>;
+			interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_R_APB0>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			r_i2c0_pl_pins: r-i2c0-pl-pins {
+				pins = "PL0", "PL1";
+				function = "r_i2c0";
+				allwinner,pinmux = <2>;
+			};
+
+			/omit-if-no-ref/
+			r_i2c1_pl_pins: r-i2c1-pl-pins {
+				pins = "PL12", "PL13";
+				function = "r_i2c1";
+				allwinner,pinmux = <3>;
+			};
+		};
+
+		r_uart0: serial@7080000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07080000 0x400>;
+			interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART0>;
+			resets = <&r_ccu RST_BUS_R_UART0>;
+			status = "disabled";
+		};
+
+		r_uart1: serial@7081000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07081000 0x400>;
+			interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART1>;
+			resets = <&r_ccu RST_BUS_R_UART1>;
+			status = "disabled";
+		};
+
+		r_i2c0: i2c@7083000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07083000 0x400>;
+			interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C0>;
+			resets = <&r_ccu RST_BUS_R_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c1: i2c@7084000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07084000 0x400>;
+			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C1>;
+			resets = <&r_ccu RST_BUS_R_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c2: i2c@7085000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07085000 0x400>;
+			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C2>;
+			resets = <&r_ccu RST_BUS_R_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		rtc: rtc@7090000 {
+			compatible = "allwinner,sun60i-a733-rtc",
+				     "allwinner,sun50i-r329-rtc";
+			reg = <0x07090000 0x400>;
+			interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_RTC>, <&hosc>, <&r_ccu CLK_R_AHB>;
+			clock-names = "bus", "hosc", "ahb";
+			#clock-cells = <1>;
+		};
+	};
+};
#7 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Hi Jernej,

Quoted 53 lines · Jernej Škrabec

Dne četrtek, 26. november 2026 ob 21:35:40 Srednjeevropski standardni čas je Enzo Adriano napisal(a):

Quoted 52 lines

The Allwinner A733 combines six Cortex-A55 and two Cortex-A76 cores. Add the common device tree for the first Cubie A7A, A7S and A7Z board DTS files. Describe the CPUs, PSCI, architectural timers, GIC, RTC, main and always-on clock/reset and pin controllers, UART, I2C and MMC. The preceding revision booted on the A7S and A7Z.

The A7S schematic, sheets 7 and 16, shows the EEPROM wired to I2C0 on PG8/PG9. Use mux 6 as documented in the A733 Datasheet v1.00, section 4.2.6, table 4-36. The A7A schematic shows the external RTC on S_TWI1. Add its R-I2C1 pin group on PL12/PL13, mux 3.

The GIC maintenance PPI 9 and ARMv8.2 EL2 virtual-timer PPI 12 follow the A733 User Manual v1.00, section 12.2.3. The GICD/GICR/ITS windows and noncoherent attributes follow Andre Przywara's A733 reference and the A523 precedent. The CPUX interconnect diagram in section 5.1.2 supports the noncoherency inference. Leave the ITS disabled pending clock/reset and MSI integration.

Describe the single DynamIQ unit and shared L3 shown in section 5.1.2, figure 5-1. Partition PPI 7 (section 12.2.3, table 12-1) between the Cortex-A55 and Cortex-A76 PMUs so each probes its own core type. Defer capacity-dmips-mhz until it is measured on A733.

---
Changes since v5:
- Mark the I2C0 PG8/PG9 group /omit-if-no-ref/, as requested. This satisfies Andre's review condition.
- Move the RTC clock include after the A733 clock headers and cite the A733 datasheet and A7S schematic for the I2C0 pins.
- Fold in Andre's R-I2C1 pin group for A7A. A7S and A7Z leave it unused. A7S still references the I2C0 group.
- Vinicius tested the v5 DTSI with his A7Z v1.11 board DT. Norman tested the v5 series on A7S. Their tags here cover the SoC DTSI.

  .../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 671 ++++++++++++++++++
  1 file changed, 671 insertions(+)

create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +0 -0
new file mode 100644
index 000000000000..e062b08006da
@@ -0,0 +1,671 @@

[ ... ]

Quoted 7 lines

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 503

Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +4 -0
+
+		mmc0: mmc@4020000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";

That's not really the case, is it? A733 emmc has support for voltage switching, so regulator should be added here for voltage switching.

But it's still compatible to the D1 MMC controller, isn't it? As in: a driver capable of supporting the D1 MMC IP can also drive the A733 MMC. I think the voltage regulator is a separate problem: it's external to the MMC IP. The vqmmc supply property is documented and usable, and the availability of the regulator it points to is a separate issue. The same as the H616 and A523 have the voltage switch already, but are still compatible to the A100 and D1, respectively.

Quoted 1 line

I suggest that you drop this node until proper adjustment is made.

Do you have any code for the voltage switch already? Your comment in the UHS-1 prep series suggests so? Any chance you can post that separately, to get any DT compatibility problems out of the way early?

Cheers,
Andre

Quoted 16 lines

Best regards,
Jernej

Quoted 13 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +13 -0
+			reg = <0x04020000 0x1000>;
+			interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
#8 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Quoted 7 lines

But it's still compatible to the D1 MMC controller, isn't it? As in: a driver capable of supporting the D1 MMC IP can also drive the A733 MMC. I think the voltage regulator is a separate problem: it's external to the MMC IP. The vqmmc supply property is documented and usable, and the availability of the regulator it points to is a separate issue. The same as the H616 and A523 have the voltage switch already, but are still compatible to the A100 and D1, respectively.

Agreed, and the manual backs it. The A733 User Manual v1.00, section 11.3.1, lists SDR 200 MHz at 1.8 V IO for SMHC0, but the SMHC register list has no voltage control. The Port F pad voltage is chosen in the GPIO block: GPIO_POW_VAL_SET_CTL at 0x0200_0070, bit 0 VCC_PF_PWR_VOL_SEL (0 = 1.8 V, 1 = 3.3 V, reset 1), section 18.14.6.3. So vqmmc for mmc0 would be a regulator provided from the pinctrl side.

On the A7S (schematic v1.10, sheets 4 and 7) both Port F supplies are fixed rails: VCC-IO, 3.3 V from SWOUT2, and VCC18-PF, 1.8 V from CLDO5. There is nothing to point vqmmc at today.

Unless Jernej still prefers dropping the node, v7 keeps mmc0 with the D1 fallback and no-1-8-v on all three boards. The Port F switch can follow when it exists.

Jernej, if your "emmc" meant SMHC2, I can also drop the unused mmc2 node; no board enables it.

Enzo

#9 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Hi Enzo,

Quoted 2 lines · Enzo Adriano

Jernej, if your "emmc" meant SMHC2, I can also drop the unused mmc2 node; no board enables it.

Please keep it. The Xunlong Orange Pi 4 Pro has an eMMC module socket on SMHC2. Alastair's posted board file does not enable it yet, but the socket needs &mmc2 (8 bit, HS200 at 1.8 V, hardware reset), so that board would be a user soon after yours.

While at it, the mmc2 pin group misses two signals the eMMC socket
uses: the data strobe on PC0 and the reset output on PC1, both function 3 like the other MMC2 pins:

	mmc2_pins: mmc2-pins {
		pins = "PC0", "PC1", "PC5", "PC6", "PC8", "PC9",
		       "PC10", "PC11", "PC13", "PC14", "PC15", "PC16";
		function = "mmc2";
		...
	};

Without PC1 the hardware reset (cap-mmc-hw-reset) has no effect, and without PC0 HS400 cannot work. On the Orange Pi 4 Pro the host controller probes with this node and the pin group above; I have only checked it with no module plugged, so I cannot report a card test yet.

For transparency: an LLM coding assistant helped with the analysis and with drafting this reply. I personally review every line before submission and test manually on the hardware.

Cheers,
Daniel

#10 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Quoted 10 lines · Daniel Golle

While at it, the mmc2 pin group misses two signals the eMMC socket
uses: the data strobe on PC0 and the reset output on PC1, both function 3 like the other MMC2 pins:

	mmc2_pins: mmc2-pins {
		pins = "PC0", "PC1", "PC5", "PC6", "PC8", "PC9",
		       "PC10", "PC11", "PC13", "PC14", "PC15", "PC16";
		function = "mmc2";
		...
	};

On the Radxa Cubie A7S the eMMC uses these two pins as well: its schematic (v1.10, page 7) connects EMMC_DS to PC0 and EMMC_RST to PC1, and the A733 User Manual (PC_CFG0) lists SDC2-DS and SDC2-RST as function 3 on these pins. The A7S has an eMMC footprint on SMHC2, so it would use mmc2 as well.

We tested this group in our A7S device tree, on the eMMC of one of our boards: one group with the twelve pins above, drive-strength 30 and bias-pull-up as in v6, and max-frequency = <200000000>. The card came up in HS400 with enhanced strobe, and in the same boot we also switched it to HS200; both ran at 200 MHz, 8 bit, 1.8 V. In each mode, 1 GiB of random data written to a fresh area read back identical three times, with no mmc errors. Our own A7S device tree keeps PC0 in a group of its own with bias-pull-down, a value we read back from the vendor image on this board; with PC0 switched to pull-up by register on that tree, HS400ES gave the same result.

This ran on our 6.18 based kernel with about 30 out-of-tree sunxi-mmc patches for the A733, among them HS400 with enhanced strobe, sample and strobe delay tuning and module clock changes, bound through an A733 eMMC compatible with the D1 fallback. The sunxi-mmc in linux-next masks HS400 and has no tuning, so this shows the pin group working, not v6 on linux-next. It was one board and one card (DV4032), at room temperature and without a long run. We have not tested whether the hardware reset on PC1 works, nor the group without PC0 and PC1.

Enzo, the mmc2 node in v6 has no max-frequency. sunxi-mmc sets f_max to 52 MHz before mmc_of_parse(), in linux-next as in our tree. On our kernel, with the same group but without max-frequency, the eMMC ran at a 50 MHz card clock in HS400ES and HS200, with the same data result; with max-frequency = <200000000> it ran at 200 MHz.

Not every A7S comes with the eMMC fitted; one of ours has it, so we can test the mmc2 node of the next version on it.

Measured and written up by AI agents (Claude) on my board.

Norman

#11 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Quoted 5 lines

Enzo, the mmc2 node in v6 has no max-frequency. sunxi-mmc sets f_max to 52 MHz before mmc_of_parse(), in linux-next as in our tree. On our kernel, with the same group but without max-frequency, the eMMC ran at a 50 MHz card clock in HS400ES and HS200, with the same data result; with max-frequency = <200000000> it ran at 200 MHz.

v7 leaves max-frequency out. No board in this series enables mmc2, so a higher limit could not be tested here. Without max-frequency or HS200 caps, the controller stays at the driver's 52 MHz limit.

The board patch that first enables an eMMC should set max-frequency and the speed-mode properties together, tested with mainline sunxi-mmc, which masks HS400 today.

Quoted 2 lines

Not every A7S comes with the eMMC fitted; one of ours has it, so we can test the mmc2 node of the next version on it.

Thanks for the offer. v7 keeps &mmc2 disabled and only adds PC0/PC1, so testing it there needs &mmc2 enabled locally on the eMMC board. I'll Cc you on v7.

Enzo

#12 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

In reply to Daniel Golle
Quoted 4 lines

Please keep it. The Xunlong Orange Pi 4 Pro has an eMMC module socket on SMHC2. Alastair's posted board file does not enable it yet, but the socket needs &mmc2 (8 bit, HS200 at 1.8 V, hardware reset), so that board would be a user soon after yours.

v7 keeps mmc2.

Quoted 3 lines

While at it, the mmc2 pin group misses two signals the eMMC socket
uses: the data strobe on PC0 and the reset output on PC1, both function 3 like the other MMC2 pins:

Agreed. The A733 User Manual v1.00, table 18-30 (Port C Multiplex Function) and PC_CFG0 (section 18.14.6.18) give SDC2-DS on PC0 and SDC2-RST on PC1, both at function 3. The A523 dtsi has the same pin group with both pins. v7 adds them.

No board in this series enables mmc2, so this is not tested here.

Enzo

maintainer
#13 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

In reply to Andre Przywara

Dne petek, 27. november 2026 ob 11:57:16 Srednjeevropski standardni čas je Andre Przywara napisal(a):

Quoted 67 lines

Hi Jernej,

Quoted 53 lines · Jernej Škrabec

Dne četrtek, 26. november 2026 ob 21:35:40 Srednjeevropski standardni čas je Enzo Adriano napisal(a):

Quoted 52 lines

The Allwinner A733 combines six Cortex-A55 and two Cortex-A76 cores. Add the common device tree for the first Cubie A7A, A7S and A7Z board DTS files. Describe the CPUs, PSCI, architectural timers, GIC, RTC, main and always-on clock/reset and pin controllers, UART, I2C and MMC. The preceding revision booted on the A7S and A7Z.

The A7S schematic, sheets 7 and 16, shows the EEPROM wired to I2C0 on PG8/PG9. Use mux 6 as documented in the A733 Datasheet v1.00, section 4.2.6, table 4-36. The A7A schematic shows the external RTC on S_TWI1. Add its R-I2C1 pin group on PL12/PL13, mux 3.

The GIC maintenance PPI 9 and ARMv8.2 EL2 virtual-timer PPI 12 follow the A733 User Manual v1.00, section 12.2.3. The GICD/GICR/ITS windows and noncoherent attributes follow Andre Przywara's A733 reference and the A523 precedent. The CPUX interconnect diagram in section 5.1.2 supports the noncoherency inference. Leave the ITS disabled pending clock/reset and MSI integration.

Describe the single DynamIQ unit and shared L3 shown in section 5.1.2, figure 5-1. Partition PPI 7 (section 12.2.3, table 12-1) between the Cortex-A55 and Cortex-A76 PMUs so each probes its own core type. Defer capacity-dmips-mhz until it is measured on A733.

---
Changes since v5:
- Mark the I2C0 PG8/PG9 group /omit-if-no-ref/, as requested. This satisfies Andre's review condition.
- Move the RTC clock include after the A733 clock headers and cite the A733 datasheet and A7S schematic for the I2C0 pins.
- Fold in Andre's R-I2C1 pin group for A7A. A7S and A7Z leave it unused. A7S still references the I2C0 group.
- Vinicius tested the v5 DTSI with his A7Z v1.11 board DT. Norman tested the v5 series on A7S. Their tags here cover the SoC DTSI.

  .../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 671 ++++++++++++++++++
  1 file changed, 671 insertions(+)

create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +0 -0
new file mode 100644
index 000000000000..e062b08006da
@@ -0,0 +1,671 @@

[ ... ]

Quoted 7 lines

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 503

Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +4 -0
+
+		mmc0: mmc@4020000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";

That's not really the case, is it? A733 emmc has support for voltage switching, so regulator should be added here for voltage switching.

Quoted 7 lines

But it's still compatible to the D1 MMC controller, isn't it? As in: a driver capable of supporting the D1 MMC IP can also drive the A733 MMC. I think the voltage regulator is a separate problem: it's external to the MMC IP. The vqmmc supply property is documented and usable, and the availability of the regulator it points to is a separate issue. The same as the H616 and A523 have the voltage switch already, but are still compatible to the A100 and D1, respectively.

Ah, sorry, mmc0 node is ok. Power supply is the tricky part and that belongs to board dts.

Quoted 6 lines
Quoted 2 lines

I suggest that you drop this node until proper adjustment is made.

Do you have any code for the voltage switch already? Your comment in the UHS-1 prep series suggests so? Any chance you can post that separately, to get any DT compatibility problems out of the way early?

As you may remember #linux-sunxi discussion a month or so ago, you had objections regarding broking forward compatibility. So now is the time to properly address this for A733. As discussed, proper way would be to introduce regulator child node in pinctrl and point vmmc-supply to it.

Example is here:
https://github.com/jernejsk/linux-1/commits/sunxi-mmc-uhs/

(just pretend that vmmc-supply is used instead of vqmmc-supply)

Best regards,
Jernej

Quoted 21 lines

Cheers,
Andre

Quoted 16 lines

Best regards,
Jernej

Quoted 13 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +13 -0
+			reg = <0x04020000 0x1000>;
+			interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
#14 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

In reply to Jernej Škrabec
Quoted 9 lines · Jernej Škrabec

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 503

Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +4 -0
+
+		mmc0: mmc@4020000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";

That's not really the case, is it? A733 emmc has support for voltage switching, so regulator should be added here for voltage switching.

I suggest that you drop this node until proper adjustment is made.

I'm not sure what you mean here. AFAICT in the documentations, the D1 and A733 provide the same registers and should be compatible. They are so far.

The driver does not implement CMD11 but this equally applicatble to D1, isn't it ?

What we might be lacking right now is properly voltage selector on PORT F.

Quoted 4 lines

Best regards,
Jernej

Signature · 1 line
Jerome
#15 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Hi Jerome,

On the PF voltage selector: we have been running UHS-I on the Cubie A7S for a while in our own trees (6.18 and mainline based). Here is what we ran into, in case it helps whoever models it.

- The switch: on this board bank PF takes its supply from VCC-IO (3.3 V) or from CLDO5 (1.8 V), selected by GPIO_POW_VAL_SET_CTL bit 0 (1 = 3.3 V). There is no external regulator to switch, so vqmmc does not fit, and sunxi-mmc without vqmmc returns -EINVAL for 1.8 V. We use two pinctrl states, "sdmmc-3v3" and "sdmmc-1v8" as on Tegra, whose pin groups carry power-source.

- The withstand mode: with PF in the adaptive mode of GPIO_POW_MOD_SEL (01, which is what the pinctrl automatic voltage detection patch sets), the pads follow the SoC's own supply detector, and on our board that detector now and then reports 3.3 V while PF runs at 1.8 V. With one card, 14 of 40 SD rebinds at SDR104 failed: the CMD6 status read gets a data CRC error and the card falls back to high speed; once the card was lost ("error -5 whilst initialising SD card"). Setting the PF mode by hand together with the switch gave 0 of 40: 10 (3.3 V) before switching to 3.3 V, and 11 (1.8 V) after switching to 1.8 V, once GPIO_POW_VAL reports PF at 1.8 V. Our final patch does that and also gave 0 of 40. Oddly, the fault also goes away while the USB3 combo PHY runs; on this board CLDO5 supplies its analog part too. Another card passed 40 of 40 even in the adaptive mode.

- The eMMC on bank PC needs no switching, CLDO5 is fixed at 1.8 V. But if the boot chain leaves the PC field at its reset value 10 (the register resets to 0x022aaaa0), HS400 enhanced strobe fails with "mmc_select_hs400es failed, error -110". So on PC, 10 behaves as the 3.3 V mode, as in the register table, not as the adaptive mode the text of 18.14.4.6 gives for C/E/K. 01 and the fixed 1.8 V mode (11) both work.

We can test patches for this on the A7S, SD and eMMC.

Built and measured by AI agents (Claude) on my boards.

Thanks,
Norman

#16 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Hi,

Quoted 9 lines · Norman Herms

Hi Jerome,

On the PF voltage selector: we have been running UHS-I on the Cubie A7S for a while in our own trees (6.18 and mainline based). Here is what we ran into, in case it helps whoever models it.

- The switch: on this board bank PF takes its supply from VCC-IO (3.3 V) or from CLDO5 (1.8 V), selected by GPIO_POW_VAL_SET_CTL bit 0 (1 = 3.3 V). There is no external regulator to switch, so

What do you mean by that? The proper solution is to *create* a new regulator driver, either embedded in the pinctrl driver (make the pinctrl export a regulator device), or as a separate driver, using some pinctrl provided regmap. To be precise, it should be some kind of regulator mux, selecting between VCC-IO and VCC18-PF. And then it should indeed just be a matter of pointing vqmmc-supply to that regulator to make it work.
Are you using a different approach? I have seen various downstream patches implementing something similar, and they seem to be happy.
And I have seen pinctrl states as well, but think we need a proper vqmmc regulator, regardless?

Quoted 2 lines

vqmmc does not fit, and sunxi-mmc without vqmmc returns -EINVAL for 1.8 V.

Do you mean you use vmmc-supply to point to some 1.8V regulator? This is indeed bound to fail, as the SD spec requires 3.3V always for the supply voltage. And the binding/SD card Linux subsystem allows not providing vqmmc, at which point it will assume it's the same as vmmc - but not the other way around.

Quoted 7 lines

We use two pinctrl states, "sdmmc-3v3" and "sdmmc-1v8" as on> Tegra, whose pin groups carry power-source.

- The withstand mode: with PF in the adaptive mode of GPIO_POW_MOD_SEL (01, which is what the pinctrl automatic voltage detection patch sets), the pads follow the SoC's own supply detector, and on our board that detector now and then reports 3.3 V while PF runs at 1.8 V.

Is that a timing issue, maybe? Maybe the sampling happens only so often, and you just happen to miss the change, occasionally?

Quoted 5 lines

With one card, 14 of 40 SD rebinds at
SDR104 failed: the CMD6 status read gets a data CRC error and the card falls back to high speed; once the card was lost ("error -5 whilst initialising SD card"). Setting the PF mode by hand together with the switch gave 0 of 40: 10 (3.3 V) before switching to 3.3 V,

Just to clarify: "0 of 40" means *0 fails* here, so it works?

Quoted 2 lines

and 11 (1.8 V) after switching to 1.8 V, once GPIO_POW_VAL reports PF at 1.8 V. Our final patch does that and also gave 0 of 40.

Do you mean your patch just badly hacks those two bits to do what you want, by treating PortF separately, but it's not something that looks nice and upstreamable?

Quoted 2 lines

Oddly, the fault also goes away while the USB3 combo PHY runs; on this board CLDO5 supplies its analog part too. Another card passed

So according to the A7A schematics VCC18-PF is a separate power supply pin on the SoC, and it's supplied by CLDO5. On the A7A CLDO5 is not always-on, so you would need to reference it somewhere to be enabled, by the SD card node.

Quoted 7 lines

40 of 40 even in the adaptive mode.

- The eMMC on bank PC needs no switching, CLDO5 is fixed at 1.8 V. But if the boot chain leaves the PC field at its reset value 10 (the register resets to 0x022aaaa0), HS400 enhanced strobe fails with "mmc_select_hs400es failed, error -110". So on PC, 10 behaves as the 3.3 V mode, as in the register table, not as the adaptive mode the

But this is a firmware problem, then? As 0b10 is documented as 3.3V, which is wrong if you use a 1.8V eMMC. So doesn't the new pinctrl fix patch overwrite this with "auto" (0b01)? Even if not, firmware should not program the wrong values. I guess U-Boot would similarly fail to access the eMMC with that wrong value?

Cheers,
Andre

Quoted 9 lines

text of 18.14.4.6 gives for C/E/K. 01 and the fixed 1.8 V mode (11) both work.

We can test patches for this on the A7S, SD and eMMC.

Built and measured by AI agents (Claude) on my boards.

Thanks,
Norman

#17 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Hi Andre,

Quoted 4 lines

What do you mean by that? The proper solution is to *create* a new regulator driver, either embedded in the pinctrl driver (make the pinctrl export a regulator device), or as a separate driver, using some pinctrl provided regmap.

[...]

Quoted 1 line

Are you using a different approach?

Yes, a different one: I only meant that there is no PMIC regulator whose voltage could be changed, the switch is inside the pin controller. We went with pinctrl states, and sunxi-mmc selects them in its voltage switch when there is no vqmmc. It works, but a regulator mux exported by the pin controller, with vqmmc pointing at it, looks cleaner to me and needs no change in sunxi-mmc. We are happy to test that.

Quoted 1 line

Do you mean you use vmmc-supply to point to some 1.8V regulator?

No, vmmc is SWOUT2 at 3.3 V. Without vqmmc, sunxi_mmc_volt_switch() returns -EINVAL for 1.8 V, so the card stays at 3.3 V without UHS.

Quoted 2 lines

Is that a timing issue, maybe? Maybe the sampling happens only so often, and you just happen to miss the change, occasionally?

We cannot rule that out. We read the detector at every SD interrupt while PF ran at 1.8 V: in the adaptive mode it said "not 1.8 V" at 2 of 90 and 6 of 83 reads, and with the mode set by hand at 1 of 99 and 3 of 103, where the card stayed clean. Right after a switch it already reported 1.8 V on the first read in our trace, so it does not look like a slow detector. The USB3 combo PHY points the same way, as it shares CLDO5 on this board: with the PHY running the failures go away, and in older traces the detector said 3.3 V in the first 25 ms at 1.8 V at 2 of 76 reads with the PHY off, but at 0 of 1137 with it running. Those two traces also differ in kernel and DT, though, and a run comparing both in the same boot never happened.

Quoted 1 line

Just to clarify: "0 of 40" means *0 fails* here, so it works?

Yes, 0 failures in 40 rebinds.

Quoted 3 lines

Do you mean your patch just badly hacks those two bits to do what you want, by treating PortF separately, but it's not something that looks nice and upstreamable?

Yes, it is a special case for bank PF in the pinctrl driver. With a regulator mux, its set_voltage would be the natural place for the same order.

Quoted 2 lines

So according to the A7A schematics VCC18-PF is a separate power supply pin on the SoC, and it's supplied by CLDO5.

Same on the A7S. There CLDO5 also feeds VCC-PC (the eMMC VCCQ) and the combo PHY's analog supply, and v6 already references it as vcc-pc-supply.

Quoted 3 lines

But this is a firmware problem, then? As 0b10 is documented as 3.3V, which is wrong if you use a 1.8V eMMC. So doesn't the new pinctrl fix patch overwrite this with "auto" (0b01)?

Yes, it is a firmware problem, and yes: with the pinctrl patch the register reads 0x05555555 under v6, so PC is in auto. Our boot chain writes auto too; we set PC to 10 by hand at runtime to see what happens. My point was only that 10 on PC does not behave as the adaptive mode that the manual text gives for C/E/K. Whether U-Boot fails with it too, we have not tested.

Built and measured by AI agents (Claude) on my boards.

Thanks,
Norman

#18 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

In reply to Enzo Adriano
Quoted 553 lines · Enzo Adriano

The Allwinner A733 combines six Cortex-A55 and two Cortex-A76 cores. Add the common device tree for the first Cubie A7A, A7S and A7Z board DTS files. Describe the CPUs, PSCI, architectural timers, GIC, RTC, main and always-on clock/reset and pin controllers, UART, I2C and MMC. The preceding revision booted on the A7S and A7Z.

The A7S schematic, sheets 7 and 16, shows the EEPROM wired to I2C0 on PG8/PG9. Use mux 6 as documented in the A733 Datasheet v1.00, section 4.2.6, table 4-36. The A7A schematic shows the external RTC on S_TWI1. Add its R-I2C1 pin group on PL12/PL13, mux 3.

The GIC maintenance PPI 9 and ARMv8.2 EL2 virtual-timer PPI 12 follow the A733 User Manual v1.00, section 12.2.3. The GICD/GICR/ITS windows and noncoherent attributes follow Andre Przywara's A733 reference and the A523 precedent. The CPUX interconnect diagram in section 5.1.2 supports the noncoherency inference. Leave the ITS disabled pending clock/reset and MSI integration.

Describe the single DynamIQ unit and shared L3 shown in section 5.1.2, figure 5-1. Partition PPI 7 (section 12.2.3, table 12-1) between the Cortex-A55 and Cortex-A76 PMUs so each probes its own core type. Defer capacity-dmips-mhz until it is measured on A733.

---
Changes since v5:
- Mark the I2C0 PG8/PG9 group /omit-if-no-ref/, as requested. This satisfies Andre's review condition.
- Move the RTC clock include after the A733 clock headers and cite the A733 datasheet and A7S schematic for the I2C0 pins.
- Fold in Andre's R-I2C1 pin group for A7A. A7S and A7Z leave it unused. A7S still references the I2C0 group.
- Vinicius tested the v5 DTSI with his A7Z v1.11 board DT. Norman tested the v5 series on A7S. Their tags here cover the SoC DTSI.

 .../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 671 ++++++++++++++++++
 1 file changed, 671 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +501 -0
new file mode 100644
index 000000000000..e062b08006da
@@ -0,0 +1,671 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+
+#include <dt-bindings/clock/allwinner,sun60i-a733-ccu.h>
+#include <dt-bindings/clock/allwinner,sun60i-a733-r-ccu.h>
+#include <dt-bindings/clock/sun6i-rtc.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/allwinner,sun60i-a733-ccu.h>
+#include <dt-bindings/reset/allwinner,sun60i-a733-r-ccu.h>
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <2>;
+	interrupt-parent = <&gic>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu0>;
+				};
+
+				core1 {
+					cpu = <&cpu1>;
+				};
+
+				core2 {
+					cpu = <&cpu2>;
+				};
+
+				core3 {
+					cpu = <&cpu3>;
+				};
+
+				core4 {
+					cpu = <&cpu4>;
+				};
+
+				core5 {
+					cpu = <&cpu5>;
+				};
+
+				core6 {
+					cpu = <&cpu6>;
+				};
+
+				core7 {
+					cpu = <&cpu7>;
+				};
+			};
+		};
+
+		cpu0: cpu@0 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x0>;
+			enable-method = "psci";
+		};
+
+		cpu1: cpu@100 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x100>;
+			enable-method = "psci";
+		};
+
+		cpu2: cpu@200 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x200>;
+			enable-method = "psci";
+		};
+
+		cpu3: cpu@300 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x300>;
+			enable-method = "psci";
+		};
+
+		cpu4: cpu@400 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x400>;
+			enable-method = "psci";
+		};
+
+		cpu5: cpu@500 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x500>;
+			enable-method = "psci";
+		};
+
+		cpu6: cpu@600 {
+			compatible = "arm,cortex-a76";
+			device_type = "cpu";
+			reg = <0x600>;
+			enable-method = "psci";
+		};
+
+		cpu7: cpu@700 {
+			compatible = "arm,cortex-a76";
+			device_type = "cpu";
+			reg = <0x700>;
+			enable-method = "psci";
+		};
+	};
+
+	hosc: clock-hosc {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+	};
+
+	pmu-a55 {
+		compatible = "arm,cortex-a55-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_a55>;
+	};
+
+	pmu-a76 {
+		compatible = "arm,cortex-a76-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_a76>;
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+		arm,no-tick-in-suspend;
+	};
+
+	soc@0 {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x0 0x0 0x40000000>;
+
+		pio: pinctrl@2000000 {
+			compatible = "allwinner,sun60i-a733-pinctrl";
+			reg = <0x02000000 0x800>;
+			interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_APB1>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			/omit-if-no-ref/
+			i2c0_pg_pins: i2c0-pg-pins {
+				pins = "PG8", "PG9";
+				function = "i2c0";
+				allwinner,pinmux = <6>;
+			};
+
+			mmc0_pins: mmc0-pins {
+				pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
+				function = "mmc0";
+				allwinner,pinmux = <2>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc1_pins: mmc1-pins {
+				pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5";
+				function = "mmc1";
+				allwinner,pinmux = <2>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc2_pins: mmc2-pins {
+				pins = "PC5", "PC6", "PC8", "PC9", "PC10", "PC11",
+				       "PC13", "PC14", "PC15", "PC16";
+				function = "mmc2";
+				allwinner,pinmux = <3>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			uart0_pb_pins: uart0-pb-pins {
+				pins = "PB9", "PB10";
+				function = "uart0";
+				allwinner,pinmux = <2>;
+			};
+		};
+
+		ccu: clock-controller@2002000 {
+			compatible = "allwinner,sun60i-a733-ccu";
+			reg = <0x02002000 0x2000>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&rtc CLK_OSC32K_FANOUT>;
+			clock-names = "hosc", "losc", "iosc", "losc-fanout";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		uart0: serial@2500000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02500000 0x400>;
+			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART0>;
+			resets = <&ccu RST_BUS_UART0>;
+			status = "disabled";
+		};
+
+		uart1: serial@2501000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02501000 0x400>;
+			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART1>;
+			resets = <&ccu RST_BUS_UART1>;
+			status = "disabled";
+		};
+
+		uart2: serial@2502000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02502000 0x400>;
+			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART2>;
+			resets = <&ccu RST_BUS_UART2>;
+			status = "disabled";
+		};
+
+		uart3: serial@2503000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02503000 0x400>;
+			interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART3>;
+			resets = <&ccu RST_BUS_UART3>;
+			status = "disabled";
+		};
+
+		uart4: serial@2504000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02504000 0x400>;
+			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART4>;
+			resets = <&ccu RST_BUS_UART4>;
+			status = "disabled";
+		};
+
+		uart5: serial@2505000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02505000 0x400>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART5>;
+			resets = <&ccu RST_BUS_UART5>;
+			status = "disabled";
+		};
+
+		uart6: serial@2506000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02506000 0x400>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART6>;
+			resets = <&ccu RST_BUS_UART6>;
+			status = "disabled";
+		};
+
+		i2c0: i2c@2510000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02510000 0x400>;
+			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C0>;
+			resets = <&ccu RST_BUS_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c1: i2c@2511000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02511000 0x400>;
+			interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C1>;
+			resets = <&ccu RST_BUS_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c2: i2c@2512000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02512000 0x400>;
+			interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C2>;
+			resets = <&ccu RST_BUS_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c3: i2c@2513000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02513000 0x400>;
+			interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C3>;
+			resets = <&ccu RST_BUS_I2C3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c4: i2c@2514000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02514000 0x400>;
+			interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C4>;
+			resets = <&ccu RST_BUS_I2C4>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c5: i2c@2515000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02515000 0x400>;
+			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C5>;
+			resets = <&ccu RST_BUS_I2C5>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c6: i2c@2516000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02516000 0x400>;
+			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C6>;
+			resets = <&ccu RST_BUS_I2C6>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c7: i2c@2517000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02517000 0x400>;
+			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C7>;
+			resets = <&ccu RST_BUS_I2C7>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c8: i2c@2518000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02518000 0x400>;
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C8>;
+			resets = <&ccu RST_BUS_I2C8>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c9: i2c@2519000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02519000 0x400>;
+			interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C9>;
+			resets = <&ccu RST_BUS_I2C9>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c10: i2c@251a000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251a000 0x400>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C10>;
+			resets = <&ccu RST_BUS_I2C10>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c11: i2c@251b000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251b000 0x400>;
+			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C11>;
+			resets = <&ccu RST_BUS_I2C11>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c12: i2c@251c000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251c000 0x400>;
+			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C12>;
+			resets = <&ccu RST_BUS_I2C12>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		gic: interrupt-controller@3400000 {
+			compatible = "arm,gic-v3";
+			reg = <0x03400000 0x10000>, <0x03460000 0x100000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+			dma-noncoherent;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			its: msi-controller@3440000 {
+				compatible = "arm,gic-v3-its";
+				reg = <0x03440000 0x20000>;
+				msi-controller;
+				#msi-cells = <1>;
+				dma-noncoherent;
+				status = "disabled";
+			};
+
+			ppi-partitions {
+				ppi_a55: interrupt-partition-0 {
+					affinity = <&cpu0 &cpu1 &cpu2 &cpu3 &cpu4 &cpu5>;
+				};
+
+				ppi_a76: interrupt-partition-1 {
+					affinity = <&cpu6 &cpu7>;
+				};
+			};
+		};
+
+		mmc0: mmc@4020000 {

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 511

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +10 -0
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04020000 0x1000>;
+			interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins>;

Even if pins are usually the same board to board, do you really want to set this in the SoC dtsi ?

Quoted 161 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +160 -0
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc1: mmc@4021000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04021000 0x1000>;
+			interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC1>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc1_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc2: mmc@4022000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04022000 0x1000>;
+			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC2>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc2_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_ccu: clock-controller@7010000 {
+			compatible = "allwinner,sun60i-a733-r-ccu";
+			reg = <0x07010000 0x250>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&ccu CLK_SYS_24M>, <&ccu CLK_PLL_PERIPH0_200M>,
+				 <&ccu CLK_PLL_PERIPH0_300M>,
+				 <&ccu CLK_PLL_PERIPH1_300M>;
+			clock-names = "hosc", "losc", "iosc", "sys-24m",
+				      "pll-periph0-200m", "pll-periph0-300m",
+				      "pll-periph1-300m";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		nmi_intc: interrupt-controller@7010320 {
+			compatible = "allwinner,sun60i-a733-nmi",
+				     "allwinner,sun55i-a523-nmi";
+			reg = <0x07010320 0xc>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH 0>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		r_pio: pinctrl@7025000 {
+			compatible = "allwinner,sun60i-a733-r-pinctrl";
+			reg = <0x07025000 0x800>;
+			interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_R_APB0>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			r_i2c0_pl_pins: r-i2c0-pl-pins {
+				pins = "PL0", "PL1";
+				function = "r_i2c0";
+				allwinner,pinmux = <2>;
+			};
+
+			/omit-if-no-ref/
+			r_i2c1_pl_pins: r-i2c1-pl-pins {
+				pins = "PL12", "PL13";
+				function = "r_i2c1";
+				allwinner,pinmux = <3>;
+			};
+		};
+
+		r_uart0: serial@7080000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07080000 0x400>;
+			interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART0>;
+			resets = <&r_ccu RST_BUS_R_UART0>;
+			status = "disabled";
+		};
+
+		r_uart1: serial@7081000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07081000 0x400>;
+			interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART1>;
+			resets = <&r_ccu RST_BUS_R_UART1>;
+			status = "disabled";
+		};
+
+		r_i2c0: i2c@7083000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07083000 0x400>;
+			interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C0>;
+			resets = <&r_ccu RST_BUS_R_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c1: i2c@7084000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07084000 0x400>;
+			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C1>;
+			resets = <&r_ccu RST_BUS_R_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c2: i2c@7085000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07085000 0x400>;
+			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C2>;
+			resets = <&r_ccu RST_BUS_R_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		rtc: rtc@7090000 {
+			compatible = "allwinner,sun60i-a733-rtc",
+				     "allwinner,sun50i-r329-rtc";
+			reg = <0x07090000 0x400>;
+			interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_RTC>, <&hosc>, <&r_ccu CLK_R_AHB>;
+			clock-names = "bus", "hosc", "ahb";
+			#clock-cells = <1>;
+		};
+	};
+};
Signature · 1 line
Jerome
#19 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

Hi,

Quoted 54 lines · Jerome Brunet
Quoted 52 lines · Enzo Adriano

The Allwinner A733 combines six Cortex-A55 and two Cortex-A76 cores. Add the common device tree for the first Cubie A7A, A7S and A7Z board DTS files. Describe the CPUs, PSCI, architectural timers, GIC, RTC, main and always-on clock/reset and pin controllers, UART, I2C and MMC. The preceding revision booted on the A7S and A7Z.

The A7S schematic, sheets 7 and 16, shows the EEPROM wired to I2C0 on PG8/PG9. Use mux 6 as documented in the A733 Datasheet v1.00, section 4.2.6, table 4-36. The A7A schematic shows the external RTC on S_TWI1. Add its R-I2C1 pin group on PL12/PL13, mux 3.

The GIC maintenance PPI 9 and ARMv8.2 EL2 virtual-timer PPI 12 follow the A733 User Manual v1.00, section 12.2.3. The GICD/GICR/ITS windows and noncoherent attributes follow Andre Przywara's A733 reference and the A523 precedent. The CPUX interconnect diagram in section 5.1.2 supports the noncoherency inference. Leave the ITS disabled pending clock/reset and MSI integration.

Describe the single DynamIQ unit and shared L3 shown in section 5.1.2, figure 5-1. Partition PPI 7 (section 12.2.3, table 12-1) between the Cortex-A55 and Cortex-A76 PMUs so each probes its own core type. Defer capacity-dmips-mhz until it is measured on A733.

---
Changes since v5:
- Mark the I2C0 PG8/PG9 group /omit-if-no-ref/, as requested. This satisfies Andre's review condition.
- Move the RTC clock include after the A733 clock headers and cite the A733 datasheet and A7S schematic for the I2C0 pins.
- Fold in Andre's R-I2C1 pin group for A7A. A7S and A7Z leave it unused. A7S still references the I2C0 group.
- Vinicius tested the v5 DTSI with his A7Z v1.11 board DT. Norman tested the v5 series on A7S. Their tags here cover the SoC DTSI.

  .../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 671 ++++++++++++++++++
  1 file changed, 671 insertions(+)

create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +0 -0
new file mode 100644
index 000000000000..e062b08006da
@@ -0,0 +1,671 @@

[ ... ]

Quoted 7 lines
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +7 -0
+
+		mmc0: mmc@4020000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04020000 0x1000>;
+			interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
Quoted 8 lines

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 511

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +5 -0
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins>;

Even if pins are usually the same board to board, do you really want to set this in the SoC dtsi ?

There are not "usually" the same, there are *always* the same, since there is only one set of pins connected to each MMC controller. And in this case we put them in the .dtsi, as done already in other SoCs before.

Cheers,
Andre

Quoted 163 lines
Quoted 162 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +160 -0
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc1: mmc@4021000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04021000 0x1000>;
+			interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC1>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc1_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc2: mmc@4022000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04022000 0x1000>;
+			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC2>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc2_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_ccu: clock-controller@7010000 {
+			compatible = "allwinner,sun60i-a733-r-ccu";
+			reg = <0x07010000 0x250>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&ccu CLK_SYS_24M>, <&ccu CLK_PLL_PERIPH0_200M>,
+				 <&ccu CLK_PLL_PERIPH0_300M>,
+				 <&ccu CLK_PLL_PERIPH1_300M>;
+			clock-names = "hosc", "losc", "iosc", "sys-24m",
+				      "pll-periph0-200m", "pll-periph0-300m",
+				      "pll-periph1-300m";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		nmi_intc: interrupt-controller@7010320 {
+			compatible = "allwinner,sun60i-a733-nmi",
+				     "allwinner,sun55i-a523-nmi";
+			reg = <0x07010320 0xc>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH 0>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		r_pio: pinctrl@7025000 {
+			compatible = "allwinner,sun60i-a733-r-pinctrl";
+			reg = <0x07025000 0x800>;
+			interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_R_APB0>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			r_i2c0_pl_pins: r-i2c0-pl-pins {
+				pins = "PL0", "PL1";
+				function = "r_i2c0";
+				allwinner,pinmux = <2>;
+			};
+
+			/omit-if-no-ref/
+			r_i2c1_pl_pins: r-i2c1-pl-pins {
+				pins = "PL12", "PL13";
+				function = "r_i2c1";
+				allwinner,pinmux = <3>;
+			};
+		};
+
+		r_uart0: serial@7080000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07080000 0x400>;
+			interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART0>;
+			resets = <&r_ccu RST_BUS_R_UART0>;
+			status = "disabled";
+		};
+
+		r_uart1: serial@7081000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07081000 0x400>;
+			interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART1>;
+			resets = <&r_ccu RST_BUS_R_UART1>;
+			status = "disabled";
+		};
+
+		r_i2c0: i2c@7083000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07083000 0x400>;
+			interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C0>;
+			resets = <&r_ccu RST_BUS_R_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c1: i2c@7084000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07084000 0x400>;
+			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C1>;
+			resets = <&r_ccu RST_BUS_R_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c2: i2c@7085000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07085000 0x400>;
+			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C2>;
+			resets = <&r_ccu RST_BUS_R_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		rtc: rtc@7090000 {
+			compatible = "allwinner,sun60i-a733-rtc",
+				     "allwinner,sun50i-r329-rtc";
+			reg = <0x07090000 0x400>;
+			interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_RTC>, <&hosc>, <&r_ccu CLK_R_AHB>;
+			clock-names = "bus", "hosc", "ahb";
+			#clock-cells = <1>;
+		};
+	};
+};
Tested-by on v6 2/5
#20 lore raw

Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description

In reply to Enzo Adriano
Quoted 714 lines · Enzo Adriano

The Allwinner A733 combines six Cortex-A55 and two Cortex-A76 cores. Add the common device tree for the first Cubie A7A, A7S and A7Z board DTS files. Describe the CPUs, PSCI, architectural timers, GIC, RTC, main and always-on clock/reset and pin controllers, UART, I2C and MMC. The preceding revision booted on the A7S and A7Z.

The A7S schematic, sheets 7 and 16, shows the EEPROM wired to I2C0 on PG8/PG9. Use mux 6 as documented in the A733 Datasheet v1.00, section 4.2.6, table 4-36. The A7A schematic shows the external RTC on S_TWI1. Add its R-I2C1 pin group on PL12/PL13, mux 3.

The GIC maintenance PPI 9 and ARMv8.2 EL2 virtual-timer PPI 12 follow the A733 User Manual v1.00, section 12.2.3. The GICD/GICR/ITS windows and noncoherent attributes follow Andre Przywara's A733 reference and the A523 precedent. The CPUX interconnect diagram in section 5.1.2 supports the noncoherency inference. Leave the ITS disabled pending clock/reset and MSI integration.

Describe the single DynamIQ unit and shared L3 shown in section 5.1.2, figure 5-1. Partition PPI 7 (section 12.2.3, table 12-1) between the Cortex-A55 and Cortex-A76 PMUs so each probes its own core type. Defer capacity-dmips-mhz until it is measured on A733.

---
Changes since v5:
- Mark the I2C0 PG8/PG9 group /omit-if-no-ref/, as requested. This satisfies Andre's review condition.
- Move the RTC clock include after the A733 clock headers and cite the A733 datasheet and A7S schematic for the I2C0 pins.
- Fold in Andre's R-I2C1 pin group for A7A. A7S and A7Z leave it unused. A7S still references the I2C0 group.
- Vinicius tested the v5 DTSI with his A7Z v1.11 board DT. Norman tested the v5 series on A7S. Their tags here cover the SoC DTSI.

 .../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 671 ++++++++++++++++++
 1 file changed, 671 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +661 -0
new file mode 100644
index 000000000000..e062b08006da
@@ -0,0 +1,671 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+
+#include <dt-bindings/clock/allwinner,sun60i-a733-ccu.h>
+#include <dt-bindings/clock/allwinner,sun60i-a733-r-ccu.h>
+#include <dt-bindings/clock/sun6i-rtc.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/allwinner,sun60i-a733-ccu.h>
+#include <dt-bindings/reset/allwinner,sun60i-a733-r-ccu.h>
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <2>;
+	interrupt-parent = <&gic>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu0>;
+				};
+
+				core1 {
+					cpu = <&cpu1>;
+				};
+
+				core2 {
+					cpu = <&cpu2>;
+				};
+
+				core3 {
+					cpu = <&cpu3>;
+				};
+
+				core4 {
+					cpu = <&cpu4>;
+				};
+
+				core5 {
+					cpu = <&cpu5>;
+				};
+
+				core6 {
+					cpu = <&cpu6>;
+				};
+
+				core7 {
+					cpu = <&cpu7>;
+				};
+			};
+		};
+
+		cpu0: cpu@0 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x0>;
+			enable-method = "psci";
+		};
+
+		cpu1: cpu@100 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x100>;
+			enable-method = "psci";
+		};
+
+		cpu2: cpu@200 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x200>;
+			enable-method = "psci";
+		};
+
+		cpu3: cpu@300 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x300>;
+			enable-method = "psci";
+		};
+
+		cpu4: cpu@400 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x400>;
+			enable-method = "psci";
+		};
+
+		cpu5: cpu@500 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x500>;
+			enable-method = "psci";
+		};
+
+		cpu6: cpu@600 {
+			compatible = "arm,cortex-a76";
+			device_type = "cpu";
+			reg = <0x600>;
+			enable-method = "psci";
+		};
+
+		cpu7: cpu@700 {
+			compatible = "arm,cortex-a76";
+			device_type = "cpu";
+			reg = <0x700>;
+			enable-method = "psci";
+		};
+	};
+
+	hosc: clock-hosc {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+	};
+
+	pmu-a55 {
+		compatible = "arm,cortex-a55-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_a55>;
+	};
+
+	pmu-a76 {
+		compatible = "arm,cortex-a76-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_a76>;
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+		arm,no-tick-in-suspend;
+	};
+
+	soc@0 {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x0 0x0 0x40000000>;
+
+		pio: pinctrl@2000000 {
+			compatible = "allwinner,sun60i-a733-pinctrl";
+			reg = <0x02000000 0x800>;
+			interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_APB1>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			/omit-if-no-ref/
+			i2c0_pg_pins: i2c0-pg-pins {
+				pins = "PG8", "PG9";
+				function = "i2c0";
+				allwinner,pinmux = <6>;
+			};
+
+			mmc0_pins: mmc0-pins {
+				pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
+				function = "mmc0";
+				allwinner,pinmux = <2>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc1_pins: mmc1-pins {
+				pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5";
+				function = "mmc1";
+				allwinner,pinmux = <2>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc2_pins: mmc2-pins {
+				pins = "PC5", "PC6", "PC8", "PC9", "PC10", "PC11",
+				       "PC13", "PC14", "PC15", "PC16";
+				function = "mmc2";
+				allwinner,pinmux = <3>;
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			uart0_pb_pins: uart0-pb-pins {
+				pins = "PB9", "PB10";
+				function = "uart0";
+				allwinner,pinmux = <2>;
+			};
+		};
+
+		ccu: clock-controller@2002000 {
+			compatible = "allwinner,sun60i-a733-ccu";
+			reg = <0x02002000 0x2000>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&rtc CLK_OSC32K_FANOUT>;
+			clock-names = "hosc", "losc", "iosc", "losc-fanout";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		uart0: serial@2500000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02500000 0x400>;
+			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART0>;
+			resets = <&ccu RST_BUS_UART0>;
+			status = "disabled";
+		};
+
+		uart1: serial@2501000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02501000 0x400>;
+			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART1>;
+			resets = <&ccu RST_BUS_UART1>;
+			status = "disabled";
+		};
+
+		uart2: serial@2502000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02502000 0x400>;
+			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART2>;
+			resets = <&ccu RST_BUS_UART2>;
+			status = "disabled";
+		};
+
+		uart3: serial@2503000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02503000 0x400>;
+			interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART3>;
+			resets = <&ccu RST_BUS_UART3>;
+			status = "disabled";
+		};
+
+		uart4: serial@2504000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02504000 0x400>;
+			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART4>;
+			resets = <&ccu RST_BUS_UART4>;
+			status = "disabled";
+		};
+
+		uart5: serial@2505000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02505000 0x400>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART5>;
+			resets = <&ccu RST_BUS_UART5>;
+			status = "disabled";
+		};
+
+		uart6: serial@2506000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x02506000 0x400>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&ccu CLK_BUS_UART6>;
+			resets = <&ccu RST_BUS_UART6>;
+			status = "disabled";
+		};
+
+		i2c0: i2c@2510000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02510000 0x400>;
+			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C0>;
+			resets = <&ccu RST_BUS_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c1: i2c@2511000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02511000 0x400>;
+			interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C1>;
+			resets = <&ccu RST_BUS_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c2: i2c@2512000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02512000 0x400>;
+			interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C2>;
+			resets = <&ccu RST_BUS_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c3: i2c@2513000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02513000 0x400>;
+			interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C3>;
+			resets = <&ccu RST_BUS_I2C3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c4: i2c@2514000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02514000 0x400>;
+			interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C4>;
+			resets = <&ccu RST_BUS_I2C4>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c5: i2c@2515000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02515000 0x400>;
+			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C5>;
+			resets = <&ccu RST_BUS_I2C5>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c6: i2c@2516000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02516000 0x400>;
+			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C6>;
+			resets = <&ccu RST_BUS_I2C6>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c7: i2c@2517000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02517000 0x400>;
+			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C7>;
+			resets = <&ccu RST_BUS_I2C7>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c8: i2c@2518000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02518000 0x400>;
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C8>;
+			resets = <&ccu RST_BUS_I2C8>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c9: i2c@2519000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x02519000 0x400>;
+			interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C9>;
+			resets = <&ccu RST_BUS_I2C9>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c10: i2c@251a000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251a000 0x400>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C10>;
+			resets = <&ccu RST_BUS_I2C10>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c11: i2c@251b000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251b000 0x400>;
+			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C11>;
+			resets = <&ccu RST_BUS_I2C11>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c12: i2c@251c000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x0251c000 0x400>;
+			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_I2C12>;
+			resets = <&ccu RST_BUS_I2C12>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		gic: interrupt-controller@3400000 {
+			compatible = "arm,gic-v3";
+			reg = <0x03400000 0x10000>, <0x03460000 0x100000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+			dma-noncoherent;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			its: msi-controller@3440000 {
+				compatible = "arm,gic-v3-its";
+				reg = <0x03440000 0x20000>;
+				msi-controller;
+				#msi-cells = <1>;
+				dma-noncoherent;
+				status = "disabled";
+			};
+
+			ppi-partitions {
+				ppi_a55: interrupt-partition-0 {
+					affinity = <&cpu0 &cpu1 &cpu2 &cpu3 &cpu4 &cpu5>;
+				};
+
+				ppi_a76: interrupt-partition-1 {
+					affinity = <&cpu6 &cpu7>;
+				};
+			};
+		};
+
+		mmc0: mmc@4020000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04020000 0x1000>;
+			interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc1: mmc@4021000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04021000 0x1000>;
+			interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC1>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc1_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		mmc2: mmc@4022000 {
+			compatible = "allwinner,sun60i-a733-mmc",
+				     "allwinner,sun20i-d1-mmc";
+			reg = <0x04022000 0x1000>;
+			interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC2>;
+			reset-names = "ahb";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc2_pins>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_ccu: clock-controller@7010000 {
+			compatible = "allwinner,sun60i-a733-r-ccu";
+			reg = <0x07010000 0x250>;
+			clocks = <&hosc>, <&rtc CLK_OSC32K>, <&rtc CLK_IOSC>,
+				 <&ccu CLK_SYS_24M>, <&ccu CLK_PLL_PERIPH0_200M>,
+				 <&ccu CLK_PLL_PERIPH0_300M>,
+				 <&ccu CLK_PLL_PERIPH1_300M>;
+			clock-names = "hosc", "losc", "iosc", "sys-24m",
+				      "pll-periph0-200m", "pll-periph0-300m",
+				      "pll-periph1-300m";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
+		nmi_intc: interrupt-controller@7010320 {
+			compatible = "allwinner,sun60i-a733-nmi",
+				     "allwinner,sun55i-a523-nmi";
+			reg = <0x07010320 0xc>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH 0>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		r_pio: pinctrl@7025000 {
+			compatible = "allwinner,sun60i-a733-r-pinctrl";
+			reg = <0x07025000 0x800>;
+			interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH 0>,
+				     <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_R_APB0>, <&hosc>, <&rtc CLK_OSC32K>;
+			clock-names = "apb", "hosc", "losc";
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			r_i2c0_pl_pins: r-i2c0-pl-pins {
+				pins = "PL0", "PL1";
+				function = "r_i2c0";
+				allwinner,pinmux = <2>;
+			};
+
+			/omit-if-no-ref/
+			r_i2c1_pl_pins: r-i2c1-pl-pins {
+				pins = "PL12", "PL13";
+				function = "r_i2c1";
+				allwinner,pinmux = <3>;
+			};
+		};
+
+		r_uart0: serial@7080000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07080000 0x400>;
+			interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART0>;
+			resets = <&r_ccu RST_BUS_R_UART0>;
+			status = "disabled";
+		};
+
+		r_uart1: serial@7081000 {
+			compatible = "allwinner,sun60i-a733-uart",
+				     "snps,dw-apb-uart";
+			reg = <0x07081000 0x400>;
+			interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH 0>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&r_ccu CLK_BUS_R_UART1>;
+			resets = <&r_ccu RST_BUS_R_UART1>;
+			status = "disabled";
+		};
+
+		r_i2c0: i2c@7083000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07083000 0x400>;
+			interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C0>;
+			resets = <&r_ccu RST_BUS_R_I2C0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c1: i2c@7084000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07084000 0x400>;
+			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C1>;
+			resets = <&r_ccu RST_BUS_R_I2C1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		r_i2c2: i2c@7085000 {
+			compatible = "allwinner,sun60i-a733-i2c",
+				     "allwinner,sun8i-v536-i2c",
+				     "allwinner,sun6i-a31-i2c";
+			reg = <0x07085000 0x400>;
+			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_I2C2>;
+			resets = <&r_ccu RST_BUS_R_I2C2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		rtc: rtc@7090000 {

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi line 671

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi new file +10 -0
+			compatible = "allwinner,sun60i-a733-rtc",
+				     "allwinner,sun50i-r329-rtc";
+			reg = <0x07090000 0x400>;
+			interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&r_ccu CLK_BUS_R_RTC>, <&hosc>, <&r_ccu CLK_R_AHB>;
+			clock-names = "bus", "hosc", "ahb";
+			#clock-cells = <1>;
+		};
+	};
+};

Tested on Xunlong OrangePi 4 Pro (Allwinner A733):
- Boots to shell using sun60i-a733.dtsi with UART0, MMC0, R-I2C0, AXP318W PMIC, CCU/R-CCU, PIO/R-PIO, GIC, and PMUs initialized.

#21 lore raw

PATCH v6 3/5 arm64: dts: allwinner: add Radxa Cubie A7S board

In reply to Enzo Adriano

Enable the serial console, PMIC and microSD slot for initial Cubie A7S bring-up with vendor firmware, using the new common A733 description. Describe the oscillator inputs and power tree using the Radxa A7S v1.10 schematic, sheets 4, 7 and 8. Keep the boot-critical supplies enabled. Sheet 4 shows VCC5V0_SYS feeding DCIN and the PMIC PS output feeding the buck inputs and UP11. Set DCDC9 to 1.240 V, the boot firmware selector read back on the board for the ELDO input. Keep ELDO1 enabled at the firmware-selected voltage while the VDD2L range for the fitted memory is being confirmed.

Use the Radxa 5.15 BSP CPU and GPU OPP envelopes for DCDC3/5 and DCDC4. Use its regulator readback for DCDC2, BLDO1, DLDO1 and ELDO6, consistent with sheets 4 and 8 and the VCC-MCSI entry in the A733 datasheet.

Allow 0.50-0.60 V on DCDC6, covering the 0.50 V LPDDR5 and 0.60 V LPDDR4X VDDQ options on sheet 5. Allow 1.05-1.10 V on DCDC7, covering LPDDR5 VDD2H at 1.05 V and the 1.10 V DRAM rail shown on sheets 4 and 5. The BSP readback was 0.56 V and 1.08 V, respectively. Both fall inside the bounds, so those selector values can be kept after DRAM training. Set the LVDS0 supply to 1.8 V per the A733 Datasheet v1.00, table 5-2, and leave its enable under consumer control. Omit the unused UFS and codec regulator nodes (schematic sheets 4 and 6).

Use SWOUT2 for the card and the Port F VCC-IO path (sheets 4, 7 and 13). Firmware must select the 3.3 V PF path for use with MMC0. CLDO5 supplies the separate 1.8 V input. The controller uses fixed signalling with no VQMMC regulator and advertises no UHS modes. Describe the active-high card-detect line on PF6 and its pull-down.

Add the PM2 power and PJ26 status LEDs, and the BL24C16F on I2C0 as shown on sheets 7 and 16. The EEPROM is at 0x50 in Radxa's 5.15 DT. PC7 drives an inverter that pulls the EEPROM's write-protect pin low.

Keep ALDO1 always on for Port L, which powers the PMIC's own bus. Omit the Port L supply phandle, as on the Cubie A5E: requesting it would require the PMIC regulator before the PMIC can be reached. The A733 pinctrl voltage-mode fix is required for the bank supply connections.

---
Changes since v5:
- Distinguish the 5 V DCIN supply from the PMIC PS output and rename the fixed LDO input regulator. Rename and move the 32 kHz clock.
- Order the regulator nodes, set DCDC9 to 1.240 V and omit blank lines before status. Keep ELDO1 without voltage bounds.
- Remove cap-sdio-irq since sunxi-mmc already sets MMC_CAP_SDIO_IRQ.
- Norman's v5 hardware report is linked from the cover. The revised supply graph and DCDC9 constraint still need a hardware run.

 arch/arm64/boot/dts/allwinner/Makefile        |   1 +
 .../dts/allwinner/sun60i-a733-cubie-a7s.dts   | 333 ++++++++++++++++++
 2 files changed, 334 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
arch/arm64/boot/dts/allwinner/Makefile +1 -0
index da39f02252d4..9d1e740ff19e 100644
@@ -69,3 +69,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun55i-a527-cubie-a5e.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun55i-h728-x96qpro+.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-avaota-a1.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-orangepi-4a.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun60i-a733-cubie-a7s.dtb
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +333 -0

333 lines not on this page · raw message

#22 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [High] arm64: dts: allwinner: unbound x-powers,axp318w PMIC defers all consumers - [High] arm64: dts…

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider:
- [High] arm64: dts: allwinner: unbound x-powers,axp318w PMIC defers all consumers
- [High] arm64: dts: allwinner: pio bank supplies program inverted A733 IO bias mode
- [Low] arm64: dts: allwinner: undocumented allwinner,sun60i-a733-uart compatible
- [Low] arm64: dts: allwinner: missing voltage range on reg_eldo1 in cubie-a7s
--

commit bf6c15da857b8c21da3e29b02171cb433eb632f0
Author: Enzo Adriano <[email protected]>

arm64: dts: allwinner: add Radxa Cubie A7S board

This commit adds the initial Devicetree for the Radxa Cubie A7S board, enabling the serial console, AXP318W PMIC, microSD slot, I2C0 EEPROM, and GPIO LEDs.

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +0 -0
new file mode 100644
index 0000000000000..98a878a2d739b

[ ... ]

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 143

Quoted 12 lines

+&pio {

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +11 -0
+	vcc-pb-supply = <&reg_swout2>;	/* via VCC-IO */
+	vcc-pc-supply = <&reg_cldo5>;
+	vcc-pd-supply = <&reg_swout1>;
+	vcc-pe-supply = <&reg_bldo1>;
+	/* PF uses VCC-IO at 3.3 V, with CLDO5 as the 1.8 V input. */
+	vcc-pf-supply = <&reg_swout2>;
+	vcc-pg-supply = <&reg_aldo1>;
+	vcc-ph-supply = <&reg_swout2>;
+	vcc-pj-supply = <&reg_swout1>;
+	vcc-pk-supply = <&reg_bldo1>;
+};

[Severity: High]
Will wiring vcc-pb-supply through vcc-pk-supply on pio program inverted 1.8V/3.3V I/O bias settings for banks PB through PK?

In drivers/pinctrl/sunxi/pinctrl-sun60i-a733.c, a733_pinctrl_data still uses BIAS_VOLTAGE_PIO_POW_MODE_SEL rather than BIAS_VOLTAGE_PIO_POW_MODE_CTL_INV, so sunxi_pinctrl_set_io_bias_cfg() writes un-inverted 1.8V/3.3V withstand bits into PIO_NCAT3_POW_MOD_SEL_REG whenever a pin in those banks is requested. In addition, reg_swout1 and reg_swout2 omit microvolt bounds and have no input supply property on axp318w linking them to reg_dcdc1, causing regulator_get_voltage() on those switches to return -EINVAL.

Quoted 14 lines

+&r_i2c0 {

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +13 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&r_i2c0_pl_pins>;
+	status = "okay";
+
+	axp318w: pmic@36 {
+		compatible = "x-powers,axp318w";
+		reg = <0x36>;
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+
+		aldo156in-supply = <&reg_ps>;

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 168

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +10 -0
+		aldo234in-supply = <&reg_aldo1>;
+		bldoin-supply = <&reg_ldo_input>;
+		cldoin-supply = <&reg_ldo_input>;
+		dldoin-supply = <&reg_ps>;
+		eldoin-supply = <&reg_dcdc9>;
+		ips-supply = <&reg_ps>;
+		vin19-supply = <&reg_ps>;
+		vin23-supply = <&reg_ps>;
+		vin45-supply = <&reg_ps>;
+		vin678-supply = <&reg_ps>;

[Severity: High]
As reported by Chen-Yu Tsai on v5 [1], does pmic@36 using the undocumented and unsupported "x-powers,axp318w" compatible cause all its regulator consumers to defer probe permanently?

No in-tree MFD or regulator driver matches "x-powers,axp318w", and Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml does not document that compatible, the grouped supply properties (aldo156in-supply, aldo234in-supply, vin19-supply, vin23-supply, vin45-supply, vin678-supply), or the dcdc9, swout1, and swout2 regulator nodes. Because pmic@36 never binds and never registers its child regulators, of_regulator_dev_lookup() finds the unpopulated DT regulator nodes and returns -EPROBE_DEFER whenever uart0, mmc0, i2c0, eeprom@50, or the LEDs request their supplies or pins through pio and r_pio.

[ ... ]

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 288

Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +4 -0
+			reg_eldo1: eldo1 {
+				regulator-name = "vdd2l-lpddr";
+				regulator-always-on;
+			};

[Severity: Low]
As reported by Andre Przywara on v4 [2], should reg_eldo1 specify regulator-min-microvolt and regulator-max-microvolt bounds for the vdd2l-lpddr rail?

[ ... ]

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 333

Quoted 5 lines

+&uart0 {

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +4 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pb_pins>;
+	status = "okay";
+};

[Severity: Low]
Does enabling uart0 from sun60i-a733.dtsi cause dtbs_check validation failures because "allwinner,sun60i-a733-uart" is not documented in Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml?

[1] https://lore.kernel.org/r/CAGb2v64p4GvDMDKzDLfedDQCexD+=gu3+YxMAt=ARj4bZxR_eA@mail.gmail.com
[2] https://lore.kernel.org/r/[email protected]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#23 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

In reply to Enzo Adriano

Hi,

thanks for the respin, and for unifying all those boards in one series, that should make it easier to handle. This looks good overall, just some smaller things below:

Quoted 104 lines · Enzo Adriano

Enable the serial console, PMIC and microSD slot for initial Cubie A7S bring-up with vendor firmware, using the new common A733 description. Describe the oscillator inputs and power tree using the Radxa A7S v1.10 schematic, sheets 4, 7 and 8. Keep the boot-critical supplies enabled. Sheet 4 shows VCC5V0_SYS feeding DCIN and the PMIC PS output feeding the buck inputs and UP11. Set DCDC9 to 1.240 V, the boot firmware selector read back on the board for the ELDO input. Keep ELDO1 enabled at the firmware-selected voltage while the VDD2L range for the fitted memory is being confirmed.

Use the Radxa 5.15 BSP CPU and GPU OPP envelopes for DCDC3/5 and DCDC4. Use its regulator readback for DCDC2, BLDO1, DLDO1 and ELDO6, consistent with sheets 4 and 8 and the VCC-MCSI entry in the A733 datasheet.

Allow 0.50-0.60 V on DCDC6, covering the 0.50 V LPDDR5 and 0.60 V LPDDR4X VDDQ options on sheet 5. Allow 1.05-1.10 V on DCDC7, covering LPDDR5 VDD2H at 1.05 V and the 1.10 V DRAM rail shown on sheets 4 and 5. The BSP readback was 0.56 V and 1.08 V, respectively. Both fall inside the bounds, so those selector values can be kept after DRAM training. Set the LVDS0 supply to 1.8 V per the A733 Datasheet v1.00, table 5-2, and leave its enable under consumer control. Omit the unused UFS and codec regulator nodes (schematic sheets 4 and 6).

Use SWOUT2 for the card and the Port F VCC-IO path (sheets 4, 7 and 13). Firmware must select the 3.3 V PF path for use with MMC0. CLDO5 supplies the separate 1.8 V input. The controller uses fixed signalling with no VQMMC regulator and advertises no UHS modes. Describe the active-high card-detect line on PF6 and its pull-down.

Add the PM2 power and PJ26 status LEDs, and the BL24C16F on I2C0 as shown on sheets 7 and 16. The EEPROM is at 0x50 in Radxa's 5.15 DT. PC7 drives an inverter that pulls the EEPROM's write-protect pin low.

Keep ALDO1 always on for Port L, which powers the PMIC's own bus. Omit the Port L supply phandle, as on the Cubie A5E: requesting it would require the PMIC regulator before the PMIC can be reached. The A733 pinctrl voltage-mode fix is required for the bank supply connections.

---
Changes since v5:
- Distinguish the 5 V DCIN supply from the PMIC PS output and rename the fixed LDO input regulator. Rename and move the 32 kHz clock.
- Order the regulator nodes, set DCDC9 to 1.240 V and omit blank lines before status. Keep ELDO1 without voltage bounds.
- Remove cap-sdio-irq since sunxi-mmc already sets MMC_CAP_SDIO_IRQ.
- Norman's v5 hardware report is linked from the cover. The revised supply graph and DCDC9 constraint still need a hardware run.

  arch/arm64/boot/dts/allwinner/Makefile        |   1 +
  .../dts/allwinner/sun60i-a733-cubie-a7s.dts   | 333 ++++++++++++++++++
  2 files changed, 334 insertions(+)

create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts

arch/arm64/boot/dts/allwinner/Makefile +1 -0
index da39f02252d4..9d1e740ff19e 100644
@@ -69,3 +69,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun55i-a527-cubie-a5e.dtb
  dtb-$(CONFIG_ARCH_SUNXI) += sun55i-h728-x96qpro+.dtb
  dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-avaota-a1.dtb
  dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-orangepi-4a.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun60i-a733-cubie-a7s.dtb
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +31 -0
new file mode 100644
index 000000000000..98a878a2d739
@@ -0,0 +1,333 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+/dts-v1/;
+
+#include "sun60i-a733.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	model = "Radxa Cubie A7S";
+	compatible = "radxa,cubie-a7s", "allwinner,sun60i-a733";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	osc32k: clock-osc32k {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		power-led {
+			function = LED_FUNCTION_POWER;

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 41

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +10 -0
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
+			default-state = "on";
+		};
+
+		status-led {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&pio 9 26 GPIO_ACTIVE_HIGH>; /* PJ26 */
+			linux,default-trigger = "heartbeat";

I don't think we should have an LED wasted on a heartbeat when there is already a controllable power LED. I think a second LED should be left up to the user to configure. If they want, they can always set the heartbeat trigger via sysfs, although I'd probably do this on the power LED instead. So I believe there should be no default-trigger line.

Quoted 17 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +17 -0
+		};
+	};
+
+	reg_ldo_input: regulator-ldo2v5-input {
+		compatible = "regulator-fixed";
+		regulator-name = "ldo2v5-input";
+		regulator-min-microvolt = <2400000>;
+		regulator-max-microvolt = <2400000>;
+		regulator-always-on;
+		vin-supply = <&reg_ps>;
+	};
+
+	/* AXP318W PS output, routed back to the PMIC and to UP11. */
+	reg_ps: regulator-ps-output {
+		compatible = "regulator-fixed";
+		regulator-name = "ps-output";
+		regulator-always-on;

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 68

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +10 -0
+		vin-supply = <&reg_vcc5v0_sys>;
+	};
+
+	reg_vcc5v0_sys: regulator-vcc5v0-sys {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0-sys";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};

I understand that Chen-Yu somewhat suggested that, but it still looks odd to have these two regulators. I don't think we have that for any other board, even though most use a very similar connection. Chen-Yu, is that what you thought of? Is that the model we should go forward with from now on?

Quoted 47 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +47 -0
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc5>;
+};
+
+&cpu1 {
+	cpu-supply = <&reg_dcdc5>;
+};
+
+&cpu2 {
+	cpu-supply = <&reg_dcdc5>;
+};
+
+&cpu3 {
+	cpu-supply = <&reg_dcdc5>;
+};
+
+&cpu4 {
+	cpu-supply = <&reg_dcdc5>;
+};
+
+&cpu5 {
+	cpu-supply = <&reg_dcdc5>;
+};
+
+&cpu6 {
+	cpu-supply = <&reg_dcdc3>;
+};
+
+&cpu7 {
+	cpu-supply = <&reg_dcdc3>;
+};
+
+&hosc {
+	clock-frequency = <26000000>;
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pg_pins>;
+	status = "okay";
+
+	eeprom@50 {
+		compatible = "belling,bl24c16f", "atmel,24c16";
+		reg = <0x50>;
+		pagesize = <16>;

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 125

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +10 -0
+		vcc-supply = <&reg_aldo1>;
+		wp-gpios = <&pio 2 7 GPIO_ACTIVE_LOW>; /* PC7 via Q2 */
+	};
+};
+
+&mmc0 {
+	bus-width = <4>;
+	cap-mmc-highspeed;
+	cap-sd-highspeed;
+	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;

Since the Allwinner GPIO notation with bank and pin number is hard to read, we always add the pin name (PF6) as a comment, see other .dts files.

Quoted 151 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +151 -0
+	disable-wp;
+	no-1-8-v;
+	vmmc-supply = <&reg_swout2>;
+	status = "okay";
+};
+
+&pio {
+	vcc-pb-supply = <&reg_swout2>;	/* via VCC-IO */
+	vcc-pc-supply = <&reg_cldo5>;
+	vcc-pd-supply = <&reg_swout1>;
+	vcc-pe-supply = <&reg_bldo1>;
+	/* PF uses VCC-IO at 3.3 V, with CLDO5 as the 1.8 V input. */
+	vcc-pf-supply = <&reg_swout2>;
+	vcc-pg-supply = <&reg_aldo1>;
+	vcc-ph-supply = <&reg_swout2>;
+	vcc-pj-supply = <&reg_swout1>;
+	vcc-pk-supply = <&reg_bldo1>;
+};
+
+&r_i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&r_i2c0_pl_pins>;
+	status = "okay";
+
+	axp318w: pmic@36 {
+		compatible = "x-powers,axp318w";
+		reg = <0x36>;
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+
+		aldo156in-supply = <&reg_ps>;
+		aldo234in-supply = <&reg_aldo1>;
+		bldoin-supply = <&reg_ldo_input>;
+		cldoin-supply = <&reg_ldo_input>;
+		dldoin-supply = <&reg_ps>;
+		eldoin-supply = <&reg_dcdc9>;
+		ips-supply = <&reg_ps>;
+		vin19-supply = <&reg_ps>;
+		vin23-supply = <&reg_ps>;
+		vin45-supply = <&reg_ps>;
+		vin678-supply = <&reg_ps>;
+
+		regulators {
+			reg_aldo1: aldo1 {
+				/* Port L powers the PMIC's own I2C bus. */
+				regulator-name = "vcc-pl";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+
+			reg_bldo1: bldo1 {
+				regulator-name = "vcc-pe-pk-mcsi";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
+			reg_bldo2: bldo2 {
+				regulator-name = "vcc-lvds0";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
+			reg_cldo1: cldo1 {
+				regulator-name = "vdd18-lpddr";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+			};
+
+			reg_cldo2: cldo2 {
+				regulator-name = "vcc18-hdmi";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
+			reg_cldo3: cldo3 {
+				regulator-name = "vcc-pll-dram";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+			};
+
+			reg_cldo5: cldo5 {
+				regulator-name = "vcc18-pc-comb0";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
+			reg_dcdc1: dcdc1 {
+				/* Board 3.3 V loads and the SWOUT1/2 input. */
+				regulator-name = "vcc-3v3";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+
+			reg_dcdc2: dcdc2 {
+				/* System and DRAM core/PHY supply. */
+				regulator-name = "vdd-sys";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <800000>;
+				regulator-always-on;
+			};
+
+			reg_dcdc3: dcdc3 {
+				/* Powers the running Cortex-A76 CPUs. */
+				regulator-name = "vdd-cpub";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <1050000>;
+				regulator-always-on;
+			};
+
+			reg_dcdc4: dcdc4 {
+				regulator-name = "vdd-gpu";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <960000>;
+			};
+
+			reg_dcdc5: dcdc5 {
+				/* Powers the running Cortex-A55 CPUs. */
+				regulator-name = "vdd-cpul";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <1050000>;
+				regulator-always-on;
+			};
+
+			reg_dcdc6: dcdc6 {
+				/* DRAM PHY and LPDDR4X/LPDDR5 VDDQ (via RP15). */
+				regulator-name = "vcc-draml";
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <600000>;
+				regulator-always-on;
+			};
+
+			reg_dcdc7: dcdc7 {
+				/* DRAM PHY and LPDDR5 VDD2H (VCC-DRAM). */
+				regulator-name = "vcc-dram";
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1100000>;
+				regulator-always-on;
+			};
+
+			reg_dcdc9: dcdc9 {
+				regulator-name = "eldo-input";
+				regulator-min-microvolt = <1240000>;
+				regulator-max-microvolt = <1240000>;
+			};
+

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 286

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +10 -0
+			reg_dldo1: dldo1 {
+				/* SoC eFuse supply has no SID regulator consumer. */
+				regulator-name = "vcc-efuse";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+			};
+
+			reg_eldo1: eldo1 {
+				regulator-name = "vdd2l-lpddr";

So I saw the same issue on the A7A, also with LPDDR5: the schematic says 0.9V, but at boot time it was 1.075V. The kernel corrected it to 0.9V, without apparent problems, but I didn't stress it at all, so can't say whether this is stable. Various LPDDR5 datasheets suggests VDD2L should be 0.9V, or at least in the range between 0.87V and 0.97V, though in some configurations it can also be tied to VDD2H at 1.05V. So we are none the wiser, I guess, it would be good to figure out what the PMIC reset value is for ELDO1, so to know whether it's the vendors(?) DRAM init that deliberately programs EDLO1 to 1.075V, or if it's just left untouched.

Quoted 14 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +14 -0
+				regulator-always-on;
+			};
+
+			reg_eldo6: eldo6 {
+				/* Standby CPU and USB supply. */
+				regulator-name = "vdd-cpus";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <800000>;
+				regulator-always-on;
+			};
+
+			reg_rtc_ldo: rtc-ldo {
+				regulator-name = "vcc-rtc";
+				regulator-min-microvolt = <1800000>;

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 310

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +10 -0
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+			};
+
+			reg_swout1: swout1 {
+				regulator-name = "vcc33-lcd";
+			};
+
+			reg_swout2: swout2 {
+				/* VCC-IO to the console and microSD. */

I guess you mean "GPIO headers" instead of console?

Cheers,
Andre

Quoted 23 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +23 -0
+				regulator-name = "vcc-io-card";
+				regulator-always-on;
+			};
+		};
+	};
+};
+
+&r_pio {
+	/* PL powers the PMIC bus itself; firmware must keep ALDO1 enabled. */
+	vcc-pm-supply = <&reg_aldo1>;
+};
+
+&rtc {
+	clocks = <&r_ccu CLK_BUS_R_RTC>, <&hosc>, <&r_ccu CLK_R_AHB>,
+		 <&osc32k>;
+	clock-names = "bus", "hosc", "ahb", "ext-osc32k";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pb_pins>;
+	status = "okay";
+};
#24 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

Hi Andre,

On the ELDO1 question: the AXP318W datasheet (V1.0, Chinese, table 6-3) gives ELDO1 a default of 0.9 V and leaves it off at power-up, as it does DCDC6 and DCDC7. So 1.075 V is not the PMIC default.

On the A7S we boot our own chain (U-Boot SPL calling the vendor DRAM init, TF-A, U-Boot), and none of the open parts writes ELDO1. That leaves the vendor DRAM init, which switches it on. Its value follows VDD2H on the 25 mV grid: with DCDC7 at 1080 mV we read ELDO1 at 1075 mV, and with Radxa's own boot0 at 1120 mV we read 1100 mV.

We have also tried VDD2L at 0.9 V on the A7S. Lowering ELDO1 from Linux changes the voltage after the DRAM training ran at 1.075 V, which can lead to errors. So we keep the value the DRAM init leaves, even though it does not match the schematic, as the v6 node without voltage bounds does. The vendor DRAM init sets all the DRAM rails itself, so a clean 0.9 V would have to come from there.

Built and measured by AI agents (Claude) on my board.

Thanks,
Norman

#25 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

Hi Norman,

(please try to reply in-line, with the question quoted, to make it easier for other people to follow the thread)

Quoted 5 lines · Norman Herms

Hi Andre,

On the ELDO1 question: the AXP318W datasheet (V1.0, Chinese, table 6-3) gives ELDO1 a default of 0.9 V and leaves it off at power-up, as it does DCDC6 and DCDC7. So 1.075 V is not the PMIC default.

Ah, thanks!

Quoted 5 lines

On the A7S we boot our own chain (U-Boot SPL calling the vendor DRAM init, TF-A, U-Boot), and none of the open parts writes ELDO1. That leaves the vendor DRAM init, which switches it on. Its value follows VDD2H on the 25 mV grid: with DCDC7 at 1080 mV we read ELDO1 at 1075 mV, and with Radxa's own boot0 at 1120 mV we read 1100 mV.

That's good info, thanks!

Quoted 3 lines

We have also tried VDD2L at 0.9 V on the A7S. Lowering ELDO1 from Linux changes the voltage after the DRAM training ran at 1.075 V, which can lead to errors.

Yeah, I was concerned about this as well. LPDDR5 DRAM init/training seems to be a lot more sensitive than <=LPDDR4 (it even requires occasional retraining at runtime?), so changing voltages after the fact sounds dangerous.

Quoted 4 lines

So we keep the value the DRAM init leaves,
even though it does not match the schematic, as the v6 node without voltage bounds does. The vendor DRAM init sets all the DRAM rails itself, so a clean 0.9 V would have to come from there.

OK, that's something we probably can do with the in-flight Open Source DRAM init driver then, which is (in parts at least) already on the list.

Regardless I wouldn't want to leave it completely unbound, but instead provide some limits. I guess for VDD2L, potentially the same as VDD2H, it should be 0.87V - 1.12V, which seem to be limits Google turns up for those LPDDR5 specified values.

I will adjust the DT for the A7A.

Cheers,
Andre

#26 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

Hi Andre,

Quoted 4 lines

Regardless I wouldn't want to leave it completely unbound, but instead provide some limits. I guess for VDD2L, potentially the same as VDD2H, it should be 0.87V - 1.12V, which seem to be limits Google turns up for those LPDDR5 specified values.

That covers what we have read on the A7S: ELDO1 (VDD2L) at 1.075 V with our chain and at 1.1 V with Radxa's own boot0 (V0.6034, and the same on Radxa's Debian image).

In June we also stepped ELDO1 on an A7S in 25 mV steps, with memtester at each step: no errors from 575 mV up to 1.2 V, where we stopped on purpose, and a crash at 550 mV. That was after the training at 1.075 V, so it says nothing about training at other voltages, but 0.87 V - 1.12 V sits well inside it.

Radxa's boot0 also sets DCDC7 (VDD2H) to 1.12 V, above the 1.1 V maximum that v6 gives vcc-dram. On a board booted with Radxa's loader, the regulator core would bring VDD2H down to 1.1 V at probe, i.e. after the training. We have seen exactly that on ELDO1 with an early test DT of ours that gave it a fixed 0.95 V, on a board with Radxa's boot0:

  [    1.792706] vcc09-vdd2l: Bringing 1100000uV into 950000-950000uV

with the DRAM already trained and in use. With our chain DCDC7 is at 1.08 V. So 1.12 V as the maximum for both rails would also cover the vendor chain.

Built and measured by AI agents (Claude) on my boards.

Thanks,
Norman

#27 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

In reply to Andre Przywara
Quoted 4 lines

Regardless I wouldn't want to leave it completely unbound, but instead provide some limits. I guess for VDD2L, potentially the same as VDD2H, it should be 0.87V - 1.12V, which seem to be limits Google turns up for those LPDDR5 specified values.

v7 gives the A7S ELDO1 (VDD2L) a range of 0.87 V - 1.12 V.

Per Norman [1], Radxa's boot0 sets DCDC7 (VDD2H) to 1.12 V, above the 1.10 V maximum v6 has for vcc-dram. v7 raises that maximum to 1.12 V. With either loader neither rail is then moved after training: on our chain DCDC7 is 1.08 V and ELDO1 reads 1.075 V, with Radxa's boot0 DCDC7 is 1.12 V and ELDO1 reads 1.10 V.

v7 also drops no-1-8-v from the A7S &mmc0, as you suggested on 5/5 [2].

Quoted 1 line

I will adjust the DT for the A7A.

The A7A board file travels in this series as 5/5. Should I make the change there for v7, or would you rather send the updated file?

[1]
https://lore.kernel.org/r/AzjLG4iAqXVYU5xs3jzLGCHNElMjyalfu_xCbgGLeyvgkAXIXMDFHCm4LUyEe1sq6C4gcLhjyje0myr_eNKHhYEmWpoAVHJF0YHgGW7cDVA=@proton.me
[2]
https://lore.kernel.org/r/[email protected]

Enzo

#28 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

In reply to Andre Przywara
Quoted 8 lines

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 41

Quoted 1 line
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +1 -0
+			linux,default-trigger = "heartbeat";

I don't think we should have an LED wasted on a heartbeat when there is already a controllable power LED. I think a second LED should be left up to the user to configure. If they want, they can always set the heartbeat trigger via sysfs, although I'd probably do this on the power LED instead.
So I believe there should be no default-trigger line.

Agreed, v7 drops it.

Quoted 4 lines

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 125

Quoted 1 line
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +1 -0
+	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;

Since the Allwinner GPIO notation with bank and pin number is hard to read, we always add the pin name (PF6) as a comment, see other .dts files.

v7 adds /* PF6 */.

Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 286

Quoted 2 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +2 -0
+			reg_eldo1: eldo1 {
+				regulator-name = "vdd2l-lpddr";

So I saw the same issue on the A7A, also with LPDDR5: the schematic says 0.9V, but at boot time it was 1.075V. The kernel corrected it to 0.9V,

Quoted 8 lines

without apparent problems, but I didn't stress it at all, so can't say whether this is stable. Various LPDDR5 datasheets suggests VDD2L should be 0.9V, or at least in the range between 0.87V and 0.97V, though in some configurations it can also be tied to VDD2H at 1.05V. So we are none the wiser, I guess, it would be good to figure out what the PMIC reset value is for ELDO1, so to know whether it's the vendors(?) DRAM init that deliberately programs EDLO1 to 1.075V, or if it's just left untouched.

The reset value is not in anything I have; I have no AXP318W datasheet. Reading ELDO1's control register before the boot firmware's DRAM init would settle it.

Quoted 4 lines

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts line 310

Quoted 2 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts new file +2 -0
+			reg_swout2: swout2 {
+				/* VCC-IO to the console and microSD. */

I guess you mean "GPIO headers" instead of console?

Yes. VCC-IO supplies Port B, which goes to the GPIO headers (including UART0 on PB9/PB10), and the 3.3 V Port F path for the microSD. v7 will say "GPIO headers".

Enzo

Tested-by on v6 3/5
#29 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

In reply to Enzo Adriano

Hi Enzo,

Tested v6 patches 1-3 on a Radxa Cubie A7S. Same kernel as for v5 (sunxi/for-next 2ba07dfcd45b plus the dependencies; pinctrl at v3, whose code is the same as v4), same own firmware and the same 2 MiB bad-DRAM reservation. dtbs_check with W=1 and W=2 is clean.

Results are the same as with v5:

- PMIC: all bounded rails are within their bounds, and the registers read the same as before (DCDC7 1080 mV, DCDC9 1240 mV, ELDO1 1075 mV). The new vcc5v0-sys -> ps-output -> ldo2v5-input chain probes, and eldo-input now reports its fixed 1.24 V.
- PMU: counting and overflow interrupts work on all 8 CPUs.
- MMC0: High Speed, 50 MHz, 3.3 V. Repeated reads and a 64 MiB write/readback matched, no mmc errors.
- EEPROM reads the same contents as before. Warm reboot and power-off (0 W at the plug) work. No warnings in dmesg.

On the bot's IO bias concern: with the pinctrl dependency applied, GPIO_POW_MOD_SEL reads 0x05555555 (all auto) and SGPIO_POW_MOD_SEL 0x00055555, PF stays on 3.3 V, and GPIO_POW_VAL reads the same as U-Boot leaves it (PC/PE/PK 1.8 V, the other banks 3.3 V).

There is still no watchdog node, so I stopped our U-Boot's 16 s watchdog at 0x7021000 by hand again.

The cover lists CPU/cache topology as untested: all eight CPUs are in one cluster, as described. Patch 2/5 mentions the shared L3, but the DTSI has no cache nodes, so the kernel falls back to reporting L2 as shared by all eight CPUs as well (index2 shared_cpu_list 0-7).

The EEPROM probes as writable. It holds Radxa's factory data, and our own DT reads the MAC address from it at 0x9e, so read-only might be worth considering.

Card hotplug, listed as untested in the cover, works with Vinicius' "do not switch the mux to read IRQ lines" fix (a256b8c8083e) on top:
pulling the card gives "card removed" and reinserting it gives "new high speed SDXC card". Without that fix the PF6 level follows the card, but the card detect interrupt never fires, so the A7S needs it for hotplug.

Not tested: the power key, as the AXP318W driver has no power key support yet. Otherwise the same gaps as for v5.

Built and measured by AI agents (Claude) on my board.

Thanks,
Norman

#30 lore raw

Re: [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board

Quoted 4 lines

The cover lists CPU/cache topology as untested: all eight CPUs are in one cluster, as described. Patch 2/5 mentions the shared L3, but the DTSI has no cache nodes, so the kernel falls back to reporting L2 as shared by all eight CPUs as well (index2 shared_cpu_list 0-7).

Right. v7 rewords 2/5 so it no longer claims the shared L3 is described.

Quoted 3 lines

The EEPROM probes as writable. It holds Radxa's factory data, and our own DT reads the MAC address from it at 0x9e, so read-only might be worth considering.

Agreed, v7 marks it read-only.

Quoted 6 lines

Card hotplug, listed as untested in the cover, works with Vinicius' "do not switch the mux to read IRQ lines" fix (a256b8c8083e) on top:
pulling the card gives "card removed" and reinserting it gives "new high speed SDXC card". Without that fix the PF6 level follows the card, but the card detect interrupt never fires, so the A7S needs it for hotplug.

v7's cover letter names Vinicius' "pinctrl: sunxi: a733: do not switch the mux to read IRQ lines" as needed for card-detect interrupts on the A7S.

Enzo

#31 lore raw

PATCH v6 4/5 arm64: dts: allwinner: add Radxa Cubie A7Z board

In reply to Enzo Adriano

From: Vinicius Pedrosa <[email protected]>

Add the device tree for the Radxa Cubie A7Z, an Allwinner A733 board with LPDDR4, a microSD slot and a 40-pin header.

Enable the UART0 console, AXP318W PMIC on R-I2C0, MMC0, RTC and green user LED, and describe the board regulators and pin bank supplies.

The device tree is based on Enzo Adriano's Cubie A7S board description and has been tested on A7Z v1.11 hardware.

[enzo: use regulator-ps-output to satisfy the DT schema unit-suffix check]

---
Changes since the DT series v5:
- Bring in the standalone Cubie A7Z v2 patch. Rename the PS supply node to regulator-ps-output because the -ps suffix is matched as a picosecond unit by the DT schema. The regulator properties and connections are unchanged. The hardware report is in the cover.

 arch/arm64/boot/dts/allwinner/Makefile        |   1 +
 .../dts/allwinner/sun60i-a733-cubie-a7z.dts   | 349 ++++++++++++++++++
 2 files changed, 350 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts
arch/arm64/boot/dts/allwinner/Makefile +1 -0
index 9d1e740ff19e..62fab1d727d0 100644
@@ -70,3 +70,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun55i-h728-x96qpro+.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-avaota-a1.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-orangepi-4a.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun60i-a733-cubie-a7s.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun60i-a733-cubie-a7z.dtb
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts new file +349 -0

349 lines not on this page · raw message

#32 lore raw

Re: [PATCH v6 4/5] arm64: dts: allwinner: add Radxa Cubie A7Z board

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] arm64: dts: allwinner: cubie-a7z vcc-pm-supply and cldo1 name mismatch --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] arm64: dts: allwinner: cubie-a7z vcc-pm-supply and cldo1 name mismatch
--

commit dbafc60438a1ea798e4288e52449976e3ef9ca34
Author: Vinicius Pedrosa <[email protected]>

arm64: dts: allwinner: add Radxa Cubie A7Z board

This commit adds the device tree for the Radxa Cubie A7Z board, enabling UART0, the AXP318W PMIC, MMC0, the RTC, the user LED, and the board and pin bank power supplies.

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts new file +0 -0
new file mode 100644
index 0000000000000..049e6b67c23af

[ ... ]

Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts new file +8 -0
+		regulators {
+			reg_aldo1: aldo1 {
+				/* Port L powers the PMIC's own I2C bus. */
+				regulator-name = "vcc-pl-usb";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};

[ ... ]

Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts new file +7 -0
+			reg_cldo1: cldo1 {
+				/* LPDDR4 VDD1. */
+				regulator-name = "vcc-pm-lpddr";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+			};

[ ... ]

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts line 337

Quoted 7 lines

+&r_pio {

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts new file +6 -0
+	/*
+	 * PL powers the PMIC bus itself, so firmware must keep ALDO1 enabled:
+	 * vcc-pl-supply = <&reg_aldo1>;
+	 */
+	vcc-pm-supply = <&reg_aldo1>;
+};

[Severity: Low]
Should vcc-pm-supply in &r_pio point to &reg_cldo1 instead of &reg_aldo1, or does reg_cldo1 have the wrong regulator-name?

reg_cldo1 is a 1.8 V rail named "vcc-pm-lpddr" while reg_aldo1 is a 3.3 V rail named "vcc-pl-usb". When led-0 requests GPIO PM2 on boot, sunxi_pmx_request() calls sunxi_pinctrl_set_io_bias_cfg(), which reads the voltage of vcc-pm-supply to program Port M's I/O bias voltage threshold. If CLDO1 supplies Port M at 1.8 V as its regulator-name indicates, pointing vcc-pm-supply at reg_aldo1 configures Port M's bias threshold for 3.3 V instead of 1.8 V.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#33 lore raw

Re: [PATCH v6 4/5] arm64: dts: allwinner: add Radxa Cubie A7Z board

Quoted 9 lines

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts line 337

Quoted 2 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts new file +2 -0
+	vcc-pm-supply = <&reg_aldo1>;
+};

[Severity: Low]
Should vcc-pm-supply in &r_pio point to &reg_cldo1 instead of &reg_aldo1, or does reg_cldo1 have the wrong regulator-name?

reg_cldo1 is a 1.8 V rail named "vcc-pm-lpddr" while reg_aldo1 is a 3.3 V rail named "vcc-pl-usb".

Vinicius, could you check VCC-PM on the A7Z schematic? &r_pio uses reg_aldo1 for vcc-pm-supply, while cldo1 is named "vcc-pm-lpddr". I will carry whichever fix you confirm in v7, with a note.

Also, is no-1-8-v on &mmc0 fine with you? It ties to Jernej's question on 2/5 [1] and Andre's reply [2].

[1] https://lore.kernel.org/r/[email protected]
[2]
https://lore.kernel.org/r/[email protected]

Enzo

#34 lore raw

Re: [PATCH v6 4/5] arm64: dts: allwinner: add Radxa Cubie A7Z board

Hi Enzo,

Quoted 3 lines · Enzo Adriano

Vinicius, could you check VCC-PM on the A7Z schematic? &r_pio uses reg_aldo1 for vcc-pm-supply, while cldo1 is named "vcc-pm-lpddr". I will carry whichever fix you confirm in v7, with a note.

I checked sheet 7 of the A7Z v1.10, v1.11 and v2.00 schematics. The connection is the same in all three. The SoC's VCC-PM pin connects to VCC-PL (ALDO1, 3.3 V) through RA13 (0R). The alternative path to the VCC-PM net goes through RA11, marked NC/0R. The Port M signals are labelled PM3_3V3 through PM5_3V3.

So I'd keep vcc-pm-supply = <&reg_aldo1>. On my v1.11 board, I measured continuity across RA13 and confirmed that RA11 isn't populated. ALDO1 was also held enabled by the pinctrl vcc-pm consumer.

The "vcc-pm-lpddr" name for CLDO1 is confusing here. I'd rename it to "vcc18-lpddr", as on the A7A, without changing the supply.

Quoted 1 line

Also, is no-1-8-v on &mmc0 fine with you?

The A7Z &mmc0 node in v6 4/5 doesn't have no-1-8-v, vqmmc-supply or max-frequency. I'd leave it that way.

On my v1.11 board, with the v5 dtsi and my A7Z DTS candidate, MMC0 ran at 3.3 V and 50 MHz, with no 1.8 V switch attempt in dmesg. I haven't booted the v6 DTB on the A7Z yet.

Thanks,
Vinicius

#35 lore raw

PATCH v6 5/5 arm64: dts: allwinner: add Radxa Cubie A7A board

In reply to Enzo Adriano

From: Andre Przywara <[email protected]>

The Radxa Cubie A7A is a single board computer using the Allwinner A733 SoC. It features:
- Allwinner A733 SoC (6*Arm Cortex-A55 + 2*Arm Cortex-A76)
- Imagination BXM-4-64 MC1 GPU and 3 TOPS NPU
- 2-16 GiB LPDDR5 DRAM
- AXP318W PMIC
- eMMC and UFS socket
- single lane PCIe 3.0 via FPC connector
- microSD card slot
- bootable SPI NOR flash
- HDMI 2.0 and MIPI-DSI connector
- MIPI-CSI camera connector
- GBit Ethernet socket, with optional POE support
- unknown Bluetooth and WiFi
- USB-C 2.0 OTG port (also primary power supply)
- USB-A 3.1 host port
- 3* USB-A 2.0 host ports (via hub)
- 40 pin GPIO connector

Add initial support for the peripherals we have DT bindings for so far, including UART, PMIC, SD card, some EEPROM and an external RTC chip. The PMIC rails assignment has been determined by the schematic.

---
Changes since the DT series v5:
- Add Andre's posted Cubie A7A board patch. It now gets its R-I2C1 pin group from the common DTSI. The board DTS is identical to the posted version. The Makefile context includes the A7Z entry.

 arch/arm64/boot/dts/allwinner/Makefile        |   1 +
 .../dts/allwinner/sun60i-a733-cubie-a7a.dts   | 385 ++++++++++++++++++
 2 files changed, 386 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts
arch/arm64/boot/dts/allwinner/Makefile +1 -0
index 62fab1d727d0..cdeb966031ee 100644
@@ -69,5 +69,6 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun55i-a527-cubie-a5e.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun55i-h728-x96qpro+.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-avaota-a1.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun55i-t527-orangepi-4a.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun60i-a733-cubie-a7a.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun60i-a733-cubie-a7s.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun60i-a733-cubie-a7z.dtb
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts new file +385 -0

385 lines not on this page · raw message

#36 lore raw

Re: [PATCH v6 5/5] arm64: dts: allwinner: add Radxa Cubie A7A board

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] arm64: dts: allwinner: cubie-a7a pio vcc-pk-supply wired to reg_aldo1 - [Low] arm64: dts…

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [Medium] arm64: dts: allwinner: cubie-a7a pio vcc-pk-supply wired to reg_aldo1
- [Low] arm64: dts: allwinner: cubie-a7a uses deprecated osc32k-clk node name
--

commit 9896a0ede91d897f45b1801a9ca22b82ac330613
Author: Andre Przywara <[email protected]>

arm64: dts: allwinner: add Radxa Cubie A7A board

This commit adds the initial Devicetree source for the Allwinner A733-based Radxa Cubie A7A board, describing its UART, AXP318W PMIC, SD card, EEPROM, and external RTC.

Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts new file +0 -0
new file mode 100644
index 0000000000000..9017cadf6c6a9
@@ -0,0 +1,385 @@

[ ... ]

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts line 52

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts new file +5 -0
+	osc32k: osc32k-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+	};

[Severity: Low]
Should this node be named clock-osc32k instead of osc32k-clk to match the ^clock-([0-9]+|[a-z0-9-]+)$ pattern required by Documentation/devicetree/bindings/clock/fixed-clock.yaml?

[ ... ]

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts line 145

Quoted 11 lines

+&pio {

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts new file +10 -0
+	vcc-pb-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pc-supply = <&reg_cldo5>;
+	vcc-pd-supply = <&reg_swout1>;
+	vcc-pe-supply = <&reg_bldo1>;
+	vcc-pf-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pg-supply = <&reg_aldo1>;
+	vcc-ph-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pj-supply = <&reg_swout1>;
+	vcc-pk-supply = <&reg_aldo1>;
+};

[Severity: Medium]
Should vcc-pk-supply reference &reg_bldo1 instead of &reg_aldo1?

Below, reg_bldo1 is defined as the 1.8 V "vcc-pe-pk-mcsi" rail (without regulator-always-on), whereas reg_aldo1 is the 3.3 V "vcc-pl-usb" rail. When a Port K pin is requested, sunxi_pmx_request() enables the bank supply and calls sunxi_pinctrl_set_io_bias_cfg(), which programs Port K's PIO_POW_MOD_SEL bit for 3.3 V instead of 1.8 V and leaves reg_bldo1 disabled if no Port E or MCSI consumer is active.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
#37 lore raw

Re: [PATCH v6 5/5] arm64: dts: allwinner: add Radxa Cubie A7A board

In reply to Enzo Adriano

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts line 144

Quoted 11 lines · Enzo Adriano
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts new file +11 -0
+
+&pio {
+	vcc-pb-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pc-supply = <&reg_cldo5>;
+	vcc-pd-supply = <&reg_swout1>;
+	vcc-pe-supply = <&reg_bldo1>;
+	vcc-pf-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pg-supply = <&reg_aldo1>;
+	vcc-ph-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pj-supply = <&reg_swout1>;
+	vcc-pk-supply = <&reg_aldo1>;

K is bldo1 according to the schematics

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts new file +3 -0
+};
+
+&r_i2c0 {
Signature · 1 line
Jerome
#38 lore raw

Re: [PATCH v6 5/5] arm64: dts: allwinner: add Radxa Cubie A7A board

Hi Jerome,

Quoted 15 lines · Jerome Brunet

arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts line 144

Quoted 11 lines · Enzo Adriano
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts new file +11 -0
+
+&pio {
+	vcc-pb-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pc-supply = <&reg_cldo5>;
+	vcc-pd-supply = <&reg_swout1>;
+	vcc-pe-supply = <&reg_bldo1>;
+	vcc-pf-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pg-supply = <&reg_aldo1>;
+	vcc-ph-supply = <&reg_swout2>;	// via VCC-IO
+	vcc-pj-supply = <&reg_swout1>;
+	vcc-pk-supply = <&reg_aldo1>;

K is bldo1 according to the schematics

Ah, indeed, good catch. The schematic is somewhat confusing in parts (VCC-PG for instance), but indeed the VCC-PK label is actually VCC-PK.

Thanks,
Andre.

Quoted 5 lines
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts new file +3 -0
+};
+
+&r_i2c0 {
#39 lore raw

Re: [PATCH v6 5/5] arm64: dts: allwinner: add Radxa Cubie A7A board

Quoted 1 line

Ah, indeed, good catch.

Thanks. v7 uses <&reg_bldo1> for vcc-pk-supply, with a note in the patch.

On a different point: shall v7 rename osc32k-clk to clock-osc32k, as on the A7S and A7Z? The schema still accepts the old name (deprecated), and CHECK_DTBS is clean.

Also, is no-1-8-v on &mmc0 fine with you? It ties to Jernej's question on 2/5 [1] and your reply [2].

[1] https://lore.kernel.org/r/[email protected]
[2]
https://lore.kernel.org/r/[email protected]

Enzo

#40 lore raw

Re: [PATCH v6 5/5] arm64: dts: allwinner: add Radxa Cubie A7A board

Hi Enzo,

thanks for taking care and making the changes!

Quoted 4 lines · Enzo Adriano
Quoted 1 line

Ah, indeed, good catch.

Thanks. v7 uses <&reg_bldo1> for vcc-pk-supply, with a note in the patch.

Yes, thanks.

Quoted 3 lines

On a different point: shall v7 rename osc32k-clk to clock-osc32k, as on the A7S and A7Z? The schema still accepts the old name (deprecated), and CHECK_DTBS is clean.

Yes, it would be great if you could change that, too.

Quoted 2 lines

Also, is no-1-8-v on &mmc0 fine with you? It ties to Jernej's question on 2/5 [1] and your reply [2].

With no vqmmc, and vmmc pointing to a 3.3V regulator, I think it doesn't matter, no one would negotiate 1.8V anyway. And we didn't use that property before. I am not even sure it is correct for the A733, since the host controller DOES support 1.8V, it's just not "wired up" yet. So unless someone screams, please leave it out (and feel free to do the same on the A7S). Eventually we will need to drop that property anyway.

Cheers,
Andre

Quoted 6 lines

[1] https://lore.kernel.org/r/[email protected]
[2]
https://lore.kernel.org/r/[email protected]

Enzo

#41 lore raw

Re: [PATCH v6 5/5] arm64: dts: allwinner: add Radxa Cubie A7A board

In reply to Enzo Adriano

Hi Enzo,

Quoted 11 lines · Enzo Adriano
Quoted 1 line

Ah, indeed, good catch.

Thanks. v7 uses <&reg_bldo1> for vcc-pk-supply, with a note in the patch.

On a different point: shall v7 rename osc32k-clk to clock-osc32k, as on the A7S and A7Z? The schema still accepts the old name (deprecated), and CHECK_DTBS is clean.

Also, is no-1-8-v on &mmc0 fine with you? It ties to Jernej's question on 2/5 [1] and your reply [2].

While you are at it, can you also adjust the LPDDR5 VDD2L voltage range, to match what we discussed on the A7S board? So ELDO1 should range from 0.87V to 1.12V, to accommodate the possible LPDDR5 VDD2L range.

Many thanks!
Andre

Quoted 6 lines

[1] https://lore.kernel.org/r/[email protected]
[2]
https://lore.kernel.org/r/[email protected]

Enzo

#42 lore raw

Re: [PATCH v6 5/5] arm64: dts: allwinner: add Radxa Cubie A7A board

Quoted 4 lines

While you are at it, can you also adjust the LPDDR5 VDD2L voltage range, to match what we discussed on the A7S board?
So ELDO1 should range from 0.87V to 1.12V, to accommodate the possible LPDDR5 VDD2L range.

Yes, v7 sets the A7A ELDO1 (vdd2l) range to 0.87 V - 1.12 V in 5/5, matching the A7S.

Enzo