xref: /freebsd/sys/contrib/device-tree/Bindings/extcon/qcom,pm8941-misc.yaml (revision 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc)
1*2eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*2eb4d8dcSEmmanuel Vadot%YAML 1.2
3*2eb4d8dcSEmmanuel Vadot---
4*2eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/extcon/qcom,pm8941-misc.yaml#
5*2eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*2eb4d8dcSEmmanuel Vadot
7*2eb4d8dcSEmmanuel Vadottitle: Qualcomm Technologies, Inc. PM8941 USB ID Extcon device
8*2eb4d8dcSEmmanuel Vadot
9*2eb4d8dcSEmmanuel Vadotmaintainers:
10*2eb4d8dcSEmmanuel Vadot  - Guru Das Srinagesh <gurus@codeaurora.org>
11*2eb4d8dcSEmmanuel Vadot
12*2eb4d8dcSEmmanuel Vadotdescription: |
13*2eb4d8dcSEmmanuel Vadot  Some Qualcomm PMICs have a "misc" module that can be used to detect when
14*2eb4d8dcSEmmanuel Vadot  the USB ID pin has been pulled low or high.
15*2eb4d8dcSEmmanuel Vadot
16*2eb4d8dcSEmmanuel Vadotproperties:
17*2eb4d8dcSEmmanuel Vadot  compatible:
18*2eb4d8dcSEmmanuel Vadot    items:
19*2eb4d8dcSEmmanuel Vadot      - const: qcom,pm8941-misc
20*2eb4d8dcSEmmanuel Vadot
21*2eb4d8dcSEmmanuel Vadot  reg:
22*2eb4d8dcSEmmanuel Vadot    maxItems: 1
23*2eb4d8dcSEmmanuel Vadot
24*2eb4d8dcSEmmanuel Vadot  interrupts:
25*2eb4d8dcSEmmanuel Vadot    minItems: 1
26*2eb4d8dcSEmmanuel Vadot    maxItems: 2
27*2eb4d8dcSEmmanuel Vadot
28*2eb4d8dcSEmmanuel Vadot  interrupt-names:
29*2eb4d8dcSEmmanuel Vadot    minItems: 1
30*2eb4d8dcSEmmanuel Vadot    items:
31*2eb4d8dcSEmmanuel Vadot      - const: usb_id
32*2eb4d8dcSEmmanuel Vadot      - const: usb_vbus
33*2eb4d8dcSEmmanuel Vadot
34*2eb4d8dcSEmmanuel Vadotrequired:
35*2eb4d8dcSEmmanuel Vadot  - compatible
36*2eb4d8dcSEmmanuel Vadot  - reg
37*2eb4d8dcSEmmanuel Vadot  - interrupts
38*2eb4d8dcSEmmanuel Vadot  - interrupt-names
39*2eb4d8dcSEmmanuel Vadot
40*2eb4d8dcSEmmanuel VadotadditionalProperties: false
41*2eb4d8dcSEmmanuel Vadot
42*2eb4d8dcSEmmanuel Vadotexamples:
43*2eb4d8dcSEmmanuel Vadot  - |
44*2eb4d8dcSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
45*2eb4d8dcSEmmanuel Vadot
46*2eb4d8dcSEmmanuel Vadot    pmic {
47*2eb4d8dcSEmmanuel Vadot            #address-cells = <1>;
48*2eb4d8dcSEmmanuel Vadot            #size-cells = <0>;
49*2eb4d8dcSEmmanuel Vadot            interrupt-controller;
50*2eb4d8dcSEmmanuel Vadot            #interrupt-cells = <4>;
51*2eb4d8dcSEmmanuel Vadot
52*2eb4d8dcSEmmanuel Vadot            usb_id: misc@900 {
53*2eb4d8dcSEmmanuel Vadot                    compatible = "qcom,pm8941-misc";
54*2eb4d8dcSEmmanuel Vadot                    reg = <0x900>;
55*2eb4d8dcSEmmanuel Vadot                    interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
56*2eb4d8dcSEmmanuel Vadot                    interrupt-names = "usb_id";
57*2eb4d8dcSEmmanuel Vadot            };
58*2eb4d8dcSEmmanuel Vadot    };
59*2eb4d8dcSEmmanuel Vadot
60*2eb4d8dcSEmmanuel Vadot    usb-controller {
61*2eb4d8dcSEmmanuel Vadot           extcon = <&usb_id>;
62*2eb4d8dcSEmmanuel Vadot    };
63