diff --git a/patch/kernel/archive/sunxi-6.10/patches.armbian/arm64-dts-sun50i-h618-orangepi-zero2w-Add-missing-nodes.patch b/patch/kernel/archive/sunxi-6.10/patches.armbian/arm64-dts-sun50i-h618-orangepi-zero2w-Add-missing-nodes.patch index 3f70b7c3e2e3..2cf9ab7c8288 100644 --- a/patch/kernel/archive/sunxi-6.10/patches.armbian/arm64-dts-sun50i-h618-orangepi-zero2w-Add-missing-nodes.patch +++ b/patch/kernel/archive/sunxi-6.10/patches.armbian/arm64-dts-sun50i-h618-orangepi-zero2w-Add-missing-nodes.patch @@ -1,22 +1,17 @@ -From cf469142557d0f61d91a7732ce4b639760379745 Mon Sep 17 00:00:00 2001 -From: The-going <48602507+The-going@users.noreply.github.com> -Date: Thu, 22 Aug 2024 15:54:39 +0300 -Subject: arm64: dts: sun50i-h618-orangepi-zero2w: Add missing nodes - -The missing nodes were taken from the file: -https://github.com/armbian/build/blob/27b7f33b9c1669e4f24e03313b6c242170347e94/patch/kernel/archive/sunxi-6.7/patches.armbian/arm64-dts-sun50i-h618-orangepi-zero2w-add-dtb.patch#L1 - -This has not been tested on a working device. +From bacdb9da06bb291ced710b2fe1f702711f97ec9e Mon Sep 17 00:00:00 2001 +From: chraac +Date: Fri, 15 Mar 2024 12:30:26 +0800 +Subject: [PATCH] orangepi-zero2w add dtb --- - .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 25 +- - .../allwinner/sun50i-h618-orangepi-zero2w.dts | 369 +++++++++++++++++- - 2 files changed, 385 insertions(+), 9 deletions(-) + .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 30 +- + .../allwinner/sun50i-h618-orangepi-zero2w.dts | 628 ++++++++++++++++-- + 2 files changed, 586 insertions(+), 67 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi -index 1448fad0793a..f84eea66655e 100644 +index 1bf71a0a0202..cccdcb55eecd 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi -@@ -193,7 +193,7 @@ video-codec@1c0e000 { +@@ -197,7 +197,7 @@ video-codec@1c0e000 { syscon: syscon@3000000 { compatible = "allwinner,sun50i-h616-system-control"; @@ -25,7 +20,7 @@ index 1448fad0793a..f84eea66655e 100644 #address-cells = <1>; #size-cells = <1>; ranges; -@@ -748,19 +748,28 @@ ths: thermal-sensor@5070400 { +@@ -770,19 +770,28 @@ ths: thermal-sensor@5070400 { }; emac1: ethernet@5030000 { @@ -34,7 +29,7 @@ index 1448fad0793a..f84eea66655e 100644 - reg = <0x05030000 0x10000>; + compatible = "allwinner,sunxi-gmac"; + reg = <0x05030000 0x10000>, -+ <0x03000034 0x4>; ++ <0x03000034 0x4>; + reg-names = "gmac1_reg","ephy_reg"; interrupts = ; - interrupt-names = "macirq"; @@ -62,10 +57,10 @@ index 1448fad0793a..f84eea66655e 100644 #size-cells = <0>; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts -index 6a4f0da97233..17b315f071d9 100644 +index 6a4f0da97233..bdfc3a1af689 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts -@@ -7,6 +7,7 @@ +@@ -7,10 +7,15 @@ #include "sun50i-h616.dtsi" #include "sun50i-h616-cpu-opp.dtsi" @@ -73,7 +68,15 @@ index 6a4f0da97233..17b315f071d9 100644 #include #include -@@ -18,19 +19,48 @@ / { + #include ++#include ++#include ++#include ++ + + / { + model = "OrangePi Zero 2W"; +@@ -18,19 +23,48 @@ / { aliases { serial0 = &uart0; @@ -122,11 +125,14 @@ index 6a4f0da97233..17b315f071d9 100644 }; }; -@@ -52,26 +82,192 @@ reg_vcc3v3: vcc3v3 { +@@ -52,91 +86,377 @@ reg_vcc3v3: vcc3v3 { vin-supply = <®_vcc5v>; regulator-always-on; }; -+ +-}; + +-&cpu0 { +- cpu-supply = <®_dcdc2>; + reg_vcc_wifi_io: vcc-wifi-io { + /* Always on 1.8V/300mA regulator for WiFi and BT IO */ + compatible = "regulator-fixed"; @@ -203,71 +209,226 @@ index 6a4f0da97233..17b315f071d9 100644 + clk_bypass_output = <0x1>; + status = "okay"; + }; -+ }; - }; - - &cpu0 { - cpu-supply = <®_dcdc2>; - }; - -+&sid { -+ ephy_calibration: ephy-calibration@2c { -+ reg = <0x2c 0x2>; -+ }; -+}; + -+&de { -+ status = "okay"; -+}; ++ bus@1000000 { ++ compatible = "allwinner,sun50i-h616-de33", ++ "allwinner,sun50i-a64-de2"; ++ reg = <0x1000000 0x400000>; ++ allwinner,sram = <&de3_sram 1>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges = <0 0x1000000 0x400000>; ++ ++ display_clocks: clock@8000 { ++ compatible = "allwinner,sun50i-h616-de33-clk"; ++ reg = <0x8000 0x100>; ++ clocks = <&ccu CLK_DE>, <&ccu CLK_BUS_DE>; ++ clock-names = "mod", "bus"; ++ resets = <&ccu RST_BUS_DE>; ++ #clock-cells = <1>; ++ #reset-cells = <1>; ++ }; + -+&hdmi { -+ status = "okay"; -+}; ++ mixer0: mixer@100000 { ++ compatible = "allwinner,sun50i-h616-de33-mixer-0"; ++ reg = <0x100000 0x100000>, ++ <0x8100 0x40>, ++ <0x280000 0x20000>; ++ clocks = <&display_clocks CLK_BUS_MIXER0>, ++ <&display_clocks CLK_MIXER0>; ++ clock-names = "bus", "mod"; ++ resets = <&display_clocks RST_MIXER0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ mixer0_out: port@1 { ++ reg = <1>; ++ ++ mixer0_out_tcon_top_mixer0: endpoint { ++ remote-endpoint = <&tcon_top_mixer0_in_mixer0>; ++ }; ++ }; ++ }; ++ }; ++ }; + -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; ++ hdmi: hdmi@6000000 { ++ #sound-dai-cells = <0>; ++ compatible = "allwinner,sun50i-h616-dw-hdmi", ++ "allwinner,sun50i-h6-dw-hdmi"; ++ reg = <0x06000000 0x10000>; ++ reg-io-width = <1>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>, ++ <&ccu CLK_HDMI>, <&ccu CLK_HDMI_CEC>, ++ <&ccu CLK_HDCP>, <&ccu CLK_BUS_HDCP>; ++ clock-names = "iahb", "isfr", "tmds", "cec", "hdcp", ++ "hdcp-bus"; ++ resets = <&ccu RST_BUS_HDMI>, <&ccu RST_BUS_HDCP>; ++ reset-names = "ctrl", "hdcp"; ++ phys = <&hdmi_phy>; ++ phy-names = "phy"; ++ status = "okay"; + -+&gpu { -+ mali-supply = <®_dcdc1>; -+ status = "disabled"; -+}; ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; + -+&ehci0 { -+ status = "disabled"; -+}; ++ hdmi_in: port@0 { ++ reg = <0>; + - &ehci1 { - status = "okay"; - }; - -+&ehci2 { -+ status = "okay"; -+}; ++ hdmi_in_tcon_top: endpoint { ++ remote-endpoint = <&tcon_top_hdmi_out_hdmi>; ++ }; ++ }; + -+&ehci3 { -+ status = "okay"; -+}; ++ hdmi_out: port@1 { ++ reg = <1>; ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++ }; ++ }; ++ }; + -+&ohci0 { -+ status = "disabled"; -+}; ++ hdmi_phy: hdmi-phy@6010000 { ++ compatible = "allwinner,sun50i-h616-hdmi-phy"; ++ reg = <0x06010000 0x10000>; ++ clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>; ++ clock-names = "bus", "mod"; ++ resets = <&ccu RST_BUS_HDMI_SUB>; ++ reset-names = "phy"; ++ #phy-cells = <0>; ++ }; + -+&ohci1 { -+ status = "okay"; -+}; ++ tcon_top: tcon-top@6510000 { ++ compatible = "allwinner,sun50i-h6-tcon-top"; ++ reg = <0x06510000 0x1000>; ++ clocks = <&ccu CLK_BUS_TCON_TOP>, ++ <&ccu CLK_TCON_TV0>; ++ clock-names = "bus", ++ "tcon-tv0"; ++ clock-output-names = "tcon-top-tv0"; ++ resets = <&ccu RST_BUS_TCON_TOP>; ++ #clock-cells = <1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ tcon_top_mixer0_in: port@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ tcon_top_mixer0_in_mixer0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&mixer0_out_tcon_top_mixer0>; ++ }; ++ }; ++ ++ tcon_top_mixer0_out: port@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ tcon_top_mixer0_out_tcon_tv: endpoint@2 { ++ reg = <2>; ++ remote-endpoint = <&tcon_tv_in_tcon_top_mixer0>; ++ }; ++ }; ++ ++ tcon_top_hdmi_in: port@4 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <4>; ++ ++ tcon_top_hdmi_in_tcon_tv: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&tcon_tv_out_tcon_top>; ++ }; ++ }; ++ ++ tcon_top_hdmi_out: port@5 { ++ reg = <5>; ++ ++ tcon_top_hdmi_out_hdmi: endpoint { ++ remote-endpoint = <&hdmi_in_tcon_top>; ++ }; ++ }; ++ }; ++ }; + -+&ohci2 { -+ status = "okay"; -+}; ++ tcon_tv: lcd-controller@6515000 { ++ compatible = "allwinner,sun50i-h6-tcon-tv", ++ "allwinner,sun8i-r40-tcon-tv"; ++ reg = <0x06515000 0x1000>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_TCON_TV0>, ++ <&tcon_top CLK_TCON_TOP_TV0>; ++ clock-names = "ahb", ++ "tcon-ch1"; ++ resets = <&ccu RST_BUS_TCON_TV0>; ++ reset-names = "lcd"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ tcon_tv_in: port@0 { ++ reg = <0>; ++ ++ tcon_tv_in_tcon_top_mixer0: endpoint { ++ remote-endpoint = <&tcon_top_mixer0_out_tcon_tv>; ++ }; ++ }; ++ ++ tcon_tv_out: port@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ tcon_tv_out_tcon_top: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&tcon_top_hdmi_in_tcon_tv>; ++ }; ++ }; ++ }; ++ }; ++ ++ addr_mgt: addr-mgt { ++ compatible = "allwinner,sunxi-addr_mgt"; ++ type_addr_wifi = <0x2>; ++ type_addr_bt = <0x2>; ++ type_addr_eth = <0x2>; ++ status = "okay"; ++ }; ++ }; + -+&ohci3 { -+ status = "okay"; ++ de: display-engine { ++ compatible = "allwinner,sun50i-h6-display-engine"; ++ allwinner,pipelines = <&mixer0>; ++ status = "okay"; ++ }; + }; + +-&ehci1 { +- status = "okay"; ++&gpu { ++ mali-supply = <®_dcdc1>; ++ status = "disabled"; + }; + +-/* USB 2 & 3 are on the FPC connector (or the exansion board) */ ++&sram_c { ++ de3_sram: sram-section@0 { ++ compatible = "allwinner,sun50i-h616-sram-c", ++ "allwinner,sun50i-a64-sram-c"; ++ reg = <0x0000 0x1e000>; ++ }; +}; -+ - /* USB 2 & 3 are on the FPC connector (or the exansion board) */ &mmc0 { cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ @@ -300,26 +461,223 @@ index 6a4f0da97233..17b315f071d9 100644 + phy-supply = <®_dldo1>; + allwinner,rx-delay-ps = <3100>; + allwinner,tx-delay-ps = <700>; -+ status = "okay"; -+}; -+ + status = "okay"; + }; + +-&pio { +- vcc-pc-supply = <®_dldo1>; +- vcc-pf-supply = <®_dldo1>; /* internally via VCC-IO */ +- vcc-pg-supply = <®_aldo1>; +- vcc-ph-supply = <®_dldo1>; /* internally via VCC-IO */ +- vcc-pi-supply = <®_dldo1>; +&mdio1 { + rmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; + }; + +-&r_i2c { ++&ehci0 { ++ status = "disabled"; +}; + ++&ehci1 { + status = "okay"; ++}; + +- axp313: pmic@36 { +- compatible = "x-powers,axp313a"; +- reg = <0x36>; +- #interrupt-cells = <1>; +- interrupt-controller; +- interrupt-parent = <&pio>; +- interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */ ++&ehci2 { ++ status = "okay"; ++}; + +- vin1-supply = <®_vcc5v>; +- vin2-supply = <®_vcc5v>; +- vin3-supply = <®_vcc5v>; ++&ehci3 { ++ status = "okay"; ++}; + +- regulators { +- /* Supplies VCC-PLL and DRAM */ +- reg_aldo1: aldo1 { +- regulator-always-on; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <1800000>; +- regulator-name = "vcc1v8"; +- }; ++&ohci0 { ++ status = "disabled"; ++}; + +- /* Supplies VCC-IO, so needs to be always on. */ +- reg_dldo1: dldo1 { +- regulator-always-on; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- regulator-name = "vcc3v3"; +- }; ++&ohci1 { ++ status = "okay"; ++}; + +- reg_dcdc1: dcdc1 { +- regulator-always-on; +- regulator-min-microvolt = <810000>; +- regulator-max-microvolt = <990000>; +- regulator-name = "vdd-gpu-sys"; +- }; ++&ohci2 { ++ status = "okay"; ++}; + +- reg_dcdc2: dcdc2 { +- regulator-always-on; +- regulator-min-microvolt = <810000>; +- regulator-max-microvolt = <1100000>; +- regulator-name = "vdd-cpu"; +- }; ++&ohci3 { ++ status = "okay"; ++}; + +- reg_dcdc3: dcdc3 { +- regulator-always-on; +- regulator-min-microvolt = <1100000>; +- regulator-max-microvolt = <1100000>; +- regulator-name = "vdd-dram"; +- }; +- }; +- }; +&ir { + pinctrl-names = "default"; + pinctrl-0 = <&ir_rx_pin>; ++ status = "okay"; + }; + + &spi0 { +@@ -153,12 +473,77 @@ flash@0 { + }; + }; + ++&spi1 { ++ status = "disabled"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi1_pins>, <&spi1_cs1_pin>; ++ ++ spidev@1 { ++ compatible = "rohm,dh2228fv"; ++ status = "disabled"; ++ reg = <1>; ++ spi-max-frequency = <1000000>; ++ }; ++}; ++ + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_ph_pins>; status = "okay"; }; -@@ -81,6 +277,96 @@ &pio { - vcc-pg-supply = <®_aldo1>; - vcc-ph-supply = <®_dldo1>; /* internally via VCC-IO */ - vcc-pi-supply = <®_dldo1>; ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart2_pi_pins>; ++ status = "disabled"; ++}; ++ ++&uart3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart3_pi_pins>; ++ status = "disabled"; ++}; ++ ++&uart4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart4_pi_pins>; ++ status = "disabled"; ++}; ++ ++&uart5 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart5_ph_pins>; ++ status = "disabled"; ++}; ++ ++&i2c3 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c3_pa_pins>; ++ ++ ac200_x: mfd@10 { ++ compatible = "x-powers,ac200-sunxi"; ++ reg = <0x10>; ++ clocks = <&ac200_pwm_clk>; ++ // ephy id ++ nvmem-cells = <&ephy_calibration>; ++ nvmem-cell-names = "calibration"; ++ ++ ac200_ephy: phy { ++ compatible = "x-powers,ac200-ephy-sunxi"; ++ status = "okay"; ++ }; ++ }; ++}; ++ ++&i2c4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c4_ph_pins>; ++ status = "disabled"; ++}; ++ + &usbotg { + /* + * PHY0 pins are connected to a USB-C socket, but a role switch +@@ -179,3 +564,128 @@ &usbphy { + usb1_vbus-supply = <®_vcc5v>; + status = "okay"; + }; ++ ++&cpu0 { ++ cpu-supply = <®_dcdc2>; ++ status = "okay"; ++}; ++ ++&sid { ++ ephy_calibration: ephy-calibration@2c { ++ reg = <0x2c 0x2>; ++ }; ++}; ++ ++&cpu_critical { ++ temperature = <100000>; ++}; ++ ++&gpu_temp_critical { ++ temperature = <100000>; ++}; ++ ++&ve_temp_critical { ++ temperature = <100000>; ++}; ++ ++&ddr_temp_critical { ++ temperature = <100000>; ++}; ++ ++&pio { ++ vcc-pc-supply = <®_dldo1>; ++ vcc-pf-supply = <®_dldo1>; ++ vcc-pg-supply = <®_aldo1>; ++ vcc-ph-supply = <®_dldo1>; ++ vcc-pi-supply = <®_dldo1>; + + /omit-if-no-ref/ + i2c0_pi_pins: i2c0-pi-pins { @@ -339,11 +697,11 @@ index 6a4f0da97233..17b315f071d9 100644 + function = "i2c2"; + }; + -+ i2c3_pa_pins: i2c3-pa-pins { -+ pins = "PA10", "PA11"; -+ function = "i2c3"; -+ bias-pull-up; -+ }; ++ i2c3_pa_pins: i2c3-pa-pins { ++ pins = "PA10", "PA11"; ++ function = "i2c3"; ++ bias-pull-up; ++ }; + + /omit-if-no-ref/ + i2c4_ph_pins: i2c4-ph-pins { @@ -410,113 +768,6 @@ index 6a4f0da97233..17b315f071d9 100644 + pins = "PA12"; + function = "pwm5"; + }; - }; - - &r_i2c { -@@ -139,6 +425,32 @@ reg_dcdc3: dcdc3 { - }; - }; - -+&i2c3 { -+ status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c3_pa_pins>; -+ -+ ac200_x: mfd@10 { -+ compatible = "x-powers,ac200-sunxi"; -+ reg = <0x10>; -+ clocks = <&ac200_pwm_clk>; -+ // ephy id -+ nvmem-cells = <&ephy_calibration>; -+ nvmem-cell-names = "calibration"; -+ -+ ac200_ephy: phy { -+ compatible = "x-powers,ac200-ephy-sunxi"; -+ status = "okay"; -+ }; -+ }; -+}; -+ -+&i2c4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c4_ph_pins>; -+ status = "disabled"; -+}; -+ - &spi0 { - status = "okay"; - pinctrl-names = "default"; -@@ -153,12 +465,51 @@ flash@0 { - }; - }; - -+&spi1 { -+ status = "disabled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi1_pins>, <&spi1_cs1_pin>; -+ -+ spidev@1 { -+ compatible = "rohm,dh2228fv"; -+ status = "disabled"; -+ reg = <1>; -+ spi-max-frequency = <1000000>; -+ }; -+}; -+ - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_ph_pins>; - status = "okay"; - }; - -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart2_pi_pins>; -+ status = "disabled"; -+}; -+ -+&uart3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart3_pi_pins>; -+ status = "disabled"; -+}; -+ -+&uart4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart4_pi_pins>; -+ status = "disabled"; -+}; -+ -+&uart5 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart5_ph_pins>; -+ status = "disabled"; -+}; -+ - &usbotg { - /* - * PHY0 pins are connected to a USB-C socket, but a role switch -@@ -179,3 +530,19 @@ &usbphy { - usb1_vbus-supply = <®_vcc5v>; - status = "okay"; - }; -+ -+&cpu_critical { -+ temperature = <100000>; -+}; -+ -+&gpu_temp_critical { -+ temperature = <100000>; -+}; -+ -+&ve_temp_critical { -+ temperature = <100000>; -+}; -+ -+&ddr_temp_critical { -+ temperature = <100000>; +}; -- 2.35.3