Message ID | 20230501121111.1058190-5-bryan.odonoghue@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | Add Qualcomm PMIC TPCM support | expand |
On 01/05/2023 14:11, Bryan O'Donoghue wrote: > Add a ports declaration which is optional containing two port@ > declarations. > > port@0 to receive an orientation-switch message from the Type-C port or > redriver > > port@1 to subsequently transmit the orientation-switch on once the PHY has > finished doing its orientation turn-around. > > If ports is declared the input port port@0 is mandatory but the output > port@1 is optional. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > .../phy/qcom,sc7180-qmp-usb3-dp-phy.yaml | 38 +++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml > index d307343388888..c370b9cd58c2e 100644 > --- a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml > +++ b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml > @@ -65,6 +65,25 @@ properties: > description: Flag the port as possible handler of orientation switching > type: boolean > > + ports: > + $ref: /schemas/graph.yaml#/properties/ports on this level: additionalProperties: false (because otherwise it will allow port@2 etc) Best regards, Krzysztof
On 02/05/2023 12:45, Krzysztof Kozlowski wrote: > On 01/05/2023 14:11, Bryan O'Donoghue wrote: >> Add a ports declaration which is optional containing two port@ >> declarations. >> >> port@0 to receive an orientation-switch message from the Type-C port or >> redriver >> >> port@1 to subsequently transmit the orientation-switch on once the PHY has >> finished doing its orientation turn-around. >> >> If ports is declared the input port port@0 is mandatory but the output >> port@1 is optional. >> >> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> >> --- >> .../phy/qcom,sc7180-qmp-usb3-dp-phy.yaml | 38 +++++++++++++++++++ >> 1 file changed, 38 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml >> index d307343388888..c370b9cd58c2e 100644 >> --- a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml >> +++ b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml >> @@ -65,6 +65,25 @@ properties: >> description: Flag the port as possible handler of orientation switching >> type: boolean >> >> + ports: >> + $ref: /schemas/graph.yaml#/properties/ports > > on this level: additionalProperties: false > (because otherwise it will allow port@2 etc) Although none (or almost none) of other bindings do it, so I guess it is fine. Fine till I figure out how it should be :) Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml index d307343388888..c370b9cd58c2e 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml @@ -65,6 +65,25 @@ properties: description: Flag the port as possible handler of orientation switching type: boolean + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: OF graph bindings that model incoming orientation-switch and + outgoing orientation-switch messages. An example of an incoming + orientation-switch message might come form a Type-C connector or a USB + redriver. An example of an output would be a DisplayPort controller. + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Type-C mux orientation-switch input. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: PHY orientation-switch output. + + required: + - port@0 + resets: items: - description: reset of phy block. @@ -279,4 +298,23 @@ examples: #clock-cells = <1>; #phy-cells = <0>; }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + qmpphy_typec_mux_in: endpoint { + remote-endpoint = <&pmic_typec_mux_out>; + }; + }; + + port@1 { + reg = <1>; + qmpphy_typec_mux_out: endpoint { + remote-endpoint = <&dp_typec_mux_in>; + }; + }; + }; };
Add a ports declaration which is optional containing two port@ declarations. port@0 to receive an orientation-switch message from the Type-C port or redriver port@1 to subsequently transmit the orientation-switch on once the PHY has finished doing its orientation turn-around. If ports is declared the input port port@0 is mandatory but the output port@1 is optional. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- .../phy/qcom,sc7180-qmp-usb3-dp-phy.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+)