Message ID | 20230503-topic-sm8450-graphics-dp-next-v1-0-d1ee9397f2a6@linaro.org |
---|---|
Headers | show |
Series | arm64: qcom: sm84[34]50: enable DP altmode on USB-C Connector | expand |
On 03/05/2023 15:10, Neil Armstrong wrote: > Enable the FSA4480 driver as module for HDK8350 and HDK8450 "for Qualcomm HDK8350 and HDK8450" > platforms to permit USB-C Altmode support. > > Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 04/05/2023 08:53, Konrad Dybcio wrote: > > > On 3.05.2023 15:10, Neil Armstrong wrote: >> With support for the QMP combo phy to react to USB Type-C switch events, >> introduce it as the next hop for the SuperSpeed lanes of the Type-C >> connector, and connect the output of the DisplayPort controller >> to the QMP combo phy. >> >> This allows the TCPM to perform orientation switching of both USB and >> DisplayPort signals. >> >> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> >> --- >> arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 74 ++++++++++++++++++++++++++++++++- >> 1 file changed, 72 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >> index 2ee1b121686a..fa835bdb7408 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts >> @@ -58,7 +58,15 @@ port@1 { >> reg = <1>; >> >> pmic_glink_ss_in: endpoint { >> - remote-endpoint = <&usb_1_dwc3_ss>; >> + remote-endpoint = <&usb_1_qmpphy_out>; >> + }; >> + }; >> + >> + port@2 { >> + reg = <2>; >> + >> + pmic_glink_sbu: endpoint { >> + remote-endpoint = <&fsa4480_sbu_mux>; >> }; >> }; >> }; >> @@ -326,6 +334,36 @@ zap-shader { >> }; >> }; >> >> +&i2c13 { >> + status = "okay"; >> + clock-frequency = <100000>; > Status last Ack > >> + >> + fsa4480@42 { >> + compatible = "fcs,fsa4480"; >> + reg = <0x42>; >> + >> + interrupts-extended = <&tlmm 2 IRQ_TYPE_LEVEL_LOW>; >> + >> + vcc-supply = <&vreg_bob>; >> + mode-switch; >> + orientation-switch; >> + svid = /bits/ 16 <0xff01>; >> + >> + ports { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + port@0 { >> + reg = <0>; >> + >> + fsa4480_sbu_mux: endpoint { >> + remote-endpoint = <&pmic_glink_sbu>; >> + }; >> + }; >> + }; >> + }; >> +}; >> + >> &i2c15 { >> clock-frequency = <400000>; >> status = "okay"; >> @@ -370,6 +408,20 @@ &mdss { >> status = "okay"; >> }; >> >> +&mdss_dp { >> + status = "okay"; >> + >> + ports { >> + port@1 { >> + reg = <1>; > missing newline > >> + mdss_dp0_out: endpoint { >> + data-lanes = <0 1>; >> + remote-endpoint = <&usb_1_qmpphy_dp_in>; >> + }; >> + }; >> + }; >> +}; >> + >> &mdss_mdp { >> status = "okay"; >> }; >> @@ -416,6 +468,10 @@ &qupv3_id_0 { >> status = "okay"; >> }; >> >> +&qupv3_id_1 { >> + status = "okay"; >> +}; >> + >> &qupv3_id_2 { >> status = "okay"; >> }; >> @@ -716,7 +772,7 @@ &usb_1_dwc3_hs { >> }; >> >> &usb_1_dwc3_ss { >> - remote-endpoint = <&pmic_glink_ss_in>; >> + remote-endpoint = <&usb_1_qmpphy_usb_ss_in>; >> }; >> >> &usb_1_hsphy { >> @@ -732,6 +788,20 @@ &usb_1_qmpphy { >> >> vdda-phy-supply = <&vreg_l6b_1p2>; >> vdda-pll-supply = <&vreg_l1b_0p88>; >> + >> + orientation-switch; > this is a common property which will/should be ignored if no > usbc is present So, do you mean it should be in the common dtsi ? I don't see why since it's only true if there's an USB-C connector > >> +}; >> + >> +&usb_1_qmpphy_out { >> + remote-endpoint = <&pmic_glink_ss_in>; >> +}; >> + >> +&usb_1_qmpphy_usb_ss_in { >> + remote-endpoint = <&usb_1_dwc3_ss>; >> +}; >> + >> +&usb_1_qmpphy_dp_in { >> + remote-endpoint = <&mdss_dp0_out>; > 'd' < 'o' < 'u' Exact... > > with that fixed > > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > > Konrad >> }; >> >> &usb_2 { >>
This is the final step to achieve USB-C Altmode on the HDK8350 and HDK8450 now DP controller support, USB3+DP Combo PHY and pmic glink support have been merged for those platforms. This patchset depends on the QMP Combo USB3+DP PHY orientation support at [1]. The following has been successfully tested: - USB-C PD Power Role, reported status are coherent - USB-C dual-role data - USB2.0 only (no-PD) as DFP or UFP - USB2.0 + USB SuperSpeed as DFP or UFP & in both orientations - USB2.0 + USB SuperSpeed + DisplayPort Altmode in both orientations - DisplayPort-only Altmode in both orientations Data role and SuperSpeed lanes were correctly switched on the PHY side after USB-C removal/insertion. [1] https://lore.kernel.org/all/20230425034010.3789376-1-quic_bjorande@quicinc.com/ Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> --- Neil Armstrong (6): arm64: dts: qcom: sm8350: add ports subnodes in usb1 qmpphy node arm64: dts: qcom: sm8450: add ports subnodes in usb1 qmpphy node arm64: dts: qcom: sm8350-hdk: Add QMP & DP to SuperSpeed graph arm64: dts: qcom: sm8450-hdk: Add QMP & DP to SuperSpeed graph arm64: defconfig: enable FSA4480 driver as module qcom: pmic_glink: enable altmode for SM8450 arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 74 ++++++++++++++++++++++++++++++++- arch/arm64/boot/dts/qcom/sm8350.dtsi | 26 ++++++++++++ arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 71 ++++++++++++++++++++++++++++++- arch/arm64/boot/dts/qcom/sm8450.dtsi | 26 ++++++++++++ arch/arm64/configs/defconfig | 1 + drivers/soc/qcom/pmic_glink.c | 8 +++- 6 files changed, 200 insertions(+), 6 deletions(-) --- base-commit: b3afd23af1d1a8b690d512be825a7a8aef991eff change-id: 20230503-topic-sm8450-graphics-dp-next-1dab962ae67d Best regards,