diff mbox series

[v10,01/11] dt-bindings: usb: usbmisc-imx: add fsl,imx8ulp-usbmisc compatible

Message ID 20240321081439.541799-1-xu.yang_2@nxp.com
State Superseded
Headers show
Series [v10,01/11] dt-bindings: usb: usbmisc-imx: add fsl,imx8ulp-usbmisc compatible | expand

Commit Message

Xu Yang March 21, 2024, 8:14 a.m. UTC
Add "fsl,imx8ulp-usbmisc" compatible.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>

---
Changes in v3:
 - new patch due to missed this little one
Changes in v4:
 - no changes
Changes in v5:
 - add Acked-by tag
Changes in v6:
 - no changes
Changes in v7:
 - no changes
Changes in v8:
 - no changes
Changes in v9:
 - no changes
Changes in v10:
 - no changes
---
 Documentation/devicetree/bindings/usb/fsl,usbmisc.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Shawn Guo April 2, 2024, 8:31 a.m. UTC | #1
On Thu, Mar 21, 2024 at 04:14:30PM +0800, Xu Yang wrote:
> Add USB nodes on i.MX8ULP platform which has 2 USB controllers.
> 
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> 
> ---
> Changes in v2:
>  - no changes
> Changes in v3:
>  - no changes
> Changes in v4:
>  - no changes
> Changes in v5:
>  - no changes
> Changes in v6:
>  - drop usbphy aliases
> Changes in v7:
>  - no changes
> Changes in v8:
>  - no changes
> Changes in v9:
>  - no changes
> Changes in v10:
>  - no changes
> ---
>  arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 62 ++++++++++++++++++++++
>  1 file changed, 62 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> index c4a0082f30d3..7da9461a5745 100644
> --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> @@ -472,6 +472,68 @@ usdhc2: mmc@298f0000 {
>  				status = "disabled";
>  			};
>  
> +			usbotg1: usb@29900000 {
> +				compatible = "fsl,imx8ulp-usb", "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
> +				reg = <0x29900000 0x200>;
> +				interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
> +				clocks = <&pcc4 IMX8ULP_CLK_USB0>;
> +				power-domains = <&scmi_devpd IMX8ULP_PD_USB0>;
> +				phys = <&usbphy1>;
> +				fsl,usbmisc = <&usbmisc1 0>;
> +				ahb-burst-config = <0x0>;
> +				tx-burst-size-dword = <0x8>;
> +				rx-burst-size-dword = <0x8>;
> +				status = "disabled";
> +			};
> +
> +			usbmisc1: usbmisc@29900200 {
> +				compatible = "fsl,imx8ulp-usbmisc", "fsl,imx7d-usbmisc",
> +						"fsl,imx6q-usbmisc";
> +				#index-cells = <1>;
> +				reg = <0x29900200 0x200>;

Could you move 'reg' above so that it's after compatible?

> +				status = "disabled";
> +			};
> +
> +			usbphy1: usb-phy@29910000 {
> +				compatible = "fsl,imx8ulp-usbphy", "fsl,imx7ulp-usbphy";
> +				reg = <0x29910000 0x10000>;
> +				interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
> +				clocks = <&pcc4 IMX8ULP_CLK_USB0_PHY>;
> +				#phy-cells = <0>;
> +				status = "disabled";
> +			};
> +
> +			usbotg2: usb@29920000 {
> +				compatible = "fsl,imx8ulp-usb", "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
> +				reg = <0x29920000 0x200>;
> +				interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +				clocks = <&pcc4 IMX8ULP_CLK_USB1>;
> +				power-domains = <&scmi_devpd IMX8ULP_PD_USDHC2_USB1>;
> +				phys = <&usbphy2>;
> +				fsl,usbmisc = <&usbmisc2 0>;
> +				ahb-burst-config = <0x0>;
> +				tx-burst-size-dword = <0x8>;
> +				rx-burst-size-dword = <0x8>;
> +				status = "disabled";
> +			};
> +
> +			usbmisc2: usbmisc@29920200 {
> +				compatible = "fsl,imx8ulp-usbmisc", "fsl,imx7d-usbmisc",
> +						"fsl,imx6q-usbmisc";
> +				#index-cells = <1>;
> +				reg = <0x29920200 0x200>;

Ditto

Shawn

> +				status = "disabled";
> +			};
> +
> +			usbphy2: usb-phy@29930000 {
> +				compatible = "fsl,imx8ulp-usbphy", "fsl,imx7ulp-usbphy";
> +				reg = <0x29930000 0x10000>;
> +				interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
> +				clocks = <&pcc4 IMX8ULP_CLK_USB1_PHY>;
> +				#phy-cells = <0>;
> +				status = "disabled";
> +			};
> +
>  			fec: ethernet@29950000 {
>  				compatible = "fsl,imx8ulp-fec", "fsl,imx6ul-fec", "fsl,imx6q-fec";
>  				reg = <0x29950000 0x10000>;
> -- 
> 2.34.1
>
Shawn Guo April 2, 2024, 8:39 a.m. UTC | #2
On Thu, Mar 21, 2024 at 04:14:36PM +0800, Xu Yang wrote:
> There are 2 USB controllers on i.MX93. Add them.
> 
> Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # TQMa9352LA/CA
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> 
> ---
> Changes in v2:
>  - fix format as suggested by Alexander
>  - change compatible from fsl,imx8mm-usb to fsl,imx93-usb
> Changes in v3:
>  - replace deprecated fsl,usbphy with phys as suggested by Alexander
>  - reorder nodes
> Changes in v4:
>  - fix the alignment
> Changes in v5:
>  - rename usb_wakeup_clk to usb_wakeup
> Changes in v6:
>  - rename usb_ctrl_root_clk to usb_ctrl_root
> Changes in v7:
>  - no changes
> Changes in v8:
>  - no changes
> Changes in v9:
>  - no changes
> Changes in v10:
>  - no changes
> ---
>  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
> index 8f2e7c42ad6e..4a7efccb4f67 100644
> --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> @@ -183,6 +183,20 @@ mqs2: mqs2 {
>  		status = "disabled";
>  	};
>  
> +	usbphynop1: usbphynop1 {
> +		compatible = "usb-nop-xceiv";
> +		#phy-cells = <0>;
> +		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> +		clock-names = "main_clk";
> +	};
> +
> +	usbphynop2: usbphynop2 {
> +		compatible = "usb-nop-xceiv";
> +		#phy-cells = <0>;
> +		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> +		clock-names = "main_clk";
> +	};
> +
>  	soc@0 {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> @@ -1167,6 +1181,50 @@ media_blk_ctrl: system-controller@4ac10000 {
>  			status = "disabled";
>  		};
>  
> +		usbotg1: usb@4c100000 {
> +			compatible = "fsl,imx93-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
> +			reg = <0x4c100000 0x200>;
> +			interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> +				 <&clk IMX93_CLK_HSIO_32K_GATE>;
> +			clock-names = "usb_ctrl_root", "usb_wakeup";
> +			assigned-clocks = <&clk IMX93_CLK_HSIO>;
> +			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> +			assigned-clock-rates = <133000000>;
> +			phys = <&usbphynop1>;
> +			fsl,usbmisc = <&usbmisc1 0>;
> +			status = "disabled";
> +		};
> +
> +		usbmisc1: usbmisc@4c100200 {
> +			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
> +				     "fsl,imx6q-usbmisc";
> +			reg = <0x4c100200 0x200>;
> +			#index-cells = <1>;

Do we still need this '#index-cells' property?  I see it's being marked
as deprecated in bindings doc.

Shawn

> +		};
> +
> +		usbotg2: usb@4c200000 {
> +			compatible = "fsl,imx93-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
> +			reg = <0x4c200000 0x200>;
> +			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> +				 <&clk IMX93_CLK_HSIO_32K_GATE>;
> +			clock-names = "usb_ctrl_root", "usb_wakeup";
> +			assigned-clocks = <&clk IMX93_CLK_HSIO>;
> +			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> +			assigned-clock-rates = <133000000>;
> +			phys = <&usbphynop2>;
> +			fsl,usbmisc = <&usbmisc2 0>;
> +			status = "disabled";
> +		};
> +
> +		usbmisc2: usbmisc@4c200200 {
> +			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
> +				     "fsl,imx6q-usbmisc";
> +			reg = <0x4c200200 0x200>;
> +			#index-cells = <1>;
> +		};
> +
>  		ddr-pmu@4e300dc0 {
>  			compatible = "fsl,imx93-ddr-pmu";
>  			reg = <0x4e300dc0 0x200>;
> -- 
> 2.34.1
>
Xu Yang April 2, 2024, 10:20 a.m. UTC | #3
> 
> On Thu, Mar 21, 2024 at 04:14:30PM +0800, Xu Yang wrote:
> > Add USB nodes on i.MX8ULP platform which has 2 USB controllers.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> >
> > ---
> > Changes in v2:
> >  - no changes
> > Changes in v3:
> >  - no changes
> > Changes in v4:
> >  - no changes
> > Changes in v5:
> >  - no changes
> > Changes in v6:
> >  - drop usbphy aliases
> > Changes in v7:
> >  - no changes
> > Changes in v8:
> >  - no changes
> > Changes in v9:
> >  - no changes
> > Changes in v10:
> >  - no changes
> > ---
> >  arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 62 ++++++++++++++++++++++
> >  1 file changed, 62 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > index c4a0082f30d3..7da9461a5745 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > @@ -472,6 +472,68 @@ usdhc2: mmc@298f0000 {
> >                               status = "disabled";
> >                       };
> >
> > +                     usbotg1: usb@29900000 {
> > +                             compatible = "fsl,imx8ulp-usb", "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
> > +                             reg = <0x29900000 0x200>;
> > +                             interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
> > +                             clocks = <&pcc4 IMX8ULP_CLK_USB0>;
> > +                             power-domains = <&scmi_devpd IMX8ULP_PD_USB0>;
> > +                             phys = <&usbphy1>;
> > +                             fsl,usbmisc = <&usbmisc1 0>;
> > +                             ahb-burst-config = <0x0>;
> > +                             tx-burst-size-dword = <0x8>;
> > +                             rx-burst-size-dword = <0x8>;
> > +                             status = "disabled";
> > +                     };
> > +
> > +                     usbmisc1: usbmisc@29900200 {
> > +                             compatible = "fsl,imx8ulp-usbmisc", "fsl,imx7d-usbmisc",
> > +                                             "fsl,imx6q-usbmisc";
> > +                             #index-cells = <1>;
> > +                             reg = <0x29900200 0x200>;
> 
> Could you move 'reg' above so that it's after compatible?

Okay.

> 
> > +                             status = "disabled";
> > +                     };
> > +
> > +                     usbphy1: usb-phy@29910000 {
> > +                             compatible = "fsl,imx8ulp-usbphy", "fsl,imx7ulp-usbphy";
> > +                             reg = <0x29910000 0x10000>;
> > +                             interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
> > +                             clocks = <&pcc4 IMX8ULP_CLK_USB0_PHY>;
> > +                             #phy-cells = <0>;
> > +                             status = "disabled";
> > +                     };
> > +
> > +                     usbotg2: usb@29920000 {
> > +                             compatible = "fsl,imx8ulp-usb", "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
> > +                             reg = <0x29920000 0x200>;
> > +                             interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> > +                             clocks = <&pcc4 IMX8ULP_CLK_USB1>;
> > +                             power-domains = <&scmi_devpd IMX8ULP_PD_USDHC2_USB1>;
> > +                             phys = <&usbphy2>;
> > +                             fsl,usbmisc = <&usbmisc2 0>;
> > +                             ahb-burst-config = <0x0>;
> > +                             tx-burst-size-dword = <0x8>;
> > +                             rx-burst-size-dword = <0x8>;
> > +                             status = "disabled";
> > +                     };
> > +
> > +                     usbmisc2: usbmisc@29920200 {
> > +                             compatible = "fsl,imx8ulp-usbmisc", "fsl,imx7d-usbmisc",
> > +                                             "fsl,imx6q-usbmisc";
> > +                             #index-cells = <1>;
> > +                             reg = <0x29920200 0x200>;
> 
> Ditto

Okay.

Thanks,
Xu Yang

> 
> Shawn
> 
> > +                             status = "disabled";
> > +                     };
> > +
> > +                     usbphy2: usb-phy@29930000 {
> > +                             compatible = "fsl,imx8ulp-usbphy", "fsl,imx7ulp-usbphy";
> > +                             reg = <0x29930000 0x10000>;
> > +                             interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
> > +                             clocks = <&pcc4 IMX8ULP_CLK_USB1_PHY>;
> > +                             #phy-cells = <0>;
> > +                             status = "disabled";
> > +                     };
> > +
> >                       fec: ethernet@29950000 {
> >                               compatible = "fsl,imx8ulp-fec", "fsl,imx6ul-fec", "fsl,imx6q-fec";
> >                               reg = <0x29950000 0x10000>;
> > --
> > 2.34.1
> >
Xu Yang April 2, 2024, 10:57 a.m. UTC | #4
Hi Shawn,

> 
> On Thu, Mar 21, 2024 at 04:14:36PM +0800, Xu Yang wrote:
> > There are 2 USB controllers on i.MX93. Add them.
> >
> > Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # TQMa9352LA/CA
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> >
> > ---
> > Changes in v2:
> >  - fix format as suggested by Alexander
> >  - change compatible from fsl,imx8mm-usb to fsl,imx93-usb
> > Changes in v3:
> >  - replace deprecated fsl,usbphy with phys as suggested by Alexander
> >  - reorder nodes
> > Changes in v4:
> >  - fix the alignment
> > Changes in v5:
> >  - rename usb_wakeup_clk to usb_wakeup
> > Changes in v6:
> >  - rename usb_ctrl_root_clk to usb_ctrl_root
> > Changes in v7:
> >  - no changes
> > Changes in v8:
> >  - no changes
> > Changes in v9:
> >  - no changes
> > Changes in v10:
> >  - no changes
> > ---
> >  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
> >  1 file changed, 58 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > index 8f2e7c42ad6e..4a7efccb4f67 100644
> > --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > @@ -183,6 +183,20 @@ mqs2: mqs2 {
> >               status = "disabled";
> >       };
> >
> > +     usbphynop1: usbphynop1 {
> > +             compatible = "usb-nop-xceiv";
> > +             #phy-cells = <0>;
> > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > +             clock-names = "main_clk";
> > +     };
> > +
> > +     usbphynop2: usbphynop2 {
> > +             compatible = "usb-nop-xceiv";
> > +             #phy-cells = <0>;
> > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > +             clock-names = "main_clk";
> > +     };
> > +
> >       soc@0 {
> >               compatible = "simple-bus";
> >               #address-cells = <1>;
> > @@ -1167,6 +1181,50 @@ media_blk_ctrl: system-controller@4ac10000 {
> >                       status = "disabled";
> >               };
> >
> > +             usbotg1: usb@4c100000 {
> > +                     compatible = "fsl,imx93-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
> > +                     reg = <0x4c100000 0x200>;
> > +                     interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > +                     clock-names = "usb_ctrl_root", "usb_wakeup";
> > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > +                     assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > +                     assigned-clock-rates = <133000000>;
> > +                     phys = <&usbphynop1>;
> > +                     fsl,usbmisc = <&usbmisc1 0>;
> > +                     status = "disabled";
> > +             };
> > +
> > +             usbmisc1: usbmisc@4c100200 {
> > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
> > +                                  "fsl,imx6q-usbmisc";
> > +                     reg = <0x4c100200 0x200>;
> > +                     #index-cells = <1>;
> 
> Do we still need this '#index-cells' property?  I see it's being marked
> as deprecated in bindings doc.

Sorry, the driver still needs fetch the value of this property so far. Otherwise,
the driver will probe failed. We still need some time to totally retire this property. 

Thanks,
Xu Yang

> 
> Shawn
> 
> > +             };
> > +
> > +             usbotg2: usb@4c200000 {
> > +                     compatible = "fsl,imx93-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
> > +                     reg = <0x4c200000 0x200>;
> > +                     interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > +                     clock-names = "usb_ctrl_root", "usb_wakeup";
> > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > +                     assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > +                     assigned-clock-rates = <133000000>;
> > +                     phys = <&usbphynop2>;
> > +                     fsl,usbmisc = <&usbmisc2 0>;
> > +                     status = "disabled";
> > +             };
> > +
> > +             usbmisc2: usbmisc@4c200200 {
> > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
> > +                                  "fsl,imx6q-usbmisc";
> > +                     reg = <0x4c200200 0x200>;
> > +                     #index-cells = <1>;
> > +             };
> > +
> >               ddr-pmu@4e300dc0 {
> >                       compatible = "fsl,imx93-ddr-pmu";
> >                       reg = <0x4e300dc0 0x200>;
> > --
> > 2.34.1
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/fsl,usbmisc.yaml b/Documentation/devicetree/bindings/usb/fsl,usbmisc.yaml
index 2d3589d284b2..0a6e7ac1b37e 100644
--- a/Documentation/devicetree/bindings/usb/fsl,usbmisc.yaml
+++ b/Documentation/devicetree/bindings/usb/fsl,usbmisc.yaml
@@ -33,6 +33,7 @@  properties:
               - fsl,imx7ulp-usbmisc
               - fsl,imx8mm-usbmisc
               - fsl,imx8mn-usbmisc
+              - fsl,imx8ulp-usbmisc
           - const: fsl,imx7d-usbmisc
           - const: fsl,imx6q-usbmisc
       - items: