From patchwork Tue Dec 6 05:52:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 30090 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2649304wrr; Mon, 5 Dec 2022 21:54:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf7PbaslwVzX8cV0r/Z5Y+Wnc1SjIHEjSwYbgEcFB5hxI3Pc5U9D0fGqXvwhoC77r2NGKtN4 X-Received: by 2002:a17:902:ce90:b0:186:ab02:664c with SMTP id f16-20020a170902ce9000b00186ab02664cmr69793903plg.49.1670306072780; Mon, 05 Dec 2022 21:54:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670306072; cv=pass; d=google.com; s=arc-20160816; b=XPV7bp6YC6+t8LyznYXKqJ3rVi6XVEjn1rs2NU5mH9bF0Q1LqRo7X3q2F4xNFNAvfQ lx6mZMRYn1yRcxPnK83v52FFvA/IIDQqaXTL2A6U+9x0hM9nnxbidXP+apBynnWyFKiT zhpiDyQ89S4NX8f6/b9J5DZCPb1UgeApBGqKpHxTchGfyYvXOzw/MmWlWJ/SfXGAWg4F NAiA21st7OFefFAtwWMBR/h5/vAFAWNcJNfOCNZ0jjU9mpfeMuW/bzaSgSIpJmY1YlXK oDxaUyGo/LUpG+5IHSj025AkCecZil/3d4GOEdx6KOwgzs9roMjAVrSaf1xLvAO23rzb oVcw== ARC-Message-Signature: i=2; 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=sHOF3TnzHZw0V45RTpvLywHN3uvsUJ95l1ZKet1nhw8=; b=NMNBpGqtkcD83C1V5fzmYme8Jyr028LsLs7KG6L/o1P1z0AxUXr3Z3VJs0pVAILdPC ZP859LWQAW9G7W+3FwzFrHouQ4vC9wgj9uMy1b2xvQlpSbfjlk/I8maWpEjajEuHNj7/ G9rvxh2RbBQu3MOcg/YF5ax/308dycszwsr/Ryicb4Gp82FI/isuVs7Pi3pkZTMQF5bS WApwMTbztstt+YE5pJAjzcjWbI6f6DMqt4Gks1DJ1hA0aU8XCgbNLC+PMJzAHaq55UYI v5iC2+Bxic6f0HqJY54CiFsC/Lj6wIx1Urz8CCG8YH6tqJbQ09dex4CPs5o3kVI6i5W2 ybSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@icenowy.me header.s=zmail header.b=fQqAhkGD; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l62-20020a638841000000b004787836f4d6si11734318pgd.396.2022.12.05.21.54.19; Mon, 05 Dec 2022 21:54:32 -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=@icenowy.me header.s=zmail header.b=fQqAhkGD; arc=pass (i=1 spf=pass spfdomain=icenowy.me dkim=pass dkdomain=icenowy.me dmarc=pass fromdomain=icenowy.me>); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233169AbiLFFxp (ORCPT + 99 others); Tue, 6 Dec 2022 00:53:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233289AbiLFFxn (ORCPT ); Tue, 6 Dec 2022 00:53:43 -0500 Received: from sender4-op-o16.zoho.com (sender4-op-o16.zoho.com [136.143.188.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDDE92183D; Mon, 5 Dec 2022 21:53:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670306004; cv=none; d=zohomail.com; s=zohoarc; b=bOJVzM1mCf/q6YgpYL0S9bwVSnEDutixt55QYLDc6L9NJEOrs3ZdP9wCKQuVoqOiAMmcvnzrGsJk/eBRafvTG4F4KaOkeZ57hPuIepErLMOVE/qtyg0XKQutnsl7bJ7aQjjiC664H11T31SdcEE1N2gZd61NTTcy5Wo4lUMJIV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670306004; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=sHOF3TnzHZw0V45RTpvLywHN3uvsUJ95l1ZKet1nhw8=; b=bNlzX62+GtE6mglu/Lmzh16ZTker1h/w5KZ6rDh7OiVvqQHSXxAIXE0K5WfldqXb/5xj483woHL6gXwlUYXxEFEPXZrnJDUHmhrkG+YIcIrTxysUJ6vSFFDJcR6+joF9zoZFgTbZE5JeyTmqg9hsIXFvszjzpcRisIeUqI3DQ8A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=icenowy.me; spf=pass smtp.mailfrom=uwu@icenowy.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670306004; s=zmail; d=icenowy.me; i=uwu@icenowy.me; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=sHOF3TnzHZw0V45RTpvLywHN3uvsUJ95l1ZKet1nhw8=; b=fQqAhkGDjoV36ub2QrIa5MucBnNXYh2NrHnJaNGhf1zw/w34Ok5IyJsdo+jbTPvm ruaGI/2teRuhix3vpc16qsfivBuYrTuwfjojRyJBr5Xac2OuClpMONmv8Pv7pTqUWHL P0KLIi4tAlFa0dvxdA1HRmc/yz/Db8AlEDwiiGyY= Received: from edelgard.fodlan.icenowy.me (120.85.99.143 [120.85.99.143]) by mx.zohomail.com with SMTPS id 1670306003064295.21778497328853; Mon, 5 Dec 2022 21:53:23 -0800 (PST) From: Icenowy Zheng To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Greg Kroah-Hartman , Matthias Kaehlcke , Andre Przywara Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Icenowy Zheng Subject: [PATCH v3 3/6] usb: misc: onboard_usb_hub: add Genesys Logic GL850G hub support Date: Tue, 6 Dec 2022 13:52:25 +0800 Message-Id: <20221206055228.306074-4-uwu@icenowy.me> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221206055228.306074-1-uwu@icenowy.me> References: <20221206055228.306074-1-uwu@icenowy.me> MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_BLACK autolearn=no 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?1751442860637052472?= X-GMAIL-MSGID: =?utf-8?q?1751442860637052472?= Genesys Logic GL850G is a 4-port USB 2.0 STT hub that has a reset pin to toggle and a 3.3V core supply exported (although an integrated LDO is available for powering it with 5V). Add the support for this hub, for controlling the reset pin and the core power supply. Signed-off-by: Icenowy Zheng Acked-by: Matthias Kaehlcke --- Changes in v3: - Add Matthias's ACK. Changes in v2: - Sort things, by names or vendor IDs. 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 d63c63942af1..94e7966e199d 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -331,6 +331,7 @@ static struct platform_driver onboard_hub_driver = { /************************** USB driver **************************/ +#define VENDOR_ID_GENESYS 0x05e3 #define VENDOR_ID_MICROCHIP 0x0424 #define VENDOR_ID_REALTEK 0x0bda #define VENDOR_ID_TI 0x0451 @@ -407,6 +408,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_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 34beab8bce3d..62129a6a1ba5 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_hub.h @@ -22,10 +22,15 @@ static const struct onboard_hub_pdata ti_tusb8041_data = { .reset_us = 3000, }; +static const struct onboard_hub_pdata genesys_gl850g_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, }, { .compatible = "usb451,8142", .data = &ti_tusb8041_data, }, + { .compatible = "usb5e3,608", .data = &genesys_gl850g_data, }, { .compatible = "usbbda,411", .data = &realtek_rts5411_data, }, { .compatible = "usbbda,5411", .data = &realtek_rts5411_data, }, { .compatible = "usbbda,414", .data = &realtek_rts5411_data, },