diff mbox

[U-Boot] arm: dts: imx: add aliases for usbotg nodes

Message ID 20170424212052.11496-1-lexszero@gmail.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Alexey Ignatov April 24, 2017, 9:20 p.m. UTC
Aliases must be present for USB gadget with DM_USB. Without this,
usb_setup_ehci_gadget() fails because it can't find required devices
in UCLASS_USB.

Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
---
 arch/arm/dts/imx6qdl.dtsi | 1 +
 arch/arm/dts/imx6sll.dtsi | 2 ++
 arch/arm/dts/imx6sx.dtsi  | 2 ++
 arch/arm/dts/imx6ul.dtsi  | 2 ++
 arch/arm/dts/imx6ull.dtsi | 2 ++
 5 files changed, 9 insertions(+)

Comments

Tom Rini April 26, 2017, 7:12 p.m. UTC | #1
On Tue, Apr 25, 2017 at 12:20:52AM +0300, Alexey Ignatov wrote:

> Aliases must be present for USB gadget with DM_USB. Without this,
> usb_setup_ehci_gadget() fails because it can't find required devices
> in UCLASS_USB.
> 
> Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
> ---
>  arch/arm/dts/imx6qdl.dtsi | 1 +
>  arch/arm/dts/imx6sll.dtsi | 2 ++
>  arch/arm/dts/imx6sx.dtsi  | 2 ++
>  arch/arm/dts/imx6ul.dtsi  | 2 ++
>  arch/arm/dts/imx6ull.dtsi | 2 ++
>  5 files changed, 9 insertions(+)
> 
> diff --git a/arch/arm/dts/imx6qdl.dtsi b/arch/arm/dts/imx6qdl.dtsi
> index b13b0b2db8..1253d14b18 100644
> --- a/arch/arm/dts/imx6qdl.dtsi
> +++ b/arch/arm/dts/imx6qdl.dtsi
> @@ -46,6 +46,7 @@
>  		spi3 = &ecspi4;
>  		usbphy0 = &usbphy1;
>  		usbphy1 = &usbphy2;
> +		usb0 = &usbotg1;
>  	};
>  
>  	clocks {
> diff --git a/arch/arm/dts/imx6sll.dtsi b/arch/arm/dts/imx6sll.dtsi
> index 349c47a03a..95c04edfb7 100644
> --- a/arch/arm/dts/imx6sll.dtsi
> +++ b/arch/arm/dts/imx6sll.dtsi
> @@ -37,6 +37,8 @@
>  		spi4 = &ecspi4;
>  		usbphy0 = &usbphy1;
>  		usbphy1 = &usbphy2;
> +		usb0 = &usbotg1;
> +		usb1 = &usbotg2;
>  	};
>  
>  	cpus {
> diff --git a/arch/arm/dts/imx6sx.dtsi b/arch/arm/dts/imx6sx.dtsi
> index 1a473e83ef..99e8f0a4df 100644
> --- a/arch/arm/dts/imx6sx.dtsi
> +++ b/arch/arm/dts/imx6sx.dtsi
> @@ -47,6 +47,8 @@
>  		spi4 = &ecspi5;
>  		usbphy0 = &usbphy1;
>  		usbphy1 = &usbphy2;
> +		usb0 = &usbotg1;
> +		usb1 = &usbotg2;
>  	};
>  
>  	cpus {
> diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi
> index c5c05fdccc..0b27ba85a0 100644
> --- a/arch/arm/dts/imx6ul.dtsi
> +++ b/arch/arm/dts/imx6ul.dtsi
> @@ -45,6 +45,8 @@
>  		spi3 = &ecspi4;
>  		usbphy0 = &usbphy1;
>  		usbphy1 = &usbphy2;
> +		usb0 = &usbotg1;
> +		usb1 = &usbotg2;
>  	};
>  
>  	cpus {
> diff --git a/arch/arm/dts/imx6ull.dtsi b/arch/arm/dts/imx6ull.dtsi
> index 65950e8019..61ce305428 100644
> --- a/arch/arm/dts/imx6ull.dtsi
> +++ b/arch/arm/dts/imx6ull.dtsi
> @@ -44,6 +44,8 @@
>  		spi3 = &ecspi4;
>  		usbphy0 = &usbphy1;
>  		usbphy1 = &usbphy2;
> +		usb0 = &usbotg1;
> +		usb1 = &usbotg2;
>  	};
>  
>  	cpus {

Do these come from the Linux dtsi file or are being pushed there?  If
not, you need to put it in the -u-boot.dtsi file (but really see about
pushing it upstream).  Thanks!
Sébastien Szymanski April 27, 2017, 7:53 a.m. UTC | #2
Hi,


On 04/24/2017 11:20 PM, Alexey Ignatov wrote:
> Aliases must be present for USB gadget with DM_USB. Without this,
> usb_setup_ehci_gadget() fails because it can't find required devices
> in UCLASS_USB.
> 
> Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
> ---
>  arch/arm/dts/imx6qdl.dtsi | 1 +
>  arch/arm/dts/imx6sll.dtsi | 2 ++
>  arch/arm/dts/imx6sx.dtsi  | 2 ++
>  arch/arm/dts/imx6ul.dtsi  | 2 ++

...

>  
>  	cpus {
> diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi
> index c5c05fdccc..0b27ba85a0 100644
> --- a/arch/arm/dts/imx6ul.dtsi
> +++ b/arch/arm/dts/imx6ul.dtsi
> @@ -45,6 +45,8 @@
>  		spi3 = &ecspi4;
>  		usbphy0 = &usbphy1;
>  		usbphy1 = &usbphy2;
> +		usb0 = &usbotg1;
> +		usb1 = &usbotg2;
>  	};
>  
>  	cpus {

The imx6ul.dtsi file already has usbotg{0,1} aliases.

http://git.denx.de/?p=u-boot.git;a=commit;h=b3cab814232d3b5e165c09ffad4af5b71bde15f3

Regards,
Stefano Babic May 18, 2017, 8:53 a.m. UTC | #3
On 24/04/2017 23:20, Alexey Ignatov wrote:
> Aliases must be present for USB gadget with DM_USB. Without this,
> usb_setup_ehci_gadget() fails because it can't find required devices
> in UCLASS_USB.
> 
> Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
> ---


Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
Stefano Babic May 18, 2017, 10:13 a.m. UTC | #4
On 18/05/2017 10:53, Stefano Babic wrote:
> On 24/04/2017 23:20, Alexey Ignatov wrote:
>> Aliases must be present for USB gadget with DM_USB. Without this,
>> usb_setup_ehci_gadget() fails because it can't find required devices
>> in UCLASS_USB.
>>
>> Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
>> ---
> 
> 
> Applied to u-boot-imx, thanks !
> 

Sorry, I cannot. This patch is breaking several boards with "Reference
to non-existent node or label "usbotg1"" when DTS is compiled:

opos6uldev
mx6sllevk_plugin
mx6slevk_spinor
imx6qdl_icore_rqs_mmc
...


Can you check this, please ?

Best regards,
Stefano Babic
Stefano Babic May 18, 2017, 10:26 a.m. UTC | #5
On 18/05/2017 12:28, Sébastien Szymanski wrote:
> Hi,
> 
> On 05/18/2017 12:13 PM, Stefano Babic wrote:
>> On 18/05/2017 10:53, Stefano Babic wrote:
>>> On 24/04/2017 23:20, Alexey Ignatov wrote:
>>>> Aliases must be present for USB gadget with DM_USB. Without this,
>>>> usb_setup_ehci_gadget() fails because it can't find required devices
>>>> in UCLASS_USB.
>>>>
>>>> Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
>>>> ---
>>>
>>>
>>> Applied to u-boot-imx, thanks !
>>>
>>
>> Sorry, I cannot. This patch is breaking several boards with "Reference
>> to non-existent node or label "usbotg1"" when DTS is compiled:
>>
>> opos6uldev
>> mx6sllevk_plugin
>> mx6slevk_spinor
>> imx6qdl_icore_rqs_mmc
>> ...
>>
> 
> It looks like my comment has been missed.
> The imx6ul.dtsi file already has usbotg{0,1} aliases.

Yes, sorry, I have missed them. Thanks for pointing me in the right
direction.

Regards,
Stefano
Sébastien Szymanski May 18, 2017, 10:28 a.m. UTC | #6
Hi,

On 05/18/2017 12:13 PM, Stefano Babic wrote:
> On 18/05/2017 10:53, Stefano Babic wrote:
>> On 24/04/2017 23:20, Alexey Ignatov wrote:
>>> Aliases must be present for USB gadget with DM_USB. Without this,
>>> usb_setup_ehci_gadget() fails because it can't find required devices
>>> in UCLASS_USB.
>>>
>>> Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
>>> ---
>>
>>
>> Applied to u-boot-imx, thanks !
>>
> 
> Sorry, I cannot. This patch is breaking several boards with "Reference
> to non-existent node or label "usbotg1"" when DTS is compiled:
> 
> opos6uldev
> mx6sllevk_plugin
> mx6slevk_spinor
> imx6qdl_icore_rqs_mmc
> ...
> 

It looks like my comment has been missed.
The imx6ul.dtsi file already has usbotg{0,1} aliases.

Regards,

> 
> Can you check this, please ?
> 
> Best regards,
> Stefano Babic
> 
>
diff mbox

Patch

diff --git a/arch/arm/dts/imx6qdl.dtsi b/arch/arm/dts/imx6qdl.dtsi
index b13b0b2db8..1253d14b18 100644
--- a/arch/arm/dts/imx6qdl.dtsi
+++ b/arch/arm/dts/imx6qdl.dtsi
@@ -46,6 +46,7 @@ 
 		spi3 = &ecspi4;
 		usbphy0 = &usbphy1;
 		usbphy1 = &usbphy2;
+		usb0 = &usbotg1;
 	};
 
 	clocks {
diff --git a/arch/arm/dts/imx6sll.dtsi b/arch/arm/dts/imx6sll.dtsi
index 349c47a03a..95c04edfb7 100644
--- a/arch/arm/dts/imx6sll.dtsi
+++ b/arch/arm/dts/imx6sll.dtsi
@@ -37,6 +37,8 @@ 
 		spi4 = &ecspi4;
 		usbphy0 = &usbphy1;
 		usbphy1 = &usbphy2;
+		usb0 = &usbotg1;
+		usb1 = &usbotg2;
 	};
 
 	cpus {
diff --git a/arch/arm/dts/imx6sx.dtsi b/arch/arm/dts/imx6sx.dtsi
index 1a473e83ef..99e8f0a4df 100644
--- a/arch/arm/dts/imx6sx.dtsi
+++ b/arch/arm/dts/imx6sx.dtsi
@@ -47,6 +47,8 @@ 
 		spi4 = &ecspi5;
 		usbphy0 = &usbphy1;
 		usbphy1 = &usbphy2;
+		usb0 = &usbotg1;
+		usb1 = &usbotg2;
 	};
 
 	cpus {
diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi
index c5c05fdccc..0b27ba85a0 100644
--- a/arch/arm/dts/imx6ul.dtsi
+++ b/arch/arm/dts/imx6ul.dtsi
@@ -45,6 +45,8 @@ 
 		spi3 = &ecspi4;
 		usbphy0 = &usbphy1;
 		usbphy1 = &usbphy2;
+		usb0 = &usbotg1;
+		usb1 = &usbotg2;
 	};
 
 	cpus {
diff --git a/arch/arm/dts/imx6ull.dtsi b/arch/arm/dts/imx6ull.dtsi
index 65950e8019..61ce305428 100644
--- a/arch/arm/dts/imx6ull.dtsi
+++ b/arch/arm/dts/imx6ull.dtsi
@@ -44,6 +44,8 @@ 
 		spi3 = &ecspi4;
 		usbphy0 = &usbphy1;
 		usbphy1 = &usbphy2;
+		usb0 = &usbotg1;
+		usb1 = &usbotg2;
 	};
 
 	cpus {