Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 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 | |
| 7 | title: Qualcomm Technologies, Inc. PM8941 USB ID Extcon device |
| 8 | |
| 9 | maintainers: |
| 10 | - Guru Das Srinagesh <quic_gurus@quicinc.com> |
| 11 | |
| 12 | description: | |
| 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 | |
| 16 | properties: |
| 17 | compatible: |
| 18 | items: |
| 19 | - const: qcom,pm8941-misc |
| 20 | |
| 21 | reg: |
| 22 | maxItems: 1 |
| 23 | |
| 24 | interrupts: |
| 25 | minItems: 1 |
| 26 | maxItems: 2 |
| 27 | |
| 28 | interrupt-names: |
| 29 | minItems: 1 |
| 30 | anyOf: |
| 31 | - items: |
| 32 | - const: usb_id |
| 33 | - const: usb_vbus |
| 34 | - items: |
| 35 | - const: usb_id |
| 36 | - items: |
| 37 | - const: usb_vbus |
| 38 | required: |
| 39 | - compatible |
| 40 | - reg |
| 41 | - interrupts |
| 42 | - interrupt-names |
| 43 | |
| 44 | additionalProperties: false |
| 45 | |
| 46 | examples: |
| 47 | - | |
| 48 | #include <dt-bindings/interrupt-controller/irq.h> |
| 49 | |
| 50 | pmic { |
| 51 | #address-cells = <1>; |
| 52 | #size-cells = <0>; |
| 53 | interrupt-controller; |
| 54 | #interrupt-cells = <4>; |
| 55 | |
| 56 | usb_id: usb-detect@900 { |
| 57 | compatible = "qcom,pm8941-misc"; |
| 58 | reg = <0x900>; |
| 59 | interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>; |
| 60 | interrupt-names = "usb_id"; |
| 61 | }; |
| 62 | }; |
| 63 | |
| 64 | usb-controller { |
| 65 | extcon = <&usb_id>; |
| 66 | }; |