xref: /linux/Documentation/devicetree/bindings/input/syna,rmi4.yaml (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
13b44738eSKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
23b44738eSKrzysztof Kozlowski%YAML 1.2
33b44738eSKrzysztof Kozlowski---
43b44738eSKrzysztof Kozlowski$id: http://devicetree.org/schemas/input/syna,rmi4.yaml#
53b44738eSKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
63b44738eSKrzysztof Kozlowski
73b44738eSKrzysztof Kozlowskititle: Synaptics RMI4 compliant devices
83b44738eSKrzysztof Kozlowski
93b44738eSKrzysztof Kozlowskimaintainers:
103b44738eSKrzysztof Kozlowski  - Jason A. Donenfeld <Jason@zx2c4.com>
113b44738eSKrzysztof Kozlowski  - Matthias Schiffer <matthias.schiffer@ew.tq-group.com
123b44738eSKrzysztof Kozlowski  - Vincent Huang <vincent.huang@tw.synaptics.com>
133b44738eSKrzysztof Kozlowski
143b44738eSKrzysztof Kozlowskidescription: |
153b44738eSKrzysztof Kozlowski  The Synaptics RMI4 (Register Mapped Interface 4) core is able to support RMI4
163b44738eSKrzysztof Kozlowski  devices using different transports (I2C, SPI) and different functions (e.g.
173b44738eSKrzysztof Kozlowski  Function 1, 2D sensors using Function 11 or 12).
183b44738eSKrzysztof Kozlowski
193b44738eSKrzysztof Kozlowskiproperties:
203b44738eSKrzysztof Kozlowski  compatible:
213b44738eSKrzysztof Kozlowski    enum:
223b44738eSKrzysztof Kozlowski      - syna,rmi4-i2c
233b44738eSKrzysztof Kozlowski      - syna,rmi4-spi
243b44738eSKrzysztof Kozlowski
253b44738eSKrzysztof Kozlowski  reg:
263b44738eSKrzysztof Kozlowski    maxItems: 1
273b44738eSKrzysztof Kozlowski
283b44738eSKrzysztof Kozlowski  '#address-cells':
293b44738eSKrzysztof Kozlowski    const: 1
303b44738eSKrzysztof Kozlowski
313b44738eSKrzysztof Kozlowski  '#size-cells':
323b44738eSKrzysztof Kozlowski    const: 0
333b44738eSKrzysztof Kozlowski
343b44738eSKrzysztof Kozlowski  interrupts:
353b44738eSKrzysztof Kozlowski    maxItems: 1
363b44738eSKrzysztof Kozlowski
373b44738eSKrzysztof Kozlowski  reset-gpios:
383b44738eSKrzysztof Kozlowski    maxItems: 1
393b44738eSKrzysztof Kozlowski    description: Active low signal
403b44738eSKrzysztof Kozlowski
413b44738eSKrzysztof Kozlowski  spi-cpha: true
423b44738eSKrzysztof Kozlowski  spi-cpol: true
433b44738eSKrzysztof Kozlowski
443b44738eSKrzysztof Kozlowski  syna,reset-delay-ms:
453b44738eSKrzysztof Kozlowski    description:
463b44738eSKrzysztof Kozlowski      Delay to wait after resetting the device.
473b44738eSKrzysztof Kozlowski
483b44738eSKrzysztof Kozlowski  syna,startup-delay-ms:
493b44738eSKrzysztof Kozlowski    description:
503b44738eSKrzysztof Kozlowski      Delay to wait after powering on the device.
513b44738eSKrzysztof Kozlowski
523b44738eSKrzysztof Kozlowski  vdd-supply: true
533b44738eSKrzysztof Kozlowski  vio-supply: true
543b44738eSKrzysztof Kozlowski
553b44738eSKrzysztof Kozlowski  rmi4-f01@1:
563b44738eSKrzysztof Kozlowski    type: object
573b44738eSKrzysztof Kozlowski    additionalProperties: false
583b44738eSKrzysztof Kozlowski    description:
593b44738eSKrzysztof Kozlowski      Function 1
603b44738eSKrzysztof Kozlowski
613b44738eSKrzysztof Kozlowski    properties:
623b44738eSKrzysztof Kozlowski      reg:
633b44738eSKrzysztof Kozlowski        maxItems: 1
643b44738eSKrzysztof Kozlowski
653b44738eSKrzysztof Kozlowski      syna,nosleep-mode:
663b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
673b44738eSKrzysztof Kozlowski        enum: [0, 1, 2]
683b44738eSKrzysztof Kozlowski        description:
693b44738eSKrzysztof Kozlowski          If set the device will run at full power without sleeping.  nosleep
703b44738eSKrzysztof Kozlowski          has 3 modes, 0 will not change the default setting, 1 will disable
713b44738eSKrzysztof Kozlowski          nosleep (allow sleeping), and 2 will enable nosleep (disabling
723b44738eSKrzysztof Kozlowski          sleep).
733b44738eSKrzysztof Kozlowski
743b44738eSKrzysztof Kozlowski      syna,wakeup-threshold:
753b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
763b44738eSKrzysztof Kozlowski        description:
773b44738eSKrzysztof Kozlowski          Defines the amplitude of the disturbance to the background
783b44738eSKrzysztof Kozlowski          capacitance that will cause the device to wake from dozing.
793b44738eSKrzysztof Kozlowski
803b44738eSKrzysztof Kozlowski      syna,doze-holdoff-ms:
813b44738eSKrzysztof Kozlowski        description:
823b44738eSKrzysztof Kozlowski          The delay to wait after the last finger lift and the first doze
833b44738eSKrzysztof Kozlowski          cycle.
843b44738eSKrzysztof Kozlowski
853b44738eSKrzysztof Kozlowski      syna,doze-interval-ms:
863b44738eSKrzysztof Kozlowski        description:
873b44738eSKrzysztof Kozlowski          The time period that the device sleeps between finger activity.
883b44738eSKrzysztof Kozlowski
893b44738eSKrzysztof Kozlowski    required:
903b44738eSKrzysztof Kozlowski      - reg
913b44738eSKrzysztof Kozlowski
923b44738eSKrzysztof KozlowskipatternProperties:
933b44738eSKrzysztof Kozlowski  "^rmi4-f1[12]@1[12]$":
943b44738eSKrzysztof Kozlowski    type: object
953b44738eSKrzysztof Kozlowski    unevaluatedProperties: false
963b44738eSKrzysztof Kozlowski    $ref: /schemas/input/touchscreen/touchscreen.yaml#
973b44738eSKrzysztof Kozlowski    description:
983b44738eSKrzysztof Kozlowski      RMI4 Function 11 and Function 12 are for 2D touch position sensing.
993b44738eSKrzysztof Kozlowski
1003b44738eSKrzysztof Kozlowski    properties:
1013b44738eSKrzysztof Kozlowski      reg:
1023b44738eSKrzysztof Kozlowski        maxItems: 1
1033b44738eSKrzysztof Kozlowski
1043b44738eSKrzysztof Kozlowski      syna,clip-x-low:
1053b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1063b44738eSKrzysztof Kozlowski        description:
1073b44738eSKrzysztof Kozlowski          Minimum value for X.
1083b44738eSKrzysztof Kozlowski
1093b44738eSKrzysztof Kozlowski      syna,clip-y-low:
1103b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1113b44738eSKrzysztof Kozlowski        description:
1123b44738eSKrzysztof Kozlowski          Minimum value for Y.
1133b44738eSKrzysztof Kozlowski
1143b44738eSKrzysztof Kozlowski      syna,clip-x-high:
1153b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1163b44738eSKrzysztof Kozlowski        description:
1173b44738eSKrzysztof Kozlowski          Maximum value for X.
1183b44738eSKrzysztof Kozlowski
1193b44738eSKrzysztof Kozlowski      syna,clip-y-high:
1203b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1213b44738eSKrzysztof Kozlowski        description:
1223b44738eSKrzysztof Kozlowski          Maximum value for Y.
1233b44738eSKrzysztof Kozlowski
1243b44738eSKrzysztof Kozlowski      syna,offset-x:
1253b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1263b44738eSKrzysztof Kozlowski        description:
1273b44738eSKrzysztof Kozlowski          Add an offset to X.
1283b44738eSKrzysztof Kozlowski
1293b44738eSKrzysztof Kozlowski      syna,offset-y:
1303b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1313b44738eSKrzysztof Kozlowski        description:
1323b44738eSKrzysztof Kozlowski          Add an offset to Y.
1333b44738eSKrzysztof Kozlowski
1343b44738eSKrzysztof Kozlowski      syna,delta-x-threshold:
1353b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1363b44738eSKrzysztof Kozlowski        description:
1373b44738eSKrzysztof Kozlowski          Minimum distance on the X axis required to generate an interrupt in
1383b44738eSKrzysztof Kozlowski          reduced reporting mode.
1393b44738eSKrzysztof Kozlowski
1403b44738eSKrzysztof Kozlowski      syna,delta-y-threshold:
1413b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1423b44738eSKrzysztof Kozlowski        description:
1433b44738eSKrzysztof Kozlowski          Minimum distance on the Y axis required to generate an interrupt in
1443b44738eSKrzysztof Kozlowski          reduced reporting mode.
1453b44738eSKrzysztof Kozlowski
1463b44738eSKrzysztof Kozlowski      syna,sensor-type:
1473b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1483b44738eSKrzysztof Kozlowski        enum: [1, 2]
1493b44738eSKrzysztof Kozlowski        description: |
1503b44738eSKrzysztof Kozlowski          Sensor type: 1 for touchscreen 2 for touchpad.
1513b44738eSKrzysztof Kozlowski
1523b44738eSKrzysztof Kozlowski      syna,disable-report-mask:
1533b44738eSKrzysztof Kozlowski        $ref: /schemas/types.yaml#/definitions/uint32
1543b44738eSKrzysztof Kozlowski        description:
1553b44738eSKrzysztof Kozlowski          Mask for disabling posiiton reporting. Used to disable reporing
1563b44738eSKrzysztof Kozlowski          absolute position data.
1573b44738eSKrzysztof Kozlowski
1583b44738eSKrzysztof Kozlowski      syna,rezero-wait-ms:
1593b44738eSKrzysztof Kozlowski        description:
1603b44738eSKrzysztof Kozlowski          Time to wait after issuing a rezero command.
1613b44738eSKrzysztof Kozlowski
1623b44738eSKrzysztof Kozlowski    required:
1633b44738eSKrzysztof Kozlowski      - reg
1643b44738eSKrzysztof Kozlowski
1653b44738eSKrzysztof Kozlowski  "^rmi4-f[0-9a-f]+@[0-9a-f]+$":
1663b44738eSKrzysztof Kozlowski    type: object
167*a9f32acfSRob Herring    additionalProperties: true
168*a9f32acfSRob Herring
1693b44738eSKrzysztof Kozlowski    description:
1703b44738eSKrzysztof Kozlowski      Other functions, not documented yet.
1713b44738eSKrzysztof Kozlowski
1723b44738eSKrzysztof Kozlowski    properties:
1733b44738eSKrzysztof Kozlowski      reg:
1743b44738eSKrzysztof Kozlowski        maxItems: 1
1753b44738eSKrzysztof Kozlowski
1763b44738eSKrzysztof Kozlowski    required:
1773b44738eSKrzysztof Kozlowski      - reg
1783b44738eSKrzysztof Kozlowski
1793b44738eSKrzysztof Kozlowskirequired:
1803b44738eSKrzysztof Kozlowski  - compatible
1813b44738eSKrzysztof Kozlowski  - reg
1823b44738eSKrzysztof Kozlowski
1833b44738eSKrzysztof KozlowskiunevaluatedProperties: false
1843b44738eSKrzysztof Kozlowski
1853b44738eSKrzysztof KozlowskiallOf:
1863b44738eSKrzysztof Kozlowski  - $ref: /schemas/spi/spi-peripheral-props.yaml#
1873b44738eSKrzysztof Kozlowski
1883b44738eSKrzysztof Kozlowski  - if:
1893b44738eSKrzysztof Kozlowski      properties:
1903b44738eSKrzysztof Kozlowski        compatible:
1913b44738eSKrzysztof Kozlowski          contains:
1923b44738eSKrzysztof Kozlowski            const: syna,rmi4-i2c
1933b44738eSKrzysztof Kozlowski    then:
1943b44738eSKrzysztof Kozlowski      properties:
1953b44738eSKrzysztof Kozlowski        spi-rx-delay-us: false
1963b44738eSKrzysztof Kozlowski        spi-tx-delay-us: false
1973b44738eSKrzysztof Kozlowski    else:
1983b44738eSKrzysztof Kozlowski      properties:
1993b44738eSKrzysztof Kozlowski        syna,reset-delay-ms: false
2003b44738eSKrzysztof Kozlowski        syna,startup-delay-ms: false
2013b44738eSKrzysztof Kozlowski
2023b44738eSKrzysztof Kozlowskiexamples:
2033b44738eSKrzysztof Kozlowski  - |
2043b44738eSKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/irq.h>
2053b44738eSKrzysztof Kozlowski
2063b44738eSKrzysztof Kozlowski    i2c {
2073b44738eSKrzysztof Kozlowski        #address-cells = <1>;
2083b44738eSKrzysztof Kozlowski        #size-cells = <0>;
2093b44738eSKrzysztof Kozlowski
2103b44738eSKrzysztof Kozlowski        touchscreen@20 {
2113b44738eSKrzysztof Kozlowski            compatible = "syna,rmi4-i2c";
2123b44738eSKrzysztof Kozlowski            reg = <0x20>;
2133b44738eSKrzysztof Kozlowski            interrupt-parent = <&gpx1>;
2143b44738eSKrzysztof Kozlowski            interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
2153b44738eSKrzysztof Kozlowski
2163b44738eSKrzysztof Kozlowski            syna,startup-delay-ms = <100>;
2173b44738eSKrzysztof Kozlowski            vdd-supply = <&tsp_vdd>;
2183b44738eSKrzysztof Kozlowski            vio-supply = <&ldo32_reg>;
2193b44738eSKrzysztof Kozlowski
2203b44738eSKrzysztof Kozlowski            pinctrl-0 = <&touch_irq>;
2213b44738eSKrzysztof Kozlowski            pinctrl-names = "default";
2223b44738eSKrzysztof Kozlowski            #address-cells = <1>;
2233b44738eSKrzysztof Kozlowski            #size-cells = <0>;
2243b44738eSKrzysztof Kozlowski
2253b44738eSKrzysztof Kozlowski            rmi4-f01@1 {
2263b44738eSKrzysztof Kozlowski                reg = <0x1>;
2273b44738eSKrzysztof Kozlowski                syna,nosleep-mode = <1>;
2283b44738eSKrzysztof Kozlowski            };
2293b44738eSKrzysztof Kozlowski
2303b44738eSKrzysztof Kozlowski            rmi4-f12@12 {
2313b44738eSKrzysztof Kozlowski                reg = <0x12>;
2323b44738eSKrzysztof Kozlowski                syna,sensor-type = <1>;
2333b44738eSKrzysztof Kozlowski            };
2343b44738eSKrzysztof Kozlowski
2353b44738eSKrzysztof Kozlowski            rmi4-f1a@1a {
2363b44738eSKrzysztof Kozlowski                reg = <0x1a>;
2373b44738eSKrzysztof Kozlowski            };
2383b44738eSKrzysztof Kozlowski        };
2393b44738eSKrzysztof Kozlowski    };
2403b44738eSKrzysztof Kozlowski
2413b44738eSKrzysztof Kozlowski  - |
2423b44738eSKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/irq.h>
2433b44738eSKrzysztof Kozlowski
2443b44738eSKrzysztof Kozlowski    spi {
2453b44738eSKrzysztof Kozlowski        #address-cells = <1>;
2463b44738eSKrzysztof Kozlowski        #size-cells = <0>;
2473b44738eSKrzysztof Kozlowski
2483b44738eSKrzysztof Kozlowski        touchscreen@0 {
2493b44738eSKrzysztof Kozlowski            compatible = "syna,rmi4-spi";
2503b44738eSKrzysztof Kozlowski            reg = <0x0>;
2513b44738eSKrzysztof Kozlowski            interrupt-parent = <&gpx1>;
2523b44738eSKrzysztof Kozlowski            interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
2533b44738eSKrzysztof Kozlowski
2543b44738eSKrzysztof Kozlowski            spi-max-frequency = <4000000>;
2553b44738eSKrzysztof Kozlowski            spi-rx-delay-us = <30>;
2563b44738eSKrzysztof Kozlowski            spi-cpha;
2573b44738eSKrzysztof Kozlowski            spi-cpol;
2583b44738eSKrzysztof Kozlowski
2593b44738eSKrzysztof Kozlowski            #address-cells = <1>;
2603b44738eSKrzysztof Kozlowski            #size-cells = <0>;
2613b44738eSKrzysztof Kozlowski
2623b44738eSKrzysztof Kozlowski            rmi4-f01@1 {
2633b44738eSKrzysztof Kozlowski                reg = <0x1>;
2643b44738eSKrzysztof Kozlowski                syna,nosleep-mode = <1>;
2653b44738eSKrzysztof Kozlowski            };
2663b44738eSKrzysztof Kozlowski
2673b44738eSKrzysztof Kozlowski            rmi4-f11@11 {
2683b44738eSKrzysztof Kozlowski                reg = <0x11>;
2693b44738eSKrzysztof Kozlowski                touchscreen-inverted-y;
2703b44738eSKrzysztof Kozlowski                syna,sensor-type = <2>;
2713b44738eSKrzysztof Kozlowski            };
2723b44738eSKrzysztof Kozlowski        };
2733b44738eSKrzysztof Kozlowski    };
274