lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6d485ee7-9b8a-626e-da8a-bbff37bcde61@baylibre.com>
Date:   Mon, 3 Jul 2023 17:51:03 +0200
From:   Julien Panis <jpanis@...libre.com>
To:     Roger Quadros <rogerq@...nel.org>, Tony Lindgren <tony@...mide.com>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>, linux-omap@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        vigneshr@...com, nm@...com, Tom Rini <trini@...sulko.com>
Subject: Re: [PATCH 0/3] Configure usb0 as peripheral on am335x boards

On 7/3/23 17:27, Roger Quadros wrote:
>
> On 03/07/2023 17:14, Julien Panis wrote:
>> On 7/3/23 15:44, Roger Quadros wrote:
>>> On 03/07/2023 14:56, Julien Panis wrote:
>>>> On 6/30/23 21:40, Roger Quadros wrote:
>>>>> Hi,
>>>>>
>>>>> On 30/06/2023 11:30, Julien Panis wrote:
>>>>>> Hello Tony,
>>>>>>
>>>>>> On 6/30/23 09:20, Tony Lindgren wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> * Julien Panis <jpanis@...libre.com> [230629 13:10]:
>>>>>>>> This series configures usb0 dr_mode as 'peripheral' for am335x-evm,
>>>>>>>> am335x-evmsk, and am335x-icev2. This USB port is mainly used for
>>>>>>>> RNDIS and DFU.
>>>>>>> Is this a mini-B connector? Just wondering if it was originally attempted
>>>>>>> to be configured as OTG or how it ended up with a host configuration..
>>>>>> It's a micro USB-AB connector.
>>>>>> I don't know how it ended up with a host configuration, it looks like an oversight.
>>>>>> Maybe Vignesh or Nishanth can confirm (?)
>>>>> usb0 role should be "otg".
>>>>> It is rightly so in Linux DT. am33xx.dtsi contains "otg" and all AM335x board files inherit from it.
>>>>>
>>>>> So I don't think setting it to "peripheral" in u-boot is the right thing to do.
>>>> This series is for kernel (not for u-boot).
>>>> Why is it a problem to set usb0 as 'peripheral' in kernel for the 3 board dts ?
>>>>
>>>> With usb0 not set as 'peripheral', the 3 boards (am335x-evm, evm-sk, icev2)
>>>> do not boot with uboot 2023.04. This error is returned, with LOG_LEVEL=5:
>>>>       No USB device found
>>>>       USB ether init failed
>>>>       initcall sequence 8ffdbba4 failed at call 808024d9 (err=-19)
>>>>       ### ERROR ### Please RESET the board ###
>>>> This error is also returned with usb0 as 'otg'.
>>> This error is at u-boot correct? This will need further investigation.
>>>
>>> Does it function correctly in Linux when kept as 'otg'?
>>>
>> This error is at u-boot level, indeed. I add Tom Rini to this thread, since he
>> was involved in the discussion here:
>> https://lore.kernel.org/all/20230621-fix_usb_ether_init-v2-0-ff121f0e8d7a@baylibre.com/
>> If dr_mode is set as 'peripheral' in '<board>-u-boot.dtsi' and kept as 'otg'
>> in linux, it functions correctly in linux.
> OK.
>
> So NAK for this patch series as we don't want to break 'otg' on Linux.
>
> u-boot doesn't support 'otg' mode. So we need to force it either to
> 'peripheral' or 'host'.
>
> One solution would be to have 'peripheral' in am335x-*-u-boot.dts?
>

OK. In other words, we just need to reconsider my previous u-boot series. :-)
I was setting usb0 as 'peripheral' in 'am335x-*-u-boot.dts' here:
https://lore.kernel.org/all/20230621-fix_usb_ether_init-v2-0-ff121f0e8d7a@baylibre.com/

Julien

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