From: Gongwei Chen Date: Tue, 7 May 2019 10:59:02 +0000 (+0800) Subject: dts: add touch screen dts config for CST226 [1/1] X-Git-Tag: hardkernel-4.9.236-104~1262 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55f3adab83c3e315fbbfb661f759170d75dec2ea;p=platform%2Fkernel%2Flinux-amlogic.git dts: add touch screen dts config for CST226 [1/1] PD#SWPL-8013 Problem: separate dts config from driver Solution: separate dts config from driver Verify: verify by u202 Change-Id: I4de45ec213b86d12cdd9296f80de62f4f2dc6713 Signed-off-by: GongWei Chen --- diff --git a/Documentation/devicetree/bindings/input/touchscreen/hyn,cst226.txt b/Documentation/devicetree/bindings/input/touchscreen/hyn,cst226.txt new file mode 100644 index 0000000..76425a6 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/hyn,cst226.txt @@ -0,0 +1,29 @@ +* Neonode infrared touchscreen controller + +Required properties: +- compatible: must be "hyn,cst226" +- reg: I2C address of the chip +- interrupts: interrupt to which the chip is connected +- reset-gpios: reset gpio the chip is connected to +- x-size: horizontal resolution of touchscreen +- y-size: vertical resolution of touchscreen + +Optional properties: +- irq-gpios : interrupt gpio the chip is connected to +- vdd-supply: Regulator controlling the controller supply + +Example: + + i2c@00000000 { + /* ... */ + + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + + /* ... */ + }; diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 3e09d25..8a410b8 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -322,3 +322,4 @@ zii Zodiac Inflight Innovations zte ZTE Corp. zyxel ZyXEL Communications Corp. rohm +hyn hyn diff --git a/MAINTAINERS b/MAINTAINERS index 55d1ae1..5d6b998 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14915,4 +14915,8 @@ F: arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202* AMLOGIC S905Y2 U223_LP DTS M: Qingwei Xu F: arm/boot/dts/amlogic/g12a_s905y2_u223_lp.dts -F: arm64/boot/dts/amlogic/g12a_s905y2_u223_lp.dts \ No newline at end of file +F: arm64/boot/dts/amlogic/g12a_s905y2_u223_lp.dts + +AMLOGIC HYN_CST2XX TOUCHSCREEN +M: XINLIANG ZHANG +F: drivers/amlogic/input/touchscreen/hyn_cst2xx/* diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_u202.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_u202.dts index ec91db29..89cddc8 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905d2_u202.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905d2_u202.dts @@ -1029,6 +1029,14 @@ pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + /* for ref board */ ad82584f_62: ad82584f_62@62 { compatible = "ESMT, ad82584f"; diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_u202_1g.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_u202_1g.dts index 91895f5..89f10e6 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905d2_u202_1g.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905d2_u202_1g.dts @@ -873,6 +873,14 @@ pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + /* for ref board */ ad82584f_62: ad82584f_62@62 { compatible = "ESMT, ad82584f"; diff --git a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202.dts b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202.dts index acd77ac..b4c97f4 100644 --- a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202.dts +++ b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202.dts @@ -1092,6 +1092,14 @@ pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + /* for ref board */ ad82584f_62: ad82584f_62@62 { compatible = "ESMT, ad82584f"; diff --git a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts index e8ffe1d..1fbfb81 100644 --- a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts +++ b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts @@ -1092,6 +1092,14 @@ pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + /* for ref board */ ad82584f_62: ad82584f_62@62 { compatible = "ESMT, ad82584f"; diff --git a/arch/arm/configs/meson64_a32_defconfig b/arch/arm/configs/meson64_a32_defconfig index 9fb0bc0..457821a 100644 --- a/arch/arm/configs/meson64_a32_defconfig +++ b/arch/arm/configs/meson64_a32_defconfig @@ -263,6 +263,7 @@ CONFIG_AMLOGIC_TOUCHSCREEN=y CONFIG_AMLOGIC_TOUCHSCREEN_FTS=y CONFIG_AMLOGIC_TOUCHSCREEN_GT1X=y CONFIG_AMLOGIC_TOUCHSCREEN_GT9XX=y +CONFIG_AMLOGIC_TOUCHSCREEN_HYN_CST2XX=y CONFIG_AMLOGIC_EFUSE=y CONFIG_AMLOGIC_REBOOT=y CONFIG_AMLOGIC_GX_REBOOT=y diff --git a/arch/arm64/boot/dts/amlogic/g12a_s905d2_u202.dts b/arch/arm64/boot/dts/amlogic/g12a_s905d2_u202.dts index e6aa019..0cf0177 100644 --- a/arch/arm64/boot/dts/amlogic/g12a_s905d2_u202.dts +++ b/arch/arm64/boot/dts/amlogic/g12a_s905d2_u202.dts @@ -1028,6 +1028,14 @@ pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + /* for ref board */ ad82584f_62: ad82584f_62@62 { compatible = "ESMT, ad82584f"; diff --git a/arch/arm64/boot/dts/amlogic/g12a_s905d2_u202_1g.dts b/arch/arm64/boot/dts/amlogic/g12a_s905d2_u202_1g.dts index 781463b..84d3d5b 100644 --- a/arch/arm64/boot/dts/amlogic/g12a_s905d2_u202_1g.dts +++ b/arch/arm64/boot/dts/amlogic/g12a_s905d2_u202_1g.dts @@ -867,6 +867,14 @@ pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + /* for ref board */ ad82584f_62: ad82584f_62@62 { compatible = "ESMT, ad82584f"; diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202.dts b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202.dts index 04d6cad..e6c7d24 100644 --- a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202.dts +++ b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202.dts @@ -1091,6 +1091,14 @@ pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + /* for ref board */ ad82584f_62: ad82584f_62@62 { compatible = "ESMT, ad82584f"; diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts index 7314024..ea75088 100644 --- a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts +++ b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts @@ -1091,6 +1091,14 @@ pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ + hyn@1A { + compatible = "hyn,cst226"; + status = "okay"; + reg = <0x1a>; + reset-gpio = <&gpio GPIOA_5 0x00>; + irq-gpio = <&gpio GPIOA_6 0x00>; + }; + /* for ref board */ ad82584f_62: ad82584f_62@62 { compatible = "ESMT, ad82584f"; diff --git a/arch/arm64/configs/meson64_defconfig b/arch/arm64/configs/meson64_defconfig index 9f91641..eefdff9 100644 --- a/arch/arm64/configs/meson64_defconfig +++ b/arch/arm64/configs/meson64_defconfig @@ -257,6 +257,7 @@ CONFIG_AMLOGIC_TOUCHSCREEN=y CONFIG_AMLOGIC_TOUCHSCREEN_FTS=y CONFIG_AMLOGIC_TOUCHSCREEN_GT1X=y CONFIG_AMLOGIC_TOUCHSCREEN_GT9XX=y +CONFIG_AMLOGIC_TOUCHSCREEN_HYN_CST2XX=y CONFIG_AMLOGIC_EFUSE=y CONFIG_AMLOGIC_REBOOT=y CONFIG_AMLOGIC_GX_REBOOT=y