From: Jernej Skrabec <[email protected]> The Orange Pi 3 LTS is an Allwinner H6 board with 2 GiB LPDDR3, 8 GiB eMMC and a Motorcomm YT8531C Gigabit Ethernet PHY. Its Ethernet power, reset and wireless module wiring differ from the Orange Pi 3.
Import the device tree submitted for Linux in the linked patch. Keep it in the local U-Boot DTS directory until the board is available through dts/upstream, and include the current upstream H6 SoC and OPP descriptions. Incorporate the clock naming, supply chaining and BLDO3 always-on fixes requested during Linux review. Describe the PM bank supply and the DCDCA/DCDCB polyphase arrangement. Program both RGMII delays in the PHY with the MAC delays disabled, as proposed during the Ethernet review. Use green PL7 as the power LED and red PL4 as the status LED. Keep the red status LED on during Linux startup and provide a U-Boot-only override that lights green and leaves red off in the bootloader. Link: https://lore.kernel.org/linux-sunxi/[email protected]/ Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Cristian Filipescu <[email protected]> --- arch/arm/dts/Makefile | 1 + arch/arm/dts/sun50i-h6-orangepi-3-lts-u-boot.dtsi | 11 + arch/arm/dts/sun50i-h6-orangepi-3-lts.dts | 362 ++++++++++++++++++++++ board/sunxi/MAINTAINERS | 6 + 4 files changed, 380 insertions(+) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 099e3f08..248b4faf 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -634,6 +634,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \ dtb-$(CONFIG_MACH_SUN50I_H6) += \ sun50i-h6-beelink-gs1.dtb \ sun50i-h6-orangepi-3.dtb \ + sun50i-h6-orangepi-3-lts.dtb \ sun50i-h6-orangepi-lite2.dtb \ sun50i-h6-orangepi-one-plus.dtb \ sun50i-h6-pine-h64.dtb \ diff --git a/arch/arm/dts/sun50i-h6-orangepi-3-lts-u-boot.dtsi b/arch/arm/dts/sun50i-h6-orangepi-3-lts-u-boot.dtsi new file mode 100644 index 00000000..5d37f8fd --- /dev/null +++ b/arch/arm/dts/sun50i-h6-orangepi-3-lts-u-boot.dtsi @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +#include "sunxi-u-boot.dtsi" + +&{/leds/led-0} { + default-state = "off"; +}; + +&{/leds/led-1} { + default-state = "on"; +}; diff --git a/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts b/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts new file mode 100644 index 00000000..3460b216 --- /dev/null +++ b/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts @@ -0,0 +1,362 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (C) 2025 Jernej Skrabec <[email protected]> +// Based on sun50i-h6-orangepi-3.dts, which is: +// Copyright (C) 2019 OndÅ™ej Jirman <[email protected]> + +/dts-v1/; + +#include <arm64/allwinner/sun50i-h6.dtsi> +#include <arm64/allwinner/sun50i-h6-cpu-opp.dtsi> +#include <arm64/allwinner/sun50i-h6-gpu-opp.dtsi> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/leds/common.h> + +/ { + model = "OrangePi 3 LTS"; + compatible = "xunlong,orangepi-3-lts", "allwinner,sun50i-h6"; + + aliases { + ethernet0 = &emac; + ethernet1 = &aw859a; + serial0 = &uart0; + }; + + 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 { + function = LED_FUNCTION_STATUS; + color = <LED_COLOR_ID_RED>; + gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ + default-state = "on"; + }; + + led-1 { + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; + gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ + default-state = "off"; + }; + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "gmac-3v3"; + vin-supply = <®_vcc5v>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <150000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ + }; + + 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_wifi_3v3: wifi-3v3 { + /* 3.3V regulator for WiFi and BT */ + compatible = "regulator-fixed"; + regulator-name = "wifi-3v3"; + vin-supply = <®_vcc5v>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + gpio = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rtc CLK_OSC32K_FANOUT>; + clock-names = "ext_clock"; + reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */ + post-power-on-delay-ms = <200>; + }; +}; + +&cpu0 { + cpu-supply = <®_dcdca>; +}; + +&de { + status = "okay"; +}; + +&dwc3 { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&ext_rgmii_pins>; + phy-mode = "rgmii-id"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_gmac_3v3>; + allwinner,rx-delay-ps = <0>; + allwinner,tx-delay-ps = <0>; + status = "okay"; +}; + +&gpu { + mali-supply = <®_dcdcc>; + status = "okay"; +}; + +&hdmi { + hvcc-supply = <®_bldo2>; + status = "okay"; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + + motorcomm,clk-out-frequency-hz = <125000000>; + rx-internal-delay-ps = <1950>; + tx-internal-delay-ps = <1950>; + + reset-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */ + reset-assert-us = <15000>; + reset-deassert-us = <100000>; + }; +}; + +&mmc0 { + vmmc-supply = <®_cldo1>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + disable-wp; + bus-width = <4>; + status = "okay"; +}; + +&mmc1 { + vmmc-supply = <®_wifi_3v3>; + vqmmc-supply = <®_bldo3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + aw859a: wifi@1 { + reg = <1>; + }; +}; + +&mmc2 { + vmmc-supply = <®_cldo1>; + vqmmc-supply = <®_bldo2>; + cap-mmc-hw-reset; + non-removable; + bus-width = <8>; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci3 { + status = "okay"; +}; + +&pio { + vcc-pc-supply = <®_bldo2>; + vcc-pd-supply = <®_cldo1>; + vcc-pg-supply = <®_bldo3>; +}; + +&r_ir { + status = "okay"; +}; + +&r_pio { + vcc-pm-supply = <®_bldo3>; +}; + +&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 = <®_vcc5v>; + vinb-supply = <®_vcc5v>; + vinc-supply = <®_vcc5v>; + vind-supply = <®_vcc5v>; + vine-supply = <®_vcc5v>; + aldoin-supply = <®_vcc5v>; + bldoin-supply = <®_vcc5v>; + cldoin-supply = <®_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-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-efuse-pcie-hdmi-pc"; + }; + + reg_bldo3: bldo3 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-pm-pg-dcxoio-wifi"; + }; + + 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 */ + }; + + /* DCDCB is polyphased with DCDCA. */ + 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 */ + }; + }; + }; +}; + +&rtc { + clocks = <&ext_osc32k>; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_ph_pins>; + status = "okay"; +}; + +&usb2otg { + dr_mode = "host"; + status = "okay"; +}; + +&usb2phy { + usb0_id_det-gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */ + usb0_vbus-supply = <®_vcc5v>; + usb3_vbus-supply = <®_vcc5v>; + status = "okay"; +}; + +&usb3phy { + status = "okay"; +}; diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS index df745f14..e84219e2 100644 --- a/board/sunxi/MAINTAINERS +++ b/board/sunxi/MAINTAINERS @@ -438,6 +438,12 @@ M: Andre Heider <[email protected]> S: Maintained F: configs/orangepi_3_defconfig +ORANGEPI 3 LTS BOARD +M: Cristian Filipescu <[email protected]> +S: Maintained +F: arch/arm/dts/sun50i-h6-orangepi-3-lts.dts +F: arch/arm/dts/sun50i-h6-orangepi-3-lts-u-boot.dtsi + ORANGEPI 4A BOARD M: Chen-Yu Tsai <[email protected]> S: Maintained -- 2.47.3
