[PATCH] arm64: dts: rockchip: add Hynitron cst340 for Anbernic 353 series

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Sat Nov 26 05:23:23 PST 2022


On 26/11/2022 02:14, Chris Morgan wrote:
> From: Chris Morgan <macromorgan at hotmail.com>
> 
> 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/
> 
> Signed-off-by: Chris Morgan <macromorgan at hotmail.com>
> ---
>  .../dts/rockchip/rk3566-anbernic-rg353p.dts   | 20 +++++++++++++++++++
>  .../dts/rockchip/rk3566-anbernic-rg353v.dts   | 13 ++++++++++++
>  2 files changed, 33 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts
> index 63cff402f3a8..06222dead921 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts
> @@ -95,6 +95,19 @@ &i2c2 {
>  	pintctrl-names = "default";
>  	pinctrl-0 = <&i2c2m1_xfer>;
>  	status = "okay";
> +
> +	touch at 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>;
> +		status = "okay";

Was it disabled anywhere?

> +	};
>  };
>  
>  &pinctrl {
> @@ -104,6 +117,13 @@ spk_amp_enable_h: spk-amp-enable-h {
>  				<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 {
> diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts
> index 885234a023e1..dc3fc67f5853 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts
> @@ -82,6 +82,19 @@ &i2c2 {
>  	pintctrl-names = "default";
>  	pinctrl-0 = <&i2c2m1_xfer>;
>  	status = "okay";
> +
> +	touch at 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>;
> +		status = "okay";

Same question.


Best regards,
Krzysztof




More information about the Linux-rockchip mailing list