From 9b9011eb5d46726f997e0abcbf0145ec71e65143 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 14 Jan 2024 09:11:47 +0100 Subject: [PATCH] meson64: 6.6 current: added `-spidev` DT's for a few boards & cleanup 0000.patching_config.yaml - gives access to SPI Flash in exchange for slower eMMC - cleanup 0000.patching_config.yaml for meson64-6.6 --- .../meson64-6.6/0000.patching_config.yaml | 17 ++++------- .../dt/meson-g12a-radxa-zero-spidev.dts | 29 +++++++++++++++++++ .../meson-g12b-a311d-khadas-vim3-spidev.dts | 29 +++++++++++++++++++ .../dt/meson-g12b-odroid-n2-plus-spidev.dts | 21 ++++++++++++++ .../dt/meson-g12b-radxa-zero2-spidev.dts | 29 +++++++++++++++++++ .../dt/meson-sm1-khadas-vim3l-spidev.dts | 29 +++++++++++++++++++ .../dt/meson-sm1-odroid-c4-spidev.dts | 24 +++++++++++++++ 7 files changed, 167 insertions(+), 11 deletions(-) create mode 100644 patch/kernel/archive/meson64-6.6/dt/meson-g12a-radxa-zero-spidev.dts create mode 100644 patch/kernel/archive/meson64-6.6/dt/meson-g12b-a311d-khadas-vim3-spidev.dts create mode 100644 patch/kernel/archive/meson64-6.6/dt/meson-g12b-odroid-n2-plus-spidev.dts create mode 100644 patch/kernel/archive/meson64-6.6/dt/meson-g12b-radxa-zero2-spidev.dts create mode 100644 patch/kernel/archive/meson64-6.6/dt/meson-sm1-khadas-vim3l-spidev.dts create mode 100644 patch/kernel/archive/meson64-6.6/dt/meson-sm1-odroid-c4-spidev.dts diff --git a/patch/kernel/archive/meson64-6.6/0000.patching_config.yaml b/patch/kernel/archive/meson64-6.6/0000.patching_config.yaml index 23f640762d..982cb031a9 100644 --- a/patch/kernel/archive/meson64-6.6/0000.patching_config.yaml +++ b/patch/kernel/archive/meson64-6.6/0000.patching_config.yaml @@ -1,30 +1,25 @@ -config: # This is file 'patch/kernel/archive/meson64-6.4/0000.patching_config.yaml' +config: # Just some info stuff; not used by the patching scripts - name: meson64-6.4 + name: meson64-6.6 kind: kernel type: mainline # or: vendor - branch: linux-6.4.y - last-known-good-tag: v6.4-rc5 + branch: linux-6.6.y + last-known-good-tag: v6.6.11 maintainers: - { github: rpardini, name: Ricardo Pardini, email: ricardo@pardini.net, armbian-forum: rpardini } - # Automatic grabbing of patches from mailing lists, using 'b4' tool 'am' command. - # Patches will be grabbed and written to disk in the order they are listed here, before any other processing is done. - #b4-am: - # - { prefix: "0666", lore: "https://lore.kernel.org/r/20230706-topic-amlogic-upstream-dt-fixes-take3-v1-0-63ed070eeab2@linaro.org" } - # .dts files in these directories will be copied as-is to the build tree; later ones overwrite earlier ones. # This is meant to provide a way to "add a board DTS" without having to null-patch them in. dts-directories: - # will copy patch/kernel/archive/meson64-6.4/dt-boards/*.dts to arch/arm64/boot/dts/amlogic + # will copy patch/kernel/archive/meson64-MAJOR.MINOR/dt-boards/*.dts to arch/arm64/boot/dts/amlogic - { source: "dt", target: "arch/arm64/boot/dts/amlogic" } # every file in these directories will be copied as-is to the build tree; later ones overwrite earlier ones # This is meant as a way to have overlays, bare, in a directory, without having to null-patch them in. # @TODO need a solution to auto-Makefile the overlays as well overlay-directories: - # will copy patch/kernel/archive/meson64-6.4/overlay/**/* to arch/arm64/boot/dts/amlogic/overlay + # will copy patch/kernel/archive/meson64-MAJOR.MINOR/overlay/**/* to arch/arm64/boot/dts/amlogic/overlay - { source: "overlay", target: "arch/arm64/boot/dts/amlogic/overlay" } # the Makefile in each of these directories will be magically patched to include the dts files copied diff --git a/patch/kernel/archive/meson64-6.6/dt/meson-g12a-radxa-zero-spidev.dts b/patch/kernel/archive/meson64-6.6/dt/meson-g12a-radxa-zero-spidev.dts new file mode 100644 index 0000000000..5ee13525d1 --- /dev/null +++ b/patch/kernel/archive/meson64-6.6/dt/meson-g12a-radxa-zero-spidev.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "meson-g12a-radxa-zero.dts" + +/ { + model = "Radxa Zero with SPIDEV and I2C - MOSI pin 19, CLK pin 23 - SDA pin 3, SCL pin 5"; +}; + +&spicc1 { + pinctrl-0 = <&spicc1_pins &spicc1_ss0_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spidev@0 { + compatible = "armbian,spi-dev"; + status = "okay"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; + +&i2c3 { + status = "okay"; + pinctrl-0 = <&i2c3_sck_a_pins &i2c3_sda_a_pins>; + pinctrl-names = "default"; +}; diff --git a/patch/kernel/archive/meson64-6.6/dt/meson-g12b-a311d-khadas-vim3-spidev.dts b/patch/kernel/archive/meson64-6.6/dt/meson-g12b-a311d-khadas-vim3-spidev.dts new file mode 100644 index 0000000000..8982a04c9d --- /dev/null +++ b/patch/kernel/archive/meson64-6.6/dt/meson-g12b-a311d-khadas-vim3-spidev.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "meson-g12b-a311d-khadas-vim3.dts" + +/ { + model = "Khadas VIM3 with SPIDEV and I2C - MOSI pin 37, CLK pin 16 - SDA pin 23, SCL pin 23"; +}; + +&spicc1 { + pinctrl-0 = <&spicc1_pins &spicc1_ss0_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spidev@0 { + compatible = "armbian,spi-dev"; + status = "okay"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; + +&i2c3 { + status = "okay"; + pinctrl-0 = <&i2c3_sck_a_pins &i2c3_sda_a_pins>; + pinctrl-names = "default"; +}; diff --git a/patch/kernel/archive/meson64-6.6/dt/meson-g12b-odroid-n2-plus-spidev.dts b/patch/kernel/archive/meson64-6.6/dt/meson-g12b-odroid-n2-plus-spidev.dts new file mode 100644 index 0000000000..a87ddd4647 --- /dev/null +++ b/patch/kernel/archive/meson64-6.6/dt/meson-g12b-odroid-n2-plus-spidev.dts @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "meson-g12b-odroid-n2-plus.dts" + +/ { + model = "Hardkernel ODROID-N2Plus with SPIDEV - MISO is pin 19, CLK is pin 23"; +}; + +&spicc0 { + cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; + status = "okay"; + spidev@0 { + compatible = "armbian,spi-dev"; + status = "okay"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; + diff --git a/patch/kernel/archive/meson64-6.6/dt/meson-g12b-radxa-zero2-spidev.dts b/patch/kernel/archive/meson64-6.6/dt/meson-g12b-radxa-zero2-spidev.dts new file mode 100644 index 0000000000..0d16cde214 --- /dev/null +++ b/patch/kernel/archive/meson64-6.6/dt/meson-g12b-radxa-zero2-spidev.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "meson-g12b-radxa-zero2.dts" + +/ { + model = "Radxa Zero2 with SPIDEV and I2C - MOSI pin 19, CLK pin 23 - SDA pin 3, SCL pin 5"; +}; + +&spicc1 { + pinctrl-0 = <&spicc1_pins &spicc1_ss0_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spidev@0 { + compatible = "armbian,spi-dev"; + status = "okay"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; + +&i2c3 { + status = "okay"; + pinctrl-0 = <&i2c3_sck_a_pins &i2c3_sda_a_pins>; + pinctrl-names = "default"; +}; diff --git a/patch/kernel/archive/meson64-6.6/dt/meson-sm1-khadas-vim3l-spidev.dts b/patch/kernel/archive/meson64-6.6/dt/meson-sm1-khadas-vim3l-spidev.dts new file mode 100644 index 0000000000..e7a0f5a3fc --- /dev/null +++ b/patch/kernel/archive/meson64-6.6/dt/meson-sm1-khadas-vim3l-spidev.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "meson-sm1-khadas-vim3l.dts" + +/ { + model = "Khadas VIM3L with SPIDEV and I2C - MOSI pin 37, CLK pin 16 - SDA pin 23, SCL pin 23"; +}; + +&spicc1 { + pinctrl-0 = <&spicc1_pins &spicc1_ss0_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spidev@0 { + compatible = "armbian,spi-dev"; + status = "okay"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; + +&i2c3 { + status = "okay"; + pinctrl-0 = <&i2c3_sck_a_pins &i2c3_sda_a_pins>; + pinctrl-names = "default"; +}; diff --git a/patch/kernel/archive/meson64-6.6/dt/meson-sm1-odroid-c4-spidev.dts b/patch/kernel/archive/meson64-6.6/dt/meson-sm1-odroid-c4-spidev.dts new file mode 100644 index 0000000000..4688b40052 --- /dev/null +++ b/patch/kernel/archive/meson64-6.6/dt/meson-sm1-odroid-c4-spidev.dts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "meson-sm1-odroid-c4.dts" + +/ { + model = "Hardkernel ODROID-C4 - MOSI is pin y, CLK is pin x"; +}; + +&spicc1 { + pinctrl-0 = <&spicc1_pins &spicc1_ss0_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spidev@0 { + compatible = "armbian,spi-dev"; + status = "okay"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; +