All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Fix 'no USB device found' error.
@ 2023-07-06 10:40 Julien Panis
  2023-07-06 10:40 ` [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral Julien Panis
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Julien Panis @ 2023-07-06 10:40 UTC (permalink / raw)
  To: u-boot, Marek Vasut, trini, tony, rogerq; +Cc: vigneshr, nm, Julien Panis

This series fixes the "No USB device found" error
for am335x-icev2 and am335x-evmsk. USB0 dual-role
feature is now handled as peripheral only in the
driver.

The error was not produced for am335x-evm because
usb0 dr_mode was configured as peripheral in
'am335x-evm-u-boot.dtsi'. This fragment is no
longer needed.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
---
Changes in v4:
- Handle usb dual-role feature as peripheral in ti-musb driver.
- Link to v3: https://lore.kernel.org/r/20230621-fix_usb_ether_init-v3-1-40493e1d7c0b@baylibre.com

Changes in v3:
- Remove usb0 dr_mode configuration from 'am335x-evm-u-boot.dtsi'.
- Link to v2: https://lore.kernel.org/r/20230621-fix_usb_ether_init-v2-0-ff121f0e8d7a@baylibre.com

Changes in v2:
- Drop the modification made in arch/arm/mach-omap2/am33xx/board.c
- Configure usb0 dr_mode as peripheral in 'am335x-icev2-u-boot.dtsi'
  and 'am335x-evmsk-u-boot.dtsi' device trees.
- Link to v1: https://lore.kernel.org/r/20230621-fix_usb_ether_init-v1-1-2156923994a9@baylibre.com

---
Julien Panis (2):
      musb-new: ti-musb: Handle usb dual-role feature as peripheral
      arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration

 arch/arm/dts/am335x-evm-u-boot.dtsi | 4 ----
 drivers/usb/musb-new/ti-musb.c      | 1 +
 2 files changed, 1 insertion(+), 4 deletions(-)
---
base-commit: 19b77d3d23966a0d6dbb3c86187765f11100fb6f
change-id: 20230621-fix_usb_ether_init-4bf4f1135113

Best regards,
-- 
Julien Panis <jpanis@baylibre.com>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
  2023-07-06 10:40 [PATCH v4 0/2] Fix 'no USB device found' error Julien Panis
@ 2023-07-06 10:40 ` Julien Panis
  2023-07-06 11:16   ` Tony Lindgren
                     ` (2 more replies)
  2023-07-06 10:40 ` [PATCH v4 2/2] arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration Julien Panis
  2023-07-06 14:07 ` [PATCH v4 0/2] Fix 'no USB device found' error Roger Quadros
  2 siblings, 3 replies; 12+ messages in thread
From: Julien Panis @ 2023-07-06 10:40 UTC (permalink / raw)
  To: u-boot, Marek Vasut, trini, tony, rogerq; +Cc: vigneshr, nm, Julien Panis

This prevents from getting some 'No USB device found' error,
in usb_ether_init() function for instance.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
---
 drivers/usb/musb-new/ti-musb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 3be3f93dd85d..44697dc31387 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
 		dr_mode = usb_get_dr_mode(node);
 		switch (dr_mode) {
 		case USB_DR_MODE_PERIPHERAL:
+		case USB_DR_MODE_OTG:
 			/* Bind MUSB device */
 			ret = device_bind_driver_to_node(parent,
 							 "ti-musb-peripheral",

-- 
2.37.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v4 2/2] arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration
  2023-07-06 10:40 [PATCH v4 0/2] Fix 'no USB device found' error Julien Panis
  2023-07-06 10:40 ` [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral Julien Panis
@ 2023-07-06 10:40 ` Julien Panis
  2023-07-06 12:39   ` Nishanth Menon
  2023-07-06 14:07 ` [PATCH v4 0/2] Fix 'no USB device found' error Roger Quadros
  2 siblings, 1 reply; 12+ messages in thread
From: Julien Panis @ 2023-07-06 10:40 UTC (permalink / raw)
  To: u-boot, Marek Vasut, trini, tony, rogerq; +Cc: vigneshr, nm, Julien Panis

USB0 dual-role feature is now handled as peripheral only
in ti-musb driver.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
---
 arch/arm/dts/am335x-evm-u-boot.dtsi | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/dts/am335x-evm-u-boot.dtsi b/arch/arm/dts/am335x-evm-u-boot.dtsi
index 82a483ae3e28..42eeca8c0499 100644
--- a/arch/arm/dts/am335x-evm-u-boot.dtsi
+++ b/arch/arm/dts/am335x-evm-u-boot.dtsi
@@ -23,10 +23,6 @@
 	status = "disabled";
 };
 
