From patchwork Wed Jan 18 04:44:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 44962 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2143487wrn; Tue, 17 Jan 2023 20:47:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXt7LVNzLA9azXNT5qEjRr6BsS3NcuV42uq8jaSrsXCAxEqc5NExr8F54MwAOMmU/0evX0Ny X-Received: by 2002:a05:6402:3786:b0:499:8849:5fac with SMTP id et6-20020a056402378600b0049988495facmr6200886edb.40.1674017257152; Tue, 17 Jan 2023 20:47:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674017257; cv=none; d=google.com; s=arc-20160816; b=vTSAv5qzTzEGGw3MzxeKYye0vl3FDWgel1pPBz25XoJXc0HGPHzxMV1lNpml0FCWB3 O3vVYiy2czzlFLx1H5uaGJ4+vJkX1AOHQ7fGtL5tdbVbCyQalT0T9AB2vS/e9xsz2mG8 VYtHJTpwOpejZvwgYhPJfUyEOs87cch9E1vQ+w5Whej2TT3jnN03VCfEWjcjWadEbqDs HdhmAEElqg4yANCbxnZWOgsXEvWnrbEvGylMYrEHX4xrpX/sVLMkdlL6/zgpurDG9KQu hndzMaZBT2CIyUNQfPAx6SFb0NIC9tHlYwzD68T6BZtxpMuRdhRrvqzJ5dL1/BbQgY0M s+1A== 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=D62QMVerlbHiyJGnbiMPg5OFumoXXbcE1NYnWS92Nek=; b=iyX62tYJMbwCS7EFYpI8lXqD4gwgxCFiv8s9F+XO/A+K0iY3heiFvh8cnFQ5M4msQe Qbgvpy5FuJ+6bDacXIvJS1Lha8KARwX74+w6OphMY1ylLzriZBg7qPuC3yvV54AxI6Oz PQP1Y6/rU6wHUO3G2S0FlejcgnRkLpLo7jxs1k9vzV53Nzkes/8oa3Wl8dogJVllZQgU dQyNc3xXTP4NllwfiUxwsi1XMy0VpDFZv82Phza12OGRiWPfQbmKozlDwsGrpD8Xk/bc mTa8ZGsF9pBeToaQlFiaRMkRwMaOgC1cVeLY9+3FVqvjfrB8XBloORolJir6z/a/XDHX sUNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YnwAJLYY; 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 sg9-20020a170907a40900b008650ce2979asi23228861ejc.544.2023.01.17.20.47.14; Tue, 17 Jan 2023 20:47:37 -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=YnwAJLYY; 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 S229606AbjAREpN (ORCPT + 99 others); Tue, 17 Jan 2023 23:45:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjAREpA (ORCPT ); Tue, 17 Jan 2023 23:45:00 -0500 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9878654B3E; Tue, 17 Jan 2023 20:44:58 -0800 (PST) Received: by mail-pg1-x534.google.com with SMTP id 141so23667206pgc.0; Tue, 17 Jan 2023 20:44:58 -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=D62QMVerlbHiyJGnbiMPg5OFumoXXbcE1NYnWS92Nek=; b=YnwAJLYYmNrSJ2611D8WOEipldiLlKr60N05t7pGUjMqmf/PaOVcD+iBQ/bEdKOGuK Aznvm7XYmCkQNTrBzKwF1SqJRuIWi6i3zbCKL3UOOOymZ2ruJYhTeJqwcRECp7kGHL7d DI4VR2JmcSEDpYKFERHE4BJumSUntUJkuA+9tFf34Pj5nS91b7eQv0Dgo/+1suXw/AQd NPyUZByJZq0f2mcsSqBGDwcD0cSBeBJZaGQKTJ83jCyCTU/tMA5RJGXg4lMZa426XsJk wYinfYfa0HKImcaD3Qyqr6aqNS6D4mvxFqWwYSfJFIL2Bv9UhxAHUKi3VRspIi7ll9aR DzUQ== 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=D62QMVerlbHiyJGnbiMPg5OFumoXXbcE1NYnWS92Nek=; b=JDPFo4g/Iu1Op4thv7yNVTsmbzouCJn653pAZSz8qPKERyWLl5KHVvFYUQ+vzf6yM6 tT0v1qjH5sAnFuj8ovBVmENRmQ76gm9uvYfbyCpkJwqWRC6qc3BzwvI5nCjFWNFiwD3W 2eiZCKRVaSBylO5sbcd444YygoK+LLSEpzC6LgDa0tZ64zKFGxEDCaQlvp9Jy8bV3XmM dsOyZob5XZeIeBY4aptPobwiiCGumSLSSU+H25blX2GAEhhzRbrNXOl2569RCGQvOChC sNhdFZdBehOIEbzvbXmRNy03d7siaTvti7Ayi/JiRrBwv/UHAhJqMenNz4vV2q5dTBUE BYOA== X-Gm-Message-State: AFqh2koYne3ALRuLUo/D/AVqglGhp7MJtb435285AVkPO1FzrOiT7a66 fNZ5ZSNE53MCFnkwXguHsf0= X-Received: by 2002:a62:1507:0:b0:581:6069:5c00 with SMTP id 7-20020a621507000000b0058160695c00mr6413991pfv.28.1674017098355; Tue, 17 Jan 2023 20:44:58 -0800 (PST) Received: from localhost.localdomain ([45.112.3.15]) by smtp.gmail.com with ESMTPSA id i1-20020a056a00004100b00581a156b920sm8682770pfk.132.2023.01.17.20.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 20:44:57 -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 4/9] usb: misc: onboard_usb_hub: add Genesys Logic GL852G hub support Date: Wed, 18 Jan 2023 04:44:12 +0000 Message-Id: <20230118044418.875-5-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?1755334319305027816?= X-GMAIL-MSGID: =?utf-8?q?1755334319305027816?= 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. Signed-off-by: Anand Moon Acked-by: Matthias Kaehlcke --- 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, },