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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C4C8C4708D for ; Wed, 4 Jan 2023 20:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235421AbjADUWn (ORCPT ); Wed, 4 Jan 2023 15:22:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235460AbjADUW0 (ORCPT ); Wed, 4 Jan 2023 15:22:26 -0500 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AD8F33D45 for ; Wed, 4 Jan 2023 12:22:24 -0800 (PST) Received: by mail-io1-xd2b.google.com with SMTP id p9so1796643iod.13 for ; Wed, 04 Jan 2023 12:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9rZvl8+1gYwkdYRJIjwY/CuQIIJARDw0zn6scUesZko=; b=Ab51jq4uLpXQ7JMNlgVg7xiThp4ID8vN8Rq+2aeRprZvCVs73I8rNbm0h5qQInJxIQ HeKPTKAGgh6yFGUSBfCk6nCVI+zSYH+sJCAah7RhAk/WH7wyq/C/CBkRfAmyY6anrpoS b2mmD0tS5DGeoG4JIRsjKPIlqjk5N0LCCrFms= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9rZvl8+1gYwkdYRJIjwY/CuQIIJARDw0zn6scUesZko=; b=PXIUKNiDA3KobyrTPpAvFrlBxeXV41H4Hod21dDCqq8RpxFrNxRoTnuwwJdpNP6V98 CqJBe7p2vd9oCXwDpv1iJDEzlSGRHfUVqJfLi4Ewjpea9inIYJw1NLXOm+bDCbII4oSo z9gnI61WUCkb7p3JPvhtErvZj0bs3ZTNAdy6wZZSy/o7uHXcLzismGkYKl0oFoj0FnS2 P66JP/AH7sGIuHMbSvNWHDAOgMgBupwMhyl9Mx1m/DgtaTixn3rKsAp5MCAyn4qYLfDN G61eWXi1f8/qwa4w0Jc8ZZreMev6c1NaYjjnb3wgASBZY2i8L4LOxL+bf7whTgP3qlDT TLCg== X-Gm-Message-State: AFqh2kqUgBcvOjxe8+qcXRk48rjmw3na4Bev3d0ja0DAJ4xqmBnHVn3h W4Q2rMoTA2EoYZAbHA2hsi9iNA== X-Google-Smtp-Source: AMrXdXuahbSA9M5OOU+OtHMSnbd2z4FaE5Z/RhTKQ1tFJhNGArlFjZdRnIMUpivN633+JN8ouZ+mMg== X-Received: by 2002:a05:6602:21d4:b0:6e9:7156:3b7a with SMTP id c20-20020a05660221d400b006e971563b7amr40648314ioc.3.1672863743927; Wed, 04 Jan 2023 12:22:23 -0800 (PST) Received: from localhost (30.23.70.34.bc.googleusercontent.com. [34.70.23.30]) by smtp.gmail.com with UTF8SMTPSA id az36-20020a05663841a400b0039db6cffcbasm9390843jab.71.2023.01.04.12.22.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Jan 2023 12:22:23 -0800 (PST) Date: Wed, 4 Jan 2023 20:22:23 +0000 From: Matthias Kaehlcke To: Anand Moon Cc: Greg Kroah-Hartman , linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 10/11] usb: misc: onboard_usb_hub: add VIA LAB VL817Q7 hub support Message-ID: References: <20221228100321.15949-1-linux.amoon@gmail.com> <20221228100321.15949-11-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221228100321.15949-11-linux.amoon@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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. > {} > }; > 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.