[v5,3/3] arm64: dts: allwinner: add Radxa Cubie A7S board

Message ID 20261121-a733-cubie-a7s-dt-v5-3@gmail.com (mailing list archive)
State New
Headers
Series arm64: dts: allwinner: add A733/Cubie A7S support |

Commit Message

Enzo Adriano Nov. 23, 2026, 5:42 p.m. UTC
Enable the serial console, PMIC and microSD slot for initial Cubie A7S
bring-up with vendor firmware. Describe the oscillator inputs and the
power tree using the Radxa A7S v1.10 schematic, sheets 4, 7 and 8. Keep
the boot-critical supplies enabled. 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.

Link: https://dl.radxa.com/cubie/a7s/hw/radxa_cubie_a7s_schematic_v1.10.pdf
Link: https://github.com/radxa/allwinner-device/blob/6d911d1582dcccdb5a4c38be8d3c1ee851019795/configs/cubie_a7s/linux-5.15/board.dts#L372-L384
Signed-off-by: Enzo Adriano <enzo.adriano.code@gmail.com>
---

v4 -> v5: Add GPIO LEDs and the I2C0 EEPROM. Drop the MMC alias,
50 MHz cap and vqmmc-supply, and describe MMC/SDIO high-speed and IRQ
capabilities. Describe the 3.3 V PF supply. Name and order the fixed
regulators, remove the UFS and codec rails, and document the
remaining always-on supplies. Add the DCDC2-7, BLDO1/2, DLDO1
and ELDO6 voltage constraints.

Untested on v5: physical rail voltages, visible LED operation, EEPROM
contents, writes and write protection, early and repeatable MMC reads,
MMC ios, SD writes, hotplug and 1.8 V switching, stimulated PMIC/NMI
interrupts, suspend, power-off and other boards.

 arch/arm64/boot/dts/allwinner/Makefile            |   1 +
 .../boot/dts/allwinner/sun60i-a733-cubie-a7s.dts  | 331 ++++++++++++++++++++
 2 files changed, 332 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
  

Comments

sashiko-bot@kernel.org Nov. 23, 2026, 6:11 p.m. UTC | #1
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: non-generic osc32k-clk fixed-clock node
  name
- [Low] arm64: dts: allwinner: undocumented allwinner,sun60i-a733-uart
  compatible
--

commit e16e02bf9bff4295531a8fc06d6b6852a523f527
Author: Enzo Adriano <enzo.adriano.code@gmail.com>

arm64: dts: allwinner: add Radxa Cubie A7S board

This commit adds the initial Devicetree source for the Allwinner
A733-based Radxa Cubie A7S board, enabling the UART0 console, AXP318W
PMIC, microSD slot, I2C0 EEPROM, and GPIO LEDs.

Link: https://dl.radxa.com/cubie/a7s/hw/radxa_cubie_a7s_schematic_v1.10.pdf
Link: https://github.com/radxa/allwinner-device/blob/6d911d1582dcccdb5a4c38be8d3c1ee851019795/configs/cubie_a7s/linux-5.15/board.dts#L372-L384

> diff --git a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
> new file mode 100644
> index 0000000000000..7451c00570fb7
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts

[ ... ]

> +	osc32k: osc32k-clk {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <32768>;
> +	};

[Severity: Low]
Should this fixed-clock node use a generic node name such as clock-osc32k
or clock-32768?

Documentation/devicetree/bindings/clock/fixed-clock.yaml deprecates node
names that do not match the ^clock-([0-9]+|[a-z0-9-]+)$ pattern.

[ ... ]

> +&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>;
> +};

[Severity: High]
Does wiring vcc-pb-supply through vcc-pk-supply on &pio configure inverted
1.8 V and 3.3 V I/O bias modes on the A733 pin banks?