-&usb0 {
-	dr_mode = "peripheral";
-};
-
 &i2c0 {
 	bootph-all;
 };

-- 
2.37.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
  2023-07-06 10:40 ` [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral Julien Panis
@ 2023-07-06 11:16   ` Tony Lindgren
  2023-07-06 12:39   ` Nishanth Menon
  2023-08-14 17:18   ` Tom Rini
  2 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2023-07-06 11:16 UTC (permalink / raw)
  To: Julien Panis; +Cc: u-boot, Marek Vasut, trini, rogerq, vigneshr, nm

* Julien Panis <jpanis@baylibre.com> [230706 10:41]:
> This prevents from getting some 'No USB device found' error,
> in usb_ether_init() function for instance.

Looks good to me:

Reviewed-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
  2023-07-06 10:40 ` [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral Julien Panis
  2023-07-06 11:16   ` Tony Lindgren
@ 2023-07-06 12:39   ` Nishanth Menon
  2023-08-14 17:18   ` Tom Rini
  2 siblings, 0 replies; 12+ messages in thread
From: Nishanth Menon @ 2023-07-06 12:39 UTC (permalink / raw)
  To: Julien Panis; +Cc: u-boot, Marek Vasut, trini, tony, rogerq, vigneshr

On 12:40-20230706, Julien Panis wrote:
> This prevents from getting some 'No USB device found' error,
> in usb_ether_init() function for instance.
> 
> Signed-off-by: Julien Panis <jpanis@baylibre.com>
> ---
>  drivers/usb/musb-new/ti-musb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
> index 3be3f93dd85d..44697dc31387 100644
> --- a/drivers/usb/musb-new/ti-musb.c
> +++ b/drivers/usb/musb-new/ti-musb.c
> @@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
>  		dr_mode = usb_get_dr_mode(node);
>  		switch (dr_mode) {
>  		case USB_DR_MODE_PERIPHERAL:
> +		case USB_DR_MODE_OTG:
>  			/* Bind MUSB device */
>  			ret = device_bind_driver_to_node(parent,
>  							 "ti-musb-peripheral",
> 
> -- 
> 2.37.3
> 

Reviewed-by: Nishanth Menon <nm@ti.com>
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 2/2] arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration
  2023-07-06 10:40 ` [PATCH v4 2/2] arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration Julien Panis
@ 2023-07-06 12:39   ` Nishanth Menon
  0 siblings, 0 replies; 12+ messages in thread
From: Nishanth Menon @ 2023-07-06 12:39 UTC (permalink / raw)
  To: Julien Panis; +Cc: u-boot, Marek Vasut, trini, tony, rogerq, vigneshr

On 12:40-20230706, Julien Panis wrote:
> USB0 dual-role feature is now handled as peripheral only
> in ti-musb driver.
> 
> Signed-off-by: Julien Panis <jpanis@baylibre.com>
> ---
>  arch/arm/dts/am335x-evm-u-boot.dtsi | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/arm/dts/am335x-evm-u-boot.dtsi b/arch/arm/dts/am335x-evm-u-boot.dtsi
> index 82a483ae3e28..42eeca8c0499 100644
> --- a/arch/arm/dts/am335x-evm-u-boot.dtsi
> +++ b/arch/arm/dts/am335x-evm-u-boot.dtsi
> @@ -23,10 +23,6 @@
>  	status = "disabled";
>  };
>  
> -&usb0 {
> -	dr_mode = "peripheral";
> -};
> -
>  &i2c0 {
>  	bootph-all;
>  };
> 
> -- 
> 2.37.3
> 
Reviewed-by: Nishanth Menon <nm@ti.com>

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 0/2] Fix 'no USB device found' error.
  2023-07-06 10:40 [PATCH v4 0/2] Fix 'no USB device found' error Julien Panis
  2023-07-06 10:40 ` [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral Julien Panis
  2023-07-06 10:40 ` [PATCH v4 2/2] arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration Julien Panis
