linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Patrick Delaunay <patrick.delaunay@st.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V4 21/22] ARM: dts: stm32: Add bindings for USB on AV96
Date: Sun, 12 Apr 2020 03:54:59 +0200	[thread overview]
Message-ID: <802a7558-a902-6ea2-8dd1-562713d471fc@denx.de> (raw)
In-Reply-To: <20200411041213.GA11800@Mani-XPS-13-9360>

On 4/11/20 6:12 AM, Manivannan Sadhasivam wrote:
> On Fri, Apr 10, 2020 at 08:02:51PM +0200, Marek Vasut wrote:
>> On 4/10/20 1:34 PM, Manivannan Sadhasivam wrote:
>>> On Fri, Apr 10, 2020 at 11:16:53AM +0200, Marek Vasut wrote:
>>>> On 4/10/20 11:08 AM, Manivannan Sadhasivam wrote:
>>>>> Hi,
>>>>
>>>> Hi,
>>>>
>>>>> On Tue, Apr 07, 2020 at 08:37:50PM +0200, Marek Vasut wrote:
>>>>>> On 4/6/20 1:08 PM, Marek Vasut wrote:
>>>>>>> On 4/6/20 9:22 AM, Manivannan Sadhasivam wrote:
>>>>>>>> On Wed, Apr 01, 2020 at 03:22:36PM +0200, Marek Vasut wrote:
>>>>>>>>> Fill in the bindings for USB host and gadget on AV96.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>>>>>>>
>>>>>>>> I can't get the USB B-Micro OTG port to work with this patch. Do I need to
>>>>>>>> enable any configs other than PHY and USB DWC2 drivers?
>>>>>>>
>>>>>>> Only the DWC2 GADGET (and possibly host, for dual-role) and some gadget
>>>>>>> implementation (e.g. gadget zero).
>>>>>>
>>>>>> I think I see what doesn't work for you.
>>>>>>
>>>>>> It seems the following works on next:
>>>>>> power on -> plug in USB stick (or any other USB device) -> unplug ->
>>>>>> plug in usb host (e.g. PC)
>>>>>>
>>>>>> But this does not:
>>>>>> power on -> plug in usb host (e.g. PC)
>>>>>>  - the PC is not detected
>>>>>>
>>>>>
>>>>> Both doesn't work. I have the rndis gadget configured in userspace but plugging
>>>>> in the micro-b cable doesn't do anything.
>>>>>
>>>>>> Did that ^ ever work for you before ? I suspect this is a bug in the
>>>>>> DWC2 driver. The OTG operation there is known to be flaky at best.
>>>>>
>>>>> Not on this board. I don't recall what happended with vendor image. But I do
>>>>> have another STM32MP1 based 96Board (which will be submitted soon), there I can
>>>>> get OTG port working.
>>>>>
>>>>> But in that board a BG96 modem is connected to USB2 port on the board itself
>>>>> which gets enumerated during probe.
>>>>
>>>> But it's not configured as OTG on this other board, right ?
>>>
>>> It is configured as a OTG port. But that board has a different issue which
>>> resets the board when we connect any OTG cable to act as a host. That's not
>>> related to DWC2 or this issue btw.
>>
>> Do I misunderstand the part where you claim there is a modem connected
>> to the DWC2 ? That would mean it's in Host mode, no ?
>>
> 
> Let me make it clear. On that board, the USB connection is almost similar to
> Avenger96 except that there is only one host port used and it is connected to
> the BG96 modem onboard. The other OTG port is connected to micro-b connector.

So the BG96 modem is irrelevant, since it's connected to EHCI HCD,
different controller altogether.

> There I can _only_ get the OTG port to work in device mode. I haven't figured
> out what is the exact issue yet. So in the meantime, I may use
> 
> dr_mode = "peripheral"
> 
> to avoid it being used as host. But on Avenger96 board, the host ports are
> working but the OTG port is neither working as host nor as device.

Is there any difference in the DT between the AV96 and your custom board ?

In particular, look at
&pwr_regulators {
         vdd-supply = <&vdd_io>;
         vdd_3v3_usbfs-supply = <&vdd_usb>;
};

&usbotg_hs {} node and all the other usb* nodes.

>>> Anyway, I can't get OTG (device/host) to work on both old and new boards.
>>
>> Do you have 588-200 now too ?
>>
> 
> I have both 588-100 and 588-200 now. I told you that at the time of initial
> upstreaming I had only 588-100 but later Arrow sent me the new board.

OK good.

>> I think there is some fix in current linux-next which partly fixes the
>> DWC2 role switching, so rebase this patchset on current linux-next and
>> see what happens. But it's still not perfect. I also think that ST
>> managed to side-step this issue by using the STUSB1600 chip, but I might
>> be wrong.
> 
> Okay, I'll try for both Avenger96 and Stinger96 (yeah that's the name of the
> board I'm working on right now).

OK, so the OTG should be indeed almost identical.

