* [PATCH v4 0/2] Flattening USB controller on SM8450 @ 2025-07-15 5:27 Krishna Kurapati 2025-07-15 5:27 ` [PATCH v4 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-07-15 5:27 UTC (permalink / raw) To: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio, neil.armstrong 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. Tested the series on top of a QRD. As per Neil's comments, made changes for HDK as well. Gave a compile test for the sony-xperia-nagara changes. Changes in v4: Moved pmic glink node above vph pwr node. Modified reg offset as per comments received from Konrad. Changes in v3: As per comments received: a) Flattened all platforms. b) Addressed Dmitry's comments - moving properties from QRD to base DT. Changes in v2: Rebase from RFC. Link to v3: https://lore.kernel.org/all/20250714045310.2092385-1-krishna.kurapati@oss.qualcomm.com/ Link to v2: https://lore.kernel.org/all/20250610091805.2997546-1-krishna.kurapati@oss.qualcomm.com/ Link to RFC: https://lore.kernel.org/all/20231017131851.8299-5-quic_kriskura@quicinc.com/ https://lore.kernel.org/all/20231017131851.8299-6-quic_kriskura@quicinc.com/ Krishna Kurapati (2): arm64: dts: qcom: sm8450-qrd: add pmic glink node arm64: dts: qcom: sm8450: Flatten usb controller node arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 5 -- arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 51 ++++++++++++++++- .../dts/qcom/sm8450-sony-xperia-nagara.dtsi | 5 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 57 +++++++++---------- 4 files changed, 76 insertions(+), 42 deletions(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node 2025-07-15 5:27 [PATCH v4 0/2] Flattening USB controller on SM8450 Krishna Kurapati @ 2025-07-15 5:27 ` Krishna Kurapati 2025-07-15 8:56 ` Konrad Dybcio 2025-07-15 5:27 ` [PATCH v4 2/2] arm64: dts: qcom: sm8450: Flatten usb controller node Krishna Kurapati 2025-08-11 23:26 ` [PATCH v4 0/2] Flattening USB controller on SM8450 Bjorn Andersson 2 siblings, 1 reply; 7+ messages in thread From: Krishna Kurapati @ 2025-07-15 5:27 UTC (permalink / raw) To: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio, neil.armstrong 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 | 51 ++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts index 8c39fbcaad80..56db5f79f59d 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts @@ -28,6 +28,49 @@ chosen { stdout-path = "serial0:115200n8"; }; + 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 { + }; + }; + + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible = "regulator-fixed"; regulator-name = "vph_pwr"; @@ -461,8 +504,8 @@ &usb_1 { status = "okay"; }; -&usb_1_dwc3 { - dr_mode = "peripheral"; +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; }; &usb_1_hsphy { @@ -487,3 +530,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 related [flat|nested] 7+ messages in thread
* Re: [PATCH v4 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node 2025-07-15 5:27 ` [PATCH v4 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati @ 2025-07-15 8:56 ` Konrad Dybcio 0 siblings, 0 replies; 7+ messages in thread From: Konrad Dybcio @ 2025-07-15 8:56 UTC (permalink / raw) To: Krishna Kurapati, Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio, neil.armstrong Cc: linux-kernel, devicetree, linux-arm-msm On 7/15/25 7:27 AM, 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> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 2/2] arm64: dts: qcom: sm8450: Flatten usb controller node 2025-07-15 5:27 [PATCH v4 0/2] Flattening USB controller on SM8450 Krishna Kurapati 2025-07-15 5:27 ` [PATCH v4 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati @ 2025-07-15 5:27 ` Krishna Kurapati 2025-08-13 7:27 ` Krzysztof Kozlowski 2025-08-11 23:26 ` [PATCH v4 0/2] Flattening USB controller on SM8450 Bjorn Andersson 2 siblings, 1 reply; 7+ messages in thread From: Krishna Kurapati @ 2025-07-15 5:27 UTC (permalink / raw) To: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio, neil.armstrong Cc: linux-kernel, devicetree, linux-arm-msm, Krishna Kurapati, Konrad Dybcio Flatten usb controller node and update to using latest bindings and flattened driver approach. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> --- arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 5 -- .../dts/qcom/sm8450-sony-xperia-nagara.dtsi | 5 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 57 +++++++++---------- 3 files changed, 27 insertions(+), 40 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts index 2ff40a120aad..0c6aa7ddf432 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts @@ -1199,11 +1199,6 @@ &usb_1 { status = "okay"; }; -&usb_1_dwc3 { - dr_mode = "otg"; - usb-role-switch; -}; - &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi index cc1335a07a35..6bd315e10992 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi @@ -781,11 +781,8 @@ &uart7 { }; &usb_1 { - status = "okay"; -}; - -&usb_1_dwc3 { dr_mode = "peripheral"; + status = "okay"; }; &usb_1_hsphy { diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 54c6d0fdb2af..89dbac3bdd2b 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -5417,12 +5417,9 @@ opp-202000000 { }; usb_1: usb@a6f8800 { - compatible = "qcom,sm8450-dwc3", "qcom,dwc3"; - reg = <0 0x0a6f8800 0 0x400>; + compatible = "qcom,sm8450-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xfc100>; status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>, <&gcc GCC_USB30_PRIM_MASTER_CLK>, @@ -5441,12 +5438,14 @@ usb_1: usb@a6f8800 { <&gcc GCC_USB30_PRIM_MASTER_CLK>; assigned-clock-rates = <19200000>, <200000000>; - interrupts-extended = <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + 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_EDGE_BOTH>, <&pdc 15 IRQ_TYPE_EDGE_BOTH>, <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "pwr_event", + interrupt-names = "dwc_usb3", + "pwr_event", "hs_phy_irq", "dp_hs_phy_irq", "dm_hs_phy_irq", @@ -5460,36 +5459,32 @@ usb_1: usb@a6f8800 { <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3_0 0>; interconnect-names = "usb-ddr", "apps-usb"; - usb_1_dwc3: usb@a600000 { - compatible = "snps,dwc3"; - reg = <0 0x0a600000 0 0xcd00>; - interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>; - iommus = <&apps_smmu 0x0 0x0>; - snps,dis_u2_susphy_quirk; - snps,dis_u3_susphy_quirk; - snps,dis_enblslpm_quirk; - snps,dis-u1-entry-quirk; - snps,dis-u2-entry-quirk; - phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; - phy-names = "usb2-phy", "usb3-phy"; + iommus = <&apps_smmu 0x0 0x0>; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + snps,dis_enblslpm_quirk; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", "usb3-phy"; + usb-role-switch; - ports { - #address-cells = <1>; - #size-cells = <0>; + ports { + #address-cells = <1>; + #size-cells = <0>; - port@0 { - reg = <0>; + port@0 { + reg = <0>; - usb_1_dwc3_hs: endpoint { - }; + usb_1_dwc3_hs: endpoint { }; + }; - port@1 { - reg = <1>; + port@1 { + reg = <1>; - usb_1_dwc3_ss: endpoint { - remote-endpoint = <&usb_1_qmpphy_usb_ss_in>; - }; + usb_1_dwc3_ss: endpoint { + remote-endpoint = <&usb_1_qmpphy_usb_ss_in>; }; }; }; -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v4 2/2] arm64: dts: qcom: sm8450: Flatten usb controller node 2025-07-15 5:27 ` [PATCH v4 2/2] arm64: dts: qcom: sm8450: Flatten usb controller node Krishna Kurapati @ 2025-08-13 7:27 ` Krzysztof Kozlowski 2025-08-13 8:34 ` Krishna Kurapati 0 siblings, 1 reply; 7+ messages in thread From: Krzysztof Kozlowski @ 2025-08-13 7:27 UTC (permalink / raw) To: Krishna Kurapati, Krzysztof Kozlowski, Rob Herring, Conor Dooley, Bjorn Andersson, Konrad Dybcio, neil.armstrong Cc: linux-kernel, devicetree, linux-arm-msm, Konrad Dybcio On 15/07/2025 07:27, Krishna Kurapati wrote: > Flatten usb controller node and update to using latest bindings > and flattened driver approach. > > Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> > Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> > --- > arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 5 -- > .../dts/qcom/sm8450-sony-xperia-nagara.dtsi | 5 +- > arch/arm64/boot/dts/qcom/sm8450.dtsi | 57 +++++++++---------- > 3 files changed, 27 insertions(+), 40 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > index 2ff40a120aad..0c6aa7ddf432 100644 > --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts > @@ -1199,11 +1199,6 @@ &usb_1 { > status = "okay"; > }; > > -&usb_1_dwc3 { > - dr_mode = "otg"; > - usb-role-switch; > -}; > - > &usb_1_dwc3_hs { > remote-endpoint = <&pmic_glink_hs_in>; > }; > diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi > index cc1335a07a35..6bd315e10992 100644 > --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi > @@ -781,11 +781,8 @@ &uart7 { > }; > > &usb_1 { > - status = "okay"; > -}; > - > -&usb_1_dwc3 { > dr_mode = "peripheral"; > + status = "okay"; > }; > > &usb_1_hsphy { > diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi > index 54c6d0fdb2af..89dbac3bdd2b 100644 > --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi > @@ -5417,12 +5417,9 @@ opp-202000000 { > }; > > usb_1: usb@a6f8800 { > - compatible = "qcom,sm8450-dwc3", "qcom,dwc3"; > - reg = <0 0x0a6f8800 0 0x400>; > + compatible = "qcom,sm8450-dwc3", "qcom,snps-dwc3"; > + reg = <0 0x0a600000 0 0xfc100>; So this was never checked. Can you start using tools before you send code upstream? Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4 2/2] arm64: dts: qcom: sm8450: Flatten usb controller node 2025-08-13 7:27 ` Krzysztof Kozlowski @ 2025-08-13 8:34 ` Krishna Kurapati 0 siblings, 0 replies; 7+ messages in thread From: Krishna Kurapati @ 2025-08-13 8:34 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: linux-kernel, neil.armstrong, devicetree, Konrad Dybcio, Bjorn Andersson, Conor Dooley, Rob Herring, Krzysztof Kozlowski, linux-arm-msm, Konrad Dybcio On 8/13/2025 12:57 PM, Krzysztof Kozlowski wrote: > On 15/07/2025 07:27, Krishna Kurapati wrote: >> Flatten usb controller node and update to using latest bindings >> and flattened driver approach. >> >> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> >> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> >> --- >> arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 5 -- >> .../dts/qcom/sm8450-sony-xperia-nagara.dtsi | 5 +- >> arch/arm64/boot/dts/qcom/sm8450.dtsi | 57 +++++++++---------- >> 3 files changed, 27 insertions(+), 40 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >> index 2ff40a120aad..0c6aa7ddf432 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >> +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts >> @@ -1199,11 +1199,6 @@ &usb_1 { >> status = "okay"; >> }; >> >> -&usb_1_dwc3 { >> - dr_mode = "otg"; >> - usb-role-switch; >> -}; >> - >> &usb_1_dwc3_hs { >> remote-endpoint = <&pmic_glink_hs_in>; >> }; >> diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi >> index cc1335a07a35..6bd315e10992 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi >> @@ -781,11 +781,8 @@ &uart7 { >> }; >> >> &usb_1 { >> - status = "okay"; >> -}; >> - >> -&usb_1_dwc3 { >> dr_mode = "peripheral"; >> + status = "okay"; >> }; >> >> &usb_1_hsphy { >> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi >> index 54c6d0fdb2af..89dbac3bdd2b 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi >> @@ -5417,12 +5417,9 @@ opp-202000000 { >> }; >> >> usb_1: usb@a6f8800 { >> - compatible = "qcom,sm8450-dwc3", "qcom,dwc3"; >> - reg = <0 0x0a6f8800 0 0x400>; >> + compatible = "qcom,sm8450-dwc3", "qcom,snps-dwc3"; >> + reg = <0 0x0a600000 0 0xfc100>; > > > So this was never checked. Can you start using tools before you send > code upstream? > > Hi Krzysztof, Apologies. I didn't compile it with W=1 previously. When I did after the kernel test robot complained, I saw the issue. Also I rebased it on top of latest linux next where I see the flattened patch is present. Regards, Krishna, ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4 0/2] Flattening USB controller on SM8450 2025-07-15 5:27 [PATCH v4 0/2] Flattening USB controller on SM8450 Krishna Kurapati 2025-07-15 5:27 ` [PATCH v4 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati 2025-07-15 5:27 ` [PATCH v4 2/2] arm64: dts: qcom: sm8450: Flatten usb controller node Krishna Kurapati @ 2025-08-11 23:26 ` Bjorn Andersson 2 siblings, 0 replies; 7+ messages in thread From: Bjorn Andersson @ 2025-08-11 23:26 UTC (permalink / raw) To: Krzysztof Kozlowski, Rob Herring, Conor Dooley, Konrad Dybcio, neil.armstrong, Krishna Kurapati Cc: linux-kernel, devicetree, linux-arm-msm On Tue, 15 Jul 2025 10:57:37 +0530, 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. > > Tested the series on top of a QRD. As per Neil's comments, made changes > for HDK as well. Gave a compile test for the sony-xperia-nagara changes. > > Changes in v4: > Moved pmic glink node above vph pwr node. > Modified reg offset as per comments received from Konrad. > > [...] Applied, thanks! [1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node commit: f578e5f0b8b5f81e19e5f97a95e9cadf4e9c699d [2/2] arm64: dts: qcom: sm8450: Flatten usb controller node commit: c5a87e3a6b3ed051466a20cb954be1c138199c56 Best regards, -- Bjorn Andersson <andersson@kernel.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-08-13 8:34 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-07-15 5:27 [PATCH v4 0/2] Flattening USB controller on SM8450 Krishna Kurapati 2025-07-15 5:27 ` [PATCH v4 1/2] arm64: dts: qcom: sm8450-qrd: add pmic glink node Krishna Kurapati 2025-07-15 8:56 ` Konrad Dybcio 2025-07-15 5:27 ` [PATCH v4 2/2] arm64: dts: qcom: sm8450: Flatten usb controller node Krishna Kurapati 2025-08-13 7:27 ` Krzysztof Kozlowski 2025-08-13 8:34 ` Krishna Kurapati 2025-08-11 23:26 ` [PATCH v4 0/2] Flattening USB controller on SM8450 Bjorn Andersson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).