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

Message ID 0fe5938e04cc8a5af3825a0e01bd07b626a15b46.1794227241.git.enzo.adriano.code@gmail.com (mailing list archive)
State New
Headers
Series arm64: dts: allwinner: add A733/Cubie A7S support |

Commit Message

Enzo Adriano Nov. 10, 2026, 4:45 a.m. UTC
Enable the Cubie A7S serial console, PMIC and microSD slot to provide
an initial usable board configuration. Supply the 26 MHz crystal and
32768 Hz RTC input, enable UART0 and the AXP318W on R-I2C0, and describe
the PMIC input/output and CPU supply connections from the Radxa Cubie
A7S schematic v1.10. Preserve firmware settings on rails whose working
voltage is not established. BLDO2 has no programmed voltage constraint:
its software 3.3 V selector does not establish its physical output with
the schematic's nominal 2.4 V input.

Describe the card's SWOUT2 supply and PF6 active-high detect with an
internal pull-down. Enable MMC0 at up to 50 MHz using 3.3 V signaling
only. Its high-voltage path uses VCCIO; CLDO5 also feeds PC and the PF
1.8 V input and must not be raised for SD signaling. Firmware must
select the 3.3 V PF path; dynamic voltage switching is not provided.
Keep other storage off.

Connect the documented bank supplies. PL's self-supply phandle is
omitted to avoid the PMIC/I2C/pinctrl bootstrap cycle, as on the
upstream Cubie A5E; ALDO1 is retained always-on. The separate pinctrl
voltage-mode fix is required for these bank-supply connections.

These board DTS bytes were RAM-booted on a Cubie A7S with vendor
firmware on November 4: UART0, PMIC registration and MMC0 read-only
transfers worked. Card writes, physical hotplug, 1.8 V signaling and
physical BLDO2 voltage were not tested.

Signed-off-by: Enzo Adriano <enzo.adriano.code@gmail.com>
---
 arch/arm64/boot/dts/allwinner/Makefile        |   1 +
 .../dts/allwinner/sun60i-a733-cubie-a7s.dts   | 284 ++++++++++++++++++
 2 files changed, 285 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
  

Comments

sashiko-bot@kernel.org Nov. 11, 2026, midnight UTC | #1
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] arm64: dts: allwinner: cubie-a7s DTB build fails on missing
  A733 CCU headers
- [High] arm64: dts: allwinner: unsupported x-powers,axp318w PMIC blocks
  consumer probe
- [High] arm64: dts: allwinner: cubie-a7s sets 1.8V vcc-pf-supply for
  3.3V-only mmc0
--

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

arm64: dts: allwinner: add Radxa Cubie A7S board

This commit adds the device tree for the Radxa Cubie A7S board based on the
Allwinner A733 SoC, enabling UART0, the AXP318W PMIC, and MMC0, and wires it
into the sunxi DTB build.

> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
> index d1f768dd6461d..792152525b433 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -68,3 +68,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

[Severity: High]
Does adding sun60i-a733-cubie-a7s.dtb to dtb-$(CONFIG_ARCH_SUNXI) break the
DTB build?

sun60i-a733-cubie-a7s.dts includes sun60i-a733.dtsi and references
CLK_BUS_R_RTC and CLK_R_AHB in the &rtc node, and sun60i-a733.dtsi includes:

arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi {
	#include <dt-bindings/clock/allwinner,sun60i-a733-ccu.h>
	#include <dt-bindings/clock/allwinner,sun60i-a733-r-ccu.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>
}

None of those four A733 clock and reset binding headers exist in
include/dt-bindings/, so compiling dtbs with CONFIG_ARCH_SUNXI enabled fails
at the preprocessor stage.  In addition, there are no in-tree drivers for
allwinner,sun60i-a733-ccu or allwinner,sun60i-a733-r-ccu to provide clocks and
resets at runtime.

> 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..341c24360ce29
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts

[ ... ]

