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 1F7DA606A33A for ; Thu, 3 Dec 2026 09:04:33 +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=Mao+vRZX; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=U1eNz7be DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Cc:To:In-Reply-To:References:Message-Id: Content-Type:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=PGqNHR1C++iP4GJrDUUQ7+PkU7022B03rCMIBKy+kVg=; b=Mao+vRZXzs6PItlRQTAlavt9E5 kuf+DvKbuAckJVmJHgzc9RH2WhC2F5/pcKmb2q1QGYb88XhwtYi0FlUArf40K6JoRSxmtdROMwQq3 oYDls9DVurEtpjMTBkF90A8FwR+RWf5ou1t6AD1oXvPTAtEVCfop5S65qXOgbzcmDPGmmrZf0d12S vk94MJ8CIJwF+YuzqeXgfWsm4795ULaAt4bmbY6YRUNlenc1zSCjHJ54CdKGAs3vdFrD7FTU+wv/4 TFm5Dho//9tryOHl5OHQYQse5ALGNsk2YWoaPkmRB+2622hthCyjnlYsvwYbNXWqlM5JhZgq/1z0o BgYmdE4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2jk-0000000Dw0P-2cbN; Thu, 03 Dec 2026 09:04:20 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2jj-0000000Dvzt-1n5F for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 09:04:19 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 1369D453C3; Thu, 3 Dec 2026 09:04:19 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796288659; b=HU/tjQFb4u87EkMRqjfzSZXsyam433bI6Nr1VbkEk8NQwYKj0vnfSHVA6v5U4EOfHU2P 9wcPxDVQ22NZes3qmF7kiwX7M+OOIffQd+mm85NthiEPMuof+ND4AY+kVSlz+iHbUY3vC O2o7VYRhfCKFhmYsRgl5P2VDA04WkBBKf/kbf7+KU70BxTUVLOqmh3WmCSGjpZT09ELGA OnwalnswJoFIyHYTehbLwwRmzsnCaiMK3db7Qw2SrwLygpx4MoJfylNdC54Y87eycK7c5 FIxTuowMei9CD5MiKZUQFOOW9YReN3vcpLK/wwpk+e43Kp190b2/pl6+EacHSN1jXMA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796288659; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=PGqNHR1C++iP4GJrDUUQ7+PkU7022B03rCMIBKy+kVg=; b=EXK1jNxygNrUu/u2i/wT9vqGZeseFsDbuUlAsZVmxgIW1mD2IgXUaAU61k8YiafDo7tP zVGpxKcjoe1tCs/yneyZRiPjy45OZdCv53C/ViVLb6bYK84sQJDCTFA5G/N3Iq7KKEIZr LcgwVFQgA7O1H4XQjyN6DulYObfrQmwB1heVRsM3xn02zeNPVpaVUsNpPFlx1RtXv+c67 y5oUHlR4tnANwekxsEzEeZFQ/OSLwEq46xQm6vxbj8F784uT4NYZxcir2V4IuYfShicEZ owBFlgNdsJC5AZFFF8BBsBN4UletvC1Di5rPc0++3EjuCiSKDerY4U4wiCbBW6j6AaQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id 8605F1F0089A; Thu, 3 Dec 2026 09:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796288658; bh=PGqNHR1C++iP4GJrDUUQ7+PkU7022B03rCMIBKy+kVg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=U1eNz7be+F44zest7KDCkPriHGPKmxJK//OMZDlsbQg+eE2Wpj8+0kZFvEgdc0T+K VOWYd5k3zgFUWeDx9VhElDZtr4i+rdHysiaKr0rl2Xof6s1JsBR9KH14TfnW/gjQiB 49ZgTxnCQ+Oa/VKaI3NVtQVciq+KQxkg+tn8RErp0yR2Y0p33or83FrXJy8islblgb jhb8tvxOfAvNb0H+6n4o6ggRqs5DWG+2D5ob8FIGGcr2DecnkpagxDvjLqwMBNd34l d87uXT6xT4CwU0YaScM/wfAJOb+12/cQxWh499TLo2/7k4VcjYCvfMvkjBAz46B1eA X0xgRhN5pbuhA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 10DAA4F89F; Thu, 3 Dec 2026 09:04:17 +0000 (UTC) From: Ivan Pfarher via B4 Relay Date: Thu, 03 Dec 2026 10:04:17 +0100 Subject: [PATCH v2 3/4] ARM: dts: allwinner: orangepi-zero-plus2: Share common board parts X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261203-orangepi-zero-plus2-fixes-v2-3-286df6b782f4@gmail.com> References: <20261203-orangepi-zero-plus2-fixes-v2-0-286df6b782f4@gmail.com> In-Reply-To: <20261203-orangepi-zero-plus2-fixes-v2-0-286df6b782f4@gmail.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Ivan Pfarher X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796288655; l=10179; i=ipfarher@gmail.com; s=20261120; h=from:subject:message-id; bh=vKIngS4deCF4DtnekUXrLJc/hTkhmv/q+ri3BzPs8qI=; b=bs7NyHYEV759xhzFXNb+bUHfk4kvfEcQOJtKOoQui5b5/oZVKv6U/XAGiFP9MkXZe5QKaPS9v S7mmNLU4rgDBeF8Osaw4+yZfMbHnv3sA3q0UuhnidluUt2I3JozQ+oA X-Developer-Key: i=ipfarher@gmail.com; a=ed25519; pk=3DMYyz/xl+KRAx2TNGJpheG+5QUm7lqHhKXFqVu2TmY= X-Endpoint-Received: by B4 Relay for ipfarher@gmail.com/20261120 with auth_id=1582 X-Original-From: Ivan Pfarher Content-Transfer-Encoding: 7bit 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: , Reply-To: ipfarher@gmail.com Sender: "linux-arm-kernel" X-Spam-Status: No, score=-18.9 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_GIT 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 From: Ivan Pfarher The H3 and H5 versions of the Orange Pi Zero Plus2 are the same board; H3 and H5 are pin compatible, so only the SoC differs. Move the common parts to sunxi-orangepi-zero-plus2.dtsi and include it from both board files, as done for the Bananapi M2 Plus and the Libre Computer ALL-H3-CC. The H3 board file keeps the audio routing, the H5 board file keeps disable-wp for the microSD slot and UART1, which only it enables. No functional change: the H3 DTB is byte-identical, and the H5 DTB has the same nodes and properties (decompiled with dtc -s, the output is identical). The patch was drafted with an AI coding assistant (Claude by Anthropic) after review feedback that the two boards should share a .dtsi; the submitter reviewed it. Signed-off-by: Ivan Pfarher --- .../dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts | 122 +------------------- .../dts/allwinner/sunxi-orangepi-zero-plus2.dtsi | 126 +++++++++++++++++++++ .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 119 +------------------ 3 files changed, 128 insertions(+), 239 deletions(-) diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts index 0ca7d8a9d..91ec10998 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts +++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts @@ -44,62 +44,11 @@ /dts-v1/; #include "sun8i-h3.dtsi" - -#include -#include +#include "sunxi-orangepi-zero-plus2.dtsi" / { model = "OrangePi Zero Plus2 H3"; compatible = "xunlong,orangepi-zero-plus2-h3", "allwinner,sun8i-h3"; - - aliases { - serial0 = &uart0; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - - connector { - compatible = "hdmi-connector"; - type = "a"; - - port { - hdmi_con_in: endpoint { - remote-endpoint = <&hdmi_out_con>; - }; - }; - }; - - leds { - compatible = "gpio-leds"; - - led-0 { - label = "orangepi:green:pwr"; - gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; - default-state = "on"; - }; - - led-1 { - label = "orangepi:red:status"; - gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; - }; - }; - - reg_vcc3v3: vcc3v3 { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - wifi_pwrseq: pwrseq { - compatible = "mmc-pwrseq-simple"; - clocks = <&rtc CLK_OSC32K_FANOUT>; - clock-names = "ext_clock"; - reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ - post-power-on-delay-ms = <200>; - }; }; /* @@ -115,72 +64,3 @@ "Mic", "MBIAS"; status = "disabled"; }; - -&de { - status = "okay"; -}; - -&hdmi { - status = "okay"; -}; - -&hdmi_out { - hdmi_out_con: endpoint { - remote-endpoint = <&hdmi_con_in>; - }; -}; - -&mmc0 { - vmmc-supply = <®_vcc3v3>; - bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; - status = "okay"; -}; - -&mmc1 { - vmmc-supply = <®_vcc3v3>; - vqmmc-supply = <®_vcc3v3>; - mmc-pwrseq = <&wifi_pwrseq>; - bus-width = <4>; - non-removable; - status = "okay"; - - brcmf: wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - interrupt-parent = <&r_pio>; - interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ - interrupt-names = "host-wake"; - }; -}; - -&mmc2 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc2_8bit_pins>; - vmmc-supply = <®_vcc3v3>; - bus-width = <8>; - non-removable; - cap-mmc-hw-reset; - status = "okay"; -}; - -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pa_pins>; - status = "okay"; -}; - -&usb_otg { - /* - * According to schematics CN1 MicroUSB port can be used to take - * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB - * port cannot provide power externally even if the board is powered - * via GPIO pins. It thus makes sense to force peripheral mode. - */ - dr_mode = "peripheral"; - status = "okay"; -}; - -&usbphy { - status = "okay"; -}; diff --git a/arch/arm/boot/dts/allwinner/sunxi-orangepi-zero-plus2.dtsi b/arch/arm/boot/dts/allwinner/sunxi-orangepi-zero-plus2.dtsi new file mode 100644 index 000000000..763aaffaf --- /dev/null +++ b/arch/arm/boot/dts/allwinner/sunxi-orangepi-zero-plus2.dtsi @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (C) 2017 Jagan Teki +// Copyright (C) 2018 Diego Rondini + +#include +#include + +/ { + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + connector { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + label = "orangepi:green:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + led-1 { + label = "orangepi:red:status"; + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; + }; + }; + + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + wifi_pwrseq: pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rtc CLK_OSC32K_FANOUT>; + clock-names = "ext_clock"; + reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ + post-power-on-delay-ms = <200>; + }; +}; + +&de { + status = "okay"; +}; + +&hdmi { + status = "okay"; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + +&mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&mmc1 { + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>; + interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ + interrupt-names = "host-wake"; + }; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pa_pins>; + status = "okay"; +}; + +&usb_otg { + /* + * According to schematics CN1 MicroUSB port can be used to take + * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB + * port cannot provide power externally even if the board is powered + * via GPIO pins. It thus makes sense to force peripheral mode. + */ + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts index acef0e242..10463ee6c 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts @@ -4,117 +4,15 @@ /dts-v1/; #include "sun50i-h5.dtsi" - -#include -#include +#include / { model = "OrangePi Zero Plus2"; compatible = "xunlong,orangepi-zero-plus2", "allwinner,sun50i-h5"; - - aliases { - serial0 = &uart0; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - - connector { - compatible = "hdmi-connector"; - type = "a"; - - port { - hdmi_con_in: endpoint { - remote-endpoint = <&hdmi_out_con>; - }; - }; - }; - - leds { - compatible = "gpio-leds"; - - led-0 { - label = "orangepi:green:pwr"; - gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; - default-state = "on"; - }; - - led-1 { - label = "orangepi:red:status"; - gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; - }; - }; - - reg_vcc3v3: vcc3v3 { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - wifi_pwrseq: pwrseq { - compatible = "mmc-pwrseq-simple"; - clocks = <&rtc CLK_OSC32K_FANOUT>; - clock-names = "ext_clock"; - reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ - post-power-on-delay-ms = <200>; - }; -}; - -&de { - status = "okay"; -}; - -&hdmi { - status = "okay"; -}; - -&hdmi_out { - hdmi_out_con: endpoint { - remote-endpoint = <&hdmi_con_in>; - }; }; &mmc0 { - vmmc-supply = <®_vcc3v3>; disable-wp; - bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; - status = "okay"; -}; - -&mmc1 { - vmmc-supply = <®_vcc3v3>; - vqmmc-supply = <®_vcc3v3>; - mmc-pwrseq = <&wifi_pwrseq>; - bus-width = <4>; - non-removable; - status = "okay"; - - brcmf: wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - interrupt-parent = <&r_pio>; - interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ - interrupt-names = "host-wake"; - }; -}; - -&mmc2 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc2_8bit_pins>; - vmmc-supply = <®_vcc3v3>; - bus-width = <8>; - non-removable; - cap-mmc-hw-reset; - status = "okay"; -}; - -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pa_pins>; - status = "okay"; }; &uart1 { @@ -122,18 +20,3 @@ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; status = "okay"; }; - -&usb_otg { - /* - * According to schematics CN1 MicroUSB port can be used to take - * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB - * port cannot provide power externally even if the board is powered - * via GPIO pins. It thus makes sense to force peripheral mode. - */ - dr_mode = "peripheral"; - status = "okay"; -}; - -&usbphy { - status = "okay"; -}; -- 2.43.0