mbox series

[0/2] arm64: dts: qcom: Fix usb entries for SA8155p-adp board

Message ID 20210625220311.527549-1-bhupesh.sharma@linaro.org
Headers show
Series arm64: dts: qcom: Fix usb entries for SA8155p-adp board | expand

Message

Bhupesh Sharma June 25, 2021, 10:03 p.m. UTC
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

Comments

Bjorn Andersson June 25, 2021, 10:35 p.m. UTC | #1
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

>
Bhupesh Sharma June 26, 2021, 6:26 p.m. UTC | #2
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

> >