diff --git a/patch/kernel/archive/sunxi-6.12/dt/sun50i-h618-bananapi-m4-zero.dts b/patch/kernel/archive/sunxi-6.12/dt/sun50i-h618-bananapi-m4-zero.dts new file mode 100644 index 000000000..46e07893c --- /dev/null +++ b/patch/kernel/archive/sunxi-6.12/dt/sun50i-h618-bananapi-m4-zero.dts @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Patrick Yavitz + */ + +/dts-v1/; + +#include "sun50i-h618-bananapi-m4.dtsi" + +/ { + model = "BananaPi BPI-M4-Zero"; + compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h618"; + + aliases { + ethernet0 = &emac1; + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c3 = &i2c3; + i2c4 = &i2c4; + serial4 = &uart4; + serial5 = &uart5; + spi1 = &spi1; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */ + linux,default-trigger = "heartbeat"; + }; + }; +}; + +/* Connected to an on-board RTL8821CU USB WiFi chip. */ +&ehci1 { + status = "okay"; +}; + +&ehci2 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&emac1 { + status = "disabled"; + pinctrl-0 = <&ext_rgmii_pins>; + pinctrl-names = "default"; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_dldo1>; + allwinner,rx-delay-ps = <3100>; + allwinner,tx-delay-ps = <700>; +}; + +&mdio1 { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +}; + +/* SDIO */ +&mmc1 { + status = "disabled"; + bus-width = <4>; + max-frequency = <100000000>; + + non-removable; + disable-wp; + + /* WiFi firmware requires power to be kept while in suspend */ + keep-power-in-suspend; + + mmc-pwrseq = <&wifi_pwrseq>; + + cd-gpios = <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */ + vmmc-supply = <®_vcc3v3>; + + sdio: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; + +&ohci1 { + status = "okay"; +}; + +&ohci2 { + status = "okay"; +}; + +&ohci3 { + status = "okay"; +}; + +&usbotg { + status = "okay"; + dr_mode = "peripheral"; +}; + +&usbphy { + status = "okay"; +}; diff --git a/patch/kernel/archive/sunxi-6.12/dt/sun50i-h618-bananapi-m4.dtsi b/patch/kernel/archive/sunxi-6.12/dt/sun50i-h618-bananapi-m4.dtsi new file mode 100644 index 000000000..4c018ba12 --- /dev/null +++ b/patch/kernel/archive/sunxi-6.12/dt/sun50i-h618-bananapi-m4.dtsi @@ -0,0 +1,273 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Patrick Yavitz + */ + +/dts-v1/; + +#include "sun50i-h616.dtsi" +#include "sun50i-h616-cpu-opp.dtsi" + +#include +#include +#include +#include + +/ { + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + connector { + compatible = "hdmi-connector"; + type = "d"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; + + reg_usb_vbus: regulator-usb-vbus { + /* Separate discrete regulator for the USB ports */ + compatible = "regulator-fixed"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "usb-vbus"; + vin-supply = <®_vcc5v>; + }; + + reg_vcc5v: regulator-vcc5v { + /* Board wide 5V supply directly from the USB-C socket */ + compatible = "regulator-fixed"; + regulator-always-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc-5v"; + }; + + reg_vcc3v3: regulator-vcc3v3 { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; + vin-supply = <®_vcc5v>; + }; + + reg_vcc1v8: regulator-vcc1v8 { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-1v8"; + vin-supply = <®_vcc3v3>; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rtc CLK_OSC32K_FANOUT>; + clock-names = "ext_clock"; + pinctrl-0 = <&x32clk_fanout_pin>; + pinctrl-names = "default"; + post-power-on-delay-ms = <200>; + reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ + }; +}; + +&ahub_dam_plat { + status = "okay"; +}; + +&ahub1_plat { + status = "okay"; +}; + +&ahub1_mach { + status = "okay"; +}; + +&codec { + status = "disabled"; + allwinner,audio-routing = "Line Out", "LINEOUT"; +}; + +&cpu0 { + cpu-supply = <®_dcdc2>; +}; + +&de { + status = "okay"; +}; + +&gpu { + status = "disabled"; + mali-supply = <®_dcdc1>; +}; + +&hdmi { + status = "okay"; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + +&i2c0 { + status = "disabled"; + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; +}; + +&i2c1 { + status = "disabled"; + pinctrl-0 = <&i2c1_pi_pins>; + pinctrl-names = "default"; +}; + +&i2c3 { + status = "disabled"; + pinctrl-0 = <&i2c3_pg_pins>; + pinctrl-names = "default"; +}; + +&i2c4 { + status = "disabled"; + pinctrl-0 = <&i2c4_pg_pins>; + pinctrl-names = "default"; +}; + +&ir { + status = "disabled"; + pinctrl-0 = <&ir_rx_pin>; + pinctrl-names = "default"; +}; + +/* SD card */ +&mmc0 { + status = "okay"; + bus-width = <4>; + max-frequency = <50000000>; + + disable-wp; + + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + vmmc-supply = <®_vcc3v3>; +}; + +/* eMMC */ +&mmc2 { + status = "okay"; + bus-width = <8>; + cap-mmc-hw-reset; + mmc-hs200-1_8v; + + non-removable; + disable-wp; + + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc1v8>; +}; + +&pio { + vcc-pc-supply = <®_aldo1>; + vcc-pf-supply = <®_dldo1>; + vcc-pg-supply = <®_dldo1>; + vcc-ph-supply = <®_dldo1>; + vcc-pi-supply = <®_dldo1>; +}; + +&r_i2c { + status = "okay"; + axp313: pmic@36 { + compatible = "x-powers,axp313a"; + reg = <0x36>; + #interrupt-cells = <1>; + interrupt-controller; + interrupt-parent = <&pio>; + + vin1-supply = <®_vcc5v>; + vin2-supply = <®_vcc5v>; + vin3-supply = <®_vcc5v>; + + regulators { + reg_aldo1: aldo1 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-1v8-pll"; + }; + + reg_dldo1: dldo1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3-io"; + }; + + reg_dcdc1: dcdc1 { + regulator-always-on; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <990000>; + regulator-name = "vdd-gpu-sys"; + }; + + reg_dcdc2: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-cpu"; + }; + + reg_dcdc3: dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-dram"; + }; + }; + }; +}; + +&spi1 { + status = "disabled"; + pinctrl-0 = <&spi1_pins>, <&spi1_cs1_pin>; + pinctrl-names = "default"; + + spidev@1 { + compatible = "rohm,dh2228fv"; + reg = <1>; + spi-max-frequency = <1000000>; + }; +}; + +&uart0 { + status = "okay"; + pinctrl-0 = <&uart0_ph_pins>; + pinctrl-names = "default"; +}; + +&uart1 { + status = "disabled"; + pinctrl-0 = <&uart1_pins>; + pinctrl-names = "default"; +}; + +&uart4 { + status = "disabled"; + pinctrl-0 = <&uart4_pi_pins>; + pinctrl-names = "default"; +}; + +&uart5 { + status = "disabled"; + pinctrl-0 = <&uart5_pins>; + pinctrl-names = "default"; +}; diff --git a/patch/kernel/archive/sunxi-6.12/patches.armbian/Add-board-BananaPi-BPI-M4-Zero.patch b/patch/kernel/archive/sunxi-6.12/patches.armbian/Add-board-BananaPi-BPI-M4-Zero.patch deleted file mode 100644 index 65bfb9147..000000000 --- a/patch/kernel/archive/sunxi-6.12/patches.armbian/Add-board-BananaPi-BPI-M4-Zero.patch +++ /dev/null @@ -1,407 +0,0 @@ -From 4c92bf1cdc05ee6b7426c2450e9dcd6ffebad533 Mon Sep 17 00:00:00 2001 -From: Patrick Yavitz -Date: Tue, 7 Jan 2025 06:58:55 -0500 -Subject: Add board BananaPi BPI-M4-Zero - -Signed-off-by: Patrick Yavitz ---- - arch/arm64/boot/dts/allwinner/Makefile | 1 + - .../sun50i-h618-bananapi-m4-zero.dts | 110 ++++++++ - .../allwinner/sun50i-h618-bananapi-m4.dtsi | 256 ++++++++++++++++++ - 3 files changed, 367 insertions(+) - create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts - create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi - -diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile -index 67f738f9b513..a676c57aad1d 100644 ---- a/arch/arm64/boot/dts/allwinner/Makefile -+++ b/arch/arm64/boot/dts/allwinner/Makefile -@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-emmc.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb -+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-bananapi-m4-zero.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts -new file mode 100644 -index 000000000000..46e07893c653 ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts -@@ -0,0 +1,110 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2024 Patrick Yavitz -+ */ -+ -+/dts-v1/; -+ -+#include "sun50i-h618-bananapi-m4.dtsi" -+ -+/ { -+ model = "BananaPi BPI-M4-Zero"; -+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h618"; -+ -+ aliases { -+ ethernet0 = &emac1; -+ i2c0 = &i2c0; -+ i2c1 = &i2c1; -+ i2c3 = &i2c3; -+ i2c4 = &i2c4; -+ serial4 = &uart4; -+ serial5 = &uart5; -+ spi1 = &spi1; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ led-0 { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */ -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+}; -+ -+/* Connected to an on-board RTL8821CU USB WiFi chip. */ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&ehci2 { -+ status = "okay"; -+}; -+ -+&ehci3 { -+ status = "okay"; -+}; -+ -+&emac1 { -+ status = "disabled"; -+ pinctrl-0 = <&ext_rgmii_pins>; -+ pinctrl-names = "default"; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-supply = <®_dldo1>; -+ allwinner,rx-delay-ps = <3100>; -+ allwinner,tx-delay-ps = <700>; -+}; -+ -+&mdio1 { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ -+/* SDIO */ -+&mmc1 { -+ status = "disabled"; -+ bus-width = <4>; -+ max-frequency = <100000000>; -+ -+ non-removable; -+ disable-wp; -+ -+ /* WiFi firmware requires power to be kept while in suspend */ -+ keep-power-in-suspend; -+ -+ mmc-pwrseq = <&wifi_pwrseq>; -+ -+ cd-gpios = <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */ -+ vmmc-supply = <®_vcc3v3>; -+ -+ sdio: wifi@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ }; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&ohci2 { -+ status = "okay"; -+}; -+ -+&ohci3 { -+ status = "okay"; -+}; -+ -+&usbotg { -+ status = "okay"; -+ dr_mode = "peripheral"; -+}; -+ -+&usbphy { -+ status = "okay"; -+}; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi -new file mode 100644 -index 000000000000..e9640439e02c ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi -@@ -0,0 +1,256 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2024 Patrick Yavitz -+ */ -+ -+/dts-v1/; -+ -+#include "sun50i-h616.dtsi" -+#include "sun50i-h616-cpu-opp.dtsi" -+ -+#include -+#include -+#include -+#include -+ -+/ { -+ aliases { -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ connector { -+ compatible = "hdmi-connector"; -+ type = "d"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ reg_usb_vbus: regulator-usb-vbus { -+ /* Separate discrete regulator for the USB ports */ -+ compatible = "regulator-fixed"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-name = "usb-vbus"; -+ vin-supply = <®_vcc5v>; -+ }; -+ -+ reg_vcc5v: regulator-vcc5v { -+ /* Board wide 5V supply directly from the USB-C socket */ -+ compatible = "regulator-fixed"; -+ regulator-always-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-name = "vcc-5v"; -+ }; -+ -+ reg_vcc3v3: regulator-vcc3v3 { -+ compatible = "regulator-fixed"; -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3"; -+ vin-supply = <®_vcc5v>; -+ }; -+ -+ reg_vcc1v8: regulator-vcc1v8 { -+ compatible = "regulator-fixed"; -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "vcc-1v8"; -+ vin-supply = <®_vcc3v3>; -+ }; -+ -+ wifi_pwrseq: wifi-pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ clocks = <&rtc CLK_OSC32K_FANOUT>; -+ clock-names = "ext_clock"; -+ pinctrl-0 = <&x32clk_fanout_pin>; -+ pinctrl-names = "default"; -+ post-power-on-delay-ms = <200>; -+ reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; -+ -+&de { -+ status = "okay"; -+}; -+ -+&gpu { -+ status = "disabled"; -+ mali-supply = <®_dcdc1>; -+}; -+ -+&hdmi { -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ -+&i2c0 { -+ status = "disabled"; -+ pinctrl-0 = <&i2c0_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&i2c1 { -+ status = "disabled"; -+ pinctrl-0 = <&i2c1_pi_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&i2c3 { -+ status = "disabled"; -+ pinctrl-0 = <&i2c3_pg_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&i2c4 { -+ status = "disabled"; -+ pinctrl-0 = <&i2c4_pg_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&ir { -+ status = "disabled"; -+ pinctrl-0 = <&ir_rx_pin>; -+ pinctrl-names = "default"; -+}; -+ -+/* SD card */ -+&mmc0 { -+ status = "okay"; -+ bus-width = <4>; -+ max-frequency = <50000000>; -+ -+ disable-wp; -+ -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ -+ vmmc-supply = <®_vcc3v3>; -+}; -+ -+/* eMMC */ -+&mmc2 { -+ status = "okay"; -+ bus-width = <8>; -+ cap-mmc-hw-reset; -+ mmc-hs200-1_8v; -+ -+ non-removable; -+ disable-wp; -+ -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc1v8>; -+}; -+ -+&pio { -+ vcc-pc-supply = <®_aldo1>; -+ vcc-pf-supply = <®_dldo1>; -+ vcc-pg-supply = <®_dldo1>; -+ vcc-ph-supply = <®_dldo1>; -+ vcc-pi-supply = <®_dldo1>; -+}; -+ -+&r_i2c { -+ status = "okay"; -+ axp313: pmic@36 { -+ compatible = "x-powers,axp313a"; -+ reg = <0x36>; -+ #interrupt-cells = <1>; -+ interrupt-controller; -+ interrupt-parent = <&pio>; -+ -+ vin1-supply = <®_vcc5v>; -+ vin2-supply = <®_vcc5v>; -+ vin3-supply = <®_vcc5v>; -+ -+ regulators { -+ reg_aldo1: aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "vcc-1v8-pll"; -+ }; -+ -+ reg_dldo1: dldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3-io"; -+ }; -+ -+ reg_dcdc1: dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <810000>; -+ regulator-max-microvolt = <990000>; -+ regulator-name = "vdd-gpu-sys"; -+ }; -+ -+ reg_dcdc2: dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <810000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-cpu"; -+ }; -+ -+ reg_dcdc3: dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-dram"; -+ }; -+ }; -+ }; -+}; -+ -+&spi1 { -+ status = "disabled"; -+ pinctrl-0 = <&spi1_pins>, <&spi1_cs1_pin>; -+ pinctrl-names = "default"; -+ -+ spidev@1 { -+ compatible = "rohm,dh2228fv"; -+ reg = <1>; -+ spi-max-frequency = <1000000>; -+ }; -+}; -+ -+&uart0 { -+ status = "okay"; -+ pinctrl-0 = <&uart0_ph_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&uart1 { -+ status = "disabled"; -+ pinctrl-0 = <&uart1_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&uart4 { -+ status = "disabled"; -+ pinctrl-0 = <&uart4_pi_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&uart5 { -+ status = "disabled"; -+ pinctrl-0 = <&uart5_pins>; -+ pinctrl-names = "default"; -+}; --- -2.35.3 - diff --git a/patch/kernel/archive/sunxi-6.12/patches.armbian/BananaPi-BPI-M4-Zero-Enable-GPU-and-add-Audio-nodes.patch b/patch/kernel/archive/sunxi-6.12/patches.armbian/BananaPi-BPI-M4-Zero-Enable-GPU-and-add-Audio-nodes.patch deleted file mode 100644 index dc3881df2..000000000 --- a/patch/kernel/archive/sunxi-6.12/patches.armbian/BananaPi-BPI-M4-Zero-Enable-GPU-and-add-Audio-nodes.patch +++ /dev/null @@ -1,66 +0,0 @@ -From f59ab5c108596c2fb936e27a2d571dbee9280849 Mon Sep 17 00:00:00 2001 -From: Patrick Yavitz -Date: Wed, 14 May 2025 06:57:54 -0400 -Subject: BananaPi BPI-M4-Zero: Enable GPU and add Audio nodes - -Signed-off-by: Patrick Yavitz ---- - .../allwinner/sun50i-h618-bananapi-m4-zero.dts | 5 +++++ - .../dts/allwinner/sun50i-h618-bananapi-m4.dtsi | 18 +++++++++++++++++- - 2 files changed, 22 insertions(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts -index 46e07893c653..4fef48cceedf 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts -@@ -34,6 +34,11 @@ led-0 { - }; - }; - -+/* &codec { -+ status = "okay"; -+ allwinner,audio-routing = "Hdmi", "HDMI"; -+}; */ -+ - /* Connected to an on-board RTL8821CU USB WiFi chip. */ - &ehci1 { - status = "okay"; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi -index e9640439e02c..6e52232105ae 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi -@@ -80,6 +80,22 @@ wifi_pwrseq: wifi-pwrseq { - }; - }; - -+&ahub_dam_plat { -+ status = "okay"; -+}; -+ -+&ahub1_plat { -+ status = "okay"; -+}; -+ -+&ahub1_mach { -+ status = "okay"; -+}; -+ -+/* &ahub_i2s2 { -+ status = "okay"; -+}; */ -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; -@@ -89,7 +105,7 @@ &de { - }; - - &gpu { -- status = "disabled"; -+ status = "okay"; - mali-supply = <®_dcdc1>; - }; - --- -2.35.3 - diff --git a/patch/kernel/archive/sunxi-6.12/patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch b/patch/kernel/archive/sunxi-6.12/patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch index 97c39762a..21061976a 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch @@ -11,7 +11,7 @@ Subject: arm64: allwinner: Add sun50i-h618-bananapi-m4-berry support create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-berry.dts diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile -index a676c57aad1d..a34f2dbcc9b4 100644 +index 67f738f9b513..a676c57aad1d 100644 --- a/arch/arm64/boot/dts/allwinner/Makefile +++ b/arch/arm64/boot/dts/allwinner/Makefile @@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-emmc.dtb @@ -19,9 +19,9 @@ index a676c57aad1d..a34f2dbcc9b4 100644 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-bananapi-m4-berry.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-bananapi-m4-zero.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb + dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi index 851cf3e5444d..84d5f4d6b65f 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi diff --git a/patch/kernel/archive/sunxi-6.12/series.conf b/patch/kernel/archive/sunxi-6.12/series.conf index d48d99177..d76446c08 100644 --- a/patch/kernel/archive/sunxi-6.12/series.conf +++ b/patch/kernel/archive/sunxi-6.12/series.conf @@ -474,8 +474,6 @@ patches.armbian/ARM64-dts-sun50i-h616-BigTreeTech-CB1-Enable-HDMI.patch patches.armbian/ARM64-dts-sun50i-h616-BigTreeTech-CB1-Enable-EMAC1.patch patches.armbian/arm64-dts-sun50i-h313-x96q-lpddr3.patch - patches.armbian/Add-board-BananaPi-BPI-M4-Zero.patch - patches.armbian/BananaPi-BPI-M4-Zero-Enable-GPU-and-add-Audio-nodes.patch patches.armbian/Add-BananaPi-BPI-M4-Zero-pinctrl.patch patches.armbian/Add-BananaPi-BPI-M4-Zero-overlays.patch patches.armbian/Fix-ghost-touches-on-tsc2007-tft-screen.patch diff --git a/patch/kernel/archive/sunxi-6.15/dt/sun50i-h618-bananapi-m4-zero.dts b/patch/kernel/archive/sunxi-6.15/dt/sun50i-h618-bananapi-m4-zero.dts new file mode 100644 index 000000000..46e07893c --- /dev/null +++ b/patch/kernel/archive/sunxi-6.15/dt/sun50i-h618-bananapi-m4-zero.dts @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Patrick Yavitz + */ + +/dts-v1/; + +#include "sun50i-h618-bananapi-m4.dtsi" + +/ { + model = "BananaPi BPI-M4-Zero"; + compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h618"; + + aliases { + ethernet0 = &emac1; + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c3 = &i2c3; + i2c4 = &i2c4; + serial4 = &uart4; + serial5 = &uart5; + spi1 = &spi1; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */ + linux,default-trigger = "heartbeat"; + }; + }; +}; + +/* Connected to an on-board RTL8821CU USB WiFi chip. */ +&ehci1 { + status = "okay"; +}; + +&ehci2 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&emac1 { + status = "disabled"; + pinctrl-0 = <&ext_rgmii_pins>; + pinctrl-names = "default"; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_dldo1>; + allwinner,rx-delay-ps = <3100>; + allwinner,tx-delay-ps = <700>; +}; + +&mdio1 { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +}; + +/* SDIO */ +&mmc1 { + status = "disabled"; + bus-width = <4>; + max-frequency = <100000000>; + + non-removable; + disable-wp; + + /* WiFi firmware requires power to be kept while in suspend */ + keep-power-in-suspend; + + mmc-pwrseq = <&wifi_pwrseq>; + + cd-gpios = <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */ + vmmc-supply = <®_vcc3v3>; + + sdio: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; + +&ohci1 { + status = "okay"; +}; + +&ohci2 { + status = "okay"; +}; + +&ohci3 { + status = "okay"; +}; + +&usbotg { + status = "okay"; + dr_mode = "peripheral"; +}; + +&usbphy { + status = "okay"; +}; diff --git a/patch/kernel/archive/sunxi-6.15/dt/sun50i-h618-bananapi-m4.dtsi b/patch/kernel/archive/sunxi-6.15/dt/sun50i-h618-bananapi-m4.dtsi new file mode 100644 index 000000000..4c018ba12 --- /dev/null +++ b/patch/kernel/archive/sunxi-6.15/dt/sun50i-h618-bananapi-m4.dtsi @@ -0,0 +1,273 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Patrick Yavitz + */ + +/dts-v1/; + +#include "sun50i-h616.dtsi" +#include "sun50i-h616-cpu-opp.dtsi" + +#include +#include +#include +#include + +/ { + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + connector { + compatible = "hdmi-connector"; + type = "d"; + + port { + hdmi_con_in: endpoint { + remote-endpoint = <&hdmi_out_con>; + }; + }; + }; + + reg_usb_vbus: regulator-usb-vbus { + /* Separate discrete regulator for the USB ports */ + compatible = "regulator-fixed"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "usb-vbus"; + vin-supply = <®_vcc5v>; + }; + + reg_vcc5v: regulator-vcc5v { + /* Board wide 5V supply directly from the USB-C socket */ + compatible = "regulator-fixed"; + regulator-always-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc-5v"; + }; + + reg_vcc3v3: regulator-vcc3v3 { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; + vin-supply = <®_vcc5v>; + }; + + reg_vcc1v8: regulator-vcc1v8 { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-1v8"; + vin-supply = <®_vcc3v3>; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rtc CLK_OSC32K_FANOUT>; + clock-names = "ext_clock"; + pinctrl-0 = <&x32clk_fanout_pin>; + pinctrl-names = "default"; + post-power-on-delay-ms = <200>; + reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ + }; +}; + +&ahub_dam_plat { + status = "okay"; +}; + +&ahub1_plat { + status = "okay"; +}; + +&ahub1_mach { + status = "okay"; +}; + +&codec { + status = "disabled"; + allwinner,audio-routing = "Line Out", "LINEOUT"; +}; + +&cpu0 { + cpu-supply = <®_dcdc2>; +}; + +&de { + status = "okay"; +}; + +&gpu { + status = "disabled"; + mali-supply = <®_dcdc1>; +}; + +&hdmi { + status = "okay"; +}; + +&hdmi_out { + hdmi_out_con: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; +}; + +&i2c0 { + status = "disabled"; + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; +}; + +&i2c1 { + status = "disabled"; + pinctrl-0 = <&i2c1_pi_pins>; + pinctrl-names = "default"; +}; + +&i2c3 { + status = "disabled"; + pinctrl-0 = <&i2c3_pg_pins>; + pinctrl-names = "default"; +}; + +&i2c4 { + status = "disabled"; + pinctrl-0 = <&i2c4_pg_pins>; + pinctrl-names = "default"; +}; + +&ir { + status = "disabled"; + pinctrl-0 = <&ir_rx_pin>; + pinctrl-names = "default"; +}; + +/* SD card */ +&mmc0 { + status = "okay"; + bus-width = <4>; + max-frequency = <50000000>; + + disable-wp; + + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + vmmc-supply = <®_vcc3v3>; +}; + +/* eMMC */ +&mmc2 { + status = "okay"; + bus-width = <8>; + cap-mmc-hw-reset; + mmc-hs200-1_8v; + + non-removable; + disable-wp; + + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc1v8>; +}; + +&pio { + vcc-pc-supply = <®_aldo1>; + vcc-pf-supply = <®_dldo1>; + vcc-pg-supply = <®_dldo1>; + vcc-ph-supply = <®_dldo1>; + vcc-pi-supply = <®_dldo1>; +}; + +&r_i2c { + status = "okay"; + axp313: pmic@36 { + compatible = "x-powers,axp313a"; + reg = <0x36>; + #interrupt-cells = <1>; + interrupt-controller; + interrupt-parent = <&pio>; + + vin1-supply = <®_vcc5v>; + vin2-supply = <®_vcc5v>; + vin3-supply = <®_vcc5v>; + + regulators { + reg_aldo1: aldo1 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-1v8-pll"; + }; + + reg_dldo1: dldo1 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3-io"; + }; + + reg_dcdc1: dcdc1 { + regulator-always-on; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <990000>; + regulator-name = "vdd-gpu-sys"; + }; + + reg_dcdc2: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-cpu"; + }; + + reg_dcdc3: dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-name = "vdd-dram"; + }; + }; + }; +}; + +&spi1 { + status = "disabled"; + pinctrl-0 = <&spi1_pins>, <&spi1_cs1_pin>; + pinctrl-names = "default"; + + spidev@1 { + compatible = "rohm,dh2228fv"; + reg = <1>; + spi-max-frequency = <1000000>; + }; +}; + +&uart0 { + status = "okay"; + pinctrl-0 = <&uart0_ph_pins>; + pinctrl-names = "default"; +}; + +&uart1 { + status = "disabled"; + pinctrl-0 = <&uart1_pins>; + pinctrl-names = "default"; +}; + +&uart4 { + status = "disabled"; + pinctrl-0 = <&uart4_pi_pins>; + pinctrl-names = "default"; +}; + +&uart5 { + status = "disabled"; + pinctrl-0 = <&uart5_pins>; + pinctrl-names = "default"; +}; diff --git a/patch/kernel/archive/sunxi-6.15/patches.armbian/Add-board-BananaPi-BPI-M4-Zero.patch b/patch/kernel/archive/sunxi-6.15/patches.armbian/Add-board-BananaPi-BPI-M4-Zero.patch deleted file mode 100644 index 65bfb9147..000000000 --- a/patch/kernel/archive/sunxi-6.15/patches.armbian/Add-board-BananaPi-BPI-M4-Zero.patch +++ /dev/null @@ -1,407 +0,0 @@ -From 4c92bf1cdc05ee6b7426c2450e9dcd6ffebad533 Mon Sep 17 00:00:00 2001 -From: Patrick Yavitz -Date: Tue, 7 Jan 2025 06:58:55 -0500 -Subject: Add board BananaPi BPI-M4-Zero - -Signed-off-by: Patrick Yavitz ---- - arch/arm64/boot/dts/allwinner/Makefile | 1 + - .../sun50i-h618-bananapi-m4-zero.dts | 110 ++++++++ - .../allwinner/sun50i-h618-bananapi-m4.dtsi | 256 ++++++++++++++++++ - 3 files changed, 367 insertions(+) - create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts - create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi - -diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile -index 67f738f9b513..a676c57aad1d 100644 ---- a/arch/arm64/boot/dts/allwinner/Makefile -+++ b/arch/arm64/boot/dts/allwinner/Makefile -@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-emmc.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb -+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-bananapi-m4-zero.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts -new file mode 100644 -index 000000000000..46e07893c653 ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-zero.dts -@@ -0,0 +1,110 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2024 Patrick Yavitz -+ */ -+ -+/dts-v1/; -+ -+#include "sun50i-h618-bananapi-m4.dtsi" -+ -+/ { -+ model = "BananaPi BPI-M4-Zero"; -+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h618"; -+ -+ aliases { -+ ethernet0 = &emac1; -+ i2c0 = &i2c0; -+ i2c1 = &i2c1; -+ i2c3 = &i2c3; -+ i2c4 = &i2c4; -+ serial4 = &uart4; -+ serial5 = &uart5; -+ spi1 = &spi1; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ led-0 { -+ color = ; -+ function = LED_FUNCTION_STATUS; -+ gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */ -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+}; -+ -+/* Connected to an on-board RTL8821CU USB WiFi chip. */ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&ehci2 { -+ status = "okay"; -+}; -+ -+&ehci3 { -+ status = "okay"; -+}; -+ -+&emac1 { -+ status = "disabled"; -+ pinctrl-0 = <&ext_rgmii_pins>; -+ pinctrl-names = "default"; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ phy-supply = <®_dldo1>; -+ allwinner,rx-delay-ps = <3100>; -+ allwinner,tx-delay-ps = <700>; -+}; -+ -+&mdio1 { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ -+/* SDIO */ -+&mmc1 { -+ status = "disabled"; -+ bus-width = <4>; -+ max-frequency = <100000000>; -+ -+ non-removable; -+ disable-wp; -+ -+ /* WiFi firmware requires power to be kept while in suspend */ -+ keep-power-in-suspend; -+ -+ mmc-pwrseq = <&wifi_pwrseq>; -+ -+ cd-gpios = <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */ -+ vmmc-supply = <®_vcc3v3>; -+ -+ sdio: wifi@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ }; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&ohci2 { -+ status = "okay"; -+}; -+ -+&ohci3 { -+ status = "okay"; -+}; -+ -+&usbotg { -+ status = "okay"; -+ dr_mode = "peripheral"; -+}; -+ -+&usbphy { -+ status = "okay"; -+}; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi -new file mode 100644 -index 000000000000..e9640439e02c ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4.dtsi -@@ -0,0 +1,256 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2024 Patrick Yavitz -+ */ -+ -+/dts-v1/; -+ -+#include "sun50i-h616.dtsi" -+#include "sun50i-h616-cpu-opp.dtsi" -+ -+#include -+#include -+#include -+#include -+ -+/ { -+ aliases { -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ connector { -+ compatible = "hdmi-connector"; -+ type = "d"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ reg_usb_vbus: regulator-usb-vbus { -+ /* Separate discrete regulator for the USB ports */ -+ compatible = "regulator-fixed"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-name = "usb-vbus"; -+ vin-supply = <®_vcc5v>; -+ }; -+ -+ reg_vcc5v: regulator-vcc5v { -+ /* Board wide 5V supply directly from the USB-C socket */ -+ compatible = "regulator-fixed"; -+ regulator-always-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-name = "vcc-5v"; -+ }; -+ -+ reg_vcc3v3: regulator-vcc3v3 { -+ compatible = "regulator-fixed"; -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3"; -+ vin-supply = <®_vcc5v>; -+ }; -+ -+ reg_vcc1v8: regulator-vcc1v8 { -+ compatible = "regulator-fixed"; -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "vcc-1v8"; -+ vin-supply = <®_vcc3v3>; -+ }; -+ -+ wifi_pwrseq: wifi-pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ clocks = <&rtc CLK_OSC32K_FANOUT>; -+ clock-names = "ext_clock"; -+ pinctrl-0 = <&x32clk_fanout_pin>; -+ pinctrl-names = "default"; -+ post-power-on-delay-ms = <200>; -+ reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */ -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; -+ -+&de { -+ status = "okay"; -+}; -+ -+&gpu { -+ status = "disabled"; -+ mali-supply = <®_dcdc1>; -+}; -+ -+&hdmi { -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ -+&i2c0 { -+ status = "disabled"; -+ pinctrl-0 = <&i2c0_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&i2c1 { -+ status = "disabled"; -+ pinctrl-0 = <&i2c1_pi_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&i2c3 { -+ status = "disabled"; -+ pinctrl-0 = <&i2c3_pg_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&i2c4 { -+ status = "disabled"; -+ pinctrl-0 = <&i2c4_pg_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&ir { -+ status = "disabled"; -+ pinctrl-0 = <&ir_rx_pin>; -+ pinctrl-names = "default"; -+}; -+ -+/* SD card */ -+&mmc0 { -+ status = "okay"; -+ bus-width = <4>; -+ max-frequency = <50000000>; -+ -+ disable-wp; -+ -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ -+ vmmc-supply = <®_vcc3v3>; -+}; -+ -+/* eMMC */ -+&mmc2 { -+ status = "okay"; -+ bus-width = <8>; -+ cap-mmc-hw-reset; -+ mmc-hs200-1_8v; -+ -+ non-removable; -+ disable-wp; -+ -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc1v8>; -+}; -+ -+&pio { -+ vcc-pc-supply = <®_aldo1>; -+ vcc-pf-supply = <®_dldo1>; -+ vcc-pg-supply = <®_dldo1>; -+ vcc-ph-supply = <®_dldo1>; -+ vcc-pi-supply = <®_dldo1>; -+}; -+ -+&r_i2c { -+ status = "okay"; -+ axp313: pmic@36 { -+ compatible = "x-powers,axp313a"; -+ reg = <0x36>; -+ #interrupt-cells = <1>; -+ interrupt-controller; -+ interrupt-parent = <&pio>; -+ -+ vin1-supply = <®_vcc5v>; -+ vin2-supply = <®_vcc5v>; -+ vin3-supply = <®_vcc5v>; -+ -+ regulators { -+ reg_aldo1: aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "vcc-1v8-pll"; -+ }; -+ -+ reg_dldo1: dldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3-io"; -+ }; -+ -+ reg_dcdc1: dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <810000>; -+ regulator-max-microvolt = <990000>; -+ regulator-name = "vdd-gpu-sys"; -+ }; -+ -+ reg_dcdc2: dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <810000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-cpu"; -+ }; -+ -+ reg_dcdc3: dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-dram"; -+ }; -+ }; -+ }; -+}; -+ -+&spi1 { -+ status = "disabled"; -+ pinctrl-0 = <&spi1_pins>, <&spi1_cs1_pin>; -+ pinctrl-names = "default"; -+ -+ spidev@1 { -+ compatible = "rohm,dh2228fv"; -+ reg = <1>; -+ spi-max-frequency = <1000000>; -+ }; -+}; -+ -+&uart0 { -+ status = "okay"; -+ pinctrl-0 = <&uart0_ph_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&uart1 { -+ status = "disabled"; -+ pinctrl-0 = <&uart1_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&uart4 { -+ status = "disabled"; -+ pinctrl-0 = <&uart4_pi_pins>; -+ pinctrl-names = "default"; -+}; -+ -+&uart5 { -+ status = "disabled"; -+ pinctrl-0 = <&uart5_pins>; -+ pinctrl-names = "default"; -+}; --- -2.35.3 - diff --git a/patch/kernel/archive/sunxi-6.15/patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch b/patch/kernel/archive/sunxi-6.15/patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch index ff670c4a5..12e44e051 100644 --- a/patch/kernel/archive/sunxi-6.15/patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch +++ b/patch/kernel/archive/sunxi-6.15/patches.armbian/arm64-allwinner-Add-sun50i-h618-bananapi-m4-berry-support.patch @@ -11,7 +11,7 @@ Subject: arm64: allwinner: Add sun50i-h618-bananapi-m4-berry support create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-bananapi-m4-berry.dts diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile -index a676c57aad1d..a34f2dbcc9b4 100644 +index 67f738f9b513..a676c57aad1d 100644 --- a/arch/arm64/boot/dts/allwinner/Makefile +++ b/arch/arm64/boot/dts/allwinner/Makefile @@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-emmc.dtb @@ -19,9 +19,9 @@ index a676c57aad1d..a34f2dbcc9b4 100644 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-bananapi-m4-berry.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-bananapi-m4-zero.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb + dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi index 004e824dfe0b..0f4587be1c0e 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi diff --git a/patch/kernel/archive/sunxi-6.15/series.conf b/patch/kernel/archive/sunxi-6.15/series.conf index eeea58bf5..7102a23a0 100644 --- a/patch/kernel/archive/sunxi-6.15/series.conf +++ b/patch/kernel/archive/sunxi-6.15/series.conf @@ -463,7 +463,6 @@ patches.armbian/ARM64-dts-sun50i-h616-BigTreeTech-CB1-Enable-HDMI.patch patches.armbian/ARM64-dts-sun50i-h616-BigTreeTech-CB1-Enable-EMAC1.patch patches.armbian/arm64-dts-sun50i-h313-x96q-lpddr3.patch - patches.armbian/Add-board-BananaPi-BPI-M4-Zero.patch patches.armbian/Add-BananaPi-BPI-M4-Zero-pinctrl.patch patches.armbian/Add-BananaPi-BPI-M4-Zero-overlays.patch patches.armbian/Fix-ghost-touches-on-tsc2007-tft-screen.patch