Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3869453rwl; Sat, 7 Jan 2023 07:12:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXsRK2fwtATf3haNXPgRxhVoZ/32JTTSftqkbWriS8otkqQmnWc0oV2llyAaqStIYA9+0WRx X-Received: by 2002:a17:902:a5c3:b0:193:1c8f:1837 with SMTP id t3-20020a170902a5c300b001931c8f1837mr2438332plq.30.1673104333439; Sat, 07 Jan 2023 07:12:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673104333; cv=none; d=google.com; s=arc-20160816; b=Sw4tobPdU6chb3fSD8eE303BKWKPgPP0eKfq4vBlC9aRFbvwajTDl+PGnjEQ3opoxT 28xu1pETIknLxfGODQzM5jveKc9WAHSWTN1IvSUFWvJsysbAwq1VgKXW29vYA/rIaDyT KOTH/cA5mKg4vTeHREowpcph3Y0aYhadYkN036o2JTcr6nPMp1xmllHEi03akwCPSG8e rxRU2RO+Rav/yNaNKasM63CTDO/TT64Ye1FY32j3gT3wv7mgKcR2eyJirIs+xgfBBV2E uOVQtsgBJAabFlpm5gnNuEWkMelhalj9MrV8voMS0uJx0St5dYUU/V++Wpae3K7DcOVp Z5Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dFyLUIx8VXvv71DzGWZEEjL5hj6rPhYAH4n7XJ6OnbU=; b=nqZoBCuaYk84zNmB92Xp5FRez3ez8VuE9CAaOeqg6qpt6rELzWB2KXYL5vN9Zqzrai 45NO8FjfMLJ9u+WJJO6BYbR4Vh1yXOvi0Wx0p3SfMtrcnIgAX/Q7KQUcWPY8qhOrsUeL XKjgU0bdeINDoGQpgTTbZaaEKNCBTqz9pxQzb/Ge5Nntc+mYbgJ9hxy8Xb2keX+183f3 WPdyxkU3LUwyGTcIiGnCQdjCwi4gP3rKVk3mLo6zZ1bASZR5kqLi+cmPigouM0hZF7ob zzI4DIQwkdN30ON/aSPqabn2yEvWN1UvceHtmKT/bBfnMggpY56h3m8a0X1QdpPHD4UJ nKcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ooXLw1zS; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a17090341c300b00189b279b8dbsi4511492ple.390.2023.01.07.07.12.05; Sat, 07 Jan 2023 07:12:13 -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=ooXLw1zS; 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 S231755AbjAGO4a (ORCPT + 55 others); Sat, 7 Jan 2023 09:56:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjAGO41 (ORCPT ); Sat, 7 Jan 2023 09:56:27 -0500 Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B9B23AB36; Sat, 7 Jan 2023 06:56:27 -0800 (PST) Received: by mail-vs1-xe2e.google.com with SMTP id l184so4367689vsc.0; Sat, 07 Jan 2023 06:56:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dFyLUIx8VXvv71DzGWZEEjL5hj6rPhYAH4n7XJ6OnbU=; b=ooXLw1zSzyjR8WV8a1SL5uV4hNdB567FCOLxUPAvYIu0IbfF79B+FPKP+QNnAKaeCE /xJuOTC+4evgPpENIFNGaFn3ZnfBToFYoUZwF+5kabwSTs0c4mr1czfBj0fmtdxBthPX LXwXbsYVB1oqJ0sBOxV+GVQkosHX+xogHXy+RJaKx8lQyVrr795FbJmRVfr6a22wt40C 0XGkyuWl+O0kXoLzPAQZuxWnZTjjH51h640x0m0fUSnPhDti0efpZChBfAsSt0TUb9CX KGbATst2J89nrnZP45Jj/0BmcRvYhY3vZRIP9/5Ixc+97q8qgMPjkrTMoXLY/RWUTRu3 ht9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dFyLUIx8VXvv71DzGWZEEjL5hj6rPhYAH4n7XJ6OnbU=; b=Uyts/zx+X/f22xsyJe1X5N3xtFDa8jl0sehMm/S1Me4YrsSiRseaHp7itTauNPdh+v WcWltWeaUTNWqW13AIOx2FRrCQf3EePtsa+VEWFTqrBA76okUI7pQXw9C9oMxibhXS4r ES/wAZKsOkWzuTOYKwPjcZ9WhPOGBw+AqF1knffrDDkONKEFHsvTeFC+OS8iDLw70Qww VY75O0LaY09z7h5eIyD2rjQFs7HAB7G7FggYucv2UYtWerhgKYOIk2tjDzhwhDknrO1G 2siAvhMU5miEulD3f7++CWQ2Z3LGFXdGKJ6GybCUHIZeZVVxDo6JzpXpFmPsF2hwRvPW 8p4w== X-Gm-Message-State: AFqh2kpOFKmgIM3tDfPZSDdSbVi60960zP6X/5FAvdmuSX7HPl0jfXzp 1X5kIBcTTzGBkXk7q+dWnRsk7sczm8xncbhvkWA= X-Received: by 2002:a67:5c03:0:b0:3ce:a7c5:3757 with SMTP id q3-20020a675c03000000b003cea7c53757mr2460727vsb.63.1673103386173; Sat, 07 Jan 2023 06:56:26 -0800 (PST) MIME-Version: 1.0 References: <20221228100321.15949-1-linux.amoon@gmail.com> <2188024.ZfL8zNpBrT@steina-w> In-Reply-To: <2188024.ZfL8zNpBrT@steina-w> From: Anand Moon Date: Sat, 7 Jan 2023 20:26:09 +0530 Message-ID: Subject: Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2 To: Alexander Stein Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexander, Thanks for your review comments. On Wed, 4 Jan 2023 at 15:06, Alexander Stein wrote: > > Am Mittwoch, 4. Januar 2023, 09:13:21 CET schrieb Anand Moon: > > Hi Martin, > > > > On Wed, 28 Dec 2022 at 20:14, Anand Moon wrote: > > > Hi Martin, > > > > > > On Wed, 28 Dec 2022 at 18:21, Martin Blumenstingl > > > > > > 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 > > > > 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. > > > > # 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. > > If your USB hub does both USB2.0 and USB3.0 you need to add both devices in DT > and reference them using 'peer-hub'property. See ca69b6c78d5d ("arm64: dts: > tqma8mpql: add support for 2nd USB (host) interface") for a reference. > Yes, I have updated the DTS example for using peer-hub for both devices. > Best regards, > Alexander > Thanks -Anand