Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [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/usb/qcom,wcd939x-usbss.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Qualcomm WCD9380/WCD9385 USB SubSystem Altmode/Analog Audio Switch |
| 8 | |
| 9 | maintainers: |
| 10 | - Neil Armstrong <neil.armstrong@linaro.org> |
| 11 | |
| 12 | description: |
| 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 | |
| 21 | properties: |
| 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: |
| 39 | description: Flag the port as possible handle of altmode switching |
| 40 | type: boolean |
| 41 | |
| 42 | orientation-switch: |
| 43 | description: Flag the port as possible handler of orientation switching |
| 44 | type: boolean |
| 45 | |
| 46 | ports: |
| 47 | $ref: /schemas/graph.yaml#/properties/ports |
| 48 | properties: |
| 49 | port@0: |
| 50 | $ref: /schemas/graph.yaml#/properties/port |
| 51 | description: |
| 52 | A port node to link the WCD939x USB SubSystem to a TypeC controller for the |
| 53 | purpose of handling altmode muxing and orientation switching. |
| 54 | |
| 55 | port@1: |
| 56 | $ref: /schemas/graph.yaml#/properties/port |
| 57 | description: |
| 58 | A port node to link the WCD939x USB SubSystem to the Codec SubSystem for the |
| 59 | purpose of handling USB-C Audio Accessory Mode muxing and orientation switching. |
| 60 | |
| 61 | required: |
| 62 | - compatible |
| 63 | - reg |
| 64 | - ports |
| 65 | |
| 66 | additionalProperties: false |
| 67 | |
| 68 | examples: |
| 69 | - | |
| 70 | i2c { |
| 71 | #address-cells = <1>; |
| 72 | #size-cells = <0>; |
| 73 | |
| 74 | typec-mux@42 { |
| 75 | compatible = "qcom,wcd9390-usbss"; |
| 76 | reg = <0x42>; |
| 77 | |
| 78 | vdd-supply = <&vreg_bob>; |
| 79 | |
| 80 | mode-switch; |
| 81 | orientation-switch; |
| 82 | |
| 83 | ports { |
| 84 | #address-cells = <1>; |
| 85 | #size-cells = <0>; |
| 86 | |
| 87 | port@0 { |
| 88 | reg = <0>; |
| 89 | wcd9390_usbss_sbu: endpoint { |
| 90 | remote-endpoint = <&typec_sbu>; |
| 91 | }; |
| 92 | }; |
| 93 | port@1 { |
| 94 | reg = <1>; |
| 95 | wcd9390_usbss_codec: endpoint { |
| 96 | remote-endpoint = <&wcd9390_codec_usbss>; |
| 97 | }; |
| 98 | }; |
| 99 | }; |
| 100 | }; |
| 101 | }; |
| 102 | ... |