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