From 44bf0e175f8cf7152310110602f20aa66067ecfa Mon Sep 17 00:00:00 2001 From: Michael Boehmer Date: Mon, 16 Sep 2024 17:40:26 +0200 Subject: [PATCH 1/2] overlay for C4 SPI --- .../archive/meson64-6.6/overlay/Makefile | 3 ++- .../meson-sm1-odroid-c4-spi-spidev.dts | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 patch/kernel/archive/meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts diff --git a/patch/kernel/archive/meson64-6.6/overlay/Makefile b/patch/kernel/archive/meson64-6.6/overlay/Makefile index 1373e070c6b9..66334cd54669 100644 --- a/patch/kernel/archive/meson64-6.6/overlay/Makefile +++ b/patch/kernel/archive/meson64-6.6/overlay/Makefile @@ -29,7 +29,8 @@ dtbo-$(CONFIG_ARCH_MESON) += \ meson-sm1-bananapi-m5-rtl8822cs.dtbo \ meson-sm1-bananapi-uartA.dtbo \ meson-sm1-bananapi-uartA_cts_rts.dtbo \ - meson-sm1-bananapi-uartAO_B.dtbo + meson-sm1-bananapi-uartAO_B.dtbo \ + meson-sm1-odroid-c4-spi-spidev.dtbo scr-$(CONFIG_ARCH_MESON) += \ meson-fixup.scr diff --git a/patch/kernel/archive/meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts b/patch/kernel/archive/meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts new file mode 100644 index 000000000000..24aa9375666f --- /dev/null +++ b/patch/kernel/archive/meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts @@ -0,0 +1,22 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "hardkernel,odroid-c4", "amlogic,sm1"; + + fragment@0 { + target = <&spicc0>; + __overlay__ { + pinctrl-0 = <&spicc0_x_pins &spicc0_ss0_x_pins>; + pinctrl-names = "default"; + status = "okay"; + + spidev@0 { + compatible = "armbian,spi-dev"; + status = "okay"; + reg = <0>; + spi-max-frequency = <10000000>; + }; + }; + }; +}; From 763b83e2006bf6e181bf291ccf6ef22f507c555b Mon Sep 17 00:00:00 2001 From: Michael Boehmer Date: Mon, 16 Sep 2024 20:07:17 +0200 Subject: [PATCH 2/2] max speed set to 12MHz as verified by LogicPort --- .../meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patch/kernel/archive/meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts b/patch/kernel/archive/meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts index 24aa9375666f..01fa907be94f 100644 --- a/patch/kernel/archive/meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts +++ b/patch/kernel/archive/meson64-6.6/overlay/meson-sm1-odroid-c4-spi-spidev.dts @@ -15,7 +15,7 @@ compatible = "armbian,spi-dev"; status = "okay"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <12000000>; }; }; };