Try the latest linux-next, the DWC2 behaves "better" in there. And try
plugging in some USB device first (like a USB stick), see if that's
detected.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-04-12  2:31 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 13:22 [PATCH V4 00/22] ARM: dts: stm32: Repair AV96 board Marek Vasut
2020-04-01 13:22 ` [PATCH V4 01/22] ARM: dts: stm32: Add alternate pinmux for ethernet RGMII Marek Vasut
2020-04-01 13:22 ` [PATCH V4 02/22] ARM: dts: stm32: Repair ethernet operation on AV96 Marek Vasut
2020-04-01 13:22 ` [PATCH V4 03/22] ARM: dts: stm32: Add missing ethernet PHY reset " Marek Vasut
2020-04-06  6:10   ` Manivannan Sadhasivam
2020-04-01 13:22 ` [PATCH V4 04/22] ARM: dts: stm32: Add missing ethernet PHY skews " Marek Vasut
2020-04-01 13:22 ` [PATCH V4 05/22] ARM: dts: stm32: Add alternate pinmux for SDMMC1 direction pins Marek Vasut
2020-04-01 13:22 ` [PATCH V4 06/22] ARM: dts: stm32: Repair SDMMC1 operation on AV96 Marek Vasut
2020-04-06  6:24   ` Manivannan Sadhasivam
2020-04-01 13:22 ` [PATCH V4 07/22] ARM: dts: stm32: Repair PMIC configuration " Marek Vasut
2020-04-01 13:22 ` [PATCH V4 08/22] ARM: dts: stm32: Repair PMIC interrupt " Marek Vasut
2020-04-01 13:22 ` [PATCH V4 09/22] ARM: dts: stm32: Add alternate pinmux for SDMMC2 pins 4-7 Marek Vasut
2020-04-01 13:22 ` [PATCH V4 10/22] ARM: dts: stm32: Add eMMC attached to SDMMC2 on AV96 Marek Vasut
2020-04-06  6:47   ` Manivannan Sadhasivam
2020-04-01 13:22 ` [PATCH V4 11/22] ARM: dts: stm32: Add QSPI NOR " Marek Vasut
2020-04-06  6:49   ` Manivannan Sadhasivam
2020-04-01 13:22 ` [PATCH V4 12/22] ARM: dts: stm32: Add configuration EEPROM " Marek Vasut
2020-04-01 13:22 ` [PATCH V4 13/22] ARM: dts: stm32: Add alternate pinmux for SDMMC3 pins Marek Vasut
2020-04-01 13:22 ` [PATCH V4 14/22] ARM: dts: stm32: Enable WiFi on AV96 Marek Vasut
2020-04-01 13:22 ` [PATCH V4 15/22] ARM: dts: stm32: Add alternate pinmux for USART2 pins Marek Vasut
2020-04-01 13:22 ` [PATCH V4 16/22] ARM: dts: stm32: Enable Bluetooth on AV96 Marek Vasut
2020-04-01 13:22 ` [PATCH V4 17/22] ARM: dts: stm32: Add alternate pinmux for LTDC pins Marek Vasut
2020-04-01 13:22 ` [PATCH V4 18/22] ARM: dts: stm32: Add bindings for HDMI video on AV96 Marek Vasut
2020-04-06  7:05   ` Manivannan Sadhasivam
2020-04-01 13:22 ` [PATCH V4 19/22] ARM: dts: stm32: Add alternate pinmux for SAI2 pins Marek Vasut
2020-04-01 13:22 ` [PATCH V4 20/22] ARM: dts: stm32: Add bindings for audio on AV96 Marek Vasut
2020-04-01 13:22 ` [PATCH V4 21/22] ARM: dts: stm32: Add bindings for USB " Marek Vasut
2020-04-06  7:22   ` Manivannan Sadhasivam
2020-04-06 11:08     ` Marek Vasut
2020-04-07 18:37       ` Marek Vasut
2020-04-10  9:08         ` Manivannan Sadhasivam
2020-04-10  9:16           ` Marek Vasut
2020-04-10 11:34             ` Manivannan Sadhasivam
2020-04-10 18:02               ` Marek Vasut
2020-04-11  4:12                 ` Manivannan Sadhasivam
2020-04-12  1:54                   ` Marek Vasut [this message]
2020-04-01 13:22 ` [PATCH V4 22/22] ARM: dts: stm32: Rename LEDs to match silkscreen " Marek Vasut
2020-04-06  7:24   ` Manivannan Sadhasivam
2020-04-05 14:43 ` [PATCH V4 00/22] ARM: dts: stm32: Repair AV96 board Manivannan Sadhasivam
2020-04-05 14:55   ` Marek Vasut
2020-04-05 18:37     ` Manivannan Sadhasivam
2020-04-05 20:01       ` Marek Vasut
2020-04-06  6:04         ` Manivannan Sadhasivam
2020-04-06  7:27 ` Manivannan Sadhasivam
2020-04-07 15:32   ` Marek Vasut
2020-04-10  9:00     ` Manivannan Sadhasivam
2020-04-10  9:55       ` Marek Vasut
2020-04-10 11:28         ` Manivannan Sadhasivam
2020-04-10 18:03           ` Marek Vasut
2020-04-21 10:30 ` Marek Vasut
2020-04-21 16:04   ` Alexandre Torgue
2020-04-21 17:07     ` Marek Vasut
2020-04-22  7:27       ` Alexandre Torgue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=802a7558-a902-6ea2-8dd1-562713d471fc@denx.de \
    --to=marex@denx.de \
    --cc=alexandre.torgue@st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=patrice.chotard@st.com \
    --cc=patrick.delaunay@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).