diff --git a/bindings/input/touchscreen/focaltech,fts_ts.yaml b/bindings/input/touchscreen/focaltech,fts_ts.yaml new file mode 100644 index 00000000..265cc026 --- /dev/null +++ b/bindings/input/touchscreen/focaltech,fts_ts.yaml @@ -0,0 +1,107 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/focaltech,fts_ts.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: FocalTech touch controller DTB + +maintainers: + - Maulik Shah + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + enum: + - focaltech,fts_ts + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: irq gpio + + focaltech,reset-gpio: + maxItems: 1 + + focaltech,irq-gpio: + description: GPIO pin used for IRQ. The driver uses the interrupt gpio pin + as output to reset the device. + + irq-flags: + description: IRQ trigger type config. + 1 - rising edge, + 2 - falling edge, + 4 - high level, + 5 - low level. + + focaltech,max-touch-number: + description: maximum number of touches support + $ref: /schemas/types.yaml#/definitions/uint32 + + focaltech,display-coords: + description: display resolution in pixels. A four tuple consisting of minX, minY, maxX and maxY. + $ref: /schemas/types.yaml#/definitions/uint32 + +unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - focaltech,irq-gpio + - focaltech,reset-gpio + - focaltech,max-touch-number + - focaltech,display-coords + +examples: + - | + #include + #include + + i2c@f9927000 { + #address-cells = <1>; + #size-cells = <0>; + focaltech@38 { + compatible = "focaltech,fts_ts"; + reg = <0x38>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x02>; + focaltech,reset-gpio = <&msm_gpio 12 0x01>; + focaltech,irq-gpio = <&msm_gpio 13 0x02>; + focaltech,max-touch-number = <10>; + focaltech,display-coords = <0 0 1080 1920>; + pinctrl-names = "pmx_ts_active","pmx_ts_suspend","pmx_ts_release"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + pinctrl-2 = <&ts_release>; + /* + focaltech,have-key; + focaltech,key-number = <3>; + focaltech,keys = <139 102 158>; + focaltech,key-x-coords = <200 600 800>; + focaltech,key-y-coords = <2000 2000 2000>; + */ + }; + }; + + spi@78b9000 { + focaltech@0 { + compatible = "focaltech,fts_ts"; + reg = <0x0>; + spi-max-frequency = <6000000>; + interrupt-parent = <&msm_gpio>; + interrupts = <13 0x2>; + focaltech,reset-gpio = <&msm_gpio 12 0x01>; + focaltech,irq-gpio = <&msm_gpio 13 0x02>; + focaltech,max-touch-number = <10>; + focaltech,display-coords = <0 0 1080 1920>; + pinctrl-names = "pmx_ts_active","pmx_ts_suspend","pmx_ts_release"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + pinctrl-2 = <&ts_release>; + }; + }; diff --git a/bindings/input/touchscreen/goodix_ts_i2c.yaml b/bindings/input/touchscreen/goodix_ts_i2c.yaml new file mode 100644 index 00000000..f134fd2e --- /dev/null +++ b/bindings/input/touchscreen/goodix_ts_i2c.yaml @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/goodix_ts_i2c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ChipOne ICN8318 Touchscreen Controller DTB + +maintainers: + - Maulik Shah + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + enum: + - goodix,gt9916 + - goodix,gt9966 + + reg: + maxItems: 1 + + reset-gpios: + maxItems: 1 + + irq-gpio: + description: GPIO pin used for IRQ. The driver uses the interrupt gpio pin + as output to reset the device. + + irq-flags: + description: IRQ trigger type config. + 1 - rising edge, + 2 - falling edge, + 4 - high level, + 5 - low level. + + interrupts: + maxItems: 1 + + vdd-supply: + description: Power supply regulator for the chip + + vddio-supply: + description: Power supply regulator for the I2C bus + +unevaluatedProperties: false + +required: + - compatible + - reg + - reset-gpios + - irq-gpio + - irq-flags + - interrupts + - touchscreen-size-x + - touchscreen-size-y + - touchscreen-size-w + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + touchscreen@5d { + compatible = "goodix,gt9916"; + reg = <0x5d>; + reset-gpio = <&msm_gpio 12 0x0>; + irq-gpio = <&msm_gpio 13 0x2800>; + irq-flags = <2>; /* 1:trigger rising, 2:trigger falling;*/ + touchscreen-max-x = <720>; + touchscreen-max-y = <1280>; + touchscreen-max-w = <255>; + }; + }; diff --git a/bindings/input/touchscreen/novatek_nt36xxx.yaml b/bindings/input/touchscreen/novatek_nt36xxx.yaml new file mode 100644 index 00000000..73812c4b --- /dev/null +++ b/bindings/input/touchscreen/novatek_nt36xxx.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/novatek_nt36xxx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Novatek nt36xxx touch controller DTB + +maintainers: + - Maulik Shah + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + enum: + - novatek,NVT-ts + + reg: + maxItems: 1 + + novatek,reset-gpios: + maxItems: 1 + + novatek,irq-gpio: + description: GPIO pin used for IRQ. The driver uses the interrupt gpio pin + as output to reset the device. + + irq-flags: + description: IRQ trigger type config. + 1 - rising edge, + 2 - falling edge, + 4 - high level, + 5 - low level. + + vdd-supply: + description: digital voltage power supply needed to power device. + + avdd-supply: + description: analog voltage power supply needed to power device + +unevaluatedProperties: false + +required: + - compatible + - reg + - vdd-supply + - avdd-supply + - reset-gpios + - irq-gpio + +examples: + - | + #include + #include + + i2c_1 { + #address-cells = <1>; + #size-cells = <0>; + /* Novatek device tree node */ + novatek@62 { + compatible = "novatek,NVT-ts"; + reg = <0x62>; + status = "ok"; + vdd-supply = <&pm8994_lvs2>; + avdd-supply = <&pm8994_l22>; + novatek,reset-gpio = <&msm_gpio 102 0x00>; + novatek,irq-gpio = <&msm_gpio 65 0x2001>; + }; + };