OSDN Git Service

arm64: dts: rockchip: add Hynitron cst340 for Anbernic 353 series
authorChris Morgan <macromorgan@hotmail.com>
Mon, 28 Nov 2022 23:15:28 +0000 (17:15 -0600)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 11 Jan 2023 10:36:51 +0000 (11:36 +0100)
Add support for the Hynitron cst340 touchscreen driver to the Anbernic
RG353P and RG353V devices. Note the RG353VS device does not have a
touchscreen.

https://lore.kernel.org/linux-input/Y1y9e9sgE%2FDck9fB@google.com/

Changes since V1:
 - Removed 'status = "okay";', as it was never disabled.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20221128231528.23360-1-macroalpha82@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts

index 63cff40..8aa93c6 100644 (file)
        pintctrl-names = "default";
        pinctrl-0 = <&i2c2m1_xfer>;
        status = "okay";
+
+       touch@1a {
+               compatible = "hynitron,cst340";
+               reg = <0x1a>;
+               interrupt-parent = <&gpio4>;
+               interrupts = <RK_PB1 IRQ_TYPE_EDGE_FALLING>;
+               pinctrl-0 = <&touch_rst>;
+               pinctrl-names = "default";
+               reset-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_LOW>;
+               touchscreen-size-x = <640>;
+               touchscreen-size-y = <480>;
+       };
 };
 
 &pinctrl {
                                <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
+
+       touch {
+               touch_rst: touch-rst {
+                       rockchip,pins =
+                               <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
 };
 
 &rk817 {
index 885234a..f49ce29 100644 (file)
        pintctrl-names = "default";
        pinctrl-0 = <&i2c2m1_xfer>;
        status = "okay";
+
+       touch@1a {
+               compatible = "hynitron,cst340";
+               reg = <0x1a>;
+               interrupt-parent = <&gpio4>;
+               interrupts = <RK_PB1 IRQ_TYPE_EDGE_FALLING>;
+               pinctrl-0 = <&touch_rst>;
+               pinctrl-names = "default";
+               reset-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_LOW>;
+               touchscreen-size-x = <640>;
+               touchscreen-size-y = <480>;
+       };
 };
 
 &pinctrl {