From patchwork Thu Aug 29 01:30:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978190 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvNzT38nBz1yZ9 for ; Thu, 29 Aug 2024 11:31:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C42F88AD7; Thu, 29 Aug 2024 03:31:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 4FB5988A75; Thu, 29 Aug 2024 03:31:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20711.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::711]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0A87088A95 for ; Thu, 29 Aug 2024 03:31:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IfIs98D+hJc8ILPeP0MsFxw8B+vQZv2sGq/jSFTw/Y833cq4fzRdsvVGDUgTbtNY2yRwhzmPZwn7rnY1g8UrL4E25QiuK13VzC6afTYnY1vIdacNFMhxbVD8Swxk7KWjy3tmlk4auH1k87S1GeaFW85q1RLt4ZsKkAGPd+aUymZ5N6oMF5PHbX52eULjz5tRZOpv3cYalF74ZQM6ZJKC708CigvO7UgY2DLRgaPWpmEDv5mZrqc2uLuowNvoCzkbt0H4os+Wn3io0rV+OwioxTUBE+7XPh6rsaKFlSqJi7XNGpOJYtI2Y4PEj6LXK5wH6m3fOlV8/+1YMBqzTM9tlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=LDZ4j+h7uR2b5Nnj3PrAHWen7gzNZDHPmpjKp5cAKdQ=; b=R3XAuzteXhEMxn/0zaqKogXuUCzj3ufXIXsrsfg7VSOtxnF+Hh0ft46mTxOPPLclJnmNoyPlVkftJR6WuagTjZaNtharfwOpDu7cFz2uK/x/UyGKgXXUwyKM4YSecOG6Kx+vLf7afgtw1ku86w6YQdSVqSgtbTFESw21wo5z760Xtxg3RhWetxmw1xjEsQDjZIuhjjmvzKCcoUYY0H54WT6arIEXTH7JY9+qLummb03lszb6W1dZR7VI63/75CJEboc1sdXfquXJsLNPnloykgfOymew+Q/OKXc8Qd6Fq3eOzWoy87FkLgePYFC3JCLBZFs+QHg9jPJtUOcK/tPHcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0830.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:27::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.26; Thu, 29 Aug 2024 01:31:08 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:08 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 1/9] usb: cdns3: Set USB PHY mode in cdns3_drd_update_mode() Date: Thu, 29 Aug 2024 09:30:50 +0800 Message-Id: <20240829013058.6178-2-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0830:EE_ X-MS-Office365-Filtering-Correlation-Id: 46f2f509-fccf-44df-5d2f-08dcc7ca421e X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|41320700013|52116014|7416014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: uhmGuhknIr21TLY06z92VewbKdv836SnQmeeMOsMYQMxqU62fTjsrYHra7z5mj38L6cnj/bQTGQDXzCk6bIunqf6YRI4vmviFN4KiX2G9n5K33zoEOzLMVcgHoLqyNuMbHMp+YZIGH4z+Cu3EccZPO0Mi9fl/yfvHXpF9JA8ykLUBPeLNPI7Ojcdz/RwrK2+JBWzFfnjEoHQT9dmgYUmfbdFMLzxGB0ywYKGLv+ok4MUgh3D4SRRydejGX16jb9e9o/8FQuIenTmo4zPbPiPKWFF/DCHysXHo8XCyLEgHEeGyeFnqaaIkWLnLBmaRDRmXwBCLjQqpR/5zFdt9LesSa9g3XIyRy7rJKSlDya0J5x9l85TY1LdVHxQBPWdBaVVZMK+t6f1S9m8ACVubNlJEGrp43yn+KdeY/hYEKkTfwUqSWwfWBlxXNhkmnURACtnRF21AV/flDI0hk4hmMyW0HkB83yfTdyADFBlxsknctY+RR1q0sWEUHk5jG2hOxhhN4rVB88Cm17QwuDXgjGXUyU/pcvHVym2aHaxqXZpDI7ZAejlfdd/63e3TYFznGfcKyofGygv0pQbw4foMTtz96wuOVGtL8sA0Fj7y8KQXMl+v1noSI8x2DHLl8KfoOnbyBa1fijOYdsk3/3q1UEMrA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(366016)(41320700013)(52116014)(7416014)(1800799024)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Am2enKlaqgOuv4SJgd/J8t0MZH0lZ+eh9AiQyvN0Tkztx+tZNctanGU96Jd3oFrI8vbIg3yM7kknqBaXNasndpDfjo6IU9x7QBGXpHIjtcuv6F8w7tOh5BXXW1NRpKIu9QNoa5e5Nq/k4E9MriTLHWA2aN4VAJkiDIT+AN5zXQfJr+9D7yHYa3BdD1Vymr5K2XHKG8CwiVS+aWuX+w6vIl7ouU7EyUn5Va1FrUgw4O2x9vmGOhwk2VBFejN2jIXeL0fA0Bkw6SSWtQD/u4K8LG7cj62mYbs54r+YUC+8M0pixuR3+RDxa2OYjmix6Ch8QPZ1qveOEHx6xdflJIsYVCIxaYVh9M0fKsd/RXM+CdgGvnJDFOQkTazjisLOsaRAlbTnuCbPdLoWd21D+5D1LsjPnt23RU+969il3guCAutmWWFwUOpKtRh3VlKer3M9jFhYyN60tPJh1MVBMmL8r8zlHE7/+s/sz20VBfNK/M78fiqYIKcS7c86YWNnX+g6G8UF7N7V1oIlET8LTGNfvCg9/cf8756UUY8RG7CWSgHJGMLo7/XmTtAFo5GYJk873AqQgc15DJnlA6LkKuKxArrwvT7e96TcWu1mw3+0sZWFVPTShUPiI4A5FQhWE11oIxw703YoJMcIbNnGz1BMdkUWTzjWQZYWppT9JKP+q1LE1eIOJlxp7xtC/5ocCTfeL/Bt+ULcL++2Oa69xUt3dZqFYuGBQ0ubEK1VUVykmxf0BzlvwZ1xzf1l1SSEpU9qOiY7UMtT3dioYRbO5fpFhdN2FfmJAEYpQ/h0w/k7VMggiFBVt898eOA1X7pgfNhuC31OmthEG6AAkLa21h46wXKzfi+pNFGWa1Mha0DUHJmM1wVgRx4wBWSmAOMHY7miqg/KkedfC3HL7cDLhDnMv4D9swwT7aCLbznYjPRNM6lEbVqOe69czEWiOUbG+yO1ac/5m7fKVW4yF9DP5V4h+vsfIOwQ0DgSFlI2oXuC+Hd+sNAeYDxNxAvz432JzrJiLJ+umvhE3/r7x6hUf28fJU5lDVYjqvg39M+wlO9oLHvFUgcr/2cBu1cLHZBkyKdiZc3duc9AC5+O3cMkxjC1KzxWQpS5QimxiHjtlePqvrgZLvCZIRJ2zgaAjdnFzKh1umeih03VQmtqMXSBcr6vMOVP/j53mxBYieRYEFtpBjW7pRG22HwyA90sf+C837FovGkFxP1lxeVXk41/R0s0NEg0CQ8MA+KWnVKLYWluub3JDMzG/FvMfccql/H2pGS/zL6CzNhjzf5D0R/xOobv7elJw6YftpZR+AxhHNI6OaaYfdVe5YxHhLGxJ+LqjAqQWHbvE4vsiZfh6FDqxtuUDUIrURvFp0dnj5UnROuVAT/p6m7p59b/HERFmarl5SYnUM0YvykLn2iH4YJErHdxBPshI47D2e95vxrcaCbc+dcERthoITaUyZpBIxWfz0+/JpXngd2geO7CA5A7tMLNd4utL0zQ9DPiN64B1g9WzLhPPIiTf+8pZSghtUdHrnyHz8eTeP//eRrtT+nunX3wcQ9yfaVgHEXENQrq45jv34lO/NAy1GcTqGWN352Xo0rEr6XTXVBpDp+kI9mDQ6tTLw== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46f2f509-fccf-44df-5d2f-08dcc7ca421e X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:08.7327 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0PbJWIX7x31jGiX0Doq84jUfiSeMGV2+cXPNE27zz03sSrreX5zuZMgsmNwafjeF46GxiJTSnzi7bov2BT92ZwdZPjsrXp84RyyAqZyQc0w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0830 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 PHY maybe need to set PHY mode in different USB dr mode. So translate USB PHY mode to generic PHY mode and call generic_phy_set_mode(). Signed-off-by: Minda Chen Reviewed-by: Marek Vasut --- drivers/usb/cdns3/drd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c index 47874fec29..cbb1334234 100644 --- a/drivers/usb/cdns3/drd.c +++ b/drivers/usb/cdns3/drd.c @@ -217,15 +217,19 @@ static int cdns3_init_otg_mode(struct cdns3 *cdns) int cdns3_drd_update_mode(struct cdns3 *cdns) { int ret = 0; + int mode; switch (cdns->dr_mode) { case USB_DR_MODE_PERIPHERAL: + mode = PHY_MODE_USB_DEVICE; ret = cdns3_set_mode(cdns, USB_DR_MODE_PERIPHERAL); break; case USB_DR_MODE_HOST: + mode = PHY_MODE_USB_HOST; ret = cdns3_set_mode(cdns, USB_DR_MODE_HOST); break; case USB_DR_MODE_OTG: + mode = PHY_MODE_USB_OTG; ret = cdns3_init_otg_mode(cdns); break; default: @@ -234,6 +238,16 @@ int cdns3_drd_update_mode(struct cdns3 *cdns) return -EINVAL; } + ret = generic_phy_set_mode(&cdns->usb2_phy, mode, 0); + if (ret) { + dev_err(cdns->dev, "Set usb 2.0 PHY mode failed %d\n", ret); + return ret; + } + + ret = generic_phy_set_mode(&cdns->usb3_phy, mode, 0); + if (ret) + dev_err(cdns->dev, "Set usb 3.0 PHY mode failed %d\n", ret); + return ret; } From patchwork Thu Aug 29 01:30:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978191 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvNzf4Wdcz1yZ9 for ; Thu, 29 Aug 2024 11:31:42 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F3B888A76; Thu, 29 Aug 2024 03:31:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 7896288A75; Thu, 29 Aug 2024 03:31:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20711.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::711]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A207A88AB9 for ; Thu, 29 Aug 2024 03:31:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uzt5xuqJfGHoaJe32P4rTiL9EtNM7mS2WAcCzHFYBLGk7a64VsIj+hGrQvNQnXlBTp4rrQcMYbciXpuw/IR0c7xpAVL3U6V2oQ2hqabacSOlS0H9I5f3xDRW4OzH9kgBPa3zVhUyKbgdBxeJcZlvy/Jm9KicclO5O6I+kcQ5jg9h/ynjBW2VsrtjuailYK/JoPt0o/UimjJPsx4qD9jXXFYw1uJn9rfNtutTfdnulfM/RTKWGS4Gnxx9THFEju684LD1FVqIGedyqmIYnYlBaG+qLlMt7kdnjfuOuntE7zLPmwtDgypN6WTW5TlDo+6lXMRS6KHuT5KDb84n0L3X/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=g3kRgBU1/VrY0T6ILq+PphvatxPp76pNKZHZvHEqgi0=; b=JuTKta9aq6RCKrvortKALdzWVwIrRyE0eAkzsSw+Xy2RQFhRIPvv92dHFkShHJLc9Lp8ANHBeSyn3qNfIJcxv6K1XjpFY2Dyd62vGmS4RVH+f4eP6WWeWX+DNE2FPbmBykkstnhvqbxosLw3F3koj7h0o01l1n0xzsz5w9L7F7hQsvAfWI9gdKobfLrQL/Ub1DA2IaGkBIH1GAvLS1BaHKqAqU7xlgjkEuzN13SwOUoUPysMO/2bZF+K2p3gqUYXs8V8eHuOSrWcCwJ5YRE0TZ3gce9Qa5jbctXEKRgK1tfzvxGCDPnj3w+XzsW0Jt3N3us6DMGpIVhytUk+Fewrtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0830.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:27::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.26; Thu, 29 Aug 2024 01:31:10 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:10 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 2/9] phy: starfive: Add Starfive JH7110 USB 2.0 PHY driver Date: Thu, 29 Aug 2024 09:30:51 +0800 Message-Id: <20240829013058.6178-3-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0830:EE_ X-MS-Office365-Filtering-Correlation-Id: ae8793c2-2c7c-4e25-c6c3-08dcc7ca42e3 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|41320700013|52116014|7416014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: H8eoLHM5EIhX9dqgnGpxpgcyxB0fB97VIKQRp6g0p581d9+Eb2Kd771C/Xm8qeaktge17NY3b0Ef0i0MFIreciVxykTWOG/4FlYU+XK1n6EJKwHBSkDsMafxAt112EpoWsw4hDkOvkzki2XEN+TGGURNgZPC/CfVy14ps43yHskGRkkgdOOjB/SHQFf3dao3A0ST/6ke3CiVepgtrkyQTGk72jnq7Q3prMad8Mysmd7fDc2kyJ4/+63DeUsSr7ZuYouWOrY5kZbjFEI1WRsDFkcRzWE9XlkE7f7RxuoKzCO0EKnbMDP+2bOquZHaH67T2xYP9A5L+aBNecyczi/oqmomlk595vRlY+cX0/o3a8HXjt9D3VuUsT7k3oIFw+zsdkytZ89H3FsdFWxFzG8Y54/JxIZ0KAK3uQ09coc0ZwDYalbsz3l9VOmKm0ydsscnlZHbAhQW9GAwmdF0ElbFJAYnMnq9wsTTyjqni7oloeOS/qMRVoB7P8PA7TrTrAfUl8VjTUtQCHn/7DT912MuOYPtlbbAk9eEc51S+2M3x+KqQ+ijrfV9gbeQHBbYFkrkKWtGwAw4ENH3QZkdcgRRCkU3FOIPW4sFgMKjaqbce5qR7PXo7iNk6c8hdU60WUr63W3u7XCvkoGAzytXb3DPHg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(366016)(41320700013)(52116014)(7416014)(1800799024)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cQhsNKDciT1rKkUXNXhzgnCSk2eKfCeJ/lPSr4+TYGTSZxP28p0P+XKpBLuOTuESgIErGK9l/FZlqS9yB30PYvgQvkhOnlMziX8hTiVywoQ6WGOB50VFIEAgRXksAmGcTiicQGZfgp+2OabKCNBFofsak9UfR49O7Z5gGcI246ZWG+ARKlYPdZQT2iAbhvmA/PwfmAPc1GJuAvrp/+xWDVtn+j6FB990q2vT69+Rf/IFEcm08LM4TcawV9N0GNMQpEPiY7vfNoxd8lhHAJoG0dhOXnEcsJmt+r25K9hlZKNjYzqJIsLOpVfOftGoYch3jGXRshNJ7NVkpMQ2PMIFmwlRqnj3zN9On5Yq95uV+k0ve1EX3rr8U8G3/VVLGWpS92g5DvAN8lbXBPyUthhmp0sTE5T1/ZZ8DMMwhBcH26ccmdDSXvbd6SyKRZGfRRfVFtpl9A06gaBUvbsRzAF8ujU0t3mKm3Y91LTo0MwxAMejxKjYd/xMCn9ogF0HT4g8qqjn5CnQv8+Vxe6d2G9PW/+1PMqgTF59+t9ZZMUnjZCmQAs4s5oruF2ZCjEJs6tA9sv7v3XQB9N/SGLbyl+t+BJKKJynPWMrS39TeLNGW0x1Ih1GgPMv3SjD7PW2+OqKrBfCZrolIpQgQBVGQ+dDYT0JGtGt68zvCIV52pxGuJBAMteOa3e/O8psJb/6TEiwDB7c4KmyiswRfnxZjlBYA9EUR44CXHgyNUxg1mIcwZ/Ntf5/obvVsHl0pK9no4LMxN2omUL8u5OX8SuAhFV6D3n1oiW6y1eoxRcyD7rrqcizXE5BBhLEgZBb3omMdc2bimMQ9Jw4xMzMbXqazz5LelWL0123U/+WbWujA6qXRqa2/csJHqP0ilvadBql7l0NzR9szZ4bNKOrYRzWh2m84lOJwesv0uv417pKJ75tstGMIAES3GwpjOX048bUxoNvfCZAvEID26PV8KZCwldWvtSjl64uqSy1nrYgzJFN6hM5NW5B7YwaHauqAwTNbFLiFMwCofeXeW5x5XD0VlJ4l9b39XbkqtieYN2ufedKaPS8/omLCRWUy481sb92j7EnhBtyi4PXJEfPSGpZbF4HRG2RNcx+O25CnHxn2Q6/NUqn2CWSgiUsMbiTdvl2CeKYTqvuX1qZLQL5aP3Vve3KTHK8+zfB60Wh9WsZYAp0ZUQS1xif0dI9PiFBzExAb5fthx+smujXsoDeJ1klLFT+gp8d6SkcIP+xGdPzQA++sTvhbTb/A7p/zx4JxkpH8+cTEK2XqfT1MEOrfn+qSrP5gkrt2qEpLbkYSeGOMcZUvfkSfErTf/fLzh7tLxQz0REg9QJZRTd02b7nGiC1kfSXeR8q9Y9WtCdqRqbEGzrgO58fJ9rJrLLfr3CQ+8nKNOWO3L+Yqp6BfTd2bKurc3SwrB8kCuMo//dbqdpYiciQmMuEmdGEbPdCphHjrN2qo0HK5OxXcqYOX+hD7+8XBq53XzLlCeImU78ErvHDiPWasN2AV0H8gxQKV79B2/yO1Za3i15YQ+WGqVxPjZaEcaK940C6IZenlaL8iXn3IDQN+Hv7R0kYwsVLktNhe/y5+Nm11KNiCsPN2NIoC+WMR/8pVA== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae8793c2-2c7c-4e25-c6c3-08dcc7ca42e3 X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:10.0241 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: v4z1QQ/clrsYswU7bmWIAZCbE4115GlBYjQ/li/ZVwawCNR7NvjwKSsZsjp6YER4tgrSuyIXreJCpOQ1Uu+fVe4pgpiSwIUGAtSF3WG+t4U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0830 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 Starfive JH7110 USB 2.0 PHY driver, which is generic PHY driver. Signed-off-by: Minda Chen Reviewed-by: Roger Quadros --- drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1 + drivers/phy/starfive/Kconfig | 14 +++ drivers/phy/starfive/Makefile | 6 + drivers/phy/starfive/phy-jh7110-usb2.c | 166 +++++++++++++++++++++++++ 5 files changed, 188 insertions(+) create mode 100644 drivers/phy/starfive/Kconfig create mode 100644 drivers/phy/starfive/Makefile create mode 100644 drivers/phy/starfive/phy-jh7110-usb2.c diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index e12347e8a0..f940648fe5 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -309,5 +309,6 @@ source "drivers/phy/cadence/Kconfig" source "drivers/phy/ti/Kconfig" source "drivers/phy/qcom/Kconfig" source "drivers/phy/renesas/Kconfig" +source "drivers/phy/starfive/Kconfig" endmenu diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile index 7a2b764492..6ac867350c 100644 --- a/drivers/phy/Makefile +++ b/drivers/phy/Makefile @@ -44,3 +44,4 @@ obj-y += cadence/ obj-y += ti/ obj-y += qcom/ obj-y += renesas/ +obj-y += starfive/ diff --git a/drivers/phy/starfive/Kconfig b/drivers/phy/starfive/Kconfig new file mode 100644 index 0000000000..f28529d1f9 --- /dev/null +++ b/drivers/phy/starfive/Kconfig @@ -0,0 +1,14 @@ +# +# PHY drivers for Starfive platforms +# + +menu "Starfive PHY driver" + +config PHY_STARFIVE_JH7110_USB2 + bool "Starfive JH7110 USB 2.0 PHY driver" + select PHY + help + Enable this to support the Starfive JH7110 USB 2.0 PHY. + Generic PHY driver JH7110 USB 2.0. + +endmenu diff --git a/drivers/phy/starfive/Makefile b/drivers/phy/starfive/Makefile new file mode 100644 index 0000000000..a405a75e34 --- /dev/null +++ b/drivers/phy/starfive/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2023 Starfive +# + +obj-$(CONFIG_PHY_STARFIVE_JH7110_USB2) += phy-jh7110-usb2.o diff --git a/drivers/phy/starfive/phy-jh7110-usb2.c b/drivers/phy/starfive/phy-jh7110-usb2.c new file mode 100644 index 0000000000..6b5780e5fd --- /dev/null +++ b/drivers/phy/starfive/phy-jh7110-usb2.c @@ -0,0 +1,166 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * StarFive JH7110 USB 2.0 PHY driver + * + * Copyright (C) 2024 StarFive Technology Co., Ltd. + * Author: Minda Chen + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define USB_LS_KEEPALIVE_OFF 0x4 +#define USB_LS_KEEPALIVE_ENABLE BIT(4) +#define USB_PHY_CLK_RATE 125000000 + +struct jh7110_usb2_phy { + struct phy *phy; + struct regmap *sys_syscon; + void __iomem *regs; + struct clk *usb_125m_clk; + struct clk *app_125m; + struct regmap_field *usb_split; + enum phy_mode mode; +}; + +static void usb2_set_ls_keepalive(struct jh7110_usb2_phy *phy, bool set) +{ + /* Host mode enable the LS speed keep-alive signal */ + if (set) + clrsetbits_le32(phy->regs + USB_LS_KEEPALIVE_OFF, + USB_LS_KEEPALIVE_ENABLE, + USB_LS_KEEPALIVE_ENABLE); + else + clrsetbits_le32(phy->regs + USB_LS_KEEPALIVE_OFF, + USB_LS_KEEPALIVE_ENABLE, 0); +} + +static int usb2_phy_set_mode(struct phy *_phy, + enum phy_mode mode, int submode) +{ + struct udevice *dev = _phy->dev; + struct jh7110_usb2_phy *phy = dev_get_priv(dev); + + if (mode == phy->mode) + return 0; + + switch (mode) { + case PHY_MODE_USB_HOST: + case PHY_MODE_USB_DEVICE: + case PHY_MODE_USB_OTG: + dev_dbg(dev, "Changing phy to %d\n", mode); + phy->mode = mode; + usb2_set_ls_keepalive(phy, (mode != PHY_MODE_USB_DEVICE)); + break; + default: + return -EINVAL; + } + + /* set default split usb 2.0 only mode */ + regmap_field_write(phy->usb_split, true); + + return 0; +} + +static int jh7110_usb2_phy_init(struct phy *_phy) +{ + struct udevice *dev = _phy->dev; + struct jh7110_usb2_phy *phy = dev_get_priv(dev); + int ret; + + ret = clk_set_rate(phy->usb_125m_clk, USB_PHY_CLK_RATE); + if (ret < 0) { + dev_err(dev, "Failed to set 125m clock\n"); + return ret; + } + + return clk_prepare_enable(phy->app_125m); +} + +static int jh7110_usb2_phy_exit(struct phy *_phy) +{ + struct udevice *dev = _phy->dev; + struct jh7110_usb2_phy *phy = dev_get_priv(dev); + + clk_disable_unprepare(phy->app_125m); + + return 0; +} + +struct phy_ops jh7110_usb2_phy_ops = { + .init = jh7110_usb2_phy_init, + .exit = jh7110_usb2_phy_exit, + .set_mode = usb2_phy_set_mode, +}; + +int jh7110_usb2_phy_probe(struct udevice *dev) +{ + struct jh7110_usb2_phy *phy = dev_get_priv(dev); + struct ofnode_phandle_args sys_phandle; + struct reg_field usb_split; + int ret; + + phy->regs = dev_read_addr_ptr(dev); + if (!phy->regs) + return -EINVAL; + + ret = dev_read_phandle_with_args(dev, "starfive,sys-syscon", NULL, 1, 0, + &sys_phandle); + + if (ret < 0) { + dev_err(dev, "Can't get sys cfg phandle: %d\n", ret); + return ret; + } + + phy->sys_syscon = syscon_node_to_regmap(sys_phandle.node); + if (IS_ERR(phy->sys_syscon)) { + dev_err(dev, "Can't get syscon regmap: %d\n", ret); + return PTR_ERR(phy->sys_syscon); + } + + usb_split.reg = sys_phandle.args[0]; + usb_split.lsb = 17; + usb_split.msb = 17; + phy->usb_split = devm_regmap_field_alloc(dev, phy->sys_syscon, usb_split); + if (IS_ERR(phy->usb_split)) { + dev_err(dev, "USB split field init failed\n"); + return PTR_ERR(phy->usb_split); + } + + phy->usb_125m_clk = devm_clk_get(dev, "125m"); + if (IS_ERR(phy->usb_125m_clk)) { + dev_err(dev, "Failed to get 125m clock\n"); + return PTR_ERR(phy->usb_125m_clk); + } + + phy->app_125m = devm_clk_get(dev, "app_125m"); + if (IS_ERR(phy->app_125m)) { + dev_err(dev, "Failed to get app 125m clock\n"); + return PTR_ERR(phy->app_125m); + } + + return 0; +} + +static const struct udevice_id jh7110_usb2_phy[] = { + { .compatible = "starfive,jh7110-usb-phy"}, + {}, +}; + +U_BOOT_DRIVER(jh7110_usb2_phy) = { + .name = "jh7110_usb2_phy", + .id = UCLASS_PHY, + .of_match = jh7110_usb2_phy, + .probe = jh7110_usb2_phy_probe, + .ops = &jh7110_usb2_phy_ops, + .priv_auto = sizeof(struct jh7110_usb2_phy), +}; From patchwork Thu Aug 29 01:30:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978193 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvP0D1cRlz1yZ9 for ; Thu, 29 Aug 2024 11:32:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2751B88B3F; Thu, 29 Aug 2024 03:31:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 216A888B31; Thu, 29 Aug 2024 03:31:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20711.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::711]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4544088AD2 for ; Thu, 29 Aug 2024 03:31:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OOLKQUUaHS+bTJRsMNKFJSiiMzCWp0yot7xVCN8Nthq5f93/r6TEdBFDmkOJIGZD2HEpwfyLvDeXWwY3hkW2mHPjFApcT89pN0G1qy9F3Ni6OGKM+xrR8N4ck4u5MuZm+vbiFEhrR8U1KJy3IG28Kta+f5rXUSIY5YhMARIfxyI8t+OqkfciQCtFxNPVI8Y9kB8xzzbnpLYaX4zGLGHDyR4SWJuQnaUGeJbNIrABUQUBPB0GrIJXH+ccfK+oLWvI7UCDyJRGdcZe1gkkMoL/YKNtvZRY7WO0u4LIsJQRHrwRdEr60vPTNcZeBbEPyoxVwdyF0Khd02LJm7Js8vtUoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=F4sBbbaSlku6jLAWUAYlOE7NYoaNDEDYelFsdmopd3g=; b=dQlEs3Y/N7zblGOXdobPe8jVIzRo30rtnq7M4DXpEBV4jEUbBsCMyV3LNo/dCzdzNp4VOEW8ReSJOK27Dk0IABqSf67l2J2I5p7I0HVvWGedxTzBGaxl7Cn1Tb9+VHBDiehYCcGPI6u2E1M9tTM+5JBRbSEmWTEnhwHLbAqvlkwiwVV8Cbu62/tlazG9U3vSV+9qnfTbKYlT3bmmd/DWzMWOoLB0PC/2200gkQtAKksMJpPlJct4YfMn3jtD614QcLIWRYj4O2eUNYELzXxAKVsTLZHRMT8PkUUB8XhgMEPcBIBqLyjfEUXSZ9sPBIGTYjqxbEpFMJVvHVo7/l7aAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0830.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:27::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.26; Thu, 29 Aug 2024 01:31:11 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:11 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 3/9] phy: starfive: Add Starfive JH7110 PCIe 2.0 PHY driver Date: Thu, 29 Aug 2024 09:30:52 +0800 Message-Id: <20240829013058.6178-4-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0830:EE_ X-MS-Office365-Filtering-Correlation-Id: c5b97a97-76a7-4468-f9f3-08dcc7ca43a9 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|41320700013|52116014|7416014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: atMwAPcCXmg+TS9i/Ej7/Z2aX3g0YIJQFfQ0i2o+Ebdl+gW+/UBztWot4cmUOH/2IfU0YlkIA3sDNWspivNekSRh5ptNWJMkYiv0lHpw6QB/FIoAnhGaCxcQr9Ydt49gFVVpE87HwVnpysY+s2R3j67bXyl3clNoXPp/aF/hF2/M9lms5g0EUOR5hn/+WmB9MBeczPPnDp/8CI2mhHWOCq878H/MvZNvm8YnLGkU1PNv6TNTvwENqcOI0o5RSdauRfB9AJpNUv3xH89ZtaAMUI3SHHaMc+C75CnksV/pKsp5ZV9m9Ci0wa9vX4FE7k5ZM+jLwN+8oXD8ssQpikJ30ONkC6vAzTNaUEkbbrviA9u8cb8Nwbtnx9lPEAsYo6pRv55nvkPeGp8x+jRsWsnBX98cVu+0Q1kT4YyuGJiLtzDdwpJ1+4adpDmFXKROqn2lylHDZ5zTrX9k2V5o2yRVIfTXD/JzE9SaKUQhtAbGzccOR/eMfTqEmVpQOx3XvBQnKgnXcnb53d3PK/WHlDGEeuW0qs4IxUe0AhM2eXcK3IuJsopUKfnQ8Op/eClHcUYRW8sDu7zKmRFbBqtv4FwGYT4uFdwNVyxu+TB7F56/j7Umh6DHbKccfiHE0Cm2tON7ORhIqSN+dkooAC/TNFKDQw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(366016)(41320700013)(52116014)(7416014)(1800799024)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6BzOF54sk4U5JDrxnwQRzQ6XJvtINlmNPv9OmlDlEdqiWrDXBsdFesSb0e6YWRBei4GLn8u+tw/q6uEy7jWeJpLu3stpaK2GaO/Tb/JIUow/6Ld16+asfWODUDCXSyU70gZZT1RTl/mQx5xfnjvzE+inkzFc3M8nfEYtBTXV/Qg2msXQM+vgDvjVUGAWNUPW7FB7snK++TcPot5hPIXKGIeuNz7SK0+6GjK2lDUi9r6g4RnXLNRRdHDuJ6Ke/65kOwAA8GjBtWguLiZgvhL9Y+GHn6LOOhnCLCu1ECNGgDZx4C+iBvABgxfajr7tdBJR/gP/1hcFKxm0erP4XlDCUENfD8eRUw2jevClVPMnS6v95/PB0YLiv73Bc7nQ4GlvqPjo1ndKi1Li/I0lJkuLnYvrldOSz5OD1Ru9AwuqFIxClc249BQALgIS0MoC2aKIsLyCXvMh/88PCCnxsxacJM/iscN9p4y1R/K8hK7/LaX+NpfkVA0y5iZBl+fTlHCoUY54e7jXF8fCEXDVlWEKV1QJRZZlPcsUS+oerebnTxtUnsZKm1tDwlf3BMyPADYmBlCK5yeCTrGTTk3iwzUx+T2fEYl866p4ECP+9GLXUD9Awin0urn4Hj8YKZv8B2iLP9Mn9q4u5bAll8aInvHe+fsBQpcAu4GQHHdwJnolAb6LvuulDgm9QDjdYMwiyx9KWOrbEZrpWJBJxa3OGxfsg4EhricDQkCTB/pVi4e1m02sOUfDVvFOvhrBwz39Nbqvwq+0ahZanxLKklrKIxhf7cG1MWlIWainTRxJENcFFS9yJgk5T1rYEviQUC85/NI6bX+QsGIAEcny3NnmM0xX5eIgIKy/k3ZJNIqYziujMTgc4+8GQ+7DlSj/JUUWmfMGlEUhSk0m/7Lx/EqpRufHOpc1UCeKl52XLgUY7A24il9QSI3Q8cTR2Zb2Sb/8S2meej+rwOr7fOjhKGMD9fnzzmJXBA7WQw/E0yawaUcHNo1Gjf+GkMWj+eqT1LJv+L6uKr47h11hkrZz/Id4UAf90w3WzRyf5GC6ZcQJVOnYwUespOieRAoivUu/91g1svthiXweSIrGE60XEzIvw6gJJTjKj8oAhyh8ZjqEmMfEz3/U480zVoWW1HHQfQ5ok2RIQFT/LApPITI7IRYVbUKiD8kIsm7pzms0ejH5xgX2rGTxerzWNcPuzqhgzpPBrJ9Kpw48vyUf/JTLwHQ5ED1zsq+2zFtzfLqMe+5uiu1ZYgXNk0NB29QO0N9Mdv1WvGCIoqa8mvdykJLGueqm6XJgkc+5jmWaGzJO770pYsPBXslHLl7tn9MNvX+uSf5U8Dtvq8K+CiuBrr8UKcijqxZX2dYfzh/l7kEVIJBUc0K9GpeYp3UbEEqkvv0sR+D1B8fFkrkbP+oxffUuftM+2cRdT6v0TFVHPSUwaZRvgRZq+6bkppXqB4mtlHqVgblCc9NveN2fKRnDAd5ZyijVGeHDWmxgJv8L8dEkh4PmJVbTavsHJFWRvPVA58NhAhvnzA/wrpH7EyKG8XZOWPQK+LhK9EnRGF9KRrDjRDXBaWXgm70XDgLRa3kEoEhuBfRAqeOdj3NHee+4dwWws+MKGhqPuA== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5b97a97-76a7-4468-f9f3-08dcc7ca43a9 X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:11.3247 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dlYxCU/kzOjbws9/nxrrQPVeAnkGLg+dsUOfvm+9KPJ+T6mhD8v7UVd2x92YzckshrmtOiMMm/YBYqKsxfpz5TtyUOptINJrKHRWZjNaUag= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0830 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 Starfive JH7110 PCIe 2.0 PHY driver, which is generic PHY driver and can be used as USB 3.0 driver. Signed-off-by: Minda Chen --- drivers/phy/starfive/Kconfig | 7 + drivers/phy/starfive/Makefile | 1 + drivers/phy/starfive/phy-jh7110-pcie.c | 237 +++++++++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 drivers/phy/starfive/phy-jh7110-pcie.c diff --git a/drivers/phy/starfive/Kconfig b/drivers/phy/starfive/Kconfig index f28529d1f9..0843070b74 100644 --- a/drivers/phy/starfive/Kconfig +++ b/drivers/phy/starfive/Kconfig @@ -4,6 +4,13 @@ menu "Starfive PHY driver" +config PHY_STARFIVE_JH7110_PCIE + bool "Starfive JH7110 PCIe 2.0 PHY driver" + select PHY + help + Enable this to support the Starfive JH7110 PCIE 2.0/USB 3.0 PHY. + Generic PHY driver JH7110 USB 3.0/ PCIe 2.0. + config PHY_STARFIVE_JH7110_USB2 bool "Starfive JH7110 USB 2.0 PHY driver" select PHY diff --git a/drivers/phy/starfive/Makefile b/drivers/phy/starfive/Makefile index a405a75e34..82f25aa21b 100644 --- a/drivers/phy/starfive/Makefile +++ b/drivers/phy/starfive/Makefile @@ -3,4 +3,5 @@ # Copyright (C) 2023 Starfive # +obj-$(CONFIG_PHY_STARFIVE_JH7110_PCIE) += phy-jh7110-pcie.o obj-$(CONFIG_PHY_STARFIVE_JH7110_USB2) += phy-jh7110-usb2.o diff --git a/drivers/phy/starfive/phy-jh7110-pcie.c b/drivers/phy/starfive/phy-jh7110-pcie.c new file mode 100644 index 0000000000..d3b04cd166 --- /dev/null +++ b/drivers/phy/starfive/phy-jh7110-pcie.c @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * StarFive JH7110 PCIe 2.0 PHY driver + * + * Copyright (C) 2024 StarFive Technology Co., Ltd. + * Author: Minda Chen + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PCIE_KVCO_LEVEL_OFF 0x28 +#define PCIE_USB3_PHY_PLL_CTL_OFF 0x7c +#define PCIE_USB3_PHY_SS_MODE BIT(4) +#define PCIE_KVCO_TUNE_SIGNAL_OFF 0x80 +#define PHY_KVCO_FINE_TUNE_LEVEL 0x91 +#define PHY_KVCO_FINE_TUNE_SIGNALS 0xc + +#define PCIE_USB3_PHY_MODE 0x1 +#define PCIE_BUS_WIDTH 0x2 +#define PCIE_USB3_PHY_ENABLE 0x1 +#define PCIE_USB3_PHY_SPLIT 0x1 + +struct jh7110_pcie_phy { + struct phy *phy; + struct regmap *stg_syscon; + struct regmap *sys_syscon; + void __iomem *regs; + struct regmap_field *phy_mode; + struct regmap_field *bus_width; + struct regmap_field *usb3_phy_en; + struct regmap_field *usb_split; + enum phy_mode mode; +}; + +static int phy_pcie_mode_set(struct jh7110_pcie_phy *data, bool usb_mode) +{ + unsigned int phy_mode, width, usb3_phy, ss_mode, split; + + /* default is PCIe mode */ + if (!data->stg_syscon || !data->sys_syscon) { + if (usb_mode) { + dev_err(data->phy->dev, "doesn't support usb3 mode\n"); + return -EINVAL; + } + return 0; + } + + if (usb_mode) { + phy_mode = PCIE_USB3_PHY_MODE; + width = 0; + usb3_phy = PCIE_USB3_PHY_ENABLE; + ss_mode = PCIE_USB3_PHY_SS_MODE; + split = 0; + } else { + phy_mode = 0; + width = PCIE_BUS_WIDTH; + usb3_phy = 0; + ss_mode = 0; + split = PCIE_USB3_PHY_SPLIT; + } + + regmap_field_write(data->phy_mode, phy_mode); + regmap_field_write(data->bus_width, width); + regmap_field_write(data->usb3_phy_en, usb3_phy); + clrsetbits_le32(data->regs + PCIE_USB3_PHY_PLL_CTL_OFF, + PCIE_USB3_PHY_SS_MODE, ss_mode); + regmap_field_write(data->usb_split, split); + + return 0; +} + +static void phy_kvco_gain_set(struct jh7110_pcie_phy *phy) +{ + /* PCIe Multi-PHY PLL KVCO Gain fine tune settings: */ + writel(PHY_KVCO_FINE_TUNE_LEVEL, phy->regs + PCIE_KVCO_LEVEL_OFF); + writel(PHY_KVCO_FINE_TUNE_SIGNALS, phy->regs + PCIE_KVCO_TUNE_SIGNAL_OFF); +} + +static int jh7110_pcie_phy_set_mode(struct phy *_phy, + enum phy_mode mode, int submode) +{ + struct udevice *dev = _phy->dev; + struct jh7110_pcie_phy *phy = dev_get_priv(dev); + int ret; + + if (mode == phy->mode) + return 0; + + switch (mode) { + case PHY_MODE_USB_HOST: + case PHY_MODE_USB_DEVICE: + case PHY_MODE_USB_OTG: + ret = phy_pcie_mode_set(phy, 1); + if (ret) + return ret; + break; + case PHY_MODE_PCIE: + phy_pcie_mode_set(phy, 0); + break; + default: + return -EINVAL; + } + + dev_dbg(_phy->dev, "Changing phy mode to %d\n", mode); + phy->mode = mode; + + return 0; +} + +static const struct phy_ops jh7110_pcie_phy_ops = { + .set_mode = jh7110_pcie_phy_set_mode, +}; + +static int phy_stg_regfield_init(struct udevice *dev, int mode, int usb3) +{ + struct jh7110_pcie_phy *phy = dev_get_priv(dev); + struct reg_field phy_mode = REG_FIELD(mode, 20, 21); + struct reg_field bus_width = REG_FIELD(usb3, 2, 3); + struct reg_field usb3_phy_en = REG_FIELD(usb3, 4, 4); + + phy->phy_mode = devm_regmap_field_alloc(dev, phy->stg_syscon, phy_mode); + if (IS_ERR(phy->phy_mode)) { + dev_err(dev, "PHY mode reg field init failed\n"); + return PTR_ERR(phy->phy_mode); + } + + phy->bus_width = devm_regmap_field_alloc(dev, phy->stg_syscon, bus_width); + if (IS_ERR(phy->bus_width)) { + dev_err(dev, "PHY bus width reg field init failed\n"); + return PTR_ERR(phy->bus_width); + } + + phy->usb3_phy_en = devm_regmap_field_alloc(dev, phy->stg_syscon, usb3_phy_en); + if (IS_ERR(phy->usb3_phy_en)) { + dev_err(dev, "USB3 PHY enable field init failed\n"); + return PTR_ERR(phy->bus_width); + } + + return 0; +} + +static int phy_sys_regfield_init(struct udevice *dev, int split) +{ + struct jh7110_pcie_phy *phy = dev_get_priv(dev); + struct reg_field usb_split = REG_FIELD(split, 17, 17); + + phy->usb_split = devm_regmap_field_alloc(dev, phy->sys_syscon, usb_split); + if (IS_ERR(phy->usb_split)) { + dev_err(dev, "USB split field init failed\n"); + return PTR_ERR(phy->usb_split); + } + + return 0; +} + +static int starfive_pcie_phy_get_syscon(struct udevice *dev) +{ + struct jh7110_pcie_phy *phy = dev_get_priv(dev); + struct ofnode_phandle_args sys_phandle, stg_phandle; + int ret; + + /* get corresponding syscon phandle */ + ret = dev_read_phandle_with_args(dev, "starfive,sys-syscon", NULL, 1, 0, + &sys_phandle); + + if (ret < 0) { + dev_err(dev, "Can't get sys cfg phandle: %d\n", ret); + return ret; + } + + ret = dev_read_phandle_with_args(dev, "starfive,stg-syscon", NULL, 2, 0, + &stg_phandle); + + if (ret < 0) { + dev_err(dev, "Can't get stg cfg phandle: %d\n", ret); + return ret; + } + + phy->sys_syscon = syscon_node_to_regmap(sys_phandle.node); + /* get syscon register offset */ + if (!IS_ERR(phy->sys_syscon)) { + ret = phy_sys_regfield_init(dev, sys_phandle.args[0]); + if (ret) + return ret; + } else { + phy->sys_syscon = NULL; + } + + phy->stg_syscon = syscon_node_to_regmap(stg_phandle.node); + if (!IS_ERR(phy->stg_syscon)) + return phy_stg_regfield_init(dev, stg_phandle.args[0], + stg_phandle.args[1]); + else + phy->stg_syscon = NULL; + + return 0; +} + +int jh7110_pcie_phy_probe(struct udevice *dev) +{ + struct jh7110_pcie_phy *phy = dev_get_priv(dev); + int rc; + + phy->regs = dev_read_addr_ptr(dev); + if (!phy->regs) + return -EINVAL; + + rc = starfive_pcie_phy_get_syscon(dev); + if (rc) + return rc; + + phy_kvco_gain_set(phy); + + return 0; +} + +static const struct udevice_id jh7110_pcie_phy[] = { + { .compatible = "starfive,jh7110-pcie-phy"}, + {}, +}; + +U_BOOT_DRIVER(jh7110_pcie_phy) = { + .name = "jh7110_pcie_phy", + .id = UCLASS_PHY, + .of_match = jh7110_pcie_phy, + .probe = jh7110_pcie_phy_probe, + .ops = &jh7110_pcie_phy_ops, + .priv_auto = sizeof(struct jh7110_pcie_phy), +}; From patchwork Thu Aug 29 01:30:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978192 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvNzz5WKNz1yZ9 for ; Thu, 29 Aug 2024 11:31:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B0E2988B16; Thu, 29 Aug 2024 03:31:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 68226889D2; Thu, 29 Aug 2024 03:31:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20716.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::716]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5A6CE88A76 for ; Thu, 29 Aug 2024 03:31:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZfREYBtuROiBbof/zqfqSZslPj9piTJvWp4Ms0zlu74WfrZmjTuFzoYBtzddSN8dMGWcVXiS0zYSoWSJfL+/jcKlWYXeCimwcWf1VYDRi00C0B7pABajU3y2D3wOPlmNFcKjFlBSbYQcLa2To424EMkkEPE7cHSkhJMEfTT6PRTsrY3u6EHLuHczaLcRnwniaUtgX2DSWpCj+nyCRvK9lFEV3s2Dt0uNR5DO/0GZskMV1FKr4wu6cCCFIAE5BNq2jIAtyo6H4i9osI/XhY2WRF07RMoHSrFSoM90DVIEoUWS9NF9qJFxpiKCJoIirksk19L56SII+yG20cdgxLkZjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=1ir3VFEfLhABBHxWohfRXc1ZR9TyjNjxE7Sdef6cWNU=; b=gDCZq9DaToE6x7tCXk2sbu0sovtW7qJZlRxIERlTyWjFYjPqOrCOoVLykbr1bunFQL2gprqLstqDP49br37+jC9m38FAbc4yTvf4n3QckX8jUrB/MDDxUQeMmW4DLADaGLIaM6dcqKokr3BJf4Fu4giXgHMVWobW3us/XnQaVwws6xWBodzHveHFnuXUWZZniSm+pKKBX4j4shiDg4rXQ47OXqyBpt1UuZcklEvOIWEPddNmUB0AeSvXjhNCbvs1ymItfEHdUZtMeDtLewtgumWzbCS5YFlhKPRnXjHuJassREiFaDtm3XgyV0uLOJgLx3BVYUXqFqDhHiSc/DBNtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0574.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 01:31:12 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:12 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 4/9] usb: cdns: starfive: Add cdns USB driver Date: Thu, 29 Aug 2024 09:30:53 +0800 Message-Id: <20240829013058.6178-5-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0574:EE_ X-MS-Office365-Filtering-Correlation-Id: 325c36cf-d494-402b-42d3-08dcc7ca4471 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|41320700013|366016|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: 0AF/W1k2lrAnWY8wfIb45u/+dDs6X27bY70IVhh8rf4b27kB1STZ6oAs550xBcaQXx8ord5l5c8SnurkNsb1ysJBDmnYz+RkPxScAcEgW5cQjVc8U39zOXBCSJGLf7hthmVAUKkG3/smW0j5Ivd95FNTlugscKQnj39W0l3/J1LfIZjvGDzMwQ86SKv3fo1OcqEyRr8aCUKDx26utpapjXC/1nnXi/Aj2fC9fw4D9zMrCHdqVPfxHOv6v8hU7RKnbBE/h6btuGKIaIBnftJb/FpUMIP1RAYyFSAJEurNjRy6anP8R9d30K6W/dqAZfdMgwqm1v1uKLZtFRqaMmXA1WAWFe63bQ7whUxOiZkeflZHBTLtPC/b0QYkTjGK1Wf/kYwkiYlK3WU5UdbRDgoNdVsRPJ79oqyPFBDSMrX2Csd1YQSJCdCdDeEao8CQTX3Gyq4HBeV9gdXsr/4+R8peldGHP8dt/B1FqowKFobYrCWscLmh5mZYrXvQw2zc1uNtjP3wORRaR2y3SJo5rFCoDFE39X5kqwrjjwXxxlsIeKNjYFIcwQik7gP0x5wxwzV+AUOho0OcqhSL/wAmq7Rjbk4VWFFbceuY4DkrVjQoFIZVzp3ypk2wnveLdYwNlFeOgXN1mzIcvThRp8fdaC9GFw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(7416014)(41320700013)(366016)(52116014)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oy1LduOx4T9BvSOtTjRv5Ep8TkbeObPEEp+APZ66MKG7cOMp5a/IEA1/qrulIEQN6rMw9FIve9HhmpwTwdNIH+GTSgnfRkX/hRzjWPX92ge9R9QdnoMkjI31KvINOlS3SibS63tV49SHJTknuOs59rrEimVY61U81fithD+mC3sS7lavWJjdsRUmJPGe1Tz79xj/HUph790G7yCrKgu3lAAuxphoZPZeMX8ra1wOIi6f3AIeBIVdHgCXaQWN2shVQPWcLF+Wst3kctxEw9EuSH6GUy4WDXvMLb92OKW99UwWqNhqimSnipj1I5QCD1BQnItxhWYQkZOkQbP5/lihm64GtpTgDb/JMdyzljL3zM0ehIzVrdv8QurLVmfEYA6UsMbwPEQZILERJXyp4wx31eU5fNZXAKbcD3eg9RrViTQJQJHwafGTOY0C8aX6OPNJIf0PmGZsUgX77G8dcPHzqB2qrOKlqph1Z95HX97B/1VBW0RIeHMjd0bBpXXSQKCbKukVFgry57rkytC+iA0ucYBBB5ox31+pe95WZJT6KotgITjEkflh4H9zOgkZMlLMtIFlSD3VzN4XvxW4dask+ADl9UwL1nqGyCgSuPq/V5ictPd4JsQtIxm9rZeHohB43GCU1Q7WvX3ococxevyWsc9C9FoXPNyD2qsIQk1QyRLq2tH/C/dYNaJi8lEDfiwfxHRmmtdN7VsO/mW5WLQhNWXpsTHl84lk4FQpV+RU7mN9zGtaGZQ75fASswv7IYE/9p2T7Sl0HYdK5hSD34yhGZZBupJN3AkAAvZsmgNFvnCVb90WpY1rJ97gbFRuDJ5dQeRPWlySzLG8UdR6n1iPozI1umK2NkcD+AN0iIgfqVeFZNGG91dz4PxQucjOfTUkGFEcIYQ0LYUZhZNnqFVi0aFb9X+WLlU7X1lVBmFD2oaAfT0lpWDGD1skbxq7inXrksAyxDjXery99iF/+aiJpYKneb59ot9sc/8rkVtmxOHSrI/yOr5Ei/i1ixVUZ2j7unG/y+nncJUFOEPgqPH9nmPBN1jDQzHB/H/tHu1Ca15Bf7lQzpkwC56THS4xwrKenoX2usCV3pq/lSj+diVvR4RhfCEvv8N+fAk95dP3vlW3MXK+QGwn6h54PZAXcc/d+3rCfPW4z/BwFcAcRK5DEcK1AGHmpqR17HCpGCRtjpO3x3bFc176P2TxzV04hdtFR27hdPffkzQ+g0/CmABu23+/ekGHlEGmJd4T+Ac2YCDl0ySm8o+QGeFmd2nPhv7+kLEPemVrLL6jdpYsnplEjI85RvMc0fp2lcgjyH2XET5DIZAvcaoUFCwh88g1IIgNcB8Ghv+SH+LBWK4ybLTDe/ddXSw8tZ+sDFqqM/cUpMvPQZkSKRDB2JfyxGUFq7DF8J4DRH7xrzF620O5P4angDJLN3nAvVtanuPqXtW4C08IoeyUp8ItD6+WE2KKww6sCj435vz9r1bCAnY+UlK69K6JZE9kQI7odRDkgGcD9GYYpUHdeymv6RN5N8NPXzdx3WRONa2R3H7QOhW+M/3wwQYZNxXI6wydBEjAGuU/SS7Bc5YRM7E0II4EHWD8fDffifzPG2Mn0WvVOgX4a5Ulmw== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 325c36cf-d494-402b-42d3-08dcc7ca4471 X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:12.6238 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OjG4+l/aX77s7S+r1FiQs32yXhNikSdy7QfHBx4vhac2c8gd7XmLE9WtcohAQ3xJZJEu1PvX6NdnZ1hQSUIQtNuzbrOUe30pFD+2rlyaLYk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0574 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 cdns USB3 wrapper driver. Signed-off-by: Minda Chen --- drivers/usb/cdns3/Kconfig | 7 ++ drivers/usb/cdns3/Makefile | 2 + drivers/usb/cdns3/cdns3-starfive.c | 191 +++++++++++++++++++++++++++++ 3 files changed, 200 insertions(+) create mode 100644 drivers/usb/cdns3/cdns3-starfive.c diff --git a/drivers/usb/cdns3/Kconfig b/drivers/usb/cdns3/Kconfig index 35b61497d9..f8f363982b 100644 --- a/drivers/usb/cdns3/Kconfig +++ b/drivers/usb/cdns3/Kconfig @@ -55,4 +55,11 @@ config USB_CDNS3_TI help Say 'Y' here if you are building for Texas Instruments platforms that contain Cadence USB3 controller core. E.g.: J721e. + +config USB_CDNS3_STARFIVE + tristate "Cadence USB3 support on Starfive platforms" + default USB_CDNS3 + help + Say 'Y' here if you are building for Starfive platforms + that contain Cadence USB3 controller core. E.g.: JH7110. endif diff --git a/drivers/usb/cdns3/Makefile b/drivers/usb/cdns3/Makefile index 18d7190755..03d1eadb2f 100644 --- a/drivers/usb/cdns3/Makefile +++ b/drivers/usb/cdns3/Makefile @@ -9,3 +9,5 @@ cdns3-$(CONFIG_$(SPL_)USB_CDNS3_GADGET) += gadget.o ep0.o cdns3-$(CONFIG_$(SPL_)USB_CDNS3_HOST) += host.o obj-$(CONFIG_USB_CDNS3_TI) += cdns3-ti.o + +obj-$(CONFIG_USB_CDNS3_STARFIVE) += cdns3-starfive.o diff --git a/drivers/usb/cdns3/cdns3-starfive.c b/drivers/usb/cdns3/cdns3-starfive.c new file mode 100644 index 0000000000..839d72e4e1 --- /dev/null +++ b/drivers/usb/cdns3/cdns3-starfive.c @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * cdns3-starfive.c - StarFive specific Glue layer for Cadence USB Controller + * + * Copyright (C) 2024 StarFive Technology Co., Ltd. + * + * Author: Minda Chen + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "core.h" + +#define USB_STRAP_HOST BIT(17) +#define USB_STRAP_DEVICE BIT(18) +#define USB_STRAP_MASK GENMASK(18, 16) + +#define USB_SUSPENDM_HOST BIT(19) +#define USB_SUSPENDM_MASK BIT(19) + +#define USB_MISC_CFG_MASK GENMASK(23, 20) +#define USB_SUSPENDM_BYPS BIT(20) +#define USB_PLL_EN BIT(22) +#define USB_REFCLK_MODE BIT(23) + +struct cdns_starfive { + struct udevice *dev; + struct regmap *stg_syscon; + struct reset_ctl_bulk resets; + struct clk_bulk clks; + u32 stg_usb_mode; + enum usb_dr_mode mode; +}; + +static void cdns_mode_init(struct cdns_starfive *data, enum usb_dr_mode mode) +{ + unsigned int strap, suspendm; + + regmap_update_bits(data->stg_syscon, data->stg_usb_mode, + USB_MISC_CFG_MASK, + USB_SUSPENDM_BYPS | USB_PLL_EN | USB_REFCLK_MODE); + + switch (mode) { + case USB_DR_MODE_HOST: + strap = USB_STRAP_HOST; + suspendm = USB_SUSPENDM_HOST; + break; + + case USB_DR_MODE_PERIPHERAL: + strap = USB_STRAP_DEVICE; + suspendm = 0; + break; + default: + return; + } + + regmap_update_bits(data->stg_syscon, data->stg_usb_mode, + USB_STRAP_MASK, strap); + regmap_update_bits(data->stg_syscon, data->stg_usb_mode, + USB_SUSPENDM_MASK, suspendm); +} + +static void cdns_clk_rst_deinit(struct cdns_starfive *data) +{ + reset_assert_bulk(&data->resets); + clk_disable_bulk(&data->clks); +} + +static int cdns_clk_rst_init(struct cdns_starfive *data) +{ + int ret; + + ret = clk_get_bulk(data->dev, &data->clks); + if (ret) + return ret; + + ret = reset_get_bulk(data->dev, &data->resets); + if (ret) + goto err_clk; + + ret = clk_enable_bulk(&data->clks); + if (ret) { + dev_err(data->dev, "clk enable failed: %d\n", ret); + goto err_en_clk; + } + + ret = reset_deassert_bulk(&data->resets); + if (ret) { + dev_err(data->dev, "reset deassert failed: %d\n", ret); + goto err_reset; + } + + return 0; + +err_reset: + clk_disable_bulk(&data->clks); +err_en_clk: + reset_release_bulk(&data->resets); +err_clk: + clk_release_bulk(&data->clks); + + return ret; +} + +static int cdns_starfive_get_syscon(struct cdns_starfive *data) +{ + struct ofnode_phandle_args phandle; + int ret; + + ret = dev_read_phandle_with_args(data->dev, "starfive,stg-syscon", NULL, 1, 0, + &phandle); + if (ret < 0) { + dev_err(data->dev, "Can't get stg cfg phandle: %d\n", ret); + return ret; + } + + data->stg_syscon = syscon_node_to_regmap(phandle.node); + if (IS_ERR(data->stg_syscon)) { + dev_err(data->dev, "fail to get regmap: %d\n", (int)PTR_ERR(data->stg_syscon)); + return PTR_ERR(data->stg_syscon); + } + + data->stg_usb_mode = phandle.args[0]; + + return 0; +} + +static int cdns_starfive_probe(struct udevice *dev) +{ + struct cdns_starfive *data = dev_get_plat(dev); + enum usb_dr_mode dr_mode; + ofnode node; + int ret; + + data->dev = dev; + + ret = cdns_starfive_get_syscon(data); + if (ret) + return ret; + + node = ofnode_by_compatible(dev_ofnode(dev), "cdns,usb3"); + if (!ofnode_valid(node)) { + dev_err(dev, "failed to get usb node\n"); + return -ENODEV; + } + + dr_mode = usb_get_dr_mode(node); + + data->mode = dr_mode; + ret = cdns_clk_rst_init(data); + if (ret) { + dev_err(data->dev, "clk reset failed: %d\n", ret); + return ret; + } + cdns_mode_init(data, dr_mode); + + return 0; +} + +static int cdns_starfive_remove(struct udevice *dev) +{ + struct cdns_starfive *data = dev_get_plat(dev); + + cdns_clk_rst_deinit(data); + return 0; +} + +static const struct udevice_id cdns_starfive_of_match[] = { + { .compatible = "starfive,jh7110-usb", }, + {}, +}; + +U_BOOT_DRIVER(cdns_starfive) = { + .name = "cdns-starfive", + .id = UCLASS_NOP, + .of_match = cdns_starfive_of_match, + .bind = cdns3_bind, + .probe = cdns_starfive_probe, + .remove = cdns_starfive_remove, + .plat_auto = sizeof(struct cdns_starfive), + .flags = DM_FLAG_OS_PREPARE, +}; From patchwork Thu Aug 29 01:30:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978194 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvP0R0R48z1yZ9 for ; Thu, 29 Aug 2024 11:32:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BE8C88B60; Thu, 29 Aug 2024 03:31:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id A886088AFB; Thu, 29 Aug 2024 03:31:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20716.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::716]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 41CEF88AFA for ; Thu, 29 Aug 2024 03:31:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hBPACj+woaa1X2VKzgDOA+8M2rqhy2iNN3JaoGqauyL24cX8CN18kGPo9Sj0O/0CzCBCmHcf57VqFYjX2jZOEDzkx4fTqLy8FPXuwICVsmKHqtQiV8biB7NNuNEHJSx3h7solEVoOTJE/LRk84vG0RfgH2fU6uzZXywL07b2ODuOtUBmMVQN7EbfhHcCGszloP4il8ZZIy9fXpzOjDkEWWfw0rxyTgIWT7Uw7HoI1AIhW2mkXrEfSFX3bQxQtFpSQGdfzIZ5NudteUe7F1yEF5yFAlsO6VtS9yaLTKLXTVL6YkON4LargCXCJIc4pRJpXaAjSVYj7Y7fcjEoRDZbmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zOUo+yy46Y9rcFEXfdHlS13Mk1+IbIH6DTlgfTEUIWc=; b=oeEBwIXKbsKs+pdZyL2WxZXSYTO+JNc5lpQJJK9eVeSGUYmu2XQlRbDmpZEVsGl5d8Z8JU9cN/Ws/6Dy+426RJ2QNkkwZgLnP8GBHMtwCzA4OtZOI2TDfShhS2PzZaCmeW9eUinwI+oT0VpeN9BP7aCgltpgd2JdVBYQ7ILtRX0AokKoxn6FqZXg6kfas5m7Zoe5mju/vXWc2Vs73jfnlMTXcvGWXb4n4/KT+hg497/GMqS6R0qMHcqEZne0l7b1+ZFxSCmlECq6PGigwYcYKl+MlibN72TkZiPvah5gAISVh5Q7FQk27u11TxLljDsCo/5oYnPrKrHNeMKhydunUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0574.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 01:31:14 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:13 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 5/9] spl: starfive: visionfive2: Disable USB overcurrent pin by default. Date: Thu, 29 Aug 2024 09:30:54 +0800 Message-Id: <20240829013058.6178-6-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0574:EE_ X-MS-Office365-Filtering-Correlation-Id: 0bfed819-9172-4ed7-7f2b-08dcc7ca453c X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|41320700013|366016|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: wcm8LzEaMsuMQ9Bv9L6YNfggOpUIdAr84inpGNinPIn0OE1ovtOQqNFrcY3p09qZwBzbhgGNcn6PfdV6fpWH/3uq4/RIEWfXdrVvvEATNovv/bQN9m2+YQGhNgpgrHAz0zpPAdRDh0q+GSn8i+uRATOPTArqOQHPVqUnpj0B+WEPUhYMNZQZ20d4JD8hCb1F+WoCTekTl/aoRCdCdhUCiSQhGS0QrVW4NYCU7qj1PN7v+kvVtXb1e4BQpYASlEGw3t3/RSpEWX9lvVTDvdlwVk7Ec+R3RltLMJgyNPBDzTEn7bPVf9kX1J1LGqfSoXWamfVtlg/hSAagzV3grBSGGg29Zjs8zzmu/ySuD4x73xwruDr7x1z32xm8S2fGGItP9DRAgXJubZmgSfUnn1ZaFJt0GP/A3kyLQ7LGQRvIPbIeK+RvA7zGOE281QgWKOQOFCaAL5+fIW7d6kMu2ZEAzpphWHKC+SaCckhgkR/U0rd4GRlwCBuByFykQ0oXyGPRnDRzrk4/G2u3UOtQ9fCYZQs7O2eHtejffhBbNZZFbXR9KQKCplbTR0Ulaxr7LFFxRj2smyEOfAxacoAyeSe8EiG9dpahdmk+abPT7DALWLER0lMkXpcm8I3JGzz0QHQwtEvqgw6UQbXdk+sbUWQY7w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(7416014)(41320700013)(366016)(52116014)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JIcBTTqWxk3u8qh9ntb7la1TXX58iDlor6IJ1bYUeMJF8f+wWnK0uou4hRYrLdkykax/hVV7rcnDTB/bZPsvi2Qgk0ckj7PABuZNiR6+/Toy/H4TL6nUdMHfvNmzsBjLNeKL75Ok0oYSx0RZYm4ljNTTrJ3D7tjJJ2ttqwizWrspc/XXltPF20X3Uab800oIKuC/NMRPYW88dNv7+YWXGBzFKaUYi8dYWm16BwxgDAEcM7p8uRD/oVgs6c2Hhh96z1wvYgpjUoDsoytBKSFqqjVrYhhQzKJiKRRPMMI8tqqsa5bBh9sWZS92KF7BIqPsNfKa/jnpjzl+meAK4O51Nqqh7aXy0ZS29wkU6p1mh8itMuSGEC8qmIk/s8ap0H1FNmb5XdXp9bPM6DXtuabzxSPz+WincOhoqmMQZoBxNUM6x77pscdoLZK5yAByZdt7wkKzpqHP67ThRllV7ombRCpPh2k5mWzCiG/zQWWWQvjaA1LCzS1S3yqKrGb8VsploSSuXWfAc8+qoGjPnXikODXPqHb2vacKihGvrqsS3cNmQBINcs0KDwOeob5ETMwlZkgk4LZWeVSwJsRJ04o5eoDHjGu2Vhwxsswke+MdlKk0GbPKoJLXjZQ/V19WmCG61gQyHsWArcIRXoIEcJFkAz0tICAqQkMHnIx+t+TLxX1PD/1fXI/iS/uOjQmHsiMVQvjtzdt5H2HubxfmgdveikqZXtnMORGyHx5XB+bvOiW4bYDGuYfklRS59Wd9o9g0ZT62f/qmsL1JW8VuagSv5OOzmFmKEhUyd8jvBy4wFxmRD/XIrTRVtJ+vvxWGd9jMa2aGyomq+XG8bZUQ4otOljXd3pui5yHpPtYWoJcDaFjom4CahKLuHgzU+2NOifFfz0+aGIVkwTdfA6jaFGM5BwGjCSeFyB9TZh8qrsPcHw2MoFf3Y8dtl/KnESq/vBOarsQnTi+74nZANyZ+JGT2sy2bacOMh0dY4rQl7+wEQjFoRb40B81XlMXujARI37qc6ai9xl+CxkNcBo1jTGChfxFCVpUuiKnSsFzuqM8pnC42cBJ71Pc6nl7bajA05kYyAfWTLOIecTHtd5rS6hAiGsH1FXsiqXaO5/o+rB6HIO++pc9e5beliUSwc8l56EGvLwRIt6FTk4kGY6QrZKdUctVuCf9HIk3B9uSZHAXfwbHd/vXYvAho1m/SGyUw7RUQGV/29ktztD0GHkzOPCZLWueJyZlAiA55JMNA++7If80SmBtROtEl9nmLRhCCBz5UxSKpQn8KT1uYNk1e1+vKpgTv0imvkomngLji3PCbL3qrK7Q62E+VgnCDicr2SDBeXfDkPMDH9/NvybwkPuP+DvAReF67Tm/LW+/K+seAfI776fycqHAvCC5TmJU3Wf3/izny5y5UUzo5ctrvO2NJPnQ76Wk94WV57v9Ds8BvKIW6d2/D3ziT1MH2bk0zEFOXPoKF2XhotXPO9n+iySTlSHEyOOkCcKa1+Eetxp/Wd85JOsLpVUbZsViQm01l01odNVXEKTWFGot7hBKBCKd+N1KN9XAjPom8XEUEBcUSVtpHbxHMg52viDnpvWTumfZYGTci8If4c3VmvAAjdrZQOQ== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bfed819-9172-4ed7-7f2b-08dcc7ca453c X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:13.9569 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JDcSMV4NV3gkvaFb7pKBPGoSSmEeV49OMdHctKw5dhc4FoQDeRTMyY1TuCxzHbD12g08ZkKa+95xpfywSO9Clt82HRV7vFYKUMi5lA0ER2g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0574 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 For some JH7110 boards, USB host overcurent pin is not reserved, To make USB host work, overcurrent pin must be disabled. So set the pin default disabled in spl stage. Signed-off-by: Minda Chen Tested-by: E Shattow --- arch/riscv/include/asm/arch-jh7110/gpio.h | 5 +++++ board/starfive/visionfive2/spl.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/arch/riscv/include/asm/arch-jh7110/gpio.h b/arch/riscv/include/asm/arch-jh7110/gpio.h index 90aa2f8a9e..be2a1e0d1c 100644 --- a/arch/riscv/include/asm/arch-jh7110/gpio.h +++ b/arch/riscv/include/asm/arch-jh7110/gpio.h @@ -63,6 +63,11 @@ enum gpio_state { GPIO_DIN_MASK << GPIO_SHIFT(gpi), \ ((gpio + 2) & GPIO_DIN_MASK) << GPIO_SHIFT(gpi)) +#define SYS_IOMUX_DIN_DISABLED(gpi)\ + clrsetbits_le32(JH7110_SYS_IOMUX + GPIO_DIN + GPIO_OFFSET(gpi), \ + GPIO_DIN_MASK << GPIO_SHIFT(gpi), \ + ((0x1) & GPIO_DIN_MASK) << GPIO_SHIFT(gpi)) + #define SYS_IOMUX_SET_DS(gpio, ds) \ clrsetbits_le32(JH7110_SYS_IOMUX + GPIO_CONFIG + gpio * 4, \ GPIO_DS_MASK, (ds) << GPIO_DS_SHIFT) diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c index b794b73b6b..388a06e4d9 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -452,6 +452,9 @@ void board_init_f(ulong dummy) JH7110_CLK_CPU_ROOT_MASK, BIT(JH7110_CLK_CPU_ROOT_SHIFT)); + /* Set USB overcurrent overflow pin disable */ + SYS_IOMUX_DIN_DISABLED(2); + ret = spl_board_init_f(); if (ret) { debug("spl_board_init_f init failed: %d\n", ret); From patchwork Thu Aug 29 01:30:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978195 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvP0f46mGz1yZ9 for ; Thu, 29 Aug 2024 11:32:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F1E2E88B68; Thu, 29 Aug 2024 03:31:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3B96E88A75; Thu, 29 Aug 2024 03:31:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20716.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::716]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D9DB988ABA for ; Thu, 29 Aug 2024 03:31:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fYO07IuvTAiGLZPdz/AhHairl2nJ76UM737hODJ/gYj64eLxld+9TxMVUDwlsy6gEgrL7Y3Kj7GFR7QoU8b9d8eqHUrhsKaigKEY7cw/XqFtfiUztOLAFpiGahf5ljB1c2W1/3yCa+QcNVCBZ+lNG0ozyqiELLbktWj8pJqOhPLOE/zbwNmB1arludTWdLyz5Lu3Aji7jWXDwijj0BVygmN84XCU8OLUSyhPpSLq0rYjpwcZyL377RWiu9R2oadS9c+qH4mVu9cGpHpT7l0wLAaAX41aAUfZhJdD3/oluDARdbNkiZXt78gGccoKjBaKj9wMYwfakrdn6CTsebkWXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=hq+aaTQlEq61CZkkyT7KJDcpUwx2TFmIJLTmXXDI59A=; b=DwkIznTohf3TsMDTEDKPV1g8Y+oTXfepyV85sjs9ncgRbte9ogApvGHaY9uuhbEVRPY267xRzR8JpzTqO1VdWfunBz1zU4V/OfcTh/e3mcbSyS/HKiXtAvshz37SMvf0XBaW2p2g78Zm/Ux6tCPbpCuRYce773eARMPjah5tRsYGUsdRvVpJMp27TZHke29/1ZmI4Vk1h7zvtdoXiiCYKzh2DszkqGqCjXfD3V3z+6PEKkuZqRHS2asjuzF0mG2cE+eMIrmSVA2q4pkooIxtmA7r35z5IWzWautisAs4FTXdodx+eBzbAkbCZ+WCG9263TztZ1bDNlBZHrSip+xfCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0574.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 01:31:15 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:15 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 6/9] configs: starfive: Add visionfive2 cadence USB configuration Date: Thu, 29 Aug 2024 09:30:55 +0800 Message-Id: <20240829013058.6178-7-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0574:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b02c1e9-cf37-4d31-ba59-08dcc7ca4601 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|41320700013|366016|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: Bjcoyhp5lKRvrs8NgeCFHIrigkmTWw8dKJh8RquoCZJVTUNEHEaANUdu6WeQPGec8jGY6pVfsYfF1E4FOgBx5eGyAHeTB88WaRxgnxVJKf374srnVQs+saSPkWBMNJE51NoBeFMjTcxWd1/rro+FAi9m50WNbrUL7QH9nrNeoPhMapxVkrfRdCJuA1WkV6gzaOhi2QJUF4TxAcMD1nm2UPCCQh7gTI4hv4N+CucAqPcA5RbZ+VdI4g3MRWl7kVmt8x83ugoxzWDY2BYUEbEoZuuRnEby5Ggh1NrfpVdF2q23LpzqWr+dC4s+FDdNOvMFlCbA8sRquKrcvW1qUbJ6yOZjKOG9EmGOvhnA6P1MsP+rTUBOWpPmwhQqCRKlG0c+oy84pflAnZtAYfJR7Hy7Msa3RBSkcuMDnY2XNjFeEjbiG3Amb4IOi2rURopoSstC2Zk4s24Bd3VtVmGK+p/n2hbgZhuY10LhsYt/5pzCyoXLlNsN/u6BuNA4ZkwzHwlnvTF7qc2CbBqkrEw/zMIyNuwLSAbkCD33l51D6HyC3m+Pc9+IRzIvTJKsdndt/A+esg9Mut9pc7e7fqt9I65+/zrGbvabnG88a8yzXHfitjA0+K2UKbXLQkgHxQbLv1tbW6qcD37370t6uBApMKTOVw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(7416014)(41320700013)(366016)(52116014)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RGI1GWNz0iWJMVOXRoE4X5+dia316NUk93sMn0m0r1XTJAafdPg2B8+kf3vyELKDx1jJT8MeN8P2kzgB1Bcw2K6DdqWIEGZTgy6khX+tomlIrw/Tgrdt183W6pC+bNhkI0lxLKZNQPpFzKtdIursC3N4KuX17ne7vUJAacCBurPWOtyzRYVhRbo51CRghqTtdJE1inQ3FnaO4mtESaw7/uMr0LlXb/rrg/8pSUrXABRVG4Zu99HXP/x346v8jIKb1AY2AcARF8z+2INd2iFXBIlLQU8uswotexxjnRU2gWGn87IKUT/iDCL40RL/CXyb++K9ZAarSML+xg6BHk8bqzsYn5AQmjsE1RivGd18NuCITihAGbET/VBaI2X88BVt78WzhYVo40fKjtNqgTyCatM7CPWfWqnVCBUXSRRHLFwwcjbhCAQq4Fjx/FL81MGs5Atk3Narn5oT/+oUJ2eajUkdAInHdIjNKwPUSrr5XR9pGoa4xpFf2ECqfD3yXXFxnaIS0BMw1psxRyMurGAIWnXnCBihAoAgBap5ik3AgcqSuMySN0WIsFfBFg0gtq9rMHMM1q2fu7cWsHAP1vRwTchnmWHdh29APYtQ/A/GVdFaQkLn9mBj3HwmVphBiwt2qH4iRHzBou5xIQ2jXSGtXkJJqysw3wC0F1etoklbeJXZBqlljpg0Cn2mzrWBETaAU+c9UeT+CvfVbPtue4yECY/fXQjnruVKPQEN6rsVz/pSUTFmiSPUtakWvQwjjxjWmkHFh+y0Etn7F3lBji+qOcwUI4GhU1H2aaxABd0ApE3gbq4OXoG+9QrdUhJi38ym51ySd7lk8haO5RIJU2U5cI5j+kV3Q5DgONl1oRc+rSPtj5lbw9JLXYjrGrgU4nqXygDxAB/U0eY2qLzhKA29VclYixdPS398bgyn8sSsH96PajM//5qSMOixxTXKNNFrqQMzsMHVi48E/0U5lawcEx64rXg4ZCnkhpjpszmQGEwpki2aAdVtR7kSoN7hESLWX4EPodh2nh/1Ok3q/o3J6bXeZA14A8ZnNaBgc22jbbawlOY/F/MminKUGT3lXIGCaBC69abAD6tXfXEbkUk+AJowUl5nmHVZGT0zKy80+jLggw9qjRhp1LbSZ4572b4AdrBIi6Ea3pVMhtsYzK52J6iKpFtI2REYE5CJMFpQKl4AXXmwlRNPrS1LgeEeeMe4ZtwSxE9V81P2C9/OqyLEL7pofVceggMWIJ1AvWdBdZcILv/9u/pMRV+BQirLcaCsAPvpR8xz31KdkdL88oG8GyZILuovOPgnCjGFrFBqIpaD30xgrLIBl8Fb9hyR7aeUtQ9yBP7AelO+nr5koRUUQlDkPWxLWqFldeIpIxGTItZS0kB2juZCE3foYTyTCTfudsUIw1mEplNzoH2+zOzLV6hPJEDmR2iWbCeCvfx2iOm8gCg5fHyKCEP45byA7IeTyWk+H8pQEdUEMDoTBl10wCLx1TO0/+Procc3qmINQ1CZrnXEzdAbH9hgdbo8BK8LYi9AtjGhurK4TXgL1qCX4XVIFIQBIYme3/ECPn/ctNe7g4+jeUGaSDV0c2VFU5nm3Jhsb7Q4EfZaBFzHi/9o/g== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b02c1e9-cf37-4d31-ba59-08dcc7ca4601 X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:15.2510 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xk7ki45oemPhggAoPt1+FiI35MX7BtJptZSzOd+qCoUcWQGElfgXmn+PEuMGFglt7FGVkXorkMr3TU3dFpCMvAyche5T7nGs0O1j/CICvlQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0574 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 cadence USB confiuration. Signed-off-by: Minda Chen --- configs/starfive_visionfive2_defconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig index 174ac24dc7..35137eec59 100644 --- a/configs/starfive_visionfive2_defconfig +++ b/configs/starfive_visionfive2_defconfig @@ -69,6 +69,7 @@ CONFIG_SYS_EEPROM_SIZE=512 CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=4 CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5 CONFIG_CMD_MEMINFO=y +# CONFIG_CMD_BIND is not set CONFIG_CMD_I2C=y CONFIG_CMD_PCI=y CONFIG_CMD_USB=y @@ -112,6 +113,8 @@ CONFIG_NVME_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCI_REGION_MULTI_ENTRY=y CONFIG_PCIE_STARFIVE_JH7110=y +CONFIG_PHY_STARFIVE_JH7110_PCIE=y +CONFIG_PHY_STARFIVE_JH7110_USB2=y CONFIG_PINCTRL=y CONFIG_PINCONF=y CONFIG_SPL_PINCTRL=y @@ -127,13 +130,19 @@ CONFIG_CADENCE_QSPI=y CONFIG_SYSRESET=y CONFIG_TIMER_EARLY=y CONFIG_USB=y +CONFIG_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_PCI=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_PCI=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_PCI=y +CONFIG_USB_CDNS3=y +CONFIG_USB_CDNS3_GADGET=y +CONFIG_USB_CDNS3_HOST=y +# CONFIG_USB_CDNS3_TI is not set CONFIG_USB_KEYBOARD=y +CONFIG_USB_GADGET=y # CONFIG_WATCHDOG is not set # CONFIG_WATCHDOG_AUTOSTART is not set CONFIG_WDT=y From patchwork Thu Aug 29 01:30:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978196 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvP0s2tHdz1yZ9 for ; Thu, 29 Aug 2024 11:32:45 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6437F88B0B; Thu, 29 Aug 2024 03:31:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 8567A88A95; Thu, 29 Aug 2024 03:31:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20716.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::716]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7EB1D88B12 for ; Thu, 29 Aug 2024 03:31:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nVIP3A0mf//jGq0hC9utuAktOXyNBiQiEvJglopte4MsfFGVF+3ZhMLIgbBExko7RsWaRYS6/WdLTa7SStCnNZBzWC2WM30+Jb9BsmWJBSCiycojPxH2hPR+tc1Rd3DFJpL/xJGv79SDIdrgLuC9EOn6//RQQxTjIOCVlHws8QKmPJLGxgSNdLFdELSbDSrAAJz1zLb/kj/zjGa0NPn2rDDTZWecCCQL/51SoibYelycaorMn/U1Mq2HJ9O3n372HS9r5ODJx2jXYqD/1xJxZ9zo5puHbtgK9gIUGdI3UxI/YpCEp9FYAsigqH8ljAW+2LZEBNIMQnRFzVH5Ucp8wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=S3f2cP+iaImk7tjj2GNiGNBKONvvdT3pwD8HEUoh/s4=; b=ogVSwOtzOvpIDE+NSUOeRmGcV8MdhRxl/e1NQeUvrp42bdKc+CVLR29zC5CtpFBScGmG6bEWwgtNcK02kgyoqwmefghcpm1Hvh4HKzevvk1fnFATqdD5zphtE2VhCoaMmrunvFwICNVaG0YwtTG/qr3VCunBYXR+JsxgXS4P4820ILXaHUO6Fmrk1ZpYf6hme8YVxN/JzWdMKkvtfbraQt40zp3RYrN2xiCIzs8N+d603d3NaX+DjC/i0uxTwcJDHHIlfe1VrqNdMcueRC1IBx1qPYdn97RNvRU8Bu/K7k+22Q1je3aW8FTYWnKkFTk9LnoGeqnWEGOJpW5G4Xuunw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0574.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 01:31:16 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:16 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 7/9] dts: starfive: Add JH7110 Cadence USB dts node Date: Thu, 29 Aug 2024 09:30:56 +0800 Message-Id: <20240829013058.6178-8-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0574:EE_ X-MS-Office365-Filtering-Correlation-Id: 30006cfa-9db4-4586-7bb0-08dcc7ca46c7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|41320700013|366016|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: Ydfw+QsWSWX3C66txaHx/7A0ign01SH3BbhyuVhgeW0O5vQdJjLMiLIBxxbPTKKyIoJ0uKOyWbpJJjjOyj2HFWxH35b0LNev+pJEcVOag5EoBtTGAIIzKY5iFtTKg51UYGfEKsVu0tO6KTpQaplZ6gFJGLUCcak+WjYJXSr1TqhteuCXyCLQYe/J5YODB6ERsX2ylq9RyFmOquWkqicYCzK9IFE2VPM0xW1VpAA59fbL4JvINjby/vEmCQ/29ruAG1yfyZn7CG3FuVZT1jGZw2LmW5w/9M9ni9XNAMwjlBfb7dAmCCwe9AStsI2sewzBkdFOseWjQ9bXf/GGU3hwevmIlvS81vNx3KD/VvzVb6hvf3IROARbYFy1t2e6ODkFwZuRKFaD+DNfhWXTvdBHaW5wYpUgwyg7oXVEpWj1hYxxitsgX3rqAu0ri+Ux2mtTqY8QHBBsl37HTNBSXcYiz0NHQkM6nCMCgSKMCTxW0dVN7y1nk46Ct7glL1Mo3JU4MhCpUqpvsHTNsmcQwxmFn2y63wjhhUk9TwB4hgoIt+Pbtc4YwNG3ZeG7vUhLlm7ekri5HT69Lov0HA5FYNdUHup1AlV03tqZsKegRoo6Q5i3FjkGVyM65nzS4MCjt0LrpV09304yvvbCasU1NV6Njg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(7416014)(41320700013)(366016)(52116014)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HVwpCX6kEOtNoX9q7PKSTRn42mDLOQc3tlvF67M/tHHSNUekzFRhw++iNPKcQxS7YqNBNAH5iFVQ3NWPc3ZoPWFa6+FPJdpRYx90CK1Z4C7ppYAZeaaojGStyHWZgZWCiNEMdg4Exl+Qu3U5BVhGl5Ivx8giDDO+EIiLe5i05GHccfkzxosshnEppcZDNufhuH6ZZNqwx0lpQxP6P7VA/wixqogMClWHEB8BY6v/MX+wv6Iye0bjvJ7mUI4XJk1n/KPSUv68ZOmq/uuHTCGD1myma8UvpNuWJnLACIyVk5hi0r0dm1sGG53YksLYByshx2MmbW7/60UCwO8EgjnJzghK9BhPSIOuftPu9i1q9djQqR0kZW9BniErd/NTfjS7UzupeeDqYi+SvlCswrPBU8jSNDyp6kFUH4uiN81l2mX+RlfTw8iGH2FanKfwnFr/hv1KA7q5EPZQFJuQEpV2XvCL6vS2xhgtntZRJsRbqHvmOeHK3YYGKgCFTT0PLFZ9oov6EV1nO7AHqC5o/A65+tvlBus5v7/DApxsLllbX8NDEK81C1Myxr7aXmYL9aEZ1Gt80RbVlO6oumH9e+Z6y1yX5EDvRuGTEOSaChKCXRjsU+lZ19QX8fqHlHyaDj5yThDUxRClO/qz6ye5qNxc0feRcToF/LvVOsv+LJ4LBlPAX2YbeApigwRKl8p6Urh1zJBvz3GbzmWIhtv/cNFU/5o1MhEHSjtbcew6WyeLuPtJwEwa9Y2jtfnbTcFOzguYRo1CfSkTlTMxITXrn5VD4nTiSrQXPxS4DzWqUde4W/ske5VXqRuhbvnpSxlewxmyn2TUOBpx/qhNPPVDnFdvTytCpKt3WiZY1gnLnfOoguJFtqkiaKiYrTPuCDr7wdVKZchLY36oVsn1w9QhJHzc6D4Vmcf4JOTXuqCaq++ogNhpS89ygWYP25swamu7TUxKeZenwgmZhC8Id7Ywv/1SLhjrxNHSFV2B4695q14KY7WIyUGx7OvfIVUSzbdcosPRNt0wPeiFI7Imzcyw2AhIntIl/yNlN5bbKTVi6Zoew/OFoJdjEdlWeJBuRfZnPjUYuvZyo4ks+p2/ka6dCFsY6Muy4joUaMRn4SXOhUYhpRod1Vz084mNFo3G/cMampLuRAY8gPyNqQY749Ux7BxyJtMugsOUUIztpLiCmYLZXAi18dLC3z9GRK8XwmGk7Se/S5MHkANcjAuptVfh1/fxRtosHNhVihqSuJfyEsDw0VgKVn7neZaT2tpexvDsj5Em53S21QRaWT9al9aaY9J09OszPhzQEeAeDi2cBvO54PkdSt5PZPUYf8XAjg6azalzYmrKDqhguUEyT+qH+sVkNOfI/81WBRZaJh85780Himh5ggWG2iB+CPtye11w66dHiNcotTkX//JES0Iye2d73eJi0trEAGOQg1CMiBHYKeaWTtsg5YkpxEhgdndBf3oyVxoWSo0fTocpryww4HT+tyrUHx+Eh30i64iu0KCdzpwdsJv+EKT6ocznd+JgSQutbMECW5s2DqQY7hSpLiM0datiP89uIc1uuRk2WXH6QCe0LaPw1Mqu2hagWMk30KTZ24AZ8DLYZ3gBbtPv3CM1ng== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30006cfa-9db4-4586-7bb0-08dcc7ca46c7 X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:16.5271 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yFK4i2t92ym19jbmLpFcFcprNJ0IHxGXcLIYRj534DOj58vJ818SY19k7kHnVCAcM1BgVlZuZTLwGUh8wmYNMg4vBEwQjCcxz2ZZzLrQqrQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0574 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 Jh7110 Cadence USB dts node, Visionfive2 default setting is USB 2.0 device. Signed-off-by: Minda Chen --- .../dts/jh7110-starfive-visionfive-2.dtsi | 5 ++ arch/riscv/dts/jh7110.dtsi | 53 +++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi index e11babc1cd..44785bbee3 100644 --- a/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi @@ -378,3 +378,8 @@ }; }; }; + +&usb_cdns3 { + dr_mode = "peripheral"; + status = "okay"; +}; diff --git a/arch/riscv/dts/jh7110.dtsi b/arch/riscv/dts/jh7110.dtsi index 2cdc683d49..7bf9b2a03a 100644 --- a/arch/riscv/dts/jh7110.dtsi +++ b/arch/riscv/dts/jh7110.dtsi @@ -371,6 +371,59 @@ status = "disabled"; }; + usb0: usb@10100000 { + compatible = "starfive,jh7110-usb"; + ranges = <0x0 0x0 0x10100000 0x100000>; + #address-cells = <1>; + #size-cells = <1>; + starfive,stg-syscon = <&stg_syscon 0x4>; + clocks = <&stgcrg JH7110_STGCLK_USB_LPM>, + <&stgcrg JH7110_STGCLK_USB_STB>, + <&stgcrg JH7110_STGCLK_USB_APB>, + <&stgcrg JH7110_STGCLK_USB_AXI>, + <&stgcrg JH7110_STGCLK_USB_UTMI_APB>; + clock-names = "lpm", "stb", "apb", "axi", "utmi_apb"; + resets = <&stgcrg JH7110_STGRST_USB_PWRUP>, + <&stgcrg JH7110_STGRST_USB_APB>, + <&stgcrg JH7110_STGRST_USB_AXI>, + <&stgcrg JH7110_STGRST_USB_UTMI_APB>; + reset-names = "pwrup", "apb", "axi", "utmi_apb"; + + usb_cdns3: usb@0 { + compatible = "cdns,usb3"; + reg = <0x0 0x10000>, + <0x10000 0x10000>, + <0x20000 0x10000>; + reg-names = "otg", "xhci", "dev"; + interrupts = <100>, <108>, <110>; + interrupt-names = "host", "peripheral", "otg"; + phys = <&usbphy0>; + phy-names = "cdns3,usb2-phy"; + }; + }; + + usbphy0: phy@10200000 { + compatible = "starfive,jh7110-usb-phy"; + reg = <0x0 0x10200000 0x0 0x10000>; + clocks = <&syscrg JH7110_SYSCLK_USB_125M>, + <&stgcrg JH7110_STGCLK_USB_APP_125>; + clock-names = "125m", "app_125m"; + starfive,sys-syscon = <&sys_syscon 0x18>; + #phy-cells = <0>; + }; + + pciephy0: phy@10210000 { + compatible = "starfive,jh7110-pcie-phy"; + reg = <0x0 0x10210000 0x0 0x10000>; + #phy-cells = <0>; + }; + + pciephy1: phy@10220000 { + compatible = "starfive,jh7110-pcie-phy"; + reg = <0x0 0x10220000 0x0 0x10000>; + #phy-cells = <0>; + }; + stgcrg: clock-controller@10230000 { compatible = "starfive,jh7110-stgcrg"; reg = <0x0 0x10230000 0x0 0x10000>; From patchwork Thu Aug 29 01:30:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978197 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvP140392z1yZ9 for ; Thu, 29 Aug 2024 11:32:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C7DEE88A75; Thu, 29 Aug 2024 03:31:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 1EC5688AC0; Thu, 29 Aug 2024 03:31:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20716.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::716]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 95BF888B29 for ; Thu, 29 Aug 2024 03:31:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mWVKEbzTgDcqLrWE6VYP8g/3geFtZoJTZjNw2+6p1NwQcl9zGWCXj4T6bQHTi3c++TglKnXarjDe95+0AI+QhEVSvSKuhLuAUeh2I4608yEo+PLEP6qb/vXNV9q7cSlx202zeo2rcsKKF/75uIPAN23CXtLILsE9ylfB1gCqLHKW4g8GmJRs8sukRd5cyDJtHU7wtn/CYFieL4w3iCGbPceXM+1b67dePkNo5Q3G6xZtnyfHFKTIf/ulJasSeC5eEQ5GYJMQLEm7PzUdVPACYYYBkK6NO6EI3AhXMS0heY+Xn5FwlolLA15suxv1FgxpgaTwSSXnt38OkxhxZAMQIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=r+lWbjZTKfzwlPGdXIqMcgrm0zQfnQd+vm8HZbBriqs=; b=VRAwMNWAInlGJjpBiQWXvLGLU/Xg/6DFofe1N7HVTjEvq55Qa0eSxcoUGG1nCB+Giv3hMCOFil/qVCWcR/1StBXCg1vKaPf1ZD9dowpWbtVVkN5frCtfsmZw0nizUG2U5pPcjUkt1HEc0sxNA/VLjbHjObqFpo/mD+rUOP3/nyeRv5FqgG1Wf/nDOpC2TaEIpiN0zmCcM1Bvrao6O6FMlsmjQ647Um1WDrYG+WV1xuahKY+EPLQe4Nw14foTb4qYZ6NIo/yUUt0fFRQGXtRcaZESvgdvbOt0qROCXkyEDsEzm+fcLpKzusEUcMEjhDPFTD0C5uBYZ6MJEvQ6LQYGcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0574.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 01:31:17 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:17 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 8/9] spl: starfive: star64: Setup USB fdt fixup function Date: Thu, 29 Aug 2024 09:30:57 +0800 Message-Id: <20240829013058.6178-9-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0574:EE_ X-MS-Office365-Filtering-Correlation-Id: bd2e3be1-5b22-4883-95ce-08dcc7ca478a X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|41320700013|366016|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: 6JBsU+0oZP3tqux8tkIa4NgPMdjDR4R3fNNrCpg33AORge3v7Gz9k6lpTbhO+mGnssltKF7ezlyock1nRo4UhFAu0PocVZ00TjLeJZe9Sxtj9cGjyIOTZ7VgOnK+zdJZoz9KfEdBewvIhWCyYmbxKCd6nRQHOjCgIqo0bS//6AEewkBXY+wiWbM06pTgosSq0FYZQfsfcy+7tF/eglB/ee3hfVWhC7GfhMQtI1NOM8uPOYGmGkd2UJxoaksZoypsrSgBY9fVHgJ+ns+dG2E1a3BdgGnUfV0xprFY8T2MEC0fj8cElEfbqME07ZrgmAk6wpYzefsrOMlC2jNjjCNMzMa8YnCFaJA/ychYbwnWZz5VDUwBdoTzaVM3wAersGl4BdFRRBTudeuDlsFNcmuh0/EDRG3yB5RdAKwnta8/rYa2aVwaHgqb0Qu7bRdst53bUVHcbm/nFOeXVmqm5EpnIxqZCRDd/Fx9aJ0vqlGUKn4o6H1jbAlUTAWepAjvknzM5bCgOghUqnFVJhDh+sCRLW6pU7Z4AhhMjBiDZlU8SZwll9cYQzWsDRHJMIed6ExS4c2DuoV366vMp9floALfJvjrFFliDFyADg1boYXw12J12PyVH1tADMuHNejH/faVwE8qm4AH1c35JdMfPIn2Og== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(7416014)(41320700013)(366016)(52116014)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xKm3XnJSCVEGOIHYmdFdM9I8UB/rAGEguwFHlZIqTQ6S8eSesMw2nbP7eMwdeVvWN00QLToRc2pWhmpcB2FCJO3neSfLXJS5tiX9zEcXwexH4jQZKjlPims0pMSaXMiSRYLXjnGZfjiNwUZw7hhNb9vcWvTULapxT/VEW+BBDfrKU+FW1MfPp/pJJ0Pq4ajzf4G6+sfDjQVYBqg3LNn0nK2bWNuAW2lW0tpYJtKdqVN6xCs9O+p6rquxCPDQ+f43vPzmkiP8SyFcmvcewGTQdutrowNjGqcj2Cn9PriT4lqPK1B1xqHY0JO3OeYu3IQ2/FV6R16mbu2lMZpyFFv+k/1UPj+WXlzXUi0p6hvnIbQmiA9YMD3WRHiXtK1mqarJh6OSIXRrW+PaFmiICJIL21IhgZyfcqeH0K5d0IrtgXYolyI7xKq1zaRuCXqxQtvcWx5OaEqMKCaivSCEON9misJsi3Fxyv5tCzTR1wr13/sTbbkHAs6/ALa/tnFd7gwUppzmdcXRkqhkj+gaAwuk+OpAoEvkyEQUYXBRwQX2L/DzRXNVna/hQn8bHSKO/TaHhkOXZXw8ylt7ddgJAz0WSxCWQGtFtRZ0WMLUllfuz+pNxe/GDjEAlhTM4nLL7xwkvYonbjyOmCxRCYC7sD4S32+MVMgAeMeCNyYi8VHqUxz9BsHdhEWj5XZ9U9eR7Kk/vkn4qXtlJNCxz4l9JcAobdsWon2faUs+c/lxpejGOfLlF3IofcvsTdWAYhbclhFGOnHsQHetvbNO9oUzOT354AumwtCkZ9kqbyVw2thRpzkcKH3ZpsYLocRJM3zcziw4zLw3aGnII2OjBw9apPwkvHZrQ0SdVKEiuxxvrsMZgFLQUIcnCAYopZ2HIR/ULjpRWg8G8CE3NUi2VLoLT5+wv5YxOQPC87Y/f8g1LjljkhoUH91ZixdIhbC1tZqVucI235l/QgbTt2/wm60FvtdqZVIVOcrZ7WLcAQGGyevExkk0EMsfLithVw+EL5TYC8Ogx4GLg0b/yMZcw7iIlJvbRnwu4bgaVy/ahdZDozN8c6QJm7Od+1INu3DIVrhnvsEpQ+yld44hggKiRlDbN8hmQno1H2RUxCGI5U7mzI2oaBOQHV4iSv7tRbpsizrzjN//uzCaNprI+bb1oSwp3YzKqNhZOd73t8bsqKXfYAFNt+O7Ko8vHvEC2Vwi+PdYVDRvWZA0CyyS+6uql6rVpGuxO9OFpCr9zN991E4GbAsvWe4hnBC/9ZF6qy4KYQRilWlud2VEhmqmKM9Oq5bGsSI4yb57HKZUZgoMW4SCYABzKgcGca9rLMTKfYoQm3GgvbbxErEsq+Pbmp/vOcMMjWx0ZpvB9fLTsfIBb9dnFiBweoVEVd19pRpGHfJlfCWSja9JIbBzdA5ETR27Rcq/5aC6LC6BngJWQzzgaB0drGFps8SW/qJBVHsqR4XUWtSX00cuLOsgYvBd7Un+s3UomVkiRpT77UeSc7NzmImJ/TQy1o/9iPIjkE2AD8QUK31I53DGrhtWK6aooGhvxz4jjxVVm7NVy6f/6yhLkVvagsbx7J+T3UF8abR7ArjFX45sl9D17g+vvEMsfI081qgnvtjJ7g== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd2e3be1-5b22-4883-95ce-08dcc7ca478a X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:17.8374 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WVCzX2V1Tgb5mKW7q4UbTtBdV9GicF21fjn3GW+cGG2bcrSCOThaZ2+2t8pk0bITjtZiStOKUbLpC7ylIHd69I4Ig80T5IzCvmG/xU6RNxI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0574 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 Setup star64 USB fdt fixup function. Set dr_mode to host, and add vbus pin (GPIO25), and set USB 3.0 mode. the functions can be used by other 7110 board like Milk-V board. Signed-off-by: Minda Chen Reviewed-by: E Shattow Tested-by: E Shattow --- board/starfive/visionfive2/spl.c | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c index 388a06e4d9..b3034b19a3 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -123,6 +123,69 @@ static const struct starfive_vf2_pro star64_pine64[] = { "tx-internal-delay-ps", "300"}, }; +static void spl_fdt_fixup_usb_vbus_pin(void *fdt, int pin) +{ + int offset, pin_offset; + + offset = fdt_path_offset(fdt, "/soc/pinctrl@13040000"); /* &sysgpio */ + fdt_add_subnode(fdt, offset, "usb0-0"); + fdt_setprop_string(fdt, fdt_path_offset(fdt, "/__symbols__"), + "usb_pins", "/soc/pinctrl@13040000/usb0-0"); + offset = fdt_path_offset(fdt, "/soc/pinctrl@13040000/usb0-0"); + + /* usb_pins */ + fdt_create_phandle(fdt, offset); + fdt_add_subnode(fdt, offset, "driver-vbus-pin"); + offset = fdt_path_offset(fdt, "/soc/pinctrl@13040000/usb0-0/driver-vbus-pin"); + /* GPIOMUX(25, GPOUT_SYS_USB_DRIVE_VBUS, GPOEN_ENABLE, GPI_NONE) */ + fdt_setprop_u32(fdt, offset, "pinmux", (0xff07 << 16) | pin); + fdt_setprop_empty(fdt, offset, "bias-disable"); + fdt_setprop_empty(fdt, offset, "input-disable"); + fdt_setprop_empty(fdt, offset, "input-schmitt-disable"); + fdt_setprop_u32(fdt, offset, "slew-rate", 0); + + offset = fdt_path_offset(fdt, "/soc/usb@10100000"); /* &usb0 */ + fdt_setprop_string(fdt, offset, "pinctrl-names", "default"); + pin_offset = fdt_path_offset(fdt, "/soc/pinctrl@13040000/usb0-0"); + fdt_setprop_u32(fdt, offset, "pinctrl-0", + fdt_get_phandle(fdt, pin_offset)); +} + +static void spl_fdt_fixup_usb_host(void *fdt) +{ + int offset; + + offset = fdt_path_offset(fdt, "/soc/usb@10100000/usb@0"); /*&usb_cdns3 */ + fdt_setprop_string(fdt, offset, "dr_mode", "host"); +} + +static void spl_fdt_fixup_set_usb3(void *fdt) +{ + int offset, phy_offset; + + /* disable pcie0 */ + offset = fdt_path_offset(fdt, "/soc/pcie@2b000000"); /* &pcie0 */ + fdt_setprop_string(fdt, offset, "status", "disabled"); + + offset = fdt_path_offset(fdt, "/soc/phy@10210000"); /* &pciephy0 */ + fdt_setprop_u32(fdt, offset, "starfive,sys-syscon", /* syscon */ + fdt_get_phandle(fdt, + fdt_path_offset(fdt, "/soc/sys_syscon@13030000"))); + fdt_appendprop_u32(fdt, offset, "starfive,sys-syscon", 0x18); /* append reg offset */ + fdt_setprop_u32(fdt, offset, "starfive,stg-syscon", + fdt_get_phandle(fdt, fdt_path_offset(fdt, "/soc/stg_syscon@10240000"))); + /* append reg offset */ + fdt_appendprop_u32(fdt, offset, "starfive,stg-syscon", 0x148); + fdt_appendprop_u32(fdt, offset, "starfive,stg-syscon", 0x1f4); + + offset = fdt_path_offset(fdt, "/soc/usb@10100000/usb@0"); /* usb_cdns3 */ + phy_offset = fdt_path_offset(fdt, "/soc/phy@10210000"); /* <&pciephy0> */ + /* append <&pciephy0> */ + fdt_appendprop_u32(fdt, offset, "phys", fdt_get_phandle(fdt, phy_offset)); + fdt_setprop(fdt, offset, "phy-names", "cdns3,usb2-phy\0cdns3,usb3-phy", + sizeof("cdns3,usb2-phy\0cdns3,usb3-phy")); +} + void spl_fdt_fixup_mars(void *fdt) { static const char compat[] = "milkv,mars\0starfive,jh7110"; @@ -335,6 +398,9 @@ void spl_fdt_fixup_star64(void *fdt) break; } } + spl_fdt_fixup_usb_host(fdt); + spl_fdt_fixup_usb_vbus_pin(fdt, 25); + spl_fdt_fixup_set_usb3(fdt); } void spl_perform_fixups(struct spl_image_info *spl_image) From patchwork Thu Aug 29 01:30:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1978198 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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 4WvP1G3dTmz1yZ9 for ; Thu, 29 Aug 2024 11:33:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33EF888AC0; Thu, 29 Aug 2024 03:31:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 669FD88B5D; Thu, 29 Aug 2024 03:31:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20716.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::716]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3987888AD2 for ; Thu, 29 Aug 2024 03:31:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=minda.chen@starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wj+rSqIz79+sR+/WeyXXTGZ488boqYKA5DPKw0YKHlLKgO3lzT/dw4FhsnbvYPSPH+ae+vvauZ1iFftabuyRu0Aa9//rtSGR11XswHMjScledoMCndGGaM/EalQfseqsFeWvVRyst5i8pV7x7usE1wZQs6Sv2Lih2ufNrh1bDTjwnc/tCK3Y17X8ZvLKMhaI6Otr9jCmgJXfg42exiEeKURrsEkaV4HBTQZqdAfjwDE77TUhlm03wH8rvt8qiCNuWzHnSBzjqOkgFz4+3yExOU/kLxh1erbYTPq2PwBdmzsHZv2DImPT3IbhN4SGx3XMDV9Qe03BfvTv11e0VMV0kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=O8MQpOesbuWwC/BS+SGpdalIf4L5iGzSwGDhaQHOsVM=; b=mBLqpPdDFh4d3uUlak3rbkcEtpvq30DZHAaL7Do/b6v4eRaXKNnUpmobkEBqTlpzmYma3RtFN1k8d+p0DE86kunsY+E5FxMrVd/O7JN2t9T+NPI+n+dEcTuZ8W2LjvZmrPmcJkta4S4iAKTt+OBXtwCV72SeYUV5GIDBhSnN2jf3a96kFmeKs4MzHMbJeATDEJPtahxyWcTyjQnTFdjsPn4KevCpsltmKNEUR8oFSC59X53/OUwU1BLKEBoDP96/L05C9EwLanao8OhKvLAd/tzDXm6uX/Cvx7ka7uUgdremdSWy3koh1a9ItHcZWNhl5z6PCULKSKW5C2Y7geW5PA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0574.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.27; Thu, 29 Aug 2024 01:31:19 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::3f35:8db2:7fdf:9ffb%5]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 01:31:19 +0000 From: Minda Chen To: Marek Vasut , Tom Rini , Roger Quadros , Rick Chen , Leo , Neil Armstrong , Alexey Romanov , Sumit Garg , Mark Kettenis , Nishanth Menon Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , E Shattow , Minda Chen Subject: [PATCH v4 9/9] MAINTAINERS: Update Starfive visionfive2 maintain files. Date: Thu, 29 Aug 2024 09:30:58 +0800 Message-Id: <20240829013058.6178-10-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829013058.6178-1-minda.chen@starfivetech.com> References: <20240829013058.6178-1-minda.chen@starfivetech.com> X-ClientProxiedBy: BJXPR01CA0047.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::14) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0574:EE_ X-MS-Office365-Filtering-Correlation-Id: bf0f9e22-7e50-4f55-313a-08dcc7ca4852 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|41320700013|366016|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: nsHk9ZhRKXGToRiSwA5R6sYkd9XRStP2QS/r+HlOB8pdltu828eTHghAv6RkAm4bERnUYUrqflOJcqhKSikm4Ey7U1/VkqGuaV/CBZYGs9vTl7InTd+GeD+rQmRkHqqfPNzNWUHCHF5y4GLUsBlZFu3V55oodTJKbFRML9mrN0QZ72mqFOiUKYUZfVi8226Vxoek0GaLwMxXZYdYce0K6U9VanMPZBW2MzYf8yQPkSIsnAMZnPmdzspW53SZK//X4rG8ws2dyJarCBTXgm2G6vqq9nVqAd301ODYAgn6Lb1C6xPv5CKjuT1ZOqXYkTVTing9lm6WZbLMbd2s8gMMhLFWayYfuGUbKQWvalq2y7HFaaHor3IHjXXr6pEUlNBYZ2QVNq+WD9FTiFwz7D49mNYRdfFEjJJLh/ypJMuOlHsviWPumEo+7twOrKLGE1k+BkMpMkTBXjkcSnmKESsuUgIeWnM261RtmUA91BhNSJ7vdVxodc6I5pJ1ZabWmTN9ArXK83OW1p1ZJWFEDB9cc948tampeaXttU+4wAYwAVZ0aqW34HqDOJ0a+IHjZq28qecoWPiTxNp1EePpIOEZQJQkn9gl5kZCSt3eBwtoG4gYyshBUVh/28Eud0j7bm3DwopeoevsiES7TUDH8QJ3NQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(7416014)(41320700013)(366016)(52116014)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FfZX1U2HPClZOg3veISu653lsvdR4b2/t4fFMwl4HP9Kj8j6os9hA5pVHcXB/46iQ5/sLbFu0MB6ECIRmdUp201oK4/EJyi9S+vkKuY4xpOLUWqlvpi92vKOTnJb/cH5MH22eT9KqH4Sp98jaHBwXk//4KmyeGHeqwRTFag5Xuyqu/fzZC1b6P2KSxzKulbryxtLw8ta7haC4hRb5lY6TwhtB9HCf3SzjYCUSA8fjbBkfxXa/QGWwCSjuAhh2cxikTetoRxZluObQwcknfb3OS92rrsdie/dBxRnaZhKKF05/oJ993jCcVcIVncp2cfwd6fzoiDqhyA7oVMPHIVrmrtXhtYJuRwg/Twifm57Cwk9WscvMZOHApxbRUYCkevuuN88rSxSyt1o31BexylOmusbvskRTyXeghbnzPKY9/cYNGnO1Qu1BIQSTZEnlcguOVwIJMariDgZA9L72kXHjNgnNf2cIgCjbrUNudodHUhwqdhqqRpdU/wMkNG8TsmhBdRmLXw+Vbz0SKTO0VntyFxhxdUYg5CG/g/Naa7sj/E/XRF3fvNgTuhVDONdmsxYOS58wSsc9tYvT78msqrT09P6sCXN7T59Bch6Fq3XzUcmh4CQPzRof3u3aTQbjRsxeRVJ0jSDNchBLK+CQ2Q0cvUJ7BaDM9tUXV6gKcTPLIa7mBb6Qt1sHbp/QUm84kX7qNF26cU1H/6WuU6oirANObDSFd47gwHRM1/8OtEmyFewtNSwlO4LIFDhjKycc2n7giqJT0VQWEgnPw2ozaNCad6pA9E2OhVdx0jpFju5ZzljF66Uxn+ZLQgL4PqfhvRgemkVS0u5C8OPSMFufzEF89bPlNyGwe9bP+SY9soWPzktYZ3C5jNAQkJ5MPEcoMb0Yu/lUsQMo+95PcxvRVCh3ey+7vM7GpkJt2Uv2SFA/w09tEGNiy0NlVF+jsadBhVGZtChWSGHul/2ncyrBkD6Z0snHU0T0XD/Z6VQMpeJgtD0a+fhm5jfiGewJcN3yBqO8yA3vVTRvIOn/yUNTHRXUxaf4XZCaPr1XyhgNS1jUByr3NlH+xFPJqDBk/nImmegSLaAZbcyr/TSSOmXV97Nyw88c/eNElFg4XFJcOgSMqrozP6YBFNLUWNc0OeQ35hGrJNHNQ9LWEaPDvnwnLIwcDKB4iX26ZTMqEEVNbf+LNcLqfDAFjh/s4Tvib4kcjmHKRMECMTo/9JLn5xdLJVT07BC6TyR4A04cZUAqu80aCCre+1q857Z6vWRpAOv6hYKViMH6K6org9vTx9EqeOzDIwErD7fGVEpmAoTAUApYtny5WqXaeX08qdvre7XcBVcOqSTGanTRgRAIUFoshbOj+J6BZHR+fkQpbYaOdRWi5fY0HV6OcfO9jrb88yh4XMEhuAU9nVFVOATpsy7Yp3zxLlgm7PCYZbr/bXxlp/lXBf5p8ffV9+xOXr1DNfNRa4K7E920HQBp9wOrG3w5BYW9fFy/8Bk0myfDcXdfhXlw5An6Drqv7WBASGLfhq5rS4DIjQKyh3xk0yGeunNEUciR703bx+oYPYqJTpW40ZI5f6gUro9pZTTjEUxgidGbdQ/pgZSv/qYqsRNyWnVGabG9Q== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf0f9e22-7e50-4f55-313a-08dcc7ca4852 X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 01:31:19.1895 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i42julQahPq2lzoIkDowcXYMh0XeUHlwoGEoztx55qdNZ+fFMQdYDTTzm3nye9BiUuuyS0zqHBoS7eKqNgABeGlBLqiaNlz7VlQB7WEOFb4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0574 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 USB related files to Starfive visionfive2 MAINTAINERS. Signed-off-by: Minda Chen Reviewed-by: Marek Vasut --- board/starfive/visionfive2/MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/starfive/visionfive2/MAINTAINERS b/board/starfive/visionfive2/MAINTAINERS index d7f638f9b4..1faf83f581 100644 --- a/board/starfive/visionfive2/MAINTAINERS +++ b/board/starfive/visionfive2/MAINTAINERS @@ -6,3 +6,5 @@ F: board/starfive/visionfive2/ F: include/configs/starfive-visionfive2.h F: configs/starfive_visionfive2_defconfig F: drivers/pci/pcie_starfive_jh7110.c +F: drivers/phy/starfive/ +F: drivers/usb/cdns3/cdns3-starfive.c