HID: input: avoid polling stylus battery on Chromebook Pompom
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / usb / ti,tps6598x.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/usb/ti,tps6598x.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Texas Instruments 6598x Type-C Port Switch and Power Delivery controller
8
9 maintainers:
10   - Bryan O'Donoghue <bryan.odonoghue@linaro.org>
11
12 description: |
13   Texas Instruments 6598x Type-C Port Switch and Power Delivery controller
14
15   A variant of this controller known as Apple CD321x or Apple ACE is also
16   present on hardware with Apple SoCs such as the M1.
17
18 properties:
19   compatible:
20     enum:
21       - ti,tps6598x
22       - apple,cd321x
23       - ti,tps25750
24
25   reg:
26     minItems: 1
27     items:
28       - description: main PD controller address
29       - description: |
30           I2C slave address field in PBMs input data
31           which is used as the device address when writing the
32           patch for TPS25750.
33           The patch address can be any value except 0x00, 0x20,
34           0x21, 0x22, and 0x23
35
36   reg-names:
37     items:
38       - const: main
39       - const: patch-address
40
41   wakeup-source: true
42
43   interrupts:
44     maxItems: 1
45
46   interrupt-names:
47     items:
48       - const: irq
49
50   connector:
51     $ref: /schemas/connector/usb-connector.yaml#
52
53   firmware-name:
54     description: |
55       Should contain the name of the default patch binary
56       file located on the firmware search path which is
57       used to switch the controller into APP mode.
58       This is used when tps25750 doesn't have an EEPROM
59       connected to it.
60     maxItems: 1
61
62 required:
63   - compatible
64   - reg
65
66 allOf:
67   - if:
68       properties:
69         compatible:
70           contains:
71             const: ti,tps25750
72     then:
73       properties:
74         reg:
75           maxItems: 2
76
77         connector:
78           required:
79             - data-role
80
81       required:
82         - connector
83         - reg-names
84     else:
85       properties:
86         reg:
87           maxItems: 1
88
89 additionalProperties: false
90
91 examples:
92   - |
93     #include <dt-bindings/interrupt-controller/irq.h>
94     i2c {
95         #address-cells = <1>;
96         #size-cells = <0>;
97
98         tps6598x: tps6598x@38 {
99             compatible = "ti,tps6598x";
100             reg = <0x38>;
101             wakeup-source;
102
103             interrupt-parent = <&msmgpio>;
104             interrupts = <107 IRQ_TYPE_LEVEL_LOW>;
105             interrupt-names = "irq";
106
107             pinctrl-names = "default";
108             pinctrl-0 = <&typec_pins>;
109
110             typec_con: connector {
111                 compatible = "usb-c-connector";
112                 label = "USB-C";
113                 port {
114                     typec_ep: endpoint {
115                         remote-endpoint = <&otg_ep>;
116                     };
117                 };
118             };
119         };
120     };
121
122   - |
123     #include <dt-bindings/interrupt-controller/irq.h>
124     i2c {
125         #address-cells = <1>;
126         #size-cells = <0>;
127
128         typec@21 {
129             compatible = "ti,tps25750";
130             reg = <0x21>, <0x0f>;
131             reg-names = "main", "patch-address";
132
133             interrupt-parent = <&msmgpio>;
134             interrupts = <100 IRQ_TYPE_LEVEL_LOW>;
135             interrupt-names = "irq";
136             firmware-name = "tps25750.bin";
137
138             pinctrl-names = "default";
139             pinctrl-0 = <&typec_pins>;
140
141             typec_con0: connector {
142                 compatible = "usb-c-connector";
143                 label = "USB-C";
144                 data-role = "dual";
145                 port {
146                     typec_ep0: endpoint {
147                         remote-endpoint = <&otg_ep>;
148                     };
149                 };
150             };
151         };
152     };
153 ...