125 lines
3.8 KiB
Diff
125 lines
3.8 KiB
Diff
|
From 14516c8f925fc5b792459ff82de05a3df0af9c39 Mon Sep 17 00:00:00 2001
|
||
|
From: Dongjin Kim <tobetter@gmail.com>
|
||
|
Date: Mon, 15 Feb 2021 05:46:24 +0000
|
||
|
Subject: [PATCH 084/109] ODROID-N2/C4: arm64/dts: add device tree overlay for
|
||
|
SX865x resistive touch screen
|
||
|
|
||
|
Change-Id: Ie9628a065791e5043c7086ce9820db3b64e1b1bc
|
||
|
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
||
|
---
|
||
|
.../dts/amlogic/overlays/odroidc4/Makefile | 1 +
|
||
|
.../amlogic/overlays/odroidc4/sx865x-i2c1.dts | 34 +++++++++++++++++++
|
||
|
.../dts/amlogic/overlays/odroidn2/Makefile | 3 +-
|
||
|
.../amlogic/overlays/odroidn2/sx865x-i2c1.dts | 34 +++++++++++++++++++
|
||
|
4 files changed, 71 insertions(+), 1 deletion(-)
|
||
|
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/sx865x-i2c1.dts
|
||
|
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidn2/sx865x-i2c1.dts
|
||
|
|
||
|
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
|
||
|
index e82456f99f2f..e466486632de 100644
|
||
|
--- a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
|
||
|
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
|
||
|
@@ -1,5 +1,6 @@
|
||
|
dtbo-y += \
|
||
|
spi0.dtbo \
|
||
|
+ sx865x-i2c1.dtbo \
|
||
|
hktft32.dtbo \
|
||
|
hktft35.dtbo
|
||
|
|
||
|
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/odroidn2/Makefile b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
|
||
|
index 64462609b8c7..1bbd8e741230 100644
|
||
|
--- a/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
|
||
|
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidn2/Makefile
|
||
|
@@ -1,6 +1,7 @@
|
||
|
dtbo-y += \
|
||
|
hktft35.dtbo \
|
||
|
- spi0.dtbo
|
||
|
+ spi0.dtbo \
|
||
|
+ sx865x-i2c1.dtbo
|
||
|
|
||
|
targets += $(dtbo-y)
|
||
|
always-y := $(dtbo-y)
|
||
|
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;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+};
|
||
|
--
|
||
|
2.25.1
|
||
|
|