* [PATCH v2 0/2] Flattening USB controller on SM8450 QRD
@ 2025-06-10 9:18 Krishna Kurapati
2025-06-10 9:18 ` [PATCH v2 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Krishna Kurapati @ 2025-06-10 9:18 UTC (permalink / raw)
To: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson,
Konrad Dybcio
Cc: linux-kernel, devicetree, linux-arm-msm, Krishna Kurapati
Flatten USB Controller node on SM8450 QRD to move away from legacy USB
Qualcomm glue driver and make use of new one. The series has been tested
with driver changes [1] to enable runtime suspend/resume during cable
disconnect/connect scenarios.
I was testing on SM8450 QRD and hence flattened usb node on that platform
only. If the community suggests to flatten all platforms of sm8450, I can
do a compile test for the ones I can't get hands on and send a follow up
series.
[1]: https://lore.kernel.org/all/20250610091357.2983085-1-krishna.kurapati@oss.qualcomm.com/
Krishna Kurapati (2):
arm64: dts: qcom: sm8450-qrd: add pmic glink node
arm64: dts: qcom: sm8450-qrd: Flatten usb controller node
arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 110 +++++++++++++++++++++++-
1 file changed, 108 insertions(+), 2 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node 2025-06-10 9:18 [PATCH v2 0/2] Flattening USB controller on SM8450 QRD Krishna Kurapati @ 2025-06-10 9:18 ` Krishna Kurapati 2025-06-10 11:07 ` Dmitry Baryshkov 2025-06-10 9:18 ` [PATCH v2 2/2] arm64: dts: qcom: sm8450-qrd: Flatten usb controller node Krishna Kurapati 2025-06-10 9:34 ` [PATCH v2 0/2] Flattening USB controller on SM8450 QRD neil.armstrong 2 siblings, 1 reply; 7+ messages in thread From: Krishna Kurapati @ 2025-06-10 9:18 UTC (permalink / raw) To: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio Cc: linux-kernel, devicetree, linux-arm-msm, Krishna Kurapati Add the pmic glink node linked with the DWC3 USB controller switched to OTG mode and tagged with usb-role-switch. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> --- arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 54 ++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts index 8c39fbcaad80..0580408485eb 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts @@ -37,6 +37,49 @@ vph_pwr: vph-pwr-regulator { regulator-always-on; regulator-boot-on; }; + + pmic-glink { + compatible = "qcom,sm8450-pmic-glink", "qcom,pmic-glink"; + #address-cells = <1>; + #size-cells = <0>; + orientation-gpios = <&tlmm 91 GPIO_ACTIVE_HIGH>; + + connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + pmic_glink_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_ss_in: endpoint { + remote-endpoint = <&usb_1_qmpphy_out>; + }; + }; + + port@2 { + reg = <2>; + + pmic_glink_sbu: endpoint { + }; + }; + + }; + }; + }; }; &apps_rsc { @@ -462,7 +505,12 @@ &usb_1 { }; &usb_1_dwc3 { - dr_mode = "peripheral"; + dr_mode = "otg"; + usb-role-switch; +}; + +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; }; &usb_1_hsphy { @@ -487,3 +535,7 @@ &usb_1_qmpphy { vdda-phy-supply = <&vreg_l6b_1p2>; vdda-pll-supply = <&vreg_l1b_0p91>; }; + +&usb_1_qmpphy_out { + remote-endpoint = <&pmic_glink_ss_in>; +}; -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node 2025-06-10 9:18 ` [PATCH v2 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati @ 2025-06-10 11:07 ` Dmitry Baryshkov 0 siblings, 0 replies; 7+ messages in thread From: Dmitry Baryshkov @ 2025-06-10 11:07 UTC (permalink / raw) To: Krishna Kurapati Cc: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio, linux-kernel, devicetree, linux-arm-msm On Tue, Jun 10, 2025 at 02:48:04PM +0530, Krishna Kurapati wrote: > Add the pmic glink node linked with the DWC3 USB controller > switched to OTG mode and tagged with usb-role-switch. > > Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> > --- > arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 54 ++++++++++++++++++++++++- > 1 file changed, 53 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts > index 8c39fbcaad80..0580408485eb 100644 > --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts > +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts > @@ -37,6 +37,49 @@ vph_pwr: vph-pwr-regulator { > regulator-always-on; > regulator-boot-on; > }; > + > + pmic-glink { > + compatible = "qcom,sm8450-pmic-glink", "qcom,pmic-glink"; > + #address-cells = <1>; > + #size-cells = <0>; > + orientation-gpios = <&tlmm 91 GPIO_ACTIVE_HIGH>; > + > + connector@0 { > + compatible = "usb-c-connector"; > + reg = <0>; > + power-role = "dual"; > + data-role = "dual"; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + > + pmic_glink_hs_in: endpoint { > + remote-endpoint = <&usb_1_dwc3_hs>; > + }; > + }; > + > + port@1 { > + reg = <1>; > + > + pmic_glink_ss_in: endpoint { > + remote-endpoint = <&usb_1_qmpphy_out>; > + }; > + }; > + > + port@2 { > + reg = <2>; > + > + pmic_glink_sbu: endpoint { > + }; > + }; > + > + }; > + }; > + }; > }; > > &apps_rsc { > @@ -462,7 +505,12 @@ &usb_1 { > }; > > &usb_1_dwc3 { > - dr_mode = "peripheral"; > + dr_mode = "otg"; It should be a default, you can drop it. > + usb-role-switch; This should go to sm8450.dtsi > +}; > + > +&usb_1_dwc3_hs { > + remote-endpoint = <&pmic_glink_hs_in>; > }; > > &usb_1_hsphy { > @@ -487,3 +535,7 @@ &usb_1_qmpphy { > vdda-phy-supply = <&vreg_l6b_1p2>; > vdda-pll-supply = <&vreg_l1b_0p91>; > }; > + > +&usb_1_qmpphy_out { > + remote-endpoint = <&pmic_glink_ss_in>; > +}; > -- > 2.34.1 > -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] arm64: dts: qcom: sm8450-qrd: Flatten usb controller node 2025-06-10 9:18 [PATCH v2 0/2] Flattening USB controller on SM8450 QRD Krishna Kurapati 2025-06-10 9:18 ` [PATCH v2 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati @ 2025-06-10 9:18 ` Krishna Kurapati 2025-06-10 11:08 ` Dmitry Baryshkov 2025-06-10 9:34 ` [PATCH v2 0/2] Flattening USB controller on SM8450 QRD neil.armstrong 2 siblings, 1 reply; 7+ messages in thread From: Krishna Kurapati @ 2025-06-10 9:18 UTC (permalink / raw) To: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio Cc: linux-kernel, devicetree, linux-arm-msm, Krishna Kurapati Flatten usb controller node and update to using latest bindings and flattened driver approach. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> --- arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 60 +++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts index 0580408485eb..bd6cb895b65b 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts @@ -500,19 +500,73 @@ &ufs_mem_phy { vdda-pll-supply = <&vreg_l6b_1p2>; }; +/delete-node/ &usb_1_dwc3; + &usb_1 { - status = "okay"; -}; + compatible = "qcom,sm8450-dwc3", "qcom,snps-dwc3"; + reg = <0x0 0x0a600000 0x0 0x10000>; + + /delete-property/ ranges; + #address-cells = <1>; + #size-cells = <0>; + + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + + iommus = <&apps_smmu 0x0 0x0>; + + maximum-speed = "super-speed-plus"; + + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", "usb3-phy"; + + snps,dis_u2_susphy_quirk; + snps,dis_enblslpm_quirk; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; -&usb_1_dwc3 { dr_mode = "otg"; usb-role-switch; + wakeup-source; + + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb_1_dwc3_hs: endpoint { + }; + }; + + port@1 { + reg = <1>; + usb_1_dwc3_ss: endpoint { + }; + }; + }; }; &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; +&usb_1_dwc3_ss { + remote-endpoint = <&usb_1_qmpphy_usb_ss_in>; +}; + &usb_1_hsphy { status = "okay"; -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] arm64: dts: qcom: sm8450-qrd: Flatten usb controller node 2025-06-10 9:18 ` [PATCH v2 2/2] arm64: dts: qcom: sm8450-qrd: Flatten usb controller node Krishna Kurapati @ 2025-06-10 11:08 ` Dmitry Baryshkov 0 siblings, 0 replies; 7+ messages in thread From: Dmitry Baryshkov @ 2025-06-10 11:08 UTC (permalink / raw) To: Krishna Kurapati Cc: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio, linux-kernel, devicetree, linux-arm-msm On Tue, Jun 10, 2025 at 02:48:05PM +0530, Krishna Kurapati wrote: > Flatten usb controller node and update to using latest bindings > and flattened driver approach. > > Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> > --- > arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 60 +++++++++++++++++++++++-- > 1 file changed, 57 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts > index 0580408485eb..bd6cb895b65b 100644 > --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts > +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts > @@ -500,19 +500,73 @@ &ufs_mem_phy { > vdda-pll-supply = <&vreg_l6b_1p2>; > }; > > +/delete-node/ &usb_1_dwc3; > + > &usb_1 { > - status = "okay"; > -}; > + compatible = "qcom,sm8450-dwc3", "qcom,snps-dwc3"; > + reg = <0x0 0x0a600000 0x0 0x10000>; All these properties should go to the sm8450.dtsi rather than rewriting them in the board file. > + > + /delete-property/ ranges; > + #address-cells = <1>; > + #size-cells = <0>; > + > + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, > + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, > + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, > + <&pdc 14 IRQ_TYPE_LEVEL_HIGH>, > + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, > + <&pdc 17 IRQ_TYPE_EDGE_BOTH>; > + interrupt-names = "dwc_usb3", > + "pwr_event", > + "hs_phy_irq", > + "dp_hs_phy_irq", > + "dm_hs_phy_irq", > + "ss_phy_irq"; > + > + iommus = <&apps_smmu 0x0 0x0>; > + > + maximum-speed = "super-speed-plus"; > + > + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; > + phy-names = "usb2-phy", "usb3-phy"; > + > + snps,dis_u2_susphy_quirk; > + snps,dis_enblslpm_quirk; > + snps,dis-u1-entry-quirk; > + snps,dis-u2-entry-quirk; > > -&usb_1_dwc3 { > dr_mode = "otg"; > usb-role-switch; > + wakeup-source; > + > + status = "okay"; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + usb_1_dwc3_hs: endpoint { > + }; > + }; > + > + port@1 { > + reg = <1>; > + usb_1_dwc3_ss: endpoint { > + }; > + }; > + }; > }; > > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > > +&usb_1_dwc3_ss { > + remote-endpoint = <&usb_1_qmpphy_usb_ss_in>; This is a part of the SoC routing, so it should go to sm8450.dtsi too. > +}; > + > &usb_1_hsphy { > status = "okay"; > > -- > 2.34.1 > -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] Flattening USB controller on SM8450 QRD 2025-06-10 9:18 [PATCH v2 0/2] Flattening USB controller on SM8450 QRD Krishna Kurapati 2025-06-10 9:18 ` [PATCH v2 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati 2025-06-10 9:18 ` [PATCH v2 2/2] arm64: dts: qcom: sm8450-qrd: Flatten usb controller node Krishna Kurapati @ 2025-06-10 9:34 ` neil.armstrong 2025-06-10 9:59 ` Krishna Kurapati 2 siblings, 1 reply; 7+ messages in thread From: neil.armstrong @ 2025-06-10 9:34 UTC (permalink / raw) To: Krishna Kurapati, Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio Cc: linux-kernel, devicetree, linux-arm-msm On 10/06/2025 11:18, Krishna Kurapati wrote: > Flatten USB Controller node on SM8450 QRD to move away from legacy USB > Qualcomm glue driver and make use of new one. The series has been tested > with driver changes [1] to enable runtime suspend/resume during cable > disconnect/connect scenarios. > > I was testing on SM8450 QRD and hence flattened usb node on that platform > only. If the community suggests to flatten all platforms of sm8450, I can > do a compile test for the ones I can't get hands on and send a follow up > series. I can test on an SM8450 HDK, so please flatten for all the boards and CC me Neil > > [1]: https://lore.kernel.org/all/20250610091357.2983085-1-krishna.kurapati@oss.qualcomm.com/ > > Krishna Kurapati (2): > arm64: dts: qcom: sm8450-qrd: add pmic glink node > arm64: dts: qcom: sm8450-qrd: Flatten usb controller node > > arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 110 +++++++++++++++++++++++- > 1 file changed, 108 insertions(+), 2 deletions(-) > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] Flattening USB controller on SM8450 QRD 2025-06-10 9:34 ` [PATCH v2 0/2] Flattening USB controller on SM8450 QRD neil.armstrong @ 2025-06-10 9:59 ` Krishna Kurapati 0 siblings, 0 replies; 7+ messages in thread From: Krishna Kurapati @ 2025-06-10 9:59 UTC (permalink / raw) To: Neil Armstrong Cc: linux-kernel, devicetree, Konrad Dybcio, Bjorn Andersson, Conor Dooley, Rob Herring, Krzysztof Kozlowski, linux-arm-msm On 6/10/2025 3:04 PM, neil.armstrong@linaro.org wrote: > On 10/06/2025 11:18, Krishna Kurapati wrote: >> Flatten USB Controller node on SM8450 QRD to move away from legacy USB >> Qualcomm glue driver and make use of new one. The series has been tested >> with driver changes [1] to enable runtime suspend/resume during cable >> disconnect/connect scenarios. >> >> I was testing on SM8450 QRD and hence flattened usb node on that platform >> only. If the community suggests to flatten all platforms of sm8450, I can >> do a compile test for the ones I can't get hands on and send a follow up >> series. > > I can test on an SM8450 HDK, so please flatten for all the boards and CC me > Thanks for the support Neil. Will flatten all platforms and CC you as well in v3. Regards, Krishna, > Neil > >> >> [1]: >> https://lore.kernel.org/all/20250610091357.2983085-1-krishna.kurapati@oss.qualcomm.com/ >> >> Krishna Kurapati (2): >> arm64: dts: qcom: sm8450-qrd: add pmic glink node >> arm64: dts: qcom: sm8450-qrd: Flatten usb controller node >> >> arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 110 +++++++++++++++++++++++- >> 1 file changed, 108 insertions(+), 2 deletions(-) >> > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-10 11:09 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-06-10 9:18 [PATCH v2 0/2] Flattening USB controller on SM8450 QRD Krishna Kurapati 2025-06-10 9:18 ` [PATCH v2 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati 2025-06-10 11:07 ` Dmitry Baryshkov 2025-06-10 9:18 ` [PATCH v2 2/2] arm64: dts: qcom: sm8450-qrd: Flatten usb controller node Krishna Kurapati 2025-06-10 11:08 ` Dmitry Baryshkov 2025-06-10 9:34 ` [PATCH v2 0/2] Flattening USB controller on SM8450 QRD neil.armstrong 2025-06-10 9:59 ` Krishna Kurapati
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®