> +&mmc0 {
> +	bus-width = <4>;
> +	cap-sd-highspeed;
> +	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
> +	disable-wp;
> +	max-frequency = <50000000>;
> +	no-1-8-v;
> +	vmmc-supply = <&reg_swout2>;
> +	/* The 3.3 V path uses VCC-IO; no Port F voltage switching yet. */
> +	vqmmc-supply = <&reg_swout2>;
> +	status = "okay";
> +};
> +
> +&osc {
> +	clock-frequency = <26000000>;
> +};
> +
> +&pio {
> +	vcc-pb-supply = <&reg_swout2>;
> +	vcc-pc-supply = <&reg_cldo5>;
> +	vcc-pd-supply = <&reg_swout1>;
> +	vcc-pe-supply = <&reg_bldo1>;
> +	vcc-pf-supply = <&reg_cldo5>;

[Severity: High]
Will setting vcc-pf-supply = <&reg_cldo5> configure Port F's IO bias for 1.8 V
while &mmc0 operates at 3.3 V?

&mmc0 uses Port F pins (PF0-PF6) with no-1-8-v and vqmmc-supply =
<&reg_swout2> for 3.3 V signaling, whereas reg_cldo5 is fixed at 1800000 uV.
When mmc0 requests its pins, sunxi_pmx_request() ->
sunxi_pinctrl_set_io_bias_cfg() reads the voltage of vcc-pf-supply and
programs the bank's PIO_POW_MOD_SEL bit for 1.8 V whenever uV <= 1800000,
mismatching the 3.3 V SD signaling path.  Pointing vcc-pf-supply at the 3.3 V
supply (&reg_swout2, with a defined 3.3 V voltage or parent supply) would keep
Port F's bias configuration aligned with 3.3 V signaling.

> +	vcc-pg-supply = <&reg_aldo1>;
> +	vcc-ph-supply = <&reg_swout2>;
> +	vcc-pj-supply = <&reg_swout1>;
> +	vcc-pk-supply = <&reg_bldo1>;
> +};
> +
> +&r_i2c0 {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&r_i2c0_pl_pins>;
> +
> +	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>;

[Severity: High]
Does axp318w prevent &pio, &uart0, and &mmc0 from probing because
"x-powers,axp318w" has no in-tree driver or DT binding?

Neither drivers/mfd/axp20x*.c, drivers/regulator/axp20x-regulator.c, nor
Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml supports
"x-powers,axp318w" (or its grouped input supplies and swout1/swout2/dcdc8/dcdc9
regulators).  Because &pio, &r_pio, and &mmc0 reference child regulator nodes
under axp318w, of_regulator_dev_lookup() finds the DT nodes without registered
regulator devices and returns -EPROBE_DEFER, causing sunxi_pmx_request() for
uart0 and mmc0 as well as mmc_regulator_get_supply() to defer indefinitely.
  
Alexander Sverdlin Nov. 18, 2026, 6:03 p.m. UTC | #2
Hi Enzo,

On Mon, 2026-11-09 at 23:45 -0500, Enzo Adriano wrote:
> Enable the Cubie A7S serial console, PMIC and microSD slot to provide
> an initial usable board configuration. Supply the 26 MHz crystal and
> 32768 Hz RTC input, enable UART0 and the AXP318W on R-I2C0, and describe
> the PMIC input/output and CPU supply connections from the Radxa Cubie
> A7S schematic v1.10. Preserve firmware settings on rails whose working
> voltage is not established. BLDO2 has no programmed voltage constraint:
> its software 3.3 V selector does not establish its physical output with
> the schematic's nominal 2.4 V input.
> 
> Describe the card's SWOUT2 supply and PF6 active-high detect with an
> internal pull-down. Enable MMC0 at up to 50 MHz using 3.3 V signaling
> only. Its high-voltage path uses VCCIO; CLDO5 also feeds PC and the PF
> 1.8 V input and must not be raised for SD signaling. Firmware must
> select the 3.3 V PF path; dynamic voltage switching is not provided.
> Keep other storage off.
> 
> Connect the documented bank supplies. PL's self-supply phandle is
> omitted to avoid the PMIC/I2C/pinctrl bootstrap cycle, as on the
> upstream Cubie A5E; ALDO1 is retained always-on. The separate pinctrl
> voltage-mode fix is required for these bank-supply connections.
> 
> These board DTS bytes were RAM-booted on a Cubie A7S with vendor
> firmware on November 4: UART0, PMIC registration and MMC0 read-only
> transfers worked. Card writes, physical hotplug, 1.8 V signaling and
> physical BLDO2 voltage were not tested.

Should the history be moved below "---"?

> Signed-off-by: Enzo Adriano <enzo.adriano.code@gmail.com>
> ---
>  arch/arm64/boot/dts/allwinner/Makefile        |   1 +
>  .../dts/allwinner/sun60i-a733-cubie-a7s.dts   | 284 ++++++++++++++++++
>  2 files changed, 285 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
> index d1f768dd6461..792152525b43 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -68,3 +68,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..341c24360ce2
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
> @@ -0,0 +1,284 @@
> +// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
> +/dts-v1/;
> +
> +#include "sun60i-a733.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> +	model = "Radxa Cubie A7S";
> +	compatible = "radxa,cubie-a7s", "allwinner,sun60i-a733";
> +
> +	aliases {
> +		mmc0 = &mmc0;
> +		serial0 = &uart0;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	reg_ps: regulator-system-power {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ps";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		regulator-always-on;
> +	};
> +
> +	reg_ldo_input: regulator-ldo-input {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ldo-input";
> +		/* ETA3521: 0.6 V * (1 + RP298 / RP299), 30k / 10k. */
> +		regulator-min-microvolt = <2400000>;
> +		regulator-max-microvolt = <2400000>;
> +		regulator-always-on;
> +		vin-supply = <&reg_ps>;
> +	};
> +
> +	osc32k: osc32k-clk {

Should two regulators and the clock have been sorted in the reverse order?

> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <32768>;
> +	};
> +};
> +
> +&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>;
> +};
> +
> +&mmc0 {
> +	bus-width = <4>;
> +	cap-sd-highspeed;
> +	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
> +	disable-wp;
> +	max-frequency = <50000000>;
> +	no-1-8-v;
> +	vmmc-supply = <&reg_swout2>;
> +	/* The 3.3 V path uses VCC-IO; no Port F voltage switching yet. */
> +	vqmmc-supply = <&reg_swout2>;
> +	status = "okay";

see below...

> +};
> +
> +&osc {
> +	clock-frequency = <26000000>;
> +};
> +
> +&pio {
> +	vcc-pb-supply = <&reg_swout2>;
> +	vcc-pc-supply = <&reg_cldo5>;
> +	vcc-pd-supply = <&reg_swout1>;
> +	vcc-pe-supply = <&reg_bldo1>;
> +	vcc-pf-supply = <&reg_cldo5>;
> +	vcc-pg-supply = <&reg_aldo1>;
> +	vcc-ph-supply = <&reg_swout2>;
> +	vcc-pj-supply = <&reg_swout1>;
> +	vcc-pk-supply = <&reg_bldo1>;
> +};
> +
> +&r_i2c0 {
> +	status = "okay";

Should "status" have been last (preceded by a blank line)? (dts-coding-style.rst)

> +	pinctrl-names = "default";
> +	pinctrl-0 = <&r_i2c0_pl_pins>;
> +
> +	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 {
> +				regulator-name = "vcc-3v3";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			reg_dcdc2: dcdc2 {
> +				regulator-name = "vdd-sys";
> +				regulator-always-on;
> +			};
> +
> +			reg_dcdc3: dcdc3 {
> +				regulator-name = "vdd-cpub";
> +				regulator-always-on;
> +			};
> +
> +			reg_dcdc4: dcdc4 {
> +				regulator-name = "vdd-gpu";
> +				regulator-always-on;
> +			};
> +
> +			reg_dcdc5: dcdc5 {
> +				regulator-name = "vdd-cpul";
> +				regulator-always-on;
> +			};
> +
> +			reg_dcdc6: dcdc6 {
> +				regulator-name = "vcc-draml";
> +				regulator-always-on;
> +			};
> +
> +			reg_dcdc7: dcdc7 {
> +				regulator-name = "vcc-dram";
> +				regulator-always-on;
> +			};
> +
> +			reg_dcdc8: dcdc8 {
> +				regulator-name = "vcc-ufs-io";
> +				regulator-always-on;
> +			};
> +
> +			reg_dcdc9: dcdc9 {
> +				regulator-name = "eldo-input";
> +				regulator-always-on;
> +			};
> +
> +			reg_swout1: swout1 {
> +				regulator-name = "vcc33-lcd";
> +				regulator-always-on;
> +			};
> +
> +			reg_swout2: swout2 {
> +				regulator-name = "vcc-io-card";
> +				regulator-always-on;
> +			};
> +
> +			reg_aldo1: aldo1 {
> +				regulator-name = "vcc-pl";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +			};
> +
> +			reg_bldo1: bldo1 {
> +				regulator-name = "vcc-pe-pk-mcsi";
> +			};
> +
> +			reg_bldo2: bldo2 {
> +				regulator-name = "vcc-lvds0";
> +				regulator-always-on;
> +			};
> +
> +			reg_bldo4: bldo4 {
> +				regulator-name = "vcc18-codec";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +			};
> +
> +			reg_cldo1: cldo1 {
> +				regulator-name = "vcc33-18-usb";
> +				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-pf-pc";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +			};
> +
> +			reg_dldo1: dldo1 {
> +				regulator-name = "vcc-efuse";
> +				regulator-always-on;
> +			};
> +
> +			reg_dldo6: dldo6 {
> +				regulator-name = "vcc-ufs";
> +				regulator-always-on;
> +			};
> +
> +			reg_eldo1: eldo1 {
> +				regulator-name = "vcc09-vdd2l";
> +				regulator-always-on;
> +			};
> +
> +			reg_eldo6: eldo6 {
> +				regulator-name = "vdd-cpus";
> +				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>, <&osc>, <&r_ccu CLK_R_AHB>,
> +		 <&osc32k>;
> +	clock-names = "bus", "hosc", "ahb", "ext-osc32k";
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pb_pins>;
> +	status = "okay";

see above...

> +};
  
Enzo Adriano Nov. 19, 2026, 6:08 p.m. UTC | #3
Hi Alexander,

> Should the history be moved below "---"?

Yes, in v4.

> Should two regulators and the clock have been sorted in the reverse order?

Yes. osc32k-clk sorts before the two regulator nodes; I will fix the
order in v4.

> Should "status" have been last (preceded by a blank line)? (dts-coding-style.rst)

Yes. In v4 I will put status last in r_i2c0, after its properties and
before the PMIC child node, with a blank line before each. mmc0 and
uart0 already put status last; I will add the preceding blank lines
there too.

Thanks,
Enzo
  

Patch

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index d1f768dd6461..792152525b43 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -68,3 +68,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..341c24360ce2
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
@@ -0,0 +1,284 @@ 
+// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
+/dts-v1/;
+
+#include "sun60i-a733.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "Radxa Cubie A7S";
+	compatible = "radxa,cubie-a7s", "allwinner,sun60i-a733";
+
+	aliases {
+		mmc0 = &mmc0;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	reg_ps: regulator-system-power {
+		compatible = "regulator-fixed";
+		regulator-name = "ps";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+
+	reg_ldo_input: regulator-ldo-input {
+		compatible = "regulator-fixed";
+		regulator-name = "ldo-input";
+		/* ETA3521: 0.6 V * (1 + RP298 / RP299), 30k / 10k. */
+		regulator-min-microvolt = <2400000>;
+		regulator-max-microvolt = <2400000>;
+		regulator-always-on;
+		vin-supply = <&reg_ps>;
+	};
+
+	osc32k: osc32k-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+	};
+};
+
+&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>;
+};
+
+&mmc0 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
+	disable-wp;
+	max-frequency = <50000000>;
+	no-1-8-v;
+	vmmc-supply = <&reg_swout2>;
+	/* The 3.3 V path uses VCC-IO; no Port F voltage switching yet. */
+	vqmmc-supply = <&reg_swout2>;
+	status = "okay";
+};
+
+&osc {
+	clock-frequency = <26000000>;
+};
+
+&pio {
+	vcc-pb-supply = <&reg_swout2>;
+	vcc-pc-supply = <&reg_cldo5>;
+	vcc-pd-supply = <&reg_swout1>;
+	vcc-pe-supply = <&reg_bldo1>;
+	vcc-pf-supply = <&reg_cldo5>;
+	vcc-pg-supply = <&reg_aldo1>;
+	vcc-ph-supply = <&reg_swout2>;
+	vcc-pj-supply = <&reg_swout1>;
+	vcc-pk-supply = <&reg_bldo1>;
+};
+
+&r_i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&r_i2c0_pl_pins>;
+
+	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 {
+				regulator-name = "vcc-3v3";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+
+			reg_dcdc2: dcdc2 {
+				regulator-name = "vdd-sys";
+				regulator-always-on;
+			};
+
+			reg_dcdc3: dcdc3 {
+				regulator-name = "vdd-cpub";
+				regulator-always-on;
+			};
+
+			reg_dcdc4: dcdc4 {
+				regulator-name = "vdd-gpu";
+				regulator-always-on;
+			};
+
+			reg_dcdc5: dcdc5 {
+				regulator-name = "vdd-cpul";
+				regulator-always-on;
+			};
+
+			reg_dcdc6: dcdc6 {
+				regulator-name = "vcc-draml";
+				regulator-always-on;
+			};
+
+			reg_dcdc7: dcdc7 {
+				regulator-name = "vcc-dram";
+				regulator-always-on;
+			};
+
+			reg_dcdc8: dcdc8 {
+				regulator-name = "vcc-ufs-io";
+				regulator-always-on;
+			};
+
+			reg_dcdc9: dcdc9 {
+				regulator-name = "eldo-input";
+				regulator-always-on;
+			};
+
+			reg_swout1: swout1 {
+				regulator-name = "vcc33-lcd";
+				regulator-always-on;
+			};
+
+			reg_swout2: swout2 {
+				regulator-name = "vcc-io-card";
+				regulator-always-on;
+			};
+
+			reg_aldo1: aldo1 {
+				regulator-name = "vcc-pl";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-always-on;
+			};
+
+			reg_bldo1: bldo1 {
+				regulator-name = "vcc-pe-pk-mcsi";
+			};
+
+			reg_bldo2: bldo2 {
+				regulator-name = "vcc-lvds0";
+				regulator-always-on;
+			};
+
+			reg_bldo4: bldo4 {
+				regulator-name = "vcc18-codec";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
+			reg_cldo1: cldo1 {
+				regulator-name = "vcc33-18-usb";
+				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-pf-pc";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+			};
+
+			reg_dldo1: dldo1 {
+				regulator-name = "vcc-efuse";
+				regulator-always-on;
+			};
+
+			reg_dldo6: dldo6 {
+				regulator-name = "vcc-ufs";
+				regulator-always-on;
+			};
+
+			reg_eldo1: eldo1 {
+				regulator-name = "vcc09-vdd2l";
+				regulator-always-on;
+			};
+
+			reg_eldo6: eldo6 {
+				regulator-name = "vdd-cpus";
+				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>, <&osc>, <&r_ccu CLK_R_AHB>,
+		 <&osc32k>;
+	clock-names = "bus", "hosc", "ahb", "ext-osc32k";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pb_pins>;
+	status = "okay";
+};