From bedefd8169b607f86f9f79460166e1667480dcdd Mon Sep 17 00:00:00 2001 From: Lee Seungcheol Date: Thu, 6 Jan 2022 11:37:31 +0900 Subject: [PATCH] ODROID-M1: dtb/dtbo: add hktft32 and ads7846 dtbo for Hardkernel 3.2 inch TFT LCD Signed-off-by: Steve Jeong Change-Id: Ia98cce979e2f66044af217ac392d35e15283f999 --- .../dts/rockchip/overlays/odroidm1/Makefile | 1 + .../rockchip/overlays/odroidm1/hktft32.dts | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/overlays/odroidm1/hktft32.dts diff --git a/arch/arm64/boot/dts/rockchip/overlays/odroidm1/Makefile b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/Makefile index 3c7ba7e3b98a..ca31bce50d2f 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/odroidm1/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/Makefile @@ -4,6 +4,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP_ODROIDM1) += \ blueled_off.dtbo \ can0.dtbo \ dht11.dtbo \ + hktft32.dtbo \ i2c0.dtbo \ i2c1.dtbo \ mcp2515.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlays/odroidm1/hktft32.dts b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/hktft32.dts new file mode 100644 index 000000000000..d9cea60109ef --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlays/odroidm1/hktft32.dts @@ -0,0 +1,54 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/{ + fragment@0 { + target = <&spi0>; + + __overlay__ { + status = "okay"; + + num_chipselect = <2>; + cs-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_LOW>, + <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>; + + #address-cells = <1>; + #size-cells = <0>; + + hktft32: hktft32@0 { + status = "okay"; + compatible = "hardkernel,hktft32"; + reg = <0>; + spi-max-frequency = <40000000>; + rotation = <90>; + reset-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; + dc-gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>; + }; + + ads7846: ads7846@1 { + status = "okay"; + compatible = "ti,ads7846"; + + spi-max-frequency = <2000000>; + reg = <1>; + + interrupt-parent = <&gpio0>; + interrupts = ; + pendown-gpio = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; + + ti,swap-xy = <1>; + ti,x-min = /bits/ 16 <0>; + ti,x-max = /bits/ 16 <8000>; + ti,y-min = /bits/ 16 <0>; + ti,y-max = /bits/ 16 <4800>; + ti,x-plate-ohms = /bits/ 16 <40>; + ti,pressure-max = /bits/ 16 <255>; + + linux,wakeup; + }; + }; + }; +};