xref: /linux/Documentation/devicetree/bindings/input/touchscreen/rohm,bu21013.yaml (revision 4f38da1f027ea2c9f01bb71daa7a299c191b6940)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/input/touchscreen/rohm,bu21013.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Rohm BU21013 touchscreen
8
9description:
10  Rohm BU21013 I2C driven touchscreen controller.
11
12maintainers:
13  - Dario Binacchi <dario.binacchi@amarulasolutions.com>
14
15allOf:
16  - $ref: touchscreen.yaml#
17
18properties:
19  compatible:
20    enum:
21      - rohm,bu21013_tp
22
23  reg:
24    maxItems: 1
25
26  interrupts:
27    maxItems: 1
28
29  reset-gpios:
30    maxItems: 1
31
32  touch-gpios:
33    maxItems: 1
34    description: GPIO registering a touch event.
35
36  avdd-supply:
37    description: Analogic power supply
38
39  rohm,touch-max-x:
40    deprecated: true
41    description: Maximum value on the X axis.
42    $ref: /schemas/types.yaml#/definitions/uint32
43
44  rohm,touch-max-y:
45    deprecated: true
46    description: Maximum value on the Y axis.
47    $ref: /schemas/types.yaml#/definitions/uint32
48
49  rohm,flip-x:
50    deprecated: true
51    description: Flip touch coordinates on the X axis
52    type: boolean
53
54  rohm,flip-y:
55    deprecated: true
56    description: Flip touch coordinates on the Y axis
57    type: boolean
58
59  touchscreen-inverted-x: true
60  touchscreen-inverted-y: true
61  touchscreen-size-x: true
62  touchscreen-size-y: true
63  touchscreen-swapped-x-y: true
64
65additionalProperties: false
66
67required:
68  - compatible
69  - reg
70  - reset-gpios
71  - interrupts
72
73examples:
74  - |
75    #include <dt-bindings/gpio/gpio.h>
76    #include <dt-bindings/interrupt-controller/irq.h>
77    i2c {
78        #address-cells = <1>;
79        #size-cells = <0>;
80
81        touchscreen@5c {
82            compatible = "rohm,bu21013_tp";
83            reg = <0x5c>;
84
85            interrupt-parent = <&gpio2>;
86            interrupts = <0x20 IRQ_TYPE_LEVEL_LOW>;
87            reset-gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
88            touch-gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
89            avdd-supply = <&ab8500_ldo_aux1_reg>;
90
91            touchscreen-size-x = <384>;
92            touchscreen-size-y = <704>;
93            touchscreen-inverted-y;
94        };
95    };
96