Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3871170rwl; Sat, 7 Jan 2023 07:13:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXsfEL5mRG3I86UMe1rxZ1yXWdaAqmmhHLVXU/Q+FDBsiDGKKjU2vs9ti9QD1I617QsZLtaU X-Received: by 2002:a05:6a00:1346:b0:581:c216:1390 with SMTP id k6-20020a056a00134600b00581c2161390mr44696686pfu.34.1673104427150; Sat, 07 Jan 2023 07:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673104427; cv=none; d=google.com; s=arc-20160816; b=ifu9uDHuUbawFoIVES4mEtytoJVM803VJoAs0bQMiWIHOwASeBDeHBoyh80XI/ojTS jkY69hnwSBMWrNnPv/zrzT1iB9iz0/xs+2UW8uuZrr4azIcKzPYTKG4RZMF3PnKBkDlS ZpreIlVkPscpcDeoMMkH5oq4KvRYSLYzLP9echqRMPFMa6tUeUGw2u4+ovyK1PEhWWaV woD+v1m/E2iySap+p9bCkiJE0yBSYsVePfHhsak7ipSCoFHrgIEruIOuqll/6HVFi9UP 8t2eiNQNUXZVjOMw/12yCXZ7Qb3oBJhzb1c9mYLs7Md4Hx3AH1BqjZi2EqOzG4JYhZds ndog== 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=Ifhz4k4RvVQRROiBmQhqZMFI/gQRGOwvv+dCEJY7ups=; b=ESd++JUGnHGmcHSIx4KVkEEzpZAEMMLz9knJpRwRZJtRQ0Yd+YKXhVNvtezlotzzZn ZeKbGJcZuJOpOd93L0k1vdGK11ng6becRi6SLdlhI6i4M9uZ/X06KrCoGrY47Olw66wY 4jnC5YlgopUQl++J4iKjr7MIvBR4Z1fVjzLMd3gxBgoXzdf8k0KOHgqvRj1kaZsB0dKn y1O4VQnirtSxiC1T/9Vdlp6FC5COyIbedtpTNZWjSAbyMuUt0i2o5/XIwi1MRlFl07T1 lxDG4UsNpA+A+kve3ZW/gFYNTBYkU9t+s69WCAHfFtZrcbOLACkKy+c0J81iCP8jsjbB Dk/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oNN52TyI; 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 y26-20020aa7943a000000b0057e857295adsi4260650pfo.236.2023.01.07.07.13.40; Sat, 07 Jan 2023 07:13:47 -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=oNN52TyI; 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 S232194AbjAGO7l (ORCPT + 56 others); Sat, 7 Jan 2023 09:59:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232050AbjAGO7j (ORCPT ); Sat, 7 Jan 2023 09:59:39 -0500 Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A84A83AB36; Sat, 7 Jan 2023 06:59:38 -0800 (PST) Received: by mail-vs1-xe2f.google.com with SMTP id l184so4372440vsc.0; Sat, 07 Jan 2023 06:59:38 -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=Ifhz4k4RvVQRROiBmQhqZMFI/gQRGOwvv+dCEJY7ups=; b=oNN52TyIaEqppiUBzhnfEZ2EPtrjybrqfacMaGByapzK5ORfo4GNy2K0uM0Jt0J5SY /Udu+x+3fMORcRP3u1ysg0nx9fg6tCBgCLy53p3VdwmQMH4KP9SwmcQBE/P2IWA091TF Ta0AqgpXidUu3aKa1y54/eTg0vX19Dgwpc+kVLC21BcOCl/d05xJj7hMysgam7m0mKqr jwP78g3VkOBvvQO0Eb8QYKjhYtpw7eXyodiEZYnFuru43NBNs4aTTJST6kqdkLntTiIW cjWjhg0jKsxhGs4RON7ZBYsUmKU3Tc+rtl2/IM7wzmImdD8SYrrJnqPKhnk5LR1m7iJS qQoQ== 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=Ifhz4k4RvVQRROiBmQhqZMFI/gQRGOwvv+dCEJY7ups=; b=iMu643XOsvADO8gxYRE40240T3wj1fO/vCusfY6MHNpkk1XG5K8dGqLoA1nlcnUSwU bZ1swirAfBpEMWTNi8S6A7pnrhVieuXLZRmfCi93iW1tRmQmfkSVG2y3hQpka6uBU40l HM6Yufb45pU7kS+Ba4ZGcqQSRkf2g8CPZuV5EYwI6MU/Mf+9n7FWID62jE8cX9E0UDTX pk04ayuXgDVpOgDsulaJFY0fTkan/VJAnNnt8yQmI4+yLfII3qNN6dAmTAjmYp/MGd1t u2feHZSZNgr5DYqZDcscz7juxWBgZtXHBkuXqubqoyIh8WHvgCKQIibYORQPSUrnjJUp J53w== X-Gm-Message-State: AFqh2kp65wfQEQzyopLGLlLJ5fRdlO7C0VvWNFojd9fEFZzQTjdEb0Oj bfqOnV4AfeHRE9GbsrWKiLvYd2G501QlI2PfScg= X-Received: by 2002:a67:1703:0:b0:3ce:f9ed:ad70 with SMTP id 3-20020a671703000000b003cef9edad70mr384547vsx.76.1673103577869; Sat, 07 Jan 2023 06:59:37 -0800 (PST) MIME-Version: 1.0 References: <20221228100321.15949-1-linux.amoon@gmail.com> <20221228100321.15949-11-linux.amoon@gmail.com> In-Reply-To: From: Anand Moon Date: Sat, 7 Jan 2023 20:29:20 +0530 Message-ID: Subject: Re: [PATCH v1 10/11] usb: misc: onboard_usb_hub: add VIA LAB VL817Q7 hub support To: Matthias Kaehlcke Cc: Greg Kroah-Hartman , linux-amlogic@lists.infradead.org, linux-usb@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 Matthias, Thanks for your review comments. On Thu, 5 Jan 2023 at 01:52, Matthias Kaehlcke wrote: > > Hi Andand, > > On Wed, Dec 28, 2022 at 10:03:19AM +0000, Anand Moon wrote: > > VIA LAB VL817Q7 is a 4-port USB 3.1 hub that has a reset pin to > > toggle and a 5.0V core supply exported though an integrated LDO is > > available for powering it. > > > > Add the support for this hub, for controlling the reset pin and the core > > power supply. > > > > Signed-off-by: Anand Moon > > --- > > drivers/usb/misc/onboard_usb_hub.c | 2 ++ > > drivers/usb/misc/onboard_usb_hub.h | 5 +++++ > > 2 files changed, 7 insertions(+) > > > > diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c > > index 699050eb3f17..025572019d16 100644 > > --- a/drivers/usb/misc/onboard_usb_hub.c > > +++ b/drivers/usb/misc/onboard_usb_hub.c > > @@ -335,6 +335,7 @@ static struct platform_driver onboard_hub_driver = { > > #define VENDOR_ID_MICROCHIP 0x0424 > > #define VENDOR_ID_REALTEK 0x0bda > > #define VENDOR_ID_TI 0x0451 > > +#define VENDOR_ID_VIA 0x2109 > > > > /* > > * Returns the onboard_hub platform device that is associated with the USB > > @@ -418,6 +419,7 @@ static const struct usb_device_id onboard_hub_id_table[] = { > > { USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 */ > > { USB_DEVICE(VENDOR_ID_TI, 0x8140) }, /* TI USB8041 3.0 */ > > { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 */ > > + { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817Q7 3.1 */ > > The VL817Q7 is a single IC, however like the TI USB8041 or the RTS5414 it > provides both a USB 3.1 and a USB 2.0 hub. You should also add an entry for > the USB 2.0 hub here. > Ok, > > > {} > > }; > > MODULE_DEVICE_TABLE(usb, onboard_hub_id_table); > > diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h > > index b32fad3a70f9..1fb3371ebdae 100644 > > --- a/drivers/usb/misc/onboard_usb_hub.h > > +++ b/drivers/usb/misc/onboard_usb_hub.h > > @@ -26,6 +26,10 @@ static const struct onboard_hub_pdata genesys_gl850g_data = { > > .reset_us = 3, > > }; > > > > +static const struct onboard_hub_pdata vialab_vl817q7_data = { > > + .reset_us = 3, > > +}; > > + > > static const struct of_device_id onboard_hub_match[] = { > > { .compatible = "usb424,2514", .data = µchip_usb424_data, }, > > { .compatible = "usb451,8140", .data = &ti_tusb8041_data, }, > > @@ -37,6 +41,7 @@ static const struct of_device_id onboard_hub_match[] = { > > { .compatible = "usbbda,5411", .data = &realtek_rts5411_data, }, > > { .compatible = "usbbda,414", .data = &realtek_rts5411_data, }, > > { .compatible = "usbbda,5414", .data = &realtek_rts5411_data, }, > > + { .compatible = "vialab,usb2109", .data = &vialab_vl817q7_data, }, > > ditto > > Actually you added the device id entry for the 3.1 hub and a compatible string > of the 2.0 hub (or vice versa). Above the device id is 0x0817, here it is > 0x2109. Please add both USB 3.1 and 2.0 and make sure the device id and the USB > version in the comment for the device id table match. Yes I messed up the compatible string On Odrodi C4 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. vendor ID is 0x2109 and the device ID is 0817, So I have fixed the compatible string as below. compatible = "usb2109,2817"; /* USB 2.0 hub */ compatible = "usb2109,817"; /* USB 3.1 hub */ Thanks -Anand