xref: /freebsd/sys/contrib/device-tree/Bindings/extcon/qcom,pm8941-misc.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22eb4d8dcSEmmanuel Vadot%YAML 1.2
32eb4d8dcSEmmanuel Vadot---
42eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/extcon/qcom,pm8941-misc.yaml#
52eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
62eb4d8dcSEmmanuel Vadot
72eb4d8dcSEmmanuel Vadottitle: Qualcomm Technologies, Inc. PM8941 USB ID Extcon device
82eb4d8dcSEmmanuel Vadot
92eb4d8dcSEmmanuel Vadotmaintainers:
10*aa1a8ff2SEmmanuel Vadot  - Guru Das Srinagesh <quic_gurus@quicinc.com>
112eb4d8dcSEmmanuel Vadot
122eb4d8dcSEmmanuel Vadotdescription: |
132eb4d8dcSEmmanuel Vadot  Some Qualcomm PMICs have a "misc" module that can be used to detect when
142eb4d8dcSEmmanuel Vadot  the USB ID pin has been pulled low or high.
152eb4d8dcSEmmanuel Vadot
162eb4d8dcSEmmanuel Vadotproperties:
172eb4d8dcSEmmanuel Vadot  compatible:
182eb4d8dcSEmmanuel Vadot    items:
192eb4d8dcSEmmanuel Vadot      - const: qcom,pm8941-misc
202eb4d8dcSEmmanuel Vadot
212eb4d8dcSEmmanuel Vadot  reg:
222eb4d8dcSEmmanuel Vadot    maxItems: 1
232eb4d8dcSEmmanuel Vadot
242eb4d8dcSEmmanuel Vadot  interrupts:
252eb4d8dcSEmmanuel Vadot    minItems: 1
262eb4d8dcSEmmanuel Vadot    maxItems: 2
272eb4d8dcSEmmanuel Vadot
282eb4d8dcSEmmanuel Vadot  interrupt-names:
292eb4d8dcSEmmanuel Vadot    minItems: 1
30f126890aSEmmanuel Vadot    anyOf:
31f126890aSEmmanuel Vadot      - items:
322eb4d8dcSEmmanuel Vadot          - const: usb_id
332eb4d8dcSEmmanuel Vadot          - const: usb_vbus
34f126890aSEmmanuel Vadot      - items:
35f126890aSEmmanuel Vadot          - const: usb_id
36f126890aSEmmanuel Vadot      - items:
37f126890aSEmmanuel Vadot          - const: usb_vbus
382eb4d8dcSEmmanuel Vadotrequired:
392eb4d8dcSEmmanuel Vadot  - compatible
402eb4d8dcSEmmanuel Vadot  - reg
412eb4d8dcSEmmanuel Vadot  - interrupts
422eb4d8dcSEmmanuel Vadot  - interrupt-names
432eb4d8dcSEmmanuel Vadot
442eb4d8dcSEmmanuel VadotadditionalProperties: false
452eb4d8dcSEmmanuel Vadot
462eb4d8dcSEmmanuel Vadotexamples:
472eb4d8dcSEmmanuel Vadot  - |
482eb4d8dcSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
492eb4d8dcSEmmanuel Vadot
502eb4d8dcSEmmanuel Vadot    pmic {
512eb4d8dcSEmmanuel Vadot            #address-cells = <1>;
522eb4d8dcSEmmanuel Vadot            #size-cells = <0>;
532eb4d8dcSEmmanuel Vadot            interrupt-controller;
542eb4d8dcSEmmanuel Vadot            #interrupt-cells = <4>;
552eb4d8dcSEmmanuel Vadot
56f126890aSEmmanuel Vadot            usb_id: usb-detect@900 {
572eb4d8dcSEmmanuel Vadot                    compatible = "qcom,pm8941-misc";
582eb4d8dcSEmmanuel Vadot                    reg = <0x900>;
592eb4d8dcSEmmanuel Vadot                    interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
602eb4d8dcSEmmanuel Vadot                    interrupt-names = "usb_id";
612eb4d8dcSEmmanuel Vadot            };
622eb4d8dcSEmmanuel Vadot    };
632eb4d8dcSEmmanuel Vadot
642eb4d8dcSEmmanuel Vadot    usb-controller {
652eb4d8dcSEmmanuel Vadot           extcon = <&usb_id>;
662eb4d8dcSEmmanuel Vadot    };
67