1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/input/syna,rmi4.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Synaptics RMI4 compliant devices 8 9maintainers: 10 - Jason A. Donenfeld <Jason@zx2c4.com> 11 - Matthias Schiffer <matthias.schiffer@ew.tq-group.com 12 - Vincent Huang <vincent.huang@tw.synaptics.com> 13 14description: | 15 The Synaptics RMI4 (Register Mapped Interface 4) core is able to support RMI4 16 devices using different transports (I2C, SPI) and different functions (e.g. 17 Function 1, 2D sensors using Function 11 or 12). 18 19properties: 20 compatible: 21 enum: 22 - syna,rmi4-i2c 23 - syna,rmi4-spi 24 25 reg: 26 maxItems: 1 27 28 '#address-cells': 29 const: 1 30 31 '#size-cells': 32 const: 0 33 34 interrupts: 35 maxItems: 1 36 37 reset-gpios: 38 maxItems: 1 39 description: Active low signal 40 41 spi-cpha: true 42 spi-cpol: true 43 44 syna,reset-delay-ms: 45 description: 46 Delay to wait after resetting the device. 47 48 syna,startup-delay-ms: 49 description: 50 Delay to wait after powering on the device. 51 52 vdd-supply: true 53 vio-supply: true 54 55 rmi4-f01@1: 56 type: object 57 additionalProperties: false 58 description: 59 Function 1 60 61 properties: 62 reg: 63 maxItems: 1 64 65 syna,nosleep-mode: 66 $ref: /schemas/types.yaml#/definitions/uint32 67 enum: [0, 1, 2] 68 description: 69 If set the device will run at full power without sleeping. nosleep 70 has 3 modes, 0 will not change the default setting, 1 will disable 71 nosleep (allow sleeping), and 2 will enable nosleep (disabling 72 sleep). 73 74 syna,wakeup-threshold: 75 $ref: /schemas/types.yaml#/definitions/uint32 76 description: 77 Defines the amplitude of the disturbance to the background 78 capacitance that will cause the device to wake from dozing. 79 80 syna,doze-holdoff-ms: 81 description: 82 The delay to wait after the last finger lift and the first doze 83 cycle. 84 85 syna,doze-interval-ms: 86 description: 87 The time period that the device sleeps between finger activity. 88 89 required: 90 - reg 91 92patternProperties: 93 "^rmi4-f1[12]@1[12]$": 94 type: object 95 unevaluatedProperties: false 96 $ref: /schemas/input/touchscreen/touchscreen.yaml# 97 description: 98 RMI4 Function 11 and Function 12 are for 2D touch position sensing. 99 100 properties: 101 reg: 102 maxItems: 1 103 104 syna,clip-x-low: 105 $ref: /schemas/types.yaml#/definitions/uint32 106 description: 107 Minimum value for X. 108 109 syna,clip-y-low: 110 $ref: /schemas/types.yaml#/definitions/uint32 111 description: 112 Minimum value for Y. 113 114 syna,clip-x-high: 115 $ref: /schemas/types.yaml#/definitions/uint32 116 description: 117 Maximum value for X. 118 119 syna,clip-y-high: 120 $ref: /schemas/types.yaml#/definitions/uint32 121 description: 122 Maximum value for Y. 123 124 syna,offset-x: 125 $ref: /schemas/types.yaml#/definitions/uint32 126 description: 127 Add an offset to X. 128 129 syna,offset-y: 130 $ref: /schemas/types.yaml#/definitions/uint32 131 description: 132 Add an offset to Y. 133 134 syna,delta-x-threshold: 135 $ref: /schemas/types.yaml#/definitions/uint32 136 description: 137 Minimum distance on the X axis required to generate an interrupt in 138 reduced reporting mode. 139 140 syna,delta-y-threshold: 141 $ref: /schemas/types.yaml#/definitions/uint32 142 description: 143 Minimum distance on the Y axis required to generate an interrupt in 144 reduced reporting mode. 145 146 syna,sensor-type: 147 $ref: /schemas/types.yaml#/definitions/uint32 148 enum: [1, 2] 149 description: | 150 Sensor type: 1 for touchscreen 2 for touchpad. 151 152 syna,disable-report-mask: 153 $ref: /schemas/types.yaml#/definitions/uint32 154 description: 155 Mask for disabling posiiton reporting. Used to disable reporing 156 absolute position data. 157 158 syna,rezero-wait-ms: 159 description: 160 Time to wait after issuing a rezero command. 161 162 required: 163 - reg 164 165 "^rmi4-f[0-9a-f]+@[0-9a-f]+$": 166 type: object 167 description: 168 Other functions, not documented yet. 169 170 properties: 171 reg: 172 maxItems: 1 173 174 required: 175 - reg 176 177required: 178 - compatible 179 - reg 180 181unevaluatedProperties: false 182 183allOf: 184 - $ref: /schemas/spi/spi-peripheral-props.yaml# 185 186 - if: 187 properties: 188 compatible: 189 contains: 190 const: syna,rmi4-i2c 191 then: 192 properties: 193 spi-rx-delay-us: false 194 spi-tx-delay-us: false 195 else: 196 properties: 197 syna,reset-delay-ms: false 198 syna,startup-delay-ms: false 199 200examples: 201 - | 202 #include <dt-bindings/interrupt-controller/irq.h> 203 204 i2c { 205 #address-cells = <1>; 206 #size-cells = <0>; 207 208 touchscreen@20 { 209 compatible = "syna,rmi4-i2c"; 210 reg = <0x20>; 211 interrupt-parent = <&gpx1>; 212 interrupts = <6 IRQ_TYPE_EDGE_FALLING>; 213 214 syna,startup-delay-ms = <100>; 215 vdd-supply = <&tsp_vdd>; 216 vio-supply = <&ldo32_reg>; 217 218 pinctrl-0 = <&touch_irq>; 219 pinctrl-names = "default"; 220 #address-cells = <1>; 221 #size-cells = <0>; 222 223 rmi4-f01@1 { 224 reg = <0x1>; 225 syna,nosleep-mode = <1>; 226 }; 227 228 rmi4-f12@12 { 229 reg = <0x12>; 230 syna,sensor-type = <1>; 231 }; 232 233 rmi4-f1a@1a { 234 reg = <0x1a>; 235 }; 236 }; 237 }; 238 239 - | 240 #include <dt-bindings/interrupt-controller/irq.h> 241 242 spi { 243 #address-cells = <1>; 244 #size-cells = <0>; 245 246 touchscreen@0 { 247 compatible = "syna,rmi4-spi"; 248 reg = <0x0>; 249 interrupt-parent = <&gpx1>; 250 interrupts = <6 IRQ_TYPE_EDGE_FALLING>; 251 252 spi-max-frequency = <4000000>; 253 spi-rx-delay-us = <30>; 254 spi-cpha; 255 spi-cpol; 256 257 #address-cells = <1>; 258 #size-cells = <0>; 259 260 rmi4-f01@1 { 261 reg = <0x1>; 262 syna,nosleep-mode = <1>; 263 }; 264 265 rmi4-f11@11 { 266 reg = <0x11>; 267 touchscreen-inverted-y; 268 syna,sensor-type = <2>; 269 }; 270 }; 271 }; 272