diff mbox series

[v4,04/18] dt-bindings: phy: qcom,sc7180-qmp-usb3-dp-phy: Add port as an optional

Message ID 20230318121828.739424-5-bryan.odonoghue@linaro.org
State New
Headers show
Series Add Qualcomm PMIC TPCM support | expand

Commit Message

Bryan O'Donoghue March 18, 2023, 12:18 p.m. UTC
port is required to instantiate a remote-endpoint which can receive
orientation-switch messages from a Type-C mux.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 .../bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml           | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Krzysztof Kozlowski March 19, 2023, 11:45 a.m. UTC | #1
On 18/03/2023 13:18, Bryan O'Donoghue wrote:
> port is required to instantiate a remote-endpoint which can receive
> orientation-switch messages from a Type-C mux.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  .../bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml           | 6 ++++++
>  1 file changed, 6 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 52886cdb0e506..1c887e34b1223 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,12 @@ properties:
>      description: Flag the port as possible handler of orientation switching
>      type: boolean
>  
> +  port:
> +    $ref: /schemas/graph.yaml#/properties/port
> +    description:
> +      A port node to link the PHY to a TypeC controller for the purpose of
> +      handling altmode muxing and orientation switching.

Please extend the example as well.

Don't you have there two ports? USB and DP?

Best regards,
Krzysztof
Rob Herring March 21, 2023, 8:49 p.m. UTC | #2
On Sun, Mar 19, 2023 at 12:45:13PM +0100, Krzysztof Kozlowski wrote:
> On 18/03/2023 13:18, Bryan O'Donoghue wrote:
> > port is required to instantiate a remote-endpoint which can receive
> > orientation-switch messages from a Type-C mux.
> > 
> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > ---
> >  .../bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml           | 6 ++++++
> >  1 file changed, 6 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 52886cdb0e506..1c887e34b1223 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,12 @@ properties:
> >      description: Flag the port as possible handler of orientation switching
> >      type: boolean
> >  
> > +  port:
> > +    $ref: /schemas/graph.yaml#/properties/port
> > +    description:
> > +      A port node to link the PHY to a TypeC controller for the purpose of
> > +      handling altmode muxing and orientation switching.
> 
> Please extend the example as well.
> 
> Don't you have there two ports? USB and DP?

Or 3: USB, DP, and connector.

Please make sure this all aligns with what Bjorn and I discussed 
recently. It was for glink specifically.

Rob
Bryan O'Donoghue March 22, 2023, 2:01 p.m. UTC | #3
On 21/03/2023 20:49, Rob Herring wrote:
> On Sun, Mar 19, 2023 at 12:45:13PM +0100, Krzysztof Kozlowski wrote:
>> On 18/03/2023 13:18, Bryan O'Donoghue wrote:
>>> port is required to instantiate a remote-endpoint which can receive
>>> orientation-switch messages from a Type-C mux.
>>>
>>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>> ---
>>>   .../bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml           | 6 ++++++
>>>   1 file changed, 6 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 52886cdb0e506..1c887e34b1223 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,12 @@ properties:
>>>       description: Flag the port as possible handler of orientation switching
>>>       type: boolean
>>>   
>>> +  port:
>>> +    $ref: /schemas/graph.yaml#/properties/port
>>> +    description:
>>> +      A port node to link the PHY to a TypeC controller for the purpose of
>>> +      handling altmode muxing and orientation switching.
>>
>> Please extend the example as well.
>>
>> Don't you have there two ports? USB and DP?
> 
> Or 3: USB, DP, and connector.
> 
> Please make sure this all aligns with what Bjorn and I discussed
> recently. It was for glink specifically.
> 
> Rob

Hmm.

Thanks for mentioning this.

I had erroneously built the orientation endpoint into the connector 
during development and was just carrying that in my patches.

This

&pm8150b_typec {
         status = "okay";
         port {
                 usb3_role: endpoint {
                         remote-endpoint = <&dwc3_drd_switch>;
                 };
         };

         connector {
                 compatible = "usb-c-connector";

                 power-role = "source";
                 data-role = "dual";
                 self-powered;

                 source-pdos = <PDO_FIXED(5000, 3000,
                                          PDO_FIXED_DUAL_ROLE |
                                          PDO_FIXED_USB_COMM |
                                          PDO_FIXED_DATA_SWAP)>;

                 ports {
                         #address-cells = <1>;
                         #size-cells = <0>;

                         port@0 {
                                 reg = <0>;
                                 pmic_tcpm_ss_mux: endpoint {
                                         remote-endpoint = <&qmp_ss_mux>;
                                 };
                         };
                 };
         };
};


Should be this

&pm8150b_typec {
         status = "okay";
         ports {
                 #address-cells = <1>;
                 #size-cells = <0>;

                 port@0 {
                         reg = <0>;
                         pmic_tcpm_ss_mux: endpoint {
                                 remote-endpoint = <&qmp_ss_mux>;
                         };
                 };

                 port@1 {
                         usb3_role: endpoint {
                                 remote-endpoint = <&dwc3_drd_switch>;
                         };
                 };
         };

         connector {
                 compatible = "usb-c-connector";

                 power-role = "source";
                 data-role = "dual";
                 self-powered;

                 source-pdos = <PDO_FIXED(5000, 3000,
                                          PDO_FIXED_DUAL_ROLE |
                                          PDO_FIXED_USB_COMM |
                                          PDO_FIXED_DATA_SWAP)>;
         };
};

---
bod
Bryan O'Donoghue March 23, 2023, 1:39 p.m. UTC | #4
On 21/03/2023 20:49, Rob Herring wrote:
> On Sun, Mar 19, 2023 at 12:45:13PM +0100, Krzysztof Kozlowski wrote:
>> On 18/03/2023 13:18, Bryan O'Donoghue wrote:
>>> port is required to instantiate a remote-endpoint which can receive
>>> orientation-switch messages from a Type-C mux.
>>>
>>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>> ---
>>>   .../bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml           | 6 ++++++
>>>   1 file changed, 6 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 52886cdb0e506..1c887e34b1223 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,12 @@ properties:
>>>       description: Flag the port as possible handler of orientation switching
>>>       type: boolean
>>>   
>>> +  port:
>>> +    $ref: /schemas/graph.yaml#/properties/port
>>> +    description:
>>> +      A port node to link the PHY to a TypeC controller for the purpose of
>>> +      handling altmode muxing and orientation switching.
>>
>> Please extend the example as well.
>>
>> Don't you have there two ports? USB and DP?
> 
> Or 3: USB, DP, and connector.
> 
> Please make sure this all aligns with what Bjorn and I discussed
> recently. It was for glink specifically.
> 
> Rob

This is a PHY though, the DP, USB endpoints will go into the connector 
or into the typec node itself.

---
bod
diff mbox series

Patch

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 52886cdb0e506..1c887e34b1223 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,12 @@  properties:
     description: Flag the port as possible handler of orientation switching
     type: boolean
 
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description:
+      A port node to link the PHY to a TypeC controller for the purpose of
+      handling altmode muxing and orientation switching.
+
   resets:
     items:
       - description: reset of phy block.