* [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
@ 2021-11-22 12:43 ` Oleksij Rempel
0 siblings, 0 replies; 24+ messages in thread
From: Oleksij Rempel @ 2021-11-22 12:43 UTC (permalink / raw)
To: Mark Rutland, Rob Herring, Sascha Hauer, Shawn Guo,
Thierry Reding, Sam Ravnborg, David Airlie, Daniel Vetter
Cc: devicetree, Robin van der Gracht, linux-kernel, dri-devel,
Oleksij Rempel, NXP Linux Team, Pengutronix Kernel Team,
David Jander, linux-arm-kernel
The tsc2046 is an ADC used as touchscreen controller. To share as mach
code as possible, we should use it as actual ADC + virtual tochscreen
controller.
With this patch we make use of the new kernel IIO and HID infrastructure.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
3 files changed, 120 insertions(+), 43 deletions(-)
diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
index 60fe5f14666e..e2afedae85cb 100644
--- a/arch/arm/boot/dts/imx6dl-plym2m.dts
+++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
@@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
+
+ touchscreen {
+ compatible = "resistive-adc-touch";
+ io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
+ io-channel-names = "y", "z1", "z2", "x";
+ touchscreen-min-pressure = <64687>;
+ touchscreen-inverted-x;
+ touchscreen-inverted-y;
+ touchscreen-x-plate-ohms = <300>;
+ touchscreen-y-plate-ohms = <800>;
+ };
};
&can1 {
@@ -129,26 +140,38 @@ &ecspi2 {
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";
- touchscreen@0 {
- compatible = "ti,tsc2046";
+ adc: adc@0 {
+ compatible = "ti,tsc2046e-adc";
reg = <0>;
pinctrl-0 = <&pinctrl_tsc2046>;
pinctrl-names ="default";
- spi-max-frequency = <100000>;
- interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
- pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
+ spi-max-frequency = <1000000>;
+ interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
+ #io-channel-cells = <1>;
- touchscreen-inverted-x;
- touchscreen-inverted-y;
- touchscreen-max-pressure = <4095>;
-
- ti,vref-delay-usecs = /bits/ 16 <100>;
- ti,x-plate-ohms = /bits/ 16 <800>;
- ti,y-plate-ohms = /bits/ 16 <300>;
- ti,debounce-max = /bits/ 16 <3>;
- ti,debounce-tol = /bits/ 16 <70>;
- ti,debounce-rep = /bits/ 16 <3>;
- wakeup-source;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@1 {
+ reg = <1>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@3 {
+ reg = <3>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@4 {
+ reg = <4>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@5 {
+ reg = <5>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
};
};
diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
index 02b53df03e6f..c361e0683973 100644
--- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
+++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
@@ -235,6 +235,17 @@ simple-audio-card,codec {
frame-master;
};
};
+
+ touchscreen {
+ compatible = "resistive-adc-touch";
+ io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
+ io-channel-names = "y", "z1", "z2", "x";
+ touchscreen-min-pressure = <64687>;
+ touchscreen-inverted-x;
+ touchscreen-inverted-y;
+ touchscreen-x-plate-ohms = <300>;
+ touchscreen-y-plate-ohms = <800>;
+ };
};
&audmux {
@@ -277,22 +288,38 @@ &ecspi2 {
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";
- touchscreen@0 {
- compatible = "ti,tsc2046";
+ adc: adc@0 {
+ compatible = "ti,tsc2046e-adc";
reg = <0>;
pinctrl-0 = <&pinctrl_tsc>;
pinctrl-names ="default";
- spi-max-frequency = <100000>;
- interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
- pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
- touchscreen-max-pressure = <4095>;
- ti,vref-delay-usecs = /bits/ 16 <100>;
- ti,x-plate-ohms = /bits/ 16 <800>;
- ti,y-plate-ohms = /bits/ 16 <300>;
- ti,debounce-max = /bits/ 16 <3>;
- ti,debounce-tol = /bits/ 16 <70>;
- ti,debounce-rep = /bits/ 16 <3>;
- wakeup-source;
+ spi-max-frequency = <1000000>;
+ interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
+ #io-channel-cells = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@1 {
+ reg = <1>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@3 {
+ reg = <3>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@4 {
+ reg = <4>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@5 {
+ reg = <5>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
};
};
diff --git a/arch/arm/boot/dts/imx6dl-victgo.dts b/arch/arm/boot/dts/imx6dl-victgo.dts
index d37ba4ed847d..b5004b322d44 100644
--- a/arch/arm/boot/dts/imx6dl-victgo.dts
+++ b/arch/arm/boot/dts/imx6dl-victgo.dts
@@ -181,6 +181,17 @@ simple-audio-card,codec {
frame-master;
};
};
+
+ touchscreen {
+ compatible = "resistive-adc-touch";
+ io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
+ io-channel-names = "y", "z1", "z2", "x";
+ touchscreen-min-pressure = <64687>;
+ touchscreen-inverted-x;
+ touchscreen-inverted-y;
+ touchscreen-x-plate-ohms = <300>;
+ touchscreen-y-plate-ohms = <800>;
+ };
};
&audmux {
@@ -244,22 +255,38 @@ &ecspi2 {
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";
- touchscreen@0 {
- compatible = "ti,tsc2046";
+ adc: adc@0 {
+ compatible = "ti,tsc2046e-adc";
reg = <0>;
- pinctrl-names = "default";
pinctrl-0 = <&pinctrl_touchscreen>;
- spi-max-frequency = <200000>;
- interrupts-extended = <&gpio5 8 IRQ_TYPE_EDGE_FALLING>;
- pendown-gpio = <&gpio5 8 GPIO_ACTIVE_LOW>;
- touchscreen-size-x = <800>;
- touchscreen-size-y = <480>;
- touchscreen-inverted-y;
- touchscreen-max-pressure = <4095>;
- ti,vref-delay-usecs = /bits/ 16 <100>;
- ti,x-plate-ohms = /bits/ 16 <800>;
- ti,y-plate-ohms = /bits/ 16 <300>;
- wakeup-source;
+ pinctrl-names ="default";
+ spi-max-frequency = <1000000>;
+ interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
+ #io-channel-cells = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@1 {
+ reg = <1>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@3 {
+ reg = <3>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@4 {
+ reg = <4>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@5 {
+ reg = <5>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
};
};
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
@ 2021-11-22 12:43 ` Oleksij Rempel
0 siblings, 0 replies; 24+ messages in thread
From: Oleksij Rempel @ 2021-11-22 12:43 UTC (permalink / raw)
To: Mark Rutland, Rob Herring, Sascha Hauer, Shawn Guo,
Thierry Reding, Sam Ravnborg, David Airlie, Daniel Vetter
Cc: Oleksij Rempel, devicetree, Fabio Estevam, linux-arm-kernel,
linux-kernel, NXP Linux Team, Pengutronix Kernel Team,
David Jander, Robin van der Gracht, dri-devel
The tsc2046 is an ADC used as touchscreen controller. To share as mach
code as possible, we should use it as actual ADC + virtual tochscreen
controller.
With this patch we make use of the new kernel IIO and HID infrastructure.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
3 files changed, 120 insertions(+), 43 deletions(-)
diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
index 60fe5f14666e..e2afedae85cb 100644
--- a/arch/arm/boot/dts/imx6dl-plym2m.dts
+++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
@@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
+
+ touchscreen {
+ compatible = "resistive-adc-touch";
+ io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
+ io-channel-names = "y", "z1", "z2", "x";
+ touchscreen-min-pressure = <64687>;
+ touchscreen-inverted-x;
+ touchscreen-inverted-y;
+ touchscreen-x-plate-ohms = <300>;
+ touchscreen-y-plate-ohms = <800>;
+ };
};
&can1 {
@@ -129,26 +140,38 @@ &ecspi2 {
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";
- touchscreen@0 {
- compatible = "ti,tsc2046";
+ adc: adc@0 {
+ compatible = "ti,tsc2046e-adc";
reg = <0>;
pinctrl-0 = <&pinctrl_tsc2046>;
pinctrl-names ="default";
- spi-max-frequency = <100000>;
- interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
- pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
+ spi-max-frequency = <1000000>;
+ interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
+ #io-channel-cells = <1>;
- touchscreen-inverted-x;
- touchscreen-inverted-y;
- touchscreen-max-pressure = <4095>;
-
- ti,vref-delay-usecs = /bits/ 16 <100>;
- ti,x-plate-ohms = /bits/ 16 <800>;
- ti,y-plate-ohms = /bits/ 16 <300>;
- ti,debounce-max = /bits/ 16 <3>;
- ti,debounce-tol = /bits/ 16 <70>;
- ti,debounce-rep = /bits/ 16 <3>;
- wakeup-source;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@1 {
+ reg = <1>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@3 {
+ reg = <3>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@4 {
+ reg = <4>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@5 {
+ reg = <5>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
};
};
diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
index 02b53df03e6f..c361e0683973 100644
--- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
+++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
@@ -235,6 +235,17 @@ simple-audio-card,codec {
frame-master;
};
};
+
+ touchscreen {
+ compatible = "resistive-adc-touch";
+ io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
+ io-channel-names = "y", "z1", "z2", "x";
+ touchscreen-min-pressure = <64687>;
+ touchscreen-inverted-x;
+ touchscreen-inverted-y;
+ touchscreen-x-plate-ohms = <300>;
+ touchscreen-y-plate-ohms = <800>;
+ };
};
&audmux {
@@ -277,22 +288,38 @@ &ecspi2 {
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";
- touchscreen@0 {
- compatible = "ti,tsc2046";
+ adc: adc@0 {
+ compatible = "ti,tsc2046e-adc";
reg = <0>;
pinctrl-0 = <&pinctrl_tsc>;
pinctrl-names ="default";
- spi-max-frequency = <100000>;
- interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
- pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
- touchscreen-max-pressure = <4095>;
- ti,vref-delay-usecs = /bits/ 16 <100>;
- ti,x-plate-ohms = /bits/ 16 <800>;
- ti,y-plate-ohms = /bits/ 16 <300>;
- ti,debounce-max = /bits/ 16 <3>;
- ti,debounce-tol = /bits/ 16 <70>;
- ti,debounce-rep = /bits/ 16 <3>;
- wakeup-source;
+ spi-max-frequency = <1000000>;
+ interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
+ #io-channel-cells = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@1 {
+ reg = <1>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@3 {
+ reg = <3>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@4 {
+ reg = <4>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@5 {
+ reg = <5>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
};
};
diff --git a/arch/arm/boot/dts/imx6dl-victgo.dts b/arch/arm/boot/dts/imx6dl-victgo.dts
index d37ba4ed847d..b5004b322d44 100644
--- a/arch/arm/boot/dts/imx6dl-victgo.dts
+++ b/arch/arm/boot/dts/imx6dl-victgo.dts
@@ -181,6 +181,17 @@ simple-audio-card,codec {
frame-master;
};
};
+
+ touchscreen {
+ compatible = "resistive-adc-touch";
+ io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
+ io-channel-names = "y", "z1", "z2", "x";
+ touchscreen-min-pressure = <64687>;
+ touchscreen-inverted-x;
+ touchscreen-inverted-y;
+ touchscreen-x-plate-ohms = <300>;
+ touchscreen-y-plate-ohms = <800>;
+ };
};
&audmux {
@@ -244,22 +255,38 @@ &ecspi2 {
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";
- touchscreen@0 {
- compatible = "ti,tsc2046";
+ adc: adc@0 {
+ compatible = "ti,tsc2046e-adc";
reg = <0>;
- pinctrl-names = "default";
pinctrl-0 = <&pinctrl_touchscreen>;
- spi-max-frequency = <200000>;
- interrupts-extended = <&gpio5 8 IRQ_TYPE_EDGE_FALLING>;
- pendown-gpio = <&gpio5 8 GPIO_ACTIVE_LOW>;
- touchscreen-size-x = <800>;
- touchscreen-size-y = <480>;
- touchscreen-inverted-y;
- touchscreen-max-pressure = <4095>;
- ti,vref-delay-usecs = /bits/ 16 <100>;
- ti,x-plate-ohms = /bits/ 16 <800>;
- ti,y-plate-ohms = /bits/ 16 <300>;
- wakeup-source;
+ pinctrl-names ="default";
+ spi-max-frequency = <1000000>;
+ interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
+ #io-channel-cells = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@1 {
+ reg = <1>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@3 {
+ reg = <3>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@4 {
+ reg = <4>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
+ channel@5 {
+ reg = <5>;
+ settling-time-us = <700>;
+ oversampling-ratio = <5>;
+ };
};
};
--
2.30.2
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
2021-11-22 12:43 ` Oleksij Rempel
(?)
@ 2021-12-06 1:06 ` Shawn Guo
-1 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2021-12-06 1:06 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Mark Rutland, Rob Herring, Sascha Hauer, Thierry Reding,
Sam Ravnborg, David Airlie, Daniel Vetter, devicetree,
Fabio Estevam, linux-arm-kernel, linux-kernel, NXP Linux Team,
Pengutronix Kernel Team, David Jander, Robin van der Gracht,
dri-devel
On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> The tsc2046 is an ADC used as touchscreen controller. To share as mach
> code as possible, we should use it as actual ADC + virtual tochscreen
> controller.
> With this patch we make use of the new kernel IIO and HID infrastructure.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
One space is enough in subject "victgo: make".
> ---
> arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> 3 files changed, 120 insertions(+), 43 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> index 60fe5f14666e..e2afedae85cb 100644
> --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> regulator-min-microvolt = <12000000>;
> regulator-max-microvolt = <12000000>;
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &can1 {
> @@ -129,26 +140,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
Isn't label name "adc" too generic?
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> pinctrl-0 = <&pinctrl_tsc2046>;
> pinctrl-names ="default";
> - spi-max-frequency = <100000>;
> - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
>
> - touchscreen-inverted-x;
> - touchscreen-inverted-y;
> - touchscreen-max-pressure = <4095>;
> -
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - ti,debounce-max = /bits/ 16 <3>;
> - ti,debounce-tol = /bits/ 16 <70>;
> - ti,debounce-rep = /bits/ 16 <3>;
> - wakeup-source;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
Have a newline between child nodes.
Shawn
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
> index 02b53df03e6f..c361e0683973 100644
> --- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
> +++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
> @@ -235,6 +235,17 @@ simple-audio-card,codec {
> frame-master;
> };
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &audmux {
> @@ -277,22 +288,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> pinctrl-0 = <&pinctrl_tsc>;
> pinctrl-names ="default";
> - spi-max-frequency = <100000>;
> - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
> - touchscreen-max-pressure = <4095>;
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - ti,debounce-max = /bits/ 16 <3>;
> - ti,debounce-tol = /bits/ 16 <70>;
> - ti,debounce-rep = /bits/ 16 <3>;
> - wakeup-source;
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/imx6dl-victgo.dts b/arch/arm/boot/dts/imx6dl-victgo.dts
> index d37ba4ed847d..b5004b322d44 100644
> --- a/arch/arm/boot/dts/imx6dl-victgo.dts
> +++ b/arch/arm/boot/dts/imx6dl-victgo.dts
> @@ -181,6 +181,17 @@ simple-audio-card,codec {
> frame-master;
> };
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &audmux {
> @@ -244,22 +255,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> - pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_touchscreen>;
> - spi-max-frequency = <200000>;
> - interrupts-extended = <&gpio5 8 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio5 8 GPIO_ACTIVE_LOW>;
> - touchscreen-size-x = <800>;
> - touchscreen-size-y = <480>;
> - touchscreen-inverted-y;
> - touchscreen-max-pressure = <4095>;
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - wakeup-source;
> + pinctrl-names ="default";
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> --
> 2.30.2
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
@ 2021-12-06 1:06 ` Shawn Guo
0 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2021-12-06 1:06 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Mark Rutland, devicetree, Pengutronix Kernel Team,
Robin van der Gracht, David Airlie, Sascha Hauer, linux-kernel,
dri-devel, Rob Herring, Thierry Reding, NXP Linux Team,
David Jander, Sam Ravnborg, linux-arm-kernel
On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> The tsc2046 is an ADC used as touchscreen controller. To share as mach
> code as possible, we should use it as actual ADC + virtual tochscreen
> controller.
> With this patch we make use of the new kernel IIO and HID infrastructure.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
One space is enough in subject "victgo: make".
> ---
> arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> 3 files changed, 120 insertions(+), 43 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> index 60fe5f14666e..e2afedae85cb 100644
> --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> regulator-min-microvolt = <12000000>;
> regulator-max-microvolt = <12000000>;
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &can1 {
> @@ -129,26 +140,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
Isn't label name "adc" too generic?
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> pinctrl-0 = <&pinctrl_tsc2046>;
> pinctrl-names ="default";
> - spi-max-frequency = <100000>;
> - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
>
> - touchscreen-inverted-x;
> - touchscreen-inverted-y;
> - touchscreen-max-pressure = <4095>;
> -
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - ti,debounce-max = /bits/ 16 <3>;
> - ti,debounce-tol = /bits/ 16 <70>;
> - ti,debounce-rep = /bits/ 16 <3>;
> - wakeup-source;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
Have a newline between child nodes.
Shawn
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
> index 02b53df03e6f..c361e0683973 100644
> --- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
> +++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
> @@ -235,6 +235,17 @@ simple-audio-card,codec {
> frame-master;
> };
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &audmux {
> @@ -277,22 +288,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> pinctrl-0 = <&pinctrl_tsc>;
> pinctrl-names ="default";
> - spi-max-frequency = <100000>;
> - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
> - touchscreen-max-pressure = <4095>;
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - ti,debounce-max = /bits/ 16 <3>;
> - ti,debounce-tol = /bits/ 16 <70>;
> - ti,debounce-rep = /bits/ 16 <3>;
> - wakeup-source;
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/imx6dl-victgo.dts b/arch/arm/boot/dts/imx6dl-victgo.dts
> index d37ba4ed847d..b5004b322d44 100644
> --- a/arch/arm/boot/dts/imx6dl-victgo.dts
> +++ b/arch/arm/boot/dts/imx6dl-victgo.dts
> @@ -181,6 +181,17 @@ simple-audio-card,codec {
> frame-master;
> };
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &audmux {
> @@ -244,22 +255,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> - pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_touchscreen>;
> - spi-max-frequency = <200000>;
> - interrupts-extended = <&gpio5 8 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio5 8 GPIO_ACTIVE_LOW>;
> - touchscreen-size-x = <800>;
> - touchscreen-size-y = <480>;
> - touchscreen-inverted-y;
> - touchscreen-max-pressure = <4095>;
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - wakeup-source;
> + pinctrl-names ="default";
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
@ 2021-12-06 1:06 ` Shawn Guo
0 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2021-12-06 1:06 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Mark Rutland, Rob Herring, Sascha Hauer, Thierry Reding,
Sam Ravnborg, David Airlie, Daniel Vetter, devicetree,
Fabio Estevam, linux-arm-kernel, linux-kernel, NXP Linux Team,
Pengutronix Kernel Team, David Jander, Robin van der Gracht,
dri-devel
On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> The tsc2046 is an ADC used as touchscreen controller. To share as mach
> code as possible, we should use it as actual ADC + virtual tochscreen
> controller.
> With this patch we make use of the new kernel IIO and HID infrastructure.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
One space is enough in subject "victgo: make".
> ---
> arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> 3 files changed, 120 insertions(+), 43 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> index 60fe5f14666e..e2afedae85cb 100644
> --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> regulator-min-microvolt = <12000000>;
> regulator-max-microvolt = <12000000>;
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &can1 {
> @@ -129,26 +140,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
Isn't label name "adc" too generic?
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> pinctrl-0 = <&pinctrl_tsc2046>;
> pinctrl-names ="default";
> - spi-max-frequency = <100000>;
> - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
>
> - touchscreen-inverted-x;
> - touchscreen-inverted-y;
> - touchscreen-max-pressure = <4095>;
> -
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - ti,debounce-max = /bits/ 16 <3>;
> - ti,debounce-tol = /bits/ 16 <70>;
> - ti,debounce-rep = /bits/ 16 <3>;
> - wakeup-source;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
Have a newline between child nodes.
Shawn
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
> index 02b53df03e6f..c361e0683973 100644
> --- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
> +++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
> @@ -235,6 +235,17 @@ simple-audio-card,codec {
> frame-master;
> };
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &audmux {
> @@ -277,22 +288,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> pinctrl-0 = <&pinctrl_tsc>;
> pinctrl-names ="default";
> - spi-max-frequency = <100000>;
> - interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
> - touchscreen-max-pressure = <4095>;
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - ti,debounce-max = /bits/ 16 <3>;
> - ti,debounce-tol = /bits/ 16 <70>;
> - ti,debounce-rep = /bits/ 16 <3>;
> - wakeup-source;
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> diff --git a/arch/arm/boot/dts/imx6dl-victgo.dts b/arch/arm/boot/dts/imx6dl-victgo.dts
> index d37ba4ed847d..b5004b322d44 100644
> --- a/arch/arm/boot/dts/imx6dl-victgo.dts
> +++ b/arch/arm/boot/dts/imx6dl-victgo.dts
> @@ -181,6 +181,17 @@ simple-audio-card,codec {
> frame-master;
> };
> };
> +
> + touchscreen {
> + compatible = "resistive-adc-touch";
> + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> + io-channel-names = "y", "z1", "z2", "x";
> + touchscreen-min-pressure = <64687>;
> + touchscreen-inverted-x;
> + touchscreen-inverted-y;
> + touchscreen-x-plate-ohms = <300>;
> + touchscreen-y-plate-ohms = <800>;
> + };
> };
>
> &audmux {
> @@ -244,22 +255,38 @@ &ecspi2 {
> pinctrl-0 = <&pinctrl_ecspi2>;
> status = "okay";
>
> - touchscreen@0 {
> - compatible = "ti,tsc2046";
> + adc: adc@0 {
> + compatible = "ti,tsc2046e-adc";
> reg = <0>;
> - pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_touchscreen>;
> - spi-max-frequency = <200000>;
> - interrupts-extended = <&gpio5 8 IRQ_TYPE_EDGE_FALLING>;
> - pendown-gpio = <&gpio5 8 GPIO_ACTIVE_LOW>;
> - touchscreen-size-x = <800>;
> - touchscreen-size-y = <480>;
> - touchscreen-inverted-y;
> - touchscreen-max-pressure = <4095>;
> - ti,vref-delay-usecs = /bits/ 16 <100>;
> - ti,x-plate-ohms = /bits/ 16 <800>;
> - ti,y-plate-ohms = /bits/ 16 <300>;
> - wakeup-source;
> + pinctrl-names ="default";
> + spi-max-frequency = <1000000>;
> + interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
> + #io-channel-cells = <1>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@1 {
> + reg = <1>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@3 {
> + reg = <3>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@4 {
> + reg = <4>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> + channel@5 {
> + reg = <5>;
> + settling-time-us = <700>;
> + oversampling-ratio = <5>;
> + };
> };
> };
>
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
2021-12-06 1:06 ` Shawn Guo
(?)
@ 2022-01-05 11:04 ` Oleksij Rempel
-1 siblings, 0 replies; 24+ messages in thread
From: Oleksij Rempel @ 2022-01-05 11:04 UTC (permalink / raw)
To: Shawn Guo
Cc: Mark Rutland, Rob Herring, Sascha Hauer, Thierry Reding,
Sam Ravnborg, David Airlie, Daniel Vetter, devicetree,
Fabio Estevam, linux-arm-kernel, linux-kernel, NXP Linux Team,
Pengutronix Kernel Team, David Jander, Robin van der Gracht,
dri-devel, Jonathan Cameron
Hi Shawn,
sorry for the delay, I just came back to work.
On Mon, Dec 06, 2021 at 09:06:28AM +0800, Shawn Guo wrote:
> On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> > The tsc2046 is an ADC used as touchscreen controller. To share as mach
> > code as possible, we should use it as actual ADC + virtual tochscreen
> > controller.
> > With this patch we make use of the new kernel IIO and HID infrastructure.
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
>
> One space is enough in subject "victgo: make".
done.
> > ---
> > arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> > arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> > arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> > 3 files changed, 120 insertions(+), 43 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > index 60fe5f14666e..e2afedae85cb 100644
> > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> > regulator-min-microvolt = <12000000>;
> > regulator-max-microvolt = <12000000>;
> > };
> > +
> > + touchscreen {
> > + compatible = "resistive-adc-touch";
> > + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> > + io-channel-names = "y", "z1", "z2", "x";
> > + touchscreen-min-pressure = <64687>;
> > + touchscreen-inverted-x;
> > + touchscreen-inverted-y;
> > + touchscreen-x-plate-ohms = <300>;
> > + touchscreen-y-plate-ohms = <800>;
> > + };
> > };
> >
> > &can1 {
> > @@ -129,26 +140,38 @@ &ecspi2 {
> > pinctrl-0 = <&pinctrl_ecspi2>;
> > status = "okay";
> >
> > - touchscreen@0 {
> > - compatible = "ti,tsc2046";
> > + adc: adc@0 {
>
> Isn't label name "adc" too generic?
I do not have strong opinion about this. Currently we have no
restrictions for the node names:
Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
Documentation/devicetree/bindings/iio/adc/adc.yaml
I can name it touchscreen-adc@0 or something like this. What are your
preferences?
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
@ 2022-01-05 11:04 ` Oleksij Rempel
0 siblings, 0 replies; 24+ messages in thread
From: Oleksij Rempel @ 2022-01-05 11:04 UTC (permalink / raw)
To: Shawn Guo
Cc: Mark Rutland, devicetree, Pengutronix Kernel Team,
Robin van der Gracht, David Airlie, Sascha Hauer, linux-kernel,
dri-devel, Jonathan Cameron, Rob Herring, Thierry Reding,
NXP Linux Team, David Jander, Sam Ravnborg, linux-arm-kernel
Hi Shawn,
sorry for the delay, I just came back to work.
On Mon, Dec 06, 2021 at 09:06:28AM +0800, Shawn Guo wrote:
> On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> > The tsc2046 is an ADC used as touchscreen controller. To share as mach
> > code as possible, we should use it as actual ADC + virtual tochscreen
> > controller.
> > With this patch we make use of the new kernel IIO and HID infrastructure.
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
>
> One space is enough in subject "victgo: make".
done.
> > ---
> > arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> > arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> > arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> > 3 files changed, 120 insertions(+), 43 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > index 60fe5f14666e..e2afedae85cb 100644
> > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> > regulator-min-microvolt = <12000000>;
> > regulator-max-microvolt = <12000000>;
> > };
> > +
> > + touchscreen {
> > + compatible = "resistive-adc-touch";
> > + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> > + io-channel-names = "y", "z1", "z2", "x";
> > + touchscreen-min-pressure = <64687>;
> > + touchscreen-inverted-x;
> > + touchscreen-inverted-y;
> > + touchscreen-x-plate-ohms = <300>;
> > + touchscreen-y-plate-ohms = <800>;
> > + };
> > };
> >
> > &can1 {
> > @@ -129,26 +140,38 @@ &ecspi2 {
> > pinctrl-0 = <&pinctrl_ecspi2>;
> > status = "okay";
> >
> > - touchscreen@0 {
> > - compatible = "ti,tsc2046";
> > + adc: adc@0 {
>
> Isn't label name "adc" too generic?
I do not have strong opinion about this. Currently we have no
restrictions for the node names:
Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
Documentation/devicetree/bindings/iio/adc/adc.yaml
I can name it touchscreen-adc@0 or something like this. What are your
preferences?
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
@ 2022-01-05 11:04 ` Oleksij Rempel
0 siblings, 0 replies; 24+ messages in thread
From: Oleksij Rempel @ 2022-01-05 11:04 UTC (permalink / raw)
To: Shawn Guo
Cc: Mark Rutland, Rob Herring, Sascha Hauer, Thierry Reding,
Sam Ravnborg, David Airlie, Daniel Vetter, devicetree,
Fabio Estevam, linux-arm-kernel, linux-kernel, NXP Linux Team,
Pengutronix Kernel Team, David Jander, Robin van der Gracht,
dri-devel, Jonathan Cameron
Hi Shawn,
sorry for the delay, I just came back to work.
On Mon, Dec 06, 2021 at 09:06:28AM +0800, Shawn Guo wrote:
> On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> > The tsc2046 is an ADC used as touchscreen controller. To share as mach
> > code as possible, we should use it as actual ADC + virtual tochscreen
> > controller.
> > With this patch we make use of the new kernel IIO and HID infrastructure.
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
>
> One space is enough in subject "victgo: make".
done.
> > ---
> > arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> > arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> > arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> > 3 files changed, 120 insertions(+), 43 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > index 60fe5f14666e..e2afedae85cb 100644
> > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> > regulator-min-microvolt = <12000000>;
> > regulator-max-microvolt = <12000000>;
> > };
> > +
> > + touchscreen {
> > + compatible = "resistive-adc-touch";
> > + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> > + io-channel-names = "y", "z1", "z2", "x";
> > + touchscreen-min-pressure = <64687>;
> > + touchscreen-inverted-x;
> > + touchscreen-inverted-y;
> > + touchscreen-x-plate-ohms = <300>;
> > + touchscreen-y-plate-ohms = <800>;
> > + };
> > };
> >
> > &can1 {
> > @@ -129,26 +140,38 @@ &ecspi2 {
> > pinctrl-0 = <&pinctrl_ecspi2>;
> > status = "okay";
> >
> > - touchscreen@0 {
> > - compatible = "ti,tsc2046";
> > + adc: adc@0 {
>
> Isn't label name "adc" too generic?
I do not have strong opinion about this. Currently we have no
restrictions for the node names:
Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
Documentation/devicetree/bindings/iio/adc/adc.yaml
I can name it touchscreen-adc@0 or something like this. What are your
preferences?
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
2022-01-05 11:04 ` Oleksij Rempel
(?)
@ 2022-01-26 2:05 ` Shawn Guo
-1 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2022-01-26 2:05 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Mark Rutland, Rob Herring, Sascha Hauer, Thierry Reding,
Sam Ravnborg, David Airlie, Daniel Vetter, devicetree,
Fabio Estevam, linux-arm-kernel, linux-kernel, NXP Linux Team,
Pengutronix Kernel Team, David Jander, Robin van der Gracht,
dri-devel, Jonathan Cameron
On Wed, Jan 05, 2022 at 12:04:34PM +0100, Oleksij Rempel wrote:
> Hi Shawn,
>
> sorry for the delay, I just came back to work.
>
> On Mon, Dec 06, 2021 at 09:06:28AM +0800, Shawn Guo wrote:
> > On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> > > The tsc2046 is an ADC used as touchscreen controller. To share as mach
> > > code as possible, we should use it as actual ADC + virtual tochscreen
> > > controller.
> > > With this patch we make use of the new kernel IIO and HID infrastructure.
> > >
> > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> >
> > One space is enough in subject "victgo: make".
>
> done.
>
> > > ---
> > > arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> > > arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> > > arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> > > 3 files changed, 120 insertions(+), 43 deletions(-)
> > >
> > > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > index 60fe5f14666e..e2afedae85cb 100644
> > > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> > > regulator-min-microvolt = <12000000>;
> > > regulator-max-microvolt = <12000000>;
> > > };
> > > +
> > > + touchscreen {
> > > + compatible = "resistive-adc-touch";
> > > + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> > > + io-channel-names = "y", "z1", "z2", "x";
> > > + touchscreen-min-pressure = <64687>;
> > > + touchscreen-inverted-x;
> > > + touchscreen-inverted-y;
> > > + touchscreen-x-plate-ohms = <300>;
> > > + touchscreen-y-plate-ohms = <800>;
> > > + };
> > > };
> > >
> > > &can1 {
> > > @@ -129,26 +140,38 @@ &ecspi2 {
> > > pinctrl-0 = <&pinctrl_ecspi2>;
> > > status = "okay";
> > >
> > > - touchscreen@0 {
> > > - compatible = "ti,tsc2046";
> > > + adc: adc@0 {
> >
> > Isn't label name "adc" too generic?
>
> I do not have strong opinion about this. Currently we have no
> restrictions for the node names:
> Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
> Documentation/devicetree/bindings/iio/adc/adc.yaml
>
> I can name it touchscreen-adc@0 or something like this. What are your
> preferences?
I wasn't talking about node name but label.
Shawn
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
@ 2022-01-26 2:05 ` Shawn Guo
0 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2022-01-26 2:05 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Mark Rutland, devicetree, Pengutronix Kernel Team,
Robin van der Gracht, David Airlie, Sascha Hauer, linux-kernel,
dri-devel, Jonathan Cameron, Rob Herring, Thierry Reding,
NXP Linux Team, David Jander, Sam Ravnborg, linux-arm-kernel
On Wed, Jan 05, 2022 at 12:04:34PM +0100, Oleksij Rempel wrote:
> Hi Shawn,
>
> sorry for the delay, I just came back to work.
>
> On Mon, Dec 06, 2021 at 09:06:28AM +0800, Shawn Guo wrote:
> > On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> > > The tsc2046 is an ADC used as touchscreen controller. To share as mach
> > > code as possible, we should use it as actual ADC + virtual tochscreen
> > > controller.
> > > With this patch we make use of the new kernel IIO and HID infrastructure.
> > >
> > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> >
> > One space is enough in subject "victgo: make".
>
> done.
>
> > > ---
> > > arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> > > arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> > > arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> > > 3 files changed, 120 insertions(+), 43 deletions(-)
> > >
> > > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > index 60fe5f14666e..e2afedae85cb 100644
> > > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> > > regulator-min-microvolt = <12000000>;
> > > regulator-max-microvolt = <12000000>;
> > > };
> > > +
> > > + touchscreen {
> > > + compatible = "resistive-adc-touch";
> > > + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> > > + io-channel-names = "y", "z1", "z2", "x";
> > > + touchscreen-min-pressure = <64687>;
> > > + touchscreen-inverted-x;
> > > + touchscreen-inverted-y;
> > > + touchscreen-x-plate-ohms = <300>;
> > > + touchscreen-y-plate-ohms = <800>;
> > > + };
> > > };
> > >
> > > &can1 {
> > > @@ -129,26 +140,38 @@ &ecspi2 {
> > > pinctrl-0 = <&pinctrl_ecspi2>;
> > > status = "okay";
> > >
> > > - touchscreen@0 {
> > > - compatible = "ti,tsc2046";
> > > + adc: adc@0 {
> >
> > Isn't label name "adc" too generic?
>
> I do not have strong opinion about this. Currently we have no
> restrictions for the node names:
> Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
> Documentation/devicetree/bindings/iio/adc/adc.yaml
>
> I can name it touchscreen-adc@0 or something like this. What are your
> preferences?
I wasn't talking about node name but label.
Shawn
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH v1 4/4] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver
@ 2022-01-26 2:05 ` Shawn Guo
0 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2022-01-26 2:05 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Mark Rutland, Rob Herring, Sascha Hauer, Thierry Reding,
Sam Ravnborg, David Airlie, Daniel Vetter, devicetree,
Fabio Estevam, linux-arm-kernel, linux-kernel, NXP Linux Team,
Pengutronix Kernel Team, David Jander, Robin van der Gracht,
dri-devel, Jonathan Cameron
On Wed, Jan 05, 2022 at 12:04:34PM +0100, Oleksij Rempel wrote:
> Hi Shawn,
>
> sorry for the delay, I just came back to work.
>
> On Mon, Dec 06, 2021 at 09:06:28AM +0800, Shawn Guo wrote:
> > On Mon, Nov 22, 2021 at 01:43:10PM +0100, Oleksij Rempel wrote:
> > > The tsc2046 is an ADC used as touchscreen controller. To share as mach
> > > code as possible, we should use it as actual ADC + virtual tochscreen
> > > controller.
> > > With this patch we make use of the new kernel IIO and HID infrastructure.
> > >
> > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> >
> > One space is enough in subject "victgo: make".
>
> done.
>
> > > ---
> > > arch/arm/boot/dts/imx6dl-plym2m.dts | 55 ++++++++++++++++++++---------
> > > arch/arm/boot/dts/imx6dl-prtvt7.dts | 53 ++++++++++++++++++++-------
> > > arch/arm/boot/dts/imx6dl-victgo.dts | 55 +++++++++++++++++++++--------
> > > 3 files changed, 120 insertions(+), 43 deletions(-)
> > >
> > > diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > index 60fe5f14666e..e2afedae85cb 100644
> > > --- a/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
> > > @@ -101,6 +101,17 @@ reg_12v0: regulator-12v0 {
> > > regulator-min-microvolt = <12000000>;
> > > regulator-max-microvolt = <12000000>;
> > > };
> > > +
> > > + touchscreen {
> > > + compatible = "resistive-adc-touch";
> > > + io-channels = <&adc 1>, <&adc 3>, <&adc 4>, <&adc 5>;
> > > + io-channel-names = "y", "z1", "z2", "x";
> > > + touchscreen-min-pressure = <64687>;
> > > + touchscreen-inverted-x;
> > > + touchscreen-inverted-y;
> > > + touchscreen-x-plate-ohms = <300>;
> > > + touchscreen-y-plate-ohms = <800>;
> > > + };
> > > };
> > >
> > > &can1 {
> > > @@ -129,26 +140,38 @@ &ecspi2 {
> > > pinctrl-0 = <&pinctrl_ecspi2>;
> > > status = "okay";
> > >
> > > - touchscreen@0 {
> > > - compatible = "ti,tsc2046";
> > > + adc: adc@0 {
> >
> > Isn't label name "adc" too generic?
>
> I do not have strong opinion about this. Currently we have no
> restrictions for the node names:
> Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
> Documentation/devicetree/bindings/iio/adc/adc.yaml
>
> I can name it touchscreen-adc@0 or something like this. What are your
> preferences?
I wasn't talking about node name but label.
Shawn
^ permalink raw reply [flat|nested] 24+ messages in thread