From c2540dc40f1cf98ecc43784abde07e7e1b2eb959 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Fri, 9 Jun 2023 14:45:07 +0200 Subject: [PATCH] `meson64` `edge` 6.4: drop overlay patches in favor of bare overlays in specific folder --- .../general-meson64-overlays.patch | 245 +----------------- .../archive/meson64-6.4/overlay/Makefile | 20 ++ .../meson64-6.4/overlay/README.meson-overlays | 20 ++ .../meson64-6.4/overlay/meson-fixup.scr-cmd | 4 + .../overlay/meson-g12-gxl-cma-pool-896MB.dts | 19 ++ .../meson64-6.4/overlay/meson-i2cA.dts | 17 ++ .../meson64-6.4/overlay/meson-i2cB.dts | 17 ++ .../meson64-6.4/overlay/meson-uartA.dts | 11 + .../meson64-6.4/overlay/meson-uartC.dts | 11 + .../meson64-6.4/overlay/meson-w1-gpio.dts | 20 ++ .../meson64-6.4/overlay/meson-w1AB-gpio.dts | 32 +++ 11 files changed, 173 insertions(+), 243 deletions(-) create mode 100644 patch/kernel/archive/meson64-6.4/overlay/Makefile create mode 100644 patch/kernel/archive/meson64-6.4/overlay/README.meson-overlays create mode 100644 patch/kernel/archive/meson64-6.4/overlay/meson-fixup.scr-cmd create mode 100644 patch/kernel/archive/meson64-6.4/overlay/meson-g12-gxl-cma-pool-896MB.dts create mode 100644 patch/kernel/archive/meson64-6.4/overlay/meson-i2cA.dts create mode 100644 patch/kernel/archive/meson64-6.4/overlay/meson-i2cB.dts create mode 100644 patch/kernel/archive/meson64-6.4/overlay/meson-uartA.dts create mode 100644 patch/kernel/archive/meson64-6.4/overlay/meson-uartC.dts create mode 100644 patch/kernel/archive/meson64-6.4/overlay/meson-w1-gpio.dts create mode 100644 patch/kernel/archive/meson64-6.4/overlay/meson-w1AB-gpio.dts diff --git a/patch/kernel/archive/meson64-6.4/general-meson64-overlays.patch b/patch/kernel/archive/meson64-6.4/general-meson64-overlays.patch index cb3c1c8d2a..63852f5470 100644 --- a/patch/kernel/archive/meson64-6.4/general-meson64-overlays.patch +++ b/patch/kernel/archive/meson64-6.4/general-meson64-overlays.patch @@ -5,250 +5,9 @@ Subject: general: meson64 overlays Signed-off-by: Zhang Ning <832666+zhangn1985@users.noreply.github.com> --- - arch/arm64/boot/dts/amlogic/overlay/Makefile | 20 ++++++ - arch/arm64/boot/dts/amlogic/overlay/README.meson-overlays | 20 ++++++ - arch/arm64/boot/dts/amlogic/overlay/meson-fixup.scr-cmd | 4 ++ - arch/arm64/boot/dts/amlogic/overlay/meson-g12-gxl-cma-pool-896MB.dts | 19 ++++++ - arch/arm64/boot/dts/amlogic/overlay/meson-i2cA.dts | 17 +++++ - arch/arm64/boot/dts/amlogic/overlay/meson-i2cB.dts | 17 +++++ - arch/arm64/boot/dts/amlogic/overlay/meson-uartA.dts | 11 ++++ - arch/arm64/boot/dts/amlogic/overlay/meson-uartC.dts | 11 ++++ - arch/arm64/boot/dts/amlogic/overlay/meson-w1-gpio.dts | 20 ++++++ - arch/arm64/boot/dts/amlogic/overlay/meson-w1AB-gpio.dts | 32 ++++++++++ - scripts/Makefile.lib | 3 + - 11 files changed, 174 insertions(+) + scripts/Makefile.lib | 3 +++ + 1 file changed, 3 insertions(+) -diff --git a/arch/arm64/boot/dts/amlogic/overlay/Makefile b/arch/arm64/boot/dts/amlogic/overlay/Makefile -new file mode 100644 -index 000000000000..9d5c727602d1 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/Makefile -@@ -0,0 +1,20 @@ -+# SPDX-License-Identifier: GPL-2.0 -+dtbo-$(CONFIG_ARCH_MESON) += \ -+ meson-i2cA.dtbo \ -+ meson-i2cB.dtbo \ -+ meson-uartA.dtbo \ -+ meson-uartC.dtbo \ -+ meson-w1-gpio.dtbo \ -+ meson-w1AB-gpio.dtbo \ -+ meson-g12-gxl-cma-pool-896MB.dtbo -+ -+scr-$(CONFIG_ARCH_MESON) += \ -+ meson-fixup.scr -+ -+dtbotxt-$(CONFIG_ARCH_MESON) += \ -+ README.meson-overlays -+ -+targets += $(dtbo-y) $(scr-y) $(dtbotxt-y) -+ -+always := $(dtbo-y) $(scr-y) $(dtbotxt-y) -+clean-files := *.dtbo *.scr -diff --git a/arch/arm64/boot/dts/amlogic/overlay/README.meson-overlays b/arch/arm64/boot/dts/amlogic/overlay/README.meson-overlays -new file mode 100644 -index 000000000000..1b169a7a1525 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/README.meson-overlays -@@ -0,0 +1,20 @@ -+This document describes overlays provided in the kernel packages -+For generic Armbian overlays documentation please see -+https://docs.armbian.com/User-Guide_Allwinner_overlays/ -+ -+### Platform: -+ -+meson (Amlogic) -+ -+### Provided overlays: -+ -+- i2c8 -+ -+### Overlay details: -+ -+### i2c8 -+ -+Activates TWI/I2C bus 8 -+ -+I2C8 pins (SCL, SDA): GPIO1-C4, GPIO1-C5 -+ -diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-fixup.scr-cmd b/arch/arm64/boot/dts/amlogic/overlay/meson-fixup.scr-cmd -new file mode 100644 -index 000000000000..d4c39e20a3a2 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-fixup.scr-cmd -@@ -0,0 +1,4 @@ -+# overlays fixup script -+# implements (or rather substitutes) overlay arguments functionality -+# using u-boot scripting, environment variables and "fdt" command -+ -diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-g12-gxl-cma-pool-896MB.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-g12-gxl-cma-pool-896MB.dts -new file mode 100644 -index 000000000000..f8c476b04e8c ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-g12-gxl-cma-pool-896MB.dts -@@ -0,0 +1,19 @@ -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "amlogic,g12a", "amlogic,g12b", "amlogic,meson-gxl"; -+ -+ fragment@0 { -+ target-path = "/reserved-memory"; -+ __overlay__ { -+ linux,cma { -+ compatible = "shared-dma-pool"; -+ reusable; -+ size = <0x0 0x38000000>; -+ alignment = <0x0 0x400000>; -+ linux,cma-default; -+ }; -+ }; -+ }; -+}; -diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-i2cA.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-i2cA.dts -new file mode 100644 -index 000000000000..bfb72feb7e36 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-i2cA.dts -@@ -0,0 +1,17 @@ -+/dts-v1/; -+ -+/ { -+ compatible = "amlogic,meson-gxbb"; -+ fragment@0 { -+ target-path = "/aliases"; -+ __overlay__ { -+ i2cA = "/soc/bus@c1100000/i2c@8500"; -+ }; -+ }; -+ fragment@1 { -+ target-path = "/soc/bus@c1100000/i2c@8500"; -+ __overlay__ { -+ status = "okay"; -+ }; -+ }; -+}; -diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-i2cB.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-i2cB.dts -new file mode 100644 -index 000000000000..d75867bce99b ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-i2cB.dts -@@ -0,0 +1,17 @@ -+/dts-v1/; -+ -+/ { -+ compatible = "amlogic,meson-gxbb"; -+ fragment@0 { -+ target-path = "/aliases"; -+ __overlay__ { -+ i2cA = "/soc/bus@c1100000/i2c@87c0"; -+ }; -+ }; -+ fragment@1 { -+ target-path = "/soc/bus@c1100000/i2c@87c0"; -+ __overlay__ { -+ status = "okay"; -+ }; -+ }; -+}; -diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-uartA.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-uartA.dts -new file mode 100644 -index 000000000000..3aecd60aaf64 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-uartA.dts -@@ -0,0 +1,11 @@ -+/dts-v1/; -+ -+/ { -+ compatible = "amlogic,meson-gxbb"; -+ fragment@0 { -+ target-path = "/soc/bus@c1100000/serial@84c0"; -+ __overlay__ { -+ status = "okay"; -+ }; -+ }; -+}; -diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-uartC.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-uartC.dts -new file mode 100644 -index 000000000000..2b40ee4c02d3 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-uartC.dts -@@ -0,0 +1,11 @@ -+/dts-v1/; -+ -+/ { -+ compatible = "amlogic,meson-gxbb"; -+ fragment@0 { -+ target-path = "/soc/bus@c1100000/serial@8700"; -+ __overlay__ { -+ status = "okay"; -+ }; -+ }; -+}; -diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-w1-gpio.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-w1-gpio.dts -new file mode 100644 -index 000000000000..ac76a4f20ab7 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-w1-gpio.dts -@@ -0,0 +1,20 @@ -+// Definitions for w1-gpio module (without external pullup) -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "amlogic,meson-gxbb"; -+ -+ fragment@0 { -+ target-path = "/"; -+ __overlay__ { -+ -+ w1: onewire@0 { -+ compatible = "w1-gpio"; -+ pinctrl-names = "default"; -+ gpios = <&gpio 91 6>; // GPIOY_16 -+ status = "okay"; -+ }; -+ }; -+ }; -+}; -diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-w1AB-gpio.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-w1AB-gpio.dts -new file mode 100644 -index 000000000000..f6b0d7eff158 ---- /dev/null -+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-w1AB-gpio.dts -@@ -0,0 +1,32 @@ -+// Definitions for w1-gpio module (without external pullup) -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "amlogic,meson-gxbb"; -+ -+ fragment@0 { -+ target-path = "/"; -+ __overlay__ { -+ -+ w1a: onewire@0 { -+ compatible = "w1-gpio"; -+ pinctrl-names = "default"; -+ gpios = <&gpio 91 6>; // GPIOY_16 -+ status = "okay"; -+ }; -+ }; -+ }; -+ fragment@1 { -+ target-path = "/"; -+ __overlay__ { -+ -+ w1b: onewire@1 { -+ compatible = "w1-gpio"; -+ pinctrl-names = "default"; -+ gpios = <&gpio 90 6>; // GPIOY_15 -+ status = "okay"; -+ }; -+ }; -+ }; -+}; diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1680499136ee..d5c38baf7ce2 100644 --- a/scripts/Makefile.lib diff --git a/patch/kernel/archive/meson64-6.4/overlay/Makefile b/patch/kernel/archive/meson64-6.4/overlay/Makefile new file mode 100644 index 0000000000..9d5c727602 --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/Makefile @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0 +dtbo-$(CONFIG_ARCH_MESON) += \ + meson-i2cA.dtbo \ + meson-i2cB.dtbo \ + meson-uartA.dtbo \ + meson-uartC.dtbo \ + meson-w1-gpio.dtbo \ + meson-w1AB-gpio.dtbo \ + meson-g12-gxl-cma-pool-896MB.dtbo + +scr-$(CONFIG_ARCH_MESON) += \ + meson-fixup.scr + +dtbotxt-$(CONFIG_ARCH_MESON) += \ + README.meson-overlays + +targets += $(dtbo-y) $(scr-y) $(dtbotxt-y) + +always := $(dtbo-y) $(scr-y) $(dtbotxt-y) +clean-files := *.dtbo *.scr diff --git a/patch/kernel/archive/meson64-6.4/overlay/README.meson-overlays b/patch/kernel/archive/meson64-6.4/overlay/README.meson-overlays new file mode 100644 index 0000000000..1b169a7a15 --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/README.meson-overlays @@ -0,0 +1,20 @@ +This document describes overlays provided in the kernel packages +For generic Armbian overlays documentation please see +https://docs.armbian.com/User-Guide_Allwinner_overlays/ + +### Platform: + +meson (Amlogic) + +### Provided overlays: + +- i2c8 + +### Overlay details: + +### i2c8 + +Activates TWI/I2C bus 8 + +I2C8 pins (SCL, SDA): GPIO1-C4, GPIO1-C5 + diff --git a/patch/kernel/archive/meson64-6.4/overlay/meson-fixup.scr-cmd b/patch/kernel/archive/meson64-6.4/overlay/meson-fixup.scr-cmd new file mode 100644 index 0000000000..d4c39e20a3 --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/meson-fixup.scr-cmd @@ -0,0 +1,4 @@ +# overlays fixup script +# implements (or rather substitutes) overlay arguments functionality +# using u-boot scripting, environment variables and "fdt" command + diff --git a/patch/kernel/archive/meson64-6.4/overlay/meson-g12-gxl-cma-pool-896MB.dts b/patch/kernel/archive/meson64-6.4/overlay/meson-g12-gxl-cma-pool-896MB.dts new file mode 100644 index 0000000000..f8c476b04e --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/meson-g12-gxl-cma-pool-896MB.dts @@ -0,0 +1,19 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "amlogic,g12a", "amlogic,g12b", "amlogic,meson-gxl"; + + fragment@0 { + target-path = "/reserved-memory"; + __overlay__ { + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x38000000>; + alignment = <0x0 0x400000>; + linux,cma-default; + }; + }; + }; +}; diff --git a/patch/kernel/archive/meson64-6.4/overlay/meson-i2cA.dts b/patch/kernel/archive/meson64-6.4/overlay/meson-i2cA.dts new file mode 100644 index 0000000000..bfb72feb7e --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/meson-i2cA.dts @@ -0,0 +1,17 @@ +/dts-v1/; + +/ { + compatible = "amlogic,meson-gxbb"; + fragment@0 { + target-path = "/aliases"; + __overlay__ { + i2cA = "/soc/bus@c1100000/i2c@8500"; + }; + }; + fragment@1 { + target-path = "/soc/bus@c1100000/i2c@8500"; + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/patch/kernel/archive/meson64-6.4/overlay/meson-i2cB.dts b/patch/kernel/archive/meson64-6.4/overlay/meson-i2cB.dts new file mode 100644 index 0000000000..d75867bce9 --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/meson-i2cB.dts @@ -0,0 +1,17 @@ +/dts-v1/; + +/ { + compatible = "amlogic,meson-gxbb"; + fragment@0 { + target-path = "/aliases"; + __overlay__ { + i2cA = "/soc/bus@c1100000/i2c@87c0"; + }; + }; + fragment@1 { + target-path = "/soc/bus@c1100000/i2c@87c0"; + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/patch/kernel/archive/meson64-6.4/overlay/meson-uartA.dts b/patch/kernel/archive/meson64-6.4/overlay/meson-uartA.dts new file mode 100644 index 0000000000..3aecd60aaf --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/meson-uartA.dts @@ -0,0 +1,11 @@ +/dts-v1/; + +/ { + compatible = "amlogic,meson-gxbb"; + fragment@0 { + target-path = "/soc/bus@c1100000/serial@84c0"; + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/patch/kernel/archive/meson64-6.4/overlay/meson-uartC.dts b/patch/kernel/archive/meson64-6.4/overlay/meson-uartC.dts new file mode 100644 index 0000000000..2b40ee4c02 --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/meson-uartC.dts @@ -0,0 +1,11 @@ +/dts-v1/; + +/ { + compatible = "amlogic,meson-gxbb"; + fragment@0 { + target-path = "/soc/bus@c1100000/serial@8700"; + __overlay__ { + status = "okay"; + }; + }; +}; diff --git a/patch/kernel/archive/meson64-6.4/overlay/meson-w1-gpio.dts b/patch/kernel/archive/meson64-6.4/overlay/meson-w1-gpio.dts new file mode 100644 index 0000000000..ac76a4f20a --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/meson-w1-gpio.dts @@ -0,0 +1,20 @@ +// Definitions for w1-gpio module (without external pullup) +/dts-v1/; +/plugin/; + +/ { + compatible = "amlogic,meson-gxbb"; + + fragment@0 { + target-path = "/"; + __overlay__ { + + w1: onewire@0 { + compatible = "w1-gpio"; + pinctrl-names = "default"; + gpios = <&gpio 91 6>; // GPIOY_16 + status = "okay"; + }; + }; + }; +}; diff --git a/patch/kernel/archive/meson64-6.4/overlay/meson-w1AB-gpio.dts b/patch/kernel/archive/meson64-6.4/overlay/meson-w1AB-gpio.dts new file mode 100644 index 0000000000..f6b0d7eff1 --- /dev/null +++ b/patch/kernel/archive/meson64-6.4/overlay/meson-w1AB-gpio.dts @@ -0,0 +1,32 @@ +// Definitions for w1-gpio module (without external pullup) +/dts-v1/; +/plugin/; + +/ { + compatible = "amlogic,meson-gxbb"; + + fragment@0 { + target-path = "/"; + __overlay__ { + + w1a: onewire@0 { + compatible = "w1-gpio"; + pinctrl-names = "default"; + gpios = <&gpio 91 6>; // GPIOY_16 + status = "okay"; + }; + }; + }; + fragment@1 { + target-path = "/"; + __overlay__ { + + w1b: onewire@1 { + compatible = "w1-gpio"; + pinctrl-names = "default"; + gpios = <&gpio 90 6>; // GPIOY_15 + status = "okay"; + }; + }; + }; +};