Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@kernel.org>
To: Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej@kernel.org>,
	Samuel Holland <samuel@sholland.org>
Cc: "Andre Przywara" <andre.przywara@arm.com>,
	linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	"Cristian Filipescu" <filipescu.cristian@gmail.com>,
	"Ondřej Jirman" <megi@xff.cz>,
	"Clément Péron" <peron.clem@gmail.com>,
	"Jagan Teki" <jagan@edgeble.ai>
Subject: [PATCH 1/9] arm64: dts: allwinner: h6: orangepi-3: Use common sun50i-h6-orangepi.dtsi
Date: Sat,  5 Dec 2026 01:12:51 +0800	[thread overview]
Message-ID: <20261204171319.745792-2-wens@kernel.org> (raw)
In-Reply-To: <20261204171319.745792-1-wens@kernel.org>

The Orange Pi 3 shares most of its base hardware (PMIC, regulators,
HDMI, LEDs, SD card, IR, UART0, USB2 host controllers) with the other
Orange Pi H6 boards described in sun50i-h6-orangepi.dtsi.

Refactor sun50i-h6-orangepi-3.dts to include sun50i-h6-orangepi.dtsi
and keep only the Orange Pi 3 specific nodes and overrides, deleting
and re-adding empty nodes for the unused BLDO3/CLDO2/CLDO3 regulators
and removing the inherited vcc-pm-supply on r_pio.

Verified by comparing compiled DTBs for all four Orange Pi H6 boards:
One Plus, Lite 2, and 3 LTS DTBs are identical, and Orange Pi 3 differs
only in inheriting the common regulator names and DCDCA's 810 mV
minimum voltage (still below the 820 mV lowest CPU OPP).

This patch and commit message were drafted by Antigravity (AI coding
assistant) based on the board schematics and user direction.

Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
 .../dts/allwinner/sun50i-h6-orangepi-3.dts    | 258 ++----------------
 1 file changed, 18 insertions(+), 240 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index ce82aa265cfd..61ca60614d85 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -1,70 +1,16 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 // Copyright (C) 2019 Ondřej Jirman <megous@megous.com>
 
