diff mbox series

[v5,1/8] dt-bindings: usb: usbmisc-imx: add fsl,imx8ulp-usbmisc compatible

Message ID 20240131114324.3722428-1-xu.yang_2@nxp.com
State Not Applicable, archived
Headers show
Series [v5,1/8] dt-bindings: usb: usbmisc-imx: add fsl,imx8ulp-usbmisc compatible | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Xu Yang Jan. 31, 2024, 11:43 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
---
 Documentation/devicetree/bindings/usb/fsl,usbmisc.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Rob Herring (Arm) Feb. 1, 2024, 10:51 p.m. UTC | #1
On Wed, Jan 31, 2024 at 07:43:18PM +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
> ---
>  arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 64 ++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> index c4a0082f30d3..ead1f57e08ef 100644
> --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> @@ -28,6 +28,8 @@ aliases {
>  		serial1 = &lpuart5;
>  		serial2 = &lpuart6;
>  		serial3 = &lpuart7;
> +		usbphy0 = &usbphy1;
> +		usbphy1 = &usbphy2;

Drop these. We have no use for aliases to phys.

>  	};
>  
>  	cpus {
> @@ -472,6 +474,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>;

Deprecated. Why are you using this?

Rob
Xu Yang Feb. 4, 2024, 6:42 a.m. UTC | #2
Hi Rob,

> 
> On Wed, Jan 31, 2024 at 07:43:18PM +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
> > ---
> >  arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 64 ++++++++++++++++++++++
> >  1 file changed, 64 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > index c4a0082f30d3..ead1f57e08ef 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > @@ -28,6 +28,8 @@ aliases {
> >               serial1 = &lpuart5;
> >               serial2 = &lpuart6;
> >               serial3 = &lpuart7;
> > +             usbphy0 = &usbphy1;
> > +             usbphy1 = &usbphy2;
> 
> Drop these. We have no use for aliases to phys.

Checked again. Yes, these two alias can be removed.

> 
> >       };
> >
> >       cpus {
> > @@ -472,6 +474,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>;
> 
> Deprecated. Why are you using this?

Do you mean "#index-cells"? 
We are using it all the time.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/tree/drivers/usb/chipidea/ci_hdrc_imx.c?h=linux-6.7.y#n137

Thanks,
Xu Yang
Peter Chen Feb. 5, 2024, 1:54 a.m. UTC | #3
On 24-01-31 19:43:24, Xu Yang wrote:
> The dt-bindings is going to use "usb_wakeup" as wakup clock name. This will
> align the change with dt-bindings.
> 
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> 
> ---
> Changes in v5:
>  - new patch
> ---
>  drivers/usb/chipidea/ci_hdrc_imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
> index ae9a6a17ec6e..a17b6d619305 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -212,7 +212,7 @@ static int imx_get_clks(struct device *dev)
>  		/* Get wakeup clock. Not all of the platforms need to
>  		 * handle this clock. So make it optional.
>  		 */
> -		data->clk_wakeup = devm_clk_get_optional(dev, "usb_wakeup_clk");
> +		data->clk_wakeup = devm_clk_get_optional(dev, "usb_wakeup");
>  		if (IS_ERR(data->clk_wakeup))
>  			ret = dev_err_probe(dev, PTR_ERR(data->clk_wakeup),
>  					"Failed to get wakeup clk\n");
> -- 
> 2.34.1
> 

Acked-by: Peter Chen <peter.chen@kernel.org>
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: