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

Roger Quadros rogerq at kernel.org
Mon Jul 10 11:58:25 CEST 2023



On 10/07/2023 11:57, Julien Panis wrote:
> 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 ?

This has to be manually done. Maybe this platform got left out?
Someone with access to K2E-EVM needs to do the sync and test if it works.
> 
>>
>> 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

-- 
cheers,
-roger


More information about the U-Boot mailing list