* [PATCH 0/2] arm64: dts: qcom: Fix usb entries for SA8155p-adp board @ 2021-06-25 22:03 Bhupesh Sharma 2021-06-25 22:03 ` [PATCH 1/2] arm64: dts: qcom: Use consistent naming for dwc3 usb nodes for sm8150 Bhupesh Sharma 2021-06-25 22:03 ` [PATCH 2/2] arm64: dts: qcom: Fix usb entries for SA8155p adp board Bhupesh Sharma 0 siblings, 2 replies; 5+ messages in thread From: Bhupesh Sharma @ 2021-06-25 22:03 UTC (permalink / raw) To: linux-arm-msm Cc: bhupesh.sharma, bhupesh.linux, balbi, linux-kernel, devicetree, robh+dt, agross, Bjorn Andersson This series enables the support for two USB ports (named portB and portC) found on the SA8155p-adp board which are connected to USB Type A connectors. It also contains a minor naming related fix for dwc3 usb nodes found on sm8150 SoC. Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Bhupesh Sharma (2): arm64: dts: qcom: Use consistent naming for dwc3 usb nodes for sm8150 arm64: dts: qcom: Fix usb entries for SA8155p adp board arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 60 ++++++++++++++++++++---- arch/arm64/boot/dts/qcom/sm8150.dtsi | 30 ++++++------ 2 files changed, 66 insertions(+), 24 deletions(-) -- 2.31.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] arm64: dts: qcom: Use consistent naming for dwc3 usb nodes for sm8150 2021-06-25 22:03 [PATCH 0/2] arm64: dts: qcom: Fix usb entries for SA8155p-adp board Bhupesh Sharma @ 2021-06-25 22:03 ` Bhupesh Sharma 2021-06-25 22:35 ` Bjorn Andersson 2021-06-25 22:03 ` [PATCH 2/2] arm64: dts: qcom: Fix usb entries for SA8155p adp board Bhupesh Sharma 1 sibling, 1 reply; 5+ messages in thread From: Bhupesh Sharma @ 2021-06-25 22:03 UTC (permalink / raw) To: linux-arm-msm Cc: bhupesh.sharma, bhupesh.linux, balbi, linux-kernel, devicetree, robh+dt, agross, Bjorn Andersson The dwc3 usb nodes in sm8150.dtsi are currently named differently, leading to some confusion when one sees the entries in sysfs or dmesg: [ 1.943482] dwc3 a600000.usb: Adding to iommu group 1 [ 2.266127] dwc3 a800000.dwc3: Adding to iommu group 2 Name both the nodes as dwc3@<addr> for consistency. While at it also arrange the two usb controller, hs-phy and ss-phy nodes closer in the dts for better readability. Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index 612dda0fef43..3be6d093a99b 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -2205,6 +2205,20 @@ glink-edge { }; }; + dc_noc: interconnect@9160000 { + compatible = "qcom,sm8150-dc-noc"; + reg = <0 0x09160000 0 0x3200>; + #interconnect-cells = <1>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + + gem_noc: interconnect@9680000 { + compatible = "qcom,sm8150-gem-noc"; + reg = <0 0x09680000 0 0x3e200>; + #interconnect-cells = <1>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + usb_1_hsphy: phy@88e2000 { compatible = "qcom,sm8150-usb-hs-phy", "qcom,usb-snps-hs-7nm-phy"; @@ -2266,20 +2280,6 @@ usb_1_ssphy: lanes@88e9200 { }; }; - dc_noc: interconnect@9160000 { - compatible = "qcom,sm8150-dc-noc"; - reg = <0 0x09160000 0 0x3200>; - #interconnect-cells = <1>; - qcom,bcm-voters = <&apps_bcm_voter>; - }; - - gem_noc: interconnect@9680000 { - compatible = "qcom,sm8150-gem-noc"; - reg = <0 0x09680000 0 0x3e200>; - #interconnect-cells = <1>; - qcom,bcm-voters = <&apps_bcm_voter>; - }; - usb_2_qmpphy: phy@88eb000 { compatible = "qcom,sm8150-qmp-usb3-uni-phy"; reg = <0 0x088eb000 0 0x200>; @@ -2344,7 +2344,7 @@ usb_1: usb@a6f8800 { resets = <&gcc GCC_USB30_PRIM_BCR>; - usb_1_dwc3: usb@a600000 { + usb_1_dwc3: dwc3@a600000 { compatible = "snps,dwc3"; reg = <0 0x0a600000 0 0xcd00>; interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>; -- 2.31.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: qcom: Use consistent naming for dwc3 usb nodes for sm8150 2021-06-25 22:03 ` [PATCH 1/2] arm64: dts: qcom: Use consistent naming for dwc3 usb nodes for sm8150 Bhupesh Sharma @ 2021-06-25 22:35 ` Bjorn Andersson 2021-06-26 18:26 ` Bhupesh Sharma 0 siblings, 1 reply; 5+ messages in thread From: Bjorn Andersson @ 2021-06-25 22:35 UTC (permalink / raw) To: Bhupesh Sharma Cc: linux-arm-msm, bhupesh.linux, balbi, linux-kernel, devicetree, robh+dt, agross On Fri 25 Jun 17:03 CDT 2021, Bhupesh Sharma wrote: > The dwc3 usb nodes in sm8150.dtsi are currently named differently, > leading to some confusion when one sees the entries in sysfs or > dmesg: > [ 1.943482] dwc3 a600000.usb: Adding to iommu group 1 > [ 2.266127] dwc3 a800000.dwc3: Adding to iommu group 2 > > Name both the nodes as dwc3@<addr> for consistency. > > While at it also arrange the two usb controller, hs-phy and > ss-phy nodes closer in the dts for better readability. > > Cc: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> > --- > arch/arm64/boot/dts/qcom/sm8150.dtsi | 30 ++++++++++++++-------------- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi > index 612dda0fef43..3be6d093a99b 100644 > --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi > @@ -2205,6 +2205,20 @@ glink-edge { > }; > }; > > + dc_noc: interconnect@9160000 { > + compatible = "qcom,sm8150-dc-noc"; > + reg = <0 0x09160000 0 0x3200>; > + #interconnect-cells = <1>; > + qcom,bcm-voters = <&apps_bcm_voter>; > + }; > + > + gem_noc: interconnect@9680000 { > + compatible = "qcom,sm8150-gem-noc"; > + reg = <0 0x09680000 0 0x3e200>; > + #interconnect-cells = <1>; > + qcom,bcm-voters = <&apps_bcm_voter>; > + }; > + > usb_1_hsphy: phy@88e2000 { > compatible = "qcom,sm8150-usb-hs-phy", > "qcom,usb-snps-hs-7nm-phy"; > @@ -2266,20 +2280,6 @@ usb_1_ssphy: lanes@88e9200 { > }; > }; > > - dc_noc: interconnect@9160000 { > - compatible = "qcom,sm8150-dc-noc"; > - reg = <0 0x09160000 0 0x3200>; > - #interconnect-cells = <1>; > - qcom,bcm-voters = <&apps_bcm_voter>; > - }; > - > - gem_noc: interconnect@9680000 { > - compatible = "qcom,sm8150-gem-noc"; > - reg = <0 0x09680000 0 0x3e200>; > - #interconnect-cells = <1>; > - qcom,bcm-voters = <&apps_bcm_voter>; > - }; > - > usb_2_qmpphy: phy@88eb000 { > compatible = "qcom,sm8150-qmp-usb3-uni-phy"; > reg = <0 0x088eb000 0 0x200>; > @@ -2344,7 +2344,7 @@ usb_1: usb@a6f8800 { > > resets = <&gcc GCC_USB30_PRIM_BCR>; > > - usb_1_dwc3: usb@a600000 { > + usb_1_dwc3: dwc3@a600000 { "usb@" is actually the right one, per the rather recent standardization across the dwc3 bindings. Regards, Bjorn > compatible = "snps,dwc3"; > reg = <0 0x0a600000 0 0xcd00>; > interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>; > -- > 2.31.1 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: qcom: Use consistent naming for dwc3 usb nodes for sm8150 2021-06-25 22:35 ` Bjorn Andersson @ 2021-06-26 18:26 ` Bhupesh Sharma 0 siblings, 0 replies; 5+ messages in thread From: Bhupesh Sharma @ 2021-06-26 18:26 UTC (permalink / raw) To: Bjorn Andersson Cc: linux-arm-msm, bhupesh.linux, balbi, Linux Kernel Mailing List, devicetree, Rob Herring, Andy Gross Hi Bjorn, On Sat, 26 Jun 2021 at 04:05, Bjorn Andersson <bjorn.andersson@linaro.org> wrote: > > On Fri 25 Jun 17:03 CDT 2021, Bhupesh Sharma wrote: > > > The dwc3 usb nodes in sm8150.dtsi are currently named differently, > > leading to some confusion when one sees the entries in sysfs or > > dmesg: > > [ 1.943482] dwc3 a600000.usb: Adding to iommu group 1 > > [ 2.266127] dwc3 a800000.dwc3: Adding to iommu group 2 > > > > Name both the nodes as dwc3@<addr> for consistency. > > > > While at it also arrange the two usb controller, hs-phy and > > ss-phy nodes closer in the dts for better readability. > > > > Cc: Bjorn Andersson <bjorn.andersson@linaro.org> > > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> > > --- > > arch/arm64/boot/dts/qcom/sm8150.dtsi | 30 ++++++++++++++-------------- > > 1 file changed, 15 insertions(+), 15 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi > > index 612dda0fef43..3be6d093a99b 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi > > +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi > > @@ -2205,6 +2205,20 @@ glink-edge { > > }; > > }; > > > > + dc_noc: interconnect@9160000 { > > + compatible = "qcom,sm8150-dc-noc"; > > + reg = <0 0x09160000 0 0x3200>; > > + #interconnect-cells = <1>; > > + qcom,bcm-voters = <&apps_bcm_voter>; > > + }; > > + > > + gem_noc: interconnect@9680000 { > > + compatible = "qcom,sm8150-gem-noc"; > > + reg = <0 0x09680000 0 0x3e200>; > > + #interconnect-cells = <1>; > > + qcom,bcm-voters = <&apps_bcm_voter>; > > + }; > > + > > usb_1_hsphy: phy@88e2000 { > > compatible = "qcom,sm8150-usb-hs-phy", > > "qcom,usb-snps-hs-7nm-phy"; > > @@ -2266,20 +2280,6 @@ usb_1_ssphy: lanes@88e9200 { > > }; > > }; > > > > - dc_noc: interconnect@9160000 { > > - compatible = "qcom,sm8150-dc-noc"; > > - reg = <0 0x09160000 0 0x3200>; > > - #interconnect-cells = <1>; > > - qcom,bcm-voters = <&apps_bcm_voter>; > > - }; > > - > > - gem_noc: interconnect@9680000 { > > - compatible = "qcom,sm8150-gem-noc"; > > - reg = <0 0x09680000 0 0x3e200>; > > - #interconnect-cells = <1>; > > - qcom,bcm-voters = <&apps_bcm_voter>; > > - }; > > - > > usb_2_qmpphy: phy@88eb000 { > > compatible = "qcom,sm8150-qmp-usb3-uni-phy"; > > reg = <0 0x088eb000 0 0x200>; > > @@ -2344,7 +2344,7 @@ usb_1: usb@a6f8800 { > > > > resets = <&gcc GCC_USB30_PRIM_BCR>; > > > > - usb_1_dwc3: usb@a600000 { > > + usb_1_dwc3: dwc3@a600000 { > > "usb@" is actually the right one, per the rather recent standardization > across the dwc3 bindings. Ok, yes that makes more sense. Although a grep for the keyword 'dwc3@', does lead up to quite a few qcom dts files which use 'dwc3@ 'instead of 'usb@', which seem inconsistent as per the bindings doc (see [1]). Maybe I can fix those in v2 as well. [1]. Documentation/devicetree/bindings/usb/qcom,dwc3.yaml Thanks, Bhupesh > > > compatible = "snps,dwc3"; > > reg = <0 0x0a600000 0 0xcd00>; > > interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>; > > -- > > 2.31.1 > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] arm64: dts: qcom: Fix usb entries for SA8155p adp board 2021-06-25 22:03 [PATCH 0/2] arm64: dts: qcom: Fix usb entries for SA8155p-adp board Bhupesh Sharma 2021-06-25 22:03 ` [PATCH 1/2] arm64: dts: qcom: Use consistent naming for dwc3 usb nodes for sm8150 Bhupesh Sharma @ 2021-06-25 22:03 ` Bhupesh Sharma 1 sibling, 0 replies; 5+ messages in thread From: Bhupesh Sharma @ 2021-06-25 22:03 UTC (permalink / raw) To: linux-arm-msm Cc: bhupesh.sharma, bhupesh.linux, balbi, linux-kernel, devicetree, robh+dt, agross, Bjorn Andersson SA8155p adp board has two USB A-type receptacles called USB-portB and USB-portC respectively. While USB-portB is a USB High-Speed connector/interface, the USB-portC one is a USB 3.1 Super-Speed connector/interface. Also the USB-portB is used as the USB emergency download port (for image download purposes). Enable both the ports on the board in USB Host mode (since all the USB interfaces are brought out to USB Type A connectors). Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> --- arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 60 ++++++++++++++++++++---- 1 file changed, 51 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts index 0da7a3b8d1bf..5ae2ddc65f7e 100644 --- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts +++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts @@ -307,10 +307,6 @@ &qupv3_id_1 { status = "okay"; }; -&tlmm { - gpio-reserved-ranges = <0 4>; -}; - &uart2 { status = "okay"; }; @@ -337,6 +333,16 @@ &ufs_mem_phy { vdda-pll-max-microamp = <18300>; }; +&usb_1 { + status = "okay"; +}; + +&usb_1_dwc3 { + dr_mode = "host"; + + pinctrl-names = "default"; + pinctrl-0 = <&usb2phy_ac_en1_default>; +}; &usb_1_hsphy { status = "okay"; @@ -346,15 +352,51 @@ &usb_1_hsphy { }; &usb_1_qmpphy { + status = "disabled"; +}; + +&usb_2 { status = "okay"; - vdda-phy-supply = <&vreg_l8c_1p2>; - vdda-pll-supply = <&vdda_usb_ss_dp_core_1>; }; -&usb_1 { +&usb_2_dwc3 { + dr_mode = "host"; + + pinctrl-names = "default"; + pinctrl-0 = <&usb2phy_ac_en2_default>; +}; + +&usb_2_hsphy { status = "okay"; + vdda-pll-supply = <&vdd_usb_hs_core>; + vdda33-supply = <&vdda_usb_hs_3p1>; + vdda18-supply = <&vdda_usb_hs_1p8>; }; -&usb_1_dwc3 { - dr_mode = "peripheral"; +&usb_2_qmpphy { + status = "okay"; + vdda-phy-supply = <&vreg_l8c_1p2>; + vdda-pll-supply = <&vdda_usb_ss_dp_core_1>; +}; + +&tlmm { + gpio-reserved-ranges = <0 4>; + + usb2phy_ac_en1_default: usb2phy_ac_en1_default { + mux { + pins = "gpio113"; + function = "usb2phy_ac"; + bias-disable; + drive-strength = <2>; + }; + }; + + usb2phy_ac_en2_default: usb2phy_ac_en2_default { + mux { + pins = "gpio123"; + function = "usb2phy_ac"; + bias-disable; + drive-strength = <2>; + }; + }; }; -- 2.31.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-26 18:26 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-06-25 22:03 [PATCH 0/2] arm64: dts: qcom: Fix usb entries for SA8155p-adp board Bhupesh Sharma 2021-06-25 22:03 ` [PATCH 1/2] arm64: dts: qcom: Use consistent naming for dwc3 usb nodes for sm8150 Bhupesh Sharma 2021-06-25 22:35 ` Bjorn Andersson 2021-06-26 18:26 ` Bhupesh Sharma 2021-06-25 22:03 ` [PATCH 2/2] arm64: dts: qcom: Fix usb entries for SA8155p adp board Bhupesh Sharma
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).