build/patch/kernel/archive/odroidxu4-5.15/0062-ODROID-N2-C4-arm64-dts-add-device-tree-overlay-suppo.patch

765 lines
20 KiB
Diff

From 3ff0a5ad46ad05c9e287490f74ddc475bf9287c1 Mon Sep 17 00:00:00 2001
From: Dongjin Kim <tobetter@gmail.com>
Date: Wed, 10 Feb 2021 05:55:12 +0000
Subject: [PATCH 62/75] ODROID-N2/C4: arm64/dts: add device tree overlay
support
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I325baa8ec879f6a004049d1fe0a8d79fdd5542cc
---
arch/arm64/boot/dts/amlogic/Makefile | 3 +
.../dts/amlogic/overlays/odroidc4/Makefile | 12 ++++
.../amlogic/overlays/odroidc4/hifishield2.dts | 67 +++++++++++++++++++
.../dts/amlogic/overlays/odroidc4/hktft32.dts | 33 +++++++++
.../dts/amlogic/overlays/odroidc4/hktft35.dts | 53 +++++++++++++++
.../dts/amlogic/overlays/odroidc4/pcf8563.dts | 23 +++++++
.../dts/amlogic/overlays/odroidc4/spi0.dts | 21 ++++++
.../amlogic/overlays/odroidc4/sx865x-i2c1.dts | 34 ++++++++++
.../amlogic/overlays/odroidc4/w1-gpio_p15.dts | 34 ++++++++++
.../amlogic/overlays/odroidc4/w1-gpio_p22.dts | 34 ++++++++++
.../dts/amlogic/overlays/odroidn2/Makefile | 13 ++++
.../dts/amlogic/overlays/odroidn2/hktft35.dts | 53 +++++++++++++++
.../dts/amlogic/overlays/odroidn2/pwm_cd.dts | 24 +++++++
.../dts/amlogic/overlays/odroidn2/pwm_ef.dts | 24 +++++++
.../dts/amlogic/overlays/odroidn2/spi0.dts | 21 ++++++
.../amlogic/overlays/odroidn2/sx865x-i2c1.dts | 34 ++++++++++
.../dts/amlogic/overlays/odroidn2/uart0.dts | 13 ++++
.../dts/amlogic/overlays/odroidn2/uart1.dts | 13 ++++
.../amlogic/overlays/odroidn2/w1-gpio_p15.dts | 34 ++++++++++
.../amlogic/overlays/odroidn2/w1-gpio_p22.dts | 34 ++++++++++
.../boot/dts/amlogic/overlays/odroidn2_plus | 1 +
21 files changed, 578 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/hifishield2.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/hktft32.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/hktft35.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/pcf8563.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/spi0.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/sx865x-i2c1.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p15.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p22.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/hktft35.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/pwm_cd.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/pwm_ef.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/spi0.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/sx865x-i2c1.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/uart0.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/uart1.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p15.dts
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p22.dts
create mode 120000 arch/arm64/boot/dts/amlogic/overlays/odroidn2_plus
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 7fd3719df452..951d5ba00263 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -60,3 +60,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..ed4aa42b6722
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
@@ -0,0 +1,12 @@
+dtbo-y += \
+ hktft32.dtbo \
+ hktft35.dtbo \
+ pcf8563.dtbo \
+ spi0.dtbo \
+ sx865x-i2c1.dtbo \
+ w1-gpio_p15.dtbo \
+ w1-gpio_p22.dtbo \
+ hifishield2.dtbo
+
+targets += $(dtbo-y)
+always-y := $(dtbo-y)
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hifishield2.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hifishield2.dts
new file mode 100644
index 000000000000..e1b94d6d0b34
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hifishield2.dts
@@ -0,0 +1,67 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/clock/axg-audio-clkc.h>
+
+/ {
+ fragment@0 {
+ // i2c2 aliased with i2c0.
+ target = <&i2c2>;
+
+ __overlay__ {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pcm5122: pcm5122@4c {
+ #sound-dai-cells = <0>;
+ compatible = "ti,pcm5122";
+ reg = <0x4c>;
+ AVDD-supply = <&vddao_3v3>;
+ DVDD-supply = <&vddao_3v3>;
+ CPVDD-supply = <&vddao_3v3>;
+
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@1 {
+ // add pcm5122 as seconday dai link to HDMI
+ target-path = "/sound";
+
+ sound_overlay: __overlay__ {
+
+ dai-link-3 {
+ codec-2 {
+ sound-dai = <&pcm5122>;
+ };
+ };
+ };
+ };
+
+ fragment@2 {
+ // set I2S master clocks and output on AO pins
+ target = <&tdmif_b>;
+
+ __overlay__ {
+ status = "okay";
+
+ pinctrl-0 = <&mclk0_ao_pins>,
+ <&tdm_ao_b_fs_pins>,
+ <&tdm_ao_b_sclk_pins>,
+ <&tdm_ao_b_dout0_pins>;
+
+ pinctrl-names = "default";
+
+ assigned-clocks = <&clkc_audio AUD_CLKID_TDM_MCLK_PAD0>,
+ <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
+ <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
+ assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+ assigned-clock-rates = <0>, <0>, <0>;
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hktft32.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hktft32.dts
new file mode 100644
index 000000000000..b4dc1a55862d
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hktft32.dts
@@ -0,0 +1,33 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ fragment@0 {
+ target = <&spicc0>;
+
+ __overlay__ {
+ status = "okay";
+
+ cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
+
+ display: display@0 {
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+
+ status = "okay";
+
+ compatible = "hardkernel,hktft32";
+ reg = <0>;
+
+ spi-max-frequency = <40000000>;
+ rotation = <90>;
+ reset-gpios = <&gpio GPIOX_4 GPIO_ACTIVE_HIGH>;
+ dc-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+};
+
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hktft35.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hktft35.dts
new file mode 100644
index 000000000000..0fb34f609c79
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hktft35.dts
@@ -0,0 +1,53 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ fragment@0 {
+ target-path = "/";
+
+ __overlay__ {
+ backlight: backlight {
+ compatible = "gpio-backlight";
+ gpios = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>;
+ };
+
+ display: display {
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ status = "okay";
+ compatible = "hardkernel,ili9488";
+ reg = <0x0 0xff63445c 0x0 0x04>;
+
+ rotate = <270>;
+ backlight = <&backlight>;
+
+ db-bits-0 = <0x00000002>;
+ db-bits-1 = <0x00000004>;
+ db-bits-2 = <0x00000001>;
+ db-bits-3 = <0x00000800>;
+ db-bits-4 = <0x00000200>;
+ db-bits-5 = <0x00000100>;
+ db-bits-6 = <0x00000080>;
+ db-bits-7 = <0x00000010>;
+ db-bits-wr = <0x00000400>;
+
+ reset-gpios = <&gpio GPIOX_3 GPIO_ACTIVE_HIGH>;
+ dc-gpios = <&gpio GPIOX_14 GPIO_ACTIVE_HIGH>;
+ wr-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
+ cs-gpios = <&gpio GPIOX_16 GPIO_ACTIVE_HIGH>;
+ db-gpios = <&gpio GPIOX_1 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_11 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_9 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_4 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/pcf8563.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/pcf8563.dts
new file mode 100644
index 000000000000..6fe883a62b2b
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/pcf8563.dts
@@ -0,0 +1,23 @@
+
+/dts-v1/;
+/plugin/;
+
+/ {
+ fragment@0 {
+ // i2c2 aliased with i2c0.
+ target = <&i2c2>;
+
+ __overlay__ {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pcf8563: rtc@51 {
+ status = "okay";
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ };
+ };
+ };
+};
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 <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ 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/odroidc4/sx865x-i2c1.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/sx865x-i2c1.dts
new file mode 100644
index 000000000000..4b5e399bae62
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/sx865x-i2c1.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ fragment@0 {
+ target = <&i2c3>;
+
+ __overlay__ {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sx865x: sx865x@49 {
+ status = "okay";
+ compatible = "semtech,sx8650";
+ reg = <0x49>;
+ #clock-cells = <0>;
+
+ interrupt-parent = <&gpio_intc>;
+ /* GPIOH_5 */
+ interrupts = <33 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
+
+ touchscreen-inverted-x;
+ touchscreen-swapped-x-y;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p15.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p15.dts
new file mode 100644
index 000000000000..6134f057cdfc
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p15.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ fragment@0 {
+ target = <&pwm_f_x_pins>;
+
+ __overlay__ {
+ mux {
+ groups = "GPIOX_7";
+ function = "gpio_periphs";
+ bias-disable;
+ drive-strength-microamp = <4000>;
+ };
+ };
+ };
+
+ fragment@1 {
+ target-path = "/";
+
+ __overlay__ {
+ onewire: onewire {
+ compatible = "w1-gpio";
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pdm_din1_x_pins>;
+ gpios = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p22.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p22.dts
new file mode 100644
index 000000000000..14e700b10a48
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/w1-gpio_p22.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ fragment@0 {
+ target = <&pdm_din1_x_pins>;
+
+ __overlay__ {
+ mux {
+ groups = "GPIOX_2";
+ function = "gpio_periphs";
+ bias-disable;
+ drive-strength-microamp = <4000>;
+ };
+ };
+ };
+
+ fragment@1 {
+ target-path = "/";
+
+ __overlay__ {
+ onewire: onewire {
+ compatible = "w1-gpio";
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pdm_din1_x_pins>;
+ gpios = <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+};
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..6237323ced01
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
@@ -0,0 +1,13 @@
+dtbo-y += \
+ hktft35.dtbo \
+ spi0.dtbo \
+ pwm_cd.dtbo \
+ pwm_ef.dtbo \
+ uart0.dtbo \
+ uart1.dtbo \
+ sx865x-i2c1.dtbo \
+ w1-gpio_p15.dtbo \
+ w1-gpio_p22.dtbo
+
+targets += $(dtbo-y)
+always-y := $(dtbo-y)
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/hktft35.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/hktft35.dts
new file mode 100644
index 000000000000..3dfc3c8e5eb2
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/hktft35.dts
@@ -0,0 +1,53 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ fragment@0 {
+ target-path = "/";
+
+ __overlay__ {
+ backlight: backlight {
+ compatible = "gpio-backlight";
+ gpios = <&gpio GPIOX_5 GPIO_ACTIVE_HIGH>;
+ };
+
+ display: display {
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ status = "okay";
+ compatible = "hardkernel,ili9488";
+ reg = <0x0 0xff63445c 0x0 0x04>;
+
+ rotate = <270>;
+ backlight = <&backlight>;
+
+ db-bits-0 = <0x00000002>;
+ db-bits-1 = <0x00000004>;
+ db-bits-2 = <0x00000001>;
+ db-bits-3 = <0x00000800>;
+ db-bits-4 = <0x00000200>;
+ db-bits-5 = <0x00000100>;
+ db-bits-6 = <0x00000080>;
+ db-bits-7 = <0x00000010>;
+ db-bits-wr = <0x00000400>;
+
+ reset-gpios = <&gpio GPIOX_3 GPIO_ACTIVE_HIGH>;
+ dc-gpios = <&gpio GPIOX_14 GPIO_ACTIVE_HIGH>;
+ wr-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
+ cs-gpios = <&gpio GPIOX_16 GPIO_ACTIVE_HIGH>;
+ db-gpios = <&gpio GPIOX_1 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_11 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_9 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>,
+ <&gpio GPIOX_4 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/pwm_cd.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/pwm_cd.dts
new file mode 100644
index 000000000000..aadf685f131b
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/pwm_cd.dts
@@ -0,0 +1,24 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ fragment@0 {
+ target = <&pwm_cd>;
+
+ __overlay__ {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_c_x5_pins &pwm_d_x6_pins>;
+ pinctrl-1 = <&pwmcd_to_gpios>;
+ clocks = <&xtal>,
+ <&xtal>,
+ <&xtal>,
+ <&xtal>;
+ clock-names = "clkin0",
+ "clkin1",
+ "clkin2",
+ "clkin3";
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/pwm_ef.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/pwm_ef.dts
new file mode 100644
index 000000000000..b25d1c45d95f
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/pwm_ef.dts
@@ -0,0 +1,24 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ fragment@0 {
+ target = <&pwm_ef>;
+
+ __overlay__ {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_e_pins &pwm_f_x_pins>;
+ pinctrl-1 = <&pwmef_to_gpios>;
+ clocks = <&xtal>,
+ <&xtal>,
+ <&xtal>,
+ <&xtal>;
+ clock-names = "clkin0",
+ "clkin1",
+ "clkin2",
+ "clkin3";
+ };
+ };
+};
\ No newline at end of file
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 <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ 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/sx865x-i2c1.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/sx865x-i2c1.dts
new file mode 100644
index 000000000000..981c61338c6d
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/sx865x-i2c1.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ fragment@0 {
+ target = <&i2c3>;
+
+ __overlay__ {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sx865x: sx865x@49 {
+ status = "okay";
+ compatible = "semtech,sx8650";
+ reg = <0x49>;
+ #clock-cells = <0>;
+
+ interrupt-parent = <&gpio_intc>;
+ /* GPIOX_19 */
+ interrupts = <96 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&gpio GPIOA_12 GPIO_ACTIVE_LOW>;
+
+ touchscreen-inverted-x;
+ touchscreen-swapped-x-y;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/uart0.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/uart0.dts
new file mode 100644
index 000000000000..a9cb3fb41077
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/uart0.dts
@@ -0,0 +1,13 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ fragment@0 {
+ target = <&uart_A>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
+
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/uart1.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/uart1.dts
new file mode 100644
index 000000000000..c1d25f9bee4c
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/uart1.dts
@@ -0,0 +1,13 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ fragment@0 {
+ target = <&uart_B>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
+
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p15.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p15.dts
new file mode 100644
index 000000000000..6134f057cdfc
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p15.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ fragment@0 {
+ target = <&pwm_f_x_pins>;
+
+ __overlay__ {
+ mux {
+ groups = "GPIOX_7";
+ function = "gpio_periphs";
+ bias-disable;
+ drive-strength-microamp = <4000>;
+ };
+ };
+ };
+
+ fragment@1 {
+ target-path = "/";
+
+ __overlay__ {
+ onewire: onewire {
+ compatible = "w1-gpio";
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pdm_din1_x_pins>;
+ gpios = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p22.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p22.dts
new file mode 100644
index 000000000000..14e700b10a48
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/w1-gpio_p22.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ fragment@0 {
+ target = <&pdm_din1_x_pins>;
+
+ __overlay__ {
+ mux {
+ groups = "GPIOX_2";
+ function = "gpio_periphs";
+ bias-disable;
+ drive-strength-microamp = <4000>;
+ };
+ };
+ };
+
+ fragment@1 {
+ target-path = "/";
+
+ __overlay__ {
+ onewire: onewire {
+ compatible = "w1-gpio";
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pdm_din1_x_pins>;
+ gpios = <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidn2_plus b/arch/arm64/boot/dts/amlogic/overlays/odroidn2_plus
new file mode 120000
index 000000000000..2583b0c5131c
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2_plus
@@ -0,0 +1 @@
+odroidn2
\ No newline at end of file
--
2.25.1