提交 add9b6b6 编写于 作者: O Oleksij Rempel 提交者: Shawn Guo

ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver

The tsc2046 is an ADC used as touchscreen controller. To share as mach
code as possible, we should use it as actual ADC + virtual touchscreen
controller.
With this patch we make use of the new kernel IIO and HID infrastructure.
Signed-off-by: NOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: NShawn Guo <shawnguo@kernel.org>
上级 9a6dbef4
...@@ -101,6 +101,18 @@ ...@@ -101,6 +101,18 @@
regulator-min-microvolt = <12000000>; regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>; regulator-max-microvolt = <12000000>;
}; };
touchscreen {
compatible = "resistive-adc-touch";
io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>,
<&adc_ts 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 { &can1 {
...@@ -129,26 +141,41 @@ ...@@ -129,26 +141,41 @@
pinctrl-0 = <&pinctrl_ecspi2>; pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay"; status = "okay";
touchscreen@0 { adc_ts: adc@0 {
compatible = "ti,tsc2046"; compatible = "ti,tsc2046e-adc";
reg = <0>; reg = <0>;
pinctrl-0 = <&pinctrl_tsc2046>; pinctrl-0 = <&pinctrl_tsc2046>;
pinctrl-names ="default"; pinctrl-names ="default";
spi-max-frequency = <100000>; spi-max-frequency = <1000000>;
interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>; interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>; #io-channel-cells = <1>;
touchscreen-inverted-x; #address-cells = <1>;
touchscreen-inverted-y; #size-cells = <0>;
touchscreen-max-pressure = <4095>;
channel@1 {
ti,vref-delay-usecs = /bits/ 16 <100>; reg = <1>;
ti,x-plate-ohms = /bits/ 16 <800>; settling-time-us = <700>;
ti,y-plate-ohms = /bits/ 16 <300>; oversampling-ratio = <5>;
ti,debounce-max = /bits/ 16 <3>; };
ti,debounce-tol = /bits/ 16 <70>;
ti,debounce-rep = /bits/ 16 <3>; channel@3 {
wakeup-source; 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>;
};
}; };
}; };
......
...@@ -235,6 +235,18 @@ ...@@ -235,6 +235,18 @@
frame-master; frame-master;
}; };
}; };
touchscreen {
compatible = "resistive-adc-touch";
io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>,
<&adc_ts 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 { &audmux {
...@@ -277,22 +289,41 @@ ...@@ -277,22 +289,41 @@
pinctrl-0 = <&pinctrl_ecspi2>; pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay"; status = "okay";
touchscreen@0 { adc_ts: adc@0 {
compatible = "ti,tsc2046"; compatible = "ti,tsc2046e-adc";
reg = <0>; reg = <0>;
pinctrl-0 = <&pinctrl_tsc>; pinctrl-0 = <&pinctrl_tsc>;
pinctrl-names ="default"; pinctrl-names ="default";
spi-max-frequency = <100000>; spi-max-frequency = <1000000>;
interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>; interrupts-extended = <&gpio3 20 IRQ_TYPE_LEVEL_LOW>;
pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>; #io-channel-cells = <1>;
touchscreen-max-pressure = <4095>;
ti,vref-delay-usecs = /bits/ 16 <100>; #address-cells = <1>;
ti,x-plate-ohms = /bits/ 16 <800>; #size-cells = <0>;
ti,y-plate-ohms = /bits/ 16 <300>;
ti,debounce-max = /bits/ 16 <3>; channel@1 {
ti,debounce-tol = /bits/ 16 <70>; reg = <1>;
ti,debounce-rep = /bits/ 16 <3>; settling-time-us = <700>;
wakeup-source; 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>;
};
}; };
}; };
......
...@@ -181,6 +181,18 @@ ...@@ -181,6 +181,18 @@
frame-master; frame-master;
}; };
}; };
touchscreen {
compatible = "resistive-adc-touch";
io-channels = <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>,
<&adc_ts 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 { &audmux {
...@@ -244,22 +256,41 @@ ...@@ -244,22 +256,41 @@
pinctrl-0 = <&pinctrl_ecspi2>; pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay"; status = "okay";
touchscreen@0 { adc_ts: adc@0 {
compatible = "ti,tsc2046"; compatible = "ti,tsc2046e-adc";
reg = <0>; reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_touchscreen>; pinctrl-0 = <&pinctrl_touchscreen>;
spi-max-frequency = <200000>; pinctrl-names ="default";
interrupts-extended = <&gpio5 8 IRQ_TYPE_EDGE_FALLING>; spi-max-frequency = <1000000>;
pendown-gpio = <&gpio5 8 GPIO_ACTIVE_LOW>; interrupts-extended = <&gpio5 8 IRQ_TYPE_LEVEL_LOW>;
touchscreen-size-x = <800>; #io-channel-cells = <1>;
touchscreen-size-y = <480>;
touchscreen-inverted-y; #address-cells = <1>;
touchscreen-max-pressure = <4095>; #size-cells = <0>;
ti,vref-delay-usecs = /bits/ 16 <100>;
ti,x-plate-ohms = /bits/ 16 <800>; channel@1 {
ti,y-plate-ohms = /bits/ 16 <300>; reg = <1>;
wakeup-source; 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>;
};
}; };
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册