diff mbox series

[3/5] arm64: dts: qcom: qrb5165-rb5: add onboard USB-C redriver

Message ID 20230709041926.4052245-4-dmitry.baryshkov@linaro.org
State New
Headers show
Series arm64: dts: qcom: qrb5165-rb5: enable DP support | expand

Commit Message

Dmitry Baryshkov July 9, 2023, 4:19 a.m. UTC
Add the nb7vpq904m, onboard USB-C redriver / retimer.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 52 +++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 2 deletions(-)

Comments

Konrad Dybcio July 11, 2023, 9:36 p.m. UTC | #1
On 9.07.2023 06:19, Dmitry Baryshkov wrote:
> Add the nb7vpq904m, onboard USB-C redriver / retimer.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
[...]

> +			port@1 {
> +				reg = <1>;
> +
> +				redriver_phy_con_ss: endpoint {
> +					remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
> +					data-lanes = <0 1 2 3>;
That's USB+DP lines combined, or how does it work? I'm confused :/

Konrad
> +				};
> +			};
> +
> +			port@2 {
> +				reg = <2>;
> +
> +				redriver_usb_con_sbu: endpoint {
> +					remote-endpoint = <&pm8150b_typec_sbu_out>;
> +				};
> +			};
> +		};
> +	};
>  };
>  
>  &mdss {
> @@ -1294,7 +1334,7 @@ &usb_1_qmpphy {
>  };
>  
>  &usb_1_qmpphy_typec_mux_in {
> -	remote-endpoint = <&pm8150b_typec_mux_out>;
> +	remote-endpoint = <&redriver_phy_con_ss>;
>  };
>  
>  &usb_2 {
> @@ -1382,7 +1422,15 @@ pm8150b_role_switch_out: endpoint {
>  			port@1 {
>  				reg = <1>;
>  				pm8150b_typec_mux_out: endpoint {
> -					remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
> +					remote-endpoint = <&redriver_usb_con_ss>;
> +				};
> +			};
> +
> +			port@2 {
> +				reg = <2>;
> +
> +				pm8150b_typec_sbu_out: endpoint {
> +					remote-endpoint = <&redriver_usb_con_sbu>;
>  				};
>  			};
>  		};
Dmitry Baryshkov July 11, 2023, 10:39 p.m. UTC | #2
On 12/07/2023 00:36, Konrad Dybcio wrote:
> On 9.07.2023 06:19, Dmitry Baryshkov wrote:
>> Add the nb7vpq904m, onboard USB-C redriver / retimer.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
> [...]
> 
>> +			port@1 {
>> +				reg = <1>;
>> +
>> +				redriver_phy_con_ss: endpoint {
>> +					remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
>> +					data-lanes = <0 1 2 3>;
> That's USB+DP lines combined, or how does it work? I'm confused :/

4 generic purpose SS lanes, which can be purposed for USB or for DP.

> 
> Konrad
>> +				};
>> +			};
>> +
>> +			port@2 {
>> +				reg = <2>;
>> +
>> +				redriver_usb_con_sbu: endpoint {
>> +					remote-endpoint = <&pm8150b_typec_sbu_out>;
>> +				};
>> +			};
>> +		};
>> +	};
>>   };
>>   
>>   &mdss {
>> @@ -1294,7 +1334,7 @@ &usb_1_qmpphy {
>>   };
>>   
>>   &usb_1_qmpphy_typec_mux_in {
>> -	remote-endpoint = <&pm8150b_typec_mux_out>;
>> +	remote-endpoint = <&redriver_phy_con_ss>;
>>   };
>>   
>>   &usb_2 {
>> @@ -1382,7 +1422,15 @@ pm8150b_role_switch_out: endpoint {
>>   			port@1 {
>>   				reg = <1>;
>>   				pm8150b_typec_mux_out: endpoint {
>> -					remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
>> +					remote-endpoint = <&redriver_usb_con_ss>;
>> +				};
>> +			};
>> +
>> +			port@2 {
>> +				reg = <2>;
>> +
>> +				pm8150b_typec_sbu_out: endpoint {
>> +					remote-endpoint = <&redriver_usb_con_sbu>;
>>   				};
>>   			};
>>   		};
Konrad Dybcio July 11, 2023, 10:59 p.m. UTC | #3
On 12.07.2023 00:39, Dmitry Baryshkov wrote:
> On 12/07/2023 00:36, Konrad Dybcio wrote:
>> On 9.07.2023 06:19, Dmitry Baryshkov wrote:
>>> Add the nb7vpq904m, onboard USB-C redriver / retimer.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>> [...]
>>
>>> +            port@1 {
>>> +                reg = <1>;
>>> +
>>> +                redriver_phy_con_ss: endpoint {
>>> +                    remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
>>> +                    data-lanes = <0 1 2 3>;
>> That's USB+DP lines combined, or how does it work? I'm confused :/
> 
> 4 generic purpose SS lanes, which can be purposed for USB or for DP.
Okay, so my gut did better than my brain.

Other than that, I'm reading the bindings and it looks like ports 0 and
1 may possibly be swapped?

Konrad
> 
>>
>> Konrad
>>> +                };
>>> +            };
>>> +
>>> +            port@2 {
>>> +                reg = <2>;
>>> +
>>> +                redriver_usb_con_sbu: endpoint {
>>> +                    remote-endpoint = <&pm8150b_typec_sbu_out>;
>>> +                };
>>> +            };
>>> +        };
>>> +    };
>>>   };
>>>     &mdss {
>>> @@ -1294,7 +1334,7 @@ &usb_1_qmpphy {
>>>   };
>>>     &usb_1_qmpphy_typec_mux_in {
>>> -    remote-endpoint = <&pm8150b_typec_mux_out>;
>>> +    remote-endpoint = <&redriver_phy_con_ss>;
>>>   };
>>>     &usb_2 {
>>> @@ -1382,7 +1422,15 @@ pm8150b_role_switch_out: endpoint {
>>>               port@1 {
>>>                   reg = <1>;
>>>                   pm8150b_typec_mux_out: endpoint {
>>> -                    remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
>>> +                    remote-endpoint = <&redriver_usb_con_ss>;
>>> +                };
>>> +            };
>>> +
>>> +            port@2 {
>>> +                reg = <2>;
>>> +
>>> +                pm8150b_typec_sbu_out: endpoint {
>>> +                    remote-endpoint = <&redriver_usb_con_sbu>;
>>>                   };
>>>               };
>>>           };
>
Dmitry Baryshkov July 11, 2023, 11:01 p.m. UTC | #4
On Wed, 12 Jul 2023 at 01:59, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 12.07.2023 00:39, Dmitry Baryshkov wrote:
> > On 12/07/2023 00:36, Konrad Dybcio wrote:
> >> On 9.07.2023 06:19, Dmitry Baryshkov wrote:
> >>> Add the nb7vpq904m, onboard USB-C redriver / retimer.
> >>>
> >>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >>> ---
> >> [...]
> >>
> >>> +            port@1 {
> >>> +                reg = <1>;
> >>> +
> >>> +                redriver_phy_con_ss: endpoint {
> >>> +                    remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
> >>> +                    data-lanes = <0 1 2 3>;
> >> That's USB+DP lines combined, or how does it work? I'm confused :/
> >
> > 4 generic purpose SS lanes, which can be purposed for USB or for DP.
> Okay, so my gut did better than my brain.
>
> Other than that, I'm reading the bindings and it looks like ports 0 and
> 1 may possibly be swapped?

Yes. But if I get schematics right, the lanes are not swapped in this case.

>
> Konrad
> >
> >>
> >> Konrad
> >>> +                };
> >>> +            };
> >>> +
> >>> +            port@2 {
> >>> +                reg = <2>;
> >>> +
> >>> +                redriver_usb_con_sbu: endpoint {
> >>> +                    remote-endpoint = <&pm8150b_typec_sbu_out>;
> >>> +                };
> >>> +            };
> >>> +        };
> >>> +    };
> >>>   };
> >>>     &mdss {
> >>> @@ -1294,7 +1334,7 @@ &usb_1_qmpphy {
> >>>   };
> >>>     &usb_1_qmpphy_typec_mux_in {
> >>> -    remote-endpoint = <&pm8150b_typec_mux_out>;
> >>> +    remote-endpoint = <&redriver_phy_con_ss>;
> >>>   };
> >>>     &usb_2 {
> >>> @@ -1382,7 +1422,15 @@ pm8150b_role_switch_out: endpoint {
> >>>               port@1 {
> >>>                   reg = <1>;
> >>>                   pm8150b_typec_mux_out: endpoint {
> >>> -                    remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
> >>> +                    remote-endpoint = <&redriver_usb_con_ss>;
> >>> +                };
> >>> +            };
> >>> +
> >>> +            port@2 {
> >>> +                reg = <2>;
> >>> +
> >>> +                pm8150b_typec_sbu_out: endpoint {
> >>> +                    remote-endpoint = <&redriver_usb_con_sbu>;
> >>>                   };
> >>>               };
> >>>           };
> >
Konrad Dybcio July 11, 2023, 11:04 p.m. UTC | #5
On 12.07.2023 01:01, Dmitry Baryshkov wrote:
> On Wed, 12 Jul 2023 at 01:59, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 12.07.2023 00:39, Dmitry Baryshkov wrote:
>>> On 12/07/2023 00:36, Konrad Dybcio wrote:
>>>> On 9.07.2023 06:19, Dmitry Baryshkov wrote:
>>>>> Add the nb7vpq904m, onboard USB-C redriver / retimer.
>>>>>
>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>> ---
>>>> [...]
>>>>
>>>>> +            port@1 {
>>>>> +                reg = <1>;
>>>>> +
>>>>> +                redriver_phy_con_ss: endpoint {
>>>>> +                    remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
>>>>> +                    data-lanes = <0 1 2 3>;
>>>> That's USB+DP lines combined, or how does it work? I'm confused :/
>>>
>>> 4 generic purpose SS lanes, which can be purposed for USB or for DP.
>> Okay, so my gut did better than my brain.
>>
>> Other than that, I'm reading the bindings and it looks like ports 0 and
>> 1 may possibly be swapped?
> 
> Yes. But if I get schematics right, the lanes are not swapped in this case.
I'm not talking about the 0123-3210 swap, but rather in/out being swapped.
Unless I'm reading the bindings wrong (or they may be written in a
confusing way).

Konrad
> 
>>
>> Konrad
>>>
>>>>
>>>> Konrad
>>>>> +                };
>>>>> +            };
>>>>> +
>>>>> +            port@2 {
>>>>> +                reg = <2>;
>>>>> +
>>>>> +                redriver_usb_con_sbu: endpoint {
>>>>> +                    remote-endpoint = <&pm8150b_typec_sbu_out>;
>>>>> +                };
>>>>> +            };
>>>>> +        };
>>>>> +    };
>>>>>   };
>>>>>     &mdss {
>>>>> @@ -1294,7 +1334,7 @@ &usb_1_qmpphy {
>>>>>   };
>>>>>     &usb_1_qmpphy_typec_mux_in {
>>>>> -    remote-endpoint = <&pm8150b_typec_mux_out>;
>>>>> +    remote-endpoint = <&redriver_phy_con_ss>;
>>>>>   };
>>>>>     &usb_2 {
>>>>> @@ -1382,7 +1422,15 @@ pm8150b_role_switch_out: endpoint {
>>>>>               port@1 {
>>>>>                   reg = <1>;
>>>>>                   pm8150b_typec_mux_out: endpoint {
>>>>> -                    remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
>>>>> +                    remote-endpoint = <&redriver_usb_con_ss>;
>>>>> +                };
>>>>> +            };
>>>>> +
>>>>> +            port@2 {
>>>>> +                reg = <2>;
>>>>> +
>>>>> +                pm8150b_typec_sbu_out: endpoint {
>>>>> +                    remote-endpoint = <&redriver_usb_con_sbu>;
>>>>>                   };
>>>>>               };
>>>>>           };
>>>
> 
> 
>
Dmitry Baryshkov July 11, 2023, 11:28 p.m. UTC | #6
On 12/07/2023 02:04, Konrad Dybcio wrote:
> On 12.07.2023 01:01, Dmitry Baryshkov wrote:
>> On Wed, 12 Jul 2023 at 01:59, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>>
>>> On 12.07.2023 00:39, Dmitry Baryshkov wrote:
>>>> On 12/07/2023 00:36, Konrad Dybcio wrote:
>>>>> On 9.07.2023 06:19, Dmitry Baryshkov wrote:
>>>>>> Add the nb7vpq904m, onboard USB-C redriver / retimer.
>>>>>>
>>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>>> ---
>>>>> [...]
>>>>>
>>>>>> +            port@1 {
>>>>>> +                reg = <1>;
>>>>>> +
>>>>>> +                redriver_phy_con_ss: endpoint {
>>>>>> +                    remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
>>>>>> +                    data-lanes = <0 1 2 3>;
>>>>> That's USB+DP lines combined, or how does it work? I'm confused :/
>>>>
>>>> 4 generic purpose SS lanes, which can be purposed for USB or for DP.
>>> Okay, so my gut did better than my brain.
>>>
>>> Other than that, I'm reading the bindings and it looks like ports 0 and
>>> 1 may possibly be swapped?
>>
>> Yes. But if I get schematics right, the lanes are not swapped in this case.
> I'm not talking about the 0123-3210 swap, but rather in/out being swapped.
> Unless I'm reading the bindings wrong (or they may be written in a
> confusing way).

Hmm, no. port@0 goes to the connector, port@1 to SS PHY, port@2 to SBU 
source.

> 
> Konrad
>>
>>>
>>> Konrad
>>>>
>>>>>
>>>>> Konrad
>>>>>> +                };
>>>>>> +            };
>>>>>> +
>>>>>> +            port@2 {
>>>>>> +                reg = <2>;
>>>>>> +
>>>>>> +                redriver_usb_con_sbu: endpoint {
>>>>>> +                    remote-endpoint = <&pm8150b_typec_sbu_out>;
>>>>>> +                };
>>>>>> +            };
>>>>>> +        };
>>>>>> +    };
>>>>>>    };
>>>>>>      &mdss {
>>>>>> @@ -1294,7 +1334,7 @@ &usb_1_qmpphy {
>>>>>>    };
>>>>>>      &usb_1_qmpphy_typec_mux_in {
>>>>>> -    remote-endpoint = <&pm8150b_typec_mux_out>;
>>>>>> +    remote-endpoint = <&redriver_phy_con_ss>;
>>>>>>    };
>>>>>>      &usb_2 {
>>>>>> @@ -1382,7 +1422,15 @@ pm8150b_role_switch_out: endpoint {
>>>>>>                port@1 {
>>>>>>                    reg = <1>;
>>>>>>                    pm8150b_typec_mux_out: endpoint {
>>>>>> -                    remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
>>>>>> +                    remote-endpoint = <&redriver_usb_con_ss>;
>>>>>> +                };
>>>>>> +            };
>>>>>> +
>>>>>> +            port@2 {
>>>>>> +                reg = <2>;
>>>>>> +
>>>>>> +                pm8150b_typec_sbu_out: endpoint {
>>>>>> +                    remote-endpoint = <&redriver_usb_con_sbu>;
>>>>>>                    };
>>>>>>                };
>>>>>>            };
>>>>
>>
>>
>>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
index b6c587ffdf8f..a03f334a3d01 100644
--- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
@@ -610,6 +610,46 @@  lt9611_out: endpoint {
 /* LS-I2C1 */
 &i2c15 {
 	status = "okay";
+
+	typec-mux@1c {
+		compatible = "onnn,nb7vpq904m";
+		reg = <0x1c>;
+
+		vcc-supply = <&vreg_s4a_1p8>;
+
+		retimer-switch;
+		orientation-switch;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				redriver_usb_con_ss: endpoint {
+					remote-endpoint = <&pm8150b_typec_mux_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				redriver_phy_con_ss: endpoint {
+					remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
+					data-lanes = <0 1 2 3>;
+				};
+			};
+
+			port@2 {
+				reg = <2>;
+
+				redriver_usb_con_sbu: endpoint {
+					remote-endpoint = <&pm8150b_typec_sbu_out>;
+				};
+			};
+		};
+	};
 };
 
 &mdss {
@@ -1294,7 +1334,7 @@  &usb_1_qmpphy {
 };
 
 &usb_1_qmpphy_typec_mux_in {
-	remote-endpoint = <&pm8150b_typec_mux_out>;
+	remote-endpoint = <&redriver_phy_con_ss>;
 };
 
 &usb_2 {
@@ -1382,7 +1422,15 @@  pm8150b_role_switch_out: endpoint {
 			port@1 {
 				reg = <1>;
 				pm8150b_typec_mux_out: endpoint {
-					remote-endpoint = <&usb_1_qmpphy_typec_mux_in>;
+					remote-endpoint = <&redriver_usb_con_ss>;
+				};
+			};
+
+			port@2 {
+				reg = <2>;
+
+				pm8150b_typec_sbu_out: endpoint {
+					remote-endpoint = <&redriver_usb_con_sbu>;
 				};
 			};
 		};