-/dts-v1/;
-
-#include "sun50i-h6.dtsi"
-#include "sun50i-h6-cpu-opp.dtsi"
-#include "sun50i-h6-gpu-opp.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
+#include "sun50i-h6-orangepi.dtsi"
 
 / {
 	model = "OrangePi 3";
 	compatible = "xunlong,orangepi-3", "allwinner,sun50i-h6";
 
 	aliases {
-		serial0 = &uart0;
 		serial1 = &uart1;
 	};
 
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	connector {
-		compatible = "hdmi-connector";
-		ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
-		type = "a";
-
-		port {
-			hdmi_con_in: endpoint {
-				remote-endpoint = <&hdmi_out_con>;
-			};
-		};
-	};
-
-	ext_osc32k: ext-osc32k-clk {
-		#clock-cells = <0>;
-		compatible = "fixed-clock";
-		clock-frequency = <32768>;
-		clock-output-names = "ext_osc32k";
-	};
-
-	leds {
-		compatible = "gpio-leds";
-
-		led-0 {
-			label = "orangepi:red:power";
-			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
-			default-state = "on";
-		};
-
-		led-1 {
-			label = "orangepi:green:status";
-			gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
-		};
-	};
-
-	reg_vcc5v: vcc5v {
-		/* board wide 5V supply directly from the DC jack */
-		compatible = "regulator-fixed";
-		regulator-name = "vcc-5v";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		regulator-always-on;
-	};
-
 	reg_vcc33_wifi: vcc33-wifi {
 		/* Always on 3.3V regulator for WiFi and BT */
 		compatible = "regulator-fixed";
@@ -94,46 +40,27 @@ wifi_pwrseq: wifi-pwrseq {
 	};
 };
 
-&cpu0 {
-	cpu-supply = <&reg_dcdca>;
-};
+&axp805 {
+	regulators {
+		/delete-node/ bldo3;
+		/delete-node/ cldo2;
+		/delete-node/ cldo3;
 
-&de {
-	status = "okay";
-};
-
-&dwc3 {
-	status = "okay";
-};
-
-&ehci0 {
-	status = "okay";
-};
-
-&ehci3 {
-	status = "okay";
-};
-
-&gpu {
-	mali-supply = <&reg_dcdcc>;
-	status = "okay";
-};
+		bldo3 {
+			/* unused */
+		};
 
-&hdmi {
-	status = "okay";
-};
+		cldo2 {
+			/* unused */
+		};
 
-&hdmi_out {
-	hdmi_out_con: endpoint {
-		remote-endpoint = <&hdmi_con_in>;
+		cldo3 {
+			/* unused */
+		};
 	};
 };
 
-&mmc0 {
-	vmmc-supply = <&reg_cldo1>;
-	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
-	disable-wp;
-	bus-width = <4>;
+&dwc3 {
 	status = "okay";
 };
 
@@ -163,148 +90,12 @@ &mmc2 {
 	status = "okay";
 };
 
-&ohci0 {
-	status = "okay";
-};
-
-&ohci3 {
-	status = "okay";
-};
-
 &pio {
-	vcc-pc-supply = <&reg_bldo2>;
-	vcc-pd-supply = <&reg_cldo1>;
 	vcc-pg-supply = <&reg_vcc_wifi_io>;
 };
 
-&r_i2c {
-	status = "okay";
-
-	axp805: pmic@36 {
-		compatible = "x-powers,axp805", "x-powers,axp806";
-		reg = <0x36>;
-		interrupt-parent = <&r_intc>;
-		interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
-		interrupt-controller;
-		#interrupt-cells = <1>;
-		x-powers,self-working-mode;
-		vina-supply = <&reg_vcc5v>;
-		vinb-supply = <&reg_vcc5v>;
-		vinc-supply = <&reg_vcc5v>;
-		vind-supply = <&reg_vcc5v>;
-		vine-supply = <&reg_vcc5v>;
-		aldoin-supply = <&reg_vcc5v>;
-		bldoin-supply = <&reg_vcc5v>;
-		cldoin-supply = <&reg_vcc5v>;
-
-		regulators {
-			reg_aldo1: aldo1 {
-				regulator-always-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-name = "vcc-pl-led-ir";
-			};
-
-			reg_aldo2: aldo2 {
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-name = "vcc33-audio-tv-ephy-mac";
-			};
-
-			/* ALDO3 is shorted to CLDO1 */
-			reg_aldo3: aldo3 {
-				regulator-always-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-1";
-			};
-
-			reg_bldo1: bldo1 {
-				regulator-always-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-name = "vcc18-dram-bias-pll";
-			};
-
-			reg_bldo2: bldo2 {
-				regulator-always-on;
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-name = "vcc-efuse-pcie-hdmi-pc";
-			};
-
-			bldo3 {
-				/* unused */
-			};
-
-			bldo4 {
-				/* unused */
-			};
-
-			reg_cldo1: cldo1 {
-				regulator-always-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-2";
-			};
-
-			cldo2 {
-				/* unused */
-			};
-
-			cldo3 {
-				/* unused */
-			};
-
-			reg_dcdca: dcdca {
-				regulator-always-on;
-				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <1160000>;
-				regulator-ramp-delay = <2500>;
-				regulator-name = "vdd-cpu";
-			};
-
-			reg_dcdcc: dcdcc {
-				regulator-enable-ramp-delay = <32000>;
-				regulator-min-microvolt = <810000>;
-				regulator-max-microvolt = <1080000>;
-				regulator-ramp-delay = <2500>;
-				regulator-name = "vdd-gpu";
-			};
-
-			reg_dcdcd: dcdcd {
-				regulator-always-on;
-				regulator-min-microvolt = <960000>;
-				regulator-max-microvolt = <960000>;
-				regulator-name = "vdd-sys";
-			};
-
-			reg_dcdce: dcdce {
-				regulator-always-on;
-				regulator-min-microvolt = <1200000>;
-				regulator-max-microvolt = <1200000>;
-				regulator-name = "vcc-dram";
-			};
-
-			sw {
-				/* unused */
-			};
-		};
-	};
-};
-
-&r_ir {
-	status = "okay";
-};
-
-&rtc {
-	clocks = <&ext_osc32k>;
-};
-
-&uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_ph_pins>;
-	status = "okay";
+&r_pio {
+	/delete-property/ vcc-pm-supply;
 };
 
 /* There's the BT part of the AP6256 connected to that UART */
@@ -325,21 +116,8 @@ bluetooth {
 	};
 };
 
-&usb2otg {
-	/*
-	 * This board doesn't have a controllable VBUS even though it
-	 * does have an ID pin. Using it as anything but a USB host is
-	 * unsafe.
-	 */
-	dr_mode = "host";
-	status = "okay";
-};
-
 &usb2phy {
 	usb0_id_det-gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */
-	usb0_vbus-supply = <&reg_vcc5v>;
-	usb3_vbus-supply = <&reg_vcc5v>;
-	status = "okay";
 };
 
 &usb3phy {
-- 
2.47.3



  reply	other threads:[~2026-12-04 17:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 17:12 [PATCH 0/9] arm64: dts: allwinner: h6: orangepi: Common dtsi cleanups Chen-Yu Tsai
2026-12-04 17:12 ` Chen-Yu Tsai [this message]
2026-12-04 17:12 ` [PATCH 2/9] arm64: dts: allwinner: h6: orangepi: Move CLDO2/CLDO3 to Lite 2 Chen-Yu Tsai
2026-12-04 17:12 ` [PATCH 3/9] arm64: dts: allwinner: h6: orangepi: Fix VCC-PG supply in common dtsi Chen-Yu Tsai
2026-12-04 17:12 ` [PATCH 4/9] arm64: dts: allwinner: h6: orangepi: Move HDMI hvcc-supply to " Chen-Yu Tsai
2026-12-04 17:12 ` [PATCH 5/9] arm64: dts: allwinner: h6: orangepi: Move LED pinctrl " Chen-Yu Tsai
2026-12-04 17:12 ` [PATCH 6/9] arm64: dts: allwinner: h6: orangepi: Add cpu-supply to all CPU cores Chen-Yu Tsai
2026-12-04 17:12 ` [PATCH 7/9] arm64: dts: allwinner: h6: orangepi: Drop unused usb0_id_det-gpios Chen-Yu Tsai
2026-12-04 17:12 ` [PATCH 8/9] arm64: dts: allwinner: h6: orangepi: Drop board model and compatible from dtsi Chen-Yu Tsai
2026-12-04 17:12 ` [PATCH 9/9] arm64: dts: allwinner: h6: orangepi: Move ALDO3 to Orange Pi 3 and 3 LTS Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204171319.745792-2-wens@kernel.org \
    --to=wens@kernel.org \
    --cc=andre.przywara@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=filipescu.cristian@gmail.com \
    --cc=jagan@edgeble.ai \
    --cc=jernej@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=megi@xff.cz \
    --cc=peron.clem@gmail.com \
    --cc=samuel@sholland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox