brintos

brintos / linux-shallow public Read only

0
0
Text · 6.4 KiB · b522c8d Raw
274 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/input/syna,rmi4.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Synaptics RMI4 compliant devices8 9maintainers:10  - Jason A. Donenfeld <Jason@zx2c4.com>11  - Matthias Schiffer <matthias.schiffer@ew.tq-group.com12  - Vincent Huang <vincent.huang@tw.synaptics.com>13 14description: |15  The Synaptics RMI4 (Register Mapped Interface 4) core is able to support RMI416  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-i2c23      - syna,rmi4-spi24 25  reg:26    maxItems: 127 28  '#address-cells':29    const: 130 31  '#size-cells':32    const: 033 34  interrupts:35    maxItems: 136 37  reset-gpios:38    maxItems: 139    description: Active low signal40 41  spi-cpha: true42  spi-cpol: true43 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: true53  vio-supply: true54 55  rmi4-f01@1:56    type: object57    additionalProperties: false58    description:59      Function 160 61    properties:62      reg:63        maxItems: 164 65      syna,nosleep-mode:66        $ref: /schemas/types.yaml#/definitions/uint3267        enum: [0, 1, 2]68        description:69          If set the device will run at full power without sleeping.  nosleep70          has 3 modes, 0 will not change the default setting, 1 will disable71          nosleep (allow sleeping), and 2 will enable nosleep (disabling72          sleep).73 74      syna,wakeup-threshold:75        $ref: /schemas/types.yaml#/definitions/uint3276        description:77          Defines the amplitude of the disturbance to the background78          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 doze83          cycle.84 85      syna,doze-interval-ms:86        description:87          The time period that the device sleeps between finger activity.88 89    required:90      - reg91 92patternProperties:93  "^rmi4-f1[12]@1[12]$":94    type: object95    unevaluatedProperties: false96    $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: 1103 104      syna,clip-x-low:105        $ref: /schemas/types.yaml#/definitions/uint32106        description:107          Minimum value for X.108 109      syna,clip-y-low:110        $ref: /schemas/types.yaml#/definitions/uint32111        description:112          Minimum value for Y.113 114      syna,clip-x-high:115        $ref: /schemas/types.yaml#/definitions/uint32116        description:117          Maximum value for X.118 119      syna,clip-y-high:120        $ref: /schemas/types.yaml#/definitions/uint32121        description:122          Maximum value for Y.123 124      syna,offset-x:125        $ref: /schemas/types.yaml#/definitions/uint32126        description:127          Add an offset to X.128 129      syna,offset-y:130        $ref: /schemas/types.yaml#/definitions/uint32131        description:132          Add an offset to Y.133 134      syna,delta-x-threshold:135        $ref: /schemas/types.yaml#/definitions/uint32136        description:137          Minimum distance on the X axis required to generate an interrupt in138          reduced reporting mode.139 140      syna,delta-y-threshold:141        $ref: /schemas/types.yaml#/definitions/uint32142        description:143          Minimum distance on the Y axis required to generate an interrupt in144          reduced reporting mode.145 146      syna,sensor-type:147        $ref: /schemas/types.yaml#/definitions/uint32148        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/uint32154        description:155          Mask for disabling posiiton reporting. Used to disable reporing156          absolute position data.157 158      syna,rezero-wait-ms:159        description:160          Time to wait after issuing a rezero command.161 162    required:163      - reg164 165  "^rmi4-f[0-9a-f]+@[0-9a-f]+$":166    type: object167    additionalProperties: true168 169    description:170      Other functions, not documented yet.171 172    properties:173      reg:174        maxItems: 1175 176    required:177      - reg178 179required:180  - compatible181  - reg182 183unevaluatedProperties: false184 185allOf:186  - $ref: /schemas/spi/spi-peripheral-props.yaml#187 188  - if:189      properties:190        compatible:191          contains:192            const: syna,rmi4-i2c193    then:194      properties:195        spi-rx-delay-us: false196        spi-tx-delay-us: false197    else:198      properties:199        syna,reset-delay-ms: false200        syna,startup-delay-ms: false201 202examples:203  - |204    #include <dt-bindings/interrupt-controller/irq.h>205 206    i2c {207        #address-cells = <1>;208        #size-cells = <0>;209 210        touchscreen@20 {211            compatible = "syna,rmi4-i2c";212            reg = <0x20>;213            interrupt-parent = <&gpx1>;214            interrupts = <6 IRQ_TYPE_EDGE_FALLING>;215 216            syna,startup-delay-ms = <100>;217            vdd-supply = <&tsp_vdd>;218            vio-supply = <&ldo32_reg>;219 220            pinctrl-0 = <&touch_irq>;221            pinctrl-names = "default";222            #address-cells = <1>;223            #size-cells = <0>;224 225            rmi4-f01@1 {226                reg = <0x1>;227                syna,nosleep-mode = <1>;228            };229 230            rmi4-f12@12 {231                reg = <0x12>;232                syna,sensor-type = <1>;233            };234 235            rmi4-f1a@1a {236                reg = <0x1a>;237            };238        };239    };240 241  - |242    #include <dt-bindings/interrupt-controller/irq.h>243 244    spi {245        #address-cells = <1>;246        #size-cells = <0>;247 248        touchscreen@0 {249            compatible = "syna,rmi4-spi";250            reg = <0x0>;251            interrupt-parent = <&gpx1>;252            interrupts = <6 IRQ_TYPE_EDGE_FALLING>;253 254            spi-max-frequency = <4000000>;255            spi-rx-delay-us = <30>;256            spi-cpha;257            spi-cpol;258 259            #address-cells = <1>;260            #size-cells = <0>;261 262            rmi4-f01@1 {263                reg = <0x1>;264                syna,nosleep-mode = <1>;265            };266 267            rmi4-f11@11 {268                reg = <0x11>;269                touchscreen-inverted-y;270                syna,sensor-type = <2>;271            };272        };273    };274