forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BananaPi BPI-M4-Zero:
Add overlay support and pin ctrl
Also DTS/DTSI additions and fixups Signed-off-by: Patrick Yavitz <[email protected]>
- Loading branch information
1 parent
6607728
commit dcc3c55
Showing
13 changed files
with
948 additions
and
379 deletions.
There are no files selected for viewing
66 changes: 0 additions & 66 deletions
66
patch/kernel/archive/sunxi-6.11/patches.armbian/Add-BPI-M4-ZERO-sdio-wifi-bt-overlay.patch
This file was deleted.
Oops, something went wrong.
315 changes: 315 additions & 0 deletions
315
patch/kernel/archive/sunxi-6.11/patches.armbian/Add-BananaPi-BPI-M4-Zero-overlays.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,315 @@ | ||
From db2b7ebcbdc93d5e2e29c49a0f708d3a4f706524 Mon Sep 17 00:00:00 2001 | ||
From: Patrick Yavitz <[email protected]> | ||
Date: Thu, 12 Dec 2024 06:53:20 -0500 | ||
Subject: [PATCH] Add BananaPi BPI-M4-Zero overlays | ||
|
||
Signed-off-by: Patrick Yavitz <[email protected]> | ||
--- | ||
.../arm64/boot/dts/allwinner/overlay/Makefile | 11 +++++++ | ||
.../sun50i-h616-bananapi-m4-sdio-wifi-bt.dtso | 29 +++++++++++++++++ | ||
...i-h616-bananapi-m4-zero-pg-15-16-i2c4.dtso | 13 ++++++++ | ||
...i-h616-bananapi-m4-zero-pg-17-18-i2c3.dtso | 13 ++++++++ | ||
...0i-h616-bananapi-m4-zero-ph-2-3-uart5.dtso | 13 ++++++++ | ||
...-h616-bananapi-m4-zero-pi-13-14-uart4.dtso | 13 ++++++++ | ||
...nanapi-m4-zero-pi-15-16-rts-cts-uart4.dtso | 16 ++++++++++ | ||
...50i-h616-bananapi-m4-zero-pi-5-6-i2c0.dtso | 13 ++++++++ | ||
...50i-h616-bananapi-m4-zero-pi-7-8-i2c1.dtso | 13 ++++++++ | ||
...-bananapi-m4-zero-spi1-cs0-cs1-spidev.dtso | 32 +++++++++++++++++++ | ||
...h616-bananapi-m4-zero-spi1-cs0-spidev.dtso | 24 ++++++++++++++ | ||
...h616-bananapi-m4-zero-spi1-cs1-spidev.dtso | 13 ++++++++ | ||
12 files changed, 203 insertions(+) | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-sdio-wifi-bt.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pg-15-16-i2c4.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pg-17-18-i2c3.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-ph-2-3-uart5.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-13-14-uart4.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-15-16-rts-cts-uart4.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-5-6-i2c0.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-7-8-i2c1.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs0-cs1-spidev.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs0-spidev.dtso | ||
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs1-spidev.dtso | ||
|
||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/Makefile b/arch/arm64/boot/dts/allwinner/overlay/Makefile | ||
index 24383cb63770..544eaad5cddf 100644 | ||
--- a/arch/arm64/boot/dts/allwinner/overlay/Makefile | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/Makefile | ||
@@ -49,6 +49,17 @@ dtb-$(CONFIG_ARCH_SUNXI) += \ | ||
sun50i-h6-uart2.dtbo \ | ||
sun50i-h6-uart3.dtbo \ | ||
sun50i-h6-w1-gpio.dtbo \ | ||
+ sun50i-h616-bananapi-m4-sdio-wifi-bt.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-pg-15-16-i2c4.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-pg-17-18-i2c3.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-ph-2-3-uart5.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-pi-13-14-uart4.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-pi-15-16-rts-cts-uart4.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-pi-5-6-i2c0.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-pi-7-8-i2c1.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-spi1-cs0-cs1-spidev.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-spi1-cs0-spidev.dtbo \ | ||
+ sun50i-h616-bananapi-m4-zero-spi1-cs1-spidev.dtbo \ | ||
sun50i-h616-i2c2-ph.dtbo \ | ||
sun50i-h616-i2c3-ph.dtbo \ | ||
sun50i-h616-i2c4-ph.dtbo \ | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-sdio-wifi-bt.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-sdio-wifi-bt.dtso | ||
new file mode 100644 | ||
index 000000000000..b672807fab66 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-sdio-wifi-bt.dtso | ||
@@ -0,0 +1,29 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target-path = "/"; | ||
+ __overlay__ { | ||
+ model = "BananaPi BPI-M4-Zero v2"; | ||
+ }; | ||
+ }; | ||
+ | ||
+ /* SDIO WIFI */ | ||
+ fragment@1 { | ||
+ target = <&mmc1>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+ | ||
+ /* BLUETOOTH */ | ||
+ fragment@2 { | ||
+ target = <&uart1>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pg-15-16-i2c4.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pg-15-16-i2c4.dtso | ||
new file mode 100644 | ||
index 000000000000..4e78aa8f1f27 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pg-15-16-i2c4.dtso | ||
@@ -0,0 +1,13 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&i2c4>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pg-17-18-i2c3.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pg-17-18-i2c3.dtso | ||
new file mode 100644 | ||
index 000000000000..3419eee0b70b | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pg-17-18-i2c3.dtso | ||
@@ -0,0 +1,13 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&i2c3>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-ph-2-3-uart5.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-ph-2-3-uart5.dtso | ||
new file mode 100644 | ||
index 000000000000..aaa96e46d708 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-ph-2-3-uart5.dtso | ||
@@ -0,0 +1,13 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&uart5>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-13-14-uart4.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-13-14-uart4.dtso | ||
new file mode 100644 | ||
index 000000000000..0373f7d25449 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-13-14-uart4.dtso | ||
@@ -0,0 +1,13 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&uart4>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-15-16-rts-cts-uart4.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-15-16-rts-cts-uart4.dtso | ||
new file mode 100644 | ||
index 000000000000..ef9394c8519c | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-15-16-rts-cts-uart4.dtso | ||
@@ -0,0 +1,16 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&uart4>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ pinctrl-0 = <&uart4_pi_pins>, <&uart4_pi_rts_cts_pins>; | ||
+ pinctrl-names = "default"; | ||
+ uart-has-rtscts; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-5-6-i2c0.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-5-6-i2c0.dtso | ||
new file mode 100644 | ||
index 000000000000..60c75e4d61b5 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-5-6-i2c0.dtso | ||
@@ -0,0 +1,13 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&i2c0>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-7-8-i2c1.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-7-8-i2c1.dtso | ||
new file mode 100644 | ||
index 000000000000..99c7e2b8c5f6 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-pi-7-8-i2c1.dtso | ||
@@ -0,0 +1,13 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&i2c1>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs0-cs1-spidev.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs0-cs1-spidev.dtso | ||
new file mode 100644 | ||
index 000000000000..7fa3b94bcc8d | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs0-cs1-spidev.dtso | ||
@@ -0,0 +1,32 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&spi1>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ #address-cells = <1>; | ||
+ #size-cells = <0>; | ||
+ | ||
+ pinctrl-names = "default"; | ||
+ pinctrl-0 = <&spi1_pins>, <&spi1_cs0_pin>, <&spi1_cs1_pin>; | ||
+ | ||
+ spidev@0 { | ||
+ compatible = "rohm,dh2228fv"; | ||
+ status = "okay"; | ||
+ reg = <0>; | ||
+ spi-max-frequency = <50000000>; | ||
+ }; | ||
+ | ||
+ spidev@1 { | ||
+ compatible = "rohm,dh2228fv"; | ||
+ status = "okay"; | ||
+ reg = <1>; | ||
+ spi-max-frequency = <50000000>; | ||
+ }; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs0-spidev.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs0-spidev.dtso | ||
new file mode 100644 | ||
index 000000000000..fef73f1afa52 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs0-spidev.dtso | ||
@@ -0,0 +1,24 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&spi1>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ #address-cells = <1>; | ||
+ #size-cells = <0>; | ||
+ | ||
+ pinctrl-names = "default"; | ||
+ pinctrl-0 = <&spi1_pins>, <&spi1_cs0_pin>; | ||
+ spidev@0 { | ||
+ compatible = "rohm,dh2228fv"; | ||
+ status = "okay"; | ||
+ reg = <0>; | ||
+ spi-max-frequency = <1000000>; | ||
+ }; | ||
+ }; | ||
+ }; | ||
+}; | ||
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs1-spidev.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs1-spidev.dtso | ||
new file mode 100644 | ||
index 000000000000..840357f2e9e0 | ||
--- /dev/null | ||
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-zero-spi1-cs1-spidev.dtso | ||
@@ -0,0 +1,13 @@ | ||
+/dts-v1/; | ||
+/plugin/; | ||
+ | ||
+/ { | ||
+ compatible = "sinovoip,bpi-m4-zero", "allwinner,sun50i-h616", "allwinner,sun50i-h618"; | ||
+ | ||
+ fragment@0 { | ||
+ target = <&spi1>; | ||
+ __overlay__ { | ||
+ status = "okay"; | ||
+ }; | ||
+ }; | ||
+}; | ||
-- | ||
2.39.5 | ||
|
Oops, something went wrong.