From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F02B4606A32C for ; Sat, 21 Nov 2026 23:40:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=cibsJ54V; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=FzyB8Xwe DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=6G+qoyuS+XfWQYbP6gY4xhAOdcI4aLBFdUBf8L1UOt8=; b=cibsJ54VNAjG2S +ypn8QfT0Txzfsh+LLh4eDNc7fxM2cgYcxB75ciXDuKtHQfv+gkorv4NwpH0AaxHv2+okphrmxq9u AbsbX1b0qRT0OgbFdJnTeI22NhuaJ2SnnSKHUgWYp3mGdkW2uU3EGZ+WD7aeQUZy08A1uyOcxpfqP WR6vGLDpbY52gDEjJkXfV+h26+e2LgePvzot5OH7cJd/XTnHcQ1DP65gUn+HT54vvv8aQffFLCw/A INgf+eNIhsZRy6wYcewFO5+EWpSUDpPgWBrwYTRQ4hNbWL7wtIy4brOgtf9gv3Xw5zkFxs6z/OH/e xi7FpiQgdWaMIbWFliFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xUugX-00000000UxR-1koe; Sat, 21 Nov 2026 23:39:57 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xUugS-00000000Uww-0U6j for linux-arm-kernel@lists.infradead.org; Sat, 21 Nov 2026 23:39:56 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BDDE71575; Sat, 21 Nov 2026 15:39:45 -0800 (PST) Received: from ryzen.lan (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 123EE3F632; Sat, 21 Nov 2026 15:39:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1795304388; bh=uIGjGTNYItK1fO2IWuO0oXrmBCGSoTMgNCNIlJE47d0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FzyB8Xwe09oftNAYS2TqWMzCF6d8+cKG5wNCbM2p+cvgq62XAySRC43E5kSp0T2/z cuUYkLRLSY42Wof1QN7x72KFLitCD2aDUSUt5xarAS9ktgI2YEOp/tb7oWXk1Zgx0b jbw+eieLEUGiR173VOekc1YOWrP8kQZjMcDrSnww= Date: Sun, 22 Nov 2026 00:39:32 +0100 From: Andre Przywara To: Enzo Adriano Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, wens@kernel.org, jernej.skrabec@gmail.com, samuel@sholland.org, Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Junhui Liu , Jerome Brunet , Pablo Mazzini , Vinicius Pedrosa , Alexander Sverdlin , Jun Yan , Lukas Schmid Subject: Re: [PATCH v4 3/3] arm64: dts: allwinner: add Radxa Cubie A7S board Message-ID: <20261122003932.568c099c@ryzen.lan> In-Reply-To: <448e7551a6f560d8b8ede245ccfbc74101c76ef4.1795034153.git.enzo.adriano.code@gmail.com> References: <448e7551a6f560d8b8ede245ccfbc74101c76ef4.1795034153.git.enzo.adriano.code@gmail.com> Organization: Arm Ltd. X-Mailer: Claws Mail 4.4.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261121_153952_342314_426971D2 X-CRM114-Status: GOOD ( 42.92 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Thu, 19 Nov 2026 13:09:26 -0500 Enzo Adriano wrote: Hi Enzo, > 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. > > Signed-off-by: Enzo Adriano > --- > > The November 18 v4 RAM boot on Cubie A7S with vendor firmware exercised > UART0, PMIC probe and MMC0 read-only transfers. PMIC/NMI interrupt > delivery, card writes, physical hotplug, 1.8 V signaling and physical > BLDO2 voltage were not tested. > > arch/arm64/boot/dts/allwinner/Makefile | 1 + > .../dts/allwinner/sun60i-a733-cubie-a7s.dts | 287 ++++++++++++++++++ > 2 files changed, 288 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 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..9af9a68950d8 > --- /dev/null > +++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts > @@ -0,0 +1,287 @@ > +// SPDX-License-Identifier: (GPL-2.0-only OR MIT) > +/dts-v1/; > + > +#include "sun60i-a733.dtsi" > + > +#include > + > +/ { > + model = "Radxa Cubie A7S"; > + compatible = "radxa,cubie-a7s", "allwinner,sun60i-a733"; > + > + aliases { > + mmc0 = &mmc0; We don't do mmc aliases. Long discussion, I understand it seems useful, but relying on Linux device numbering is not a good idea. So please drop this line. U-Boot will give it back to you if you use the U-Boot devicetree ($fdtcontroladdr). > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + osc32k: osc32k-clk { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <32768>; > + }; > + > + reg_ldo_input: regulator-ldo-input { I think the node name alone is slightly misleading: it's indeed supplying some LDO input rails on the PMIC, but the chip itself is a DC/DC step down converter. Please add a comment here like this: /* discrete ETA3521 DC/DC step-down regulator */ And maybe use "regulator-2v4" as the node name (to match the binding requirement), the regulator name can then carry the usage meaning. > + 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 = <®_ps>; > + }; > + > + reg_ps: regulator-system-power { Please add a comment here, saying: /* board wide 5V supply from the USB-C connector */ And then change the node name to "regulator-5v". Also please move this whole node first, as this is the root of the whole power tree. > + compatible = "regulator-fixed"; > + regulator-name = "ps"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + regulator-always-on; > + }; There are two LEDs on the last page of the schematic, controlled by PJ26 and PM2. Please add them here. Check other (Allwinner) DTs for how to do that. > +}; > + > +&cpu0 { > + cpu-supply = <®_dcdc5>; > +}; > + > +&cpu1 { > + cpu-supply = <®_dcdc5>; > +}; > + > +&cpu2 { > + cpu-supply = <®_dcdc5>; > +}; > + > +&cpu3 { > + cpu-supply = <®_dcdc5>; > +}; > + > +&cpu4 { > + cpu-supply = <®_dcdc5>; > +}; > + > +&cpu5 { > + cpu-supply = <®_dcdc5>; > +}; > + > +&cpu6 { > + cpu-supply = <®_dcdc3>; > +}; > + > +&cpu7 { > + cpu-supply = <®_dcdc3>; > +}; > + The schematic shows an EEPROM on I2C0. There is a binding for that chip already, check rk3576-rock-4d.dts. Please add that chip. > +&mmc0 { > + bus-width = <4>; > + cap-sd-highspeed; I think we want the other two standard capabilities as well: cap-mmc-highspeed; cap-sdio-irq; > + cd-gpios = <&pio 5 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; > + disable-wp; > + max-frequency = <50000000>; Where does this limit come from? As it stands right now, at 3.3V you won't get faster anyway, so it's moot. Please remove if you agree. > + no-1-8-v; > + vmmc-supply = <®_swout2>; > + /* The 3.3 V path uses VCC-IO; no Port F voltage switching yet. */ > + vqmmc-supply = <®_swout2>; Just leave that out (for now), the default is to revert to vmmc-supply, if vqmmc is not given anyway. > + > + status = "okay"; > +}; > + > +&osc { > + clock-frequency = <26000000>; > +}; > + > +&pio { > + vcc-pb-supply = <®_swout2>; Please add a comment that this comes via VCC-IO, see the A527/T527 boards. > + vcc-pc-supply = <®_cldo5>; > + vcc-pd-supply = <®_swout1>; > + vcc-pe-supply = <®_bldo1>; > + vcc-pf-supply = <®_cldo5>; Same here, comment about this being VCC-IO, at least for now. > + vcc-pg-supply = <®_aldo1>; > + vcc-ph-supply = <®_swout2>; > + vcc-pj-supply = <®_swout1>; > + vcc-pk-supply = <®_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 = <®_ps>; > + aldo234in-supply = <®_aldo1>; > + bldoin-supply = <®_ldo_input>; > + cldoin-supply = <®_ldo_input>; > + dldoin-supply = <®_ps>; > + eldoin-supply = <®_dcdc9>; > + ips-supply = <®_ps>; > + vin19-supply = <®_ps>; > + vin23-supply = <®_ps>; > + vin45-supply = <®_ps>; > + vin678-supply = <®_ps>; > + > + regulators { > + reg_dcdc1: dcdc1 { > + regulator-name = "vcc-3v3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; Please add a comment or use a speaking regulator name to justify that this regulator must be always on. "regulator-always-on" should be the exception, not the rule. This applies to all the nodes below, I will comment with some hints below again. > + }; > + > + reg_dcdc2: dcdc2 { > + regulator-name = "vdd-sys"; > + regulator-always-on; We should have a voltage or a range for every regulator. Here it should be 0.8V. > + }; > + > + reg_dcdc3: dcdc3 { > + regulator-name = "vdd-cpub"; Do we have some OPPs for the cores? The range should reflect the min/max used voltages in there. > + regulator-always-on; > + }; > + > + reg_dcdc4: dcdc4 { > + regulator-name = "vdd-gpu"; > + regulator-always-on; Why is this always on? If I see this correctly, that's just supplying the GPU, which will have its own supply property. Voltages should be in the same range as for the CPUs. > + }; > + > + reg_dcdc5: dcdc5 { > + regulator-name = "vdd-cpul"; > + regulator-always-on; > + }; > + > + reg_dcdc6: dcdc6 { > + regulator-name = "vcc-draml"; > + regulator-always-on; 0.6/0.5V I guess. > + }; > + > + reg_dcdc7: dcdc7 { > + regulator-name = "vcc-dram"; > + regulator-always-on; Probably 1.1V. > + }; > + > + reg_dcdc8: dcdc8 { > + regulator-name = "vcc-ufs-io"; > + regulator-always-on; > + }; But there is no UFS on this board, right? All the UFS signals seem to be not-connected, so this power supply will be going nowhere. And DCDC8 seems to be used exclusively for UFS, so I would just leave this whole node out. > + > + reg_dcdc9: dcdc9 { > + regulator-name = "eldo-input"; > + regulator-always-on; Again, why the always-on? This is referenced by eldoin-supply, so the kernel should keep this on. As for the voltage, the schematic doesn't seem to give a clue, so maybe you can look this up on a running BSP kernel. > + }; > + > + reg_swout1: swout1 { > + regulator-name = "vcc33-lcd"; > + regulator-always-on; > + }; Why always-on? Should be referenced by the pinctrl device. > + > + 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"; Does this intentionally miss the voltage setting? The datasheets suggests that VCC-MCSI must be 1.8V. > + }; > + > + reg_bldo2: bldo2 { > + regulator-name = "vcc-lvds0"; > + regulator-always-on; Should not be needed. And again, the voltage is missing. Per the datasheet, VCC_LVDS0 must be 1.8V, and the VCC18-LCD label connected to BLDO2 supports this. > + }; > + > + reg_bldo4: bldo4 { > + regulator-name = "vcc18-codec"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; Do we need this at all? I don't see this (VCC18-CODEC) connected anywhere? > + > + reg_cldo1: cldo1 { > + regulator-name = "vcc33-18-usb"; That's not the right name. The connection between VCC33-18-USB and CLDO1 is "NC" in the schematic, so this is a red herring. However this also connects to VDD18-LPDDR, which would justify the always-on. > + 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"; This is a correct example, btw: it's always on, but the regulator name makes it almost obvious why. > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + }; > + > + reg_cldo5: cldo5 { > + regulator-name = "vcc18-pf-pc"; VCC18-PF is confusing, please remove that from the name. > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; Should not be needed. Voltage is missing, should be 1.8V, I think. Please try to double check on a system running with the BSP kernel. > + }; > + > + reg_dldo1: dldo1 { > + regulator-name = "vcc-efuse"; > + regulator-always-on; Voltage is missing, should be 1.8V, I think. Please try to double check on a system running with the BSP kernel. > + }; > + > + reg_dldo6: dldo6 { > + regulator-name = "vcc-ufs"; > + regulator-always-on; Apparently UFS is not supported on that board, so please remove that node. > + }; > + > + reg_eldo1: eldo1 { > + regulator-name = "vcc09-vdd2l"; > + regulator-always-on; Voltage should be 0.9V. > + }; > + > + reg_eldo6: eldo6 { > + regulator-name = "vdd-cpus"; > + regulator-always-on; Schematics suggest 0.8V. Cheers, Andre > + }; > + > + 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 = <®_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"; > +}; >