forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
....@@ -5,39 +5,105 @@
55 - compatible: "st,stmpe-ts"
66
77 Optional properties:
8
-- st,sample-time: ADC converstion time in number of clock. (0 -> 36 clocks, 1 ->
9
- 44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 4 -> 80 clocks, 5 -> 96 clocks, 6
10
- -> 144 clocks), recommended is 4.
11
-- st,mod-12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC)
12
-- st,ref-sel: ADC reference source (0 -> internal reference, 1 -> external
13
- reference)
14
-- st,adc-freq: ADC Clock speed (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz)
15
-- st,ave-ctrl: Sample average control (0 -> 1 sample, 1 -> 2 samples, 2 -> 4
16
- samples, 3 -> 8 samples)
17
-- st,touch-det-delay: Touch detect interrupt delay (0 -> 10 us, 1 -> 50 us, 2 ->
18
- 100 us, 3 -> 500 us, 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms) recommended
19
- is 3
20
-- st,settling: Panel driver settling time (0 -> 10 us, 1 -> 100 us, 2 -> 500 us, 3
21
- -> 1 ms, 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms) recommended is 2
22
-- st,fraction-z: Length of the fractional part in z (fraction-z ([0..7]) = Count of
23
- the fractional part) recommended is 7
24
-- st,i-drive: current limit value of the touchscreen drivers (0 -> 20 mA typical 35
25
- mA max, 1 -> 50 mA typical 80 mA max)
8
+- st,ave-ctrl : Sample average control
9
+ 0 -> 1 sample
10
+ 1 -> 2 samples
11
+ 2 -> 4 samples
12
+ 3 -> 8 samples
13
+- st,touch-det-delay : Touch detect interrupt delay (recommended is 3)
14
+ 0 -> 10 us
15
+ 1 -> 50 us
16
+ 2 -> 100 us
17
+ 3 -> 500 us
18
+ 4 -> 1 ms
19
+ 5 -> 5 ms
20
+ 6 -> 10 ms
21
+ 7 -> 50 ms
22
+- st,settling : Panel driver settling time (recommended is 2)
23
+ 0 -> 10 us
24
+ 1 -> 100 us
25
+ 2 -> 500 us
26
+ 3 -> 1 ms
27
+ 4 -> 5 ms
28
+ 5 -> 10 ms
29
+ 6 -> 50 ms
30
+ 7 -> 100 ms
31
+- st,fraction-z : Length of the fractional part in z (recommended is 7)
32
+ (fraction-z ([0..7]) = Count of the fractional part)
33
+- st,i-drive : current limit value of the touchscreen drivers
34
+ 0 -> 20 mA (typical 35mA max)
35
+ 1 -> 50 mA (typical 80 mA max)
36
+
37
+Optional properties common with MFD (deprecated):
38
+ - st,sample-time : ADC conversion time in number of clock.
39
+ 0 -> 36 clocks
40
+ 1 -> 44 clocks
41
+ 2 -> 56 clocks
42
+ 3 -> 64 clocks
43
+ 4 -> 80 clocks (recommended)
44
+ 5 -> 96 clocks
45
+ 6 -> 124 clocks
46
+ - st,mod-12b : ADC Bit mode
47
+ 0 -> 10bit ADC
48
+ 1 -> 12bit ADC
49
+ - st,ref-sel : ADC reference source
50
+ 0 -> internal
51
+ 1 -> external
52
+ - st,adc-freq : ADC Clock speed
53
+ 0 -> 1.625 MHz
54
+ 1 -> 3.25 MHz
55
+ 2 || 3 -> 6.5 MHz
2656
2757 Node name must be stmpe_touchscreen and should be child node of stmpe node to
2858 which it belongs.
2959
60
+Note that common ADC settings of stmpe_touchscreen (child) will take precedence
61
+over the settings done in MFD.
62
+
3063 Example:
64
+
65
+stmpe811@41 {
66
+ compatible = "st,stmpe811";
67
+ pinctrl-names = "default";
68
+ pinctrl-0 = <&pinctrl_touch_int>;
69
+ #address-cells = <1>;
70
+ #size-cells = <0>;
71
+ reg = <0x41>;
72
+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
73
+ interrupt-parent = <&gpio4>;
74
+ interrupt-controller;
75
+ id = <0>;
76
+ blocks = <0x5>;
77
+ irq-trigger = <0x1>;
78
+ /* Common ADC settings */
79
+ /* 3.25 MHz ADC clock speed */
80
+ st,adc-freq = <1>;
81
+ /* 12-bit ADC */
82
+ st,mod-12b = <1>;
83
+ /* internal ADC reference */
84
+ st,ref-sel = <0>;
85
+ /* ADC converstion time: 80 clocks */
86
+ st,sample-time = <4>;
3187
3288 stmpe_touchscreen {
3389 compatible = "st,stmpe-ts";
34
- st,sample-time = <4>;
35
- st,mod-12b = <1>;
36
- st,ref-sel = <0>;
37
- st,adc-freq = <1>;
38
- st,ave-ctrl = <1>;
39
- st,touch-det-delay = <2>;
40
- st,settling = <2>;
90
+ reg = <0>;
91
+ /* 8 sample average control */
92
+ st,ave-ctrl = <3>;
93
+ /* 5 ms touch detect interrupt delay */
94
+ st,touch-det-delay = <5>;
95
+ /* 1 ms panel driver settling time */
96
+ st,settling = <3>;
97
+ /* 7 length fractional part in z */
4198 st,fraction-z = <7>;
99
+ /*
100
+ * 50 mA typical 80 mA max touchscreen drivers
101
+ * current limit value
102
+ */
42103 st,i-drive = <1>;
43104 };
105
+ stmpe_adc {
106
+ compatible = "st,stmpe-adc";
107
+ st,norequest-mask = <0x0F>;
108
+ };
109
+};