[PATCH 10/10] arm: dts: keystone-k2e-evm-u-boot: Remove usb1 mode configuration

Julien Panis jpanis at baylibre.com
Mon Jul 10 10:57:19 CEST 2023


Hi Roger,

On 7/10/23 09:53, Roger Quadros wrote:
> Hi Julien,
>
> On 06/07/2023 19:07, Julien Panis wrote:
>> USB1 dual-role feature is already handled as peripheral only
>> in dwc3-generic driver.
>>
>> Signed-off-by: Julien Panis <jpanis at baylibre.com>
>> ---
>>   arch/arm/dts/keystone-k2e-evm-u-boot.dtsi | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/arm/dts/keystone-k2e-evm-u-boot.dtsi b/arch/arm/dts/keystone-k2e-evm-u-boot.dtsi
>> index 970d452f0804..a75f78377c28 100644
>> --- a/arch/arm/dts/keystone-k2e-evm-u-boot.dtsi
>> +++ b/arch/arm/dts/keystone-k2e-evm-u-boot.dtsi
>> @@ -39,7 +39,6 @@
>>   &usb1 {
>>   	dwc3 at 25010000 {
>>   		phys = <&usb1_phy>;
>> -		dr_mode = "peripheral";
>>   		snps,u2ss_inp3_quirk;
>>   		status = "okay";
>>   	};
>>
> keystone-k2e.dtsi nor keystone-k2e-evm.dtsi has dr_mode set anywhere.
> In Linux, keystone-k2e-evm.dtsi has dr_mode as "peripheral".
> Can we please have the same in u-boot as well?

I can do that, but...
...shouldn't uboot dts have been sync'ed with linux dts before ?

>
> Then, from dwc3_generic_of_to_plat()
>
>          plat->dr_mode = usb_get_dr_mode(node);
>          if (plat->dr_mode == USB_DR_MODE_UNKNOWN) {
>                  /* might be a leaf so check the parent for mode */
>                  node = dev_ofnode(dev->parent);
>                  plat->dr_mode = usb_get_dr_mode(node);
>                  if (plat->dr_mode == USB_DR_MODE_UNKNOWN) {
>                          pr_err("Invalid usb mode setup\n");
>                          return -ENODEV;
>                  }
>          }
>
> I suppose that should be changed to OTG by default instead of
> complaining that it's invalid.
>
> FYI. From linux/devicetree/bindings/usb/usb-drd.yaml
>
>    dr_mode:
>      description:
>        Tells Dual-Role USB controllers that we want to work on a particular
>        mode. In case this attribute isn't passed via DT, USB DRD controllers
>        should *default to OTG*.
>

I agree with you, I'll change that.

Julien


More information about the U-Boot mailing list