diff mbox series

[v4,6/8] ARM: dts: imx7ulp: add imx7ulp USBOTG1 support

Message ID 20190614093544.11730-7-peter.chen@nxp.com (mailing list archive)
State Superseded
Headers show
Series Add imx7ulp USBOTG1 support | expand

Commit Message

Peter Chen June 14, 2019, 9:35 a.m. UTC
Add imx7ulp USBOTG1 support.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/boot/dts/imx7ulp.dtsi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Sergei Shtylyov June 15, 2019, 9:03 a.m. UTC | #1
On 14.06.2019 12:35, Peter Chen wrote:

> Add imx7ulp USBOTG1 support.
> 
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>   arch/arm/boot/dts/imx7ulp.dtsi | 28 ++++++++++++++++++++++++++++
>   1 file changed, 28 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi
> index fca6e50f37c8..5115e47715c3 100644
> --- a/arch/arm/boot/dts/imx7ulp.dtsi
> +++ b/arch/arm/boot/dts/imx7ulp.dtsi
> @@ -30,6 +30,7 @@
>   		serial1 = &lpuart5;
>   		serial2 = &lpuart6;
>   		serial3 = &lpuart7;
> +		usbphy0 = &usbphy1;

    Is that really needed?

[...]
> @@ -133,6 +134,33 @@
[...]
> +		usbphy1: usbphy@0x40350000 {

    Name it "usb-phy@40350000" please.

> +			compatible = "fsl,imx7ulp-usbphy", "fsl,imx6ul-usbphy";
> +			reg = <0x40350000 0x1000>;
> +			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&pcc2 IMX7ULP_CLK_USB_PHY>;
> +			#phy-cells = <0>;
> +		};
> +
>   		usdhc0: mmc@40370000 {
>   			compatible = "fsl,imx7ulp-usdhc", "fsl,imx6sx-usdhc";
>   			reg = <0x40370000 0x10000>;
> 

MBR, Sergei
Peter Chen June 17, 2019, 1:13 a.m. UTC | #2
> >
> > Signed-off-by: Peter Chen <peter.chen@nxp.com>
> > ---
> >   arch/arm/boot/dts/imx7ulp.dtsi | 28 ++++++++++++++++++++++++++++
> >   1 file changed, 28 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/imx7ulp.dtsi
> > b/arch/arm/boot/dts/imx7ulp.dtsi index fca6e50f37c8..5115e47715c3
> > 100644
> > --- a/arch/arm/boot/dts/imx7ulp.dtsi
> > +++ b/arch/arm/boot/dts/imx7ulp.dtsi
> > @@ -30,6 +30,7 @@
> >   		serial1 = &lpuart5;
> >   		serial2 = &lpuart6;
> >   		serial3 = &lpuart7;
> > +		usbphy0 = &usbphy1;
> 
>     Is that really needed?
> 

Yes, since the driver code uses aligned id, and the controller number is from 0 at the code.
I commented it here: [1]

> [...]
> > @@ -133,6 +134,33 @@
> [...]
> > +		usbphy1: usbphy@0x40350000 {
> 
>     Name it "usb-phy@40350000" please.
> 

Would you please list binding doc for your suggestion?

Thanks,
Peter

[1] https://patchwork.kernel.org/patch/10920599/
Sergei Shtylyov June 17, 2019, 4:05 p.m. UTC | #3
Hello!

On 06/17/2019 04:13 AM, Peter Chen wrote:

[...]
>>> Signed-off-by: Peter Chen <peter.chen@nxp.com>
>>> ---
>>>   arch/arm/boot/dts/imx7ulp.dtsi | 28 ++++++++++++++++++++++++++++
>>>   1 file changed, 28 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/imx7ulp.dtsi
>>> b/arch/arm/boot/dts/imx7ulp.dtsi index fca6e50f37c8..5115e47715c3
>>> 100644
>>> --- a/arch/arm/boot/dts/imx7ulp.dtsi
>>> +++ b/arch/arm/boot/dts/imx7ulp.dtsi
>>> @@ -30,6 +30,7 @@
>>>   		serial1 = &lpuart5;
>>>   		serial2 = &lpuart6;
>>>   		serial3 = &lpuart7;
>>> +		usbphy0 = &usbphy1;
>>
>>     Is that really needed?

> Yes, since the driver code uses aligned id, and the controller number is from 0 at the code.
> I commented it here: [1]

   Fair enough...

>> [...]
>>> @@ -133,6 +134,33 @@
>> [...]
>>> +		usbphy1: usbphy@0x40350000 {
>>
>>     Name it "usb-phy@40350000" please.
>>
> 
> Would you please list binding doc for your suggestion?

   The DT spec v0.2, section 2.2.2:

https://github.com/devicetree-org/devicetree-specification/releases/download/v0.2/devicetree-specification-v0.2.pdf

> 
> Thanks,
> Peter
> 
> [1] https://patchwork.kernel.org/patch/10920599/

MBR, Sergei
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi
index fca6e50f37c8..5115e47715c3 100644
--- a/arch/arm/boot/dts/imx7ulp.dtsi
+++ b/arch/arm/boot/dts/imx7ulp.dtsi
@@ -30,6 +30,7 @@ 
 		serial1 = &lpuart5;
 		serial2 = &lpuart6;
 		serial3 = &lpuart7;
+		usbphy0 = &usbphy1;
 	};
 
 	cpus {
@@ -133,6 +134,33 @@ 
 			clock-names = "ipg", "per";
 		};
 
+		usbotg1: usb@40330000 {
+			compatible = "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
+			reg = <0x40330000 0x200>;
+			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&pcc2 IMX7ULP_CLK_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@40330200 {
+			compatible = "fsl,imx7ulp-usbmisc", "fsl,imx7d-usbmisc";
+			#index-cells = <1>;
+			reg = <0x40330200 0x200>;
+		};
+
+		usbphy1: usbphy@0x40350000 {
+			compatible = "fsl,imx7ulp-usbphy", "fsl,imx6ul-usbphy";
+			reg = <0x40350000 0x1000>;
+			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&pcc2 IMX7ULP_CLK_USB_PHY>;
+			#phy-cells = <0>;
+		};
+
 		usdhc0: mmc@40370000 {
 			compatible = "fsl,imx7ulp-usdhc", "fsl,imx6sx-usdhc";
 			reg = <0x40370000 0x10000>;