From 98a3afbd797c0a891a9bd74902f05921f204e3e9 Mon Sep 17 00:00:00 2001 From: Dongjin Kim Date: Wed, 10 Feb 2021 05:55:12 +0000 Subject: [PATCH 081/109] ODROID-N2/C4: arm64/dts: add device tree overlay for SPI0 Signed-off-by: Dongjin Kim Change-Id: I6aac29505b9ce8a867c95dff0a304f37ff1bcfef --- arch/arm64/boot/dts/amlogic/Makefile | 3 +++ .../dts/amlogic/overlays/odroidc4/Makefile | 5 +++++ .../dts/amlogic/overlays/odroidc4/spi0.dts | 21 +++++++++++++++++++ .../dts/amlogic/overlays/odroidn2/Makefile | 5 +++++ .../dts/amlogic/overlays/odroidn2/spi0.dts | 21 +++++++++++++++++++ 5 files changed, 55 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/spi0.dts create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/spi0.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 3a9671f3a292..73767f68eaa2 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -56,3 +56,6 @@ dtb-$(CONFIG_ARCH_MESON) += meson64_odroidc4.dtb dtb-$(CONFIG_ARCH_MESON) += meson64_odroidhc4.dtb dtb-$(CONFIG_ARCH_MESON) += meson64_odroidn2.dtb dtb-$(CONFIG_ARCH_MESON) += meson64_odroidn2_plus.dtb + +subdir-y += overlays/odroidc4 +subdir-y += overlays/odroidn2 diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile new file mode 100644 index 000000000000..fc1a76db000d --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile @@ -0,0 +1,5 @@ +dtbo-y += \ + spi0.dtbo + +targets += $(dtbo-y) +always-y := $(dtbo-y) diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/spi0.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/spi0.dts new file mode 100644 index 000000000000..da9817758bea --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/spi0.dts @@ -0,0 +1,21 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target = <&spicc0>; + + __overlay__ { + status = "okay"; + + cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; + + spidev: spidev@0 { + spi-max-frequency = <100000000>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile new file mode 100644 index 000000000000..fc1a76db000d --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile @@ -0,0 +1,5 @@ +dtbo-y += \ + spi0.dtbo + +targets += $(dtbo-y) +always-y := $(dtbo-y) diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/spi0.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/spi0.dts new file mode 100644 index 000000000000..da9817758bea --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/spi0.dts @@ -0,0 +1,21 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target = <&spicc0>; + + __overlay__ { + status = "okay"; + + cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; + + spidev: spidev@0 { + spi-max-frequency = <100000000>; + }; + }; + }; +}; -- 2.25.1