@ 2023-07-06 14:07 ` Roger Quadros
  2 siblings, 0 replies; 12+ messages in thread
From: Roger Quadros @ 2023-07-06 14:07 UTC (permalink / raw)
  To: Julien Panis, u-boot, Marek Vasut, trini, tony; +Cc: vigneshr, nm

Hi Julien,

On 06/07/2023 13:40, Julien Panis wrote:
> This series fixes the "No USB device found" error
> for am335x-icev2 and am335x-evmsk. USB0 dual-role
> feature is now handled as peripheral only in the
> driver.
> 
> The error was not produced for am335x-evm because
> usb0 dr_mode was configured as peripheral in
> 'am335x-evm-u-boot.dtsi'. This fragment is no
> longer needed.
> 
> Signed-off-by: Julien Panis <jpanis@baylibre.com>
> ---
> Changes in v4:
> - Handle usb dual-role feature as peripheral in ti-musb driver.
> - Link to v3: https://lore.kernel.org/r/20230621-fix_usb_ether_init-v3-1-40493e1d7c0b@baylibre.com
> 
> Changes in v3:
> - Remove usb0 dr_mode configuration from 'am335x-evm-u-boot.dtsi'.
> - Link to v2: https://lore.kernel.org/r/20230621-fix_usb_ether_init-v2-0-ff121f0e8d7a@baylibre.com
> 
> Changes in v2:
> - Drop the modification made in arch/arm/mach-omap2/am33xx/board.c
> - Configure usb0 dr_mode as peripheral in 'am335x-icev2-u-boot.dtsi'
>   and 'am335x-evmsk-u-boot.dtsi' device trees.
> - Link to v1: https://lore.kernel.org/r/20230621-fix_usb_ether_init-v1-1-2156923994a9@baylibre.com
> 
> ---
> Julien Panis (2):
>       musb-new: ti-musb: Handle usb dual-role feature as peripheral
>       arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration

for this series:
Reviewed-by: Roger Quadros <rogerq@kernel.org>

I also see other boards doing the wrong thing. i.e. replacing 'otg' with 'peripheral'.

dra71-evm-u-boot.dtsi:	dr_mode = "peripheral";
dra72-evm-revc-u-boot.dtsi:	dr_mode = "peripheral";
dra72-evm-u-boot.dtsi:	dr_mode = "peripheral";
dra76-evm-u-boot.dtsi:	dr_mode = "peripheral";
dra7-evm-u-boot.dtsi:	dr_mode = "peripheral";
k3-am642-evm-u-boot.dtsi:	dr_mode="peripheral";
k3-am654-r5-base-board-u-boot.dtsi:	dr_mode = "peripheral";
k3-am654-r5-base-board-u-boot.dtsi:	dr_mode = "peripheral";
k3-j7200-common-proc-board-u-boot.dtsi:	dr_mode = "peripheral";
k3-j721e-common-proc-board-u-boot.dtsi:	dr_mode = "peripheral";
keystone-k2e-evm-u-boot.dtsi:		dr_mode = "peripheral";

Is this something you can fix (in dwc3 driver) as it is on similar lines ;). Thanks!

-- 
cheers,
-roger

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
  2023-07-06 10:40 ` [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral Julien Panis
  2023-07-06 11:16   ` Tony Lindgren
  2023-07-06 12:39   ` Nishanth Menon
@ 2023-08-14 17:18   ` Tom Rini
  2023-08-21  8:28     ` Julien Panis
  2 siblings, 1 reply; 12+ messages in thread
From: Tom Rini @ 2023-08-14 17:18 UTC (permalink / raw)
  To: Julien Panis; +Cc: u-boot, Marek Vasut, tony, rogerq, vigneshr, nm

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

On Thu, Jul 06, 2023 at 12:40:22PM +0200, Julien Panis wrote:

> This prevents from getting some 'No USB device found' error,
> in usb_ether_init() function for instance.
> 
> Signed-off-by: Julien Panis <jpanis@baylibre.com>
> Reviewed-by: Tony Lindgren <tony@atomide.com>
> Reviewed-by: Nishanth Menon <nm@ti.com>
> ---
>  drivers/usb/musb-new/ti-musb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
> index 3be3f93dd85d..44697dc31387 100644
> --- a/drivers/usb/musb-new/ti-musb.c
> +++ b/drivers/usb/musb-new/ti-musb.c
> @@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
>  		dr_mode = usb_get_dr_mode(node);
>  		switch (dr_mode) {
>  		case USB_DR_MODE_PERIPHERAL:
> +		case USB_DR_MODE_OTG:
>  			/* Bind MUSB device */
>  			ret = device_bind_driver_to_node(parent,
>  							 "ti-musb-peripheral",

Julien, why don't we support OTG mode here instead?

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
  2023-08-14 17:18   ` Tom Rini
@ 2023-08-21  8:28     ` Julien Panis
  2023-08-21 12:16       ` Roger Quadros
  0 siblings, 1 reply; 12+ messages in thread
From: Julien Panis @ 2023-08-21  8:28 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot, Marek Vasut, tony, rogerq, vigneshr, nm

On 8/14/23 19:18, Tom Rini wrote:
> On Thu, Jul 06, 2023 at 12:40:22PM +0200, Julien Panis wrote:
>
>> This prevents from getting some 'No USB device found' error,
>> in usb_ether_init() function for instance.
>>
>> Signed-off-by: Julien Panis <jpanis@baylibre.com>
>> Reviewed-by: Tony Lindgren <tony@atomide.com>
>> Reviewed-by: Nishanth Menon <nm@ti.com>
>> ---
>>   drivers/usb/musb-new/ti-musb.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
>> index 3be3f93dd85d..44697dc31387 100644
>> --- a/drivers/usb/musb-new/ti-musb.c
>> +++ b/drivers/usb/musb-new/ti-musb.c
>> @@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
>>   		dr_mode = usb_get_dr_mode(node);
>>   		switch (dr_mode) {
>>   		case USB_DR_MODE_PERIPHERAL:
>> +		case USB_DR_MODE_OTG:
>>   			/* Bind MUSB device */
>>   			ret = device_bind_driver_to_node(parent,
>>   							 "ti-musb-peripheral",
> Julien, why don't we support OTG mode here instead?
>

Roger, can this be achieved with this controller ?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
  2023-08-21  8:28     ` Julien Panis
@ 2023-08-21 12:16       ` Roger Quadros
  2023-08-21 13:40         ` Marek Vasut
  0 siblings, 1 reply; 12+ messages in thread
From: Roger Quadros @ 2023-08-21 12:16 UTC (permalink / raw)
  To: Julien Panis, Tom Rini, Bin Liu [EP], stephan
  Cc: u-boot, Marek Vasut, tony, vigneshr, nm

Hi Julien,

On 21/08/2023 11:28, Julien Panis wrote:
> On 8/14/23 19:18, Tom Rini wrote:
>> On Thu, Jul 06, 2023 at 12:40:22PM +0200, Julien Panis wrote:
>>
>>> This prevents from getting some 'No USB device found' error,
>>> in usb_ether_init() function for instance.
>>>
>>> Signed-off-by: Julien Panis <jpanis@baylibre.com>
>>> Reviewed-by: Tony Lindgren <tony@atomide.com>
>>> Reviewed-by: Nishanth Menon <nm@ti.com>
>>> ---
>>>   drivers/usb/musb-new/ti-musb.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
>>> index 3be3f93dd85d..44697dc31387 100644
>>> --- a/drivers/usb/musb-new/ti-musb.c
>>> +++ b/drivers/usb/musb-new/ti-musb.c
>>> @@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
>>>           dr_mode = usb_get_dr_mode(node);
>>>           switch (dr_mode) {
>>>           case USB_DR_MODE_PERIPHERAL:
>>> +        case USB_DR_MODE_OTG:
>>>               /* Bind MUSB device */
>>>               ret = device_bind_driver_to_node(parent,
>>>                                "ti-musb-peripheral",
>> Julien, why don't we support OTG mode here instead?
>>
> 
> Roger, can this be achieved with this controller ?

The Controller supports OTG mode but I'm not sure of the u-boot driver.

Bin / Stephan might know.

-- 
cheers,
-roger

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
  2023-08-21 12:16       ` Roger Quadros
@ 2023-08-21 13:40         ` Marek Vasut
  2023-08-21 13:57           ` Tom Rini
  0 siblings, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2023-08-21 13:40 UTC (permalink / raw)
  To: Roger Quadros, Julien Panis, Tom Rini, Bin Liu [EP], stephan
  Cc: u-boot, tony, vigneshr, nm

On 8/21/23 14:16, Roger Quadros wrote:
> Hi Julien,
> 
> On 21/08/2023 11:28, Julien Panis wrote:
>> On 8/14/23 19:18, Tom Rini wrote:
>>> On Thu, Jul 06, 2023 at 12:40:22PM +0200, Julien Panis wrote:
>>>
>>>> This prevents from getting some 'No USB device found' error,
>>>> in usb_ether_init() function for instance.
>>>>
>>>> Signed-off-by: Julien Panis <jpanis@baylibre.com>
>>>> Reviewed-by: Tony Lindgren <tony@atomide.com>
>>>> Reviewed-by: Nishanth Menon <nm@ti.com>
>>>> ---
>>>>    drivers/usb/musb-new/ti-musb.c | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
>>>> index 3be3f93dd85d..44697dc31387 100644
>>>> --- a/drivers/usb/musb-new/ti-musb.c
>>>> +++ b/drivers/usb/musb-new/ti-musb.c
>>>> @@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
>>>>            dr_mode = usb_get_dr_mode(node);
>>>>            switch (dr_mode) {
>>>>            case USB_DR_MODE_PERIPHERAL:
>>>> +        case USB_DR_MODE_OTG:
>>>>                /* Bind MUSB device */
>>>>                ret = device_bind_driver_to_node(parent,
>>>>                                 "ti-musb-peripheral",
>>> Julien, why don't we support OTG mode here instead?
>>>
>>
>> Roger, can this be achieved with this controller ?
> 
> The Controller supports OTG mode but I'm not sure of the u-boot driver.
> 
> Bin / Stephan might know.

Surely the controller supports both Host and Peripheral mode.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral
  2023-08-21 13:40         ` Marek Vasut
@ 2023-08-21 13:57           ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2023-08-21 13:57 UTC (permalink / raw)
  To: Roger Quadros, Julien Panis, Bin Liu [EP]
  Cc: Marek Vasut, stephan, u-boot, tony, vigneshr, nm

[-- Attachment #1: Type: text/plain, Size: 1872 bytes --]

On Mon, Aug 21, 2023 at 03:40:42PM +0200, Marek Vasut wrote:
> On 8/21/23 14:16, Roger Quadros wrote:
> > Hi Julien,
> > 
> > On 21/08/2023 11:28, Julien Panis wrote:
> > > On 8/14/23 19:18, Tom Rini wrote:
> > > > On Thu, Jul 06, 2023 at 12:40:22PM +0200, Julien Panis wrote:
> > > > 
> > > > > This prevents from getting some 'No USB device found' error,
> > > > > in usb_ether_init() function for instance.
> > > > > 
> > > > > Signed-off-by: Julien Panis <jpanis@baylibre.com>
> > > > > Reviewed-by: Tony Lindgren <tony@atomide.com>
> > > > > Reviewed-by: Nishanth Menon <nm@ti.com>
> > > > > ---
> > > > >    drivers/usb/musb-new/ti-musb.c | 1 +
> > > > >    1 file changed, 1 insertion(+)
> > > > > 
> > > > > diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
> > > > > index 3be3f93dd85d..44697dc31387 100644
> > > > > --- a/drivers/usb/musb-new/ti-musb.c
> > > > > +++ b/drivers/usb/musb-new/ti-musb.c
> > > > > @@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent)
> > > > >            dr_mode = usb_get_dr_mode(node);
> > > > >            switch (dr_mode) {
> > > > >            case USB_DR_MODE_PERIPHERAL:
> > > > > +        case USB_DR_MODE_OTG:
> > > > >                /* Bind MUSB device */
> > > > >                ret = device_bind_driver_to_node(parent,
> > > > >                                 "ti-musb-peripheral",
> > > > Julien, why don't we support OTG mode here instead?
> > > > 
> > > 
> > > Roger, can this be achieved with this controller ?
> > 
> > The Controller supports OTG mode but I'm not sure of the u-boot driver.
> > 
> > Bin / Stephan might know.
> 
> Surely the controller supports both Host and Peripheral mode.

And perhaps the other half of the disconnect here is that DWC2/DWC3 at
least behave in U-Boot as Marek is asking.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-08-21 13:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06 10:40 [PATCH v4 0/2] Fix 'no USB device found' error Julien Panis
2023-07-06 10:40 ` [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral Julien Panis
2023-07-06 11:16   ` Tony Lindgren
2023-07-06 12:39   ` Nishanth Menon
2023-08-14 17:18   ` Tom Rini
2023-08-21  8:28     ` Julien Panis
2023-08-21 12:16       ` Roger Quadros
2023-08-21 13:40         ` Marek Vasut
2023-08-21 13:57           ` Tom Rini
2023-07-06 10:40 ` [PATCH v4 2/2] arm: dts: am335x-evm-u-boot: Remove usb0 mode configuration Julien Panis
2023-07-06 12:39   ` Nishanth Menon
2023-07-06 14:07 ` [PATCH v4 0/2] Fix 'no USB device found' error Roger Quadros

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.