From patchwork Sat Jan 21 17:56:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 645399 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 87AE0C25B50 for ; Sat, 21 Jan 2023 17:57:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbjAUR5D (ORCPT ); Sat, 21 Jan 2023 12:57:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjAUR5C (ORCPT ); Sat, 21 Jan 2023 12:57:02 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EA27252A1; Sat, 21 Jan 2023 09:57:01 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id m3-20020a17090a414300b00229ef93c5b0so7065914pjg.2; Sat, 21 Jan 2023 09:57:01 -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=T/VSKDQbMfKNc4vbTKN5x3k2QwZYoCdcG6c1F2hh6IQ=; b=N/OIx3z9t4Uo5fQPEj9bdg0ERvScU+q6xoE8zCh20plLzYMf/9mTCvczSMgf1Khowl D5oxQJjdnSAR9nLO7b9k4CIRgjjscXzMl8LGbuFhen1oHkGcz+fe+yu8meWpsexNJtRZ ijac1+HzMQ7dCjqMcbtaYU54aqUXGQPsqsp89inHtgc/RZzp6bDh7hP0148iWyrL93I/ fLp0j8pz3h1StWibXfIzaSCBMmOc3v/usQPsHlVjGge3iNiBuVjtOp17Hm4AAl1IA00C GP7eBNc0RcVt+TkCmwEPzI0m9/rvS4q53BF4hRDTk7MXCLCW+4rit5dtqLF+xmxy2fph a7zQ== 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=T/VSKDQbMfKNc4vbTKN5x3k2QwZYoCdcG6c1F2hh6IQ=; b=k/+lJtFvdu/BE9ZnQeAga+pHdGtQ0i3to0r56+NHZ5LbTT7i34cG0QTfLdhYeb4DLy 6g89hP5+Cz1aMxn2O+JHlLtaPK2Py+9LCxMVVgNsdJl82vBZNeS8aRx3Dnp/uBUz8huR fVcaA72ICF3IoQcYw6Zv0RuTrWhUdRJbEZo93DWoUMr89lTG7ER8LTqr7E0mKL4Zzhms dYK2HIF/zMCQP4wysZd1ZtEArAiz8LldXAdUjqUw9noNduO4w3ElK59c2I808QN+OjfS vMQySxrs+/UiJ8+zXXTFeGZWptD1i0Mi9wz4caEfeDzez7cR5Chv3gb36Yk+Lm2uMqJz c3xQ== X-Gm-Message-State: AFqh2kql5aunxUe3GNVviQhsnef4fzGg0MQsG6Tc4hGZFifMERDqFcx2 mz5nAIgYYpXwv3StvPt58duV5KWQrks= X-Google-Smtp-Source: AMrXdXvALVURNZxMQoC6IgksCohu866TAnJyj6gUBO2UILqIXRqop3UNiLxFR7pIWHZBawt/TaiS2w== X-Received: by 2002:a17:90b:1652:b0:22b:b6b0:788f with SMTP id il18-20020a17090b165200b0022bb6b0788fmr6011515pjb.14.1674323820858; Sat, 21 Jan 2023 09:57:00 -0800 (PST) Received: from localhost.localdomain ([45.112.3.15]) by smtp.gmail.com with ESMTPSA id r3-20020a632b03000000b00478e14e6e76sm24857374pgr.32.2023.01.21.09.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 09:57:00 -0800 (PST) From: Anand Moon To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Icenowy Zheng Cc: linux-amlogic@lists.infradead.org, Matthias Kaehlcke , Alexander Stein , Johan Hovold , Krzysztof Kozlowski , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller Date: Sat, 21 Jan 2023 17:56:29 +0000 Message-Id: <20230121175639.12818-2-linux.amoon@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230121175639.12818-1-linux.amoon@gmail.com> References: <20230121175639.12818-1-linux.amoon@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add usb hub device id for Genesys Logic, Inc. GL852G Hub USB 2.0 root hub. Acked-by: Krzysztof Kozlowski Signed-off-by: Anand Moon --- v3: - add Ack of Krzysztof v2: - drop the vendor name from compatible string. - drop the -OTG and -QFN76 suffix from commit message. - drop the GL3523 USB 3.1 root hub device id. --- Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml index a9f831448cca..cc4cf92b70d1 100644 --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml @@ -16,6 +16,7 @@ properties: compatible: enum: - usb5e3,608 + - usb5e3,610 reg: true From patchwork Sat Jan 21 17:56:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 645964 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 10600C38142 for ; Sat, 21 Jan 2023 17:57:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229814AbjAUR5e (ORCPT ); Sat, 21 Jan 2023 12:57:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjAUR5d (ORCPT ); Sat, 21 Jan 2023 12:57:33 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C10EB26869; Sat, 21 Jan 2023 09:57:20 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id b10so8397237pjo.1; Sat, 21 Jan 2023 09:57:20 -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=/7SuZc4P45+/SBaDlaz2WkZ7htQPLlLb7VbRabYVtdI=; b=kP7U3BbF4sadebIHCzs1+Lz+rNORdylAzj5dWUqkea0xhy66aWxeL8r7yhN34neUsH eAUDm43C5lXA6WV2OAH+beRIkFhUYCnQs3skvsK58c7wUTN6PimZfExaowTrj6cUUYFD dlMpa/e/bI9cff+OQFKUNvKBjsl1KNGD5En5S6Uj+yJKPZPh2nAuUwopv568YrV8SQy9 W9MMKQsdgYluRXoo2xXX5WkJ/nPvkebnVwyEYMAwePhsWJaokVNCRUc6xEpeTBJkl9iY wT6PbkmvaQXmZ/rWky+ojiqdVlPEarl7BCO6QCjiqc4K7E+JGk0nkRI6sDAJL4VajY8A Y7sA== 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=/7SuZc4P45+/SBaDlaz2WkZ7htQPLlLb7VbRabYVtdI=; b=r43bXianzMkbMqUwNemIS0xd24CZSJCfO+HqGmhvgQBwXpBsVE9WWqzQzgV9+YYuxy URLHME6TREibvWs6UAFS/aX7pslK25ywEFRCfECD8fPgvvMi5ULSlQ2s2h6ZMCUMpYUd UGbmYLsd+5VtCcLHtTG8+rbwVAup48ieeY5NL/RtI2ckfId+8l6Dy4hwotzKWtBD0a1L 2dupKe9h4T4a02vPdrAk/Z1i0K/+4O/lR9HqhpaUCTC1MMV56Nbk8XL5qhwe9Aa5nya/ M9Mufx48tHaCjViFm6kj/X7uZOqpdB3XL1Own8me3DM7pjrfdfO5xpxMOeE7O60xn5Yb mtrQ== X-Gm-Message-State: AFqh2kqZi+oho70Fjsj32+aNDKHqYd0gKAHFXLCGD2QLN0ReXYBLJoIM yPWPvvEWMQ1P1PDM2MirlG4= X-Google-Smtp-Source: AMrXdXvpJKSkHiYRPl5XWzj2YzqDC9QAgz57GlKP9VkGjPfRKXn9vxsxzAJoEW2hF7bO5MlzwnB9jA== X-Received: by 2002:a05:6a20:d80e:b0:ac:b2a3:e39c with SMTP id iv14-20020a056a20d80e00b000acb2a3e39cmr18740290pzb.62.1674323840228; Sat, 21 Jan 2023 09:57:20 -0800 (PST) Received: from localhost.localdomain ([45.112.3.15]) by smtp.gmail.com with ESMTPSA id r3-20020a632b03000000b00478e14e6e76sm24857374pgr.32.2023.01.21.09.57.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 09:57:19 -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 v3 4/9] usb: misc: onboard_usb_hub: add Genesys Logic GL852G hub support Date: Sat, 21 Jan 2023 17:56:32 +0000 Message-Id: <20230121175639.12818-5-linux.amoon@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230121175639.12818-1-linux.amoon@gmail.com> References: <20230121175639.12818-1-linux.amoon@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Genesys Logic GL852G is a 4-port USB 2.0 STT 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. Acked-by: Matthias Kaehlcke Signed-off-by: Anand Moon --- v3: - Add Ack Matthias v2: - fix the compatible string - drop the -OHG suffix from commit message. - Add reset delay. --- drivers/usb/misc/onboard_usb_hub.c | 1 + drivers/usb/misc/onboard_usb_hub.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index 94e7966e199d..9bf59792fb94 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -409,6 +409,7 @@ static void onboard_hub_usbdev_disconnect(struct usb_device *udev) static const struct usb_device_id onboard_hub_id_table[] = { { USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 */ { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */ diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h index 62129a6a1ba5..163fc07abf25 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_hub.h @@ -26,11 +26,16 @@ static const struct onboard_hub_pdata genesys_gl850g_data = { .reset_us = 3, }; +static const struct onboard_hub_pdata genesys_gl852g_data = { + .reset_us = 50, +}; + static const struct of_device_id onboard_hub_match[] = { { .compatible = "usb424,2514", .data = µchip_usb424_data, }, { .compatible = "usb451,8140", .data = &ti_tusb8041_data, }, { .compatible = "usb451,8142", .data = &ti_tusb8041_data, }, { .compatible = "usb5e3,608", .data = &genesys_gl850g_data, }, + { .compatible = "usb5e3,610", .data = &genesys_gl852g_data, }, { .compatible = "usbbda,411", .data = &realtek_rts5411_data, }, { .compatible = "usbbda,5411", .data = &realtek_rts5411_data, }, { .compatible = "usbbda,414", .data = &realtek_rts5411_data, }, From patchwork Sat Jan 21 17:56:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 645398 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 A8E74C25B50 for ; Sat, 21 Jan 2023 17:57:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbjAUR54 (ORCPT ); Sat, 21 Jan 2023 12:57:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbjAUR5z (ORCPT ); Sat, 21 Jan 2023 12:57:55 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95DD3274BC; Sat, 21 Jan 2023 09:57:34 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id v23so7995400plo.1; Sat, 21 Jan 2023 09:57:34 -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=YWhDX4KFx106+qYAgyDcB+XV4NL80nKQ25X8LQ/8aus=; b=ptnIGJ7DHlTlXBsb2o7MvDKWy8JBZq11tBcdFBh4UHANl+tKS+pEJZ8tT7YNHuAnyA TSufAnWU1xEd3/+wEjZxB6rDVlH5WeOl6Poo/QwTSMsYdnEpGyznE0IDCxNk2Ob0dUXl aCOfkWwWk/+76atl6KE0kb9cDkgsYb5EY4KfOxSlraTC02RehhvwRUGBJEUfEVv/xmjQ OJ8bda9FoymRtpZNoFKAqotul3t9BkNOyz1/KqMkyCdSats/qU5zirhpKBuHzDXP6N1f B0HaBrk8luJEYD7LQzp9vQN0GtsB2RdF6MZV8WSHiHuega+vq/biFnbASLT0/49mQXH0 h0ZA== 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=YWhDX4KFx106+qYAgyDcB+XV4NL80nKQ25X8LQ/8aus=; b=stk6Jqb8YnO3BnJDPNdvQSqtCCMCgpCRzyYGcjck3uOsZaSlBLG7za037Mf7KX8qJY rdA3QnfmAP8W2cJCbQeYWUrGHw4GraO23kueA33U9+XMt2EE3kVvDw/n1b0ZhxzYn3wk xz4d/W30c6BhAFuZSIIU8ROC6BXox3CrRfGXhEDQJ9IFDVDvpadb8kd3L074sxVqVrpl MtFUqXBCSgV9tKq94/2kzEvUDgQsun5BGcV2TkxBHCfDbW4idzx+ymicBPoHEXIubDG0 CaJsUlfyZpQw+YaRvSQIqtz4O2RGw9x4YlFd1jokXVB1eNS12K8NTJ8goVbiHwNYsoWL zoFQ== X-Gm-Message-State: AFqh2kpNDZGAphEmhEaVAqjA8tVQ+tK5CTuzd9iOtEXitr0RXXYE+hDS B4E2EOO6jh7O6rUyn3aZnxg= X-Google-Smtp-Source: AMrXdXtkECfuRVbf5RNXn7jC9dWHZYTvp6jDX/+/JRhq0UUsYz3F5pz49H/ZJ7msZ33qySMylf336w== X-Received: by 2002:a05:6a20:a593:b0:af:aa38:12e0 with SMTP id bc19-20020a056a20a59300b000afaa3812e0mr22380250pzb.34.1674323854075; Sat, 21 Jan 2023 09:57:34 -0800 (PST) Received: from localhost.localdomain ([45.112.3.15]) by smtp.gmail.com with ESMTPSA id r3-20020a632b03000000b00478e14e6e76sm24857374pgr.32.2023.01.21.09.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 09:57:33 -0800 (PST) From: Anand Moon To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski Cc: linux-amlogic@lists.infradead.org, Matthias Kaehlcke , Alexander Stein , Johan Hovold , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 6/9] dt-bindings: usb: Add Via lab VL817 hub Date: Sat, 21 Jan 2023 17:56:34 +0000 Message-Id: <20230121175639.12818-7-linux.amoon@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230121175639.12818-1-linux.amoon@gmail.com> References: <20230121175639.12818-1-linux.amoon@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The VIA Lab VL817 is a USB 3.1 Gen 1 hub and USB 2.0 hub controller that features 4 downstream ports and 1 otg, with an internal 5V regulator and has external reset pin. Add a device tree binding for its USB protocol part. The internal LDO is not covered by this and can just be modelled as a fixed regulator. Add combo of USB 2.0 and USB 3.0 root hub using peer-hub. Signed-off-by: Anand Moon Reviewed-by: Krzysztof Kozlowski --- v3 - address review coments - Krzysztof dropped dr_mode v2 - fix the compatible string and fix the $id - update the commit message. - update the example for use peer-hub node because it combo of USB 2.0 and USB 3.0 hub. - rename the yaml file from vialab,vl817q7.yaml to vialab,vl817.yaml as q7 suffix is ued for USB 3.1 and q5 suffix is used for USB 2.0. --- .../devicetree/bindings/usb/vialab,vl817.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817.yaml diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817.yaml new file mode 100644 index 000000000000..23a13e1d5c7a --- /dev/null +++ b/Documentation/devicetree/bindings/usb/vialab,vl817.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/vialab,vl817.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Via labs VL817 USB 3.1 hub controller + +maintainers: + - Anand Moon + +allOf: + - $ref: usb-device.yaml# + +properties: + compatible: + enum: + - usb2109,2817 + - usb2109,817 + + reg: true + + reset-gpios: + maxItems: 1 + description: + GPIO controlling the RESET# pin. + + vdd-supply: + description: + phandle to the regulator that provides power to the hub. + + peer-hub: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle to the peer hub on the controller. + +required: + - compatible + - reg + - reset-gpios + - vdd-supply + - peer-hub + +additionalProperties: false + +examples: + - | + #include + + usb { + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub_2_0: hub@1 { + compatible = "usb2109,2817"; + reg = <1>; + vdd-supply = <&vcc_5v>; + peer-hub = <&hub_3_0>; + reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + }; + + /* 3.1 hub on port 4 */ + hub_3_0: hub@2 { + compatible = "usb2109,817"; + reg = <2>; + vdd-supply = <&vcc_5v>; + peer-hub = <&hub_2_0>; + reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + }; + }; From patchwork Sat Jan 21 17:56:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 645963 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 BAFF8C25B50 for ; Sat, 21 Jan 2023 17:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbjAUR6R (ORCPT ); Sat, 21 Jan 2023 12:58:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbjAUR6Q (ORCPT ); Sat, 21 Jan 2023 12:58:16 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6BD9265B8; Sat, 21 Jan 2023 09:57:47 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id jl3so7955209plb.8; Sat, 21 Jan 2023 09:57:47 -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=KGtMPXG+Aka08SYYYyo/KkQe1dgGt7Jtohr7QlueNXo=; b=CDHKAHMPL7wIv23meaxe+3ZzUxHgMo5m6Tm4N/VqgoAGblTS+VmcmY6flogCoaD980 Z8pvO8Mbg1842kAFblDR2hLPxfoJaT1oUIB0GCNaJP4HD9RDviBwsUTsDW0YTui/cTV/ rLb6waQCHhShKnIkxASdlZoQ7ixPTW/EW1hGuUjg/ZPThzoHLTTa68cpolyDrUaCrUK9 4NxJ4IFDduAxiAYvLCoMPrHhEac+PsDLt7HVQId0Qu96dSUm5mY1iHtjW5+daiYkk++q xiCYnORnV1BVuymOBx/jILTcrrZFKukg/Z9Cp/pvjFBl1niuu+bvDTwINYR77qqkQ1Sn 11zg== 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=KGtMPXG+Aka08SYYYyo/KkQe1dgGt7Jtohr7QlueNXo=; b=P1gvtcTUCNah0CkcZ0J0I4s65n+ybvwoQeFMaR5tMNxUbyEr6Ckzoh4hRtPCQIg0Cu HtIjLahjrjUa1pkCPFtl7XpWROT97wl/DK/UyddqA0UkZFgSdgRLeUCRHz8FzEQW5wg8 IWy/Lu33akMoH7TEGvKix9hRltdgRWi5sOf84gsOdHeJ734ZuTfjXJrykwsA5n+OjRom EO6hDZ01FW2ztkfZ5M2gWHDuMLdd5p6fXkL8v7h2ZgUOtlCFLXC1pEwz7Dc9A/5qG9hS cc2Bk7qswUSfOQPwLO4Awl4eVLZK+8u4yvTmDFGM+oIH2Jw4lJ1pCPMWOUXLZWF9YhAe Vv0w== X-Gm-Message-State: AFqh2kqOHRmK8cpy4xJ5YtwZb2JkkPRmolFB8Pun0FvP07Dc7RdfQ6Ud ZeknIaBsAEo4Hrb059mrDSc= X-Google-Smtp-Source: AMrXdXvI7b8pbgzCZcQDa0EQ94L2M5q99LsBpbLZlfEUjgkB1i5500YQOa7vzYwZfWYDNT4GCK91+Q== X-Received: by 2002:a05:6a20:1601:b0:b8:c659:9d51 with SMTP id l1-20020a056a20160100b000b8c6599d51mr23177312pzj.56.1674323866966; Sat, 21 Jan 2023 09:57:46 -0800 (PST) Received: from localhost.localdomain ([45.112.3.15]) by smtp.gmail.com with ESMTPSA id r3-20020a632b03000000b00478e14e6e76sm24857374pgr.32.2023.01.21.09.57.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 09:57:46 -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 v3 8/9] usb: misc: onboard_usb_hub: add VIA LAB VL817 hub support Date: Sat, 21 Jan 2023 17:56:36 +0000 Message-Id: <20230121175639.12818-9-linux.amoon@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230121175639.12818-1-linux.amoon@gmail.com> References: <20230121175639.12818-1-linux.amoon@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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. Acked-by: Matthias Kaehlcke Signed-off-by: Anand Moon --- v3 - Add ack Matthias 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, }, {} };