From patchwork Wed Jan 18 04:44:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 44967 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2144236wrn; Tue, 17 Jan 2023 20:50:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXsuQLqeq5I49ATOiCD0ue16nHSGJnlplmQWwHuU7CUEyIjRmofWiA5Oyx8QJRTC3QakcXz9 X-Received: by 2002:a17:907:cca4:b0:7c0:f719:838d with SMTP id up36-20020a170907cca400b007c0f719838dmr17143371ejc.36.1674017414747; Tue, 17 Jan 2023 20:50:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674017414; cv=none; d=google.com; s=arc-20160816; b=UUR1AFd7pTYyjc2yOyoJAIEnxsqnLCSDwodplDIf7eZWE/4KBxYO+LfVETCem1QEyj coLTOK6wa9h6r8u+W1fudS+p7nx1w4eRxBwKVjsihC44n0LdOR8xS7Mo0KIvpC9yOl4t tEfhNyopOoIaCDCeHEyd/4F/IDE7msaej1tKZT9WcUCVChCGw5VLbCKTyk5vwtzF5GMN R3o3CznSNKe7keJH1qgw9EUh6MAJR3swNjWCpX2uDYL46XCngL38Z4lozi90ftmFW1GJ tS3gz6Lp+OR+TkQu7nMq64/aJu084vM/rh2Kw38DCPkq4PVhYgEVILBrNJTdmaLOmWLe IFYA== 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=wqZvv1Cxb0t6cisyG3CZwbwpWlMQdpI86dZp44hCMJE=; b=XcfgyiutiRMze0w2xfWC8RLUb0FoaEZEVBK1JWwoPuGWmfoeCsmQpOgLbNt0eyMuYa pxtrRhsFxTG4ia3UJItSWs50XYwn/lGyPCrtRd4wWPhS0nuDqquqM+GDr7wW7A+0VFkP ityMydLz5ac9gwM6RptV/+gI6a9w8SIGgdMRL1EZx037YDCcgAril44zYqfZUJNg+us+ H0++Xx4bkkjcmH/1MO2DSzUs3Cc5cX7OLElipjYbNAQKoT6m5DAn+/ReuA/9NKQqzZJG X8EWs4ljkRLzgtFGiylQ+10QatAjVN5069FMtQTpaJExIWDRfz3vqCISEp2Rbj/pNMwc tWNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ic8i3YOM; 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 wv1-20020a170907080100b007ae10525573si38187158ejb.671.2023.01.17.20.49.51; Tue, 17 Jan 2023 20:50:14 -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=Ic8i3YOM; 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 S229739AbjAREqX (ORCPT + 99 others); Tue, 17 Jan 2023 23:46:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229741AbjAREpf (ORCPT ); Tue, 17 Jan 2023 23:45:35 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E50D58282; Tue, 17 Jan 2023 20:45:24 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id 7so23652841pga.1; Tue, 17 Jan 2023 20:45:24 -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=wqZvv1Cxb0t6cisyG3CZwbwpWlMQdpI86dZp44hCMJE=; b=Ic8i3YOMVPjMMlQf/D1uuQd3aP2Lhx409y7YULdVTLd/7eN673woYXVvEUvFyyQ/cY YBxR3xFENzl0TNGqcM1Hkgxyu7aINGAzAB1kc+1+u7guIL4HZVMoNnCjpUZvEAH36B8R kH3CyXA3TA4Rdyf6M0E7iNNzT2fmY6LpFKLVDYqOXCYPj/TCETbg5D9c2Oa8Jim4pI0V 5BJOwjd5P3eBifZpbpmn7hwyZhYiNB7IvHUuigXKaUNpZgEkrzhLVioIXAXjoiS+3q3D 2uGn1JxItYJYM19wHMNeje6B/wWFOZ+pJ/MXh477y6DP9oTzv0MXkLbvCI/1R/Ps3C0R 1eFQ== 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=wqZvv1Cxb0t6cisyG3CZwbwpWlMQdpI86dZp44hCMJE=; b=Jp9T53zJODpWNFzRMMgUuwRHCAWkKBFgGeVP8gRNyT3l62Thz3Cd6w370ABJPkQ9VJ PQHtLbv853ruZPY3nwRi9FbQpd6TAyD1ygK5qzpeb92/D+UTfNkI/rdvpeFDLt/vKAPN MWBbTtiXOMeBF92vSvieTDUT/n+SzNtXUnBIbNlRgQ6NnxQq0TUBnDIHgQh7QPTgkt3u uJtIvLh2paU2p873N7/37p0i6PSCu0fMtHF3g3Nzf6V0C4VjJCpeYEKSjW8uevmaVzbu YA+lpcOLuoXhuXJFibGQxHe9fvD/6WIKCQ5K5/U+3ZHadpa4U3Tp4Btrm8YnHuosvPy3 XiPg== X-Gm-Message-State: AFqh2krkMGrR7fBJklSodL+gVZRi/gWERBAV3gt6upZz40kCDXYvS7uL j6+JoLsZt+HwkWdpvhGnoq8= X-Received: by 2002:a62:be0f:0:b0:588:d6c1:66f9 with SMTP id l15-20020a62be0f000000b00588d6c166f9mr5333009pff.31.1674017124362; Tue, 17 Jan 2023 20:45:24 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 20:45:24 -0800 (PST) From: Anand Moon To: Matthias Kaehlcke , Greg Kroah-Hartman Cc: linux-amlogic@lists.infradead.org, Alexander Stein , Johan Hovold , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 8/9] usb: misc: onboard_usb_hub: add VIA LAB VL817 hub support Date: Wed, 18 Jan 2023 04:44:16 +0000 Message-Id: <20230118044418.875-9-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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755334484952437129?= X-GMAIL-MSGID: =?utf-8?q?1755334484952437129?= VIA LAB VL817 is a 4-port USB 3.1 hub and USB 2.0 root 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. Add USB device id's for USB 2.0 and USB 3.0 root hub. Signed-off-by: Anand Moon Acked-by: Matthias Kaehlcke --- v2 - fix the compatible string and update the commit message - update the USB device id for USB 3.0 and USB 2.0 root hub. --- drivers/usb/misc/onboard_usb_hub.c | 3 +++ drivers/usb/misc/onboard_usb_hub.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index 9bf59792fb94..945d4e7125ea 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 @@ -417,6 +418,8 @@ 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 VL817 3.1 */ + { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 */ {} }; 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 163fc07abf25..0a943a154649 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_hub.h @@ -30,6 +30,10 @@ static const struct onboard_hub_pdata genesys_gl852g_data = { .reset_us = 50, }; +static const struct onboard_hub_pdata vialab_vl817_data = { + .reset_us = 10, +}; + static const struct of_device_id onboard_hub_match[] = { { .compatible = "usb424,2514", .data = µchip_usb424_data, }, { .compatible = "usb451,8140", .data = &ti_tusb8041_data, }, @@ -40,6 +44,8 @@ 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 = "usb2109,817", .data = &vialab_vl817_data, }, + { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, {} };