xref: /linux/Documentation/devicetree/bindings/usb/qcom,wcd939x-usbss.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/usb/qcom,wcd939x-usbss.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm WCD9380/WCD9385 USB SubSystem Altmode/Analog Audio Switch
8
9maintainers:
10  - Neil Armstrong <neil.armstrong@linaro.org>
11
12description:
13  Qualcomm WCD9390/WCD9395 is a standalone Hi-Fi audio codec IC with a
14  functionally separate USB SubSystem for Altmode/Analog Audio Switch
15  accessible over an I2C interface.
16  The Audio Headphone and Microphone data path between the Codec and the
17  USB-C Mux subsystems are external to the IC, thus requiring DT port-endpoint
18  graph description to handle USB-C altmode & orientation switching for Audio
19  Accessory Mode.
20
21properties:
22  compatible:
23    oneOf:
24      - const: qcom,wcd9390-usbss
25      - items:
26          - const: qcom,wcd9395-usbss
27          - const: qcom,wcd9390-usbss
28
29  reg:
30    maxItems: 1
31
32  reset-gpios:
33    maxItems: 1
34
35  vdd-supply:
36    description: USBSS VDD power supply
37
38  mode-switch: true
39  orientation-switch: true
40
41  ports:
42    $ref: /schemas/graph.yaml#/properties/ports
43    properties:
44      port@0:
45        $ref: /schemas/graph.yaml#/properties/port
46        description:
47          A port node to link the WCD939x USB SubSystem to a TypeC controller for the
48          purpose of handling altmode muxing and orientation switching.
49
50      port@1:
51        $ref: /schemas/graph.yaml#/properties/port
52        description:
53          A port node to link the WCD939x USB SubSystem to the Codec SubSystem for the
54          purpose of handling USB-C Audio Accessory Mode muxing and orientation switching.
55
56required:
57  - compatible
58  - reg
59  - ports
60
61allOf:
62  - $ref: usb-switch.yaml#
63
64additionalProperties: false
65
66examples:
67  - |
68    i2c {
69        #address-cells = <1>;
70        #size-cells = <0>;
71
72        typec-mux@42 {
73            compatible = "qcom,wcd9390-usbss";
74            reg = <0x42>;
75
76            vdd-supply = <&vreg_bob>;
77
78            mode-switch;
79            orientation-switch;
80
81            ports {
82                #address-cells = <1>;
83                #size-cells = <0>;
84
85                port@0 {
86                    reg = <0>;
87                    wcd9390_usbss_sbu: endpoint {
88                        remote-endpoint = <&typec_sbu>;
89                    };
90                };
91                port@1 {
92                    reg = <1>;
93                    wcd9390_usbss_codec: endpoint {
94                        remote-endpoint = <&wcd9390_codec_usbss>;
95                    };
96                };
97            };
98        };
99    };
100...
101