The commit message notes that the A733 pinctrl voltage-mode fix is required
for these bank supply connections, but a733_pinctrl_data in
drivers/pinctrl/sunxi/pinctrl-sun60i-a733.c still uses
BIAS_VOLTAGE_PIO_POW_MODE_SEL instead of BIAS_VOLTAGE_PIO_POW_MODE_CTL_INV.
When pins in banks PB through PK are requested with resolved bank
regulators, sunxi_pinctrl_set_io_bias_cfg() writes un-inverted mode bits to
pow_mod_sel_offset, programming 3.3 V banks for 1.8 V withstand mode and
1.8 V banks for 3.3 V mode.

> +
> +&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_dcdc1: dcdc1 {

[ ... ]

> +			reg_dcdc9: dcdc9 {
> +				regulator-name = "eldo-input";
> +			};
> +
> +			reg_swout1: swout1 {
> +				regulator-name = "vcc33-lcd";
> +			};
> +
> +			reg_swout2: swout2 {
> +				/* VCC-IO to the console and microSD. */
> +				regulator-name = "vcc-io-card";
> +				regulator-always-on;
> +			};

[Severity: High]
Will any consumer of the axp318w regulators ever finish probing without a
driver or Devicetree binding for x-powers,axp318w?

Neither Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml nor
axp20x_i2c_of_match[] in drivers/mfd/axp20x-i2c.c includes
"x-powers,axp318w" (or the grouped supply properties aldo156in-supply,
aldo234in-supply, vin19-supply, vin23-supply, vin45-supply, vin678-supply
and child regulator nodes dcdc9, swout1, swout2).  Because no driver binds
to pmic@36, none of its child regulators are registered.  When consumers
such as pio, r_pio, uart0, mmc0, i2c0, eeprom@50, and leds request their
bank or device supplies, sunxi_pmx_request() -> regulator_get() ->
of_regulator_dev_lookup() finds the DT regulator node without a registered
regulator device and returns -EPROBE_DEFER instead of falling back to the
dummy regulator, leaving the serial console, microSD slot, EEPROM, and
LEDs permanently deferred while also failing dtbs_check.

[ ... ]

> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pb_pins>;
> +
> +	status = "okay";
> +};

[Severity: Low]
Does sun60i-a733-cubie-a7s.dtb fail dtbs_check on the UART nodes inherited
from sun60i-a733.dtsi?

Commit "arm64: dts: allwinner: add A733 SoC description" defines uart0
through uart6 and r_uart0 through r_uart1 in sun60i-a733.dtsi with
compatible = "allwinner,sun60i-a733-uart", "snps,dw-apb-uart", but
"allwinner,sun60i-a733-uart" is not documented in
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml.
  

Patch

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index da39f02252d4..9d1e740ff19e 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -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
diff --git a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
new file mode 100644
index 000000000000..7451c00570fb
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
@@ -0,0 +1,331 @@ 
+// 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;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		power-led {
+			function = LED_FUNCTION_POWER;
+			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";
+		};
+	};
+
+	osc32k: osc32k-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+	};
+
+	/* board wide 5V supply from the USB-C connector */
+	reg_ps: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "ps";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+
+	/* discrete ETA3521 DC/DC step-down regulator */
+	reg_ldo_input: regulator-2v4 {
+		compatible = "regulator-fixed";
+		regulator-name = "ldo-input";
+		/* Hardwired BLDO/CLDO input: 0.6 V * (1 + RP298 / RP299). */
+		regulator-min-microvolt = <2400000>;
+		regulator-max-microvolt = <2400000>;
+		regulator-always-on;
+		vin-supply = <&reg_ps>;
+	};
+};
+
+&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>;
+		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;
+	cap-sdio-irq;
+	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
+	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_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";
+			};
+
+			reg_swout1: swout1 {
+				regulator-name = "vcc33-lcd";
+			};
+
+			reg_swout2: swout2 {
+				/* VCC-IO to the console and microSD. */
+				regulator-name = "vcc-io-card";
+				regulator-always-on;
+			};
+
+			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_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";
+				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>;
+				regulator-max-microvolt = <1800000>;
+				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";
+};