From patchwork Tue Feb 27 09:02:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Macpaul Lin X-Patchwork-Id: 13573420 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 846AFC54798 for ; Tue, 27 Feb 2024 09:03:06 +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=ECwdEb6OHT1tHwW1sJuwKftnxsZLJnRnYBGjWiLhF58=; b=XvijlIm0x0p/qa QHhSjnO0nZitA6CeOAfCQ6ya6fZ+AWS9x80eINJkot2XvStB67A7haGRIOpfKGugS0bRvPUSJ9CUp TXkCRX5LRan6bcNiuc2rjTP5MaL+qjhhqJYAIzwSYAWwGpEoulpS/36T/xPEWDcbYulbTSDmYBFIp ujpvxufj3hAi5o14TGb5HK/z69uwHAYsOZad05EMlgBmJ+hdQOcNUBky/2dLVKAolIfjTYe70bVgj ulGCunkeCoBwc3cv+1U1b6Sq/tsAxCpI0efzTp4dS0sfDzXs0GaWTPRJeAkc+c7HTqCoH/FNNtAVM 4BY/NpRCqdzDVU7cr65w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1retMP-00000004QsD-1a8m; Tue, 27 Feb 2024 09:02:49 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1retMM-00000004Qqx-1bzQ; Tue, 27 Feb 2024 09:02:47 +0000 X-UUID: f577c4aad54e11eeb7b09fcafcf55fec-20240227 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=8OThIfn6BIQq05HaqmPcAmZQvWHQOfMXh3CrMlCShBo=; b=bfN7JS4oKqWjny3XooJ0iH9PrtLmM60LgtHNzgpteQ9DVr96y3BnrW3vXcV3IYjGJpfT+ZrFn2rP7tmGlhLpWGcjFj6f1InguoTSUT3K3NKZdAKwmpsWmyEAaRGmdKgSCICAylCez3C+V7N3uljJ+GmqrtHSxftVaKPep5n5YIs=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:5b558708-cfd1-434b-ba41-e0a4a002a0c0,IP:0,U RL:0,TC:0,Content:-25,EDM:-30,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:-55 X-CID-META: VersionHash:6f543d0,CLOUDID:0c59c58f-e2c0-40b0-a8fe-7c7e47299109,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:2,IP:nil,UR L:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,S PR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: f577c4aad54e11eeb7b09fcafcf55fec-20240227 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 476591919; Tue, 27 Feb 2024 02:02:39 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 27 Feb 2024 17:02:36 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 27 Feb 2024 17:02:36 +0800 From: Macpaul Lin To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Matthias Brugger , AngeloGioacchino Del Regno , , , , , CC: Bear Wang , Pablo Sun , Macpaul Lin , Macpaul Lin , Chunfeng Yun , Yow-shin Liou , MediaTek Chromebook Upstream , Chen-Yu Tsai Subject: [PATCH 2/2] usb: misc: onboard_usb_hub: Add support for TI TUSB8020B Date: Tue, 27 Feb 2024 17:02:28 +0800 Message-ID: <20240227090228.22156-2-macpaul.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240227090228.22156-1-macpaul.lin@mediatek.com> References: <20240227090228.22156-1-macpaul.lin@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240227_010246_482471_6D9CD5F9 X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The TI TUSB8020B is a 2-port USB 3.0 hub. Add support for this hub in the driver in order to bring up reset, and supply dependencies. Power-up: Issue a GPIO reset (GRSTz) 3ms after VDD and VDD33 stabilize. Signed-off-by: Macpaul Lin Reviewed-by: AngeloGioacchino Del Regno --- drivers/usb/misc/onboard_usb_hub.c | 2 ++ drivers/usb/misc/onboard_usb_hub.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index 1e169c97f45e..e19c11a64923 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -457,6 +457,8 @@ static const struct usb_device_id onboard_hub_id_table[] = { { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 */ + { USB_DEVICE(VENDOR_ID_TI, 0x8025) }, /* TI USB8020B 3.0 */ + { USB_DEVICE(VENDOR_ID_TI, 0x8027) }, /* TI USB8020B 2.0 */ { 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 */ diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h index 373192afd022..874473e60132 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_hub.h @@ -31,6 +31,11 @@ static const struct onboard_hub_pdata realtek_rts5411_data = { .num_supplies = 1, }; +static const struct onboard_hub_pdata ti_tusb8020b_data = { + .reset_us = 3000, + .num_supplies = 1, +}; + static const struct onboard_hub_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, @@ -70,6 +75,8 @@ static const struct of_device_id onboard_hub_match[] = { { .compatible = "usb424,2744", .data = µchip_usb5744_data, }, { .compatible = "usb424,5733", .data = µchip_usb5734_data, }, { .compatible = "usb424,5744", .data = µchip_usb5744_data, }, + { .compatible = "usb451,8025", .data = &ti_tusb8020b_data, }, + { .compatible = "usb451,8027", .data = &ti_tusb8020b_data, }, { .compatible = "usb451,8140", .data = &ti_tusb8041_data, }, { .compatible = "usb451,8142", .data = &ti_tusb8041_data, }, { .compatible = "usb4b4,6504", .data = &cypress_hx3_data, },