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