From patchwork Fri Nov 8 03:59:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Yadav Abbarapu X-Patchwork-Id: 2008229 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=bBQq9F2J; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xl50y4fG5z1xyM for ; Fri, 8 Nov 2024 15:04:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38A7288F4A; Fri, 8 Nov 2024 05:04:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="bBQq9F2J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3779488E63; Fri, 8 Nov 2024 05:04:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on20610.outbound.protection.outlook.com [IPv6:2a01:111:f403:2409::610]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7410E88EC6 for ; Fri, 8 Nov 2024 05:03:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=venkatesh.abbarapu@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qMz5YWLQ+GhpkcKMZYDvj6IAKuELFXtF49Lx1n4dc/3EWTPEY7iV/UkM4wKOtLWgm4F/rz1qnvwyBoOsJ6GfxRUdbVwGJMB64H1Tz/RA9wX74vebQ4IVYG3grcy4HCGlU5LrElNbG51aYv5OHoTaifjp9UqzdEcWUbDjNHAO6SRo2hY8426R3KJVltDzE5vsnjAYOX2OZOaK7yWY38gONJjNgSqxFzSAiaNPdkZ4leXokAv8dIgUaY1FrBPYzVcVMywvFMAA6Qpv3kGIm4ff7AlzmIxpUfhMu3nYMd5Zo/702//uyUTpWwqt8SqSLCQi+1oW89WStj/ZMLzDTZeyMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y1szPMcWraebpb1rXX6KKfmqS2n1sWKjIM1r0BJvYa0=; b=bbP9SgFdOhqxuqXFHjaQLepuMf9zHtZNxNrEwslK53byGiXCsgP8MYgRuCXzFAPy+6J9fpuhZ+DOrCImNu+LiJH+CI+loBb/UTlBZ0uLvxcQwElLTitHsO2xajQJXVTIQ6+pNtI+yxnEy0OrqsTgaURaf8CCxnkd37DIgDZQTGeHWhu/EMd4gmHvAkfnf3T5XF2w0TsLuDx9v83dTF+FrdP5XLOkZvKUrXlMhAZ/KqhvgdhBmylwjfP85aQZld3vfnWRWKkOLM3YMsYPz280zskyW9bd0aKdWpT6sBksCv97x4UyxE2D5UnEEVxhkTUoPfZlKIVPoeK4vfEoThIQVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y1szPMcWraebpb1rXX6KKfmqS2n1sWKjIM1r0BJvYa0=; b=bBQq9F2JWk/xoRgYezYfzOJfVjRSLhDU9ugR3FH/ksXcC2X0khwrVg7lKIDHPhbVT9nZR9/C8w1HPCKjcHLhEDdf3WOAMO/QHDGqTBfZA6gOFBosMMqVtEXdREfc/pjM6Y3VK/HkzXqYLCgdV5e/feuWTTbTykML23uk0qPtlsg= Received: from BN9PR03CA0957.namprd03.prod.outlook.com (2603:10b6:408:108::32) by SJ2PR12MB8781.namprd12.prod.outlook.com (2603:10b6:a03:4d0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.20; Fri, 8 Nov 2024 04:03:56 +0000 Received: from BN2PEPF00004FC0.namprd04.prod.outlook.com (2603:10b6:408:108:cafe::32) by BN9PR03CA0957.outlook.office365.com (2603:10b6:408:108::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.20 via Frontend Transport; Fri, 8 Nov 2024 04:03:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF00004FC0.mail.protection.outlook.com (10.167.243.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Fri, 8 Nov 2024 04:03:55 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:01:20 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:00:10 -0600 Received: from xhdvabbarap40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 7 Nov 2024 22:00:08 -0600 From: Venkatesh Yadav Abbarapu To: CC: , , , Subject: [PATCH v10 1/7] usb: onboard-hub: Add reset-gpio support Date: Fri, 8 Nov 2024 09:29:53 +0530 Message-ID: <20241108035959.19970-2-venkatesh.abbarapu@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> References: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: venkatesh.abbarapu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FC0:EE_|SJ2PR12MB8781:EE_ X-MS-Office365-Filtering-Correlation-Id: 414a49d8-0458-4e46-c6dc-08dcffaa5d6a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: s9cG4+SwqzlsO9Z0SXQt5jCasLfJqPgDHNQUIPYKI3hvQFPdy3ldVmxK8wsSooXtyxD0/17loeybg8w/M6PoQoOcqys3cNWBkOEnppoPbNXYL6rs9O97il6IjZJrixKvl+74eMbaVGQyqPw+mXfOT219IK2tQF2v6Ch07veUwaKQvhQEjzstBOJ7edhZhIoOZdWTFDLNM9KHtjRUqVnAVyLzW87Filz7tvyd0cXI1M054zgb5VB2PA8/e1hUQ3cFxKo8PzzyHaWW0KcSNNy/mx4OXGSiKt4gXRuFuSSkU8u47kS7m5ARBBky4jEtVJu4BlGspYCY8IFlwsesVqaQv7g/iyYdiRe9y1iFrQzmQPgj5i65QyFEiOg/cTMEkxwZorUbcu2VYrlaIguW1il5WicQHWioU2Ua/EBp5O707ownAJKg5PjJpddv9Bzk523gxnymPDjYfV70kvyKme7fz3j/w6Vp4OaHHBw16/o3oCOi9K9MDT75XJvayQQcKDkXtnDU5UxJ692sOF+2zGvJtBPfeatsElfdli6dlsDncrqVybpBbVs8hOK1jYB4RjrH8qa7mThlzA5VNdDdd6Vcafm9BZSlaObKyp1ZCH2lHhZpwURNQS6E3vEVeAoWsJ9fmC8UAj75jo4ijvcN81qxKg3OnQ39EK7gpHOFy6i2hazfncAw/bxX7OCm1wixShICjGjeKvrWeboHYLxr/oTcANUIwMmjZNp9Mat0CwQjLT5clcrA3pmf6ceRuDTd3vtZbGrAj7qy2S6X9MLJq+rbRdcp2mRZMgaxsb5nZLbAIRpQ+GeZTcznsuBEvVztPxQlOFvBephfpUk7GdjXC+ah7TAxhdoUBosOeAWlNHBGz9SgR3hvBkHIAkk1IyqRbQCON0jF8fGlAxcxUKd/C7m69pWg92vi4qQHBMSC4OTJaOuOUV/z7BpqM7zgc4sHGWpl0vI/RBDj71p2qGvkg0zNmH46Zw93HFQebyhmzU1TMk7KJBdQ+7dextRPKF1PPRUYwALUdC+2iCXUKzBfz1fzDlYUPaw04I6BT9aY5FLtUICYnyTihd6m9ww50C4j7BX3UlcAGKteuO63axRYDl5Mx5H2E78Mh4/SBHg96fxjpZvbo03N2MyxY9HKHPf94chGbTFuUZRsyuK+Cu31IzOcGW1jEADvpmpB0X6hj1n23TMqqvLtuA6DDYpkYAiRF2exR4nx1xYdBysUgtllrNVJQL4S6b71dgaLe7BBBGHh08KCepOR+07QpUAg03Y0w91F4if1I0VPfW5JLWm8lsFmIIIZTIrcV5Sy3myzPboGSvFEgR7kt07mnIXp8VEexI3QCoMWlgFBJw914P+g8cgweyiRdxlmS+plTk4G2FFh+825yEQAqDgHHqhWNOlEI7lXDOp/DRvF21eFV5wwedYJlw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 04:03:55.5787 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 414a49d8-0458-4e46-c6dc-08dcffaa5d6a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FC0.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8781 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean As part of the reset, sets the direction of the pin to output before toggling the pin. Delay of millisecond is added in between low and high to meet the setup and hold time requirement of the reset. Signed-off-by: Venkatesh Yadav Abbarapu Reviewed-by: Marek Vasut --- common/usb_onboard_hub.c | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 68a04ac041..43f4cee40b 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -7,14 +7,50 @@ * Mostly inspired by Linux kernel v6.1 onboard_usb_hub driver */ +#include #include #include +#include #include struct onboard_hub { struct udevice *vdd; + struct gpio_desc *reset_gpio; }; +struct onboard_hub_data { + unsigned long reset_us; + unsigned long power_on_delay_us; +}; + +int usb_onboard_hub_reset(struct udevice *dev) +{ + struct onboard_hub_data *data = + (struct onboard_hub_data *)dev_get_driver_data(dev); + struct onboard_hub *hub = dev_get_priv(dev); + int ret; + + hub->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_IS_OUT); + + /* property is optional, don't return error! */ + if (!hub->reset_gpio) + return 0; + + ret = dm_gpio_set_value(hub->reset_gpio, 1); + if (ret) + return ret; + + udelay(data->reset_us); + + ret = dm_gpio_set_value(hub->reset_gpio, 0); + if (ret) + return ret; + + udelay(data->power_on_delay_us); + + return 0; +} + static int usb_onboard_hub_probe(struct udevice *dev) { struct onboard_hub *hub = dev_get_priv(dev); @@ -30,7 +66,7 @@ static int usb_onboard_hub_probe(struct udevice *dev) if (ret) dev_err(dev, "can't enable vdd-supply: %d\n", ret); - return ret; + return usb_onboard_hub_reset(dev); } static int usb_onboard_hub_remove(struct udevice *dev) @@ -38,6 +74,9 @@ static int usb_onboard_hub_remove(struct udevice *dev) struct onboard_hub *hub = dev_get_priv(dev); int ret; + if (hub->reset_gpio) + dm_gpio_free(hub->reset_gpio->dev, hub->reset_gpio); + ret = regulator_set_enable_if_allowed(hub->vdd, false); if (ret) dev_err(dev, "can't disable vdd-supply: %d\n", ret); From patchwork Fri Nov 8 03:59:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Yadav Abbarapu X-Patchwork-Id: 2008225 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=harEk5Ym; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xl4xn35Qnz1xyM for ; Fri, 8 Nov 2024 15:01:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15AFA88D9C; Fri, 8 Nov 2024 05:01:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="harEk5Ym"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E76A588D5A; Fri, 8 Nov 2024 05:01:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on20614.outbound.protection.outlook.com [IPv6:2a01:111:f403:200a::614]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C4AD088DFA for ; Fri, 8 Nov 2024 05:01:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=venkatesh.abbarapu@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EHiRGCDu4yWZuuGatMGV7Ty5v3EPeg+V/zDP+I9RmBdoHgV6iKog+2x4dvl1QoE0LkKJlhFIFcRA3XDDS2FnOfDwkBLHFc8121BIbOBnX61H6EXEqbXX+vu6cb7+QSyFKYdnHkPbpT6sVQPBk+VUBQlYvy9TS/rOD3YMhwyRLk7Kpp2Z5nWiBqIBLzjUQmRTLNBLq6UydChX6KSSXMWOv3jg7cSGT/iuqHKP/kKBqaJ9wFGcqSulXf9AbbsAX7mNbbpFI6E/gpisEvT/JdfaxEOxCA++TOfxOZ83YaEYCunZc8UwFgFYF1vR7h2mzMtMkg/hABxC3qXfiJY3TcazbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1CPSTY6hPGfb1sbgYRaAW2wr07nN6WBQ4wAkrsH6+Y8=; b=d2SJS/QCrQzNN70I/kfocds1wVt3LKRKUmSsuvEnE7J4VBCoeqS5BOsvw1lh5mKVIOEO3cIFOpsusDwQsBR8WbZdUkY+vSgxSelw0Oi1VyHdSBZa84r2AqOSed++Bhmf9IM1BF1nwzurANl9fNRrHJuDI6vhAg5j1/1ujklzFCzEgIn2Pj5C47FGTL4pWRDQ7lwcWz28bi+JeCrAtjYB9GDtfOk7Us7jwhK23kvnKjnI7oj28/no0uNpH17Ie9konycyzazyOTYDKlBIuzNUOcHr1xYtzdelFq/xN5p+rorSiyVkmNkoT1Jfnm8oXLkZ4Kj3gP11BdUDwE5WGwuUCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1CPSTY6hPGfb1sbgYRaAW2wr07nN6WBQ4wAkrsH6+Y8=; b=harEk5YmowdfUOG68WC9vrfRUNIOsEQggJhZJsZ91D/Oy7XBBt/3sm8th4iVwjqCxEvDXZqHy5dwcqrFWC5A1/MCsSjjkwkyLYhCr9PkKUGsznr7AucCPurL3jQUhM+A9J/MJbwK7H+D5b6Y/Ad6IzY0XZhM/Gx5JXPGcDRUNQM= Received: from MW4P222CA0029.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::34) by DM4PR12MB5770.namprd12.prod.outlook.com (2603:10b6:8:61::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Fri, 8 Nov 2024 04:01:23 +0000 Received: from SJ1PEPF00002319.namprd03.prod.outlook.com (2603:10b6:303:114:cafe::f1) by MW4P222CA0029.outlook.office365.com (2603:10b6:303:114::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19 via Frontend Transport; Fri, 8 Nov 2024 04:01:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by SJ1PEPF00002319.mail.protection.outlook.com (10.167.242.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Fri, 8 Nov 2024 04:01:22 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:01:20 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:00:12 -0600 Received: from xhdvabbarap40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 7 Nov 2024 22:00:10 -0600 From: Venkatesh Yadav Abbarapu To: CC: , , , Subject: [PATCH v10 2/7] usb: onboard-hub: Fix the return values of regulator APIs Date: Fri, 8 Nov 2024 09:29:54 +0530 Message-ID: <20241108035959.19970-3-venkatesh.abbarapu@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> References: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: venkatesh.abbarapu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002319:EE_|DM4PR12MB5770:EE_ X-MS-Office365-Filtering-Correlation-Id: a36a5314-41ec-4d0e-f0ac-08dcffaa0234 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: XeL0U05GwJBpEnJvt/DEGzeCCg1L7YrGpcrZ8CeUkv0afzn2sLKCIuAZfPg32s/AJP+KA3jsxMi7Ebe4sbbz5UfimVVHSzblbtwRYDGSf8vITzCg8Jr7k5M5bMnCU/VdlfgAXsyZq+xUEIu02t1foXa4U1patPZWrLDqXBdt5EpjhPSjHWYqeYAl9yPyWOXrgDUr8eK9hT9TZmFgCfDYwKh4z1k1nF7ph4RQorzGPP9h/dtNDvV7OPWu+dPmHmLcorTRSTlWUAtp0dGEAGU6zkLZOh7f9lVsQkebaPhLv5ju5lVYTbkrl3RyPttRxDDXp0bjgGDXOmpoTY/BIqQsJQlUNBs3KUd+4q6Nkz4VqMujhshuyWeMd6AsaXYvezs0SCGymGrOHtBfTBDMpNacPpoKCC7KBxQZd9/sPSbPtkmD/4Gzs+ZP3z7MD0szYRIGEtUgVj+QePnhKOFT6pIg7g0isEcR3UTBYV93qzT8dbgaVu9Qct1TXd+cdpyJNOohRNG6fJ8bNqztAWDlYmj0H06o/zF1/gmiXvuMq/3b7Tw7gR8AXKd4/QkcEJioi0FCWRWzLX79ZwRsoWf3VMPJfcBBOtkq8LuZBoiJr1g8Q79hIY/qulXSKGSJsL3A+aQD1Rrzc5Gdpbk4ulVjNfHWZE0/Uo/MKlHIjEXfN6hkPJWe927CYSUlOUeazrzu3WKT8LAhe6JejS8tdctINFiSEDEdSR+5ZQiT14JG0DxZQErF7IqKDESAVmfFNzBHQfSDNjU3Bf9kDdAwBK1t9gFC904N0/RZy55MndhhYF310bjSxsxgBz07rpf6FC9JeSd23NRPcw3GvYtgAVL2sJAAIlCEVpAcfs0JCuP7p7Dcxj+YjT+eUGsJrg67c1Z+soHq5rrSSSmQ/ZMlhlFYXhbJQS+sjUdaYw6xGywX++DqCPHJEiZ0Hpgct1tWNHoj7e9xqK8yynUoLXzpBBbYGBdOGpA146YYTR2R7ciCw1fgzE5HsKW15UA99zJO87nRx8kZdTZkdcI+R/EcLP8H5/DWq6bBIpho2FiM414ebOfXNlo1gxcjwcJt3GDX3kUupCIN6O+1okhsi4nGSJDdURWAK9Sb0XyveeANFVbQy+xbxPciw97nQw5gk+8RY3B/U7ro2UcdxkivORCYg/LmvnBJkHj9jLZ+nmxN0p5SUwwNx5Upj/Gd4ek+413hxc3hHP41E10kJXluWLhSYI8MO5l6be8Y3vbtbfGzMplVEQPO4o6Gi4HRw+ghF0BcLs8rxn9JJlJPmVPFQzBZ2WMdhoDC/MgDRkCXSfza5AFSTXcQ2mODOa59V+4rQA3KzMF7Yq3F/NwjhXJTzwUc+D31Ns8e4K9JzJL0VR0LGcrrzU4IfT7HqVvxcoIVUaLKErtvIti2psIIZ8O6Vh/AQ5autusoPg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 04:01:22.4752 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a36a5314-41ec-4d0e-f0ac-08dcffaa0234 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002319.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5770 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Don't error out if there is no vdd regulator supply, as these are optional properties. Signed-off-by: Venkatesh Yadav Abbarapu Reviewed-by: Marek Vasut --- common/usb_onboard_hub.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 43f4cee40b..827ecf9b02 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -57,14 +57,18 @@ static int usb_onboard_hub_probe(struct udevice *dev) int ret; ret = device_get_supply_regulator(dev, "vdd-supply", &hub->vdd); - if (ret) { + if (ret && ret != -ENOENT) { dev_err(dev, "can't get vdd-supply: %d\n", ret); return ret; } - ret = regulator_set_enable_if_allowed(hub->vdd, true); - if (ret) - dev_err(dev, "can't enable vdd-supply: %d\n", ret); + if (hub->vdd) { + ret = regulator_set_enable_if_allowed(hub->vdd, true); + if (ret && ret != -ENOSYS) { + dev_err(dev, "can't enable vdd-supply: %d\n", ret); + return ret; + } + } return usb_onboard_hub_reset(dev); } From patchwork Fri Nov 8 03:59:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Yadav Abbarapu X-Patchwork-Id: 2008231 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=n4mzRQes; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xl51K0Zq0z1xyk for ; Fri, 8 Nov 2024 15:04:35 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C1F788FFC; Fri, 8 Nov 2024 05:04:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="n4mzRQes"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3914A89021; Fri, 8 Nov 2024 05:04:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20615.outbound.protection.outlook.com [IPv6:2a01:111:f403:2416::615]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A7B5888EE4 for ; Fri, 8 Nov 2024 05:04:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=venkatesh.abbarapu@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZUM3jiawgLjVynFrYo8rIGvzNnQ+6rx38prJvqk6bKVMbAx5kA/m718l7SUeNMJdQKC2mQeVKkKsBDypuhqEc7jktV+D0bDH9oGgG9c5i4GTdrJptslHV5vGIOLWV7jPg2+jYjuQNjonxtWL9/+Iokp9D+sqF6ZVAC7l9o1LMSveNl/vBPpr8xg2gPwbnCMwS/mkWhfUpDc8stXXJjLhv7b0sLrXrnxq1U8p5BUsl2MsnGLzTgmtPaYQHG5zpfyPyCCTA125btOQQ9/xy2zo8wgmsdtSpJulyY0vnamV7Dgh087Sr8+ldHaH/Y+JY//eH0hJ1XQTzPIOjbm3vew9Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vkTEfhFQyU+PJw1ypQXAepHMdP9jrrENaZkICh8CUXw=; b=vu9vm9Rv3qHoYZ8YKBf1eCHc5EvBbIMNhgGvYjmXjMmQfiIiAPO+aE+a7UxNEW7XtAnFqwIpH93WTh6gzO8dKP0w13pImaBRYtl8xikCyTjxbtd7r6ZTNMekc2XD9XIztobjsHHRZDpxsYaminlpvIdkCZFFzt65xE4wpm0xjY56JFDuc/ziYbu3rcQlx6LvLUyaYwtgBsLM6Vc4yMz5/hQDhT0TQ6t07Z06dGNI5czaIlxpF8/DIRYCRf3gqTPpY/fDVt6eyOX49fZQbmG8r0p60/jtEEfs1Uv++4W7ELGUmBrgtH4UdiJfMWx40t4rttsBVl1Wf+BS/FLTLDw99A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vkTEfhFQyU+PJw1ypQXAepHMdP9jrrENaZkICh8CUXw=; b=n4mzRQes+r7EeIWX0tr/jiX9ro0zniCI0gxp6B9evHRHE3xLWyBBK4JBPyzgV+8w2z5PzQsJjWGPll36KBogv0/U/Whz2NzWkuPoB+RF6TX2AfmeDDihfJadTDXCxfqRXo/rM9B2sTGnkp7AJmCOTd7C8N44TyRWa1hdZl7Bmi4= Received: from SJ0PR05CA0082.namprd05.prod.outlook.com (2603:10b6:a03:332::27) by PH7PR12MB5808.namprd12.prod.outlook.com (2603:10b6:510:1d4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Fri, 8 Nov 2024 04:03:56 +0000 Received: from CO1PEPF000042AD.namprd03.prod.outlook.com (2603:10b6:a03:332:cafe::5a) by SJ0PR05CA0082.outlook.office365.com (2603:10b6:a03:332::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.11 via Frontend Transport; Fri, 8 Nov 2024 04:03:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000042AD.mail.protection.outlook.com (10.167.243.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Fri, 8 Nov 2024 04:03:55 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:01:20 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:00:14 -0600 Received: from xhdvabbarap40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 7 Nov 2024 22:00:12 -0600 From: Venkatesh Yadav Abbarapu To: CC: , , , Subject: [PATCH v10 3/7] usb: onboard-hub: add support for Microchip USB5744 Date: Fri, 8 Nov 2024 09:29:55 +0530 Message-ID: <20241108035959.19970-4-venkatesh.abbarapu@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> References: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: venkatesh.abbarapu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AD:EE_|PH7PR12MB5808:EE_ X-MS-Office365-Filtering-Correlation-Id: cfa510d5-fdb4-49d7-a783-08dcffaa5d9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: eagTBseyzLPbzYRKcKOEylG2gNs0tpfYBe8fRvbdrFwX3BNoiX5hytSpBlnxH577ocSTQbfmjT/ntnJ0kdfNaCsNAijMQK3bKZ36UZZdashy/K8sB0rloY8DTPon3crB+AEXw0fUtTyJgRGjqQ/26Fr2+BaxfT7DcVSe47uG0SjBQxf9m3gw497srGsPN7+DRn8Sb5vrfNa5WxW8x/dZur8TtSTWp4t51EA1i6gkX6pQw+px0iWnq8q/dEvm8rUrgV3IelNLIpudOsGK/jLi7Ustm9wGxDWCOHjLo5Ci0NDKrIAvWRmODHPIwcqGLh93ZwZXM37bjCFo4hkMp3sHmXn3zdh7RWbzO5Pgio8gr4xnrfnQV9f9TtGmWc30svb9VRoNnJ8yvS64EaYSMnGhwdyYtz9Cy8gU7HZcMg1vnd+F9+n1AdvX3n2WIIBYkJ/9a7nQyvpU80RnHr0XthuDhApKhRbeOhvhz1P+4W7eMOQ44MiZfICD2cPLcnJMojacRRIbZXPClhKG87OiKTE/sULd9/eIeaNKe9Vxu2RhP4YrY6uPoODkOnpwAQm3LfG9p/pKqFMzZjCUdyAXs41dILWkZ3AFKgVFIMKhIhyplRRM2Zgu471Oob6Wk2Mx7hSWso9aemE4Jk6oIyMo7Y+MGuqXneqMNhiUwBbkiqsO5Be1/EseT6t7HnmHmQby4H7+FV3qQcb7dyepavNh8OqNGetvELpgE3cDHFn9jKB54xlctTzjmIt0Y4UBaoK8gAPEab1iRy9PTuh95ElT3IwKZmZ5xnWtsjsToz1qujTK8FcggZ4rGvP6ZCZX9/NP/QTkhu6iuYVojMw0n5gP+2xjVkLE7wAHo4IBAgZY8MXF5ETbEKix+iCi8QHCP8aF38SwUba67PmeLLEiEvfrwtdE+yaqluhg7rxdf9+ZKubeHQYJDF4KsylnIm08WLCV1QVn23b+aeJhLka1YP4coQqEz9GNpKl1iQj94rE5l8aIHpvCuWWukEaRWHQF75R1YGD/C0moU4tEzP43Pu3vJWg68NuAwbSSXFJShvHCQH/PUdGjhHwJjR5esBkAdXgtSJTIFnhPLS4YO4uP8AfzDSiaSg+71Tjx0dtPAVDQHFNpUdNyKT26gDBvOTY6gw4N2JJZYPqreqI9n8KEC/tS4CPFzJ+FIK7efzeH8uoq4Sg8s4JWHRJOUSfwDCh8X2+ha299dOoHlcreC2PBIHo3sn4CYZyaBmVxQ1fbt7wing70NnKnjHfUvlhH1r69CYkWSx6GQVTxmi8VsWoSM2XV1o1+h6m4CcwZWC9qAc7BeKDXB6d8rhs/QaZ/wo8ilzMJaCBfhEuDzabA6Dg/Kn0V1yZPBej1NgT2wzQBCH8+ugau9D5aJrvIv9xY2bzoAamUL2jcB2ognQeG8ixAAp5DW+fMJQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 04:03:55.8276 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cfa510d5-fdb4-49d7-a783-08dcffaa5d9c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5808 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add support for the Microchip USB5744 USB3.0 and USB2.0 Hub. The usb5744 driver trigger hub reset signal after soft reset. The usb5744 hub need to reset after the phy initialization, which toggles the gpio. Signed-off-by: Venkatesh Yadav Abbarapu Reviewed-by: Marek Vasut --- common/usb_onboard_hub.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 827ecf9b02..e604c86d8a 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -88,10 +88,21 @@ static int usb_onboard_hub_remove(struct udevice *dev) return ret; } +static const struct onboard_hub_data usb5744_data = { + .power_on_delay_us = 10000, + .reset_us = 10000, +}; + static const struct udevice_id usb_onboard_hub_ids[] = { /* Use generic usbVID,PID dt-bindings (usb-device.yaml) */ - { .compatible = "usb424,2514" }, /* USB2514B USB 2.0 */ - { } + { .compatible = "usb424,2514" /* USB2514B USB 2.0 */ + }, { + .compatible = "usb424,2744", /* USB2744 USB 2.0 */ + .data = (ulong)&usb5744_data, + }, { + .compatible = "usb424,5744", /* USB5744 USB 3.0 */ + .data = (ulong)&usb5744_data, + } }; U_BOOT_DRIVER(usb_onboard_hub) = { From patchwork Fri Nov 8 03:59:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Venkatesh Yadav Abbarapu X-Patchwork-Id: 2008226 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=OpLlU7AG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xl4xv3lgzz1xyM for ; Fri, 8 Nov 2024 15:01:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7636D88FC4; Fri, 8 Nov 2024 05:01:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="OpLlU7AG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7F35F88F6C; Fri, 8 Nov 2024 05:01:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f403:200a::61c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4B20988E3C for ; Fri, 8 Nov 2024 05:01:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=venkatesh.abbarapu@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=L4USmi2V5hKpnmu/VSmYosVmhDmzNjZewSHDzF/JcTPKYH/iLGtvrhhpHiGqiXa/imUkNxL9ZHUe1DdI2THPxabcQL9K/q2zrpcJv3yPYSP6k4aHZH7HwYXqxYr/jIh7NevXHHQihF57by/BYefhfDo/IVz4/fK/sVaMG9ytMS29NGlub4M1m19AKVKS22mTc9j9gBNcz0vxF5ZriD/PA/Egp2NQw2bN+XusOyGAzdLT0eXjOmL0pxYcCju0uKKpO5GBKG1Thk/8W5V/QD/NrfJ24NyjSMXKKsVycdlh/L2cEdwo0j+w3SAUIR/j3YOvWjykcpjB/q0kqJuowzghYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tcckEUxUR6L3k6/glOVijHnsGFbSaJq3UQT6Kibbdqw=; b=iY7hJ1bIQwaIo3vxyJTST2oqFXm9IMTuWpI5EPNlbMPFtQsmr86bFe03M7UZQLmZ6rRNO2jSfVWzCsizs/kKyoD4R5yWi7a0koXDhMUXxhG9Y6bwy4DupqcNwavnd2L10QJRU+z89BTD7yl77VixocIX0iK+UPM0aVHh5Un/ECweMr3T1E2dEtG7NIFvx8Dv4AVW6jvOP/mjaDB64ebn35tFFKSSWCpmh5b9765iSCKOcVfnldIPqx4Bb2xkSrbf+QERh/Tq+leOVNilB9Pj1nDqS6fjQlwh0+uSFx2PJ1zQhe93KUeoMqUzaGq+zriiY2B7osAwjgAYpD2yksJ4Ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tcckEUxUR6L3k6/glOVijHnsGFbSaJq3UQT6Kibbdqw=; b=OpLlU7AGLVg1iI8mEdFRtbqwstJlbvPcf2tfcGNp2ASzm0lOaJiouTO6n7uCPinNgC7XTFrspAtIvv+RJkaOYQOGI/w7jv38v0NINALxzt4is+RCs4q1E5wR/s9Ml7ZGtuseOH6q/27XMG3McgUbPno0iWKTySO//ESUiMEHA6c= Received: from MW4P222CA0029.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::34) by PH7PR12MB6586.namprd12.prod.outlook.com (2603:10b6:510:212::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.20; Fri, 8 Nov 2024 04:01:27 +0000 Received: from SJ1PEPF00002319.namprd03.prod.outlook.com (2603:10b6:303:114:cafe::1d) by MW4P222CA0029.outlook.office365.com (2603:10b6:303:114::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19 via Frontend Transport; Fri, 8 Nov 2024 04:01:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by SJ1PEPF00002319.mail.protection.outlook.com (10.167.242.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Fri, 8 Nov 2024 04:01:26 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:01:21 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:00:16 -0600 Received: from xhdvabbarap40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 7 Nov 2024 22:00:14 -0600 From: Venkatesh Yadav Abbarapu To: CC: , , , Subject: [PATCH v10 4/7] usb: onboard-hub: Add i2c initialization for usb5744 hub Date: Fri, 8 Nov 2024 09:29:56 +0530 Message-ID: <20241108035959.19970-5-venkatesh.abbarapu@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> References: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: venkatesh.abbarapu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002319:EE_|PH7PR12MB6586:EE_ X-MS-Office365-Filtering-Correlation-Id: 36fb0243-bd45-4103-faed-08dcffaa04a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?bt+b8i3PrNuD8R2uZkNRBgCS5ClDLyu?= =?utf-8?q?asK/+YNhXtUy4ljkgIrdcESS8Pla33rUugSl/zrxDvGScYLewjeQ6flBaukPspVIe?= =?utf-8?q?yhS2o35QfTP2FOg19QOaC8Uq7lkNdHyMO1IJH2ZGr7qecN2UpHLfgn95gXC1uSBeK?= =?utf-8?q?I8XYH8ubxb/qhxhzz3Kxbf9w0K4nTwS2U/CREiZt7RTu7t9K1Jq4NQGKPh1M6DtVH?= =?utf-8?q?2FqDkkyqmiMTFY4HNiOHHjZ3UWCa6Vkya7NYi790dalrkWMx90JYOqy6j+C1nHfJo?= =?utf-8?q?BFAqESVUWDjduz2MtinogiaRjROfNzSePazZIO3q0WBMsruUW2KSqs17g6nutEEgX?= =?utf-8?q?jjvZ/fOflFOAsTA3wyA0+D3+a6Lw/BGP0qj605piwrRZfsLCPDvYnJaOvyLMVOyh9?= =?utf-8?q?AW1c352EX3Rax+4faj9JCE1e+Ywuh/S+CHFit1CjpV3v/QFOpa9QVjmxdRc6Kvjod?= =?utf-8?q?l4kWWvs2YWIYN6YpRIZoBI/0oaMnR00Rkc6PHUAq77RlT/VJehX8hYIEGIukZZikA?= =?utf-8?q?zlKi6LUuBp5ffGQdsi1kQ7hmaB/4wAA9QVoGyOSGrOOm8kiwsYxLHpJi6p3a+8eh2?= =?utf-8?q?n26sDwZ1bCLMvtYFQ5E2yaCWwHKO8v58ocRq2Mp8hv9DbxYkFTYs24+t6l0njMhPG?= =?utf-8?q?G0yAqYKKMzJUKGohqn/NM5acYw0Ql+pzAG9z7MXRvo2bd3n4bWm9B9uyWxbs/gvN4?= =?utf-8?q?5DVOXSo5Z0nBnmxKR1JfV9v+u7ZM8J75yA/iKNSIAkYWkdkBttm3DO05Q1w3489KK?= =?utf-8?q?GRSgE8RHxwZsFZtMD2Hn4roT2AToCsszEovER0SLSZK4v6oZ+vdmF0puT/vbQc+2R?= =?utf-8?q?x06snyBV5k5rGVDg7Vx4OIis9vcctYIb1aP8be3LQErHSgK1q6HWN4c2yE0FtTVwf?= =?utf-8?q?diSqee8/JW3IeGnuhLu+mOYdWT9mwDKqJYUQCIkZCKuomg6E/tAkS1dvBDMI9JNSy?= =?utf-8?q?K2YMD5Ch/JNs+wKCVFFX6W1cFdRwPa9aQ3iw0yyP8b6ti8x4KxhjbdwN3nfyOE1//?= =?utf-8?q?1fdROJ5EfajyaTrCfVvwD4T7ddbZZa5L2cnzM4rFYvZhSs009l2GGx5MxuS7DirgX?= =?utf-8?q?BtydKa2hcyZZfygC65D2GKb/Kok2cK7raPWyqIDQ4dF20oalhGJHOaB3dGeIi67HA?= =?utf-8?q?791yOhTQZKkTB5DBJDAUP4iDUI8MZ/uqmWDmquVuz7gS/fggYyLn8itkogc54kyq8?= =?utf-8?q?GRQNb46U6Re/cjBSRbUiZzyH4Cr7woUOxseubjShzJAxItx6sU1oe9lHG7qOcUqhB?= =?utf-8?q?6v97UhxE+pGjHrzzrfz2phKAhVpCYsz0TXAO3UP8BWuXdabLdxjm5BPKfX4NXEfcJ?= =?utf-8?q?vpDuBr4CTUG9YLJDtFME6FPqNZwgLlxElA=3D=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 04:01:26.5846 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 36fb0243-bd45-4103-faed-08dcffaa04a7 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002319.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6586 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add i2c initialization hook and set usb5744 platform data with function having required i2c initialization sequence. Apart from the USB command attach, prevent the hub from suspend. when the “USB Attach with SMBUS (0xAA56)” command is issued to the hub, the hub is getting enumerated and then it puts in a suspend mode. This causes the hub to NAK any SMBUS access made by the SMBUS Master during this period and not able to see the hub's slave address while running the "i2c probe" command. Prevent the MCU from the putting the HUB in suspend mode through register write. The BYPASS_UDC_SUSPEND bit (Bit 3) of the RuntimeFlags2 register at address 0x411D controls this aspect of the hub. The BYPASS_UDC_SUSPEND bit in register 0x411Dh must be set to ensure that the MCU is always enabled and ready to respond to SMBus runtime commands. This register needs to be written before the USB attach command is issued. The byte sequence is as follows: Slave addr: 0x2d 00 00 05 00 01 41 1D 08 Slave addr: 0x2d 99 37 00 Slave addr: 0x2d AA 56 00 Signed-off-by: Venkatesh Yadav Abbarapu Reviewed-by: Marek Vasut --- common/usb_onboard_hub.c | 106 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index e604c86d8a..dda41e1a94 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -10,9 +10,15 @@ #include #include #include +#include #include #include +#define USB5744_COMMAND_ATTACH 0x0056 +#define USB5744_COMMAND_ATTACH_LSB 0xAA +#define USB5744_CONFIG_REG_ACCESS 0x0037 +#define USB5744_CONFIG_REG_ACCESS_LSB 0x99 + struct onboard_hub { struct udevice *vdd; struct gpio_desc *reset_gpio; @@ -21,8 +27,89 @@ struct onboard_hub { struct onboard_hub_data { unsigned long reset_us; unsigned long power_on_delay_us; + int (*init)(struct udevice *dev); }; +static int usb5744_i2c_init(struct udevice *dev) +{ + /* + * Prevent the MCU from the putting the HUB in suspend mode through register write. + * The BYPASS_UDC_SUSPEND bit (Bit 3) of the RuntimeFlags2 register at address + * 0x411D controls this aspect of the hub. + * Format to write to hub registers via SMBus- 2D 00 00 05 00 01 41 1D 08 + * Byte 0: Address of slave 2D + * Byte 1: Memory address 00 + * Byte 2: Memory address 00 + * Byte 3: Number of bytes to write to memory + * Byte 4: Write configuration register (00) + * Byte 5: Write the number of data bytes (01- 1 data byte) + * Byte 6: LSB of register address 0x41 + * Byte 7: MSB of register address 0x1D + * Byte 8: value to be written to the register + */ + u8 data_buf[8] = {0x0, 0x5, 0x0, 0x1, 0x41, 0x1D, 0x08}; + u8 config_reg_access_buf = USB5744_CONFIG_REG_ACCESS; + struct udevice *i2c_bus = NULL, *i2c_dev; + struct ofnode_phandle_args phandle; + u8 buf = USB5744_COMMAND_ATTACH; + struct dm_i2c_chip *i2c_chip; + int ret, slave_addr; + + ret = dev_read_phandle_with_args(dev, "i2c-bus", NULL, 0, 0, &phandle); + if (ret) { + dev_err(dev, "i2c-bus not specified\n"); + return ret; + } + + ret = device_get_global_by_ofnode(ofnode_get_parent(phandle.node), &i2c_bus); + if (ret) { + dev_err(dev, "Failed to get i2c node, err: %d\n", ret); + return ret; + } + + ret = ofnode_read_u32(phandle.node, "reg", &slave_addr); + if (ret) + return ret; + + ret = i2c_get_chip(i2c_bus, slave_addr, 1, &i2c_dev); + if (ret) { + dev_err(dev, "%s: can't find i2c chip device for addr 0x%x\n", __func__, + slave_addr); + return ret; + } + + i2c_chip = dev_get_parent_plat(i2c_dev); + if (!i2c_chip) { + dev_err(dev, "parent platform data not found\n"); + return -EINVAL; + } + + i2c_chip->flags &= ~DM_I2C_CHIP_WR_ADDRESS; + /* SMBus write command */ + ret = dm_i2c_write(i2c_dev, 0, (uint8_t *)&data_buf, 8); + if (ret) { + dev_err(dev, "data_buf i2c_write failed, err:%d\n", ret); + return ret; + } + + /* Configuration register access command */ + ret = dm_i2c_write(i2c_dev, USB5744_CONFIG_REG_ACCESS_LSB, + &config_reg_access_buf, 2); + if (ret) { + dev_err(dev, "config_reg_access i2c_write failed, err: %d\n", ret); + return ret; + } + + /* USB Attach with SMBus */ + ret = dm_i2c_write(i2c_dev, USB5744_COMMAND_ATTACH_LSB, &buf, 2); + if (ret) { + dev_err(dev, "usb_attach i2c_write failed, err: %d\n", ret); + return ret; + } + + return 0; +} + int usb_onboard_hub_reset(struct udevice *dev) { struct onboard_hub_data *data = @@ -53,6 +140,8 @@ int usb_onboard_hub_reset(struct udevice *dev) static int usb_onboard_hub_probe(struct udevice *dev) { + struct onboard_hub_data *data = + (struct onboard_hub_data *)dev_get_driver_data(dev); struct onboard_hub *hub = dev_get_priv(dev); int ret; @@ -70,7 +159,21 @@ static int usb_onboard_hub_probe(struct udevice *dev) } } - return usb_onboard_hub_reset(dev); + ret = usb_onboard_hub_reset(dev); + if (ret) + return ret; + + if (data->init) { + ret = data->init(dev); + if (ret) { + dev_err(dev, "onboard i2c init failed: %d\n", ret); + goto err; + } + } + return 0; +err: + dm_gpio_set_value(hub->reset_gpio, 0); + return ret; } static int usb_onboard_hub_remove(struct udevice *dev) @@ -89,6 +192,7 @@ static int usb_onboard_hub_remove(struct udevice *dev) } static const struct onboard_hub_data usb5744_data = { + .init = usb5744_i2c_init, .power_on_delay_us = 10000, .reset_us = 10000, }; From patchwork Fri Nov 8 03:59:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Yadav Abbarapu X-Patchwork-Id: 2008224 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=UT1q/wio; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (unknown [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xl4xJ0N2dz1xyM for ; Fri, 8 Nov 2024 15:01:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9806788DD0; Fri, 8 Nov 2024 05:00:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="UT1q/wio"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D08E88D5A; Fri, 8 Nov 2024 05:00:53 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f403:2415::61c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C827688DD0 for ; Fri, 8 Nov 2024 05:00:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=venkatesh.abbarapu@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=y466DPWWRadfafH2v0lzxig3dh8rVcf9VBmlIaVUEKpWGioCN2IU8j6duG9HukhWGv7zWcYHLW587xIL5M58vRfNH8jieO5N3Uzyda+LL0Nn7amUSTbM1rAkUsoSiaKy6lbWRuy6ptd9rPP0rm6H3iqwhPCtAcEyPGo2WMIWpMhPCeD7mg6sYbNh5MIxpFnLNKv/U/mk1OgVADQwuYS7qIsiV7i85tb0cYZJ/HitaWmYCEICIVxzKvaIqRsDGCWiwinXjfVQTmbY4jFvzlzFJQMLr5CIIDu+k1r0ySJDXEsT2hrEhyipCcaa6OPOYJF9r9JHh5rozK9YoeA9CTBsJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XC6JohDEBTJKf8gC41uhw07UpwVf8HZaWZQLszHGntU=; b=tkqj0mVYtwY+HcciLTuxvvz9MzjP+umdyYWm5HHa1uCoKTQErpczaYWY8wMBSfcfTUnvgLALI0fa1HAzx4tyb+CvY/y1EfBs6V/hRbA+m+quw/Fn5HH5bdrWXANu8LjVIWASAVFrl8uT7x8RSElWuhjzBQQ5QBG7AqiW1IiV8KSeY6PFfcwHQE52NgKk8TPhW33jkzzi9q4FHOwSpjkgAcLVLKbGEv7rXAdbuAF6wz8UDatiSygtMRX3HmVdPalMMorB8+gCBADZpgZRyfOjyaW35VJHOXktiw6o51H+NcRSnfKVeYyGZO1knmTrXbkY7lLiPU5nT2M8kDQB7UC+hA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XC6JohDEBTJKf8gC41uhw07UpwVf8HZaWZQLszHGntU=; b=UT1q/wioTQ0GUAIJdCj02jEE2ZMKP96xwm/PDc57s4nNTLAdojH95BYJllNMXt5sPElh0OoPfSkAYsMxVRP5CuYhcautD2mVIMtRz8AVRGUeqxz83YySOMQAdkayZwicUaRRn2zo/hVS3pjYsj+UZg+A2+SJ1kwRqpouTv5X4bU= Received: from BLAPR03CA0022.namprd03.prod.outlook.com (2603:10b6:208:32b::27) by CY8PR12MB7610.namprd12.prod.outlook.com (2603:10b6:930:9a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Fri, 8 Nov 2024 04:00:47 +0000 Received: from BL02EPF0001A100.namprd03.prod.outlook.com (2603:10b6:208:32b:cafe::54) by BLAPR03CA0022.outlook.office365.com (2603:10b6:208:32b::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19 via Frontend Transport; Fri, 8 Nov 2024 04:00:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BL02EPF0001A100.mail.protection.outlook.com (10.167.242.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Fri, 8 Nov 2024 04:00:46 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:00:43 -0600 Received: from xhdvabbarap40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 7 Nov 2024 22:00:41 -0600 From: Venkatesh Yadav Abbarapu To: CC: , , , Subject: [PATCH v10 5/7] usb: onboard-hub: Bail out if peer hub is already probed Date: Fri, 8 Nov 2024 09:29:57 +0530 Message-ID: <20241108035959.19970-6-venkatesh.abbarapu@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> References: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: venkatesh.abbarapu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A100:EE_|CY8PR12MB7610:EE_ X-MS-Office365-Filtering-Correlation-Id: ed65e8b5-635c-4463-4fa2-08dcffa9ecec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: t4hOokVAKWc392MkEjO0a+n7vZCt2gYstFGdLxixu6tQFaEiILa9kNlDpySiqAXJVzE1QjfOgICGbEwr2M4+ZZah3FQkQYSGrx6411nI/Ly/+5/ohEST/EUfm+hEFVRyyNb116wNa8PlDcD4Ul2pjP4cvAXHJ+9HCHnTeeDkVQ+ZR5yl99Kfve5teLJPSai/W2pvMVFprKuzgI0fbO60Pt9+2TB2R4386aBq6b4sDOTEi6IhFVBeNhKzenm1rX5QtOX62ihaesqtvbhsA0xD/FtEC1cYmGy/DmQbho4zDOXpofh1FR9YqFQiW8b6r+LGER8408vHrw+tSXCqT0PIKaKv+VvjUYqvU3YJvkDiMCoKm8I04kDrZSKq9iIYTtrpxWmVsN5Qp6NjIxv/De0Zvh70JzXBq/bg/oAOuVfMAbKFvD3fvCYmK0rCQPz6BTJUVWCxdWNh/JpwK/q+SR+6PhB0PMR8fIwwHae36oNcjmwfgV0LaBt/KNm2Shs8/83ptCyFQwez6FvG+62C3PGzzK2ND46lgx8aMbisK4i/bGYdMj2SWIUvIsJYJBgqyrlT84Y7VGVNgCy2mSqfn0MFTUlrdMjFokWEJaxwWP/MvfEuMY4t9tGcsVca1RG9iJgrq/jGiT3iLBqnN7hoczm7w4EhLgxLpTBMIjH/OjwYWj0RLy/HCp+6/hJXztLZXIRte/8d8G+PzDdmaMpMWReX4+OtKSN6v6t3kxiFlJbCbhPj+ROeDKd9MIFIL75BLN9U6fsKWyqHiqYJai92VEfeqCw/A+t/aQNXNDp+sEkC/Gw/BisQRus7ZIfDeJMmfmCgVyCFj5fWSAL0blQSZRKwu/0leCE9gXivMc6xTxxFcsgdAgDanVMG08nWeP/Gq3WtgWuZmAT9JhYuJmZVWoSCjHYncruBrVrtmYK976enVBLS9SwJormFYVubx7WNl2PsSPLfGN9tWNhHLBnmoEgwhLg+EPFMEkiAiw1pEkv0BPqUh6cbSjDvGdzubGf6tk8DDDJTZRmB5K3B/Oz9mVdO38H/QCX8Ks38gL4OkYnY90H63jmMuh8DWK2FuU7gq0mmLMnlCpaIaWeOEhEHhdsptTPxRme3qbSyQPkBoXJCnLxq7a5eJDHpoPSOcy2za2wbjLpBtePA0DJXumZyEy6GlN+oHvBflDIDtk3m64O88PuqzSQF/gQ2BO4a+cjH9unnIuiGxNv9OpcPeMyRlpGLUWTz8Sx3ETMhsaSd7S3gtlQhMB3F271S5LuUqe+/79T523xm/vuIAifLIY4LnhXGk2c+KV8BP4/GFa0EzoGLUl8tl4/Gl8C20cjOGNR6bgPD59pc59b2V8tk6GYEOJs/pNYKyaAppjodgWwYjDQXuFWmaMqHf+S/iDdKrtjfaudxhfGxuVe8xRbe5FQPTtnuXQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 04:00:46.8452 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed65e8b5-635c-4463-4fa2-08dcffa9ecec X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A100.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7610 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The .bind function is implemented to bind the correct "half" of the hub that the driver wants to bind, and returning -ENODEV for the other "half". Signed-off-by: Venkatesh Yadav Abbarapu Reviewed-by: Marek Vasut --- common/usb_onboard_hub.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index dda41e1a94..cde1662c3b 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -176,6 +176,26 @@ err: return ret; } +static int usb_onboard_hub_bind(struct udevice *dev) +{ + struct ofnode_phandle_args phandle; + const void *fdt = gd->fdt_blob; + int ret, off; + + ret = dev_read_phandle_with_args(dev, "peer-hub", NULL, 0, 0, &phandle); + if (ret) { + dev_err(dev, "peer-hub not specified\n"); + return ret; + } + + off = ofnode_to_offset(phandle.node); + ret = fdt_node_check_compatible(fdt, off, "usb424,5744"); + if (!ret) + return 0; + + return -ENODEV; +} + static int usb_onboard_hub_remove(struct udevice *dev) { struct onboard_hub *hub = dev_get_priv(dev); @@ -212,6 +232,7 @@ static const struct udevice_id usb_onboard_hub_ids[] = { U_BOOT_DRIVER(usb_onboard_hub) = { .name = "usb_onboard_hub", .id = UCLASS_USB_HUB, + .bind = usb_onboard_hub_bind, .probe = usb_onboard_hub_probe, .remove = usb_onboard_hub_remove, .of_match = usb_onboard_hub_ids, From patchwork Fri Nov 8 03:59:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Yadav Abbarapu X-Patchwork-Id: 2008228 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=k+wRrfNe; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xl50q2jb2z1xyM for ; Fri, 8 Nov 2024 15:04:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D720088E63; Fri, 8 Nov 2024 05:04:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="k+wRrfNe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B05ED89020; Fri, 8 Nov 2024 05:04:02 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2062d.outbound.protection.outlook.com [IPv6:2a01:111:f403:2408::62d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7179E88E63 for ; Fri, 8 Nov 2024 05:04:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=venkatesh.abbarapu@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cqbELxO7VNBA5KZi58wD6jur2c96nDW6ApUsR2KmlJh8lA8LB0njSEEmuUmRJXJvEalTPXtemwtRtyKfUd7dndbXDUTI/Au/2Y+dwbrtwriLUtp/tHhFuk1IvVufj82Yvv4fTpkem1gEK1hfbkWA+JW3OW1K+8CgtWDODi0JEy3cPR37pl8gL9viTlfRaclQ9NjJTKVG7qdSWaHhlNp6NOAr2Vt6nTNdlYK9P7mrPD9R4wmOJ/M19E+pX0U60ob3ZytrVBdB0mveoJ9HL7tIBezN6RMA62dWBHUKT9uS2KNo/KOunuzXqDsw5wtkkbP+XE69G2tsEzfSf9TGOUSHSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E14I+3DKXHxigtV4WEeSoiqrnTGOqjxpxEYGBBMtmjw=; b=tnMrS/cvctkS0BxvCbH8VdbzffaAG/F1lEUf9ENjR9A6MQVr7qkzsS5oQX1bcQQROcpOP9+4iyEo5AVeVoib2pFvpKbOjGIfatm7ODQGEG6w0LCLyQ7/dbtLhCXwveqzOQrkjrDOGKcbPreNf5nGq05rFHyNheqrS9kBHmPmKa5XE/PcdHqplQWWWYXctamiaVfUwk1O8TLN/mVHNG4r4M9086MnYxM7wBs26DZUsnNRnT7HYaYDcyXsQ9MmS0sJQkKu8QJTlL4cT11NK9BAnAedkZ1GsIk8olVudhXwhUUvmsdbcXxqCIcpV3rvMRteyyUNj6p5d+q5V4SmWPUnNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E14I+3DKXHxigtV4WEeSoiqrnTGOqjxpxEYGBBMtmjw=; b=k+wRrfNeVyX4Wzc2T0gd1PWU0s/G/xh5cqhBYCYPN/RIUR76QxRv73ycYyVTJFBbvx4CuRpUl8eTKzor5rUe/85he21x+7t/ZCj60QCc0UjYKEtdWlX9vYrw8XyLlAlZwEP8gxax3+hUm6FVmGdk6jbHt2wRCvFSFx9uTJm+ywE= Received: from SJ0PR05CA0200.namprd05.prod.outlook.com (2603:10b6:a03:330::25) by BY5PR12MB4115.namprd12.prod.outlook.com (2603:10b6:a03:20f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.21; Fri, 8 Nov 2024 04:03:57 +0000 Received: from CO1PEPF000042AC.namprd03.prod.outlook.com (2603:10b6:a03:330:cafe::f4) by SJ0PR05CA0200.outlook.office365.com (2603:10b6:a03:330::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19 via Frontend Transport; Fri, 8 Nov 2024 04:03:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000042AC.mail.protection.outlook.com (10.167.243.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Fri, 8 Nov 2024 04:03:56 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:01:19 -0600 Received: from xhdvabbarap40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 7 Nov 2024 22:00:43 -0600 From: Venkatesh Yadav Abbarapu To: CC: , , , Subject: [PATCH v10 6/7] configs: zynqmp_kria: Enable the USB onboard hub Date: Fri, 8 Nov 2024 09:29:58 +0530 Message-ID: <20241108035959.19970-7-venkatesh.abbarapu@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> References: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: venkatesh.abbarapu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AC:EE_|BY5PR12MB4115:EE_ X-MS-Office365-Filtering-Correlation-Id: 9468a10d-b648-40e5-0a4d-08dcffaa5e4f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|1800799024|376014; X-Microsoft-Antispam-Message-Info: ign+mNBK6DF5KFod2T6lUTY8IcD8Z9QasZeSvTl8kh68CoOs+0hQnJZa42y3MUUOmqmHm6wpF7DOKTl2YA4Jt79WSFX3V2cUz5Glv7AGF/lB36NBKYpRvGbV95dTIDRNdBnqfCMWgcgo8r9yhqYo5A5o2JAi+rWGltNdouoB1MfOx54yoDLLkUfU2mHm2yJsT2UV/RdfW4L84SzVqAZr7fDYq3ItwEBex6u9OknVzPsQzxSx9Q1ror0Mmsco2N2MYKETVJOF5SnP6WFlzAQeb/T6TjtaDwp87q6Ef05c2/3mHFpy1camf3b5rU7o+fDMH4pP36yeRI4X9SxDzcVmfFyWZ3pjL5N6Cn9fqAW+beT+pxteL9qta3V2yxMTdMEnL/voFnsHywFn+6QaviywqXyTXRKb5p0Wh4ch/1Sh3m6xK96CA8EAbuDVfejwuHQ6bBt/iPnWtofJRyn6J+ggQHSS/vqqmyC5g3UnDO65rkzPZSMEVpjdKGfB6ClTJkO3Fq3QiFBoXfPzVM28PFhbMX4QKEfCnRhXVLPo7raaYWqeBo3CcXs3E189QXJK+GoX98zZvndY/d17eXLKMRP6M54XBGqdcq4XZz34TJ6VUniwnUCaebaZY1HVPZXhLvCKi4Y5sBmntfBKJaY57RnrTMRGiQk0LcbhvFXZpmbsOhK8Eq5iExZ2JCggo5B0+fSTFvaUti2vKjpF+7bjH0uGykpXiQjVnroBgu4XrfhxRmQP7aWimbSIaE+877LcxG5t5cyAYWaeLIgB6m5k2WK/RUMpS19ubY+sLBLalqM9ymYofnhEctdGHwGerQGgQbBxaiUJcuQD8qJP87W2lLWs40EbNrkFtPfXwqLiEPoPIVoF7e2a1gXQTM1KZYfqQR00n2xOWuG+UiXOdDEqLE/F95LtqdvFo6q+BeNa0aTXqGHfAwoWqoW5KY0nRzghANkjTTaMNQrTvfuKvEfsZlUaBYYjVqHm119og3D9fKDnNlk/c4LzCEBZ2xrpc9QEFHco5qa9ialq754aFJdGjM/hWTExvbJSIDznsYltTnpDPFZLRSuo8MBbHHHHt9B+aN0/NHBWAg4QYu4xyVXaR6Mp2jpO/yqTeajK9foea3m+RaiM9ByG8Yn8H/vcs4q0ukWSmIqFBORPhIe9uMKDcDGRgYFmue9cqcsIfJHSM2o0PEyOAnFFTMjs8MDszkyY6O+kWiLlAAn6uO2lxSkcbSbSxU/qaWYRPOdRnEXUGY7+YYx2XUgaYap9peuHnC+Cnn79ejjQ8wYvNnhUykqRJSp02Wsw33kYOp9U/BUnqnJNa/JF7CQUzCeAncLzEApWkaGqvBBt5mGl5LN2P3x8LdXUJXWdl/pvxcECJfSxWWM3YTZt9cS1BGHcjW6KE9E8F3+8h1Xw7Ht3XCZIeCc7JdyhEg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(36860700013)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 04:03:56.9810 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9468a10d-b648-40e5-0a4d-08dcffaa5e4f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4115 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean USB host support on ZYNQMP KRIA SOM needs onboard USB hub driver for handling reset GPIO and for i2c initialization sequence. Signed-off-by: Venkatesh Yadav Abbarapu Acked-by: Michal Simek --- configs/xilinx_zynqmp_kria_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/xilinx_zynqmp_kria_defconfig b/configs/xilinx_zynqmp_kria_defconfig index dd4df0b2da..a1d9aaaeb3 100644 --- a/configs/xilinx_zynqmp_kria_defconfig +++ b/configs/xilinx_zynqmp_kria_defconfig @@ -117,9 +117,9 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_ENV_FAT_DEVICE_AND_PART=":auto" CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_NET_RANDOM_ETHADDR=y CONFIG_NETCONSOLE=y CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y +CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SIMPLE_PM_BUS=y CONFIG_SATA=y @@ -208,6 +208,7 @@ CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y +CONFIG_USB_ONBOARD_HUB=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y From patchwork Fri Nov 8 03:59:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Yadav Abbarapu X-Patchwork-Id: 2008230 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=F2z6FlfX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xl5166l0Lz1xyM for ; Fri, 8 Nov 2024 15:04:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A44C088EC6; Fri, 8 Nov 2024 05:04:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="F2z6FlfX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8AF9788FBB; Fri, 8 Nov 2024 05:04:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2060b.outbound.protection.outlook.com [IPv6:2a01:111:f403:200a::60b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3227788FFC for ; Fri, 8 Nov 2024 05:04:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=venkatesh.abbarapu@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=a2tAhUWlFARwQUk9yrxKsObbbCVFyCpxCU5cw0eephGJeiaUSZuYOd0ADjJyzS7RoSmoJgejNAb2pT/xKGN5JkPWOjHCO8TMk38utxqkl+7ZkAVl3c7+JCC2HAexzEJdaNmTJCh/uo/gGvQOePPqXke9yEIUR9LMA0yQg1Ro58nFzqHkuc7jUb509Z9QLBiIg9ZMVvfa/uBk+miP03Wd62n2TzU4ErR8C8O9WlYX+/ehL9KuwSL9EwQVMhb/QWAxwEvsuqym1jgyN2gklCDg1DrUwBgxKC/f/IwGFTON8uIGVHuAnPQgGrRbBv5O05w6AcrDUcrjDee9qietyUpeVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Zhu+25n90FlcaBW3hto8wQIfk3wlk/choLOF14snj3M=; b=Te2VbV4AlmkVVnBpoQFHpX/+GuoPQ4ScUTV29SK4D3fSuGVdtnLlEIPg4wTJ9c0oHhVH4n9jMMmb9ixzwNYejch+Mjo+44XjCQE8xdWpD/N4WIERJuS1zmVyC5cykWMLALsBGgFES7O8mseFXIQci2EhA2hAXJ6/tBfdTwURFRTh/NH/s4Cxla3OK6WamWxeRgjFbobFTjkQ+yJttpcGDVOqVLdaPL0lIxPt9TtotROWE8RZj5nqJGQJu+TKYIkj5Ud9ugibD8fuTZ3mEWZN46qf5yC/LZJXvMJ/9JP+6l14UYIeD2MxHcjBls5RDPoXq/yAhdE/Zk9sP64tUVKgBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zhu+25n90FlcaBW3hto8wQIfk3wlk/choLOF14snj3M=; b=F2z6FlfXnEumG7q/1x2WSiPPzAObxK6UtpfgSgQrs8HpTEfVuRlTlkwWDzPqaUnViYClHA6gkMS0T0tbot65VcNqm5rSQL06fRfOd0RHuJ47qLN/Pil4oPMz0HyFw6G4OyAocxYe1G+AfejSBnWmwx56wHpCGugkhV/9rQr5ysM= Received: from BN9PR03CA0947.namprd03.prod.outlook.com (2603:10b6:408:108::22) by CYXPR12MB9428.namprd12.prod.outlook.com (2603:10b6:930:d5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Fri, 8 Nov 2024 04:03:57 +0000 Received: from BN2PEPF00004FC0.namprd04.prod.outlook.com (2603:10b6:408:108:cafe::6d) by BN9PR03CA0947.outlook.office365.com (2603:10b6:408:108::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18 via Frontend Transport; Fri, 8 Nov 2024 04:03:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF00004FC0.mail.protection.outlook.com (10.167.243.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Fri, 8 Nov 2024 04:03:57 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 Nov 2024 22:01:55 -0600 Received: from xhdvabbarap40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 7 Nov 2024 22:01:20 -0600 From: Venkatesh Yadav Abbarapu To: CC: , , , Subject: [PATCH v10 7/7] arm64: zynqmp: Update the usb5744 hub node as per binding Date: Fri, 8 Nov 2024 09:29:59 +0530 Message-ID: <20241108035959.19970-8-venkatesh.abbarapu@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> References: <20241108035959.19970-1-venkatesh.abbarapu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: venkatesh.abbarapu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FC0:EE_|CYXPR12MB9428:EE_ X-MS-Office365-Filtering-Correlation-Id: 709e1329-8d2d-4304-cc32-08dcffaa5e56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: LFKQr65a5tzktDBBTURPUuHBRlqw61uMbmv1PvlDVTwOd8PoP56/AFYDLvU4LFq7s8nLQjXCNhxLv+uJr9ZO95QrpZBqRTx/PWOVVHshFJ2/dOp4VmWSInDTNFAJxJ7m1m4m4gNRnSBR44jtG+BjltTzcKDLnCJv3ZR728fosTcGgKz05Hpj8I+8NvSeqPxJH38q+swpZg5HECA/Rfytx1rtXeCN/6GYEK6WAkHsOM0UA6qU9rlCePpEmUt/FnKPVZMMAZpsfw8FAce+Pd/fNBclfevsk8gtAk5W+CEvVRj3lvTvKNo2Scw6tub1Jcj7QUJt05fScNSBH/lGCpUPemZfTz9iI+ujP3JPc2b8dLzvIPZPTjd+5iEUX1WzsEVUxAzIGNUDYhT3EhHqC6dDco9ivHjsVvOjDTvOezHdRReh8toY8KjN8nv6uf1rr7UVsQEW83x6MXsPNuVwqgDgUWDg4DAbC9uWcJ+2PGd7PEDt+duh+u5oJtvQjatiWGFAPCwvvhmfuZCX3nEDCrOV/AdnFwAJj7BDzQ2keUmKLLIDvmxaodUXyrUWqdA/mx3bVtkBRUr4pGw9NrxOvUe91tY/YQTQXKO4TDo5baAHQJQGgNl3fHBHjmBEpuhoogQIKPAu29YgCf1kK7Uf82msB56bdl1ZYVOe9J6Avwy0PV2VPjg7WKJVfaDNtYBTEGoAiDAYqKEl7hhicbtFAWXHIwhimUde6yNKPnKFbrPzUjv2fXzfyJY3bV7dZmZJhH/yQlpVcpu6Y5ABe15rjaxK2LJhC+a1UrOkAH4sdvOLEgPINct+v3ZhhMlywIYmHAzVZ2ihKCeuSMA9F9exFWx5DrUwZewDsCzgh1tEQk/CZqOKA4T3n7UuaxV9CJj19WediPpon3Rtjl3S40ogl4podUK1IIOIr7uCfkQj8iKIVvbNOAMSZIUj7BoQu2dtSU8oRA/bGQ+mtPvfA8/i6aMgbx8Uh+m+dOAgRVyMvgSzjsKnnmpy0uaIj5iI6lMoHz43WxArrXgM5ZtNQY8yvAFfUBXwxKAG7cX8N2FcoW+sh6LEfqYPEqegqINVdbieQtnL7CkHT3J0SgyL0TX/ZGAOqQpG4XZzuHJHhkkw/mmYDm8C/KrdknI9QbGTldcsMKUdhBteCpg+SUxhu5zs+njxSaDO/42IVJ3tBrmao2nzcrYMrLNFjKoA0kEVySDN20qAKIdz72D+UljzzKoK527QxpqVxhbvpzd1uTvDtVvRSwspqpcI9uOjISVQtw5CbcbGNEnyjyE3G+J5IzQ+V1Of+t7lc4Ao05P4ibU7PB1PmD6K4PV5TM7ghxEfYQQGaPAQcbhx4/pTQ3LyTQEDa5yhKA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 04:03:57.1412 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 709e1329-8d2d-4304-cc32-08dcffaa5e56 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FC0.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR12MB9428 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Updating the usb5744 hub node as per the latest upstream DT binding https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ tree/Documentation/devicetree/bindings/usb/microchip,usb5744.yaml?h=v6.8.8 Signed-off-by: Venkatesh Yadav Abbarapu Acked-by: Michal Simek --- arch/arm/dts/zynqmp-sck-kr-g-revA.dtso | 48 ++++++++++++++++++++++++++ arch/arm/dts/zynqmp-sck-kr-g-revB.dtso | 48 ++++++++++++++++++++++++++ arch/arm/dts/zynqmp-sck-kv-g-revA.dtso | 18 ++++++++++ arch/arm/dts/zynqmp-sck-kv-g-revB.dtso | 25 +++++++++++++- 4 files changed, 138 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/zynqmp-sck-kr-g-revA.dtso b/arch/arm/dts/zynqmp-sck-kr-g-revA.dtso index 6349a0e108..e40840acb8 100644 --- a/arch/arm/dts/zynqmp-sck-kr-g-revA.dtso +++ b/arch/arm/dts/zynqmp-sck-kr-g-revA.dtso @@ -105,11 +105,19 @@ #address-cells = <1>; #size-cells = <0>; reg = <0>; + hub_1: usb-hub@2d { + compatible = "microchip,usb5744"; + reg = <0x2d>; + }; }; usbhub_i2c1: i2c@1 { #address-cells = <1>; #size-cells = <0>; reg = <1>; + hub_2: usb-hub@2d { + compatible = "microchip,usb5744"; + reg = <0x2d>; + }; }; /* Bus 2/3 are not connected */ }; @@ -164,6 +172,26 @@ dr_mode = "host"; snps,usb3_lpm_capable; maximum-speed = "super-speed"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub_2_0: hub@1 { + compatible = "usb424,2744"; + reg = <1>; + peer-hub = <&hub_3_0>; + i2c-bus = <&hub_1>; + reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>; + }; + + /* 3.0 hub on port 2 */ + hub_3_0: hub@2 { + compatible = "usb424,5744"; + reg = <2>; + peer-hub = <&hub_2_0>; + i2c-bus = <&hub_1>; + reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>; + }; }; &usb1 { /* mio64 - mio75 */ @@ -188,6 +216,26 @@ dr_mode = "host"; snps,usb3_lpm_capable; maximum-speed = "super-speed"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub1_2_0: hub@1 { + compatible = "usb424,2744"; + reg = <1>; + peer-hub = <&hub1_3_0>; + i2c-bus = <&hub_2>; + reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_LOW>; + }; + + /* 3.0 hub on port 2 */ + hub1_3_0: hub@2 { + compatible = "usb424,5744"; + reg = <2>; + peer-hub = <&hub1_2_0>; + i2c-bus = <&hub_2>; + reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_LOW>; + }; }; &gem0 { /* mdio mio50/51 */ diff --git a/arch/arm/dts/zynqmp-sck-kr-g-revB.dtso b/arch/arm/dts/zynqmp-sck-kr-g-revB.dtso index b0d737d3ca..ce1ad2b765 100644 --- a/arch/arm/dts/zynqmp-sck-kr-g-revB.dtso +++ b/arch/arm/dts/zynqmp-sck-kr-g-revB.dtso @@ -117,11 +117,19 @@ #address-cells = <1>; #size-cells = <0>; reg = <0>; + hub_1: usb-hub@2d { + compatible = "microchip,usb5744"; + reg = <0x2d>; + }; }; usbhub_i2c1: i2c@1 { #address-cells = <1>; #size-cells = <0>; reg = <1>; + hub_2: usb-hub@2d { + compatible = "microchip,usb5744"; + reg = <0x2d>; + }; }; /* Bus 2/3 are not connected */ }; @@ -184,6 +192,26 @@ dr_mode = "host"; snps,usb3_lpm_capable; maximum-speed = "super-speed"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub_2_0: hub@1 { + compatible = "usb424,2744"; + reg = <1>; + peer-hub = <&hub_3_0>; + i2c-bus = <&hub_1>; + reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>; + }; + + /* 3.0 hub on port 2 */ + hub_3_0: hub@2 { + compatible = "usb424,5744"; + reg = <2>; + peer-hub = <&hub_2_0>; + i2c-bus = <&hub_1>; + reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>; + }; }; &usb1 { /* mio64 - mio75 */ @@ -209,6 +237,26 @@ dr_mode = "host"; snps,usb3_lpm_capable; maximum-speed = "super-speed"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub1_2_0: hub@1 { + compatible = "usb424,2744"; + reg = <1>; + peer-hub = <&hub1_3_0>; + i2c-bus = <&hub_2>; + reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_LOW>; + }; + + /* 3.0 hub on port 2 */ + hub1_3_0: hub@2 { + compatible = "usb424,5744"; + reg = <2>; + peer-hub = <&hub1_2_0>; + i2c-bus = <&hub_2>; + reset-gpios = <&slg7xl45106 4 GPIO_ACTIVE_LOW>; + }; }; &gem0 { /* mdio mio50/51 */ diff --git a/arch/arm/dts/zynqmp-sck-kv-g-revA.dtso b/arch/arm/dts/zynqmp-sck-kv-g-revA.dtso index 561b546e37..0ef0357bd2 100644 --- a/arch/arm/dts/zynqmp-sck-kv-g-revA.dtso +++ b/arch/arm/dts/zynqmp-sck-kv-g-revA.dtso @@ -142,6 +142,24 @@ dr_mode = "host"; snps,usb3_lpm_capable; maximum-speed = "super-speed"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub_2_0: hub@1 { + compatible = "usb424,2744"; + reg = <1>; + peer-hub = <&hub_3_0>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + + /* 3.0 hub on port 2 */ + hub_3_0: hub@2 { + compatible = "usb424,5744"; + reg = <2>; + peer-hub = <&hub_2_0>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; }; &sdhci1 { /* on CC with tuned parameters */ diff --git a/arch/arm/dts/zynqmp-sck-kv-g-revB.dtso b/arch/arm/dts/zynqmp-sck-kv-g-revB.dtso index 64683e0ccb..92d8851eb8 100644 --- a/arch/arm/dts/zynqmp-sck-kv-g-revB.dtso +++ b/arch/arm/dts/zynqmp-sck-kv-g-revB.dtso @@ -92,7 +92,10 @@ label = "ina260-u14"; reg = <0x40>; }; - /* u43 - 0x2d - USB hub */ + hub: usb-hub@2d { + compatible = "microchip,usb5744"; + reg = <0x2d>; + }; /* u27 - 0xe0 - STDP4320 DP/HDMI splitter */ }; @@ -146,6 +149,26 @@ dr_mode = "host"; snps,usb3_lpm_capable; maximum-speed = "super-speed"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub_2_0: hub@1 { + compatible = "usb424,2744"; + reg = <1>; + peer-hub = <&hub_3_0>; + i2c-bus = <&hub>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + + /* 3.0 hub on port 2 */ + hub_3_0: hub@2 { + compatible = "usb424,5744"; + reg = <2>; + peer-hub = <&hub_2_0>; + i2c-bus = <&hub>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; }; &sdhci1 { /* on CC with tuned parameters */