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: 13105557 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 BEDA1C32793 for ; Wed, 18 Jan 2023 04:45:39 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v+VAvyb8qF9TrFVlRZubatqWvjIvnn3cPDi8DQ1l30g=; b=qbSOnVUOb3XJNf 0m3CxytgMLpvnGbHyb+zsFWgq3pgQmh1tLAcCpVThMvnwRBrccmdfUp9EpMT39xSSqbAS3c+WNDRj DRO0FrKo2oCUzNuadg/bRB70GFuoNQeQzbuTTzAwtRZTzgMV6XnPUzeGv61mdCXdUT2mXtRJbroCE XvAyNnrdmqzLGtw8oF+pXAeJ9onfGxvg/11BBSpmErK7CoWCUn1aG8rZ1b9yYLvTHu881j/k6BswI WigSc3Jjt5XpTips6PFMhpNej+MfMuWexL9l0sI5fiqgVpUOY8YHFCCHyt2vYa7ZdrjfVfAqEgSvZ Qwn6M5XG1L/gmqSDGYhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI0KJ-00GtGn-Kh; Wed, 18 Jan 2023 04:45:31 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI0KC-00GtDP-Rh for linux-amlogic@lists.infradead.org; Wed, 18 Jan 2023 04:45:26 +0000 Received: by mail-pf1-x429.google.com with SMTP id c85so21963569pfc.8 for ; 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=RjsgJa1sbLMCQt4LqgwdcBgLTodYo068zJkRs3Q0RkR+W3iLkFPLxel7+pAsqNJxkM eorG7MZbgawk1lZIIgZmUwzJQZFiU/cst/J9EAqkruIDMNnYEKMYxg4yGMIOxoVjfmrp WRQtO+1cKx9qhTOK+YgGbCfddlnumckEyIVEvq66RdtBPHyN5Vx4pCSnCWJ/Jb90nHLU 87/mxnvknGqPk9sca37+73a6/s8VM0I4sPLM50upT/bfvhEqHl8VTm17VfX6GQtr5oth Gsq78Z9V8kLUhFTYMAQ/kI5nncbkDawmhXVsZkOIDUD9bCJGt0/Ce7L3hbj22nlbPvC/ 1h5w== X-Gm-Message-State: AFqh2ko8RYiJR6l/xlzou7IisXIk4L8Ww57ZaqhR5oRJb5hZP0aq0PP6 PqGK3myt1u4FbNhPCHTe4GY= X-Google-Smtp-Source: AMrXdXt5xk2t/sQ/51ctGAJEnM+Yurf7/AZjXNJCvnsmxW4tJY0w4R4su484w6z/qIAmqUPB/4+7Bg== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230117_204524_921522_E31FD955 X-CRM114-Status: GOOD ( 16.03 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org 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, }, {} };