From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DCE86C32793 for ; Wed, 18 Jan 2023 13:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UCZgiiQGuqSpekY2LZ/h6xkS7GFo1cngMbgHk/F2n2A=; b=AdJx3BAyn/5ctc6CGK20a9/hph osHKYrwrp1jN8hTs2tyRw96ePJyI+QYeBieA0zeGEu6jAVAwVkfgduNjIf9TV2vgOTiORepdwQ8L/ ATrMh5qw8gAjf56pmsgpcE3Cx3t140d1Yumxhx/vQMBVaepMBm4+raycti40UvzOZNV1I+K5O/H8d jEV6gdT5pEIXPIFkSkID1FX3detVw8RRK7XZC3EpCcVlDWjuDk4Zsvz68SO5bnhJgPvPp4gmYXiov AHyCNQnv9TOulvXUm+Sb0eBXfOYy7hWWRD7iYCOtmJ7e5XMCUieo984JEJThG2EzxhGQWqQCA5FMd sD4H0/cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI8QH-0017eh-5C; Wed, 18 Jan 2023 13:24:13 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI8QE-0017d8-Be for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 13:24:11 +0000 Received: by mail-wr1-x42c.google.com with SMTP id bk16so33894410wrb.11 for ; Wed, 18 Jan 2023 05:24:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=aGtX6Xomvv0Zvw2ChFFYcesiMxlqQe3xiNuEHsKpSTI=; b=aYMOE6r2RwGDo2+O3pCFAAAp4eGo7OmMUWFbRB3a77/fVjwokTqPn9kXh30jyVeMox Hzmcc4N81HICUURefsIZFdfr6BFiYFGIxA3ij0PboFjTieLvkrWfzSb0h0ArvWRlvTk6 K0AagclJyek/0P62wwX5dxm1g8SDWefXV85XdUTC4ZDFBQ/ZkLdALrSJJHQEPqNGAwst 6BQwR4Y235nywAmhdYqBK51yE3NQzkHe2Eudk3ODs2xXc6N7znk2rHPD/zTBsJN7YBVJ axnmE9tuSNVrjXUn0Q0euvj3Hr01NfVrIPvF/uyCo474SVyfPqZPNEzt8XLuhS0dKJP7 p2jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aGtX6Xomvv0Zvw2ChFFYcesiMxlqQe3xiNuEHsKpSTI=; b=bkoGOVDlzPgqgRRqF24fXlHD3/huHWd6T0Pw3ZmAMom/BIjr8XXKz/S98bclwwNVzD v39ol3o3MKWJFGvVvvIe+C4ej0EDxuTSkZcGvWIF3wa7+nPdGG2d6N88P7EKHFdcUpM2 /JP3YChYjEOe4aZuArvrj4Fgp5X7s+8sNwo4zJIr87hfTobNrvUyYqhcvndO+EHKOOi3 UtcuYUliT3NxziIc5SfuWdStxx8AkqvvKZo7UXeUoaiMha7XtCyZEvs3CxGjCplBq4k3 NGgkt3ASHMMA+jYw7f0jTK8A/9RT1B8ggFpJplciTTc7BBP0RvjOFUAmSJnzqQGgqVxe 4SLQ== X-Gm-Message-State: AFqh2kqy4PCfCxE7j0r+qD2tddCzsET8xBdBTrmsKluZ+w0Iz73WZGn9 OCO29ShkKG+Kl3ig2gsBPoHZrw== X-Google-Smtp-Source: AMrXdXsdPNHbsnLa957TyAPdquE49R/mFl4FzMmguPl+EyrKQ+vdLmzBBsVjlm87ZzA5gtRrAd6iEA== X-Received: by 2002:a5d:6952:0:b0:242:1415:ab02 with SMTP id r18-20020a5d6952000000b002421415ab02mr5805169wrw.9.1674048245943; Wed, 18 Jan 2023 05:24:05 -0800 (PST) Received: from ?IPV6:2a01:e0a:982:cbb0:37dc:5071:959c:93e4? ([2a01:e0a:982:cbb0:37dc:5071:959c:93e4]) by smtp.gmail.com with ESMTPSA id b16-20020adff910000000b002bdf8dd6a8bsm9289920wrr.80.2023.01.18.05.24.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Jan 2023 05:24:05 -0800 (PST) Message-ID: <0dbefaec-e1de-fc3f-54f2-c5fe75a28c7c@linaro.org> Date: Wed, 18 Jan 2023 14:24:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 From: neil.armstrong@linaro.org Subject: Re: [PATCH v2 7/9] arm64: dts: amlogic: Used onboard usb hub reset on odroid c4 Content-Language: en-US To: Anand Moon Cc: Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-amlogic@lists.infradead.org, Matthias Kaehlcke , Alexander Stein , Johan Hovold , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230118044418.875-1-linux.amoon@gmail.com> <20230118044418.875-8-linux.amoon@gmail.com> Organization: Linaro Developer Services In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230118_052410_451221_B895D45A X-CRM114-Status: GOOD ( 25.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: neil.armstrong@linaro.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 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 >>> --- >>> 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 = ; >>> - 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel