build/patch/kernel/archive/meson64-6.1/general-xtra-meson64-overlays.patch

242 lines
6.9 KiB
Diff

From 6179f0113224e7d4e87dfc741fa4033911f4282c Mon Sep 17 00:00:00 2001
From: Patrick Yavitz <pyavitz@xxxxx.com>
Date: Fri, 18 Aug 2023 11:22:03 -0400
Subject: [PATCH] general: extra: meson64 overlays
meson-g12a-radxa-zero-gpio-10-led.dtbo (rev 1.51 enable led)
meson-g12a-radxa-zero-gpio-8-led.dtbo (rev 1.4 enable led)
meson-g12b-odroid-n2-spi.dtbo (SPI-NOR enable via overlay)
meson-sm1-bananapi-uartA.dtbo
meson-sm1-bananapi-uartAO_B.dtbo (serial 4)
meson-sm1-bananapi-uartB.dtbo (serial 2)
meson-sm1-bananapi-rtl8822cs.dtbo *
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
---
arch/arm64/boot/dts/amlogic/overlay/Makefile | 9 ++++++-
.../meson-g12a-radxa-zero-gpio-10-led.dts | 26 +++++++++++++++++++
.../meson-g12a-radxa-zero-gpio-8-led.dts | 26 +++++++++++++++++++
.../overlay/meson-g12b-odroid-n2-spi.dts | 23 ++++++++++++++++
.../overlay/meson-sm1-bananapi-rtl8822cs.dts | 23 ++++++++++++++++
.../overlay/meson-sm1-bananapi-uartA.dts | 15 +++++++++++
.../overlay/meson-sm1-bananapi-uartAO_B.dts | 14 ++++++++++
.../overlay/meson-sm1-bananapi-uartB.dts | 15 +++++++++++
8 files changed, 150 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-g12a-radxa-zero-gpio-10-led.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-g12a-radxa-zero-gpio-8-led.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-g12b-odroid-n2-spi.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-rtl8822cs.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartA.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartAO_B.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartB.dts
diff --git a/arch/arm64/boot/dts/amlogic/overlay/Makefile b/arch/arm64/boot/dts/amlogic/overlay/Makefile
index 9d5c727602d1..aa1be0fb1844 100644
--- a/arch/arm64/boot/dts/amlogic/overlay/Makefile
+++ b/arch/arm64/boot/dts/amlogic/overlay/Makefile
@@ -6,7 +6,14 @@ dtbo-$(CONFIG_ARCH_MESON) += \
meson-uartC.dtbo \
meson-w1-gpio.dtbo \
meson-w1AB-gpio.dtbo \
- meson-g12-gxl-cma-pool-896MB.dtbo
+ meson-g12-gxl-cma-pool-896MB.dtbo \
+ meson-g12a-radxa-zero-gpio-8-led.dtbo \
+ meson-g12a-radxa-zero-gpio-10-led.dtbo \
+ meson-g12b-odroid-n2-spi.dtbo \
+ meson-sm1-bananapi-rtl8822cs.dtbo \
+ meson-sm1-bananapi-uartA.dtbo \
+ meson-sm1-bananapi-uartAO_B.dtbo \
+ meson-sm1-bananapi-uartB.dtbo
scr-$(CONFIG_ARCH_MESON) += \
meson-fixup.scr
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-g12a-radxa-zero-gpio-10-led.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-g12a-radxa-zero-gpio-10-led.dts
new file mode 100644
index 000000000000..d76430328955
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-g12a-radxa-zero-gpio-10-led.dts
@@ -0,0 +1,26 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+
+/ {
+ compatible = "radxa,zero", "amlogic,g12a";
+
+ fragment@0 {
+ target-path = "/";
+ __overlay__ {
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-green {
+ label = "radxa-zero:green";
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ default-state = "on";
+ };
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-g12a-radxa-zero-gpio-8-led.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-g12a-radxa-zero-gpio-8-led.dts
new file mode 100644
index 000000000000..9b294e97f79f
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-g12a-radxa-zero-gpio-8-led.dts
@@ -0,0 +1,26 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+
+/ {
+ compatible = "radxa,zero", "amlogic,g12a";
+
+ fragment@0 {
+ target-path = "/";
+ __overlay__ {
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-green {
+ label = "radxa-zero:green";
+ gpios = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ default-state = "on";
+ };
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-g12b-odroid-n2-spi.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-g12b-odroid-n2-spi.dts
new file mode 100644
index 000000000000..658afb1fb58d
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-g12b-odroid-n2-spi.dts
@@ -0,0 +1,23 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+
+/ {
+ fragment@0 {
+ target = <&sd_emmc_c>;
+ __overlay__ {
+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_4b_pins>, <&emmc_ds_pins>;
+ bus-width = <4>;
+ };
+ };
+
+ fragment@1 {
+ target = <&spifc>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-rtl8822cs.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-rtl8822cs.dts
new file mode 100644
index 000000000000..f9d014f03789
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-rtl8822cs.dts
@@ -0,0 +1,23 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ /* Banana Pi M2S/M5 */
+ compatible = "bananapi,bpi-m2s", "bananapi,bpi-m5";
+
+ /* RTL8822CS SDIO WIFI */
+ fragment@0 {
+ target = <&sd_emmc_a>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ /* RTL8822CS BLUETOOTH */
+ fragment@1 {
+ target = <&uart_A>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartA.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartA.dts
new file mode 100644
index 000000000000..ea2f401786e6
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartA.dts
@@ -0,0 +1,15 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "bananapi,bpi-m5", "bananapi,bpi-m2-pro", "amlogic,sm1";
+
+ fragment@0 {
+ target = <&uart_A>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
+
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartAO_B.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartAO_B.dts
new file mode 100644
index 000000000000..efac8a5140b3
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartAO_B.dts
@@ -0,0 +1,14 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "bananapi,bpi-m5", "bananapi,bpi-m2-pro", "amlogic,sm1";
+
+ fragment@0 {
+ target = <&uart_AO_B>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartB.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartB.dts
new file mode 100644
index 000000000000..1b87cebbafdd
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-sm1-bananapi-uartB.dts
@@ -0,0 +1,15 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "bananapi,bpi-m5", "bananapi,bpi-m2-pro", "amlogic,sm1";
+
+ fragment@0 {
+ target = <&uart_B>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
+
--
2.39.2