mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Anand Moon <linux.amoon@gmail.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
Date: Wed, 4 Jan 2023 09:56:13 +0100	[thread overview]
Message-ID: <260b70ae-0758-592b-9c4d-90938e8a5b00@linaro.org> (raw)
In-Reply-To: <CANAwSgTc=uGyZ0H_-ZckYoKztMB--DRfx7apBtP9zAbAU1XTvA@mail.gmail.com>

On 04/01/2023 09:13, Anand Moon wrote:
> Hi Martin,
> 
> On Wed, 28 Dec 2022 at 20:14, Anand Moon <linux.amoon@gmail.com> wrote:
>>
>> Hi Martin,
>>
>> On Wed, 28 Dec 2022 at 18:21, Martin Blumenstingl
>> <martin.blumenstingl@googlemail.com> wrote:
>>>
>>> Hi Anand,
>>>
>> Thanks for your review comments.
>>
>>> thank you for working on this topic!
>>>
>>> On Wed, Dec 28, 2022 at 11:05 AM Anand Moon <linux.amoon@gmail.com> wrote:
>>> [...]
>>>> +       usb {
>>>> +               dr_mode = "host";
>>>> +               #address-cells = <1>;
>>>> +               #size-cells = <0>;
>>>> +
>>>> +               hub@1 {
>>>> +                       /* Genesys Logic GL852G-OHG usb hub */
>>>> +                       compatible = "genesys,usb5e3,610";
>>>> +                       reg = <1>;
>>>> +                       vdd-supply = <&usb_otg_pwr>;
>>>> +                       reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
>>>> +               };
>>>> +       };
>>> My understanding is that the hub@1 node should be part of the
>>> corresponding USB controller node, not a new node.
>>> In this case hub@1 should go into the existing &usb1 node. That way we
>>> describe the way the hardware is set up (meaning: hub@1 is connected
>>> to &usb1).
>>>
>>
>> Ok, I will move this code under &usb0 and &usb1 nodes.
>>
>> onboard_usb_hub module just assists in usb hub reset.
>> so these changes are meant to replace the gpio-hog.
>>
>> $ dmesg | grep onboard
>> [    5.405558] usbcore: registered new device driver onboard-usb-hub
>> [    6.383428] onboard-usb-hub 1-1: reset high-speed USB device number
>> 2 using dwc2
>>
>> Here is the boot log of the odroid c2 [0] https://pastebin.com/PFy5waPb
>>
> 
> Moving the usb hub into usb subnode usb0 or usb1 does not work
> on Odroid n2 and c4, we have a combo phys of usb 2.0 and usb 3.0
> so the onboard usb hub reset does not get initialized until both the PHY
> and USB nodes are brought up by the drivers.

Fine, then add a comment before the usb node explaining that.

Thanks,
Neil

> 
> # On Odroid n2 has a combo hub
> alarm@odroid-n2:~$ lsusb -tv
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>      ID 1d6b:0003 Linux Foundation 3.0 root hub
>      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
>          ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
>          |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
>              ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 3Gb/s bridge
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>          ID 05e3:0610 Genesys Logic, Inc. Hub
>          |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class,
> Driver=ax88179_178a, 480M
>              ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
> 
> # Odroid C4 also has a combo hub
> 
> alarm@odroid-c4:~$ lsusb -tv
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>      ID 1d6b:0003 Linux Foundation 3.0 root hub
>      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
>          ID 2109:0817 VIA Labs, Inc.
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>          ID 2109:2817 VIA Labs, Inc.
> 
> So I will continue to work with this usb hub node to do a proper reset
> of the USB hub.
> 
>>> In case hub@1 is not detected within &usb1 then you maym need something
>>> like [0] (not tested for your use-case).
>>> If that helps: feel free to include that patch in your series.
>>>
>>
>> Thanks, will check if this is needed in this case. As of now it just
>> reinitializes the hub.
>>
>>>
>>> Best regards,
>>> Martin
>>>
>>>
>>> [0] https://github.com/xdarklight/linux/commit/d8b96e5bc9c20ab2585194e0e59580c3b062c431
>>
>> Thanks
>> -Anand
> 
> Thanks
> -Anand


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

  reply	other threads:[~2023-01-04 10:35 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 10:03 [PATCH v1 00/11] Used onboard HUB to reset and add power to hub Anand Moon
2022-12-28 10:03 ` [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
2022-12-28 10:08   ` Icenowy Zheng
2022-12-28 10:29     ` Anand Moon
2023-01-04 22:54       ` Matthias Kaehlcke
2023-01-07 15:01         ` Anand Moon
2023-01-09 16:29           ` Matthias Kaehlcke
2023-01-09 17:48             ` Anand Moon
2022-12-28 15:08   ` Krzysztof Kozlowski
2022-12-28 15:18     ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 02/11] ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub Anand Moon
2022-12-28 15:08   ` Krzysztof Kozlowski
2023-01-07 14:59     ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2 Anand Moon
2022-12-28 12:51   ` Martin Blumenstingl
2022-12-28 14:44     ` Anand Moon
2023-01-04  8:13       ` Anand Moon
2023-01-04  8:56         ` Neil Armstrong [this message]
2023-01-04  9:17           ` Anand Moon
2023-01-04  9:36         ` Alexander Stein
2023-01-07 14:56           ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 04/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid n2 Anand Moon
2022-12-28 10:03 ` [PATCH v1 05/11] usb: misc: onboard_usb_hub: add Genesys Logic GL852G-OHG hub support Anand Moon
2023-01-04 20:28   ` Matthias Kaehlcke
2023-01-04 20:53     ` Matthias Kaehlcke
2023-01-07 14:56       ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 06/11] usb: misc: onboard_usb_hub: add Genesys Logic GL3523-QFN76 " Anand Moon
2023-01-04 20:43   ` Matthias Kaehlcke
2023-01-07 14:58     ` Anand Moon
2023-01-09 16:22       ` Matthias Kaehlcke
2022-12-28 10:03 ` [PATCH v1 07/11] vendor-prefixes: Add VIA Labs, Inc Anand Moon
2022-12-28 15:11   ` Krzysztof Kozlowski
2022-12-28 10:03 ` [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller Anand Moon
2022-12-28 11:02   ` Johan Hovold
2022-12-28 11:09     ` Anand Moon
2022-12-28 17:16   ` Rob Herring
2023-01-04 22:37   ` Matthias Kaehlcke
2023-01-07 15:00     ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 09/11] arm64: dts: meson-sm1-odroid-c4: Used onboard usb hub reset on odroid c4 Anand Moon
2022-12-28 10:03 ` [PATCH v1 10/11] usb: misc: onboard_usb_hub: add VIA LAB VL817Q7 hub support Anand Moon
2023-01-04 20:22   ` Matthias Kaehlcke
2023-01-07 14:59     ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 11/11] arm64: defconfig: Enable USB onboard HUB driver Anand Moon

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=260b70ae-0758-592b-9c4d-90938e8a5b00@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=robh+dt@kernel.org \
    /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

all inboxes | Powered by JetHome®