To actually support analog audio output, the fsa4480 driver needs to deliver the hotplug notifications over the Type-C graph to an audio codec driver. Describe a second port intended for the codec. Keep it optional to make sure existing device trees do still validate.
Signed-off-by: Val Packett <[email protected]> --- .../devicetree/bindings/usb/fcs,fsa4480.yaml | 90 +++++++++++++------ 1 file changed, 63 insertions(+), 27 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml b/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml index 89b1fb90aeeb..9dfe95b6adf3 100644 --- a/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml +++ b/Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml @@ -9,31 +9,11 @@ title: ON Semiconductor Analog Audio Switch maintainers: - Bjorn Andersson <[email protected]> -properties: - compatible: - oneOf: - - const: fcs,fsa4480 - - items: - - enum: - - ocs,ocp96011 - - const: fcs,fsa4480 - - reg: - maxItems: 1 - - interrupts: - maxItems: 1 - - vcc-supply: - description: power supply (2.7V-5.5V) - - mode-switch: true - orientation-switch: true - - port: +$defs: + controller-port: $ref: /schemas/graph.yaml#/$defs/port-base description: - A port node to link the FSA4480 to a TypeC controller for the purpose of + A port node to link the FSA4480 to a Type-C controller for the purpose of handling altmode muxing and orientation switching. unevaluatedProperties: false @@ -69,15 +49,56 @@ properties: - AUX+ connected to SBU2 - AUX- connected to SBU1 +properties: + compatible: + oneOf: + - const: fcs,fsa4480 + - items: + - enum: + - ocs,ocp96011 + - const: fcs,fsa4480 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vcc-supply: + description: power supply (2.7V-5.5V) + + mode-switch: true + orientation-switch: true + + port: + $ref: "#/$defs/controller-port" + + ports: + $ref: /schemas/graph.yaml#/properties/ports + properties: + port@0: + $ref: "#/$defs/controller-port" + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + description: + A port node to link the FSA4480 to an audio codec in order to + notify it whenever an analog audio adapter is plugged/unplugged. + unevaluatedProperties: false + required: - compatible - reg - - port allOf: - $ref: usb-switch.yaml# - $ref: usb-switch-ports.yaml# +oneOf: + - required: + - port + - required: + - ports + additionalProperties: false examples: @@ -98,9 +119,24 @@ examples: mode-switch; orientation-switch; - port { - fsa4480_ept: endpoint { - remote-endpoint = <&typec_controller>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + fsa4480_sbu_mux: endpoint { + remote-endpoint = <&typec_controller>; + }; + }; + + port@1 { + reg = <1>; + + fsa4480_audio: endpoint { + remote-endpoint = <&audio_codec>; + }; }; }; }; -- 2.55.0

