Message ID | 20230118044418.875-8-linux.amoon@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2143766wrn; Tue, 17 Jan 2023 20:48:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXsmmq0j4zxYNIBnrXEt0fcY2OkEByNhzTIhunoriWTDi2Dfyo3gr75nB4coFIzKlfe/sslV X-Received: by 2002:a05:6402:e9c:b0:47e:eaae:9a69 with SMTP id h28-20020a0564020e9c00b0047eeaae9a69mr5626523eda.41.1674017317587; Tue, 17 Jan 2023 20:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674017317; cv=none; d=google.com; s=arc-20160816; b=RkQeYWIacyTX2TY/n2mXsZFVH+XKB9J3BaSTBHFoL+eq0woMZp1RzmxIfMwtQhHwvQ Gi6AFJEP9gCtHc7tow9o6rZ+uyDJPN8pbcw0qhiSHGEYAbZdgLmrLzYZNcscwbsrM5iO r48jq7XZWIONjZfbSxFWS0fixPS5o31DRPCMPDTi+kNheYaZ/+qUcfTwLyivv4nVKqW1 y8xpSerRZadRHcf4j6bIPImEkMqX0kFZEIlNl0EEsLMFTn0mFbklWsouUz2p1Wp2QLOs wQPbMM2dUqJjj6Q4vaI9NQXSijSlzdfLd8vR9+IFwTyRSD8U6y5AzyRW1ULOD0V/eP4f 6eaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PqdFnWHjWAHKmuM+PoO/HnCy2n74on+Ymq3rYfqeAJE=; b=ZjkMX0S25valZ3O25uc22/NkSOaVU8+R+reEyHcF6M/q/IxU3W/qDnH9MPIhx4KYDb SpN2UhGvfck84G2xnAqGDV3Ziq+jaQsxQj83ZQiYGF6VQ4PEe/p6Q5bklU+J49E5wpcS SSzTZWMJVu3vPhb2eJ7eTrevbIM3Sj83T5FNi2C9Sf1K++5ovMM+3X6gn+hM7ofVY0Ox ZiKIuzUf0cWCDEp5vSlJ8HWsK9cuTfBJh8AN3gUYJW7GXNR6eKHpNtk0CZ3+3iGhJYOX xrzP+phNFE1oSe4VSpvDbvy4jKHyes1S/+lhN/+ogV5QY9CGxrhogAZ+UTUo8bSWNKQx aaZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DlSEsi0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg13-20020a170907970d00b00870dcdc205fsi8836245ejc.483.2023.01.17.20.48.13; Tue, 17 Jan 2023 20:48:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DlSEsi0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229614AbjAREqE (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Tue, 17 Jan 2023 23:46:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbjAREp2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 17 Jan 2023 23:45:28 -0500 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 951CA58660; Tue, 17 Jan 2023 20:45:18 -0800 (PST) Received: by mail-pg1-x533.google.com with SMTP id r18so23621003pgr.12; Tue, 17 Jan 2023 20:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PqdFnWHjWAHKmuM+PoO/HnCy2n74on+Ymq3rYfqeAJE=; b=DlSEsi0KQ9JhYv/iu2q45d2JfoC8+2CKC7ECut2BUh35plePrVMWf4mebvkknGUrr5 2pSFeKYmW65ZfjxlunY/SaR/XzEVnZNUk2w6uKzOJ0jRyNuERB5VAjFCiKHDKgoMFB6M duxipMvK5ckycVBRkseYba+l6G6zF5o8fcW9qqf8/0JKtBgK+T3Mx0toVEr+TcLg68zt tSx6hUgrL7MUPOQrBGjTmT4iM7gB4MDM/9VSsi9rOsHrz/WhgYHS2b9383b9mtHvJn4W 4MBT8Jcou5EwffrVcWfbev08iHwYTuOL+qc9fV6ggSZNK83+TvGTHWz055RIGcoYCTWd wdzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PqdFnWHjWAHKmuM+PoO/HnCy2n74on+Ymq3rYfqeAJE=; b=pNd58ipT5jcMfUatkFrZ4lE95Mpv+I2CHaoyR0ZI4hW8md012+r9M+46geurSUlhXm A0aFRW5iTasfPbFJRjUzbdk5/xiPy+LIc0LO5YrN+JGwSKGQ3FexGVQjF4kDlrwOnemT gLWQd9VJr526JCsSK/N1iU0r8OvaKDWrB2Dey4XRA2nh27SRV1MI8yySaBoV0kh2KEM+ 1cN2ne0POtBipDnsquuTk6kk+HURVke7WyE1mSIo4GD0bJ9TIhx72pdHcwU00no7ljvs 9z456s4Y/fDU5pm/tYhTgsIZ/TdCne9MlK8vyrsxFd1+Y6hjxxz22LAb/FJtabBEZpfL lqJw== X-Gm-Message-State: AFqh2kroxs89TdfnJVjwxt/33QQrp9zZWIZumzsS0SfnWGw93myT5abv mTPl/6C0IwlhtSItWo4Jqhw= X-Received: by 2002:a05:6a00:2354:b0:580:cf1a:f2b5 with SMTP id j20-20020a056a00235400b00580cf1af2b5mr8704552pfj.12.1674017118519; Tue, 17 Jan 2023 20:45:18 -0800 (PST) Received: from localhost.localdomain ([45.112.3.15]) by smtp.gmail.com with ESMTPSA id i1-20020a056a00004100b00581a156b920sm8682770pfk.132.2023.01.17.20.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 20:45:17 -0800 (PST) From: Anand Moon <linux.amoon@gmail.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Jerome Brunet <jbrunet@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.com> Cc: linux-amlogic@lists.infradead.org, Matthias Kaehlcke <mka@chromium.org>, Alexander Stein <alexander.stein@ew.tq-group.com>, Johan Hovold <johan@kernel.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/9] arm64: dts: amlogic: Used onboard usb hub reset on odroid c4 Date: Wed, 18 Jan 2023 04:44:15 +0000 Message-Id: <20230118044418.875-8-linux.amoon@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230118044418.875-1-linux.amoon@gmail.com> References: <20230118044418.875-1-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755334382693961453?= X-GMAIL-MSGID: =?utf-8?q?1755334382693961453?= |
Series |
[v2,1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller
|
|
Commit Message
Anand Moon
Jan. 18, 2023, 4:44 a.m. UTC
On Odroid c4 previously use gpio-hog to reset the usb hub,
switch to used on-board usb hub reset to enable the usb hub
and enable power to hub.
USB hub is combination of USB 2.0 and USB 3.0 root hub so
use peer-hub node to link then.
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
v2: - fix the compatible string.
- Fix the hub node to use peer-hub to link the usb 2.0 and usb 3.0.
---
.../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 36 ++++++++++++-------
1 file changed, 23 insertions(+), 13 deletions(-)
Comments
On 18/01/2023 05:44, Anand Moon wrote: > On Odroid c4 previously use gpio-hog to reset the usb hub, > switch to used on-board usb hub reset to enable the usb hub > and enable power to hub. > > USB hub is combination of USB 2.0 and USB 3.0 root hub so > use peer-hub node to link then. > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > --- > v2: - fix the compatible string. > - Fix the hub node to use peer-hub to link the usb 2.0 and usb 3.0. > --- > .../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 36 ++++++++++++------- > 1 file changed, 23 insertions(+), 13 deletions(-) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > index 8c30ce63686e..d04768a66bfe 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > @@ -26,20 +26,30 @@ led-blue { > sound { > model = "ODROID-C4"; > }; > -}; > > -&gpio { > - /* > - * WARNING: The USB Hub on the Odroid-C4 needs a reset signal > - * to be turned high in order to be detected by the USB Controller > - * This signal should be handled by a USB specific power sequence > - * in order to reset the Hub when USB bus is powered down. > - */ > - hog-0 { > - gpio-hog; > - gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; > - output-high; > - line-name = "usb-hub-reset"; > + /* USB hub supports both USB 2.0 and USB 3.0 root hub */ > + usb-hub { > + dr_mode = "host"; Is this really needed ? > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* 2.0 hub on port 1 */ > + hub_2_0: hub@1 { > + compatible = "usb2109,2817"; > + reg = <1>; > + peer-hub = <&hub_3_0>; > + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; > + vdd-supply = <&vcc_5v>; > + }; > + > + /* 3.1 hub on port 4 */ > + hub_3_0: hub@2 { > + compatible = "usb2109,817"; > + reg = <2>; > + peer-hub = <&hub_2_0>; > + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; > + vdd-supply = <&vcc_5v>; > + }; The final discussion in v1 was to drop this /usb-hub node and move the hub_2_0 & hub_3_0 node under the dwc3 node. Neil > }; > }; >
Hi Neil, Thanks for your review comments. On Wed, 18 Jan 2023 at 13:59, Neil Armstrong <neil.armstrong@linaro.org> wrote: > > On 18/01/2023 05:44, Anand Moon wrote: > > On Odroid c4 previously use gpio-hog to reset the usb hub, > > switch to used on-board usb hub reset to enable the usb hub > > and enable power to hub. > > > > USB hub is combination of USB 2.0 and USB 3.0 root hub so > > use peer-hub node to link then. > > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com> > > --- > > v2: - fix the compatible string. > > - Fix the hub node to use peer-hub to link the usb 2.0 and usb 3.0. > > --- > > .../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 36 ++++++++++++------- > > 1 file changed, 23 insertions(+), 13 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > > index 8c30ce63686e..d04768a66bfe 100644 > > --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > > +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > > @@ -26,20 +26,30 @@ led-blue { > > sound { > > model = "ODROID-C4"; > > }; > > -}; > > > > -&gpio { > > - /* > > - * WARNING: The USB Hub on the Odroid-C4 needs a reset signal > > - * to be turned high in order to be detected by the USB Controller > > - * This signal should be handled by a USB specific power sequence > > - * in order to reset the Hub when USB bus is powered down. > > - */ > > - hog-0 { > > - gpio-hog; > > - gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; > > - output-high; > > - line-name = "usb-hub-reset"; > > + /* USB hub supports both USB 2.0 and USB 3.0 root hub */ > > + usb-hub { > > + dr_mode = "host"; > > Is this really needed ? > I got carried forward from the other device tree binding, If not needed I will drop this. > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + /* 2.0 hub on port 1 */ > > + hub_2_0: hub@1 { > > + compatible = "usb2109,2817"; > > + reg = <1>; > > + peer-hub = <&hub_3_0>; > > + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; > > + vdd-supply = <&vcc_5v>; > > + }; > > + > > + /* 3.1 hub on port 4 */ > > + hub_3_0: hub@2 { > > + compatible = "usb2109,817"; > > + reg = <2>; > > + peer-hub = <&hub_2_0>; > > + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; > > + vdd-supply = <&vcc_5v>; > > + }; > > The final discussion in v1 was to drop this /usb-hub node and move the > hub_2_0 & hub_3_0 node under the dwc3 node. > Yes, but It did not work back then, since these are two different events USB node will try to bring the PHY and dwc2 and dwc2 nodes up. USB hub supports the reset of the USB hub and links the power supply to the ports. This works on this board. > Neil > Thanks -Anand
On 18/01/2023 12:55, Anand Moon wrote: > Hi Neil, > > Thanks for your review comments. > > On Wed, 18 Jan 2023 at 13:59, Neil Armstrong <neil.armstrong@linaro.org> wrote: >> >> On 18/01/2023 05:44, Anand Moon wrote: >>> On Odroid c4 previously use gpio-hog to reset the usb hub, >>> switch to used on-board usb hub reset to enable the usb hub >>> and enable power to hub. >>> >>> USB hub is combination of USB 2.0 and USB 3.0 root hub so >>> use peer-hub node to link then. >>> >>> Signed-off-by: Anand Moon <linux.amoon@gmail.com> >>> --- >>> v2: - fix the compatible string. >>> - Fix the hub node to use peer-hub to link the usb 2.0 and usb 3.0. >>> --- >>> .../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 36 ++++++++++++------- >>> 1 file changed, 23 insertions(+), 13 deletions(-) >>> >>> diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts >>> index 8c30ce63686e..d04768a66bfe 100644 >>> --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts >>> +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts >>> @@ -26,20 +26,30 @@ led-blue { >>> sound { >>> model = "ODROID-C4"; >>> }; >>> -}; >>> >>> -&gpio { >>> - /* >>> - * WARNING: The USB Hub on the Odroid-C4 needs a reset signal >>> - * to be turned high in order to be detected by the USB Controller >>> - * This signal should be handled by a USB specific power sequence >>> - * in order to reset the Hub when USB bus is powered down. >>> - */ >>> - hog-0 { >>> - gpio-hog; >>> - gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; >>> - output-high; >>> - line-name = "usb-hub-reset"; >>> + /* USB hub supports both USB 2.0 and USB 3.0 root hub */ >>> + usb-hub { >>> + dr_mode = "host"; >> >> Is this really needed ? >> > I got carried forward from the other device tree binding, > If not needed I will drop this. > >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + >>> + /* 2.0 hub on port 1 */ >>> + hub_2_0: hub@1 { >>> + compatible = "usb2109,2817"; >>> + reg = <1>; >>> + peer-hub = <&hub_3_0>; >>> + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; >>> + vdd-supply = <&vcc_5v>; >>> + }; >>> + >>> + /* 3.1 hub on port 4 */ >>> + hub_3_0: hub@2 { >>> + compatible = "usb2109,817"; >>> + reg = <2>; >>> + peer-hub = <&hub_2_0>; >>> + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; >>> + vdd-supply = <&vcc_5v>; >>> + }; >> >> The final discussion in v1 was to drop this /usb-hub node and move the >> hub_2_0 & hub_3_0 node under the dwc3 node. >> > > Yes, but It did not work back then, since these are two different events > USB node will try to bring the PHY and dwc2 and dwc2 nodes up. > USB hub supports the reset of the USB hub and links the power supply > to the ports. > This works on this board. Forget the dwc2 node, the dwc2 since GXL is device mode only, so you need to put both nodes in the dwc3 node which is host-only. Neil > >> Neil >> > Thanks > > -Anand
Hi Neil, On Wed, 18 Jan 2023 at 18:54, <neil.armstrong@linaro.org> wrote: > > On 18/01/2023 12:55, Anand Moon wrote: > > Hi Neil, > > > > Thanks for your review comments. > > > > On Wed, 18 Jan 2023 at 13:59, Neil Armstrong <neil.armstrong@linaro.org> wrote: > >> > >> On 18/01/2023 05:44, Anand Moon wrote: > >>> On Odroid c4 previously use gpio-hog to reset the usb hub, > >>> switch to used on-board usb hub reset to enable the usb hub > >>> and enable power to hub. > >>> > >>> USB hub is combination of USB 2.0 and USB 3.0 root hub so > >>> use peer-hub node to link then. > >>> > >>> Signed-off-by: Anand Moon <linux.amoon@gmail.com> > >>> --- > >>> v2: - fix the compatible string. > >>> - Fix the hub node to use peer-hub to link the usb 2.0 and usb 3.0. > >>> --- > >>> .../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 36 ++++++++++++------- > >>> 1 file changed, 23 insertions(+), 13 deletions(-) > >>> > >>> diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > >>> index 8c30ce63686e..d04768a66bfe 100644 > >>> --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > >>> +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts > >>> @@ -26,20 +26,30 @@ led-blue { > >>> sound { > >>> model = "ODROID-C4"; > >>> }; > >>> -}; > >>> > >>> -&gpio { > >>> - /* > >>> - * WARNING: The USB Hub on the Odroid-C4 needs a reset signal > >>> - * to be turned high in order to be detected by the USB Controller > >>> - * This signal should be handled by a USB specific power sequence > >>> - * in order to reset the Hub when USB bus is powered down. > >>> - */ > >>> - hog-0 { > >>> - gpio-hog; > >>> - gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; > >>> - output-high; > >>> - line-name = "usb-hub-reset"; > >>> + /* USB hub supports both USB 2.0 and USB 3.0 root hub */ > >>> + usb-hub { > >>> + dr_mode = "host"; > >> > >> Is this really needed ? > >> > > I got carried forward from the other device tree binding, > > If not needed I will drop this. > > > >>> + #address-cells = <1>; > >>> + #size-cells = <0>; > >>> + > >>> + /* 2.0 hub on port 1 */ > >>> + hub_2_0: hub@1 { > >>> + compatible = "usb2109,2817"; > >>> + reg = <1>; > >>> + peer-hub = <&hub_3_0>; > >>> + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; > >>> + vdd-supply = <&vcc_5v>; > >>> + }; > >>> + > >>> + /* 3.1 hub on port 4 */ > >>> + hub_3_0: hub@2 { > >>> + compatible = "usb2109,817"; > >>> + reg = <2>; > >>> + peer-hub = <&hub_2_0>; > >>> + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; > >>> + vdd-supply = <&vcc_5v>; > >>> + }; > >> > >> The final discussion in v1 was to drop this /usb-hub node and move the > >> hub_2_0 & hub_3_0 node under the dwc3 node. > >> > > > > Yes, but It did not work back then, since these are two different events > > USB node will try to bring the PHY and dwc2 and dwc2 nodes up. > > USB hub supports the reset of the USB hub and links the power supply > > to the ports. > > This works on this board. > > Forget the dwc2 node, the dwc2 since GXL is device mode only, so you need to put both > nodes in the dwc3 node which is host-only. > > Neil > Ok, I will move this node under dwc3 node, in the next version. > > > >> Neil Thanks -Anand
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts index 8c30ce63686e..d04768a66bfe 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts @@ -26,20 +26,30 @@ led-blue { sound { model = "ODROID-C4"; }; -}; -&gpio { - /* - * WARNING: The USB Hub on the Odroid-C4 needs a reset signal - * to be turned high in order to be detected by the USB Controller - * This signal should be handled by a USB specific power sequence - * in order to reset the Hub when USB bus is powered down. - */ - hog-0 { - gpio-hog; - gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "usb-hub-reset"; + /* USB hub supports both USB 2.0 and USB 3.0 root hub */ + usb-hub { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub_2_0: hub@1 { + compatible = "usb2109,2817"; + reg = <1>; + peer-hub = <&hub_3_0>; + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; + vdd-supply = <&vcc_5v>; + }; + + /* 3.1 hub on port 4 */ + hub_3_0: hub@2 { + compatible = "usb2109,817"; + reg = <2>; + peer-hub = <&hub_2_0>; + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; + vdd-supply = <&vcc_5v>; + }; }; };