From patchwork Sat Oct 12 03:13:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1996330 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 4XQT9N2WVpz1xtp for ; Sat, 12 Oct 2024 14:13:59 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CE4388A47; Sat, 12 Oct 2024 05:13:55 +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 DC9B088A3C; Sat, 12 Oct 2024 05:13:54 +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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2072d.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4420:2::72d]) (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 A0B4788A47 for ; Sat, 12 Oct 2024 05:13:48 +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=WSE2nLmwES0BSg1BF49TOJIXFiaCipGGAd15TGylFA1vwmdRRKoVcxfS35wMk59/kzLPDsTdL6NUp6ePakLPfYqTWtLfrhacr17hWL9McRXdAKKaogvlBstD+VxKwe9EHrsZaNwV0cFEvOvmq1/inlPwer3sHZoyw5KzcHtragwhKZvegpZGJkz48vPuPwvIAeHjjHR5oJupsJ1WHgHspXeXLx47yZpjk37rOj9JBnA4V5CZNHzbup6wu4y72PM8FoE5rQ1ElrtmZ5dUW9FwxA2fg3EexS2fkVQVwGPWxVReG0DMkIi1HfH7B1879smyb1POAWwG12jE5ix2gR8ZgQ== 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=Gyl3NbSkB+9G8rmD5hvrNfIv5u86y1+SOdHIgUcBQwQ=; b=YxkogTTSMFh1lBrkIB0vUwvzTYcflynizlCj5p4KgYAjD9kgG1kPvz3TYuHT5izKl5G6JZjPFmaEZ1l72MZcm9SPMU1YSLgVaLTy1CctYTYsNLvow6VJJkisbV03oaoZCqPrU6mBLSIK4TI/aZ3/BmZRS7Ktlf0nN7IupxCyRMUa1DPbmqFgrLvwjmtCtskI80O7cxUqPPae/VdSY+dY5eSE483coLtnuT2SdAAVFvwxMwdNb4+x4dLUrScJeLh7Sa0HzzMduxAnSSl9XYjIWkGHpsl9szZx8OPwc26cQBX+wQ3LVtmZvDC2rC44KiypguuVflA+2cuLKcb43qSUBA== 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 BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Sat, 12 Oct 2024 03:13:44 +0000 Received: from BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff]) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff%5]) with mapi id 15.20.8048.017; Sat, 12 Oct 2024 03:13:43 +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 v5 1/8] usb: cdns3: Set USB PHY mode in cdns3_drd_update_mode() Date: Sat, 12 Oct 2024 11:13:21 +0800 Message-Id: <20241012031328.4268-2-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241012031328.4268-1-minda.chen@starfivetech.com> References: <20241012031328.4268-1-minda.chen@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0017.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::26) To BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0850:EE_ X-MS-Office365-Filtering-Correlation-Id: 67351af7-1020-44d6-8d43-08dcea6be111 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|41320700013|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: esQOyZQ1cnaca4Rby77NWSY0hnlDVlqEWizrKoOoEKNF9Rgw89GuA4zx/NgeSX+38PWFoXrkyOelgZJjR6HOeNpSn728yILOBhQIFIjl+FV2BK6ekanaBH2JY5VMvC7lAXICV8QOW4b88edAhIOtGRSBXOBKbgdohk0LT0Q1WktkWFb7ezkVc1xqgxeECC14JZpcxScDtAxUYQtXze4Rsa7EXHPPyhr48BS3Mff4gv7/vfJb+F7F/vlTw85WAek/ytqZp5e7lvJjA4m+4UoK68PoJYVZMLgp5GZUodewjWp+Wclc0nOG8p7zVtzgyqqsnySTGxEBJFcr9mzh94w1QhjYyln+RLrC3dpSQGHDfnaQZeafHXS3P74qse/qDt82FJccZg4CHKPlUR1IfjkzHZ2pGpY3XGRa+SFiMOnS7ddEIc16HofHUoAOiT/y3ynNAHJy1WalQWbXdlywoQtVQUuCgpSPK9eTab+Ily71XTAI1We0uJmuIM7ALyDY5aN6be+24xNZ/eXfGs8ig4nv3wmi05XI95vR4IP7QOXJTw3yqe1gx0nIc7FZobINmQk+FvKFZh1vg2ToNpOIC6O8S2ZlVqrh0FGd9Y6TYH1oeyMsrfatX4s+uRlGSaqGALGjty0IZ+8cG9FsnniYA3XjFw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(41320700013)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qxru6IdwWmsOXeGPcTFP/zW12LHX29Dx72HsHyxBHh+WsjG+Fw8Ed+Ng2R4JT/3j3HSsNZz187TaBG131i0jEIpXRgVv2zMKOU66mGK83GqrofYHdIoArEOWwVFttFjPKUrcACF3yAbzrv8uUS5iNQKO/EuNAwhOcl4xekQJg3bXb2la1hxQjBVXyDs5qItfQxRhmHzxYrEeJzAPiZ75DEbCVs0RgneZVttcVXWTN3c3HiIXsjQOrbVuMgHqFL04QlHPhYbrn5b+NVbwKiIIKyik1nyYqHOb5gd9ZOTi1qz32VYodTrqEM3Pzf0dnP4CJTj6mwovmlRj8crjvaIxPKGdHnTZINTZcDUEgpnkfNP5D4VQ2DtmncBwFI7RmZv2RA71HowZUPoQSYAJX4VLlMzOUT46grYYHd1J0KWpT4GTJuBq6cyym9Cy8q0m7zHP/EuBsawUjnNen5zoQRie3e9chl++sD2X1w+s+ZVGs9kyZqxSB69EfDD+jimnsZlwG54yjYo38G+/4CUcYUDtLi2kxp/NY1nzjOlh9z5jJ5gzWJVijVrF0c+8qrSohmXCpv3SRupncfNmQGBeE4s+KnqDEHMCxn/AedXSMSxYr0HmMhkJYt2a8KYeGQtz6gd281fLyhwfGqxtpeYkyAdF6/8GYPCwL1F321bVekqv/GJxeziqvezY/DP1ArD1mm/fJPHcs35BtJGVU7LbIZYUcw45D6V7JHWlbNKiQQ8h8LnJGMHd+8my02IIbM8Qu4aUg15+ggpC7h6x9qW7FBj+YXrLdtNz/dX3Gw++dLYXK4BqHXic7lhb6AADUbDjeR9KNqfRLIvuqobCVODsk83TN8CMmOQIY0QrtU9PVfnZjwUCfjvmmF3niympOFFCUsQqGreZjRixrcEFWrj1oKJ71RASUhgv1b0TWdkOlLtrMFhhoUwY4riEN0m55cXhoYwovTixy5+U2YUutLYK2N3a2poNunpgy0Cptz101WaBOvwuEXOTgotgUk+NmeROdhQuL8J9lTBAY4fip7owxFcWv+vSJw6BHVhNp+TiruWpHDPpi0RzvV8GB6bS+9rFDu+HRcttKQK2/Jgs+1tjm+V+ZfTXIkdPmmCGcE6j7ZZk+dK8WyZQubxS2i+XlUXYHlPdx+Bs4UAVNa00OJZyqzrs52wjpLmE6sai5oo+S1fSDoRFwXp75fsox9Z7hAp1INAZg1EDPPmhb7mJnI4yipkh960mWRVFAylu3cqTXHrr2+xEYTENRe1R9FE1Q7zc7ZWjrJyivXyE9l6m2gxSd6LMaRuy2qQ0zZ9vqASUirYR2kzwk2dv2/fUoV2i8uyq97u3p7bKlaiT6Ks09P0tDmFI7+jdi10uNBNyiEJlrkQuvpZUuR9gpG8ajAJlosAFejuterhIhI/V5OSHanIep0xwaPNDKsvFF/1oZo618jeSjO4vN51H7eVEVW0woGCb6YXSAV4gWEwn8PRuS19tp1jCmZybDIPdz2p3aPOfKrDk97abLc1/GM+ZPt4MTIa576zNfQGyKjHml1TEb9BfjO2ZnLidmnO0F/RjDpMEAytgYX1IVqIq3nLJ/x9hPWYNvyQLBTkWwAbfCL35N2AB/udA/g== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67351af7-1020-44d6-8d43-08dcea6be111 X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 03:13:43.9170 (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: gIWcyocUWi/YJgQ3gStbTdvQhOSWbel9AtKbzrPUNCadj4a2Nr674fMhgLTfIUZq8e5Pgq7uhFDxUuQkoldEQhqn5lzeFGZh0I2yo+gSPZA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0850 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 47874fec29e..cbb13342343 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 Sat Oct 12 03:13:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1996332 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 4XQT9m2P5Tz1xtp for ; Sat, 12 Oct 2024 14:14:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A77C788C63; Sat, 12 Oct 2024 05:13:58 +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 0D43488B55; Sat, 12 Oct 2024 05:13:57 +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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2072d.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4420:2::72d]) (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 D885388B0B for ; Sat, 12 Oct 2024 05:13:52 +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=BwIpRzgwqvOJfvjtzlfQBlCdF4BbTjCzFxEFIm2Kg0dHV3/RXwkCNxDAsmGkFe9OglBlRHiZeuzLbdn2dr9GNv34KrnDqrm67Yg8ZLTaEstSBS5jka4y5gVw068uA6lRxVjboE0r7C2WQIDsvavLf4J9ewuM4Im0SFt+vauIl7u5TPBEvBXQfUEKWF5/aZC4UHgH8bkNJUs5WGv1C+z2rO0zQGuaR1WdmaIWP5hN8UcqXgssLg8EtQWDycHE0SFGZobf8AWf64Sw0fXIaK588lIb0nwYJWfIoF0vAruqPiQCiUo5zpcLtlixRyVzDLtdtPqjkPxcyvVFOZhZYHkm9g== 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=SidO0zidTwgoP7J7wAUX23vUwIbuPBNHHvRerpK5Dm4=; b=WUZX0IIXX6p2PqF+TQEy5H2gbk5ATl+zeoyQBqDBkBguBLg6amxyTn2JOxhIT6nkKaQVlNuCrqi+6lJoJiQgJcik3GIrpoAUUqVKUtM+xMKZNL1ODlSkazARWF985vtjyMvguXnmKZBmz1S+rJbePEBLrtKGTVEhzqziSZVss09bjIoV8dQOdM9fGJxgLPxlwROwBPxw1NGr5owDiY5sAvOZQQYF8ZhgcHpUH0WFbbBwzmMWhdukGft/NoNVLvEM1ZkJHM2mdgDmXhUqUl4KW9YJokL0LfYV60eYoUy0IZcKysc9KCJeGMWPwOtA4sG5C5U+Z1YEHWlH/H3S31fD5A== 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 BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Sat, 12 Oct 2024 03:13:45 +0000 Received: from BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff]) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff%5]) with mapi id 15.20.8048.017; Sat, 12 Oct 2024 03:13:45 +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 v5 2/8] phy: starfive: Add Starfive JH7110 USB 2.0 PHY driver Date: Sat, 12 Oct 2024 11:13:22 +0800 Message-Id: <20241012031328.4268-3-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241012031328.4268-1-minda.chen@starfivetech.com> References: <20241012031328.4268-1-minda.chen@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0017.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::26) To BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0850:EE_ X-MS-Office365-Filtering-Correlation-Id: 94059cc9-9444-4aba-d095-08dcea6be1b2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|41320700013|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: qvi7undRAhNHSWqXmiI+IapZbsG7NS+S5TyYZiDwMktGWYfgaJhiWthkGJG2CZAtUCpj0zeCsz50epARToO40vsuzq9n/ETbRlG35l3Z+fcaCfyEMg2/n1lSh8SCyilcXhTa2MOoN2Jm6SX9Vyu3iYf2id5jnQ4WwxrwoQWilec9q2Fo83o0N2VafQvFCdRgyz/h4KcRpFEmFz/e/2R34K6Pls6QWSewt6VezcLXxgs4qMZ2aHA8v+nPriChKV3QY3QMsyuacI6Vb5UXRO9x5mBBMni/bU3lfzaAghuleAM1J2CtmTElUZ5PyZg3MQgLe2MHywsV7Eh0lIEt6PM5u6ZLGDlQG39tpI3sqhqtk3gQLlCIrR7e5yMFC2o8CWe1RHLHwM4248NxkQFm3GkV6V+pqREMSm3boHLPY35Y6eg7x4jTd0tq9Cen6qwEQ1qS8A1biLzvhrCT/IU+p6xJby55WC0/2W0ELPi7m+5FdHNq2PozAUAouTpXi1FHGkuxCIB9XYYgbdwSvLEkn//4owutZvXGxnQThzxulfusF+trj1TrfQOWI5LZzrYn2iIJl/9zUcA89yop9lXOTTQG/qbkWKFFA5RyaJNNjQ7scO/BESI3Ws+lkAGDOvnykaXt9UT+Wf1cxj5i2j8bs27yEA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(41320700013)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 35/q7juQBeBTtPAf4TrHqJJAvVztjrfSW/BGS15lEd7SKAW2gDnm620cu42K8BoXD/Ab6aQn1OU+UvfPKXjRvgTje9O1K5ybom7yj9cVrD+snBq2h5BPbFFPKpy1sx4lRHXITU72PmR5xsfSSDb2nwrUDeSsS9zDCCDwNVRCeQG1FFfx3trNcRJ3nEwASl+HYhHChK/Mv+4fW6Km3YxK+O26gf1k7x8pA4NfDbhxmdBDPPk3EJb3h2KOlWIDfUa8yhd5ImTT9+OI1/gK698iUAJxFKC2KZtNg9S+mOT8dzu6sQ3F/TWlhbgsvGxg1xVI0bNk7Rvj10QYOkpBnP+Q+UkGlFau/VMfY1v768kWOGhF48mULfT0JiIPoCzB8VffBoV1Ala3TeBcDNGJkeoZdtTvSlO5+85+tTdlwO7nCPNII0j0lqaf28qZWmwc+kvxjTn2To1Q4pQtPS7Cel/zTXdbqE7rjAe7Oj8kfeHHOJpLnfgbhanj/eOViUuJmpg49jMCF7+8VsKVBozsOztUPSLrnitUcgX87Nv4eAU1sdshT3mTY+B+L0XSUts2bcj47UlV1jDhSieGKzfWImrNSyhNEMx1+8AjI6Mo4Z08e89TL/CgZaqcPu0z+o6iA9zfCrNG5aPe0N4kLgbMxZbI6fugeyU6Pq17ppyrSZJOGypgI8LL2XfGb8mlCjKWvkyoUDcOOf4+YrKqa60qVqo/xnw+2p+M39uxl0eLXdo0vFu9kMKTAEFU7bqus5eLJtWQ1qRjpqQVRQf/btsh58fX52SDCLweaGYWPR0bRJF87l+T6TuvW/TMT9ZzKyTrGmstotZmYqmQFOSupBe8cq+lsG+5l5gTvM2iRp6l5V5Dne01tF3NJaBaPtDe+PiXglf0J9XFp95X4JhOp7vk9QtKDY7g/ecvpBisI5TJ1N4tc63xhxKUiddbheCYLyzhSSox1wEHUn4RJXgGt801iJ/3wTs4/DjrpseOoWhTTswWEYDHai1VdQlQBNL359sqATYGHkzSq5kxtwqqAF/sXY1vWDe8y+Zhx0vVnOL2OGjmmdqDZop5Md8ESiQjVBHiLs5uylnhbEl4oFhR9RD9Tjt/GtbPsm2uVkUPZMwbak/53fvsHsoKacB/Gsh41cKUY8zzd5HAlomzjvGce0A2ah0iykVDhQciPMx1J2Iomh6OepDmIV0O8fRu9E5ZGIUCI2B45ir7yFLAMV4zeD8L5+iGhw7yIh5TP4nXP1gdOreDWUITc6FVhAjXgnHKRzGnOIFoNtgmUDbBbNdw9Jnl9xQriNtKl2ZnN2Rgk5XnhsezZ3dlEu25r5Gia6nSnK6KVX2hFCUcZSbdjwC+xvq4a+gmC1l4RbSGAEYgeOQg2FntPBhzcr6DrOWbDIwGANkaO7j5qGHjBsOlneaweLmCh2vDBppEe31B5OzBjtFqgbmXtM6qxMCKpOTU2a6J4e+5+pn/vJse+gL+RIOViCe7HbJIFSr/I9tAcDXXsHPd9PRGWKh5YGZxxXPjMqCUk5ruR5I7dvYhQQbx74pqPpBUO1vnaO6eJwfN89DTcWZJaVlafo5Z8AjYpMfq57815uoxbVWE25mkrjlfpoAtsmBcluY1EA== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94059cc9-9444-4aba-d095-08dcea6be1b2 X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 03:13:44.9744 (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: WMVeYecVjO9mxp8m/+sF7SEfN2skkgChAzgxkpA5W2eU1uRWBu2BkHqYLeMOeSECEUpOCYw444Gy1l7T4MvF9dDdSKQWRq7jQyLrxcEF1jQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0850 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-usb-syscon.h | 9 ++ drivers/phy/starfive/phy-jh7110-usb2.c | 162 +++++++++++++++++++ 6 files changed, 193 insertions(+) create mode 100644 drivers/phy/starfive/Kconfig create mode 100644 drivers/phy/starfive/Makefile create mode 100644 drivers/phy/starfive/phy-jh7110-usb-syscon.h create mode 100644 drivers/phy/starfive/phy-jh7110-usb2.c diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index e12347e8a03..f940648fe58 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 7a2b764492b..6ac867350cb 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 00000000000..a7cf0a55dff --- /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" + depends on 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 00000000000..a405a75e34c --- /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-usb-syscon.h b/drivers/phy/starfive/phy-jh7110-usb-syscon.h new file mode 100644 index 00000000000..0eb66f0d859 --- /dev/null +++ b/drivers/phy/starfive/phy-jh7110-usb-syscon.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef PHY_JH7110_USB_SYSCON_H_ +#define PHY_JH7110_USB_SYSCON_H_ + +#define SYSCON_USB_PDRSTN_REG_OFFSET 0x18 +#define USB_PDRSTN_SPLIT_BIT 17 + +#endif diff --git a/drivers/phy/starfive/phy-jh7110-usb2.c b/drivers/phy/starfive/phy-jh7110-usb2.c new file mode 100644 index 00000000000..1a28381e0df --- /dev/null +++ b/drivers/phy/starfive/phy-jh7110-usb2.c @@ -0,0 +1,162 @@ +// 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 + +#include "phy-jh7110-usb-syscon.h" + +#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 */ + clrsetbits_le32(phy->regs + USB_LS_KEEPALIVE_OFF, + USB_LS_KEEPALIVE_ENABLE, + set ? 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 *usb2_phy = dev_get_priv(dev); + + if (mode == usb2_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); + usb2_phy->mode = mode; + usb2_set_ls_keepalive(usb2_phy, (mode != PHY_MODE_USB_DEVICE)); + break; + default: + return -EINVAL; + } + + /* set default split usb 2.0 only mode */ + regmap_field_write(usb2_phy->usb_split, true); + + return 0; +} + +static int jh7110_usb2_phy_init(struct phy *phy) +{ + struct udevice *dev = phy->dev; + struct jh7110_usb2_phy *usb2_phy = dev_get_priv(dev); + int ret; + + ret = clk_set_rate(usb2_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(usb2_phy->app_125m); +} + +static int jh7110_usb2_phy_exit(struct phy *phy) +{ + struct udevice *dev = phy->dev; + struct jh7110_usb2_phy *usb2_phy = dev_get_priv(dev); + + clk_disable_unprepare(usb2_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); + ofnode node; + struct reg_field usb_split; + int ret; + + phy->regs = dev_read_addr_ptr(dev); + if (!phy->regs) + return -EINVAL; + + node = ofnode_by_compatible(ofnode_null(), "starfive,jh7110-sys-syscon"); + if (!ofnode_valid(node)) { + dev_err(dev, "Can't get syscon dev node\n"); + return -ENODEV; + } + + phy->sys_syscon = syscon_node_to_regmap(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 = SYSCON_USB_PDRSTN_REG_OFFSET; + usb_split.lsb = USB_PDRSTN_SPLIT_BIT; + usb_split.msb = USB_PDRSTN_SPLIT_BIT; + 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 Sat Oct 12 03:13:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1996331 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 4XQT9f0C3Pz1xtp for ; Sat, 12 Oct 2024 14:14:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 017F388A3C; Sat, 12 Oct 2024 05:13:58 +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 07DE488C60; Sat, 12 Oct 2024 05:13:57 +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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20708.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::708]) (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 DD54B88B55 for ; Sat, 12 Oct 2024 05:13:53 +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=ECxxL3yMM0EBX32AjYpTzhXolp+bHVtZr7rmaCALU4bSAS20rhZ7OcuRY2XWDUg7cgG5fPdgjlhQgnNDNYlzuITCsTDwepuB+oFwLxZHbOB34XEkniNzeG7sTvubgPdvccfCWw8r3/weHKkxyWKaJtzup1qN8KU73IkyJwe8ryThCgcrCBa6JZij2qVVqWkLXIxioxrdg08rq+m1mznFGP6ydfnNZHxr9oN+yrpeLqqe/oi2AWoCOaP8DLBu0zfyeRDPFwDyQJe8oQ0ZkBO2hmFNt4oQP/enFQInfnrCTdrQwbtuvt3PjHMdmAnn1YKQV76m5mrfouhfpgpJH5s2jA== 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=i9i53la1VNiU6heQr3vHq2DqWrEeh3RAZI9L6meFCug=; b=Ml0KfyNrngmhm8y0aJSGEQbAx+Nqaf4r7OH6NnKCuB8c6IdQlcaHrdKOvaci/cn5I9JoFx2MGO2e3CdfMk/bG6W9/mAvMNF0lJqXyWWXRNEF5WSVi1lgK/7o9FHLlXWIFDFMNZ3d54ruSZUMTz1K5JydYTyQHfczo0VDSjR6JI+LRX1LXPwnmxz8D/Pd1JLY667zPzvvEKRFjHWu1/vuAuf+/pvoPM7BtxIRU2uvJ/cX73o908jhZRdoYwuDZccWJ5Xc3zZgZGJSALoCLnFWrzQ77KJeGWnRi9fx1SrkDTjyRP1wzN85sScxeSSKSsRghSuAiEZk1l7sxKCCTLV26g== 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 BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Sat, 12 Oct 2024 03:13:46 +0000 Received: from BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff]) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff%5]) with mapi id 15.20.8048.017; Sat, 12 Oct 2024 03:13:46 +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 v5 3/8] phy: starfive: Add Starfive JH7110 PCIe 2.0 PHY driver Date: Sat, 12 Oct 2024 11:13:23 +0800 Message-Id: <20241012031328.4268-4-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241012031328.4268-1-minda.chen@starfivetech.com> References: <20241012031328.4268-1-minda.chen@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0017.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::26) To BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0850:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f113b0d-1711-4cd1-f935-08dcea6be25b X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|41320700013|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: y/Zu+M/DfRBl8pZ9M/7QerHbVCW8+0WAk8jJT7Vqv1rllNsS7II4WJZajG47FyjWvibgyZI410cjw3PQIEh05pkh6w3AAgI3FVuH5JbV5Bh3lf5u1+7W6dma5AFCYv5an4xoZK5QHxSGqzwSHRRhXkcKcc1mJ3b6yVHDXM6A4Cjj9XIe5shaMKQ6hx6rgaAsVcKa3cd9MOhsFfPK0Q8qc4mhVgSfy6Zsplnm41pCp6qkRmkY0/NDH9GnvQqJ5E0YXuR4ffeYVaayO5y8zlTfLJzYEkxcX7QcGOa6hDhnC1N13c7lWfXIAMuV7pHVUNpZdNKsAUEXAK9cKp9DuacYmPa2lwXVYUaRqJr56yF+OYZPQgZlD1vDlAi0cOa7QHwnX55dfbt5JkcstA7coMVcuFzBuo9ekP24pwc/m88+YglIPYi5cxKU9ST0jVhMtRftmYkfEYcNVyEeUKNFY4mGi9+44GeF/Wau3Fll3jkRMMaFkxR+sGCvoiEi7DixCpGCjkS+Je/UQNDyhv75VRq5oQsWAX7DkfnATvZ/exaYbrCpKnIPhMCIwoI2FuKL5LeE9CJ3ggzWHDc7aW0icrMG/qZ1QWyoSzQ2XsfZU+fbtwG5z2Usv+1JHlx6aYnvw0pR8rFA1hW/HYuY1b0hht4Vqg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(41320700013)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: s8rmJChsIawfI9hVeAsQuSVSy8bfhctr65zOOX7KiKQu3MFpmIcV79mfiwCkFsaSu4MgBWvZxfRQCSCaHEf+srIU57Mk1wgZfQFuEed/cV6I7q447U8yOFnDW1D6cPn/dJlA26SEnvH8pnMZgpecCAGuDHU7pltn1f3tCKU7SkzpREI00Z/81yN84NoutPjYVZrawAgxzi5WgBdMPdGgbNlMWiB5OPzqks/hYh/iTHMRjfyIHJdrh+7os2iYCJnkaJ1bu651qzN5wkzBy+E9rGUFB7OEhNXjJDuXkO8XZ5XIShFqCsiPBRae0DSwb5qoGdwrhblbkvd/Me5fBH/wDE2biEQl+QP7KGhtYgITMHrJVnJ8Jwp8tupOxIDCQ15fXrmhPMxh1eX8qHdCrqz2ABsBWVG+FPJNzHYI4Ee0hwhQDORZ5756OkTlP9nc0PuVq1mDpL01gtbtyM8PXtiuEt+2aRYFDrKPFdDRQ2CRrUuxgu2NmRwsgtiEybQ7sfWnZRGAagOA5Xd1tXvmrX9R4uCrjsMOp+gJWmB92h9wuxdE0jU1dTXxde+tlRHcydoyu65LZVMKuxkwdqmcB21KEQAU3bC74uiQstfv4YQAhDNP1BMCyp9zhof4/C/RHAcKivjdTfgy1tFtU4X9CdAXmPptczyvZRHff0G23bEoxEeYzbiT2VC3cUCS1iuTT64lpqpNxA/g7b33xZF9BgTJBQ1JbF3BFhUJpxjWYqzVq7Q8PuWMmLvVu0f+hf5JC4SRdcH7+efDqc8TwyFMXbIB2G1RgLOJ+u38XNj54SWyWpSCDX5uv8oRQsVty/zPHE7qK/ddgSNbyVyszzQ7r4AnrzaFwAsEdDLao8wTg0gzFpEIRiQqu7cS2pda0JSAqOepXhUQWkwycSp+zIy6SyV/sEJyMiycCuLZUUw06syqcD/y81eitGy2vHMgNuH0UFbIj19D1bA7UbPS2YLu58AVRfCpi2q6ThmGcVthOUuNx3mddMvoaLL042FMVbp9nrCAne4Y2nnY3g4uf/uchJzmu68rGyzlclsvhzLCo5r3mNioZfoaDGuG4BSYIlUFFeE6LEWLTLisvtnjrl2xTJp3OsBCPVSWHVnIn+8MGfLtkmgW/9sf/vL/vXnB9/PnNLDhMXiPvKh2TT0JGf8bMCjveuDo1EEA1Ieqq6hJi5q+zHs2wx0B3YSG3cOWItYzirROAfz/LpQwMdIphZSdwUXraGR5DNM8pKT3wDbnMwNYdNgdG6gyqxFIa6rpaeNu/TsD4VMru4TTXMuVs9/t1jiFx3+njnYhQxrY0KCze8AAB+b8zpCcsMsu3igicZ8pt1ywWKQJheJ/pF7fS7H2nnbOQpcTBmKSeYERtm2VMK0n95Dd8Ioq+R0bgMa8m4UthN07/5V6VF/PoHQn+eVwbigOuxJemebHnj1ZpiaR8+GZncQ6Nio3LMiYC6tHRJJPwT70KE4SektB6il2N3bjTTCULNsm30YQ5Y71VhpGwZFZGHHxiF3Pw/8Tp2rE4vTttAYTiqaqFB1YXAxZa6onIGLjIf0EYUbpPtGF/DPCiEd8/q3DZs9AYMF+S+V8M2LFoc7t+EMvQ2YP/pzuSKfMn91BrA== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f113b0d-1711-4cd1-f935-08dcea6be25b X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 03:13:46.0839 (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: itm8kIjHsJP3ugsujRrrLNY+rZge8o9xK+2ypgGJ4rBhzdS6LZt5JOOL7lLa8YTirvsXDy+6h1PFwtYKxR/6xfirNNYg2ZtMED1b2h/H59o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0850 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 | 239 +++++++++++++++++++++++++ 3 files changed, 247 insertions(+) create mode 100644 drivers/phy/starfive/phy-jh7110-pcie.c diff --git a/drivers/phy/starfive/Kconfig b/drivers/phy/starfive/Kconfig index a7cf0a55dff..d11338ed484 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" + depends on 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" depends on PHY diff --git a/drivers/phy/starfive/Makefile b/drivers/phy/starfive/Makefile index a405a75e34c..82f25aa21b7 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 00000000000..ecb04bdedfa --- /dev/null +++ b/drivers/phy/starfive/phy-jh7110-pcie.c @@ -0,0 +1,239 @@ +// 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 + +#include "phy-jh7110-usb-syscon.h" + +#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 *pcie_phy = dev_get_priv(dev); + int ret; + + if (mode == pcie_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(pcie_phy, 1); + if (ret) + return ret; + break; + case PHY_MODE_PCIE: + phy_pcie_mode_set(pcie_phy, 0); + break; + default: + return -EINVAL; + } + + dev_dbg(phy->dev, "Changing PHY mode to %d\n", mode); + pcie_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, USB_PDRSTN_SPLIT_BIT, USB_PDRSTN_SPLIT_BIT); + + 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, 0, 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, SYSCON_USB_PDRSTN_REG_OFFSET); + 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 Sat Oct 12 03:13:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1996334 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 4XQTBB6MzMz1xtp for ; Sat, 12 Oct 2024 14:14:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6E78288B58; Sat, 12 Oct 2024 05:14:00 +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 119FE88B1F; Sat, 12 Oct 2024 05:13:59 +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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20708.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::708]) (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 9D99E88B79 for ; Sat, 12 Oct 2024 05:13:54 +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=L+JOMOFax9P/V0KnF7u2U4qSey/UsbylfUI9ifol70UEDr9VNOwmOycQzyBDcoeExHXYKgH7Tm1hkFTvuK6q0FHTpj0w4TE67wTGaqt7Afxsgc28XofChuXgTpjjL6LJAxlDSBU+xH4bhS3H7XXi5bFqLLxp8B4NTzeYRr4IhylvUH46ayfb7nDjUJAJUgnfAxxmfKPaoVsbaD+p5ZoJQm1ZARzoJuXPG6x9NGmOYefODh1OYTNrUrpQknHm/ZUKpzMXH3G3AmWPdNAT1cAbMZb7ECKR8oDo/vPxao21n1DJqXKLRQ7ARS1msRw4zNErVF5aAZ6+A5pmd1PUQVc0eQ== 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=zSWpKZwjKglNyD5kUDo03tGh1KBM8g2582ABro9Ujso=; b=UAYuDog9QfVQjOarMN2miQLDsTD4wFoGRP4RMjKO01p+ITSN3nl4+wfC+0qNhV87P4dYvIPIdIGTkZlRBnsu/EF9LFi3Sg/zNs5fKtljTu91m+y+XRQpfqDUKya1pDlzHJ9yRtJ2KyukD6pgWgKdddXK2pXPjQy3cjwBP+UWeVCLG0nfpAHUE/92CobPiIGX0huwI53llR/EajzVPeqkon2DupWeKRBpt55UchzLR1ty3cUqklcPt8pKlBpqkCANaCkLvr2oa+5Catw1F+YixS2b6Jwx0aTDNlRyeNoGhKVscBjbf85DCp5bGAMJ3QvY7yiVNCdG7Sa0Ge9GgdVlRw== 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 BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Sat, 12 Oct 2024 03:13:47 +0000 Received: from BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff]) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff%5]) with mapi id 15.20.8048.017; Sat, 12 Oct 2024 03:13:47 +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 v5 4/8] usb: cdns: starfive: Add cdns USB driver Date: Sat, 12 Oct 2024 11:13:24 +0800 Message-Id: <20241012031328.4268-5-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241012031328.4268-1-minda.chen@starfivetech.com> References: <20241012031328.4268-1-minda.chen@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0017.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::26) To BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0850:EE_ X-MS-Office365-Filtering-Correlation-Id: 94d4dcad-3cda-4fbb-f142-08dcea6be2f9 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|41320700013|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: pA/7e7A0xBosdZPItsz/nuSQrOO6wOFF/Dcncqchsv76BhAhwlTNrQiiw+C90FzZZMHPhfZ4eQzNsO3ZptuTUZzSTaflNJNWsd6zOMqLfHH0pKptjw53o72E8gcBrFdK7S6PqVzNdZwQoa80ghOsLwjWtrY4Ge/LfYjddaSgfEpC1+ouXZhLuHZ06Qk5xAmcoCn8y4y9BUmRFUVib1QG6sZ8gwLg9TpK24QY/HOnZj5oWspcqTmuYkOHm31JX9d05RO1o5VziLFsMz6bt3EQwQTzKmJ9h7WfEDzMYuICWzNN8Y3uUdh8DuqaFcxWUNFFlb1jc28UCfjGt5sdztok0P6/VKEqpYJiPiJRXwn5pzZ+9Rg7tJft9lBpXZvyBVrOxww0PV8g4cDcjhQiMAniAodtdoI7mC0hyjyTGQ/rQg1K6vGg3S/Y5RJDU+dgOm4wHEIiMlqY4voa/7uFWzKZCH/fo9BSDIYQu4puLlk1FU7dZTKlNoZ3tDgxicWhntFDjHt4e+HqIHrbmoieULNMYdgemCTs0uz5nbF2Dsa9mAAwqOMwG2NSAiwIOT2d7AEluwNdVkTlKY7+zB0YHYDj/4VAZTt/F5nE5t7SqfJh1oAjxjn44wg/Cm9pgUc33yN/rmFH9XXfW0+x6tlHlum6eg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(41320700013)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wwo9K+PNoim6BTEMpl1q2s23fJAMZWye2f0/liibKmDbuJCkJQfCJF4bRNVdpH5SDsCADnDyWbNPr49o6PAgNuz1KqtacFC5Xn+ekqoZ4qoUkvbzppUSnth3hyqTI8fLOFNO0ez/ZD2w5Tkw9QDo5bG2apaWv8OfhE4CUSm+qm1gE9IvFpeas0FeTRArSI/2Ceo00rwsr9E5/VfHWGF0/rPIeKNhEgv3TmwAzKXipi8HDECcR7kHc9eiQD/by32ijFp2RofYQx1RdbBNQ8A3shbYhpbRZ3VGn/sdh1IGRRniZc0tTTA56TS5JJbQXaxyyjggWv8RZBKrV/cbbsaJLmKhP3jvT7fmrPUUVg4fYBHsly9XtCmrvzMiDUwtkWKgHn0gVfoYcTCog9SEC7foUDz+xSNsDqwxurBHrHFVJCP6p53d+95AurKXZ6WSDyq+YN6c/HgOHvwPiT5/CWwJ5fC+/M95CTG9hkfy6FmPqsPLf6+CyEKCxgsMgfQrr6ytoxe6gvdyABOcQLDENs2ihjeqFMaHtffTsDmDoAno0jzJNx+LI+s1eGgvOYFcc6UIXuu1rkiVJuLYirj3MmmpM7t+s39rI4wGeOsgPNYDYfufe2kYEVIEFKVZ4jzwyjjoUxs49ac0IaO6oYUaxlDh9q8HgbGJFUDqNfcyi23iZvZrkg3nH4B6GEQqxY9hIa6W0QXxfAIorEo9lQrcO1BKvyVFLckq0YAOwkdjxs3G9VNRkZs+I9PmUOEjQj9jbbxpqLJz+TMPCwdtDU4pgMyH/CK63sAeIuT1ynGbJXDGIzV6fCN458ooZW4B4l5rTkpxDyiU8KYjV/tzjvmRmJLuvpI5k4jnMtySBhNP+h5EzMa6aCGICvpr2o9L3OXsZxHhpi3YHfuBhVrI6P7kRSJrrfShVL3B1bPizSXHYMTxZnp/9jXkYWFNwzEkjWlUQ5Bjiln1Y3gHYB+vNF0YqlwVj5n7YO0qZ7HUtIzxsjQSAJzWQPBCLgrZmYFtJhCUliXbO51vXBRC+8c8yLVJMgAH2yeS6L9E6EUMoftLyb7b+ISTkBReQV4MhQyX81iAZ/sKzcb3v1iKIeDEIQOPmkLXCgB1yS+CNwmUQsSrWWwJp8iMHHAzNLawdfWycfANRT7HPlIHQuEidGyOkS9DNyD/GKcDsUyjEOBYQBDMtMR6/2VkTT3XRI/HXhGjmsro/A/07lQvoJa09SnYOn8MLu/lSXAnhboSA+P2tEfMOvPuELwBQrhvxiSvCANnWjSOoIZz2SN7sktm1uNj9X6bf7YOoZl0ivDSCU0HokqtsbIS8wDPtEfYbR49kv50AAYdoYuc6bIK+CTIUneEmAYur7zbtHwO+G14gi+Z0Z/o29WB+5HMbmsiOykKTAZyv4dSmFznEEeDgL/fPWfBDI4XGdE5Tui74BQpihnpiLmgtlvvilzyCOXA6SLu8MVLrUiA3TMuYhZq08YePybtJVTYVHWZIKCMeD6a9Mm4WFr0mLhmuMhBXeTY4sWjnOgcxisG31OADo43pBG43sPTB7zmtTg4pLaN1GBGycCCVGX/UBvH4ejIan/a2zvEgHvqjP44zQFSZqeA85EUcrEdPTf7EmAaIA== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94d4dcad-3cda-4fbb-f142-08dcea6be2f9 X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 03:13:47.1276 (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: HGK9T3shENGUNa0huqssrjhxzLqhTUGM+8rD+oOZiQCBMIecGnhN5fgFzc/C65vBqT4FQPfH382rvvHok6GL45ABbJiwhvvMKSfjgftEmR8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0850 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. And cdns core driver also get dr mode from wrapper devcie dts node to make it is same with Starfive cdns USB Linux kernel driver, preparing for enable OF_UPSTREAM. Signed-off-by: Minda Chen --- drivers/usb/cdns3/Kconfig | 7 ++ drivers/usb/cdns3/Makefile | 2 + drivers/usb/cdns3/cdns3-starfive.c | 183 +++++++++++++++++++++++++++++ drivers/usb/cdns3/core.c | 3 + 4 files changed, 195 insertions(+) create mode 100644 drivers/usb/cdns3/cdns3-starfive.c diff --git a/drivers/usb/cdns3/Kconfig b/drivers/usb/cdns3/Kconfig index 35b61497d9c..6c9595c3c49 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 y if STARFIVE_JH7110 + 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 18d7190755d..03d1eadb2ff 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 00000000000..fad05451c80 --- /dev/null +++ b/drivers/usb/cdns3/cdns3-starfive.c @@ -0,0 +1,183 @@ +// 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_SUSPENDM_MASK | USB_STRAP_MASK, + strap | 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; + int ret; + + data->dev = dev; + + ret = cdns_starfive_get_syscon(data); + if (ret) + return ret; + + dr_mode = usb_get_dr_mode(dev_ofnode(dev)); + + 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, +}; diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index cbe06a9e7b6..9d0a56fd0e7 100644 --- a/drivers/usb/cdns3/core.c +++ b/drivers/usb/cdns3/core.c @@ -410,6 +410,9 @@ int cdns3_bind(struct udevice *parent) name = ofnode_get_name(node); dr_mode = usb_get_dr_mode(node); + if (dr_mode == USB_DR_MODE_UNKNOWN) + dr_mode = usb_get_dr_mode(dev_ofnode(parent)); + switch (dr_mode) { #if defined(CONFIG_SPL_USB_HOST) || \ (!defined(CONFIG_SPL_BUILD) && defined(CONFIG_USB_HOST)) From patchwork Sat Oct 12 03:13:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1996335 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 4XQTBP0fDyz1xtp for ; Sat, 12 Oct 2024 14:14:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CDB3C88C4D; Sat, 12 Oct 2024 05:14:01 +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 DC64B88CA1; Sat, 12 Oct 2024 05:13:59 +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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2072d.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4420:2::72d]) (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 9491388AB2 for ; Sat, 12 Oct 2024 05:13:55 +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=esSSMROTwjVuQUHDVqCLqQtCEJScaH7yYipwx/2LEd1mwcGhBK855FyR0aS2CujSnGF+2Ft7PBbldP5jntiXFiXstQ5A0pMnHlCaAFAUOXzuustikYgnzkQrYpPiJn8w0UZivb5bRh+JPbX1bwfIIQskZ7ftkrCBfLAJltJcMOUSwLYk+gFmCEz9FDRB8zbEXkhMf+B4m9hhJ6qDche/tS5T8dXXqnsRUolN2zu6bAoIS1KI6/gC/OtxB/iWPrm/7cnId8USYqakOepi4G35HU6aCxUx4KYAHlIGSmzWyDE16CujoqI5XdOXSg6ChSwgYUXSCbOQe8/A54rUeP2Puw== 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=KXqRkUX5RuwfUQMtYDCHOVh3gCEYxTxjr3a2QfVwldc=; b=m2zjhLhVnE8V6VzYXx7mfG9UZqN1Tv2wqJ5tASpi9iRnrIJlmh9sXGgoUW3cNrvRRjWZeh+nXxqhJjWQ8j0iFLCQlWqpu6TlPnIf3BRyBQF3w8uAZxG3lcP8k/EJntmDB6TlY5BC3RF3yjOIR0JVtRt7YTBLxLmja6Wnx6iG0AVkUeDMoI+fhec5KqoKDsxdyTJi8I1iJo7oW5LfR6yWoAOA+3Fln7sU/bhTlho9fOH5EYVp5MmR8HwUVCZFbAkTa50V61Q8WPAbIsl8cOaX8Az1Tq+L6PK3KzlJ09G8zhh7R0M441nbjwm6+KTXN99IAorfNnWCGbl2LNMmlNHLsg== 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 BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Sat, 12 Oct 2024 03:13:48 +0000 Received: from BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff]) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff%5]) with mapi id 15.20.8048.017; Sat, 12 Oct 2024 03:13:48 +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 v5 5/8] spl: starfive: visionfive2: Disable USB overcurrent pin by default. Date: Sat, 12 Oct 2024 11:13:25 +0800 Message-Id: <20241012031328.4268-6-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241012031328.4268-1-minda.chen@starfivetech.com> References: <20241012031328.4268-1-minda.chen@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0017.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::26) To BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0850:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e4f3249-1f69-40ad-f694-08dcea6be39c X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|41320700013|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: G9WUYiC1lLwbSf9D5NjtbXUkk8mxqPubUldZltH/RbZx4z9pzScsA5bY6OHh+ir6wMWmZuz+R2Qp/W5lxxfT6VXrpMJZgeidij8pXgQJQNwodnq0VuEf+mqKQ4mypemv91qscFFnersXoL3pnmv1VU7Yjwl1yzj/EE0ilA7v96ZioTnFiQlysTMUm9AS6s4DOFzOTzrsIQgRQly53o83JruMzi0XR6ncfKJ86xFHFLEvGWrbQktQELwt+Quh8rR++3o8DI4ky/IEdvCot01FW6BM4SWtnFd4CHdEYnCxdfVReo6/WRIG8RHwj50QTU2/hQklBCH7vkPKUf5/hcNKVz3x/xnTyzwMGa7opnCqg09wKELGRjipAZofL9eW12M4UNvsMBsZpH+Mst0LAOuz8i7E5i6m8aTaNKSe8SHRdcrIWUov7fPw99qcSZLxXvkBihXVmphvUN+XLdU7yArTMDaZNqp5Vq9yJ1FZTNrh43v/QCgUqGj8TByqsZNnib/llmCv6yWvuc/p5kFwOSQrJNNXTbRMnndnO90+2JGoO96ThyK5SSEvTqIj69ZmoYXzPFzANgc1iFChrdDcCEn4U+++jeHAY16lGRJJSfs8YOqVpsyFdKK2Nt7cTLXFFCQYnSXbO2QXwpTQ7flZMsrKQw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(41320700013)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EcSu1gH7w4ekQrhzy45AIN8kH+7EUD1ssKos4RoFBS1lhXqiZCOtEkzzzaVhwFCsALzGRoOIURbU+NcYxLxjhnifYzJGQflcjuZDHNyG4lUhNO17vC0jqVK8m73D0n55X2UIv96eS/Q6jrW7rctZecxjoNZDKbpchujUwAblhCASJwCxBAoQXCFKtLrhPs65VYP2t6JwwIVvxLvIAhcc8BWtL76Rnt3VeVQLO/gWlA0xEGXAwdK+Yq2HXuQgkMKbkEcB+1S+6gBVjZrQKFE6ysO2eyvUZ+LeEZ3+WSyZ/VtJ1XAHTlv5zgywzDKm7FEs/fm3mSg44t7BsF7xD8Zf860YBlJIXd8OqN3eTxHaqUkBQ5HReuJ3HNm9mJF1vZJrtu0gJGVSj41CXtyV3ledExC6bmnawD9fIfV/3JTlhth5Tc0DDv8mF9q7rbOoG0bJUOW2Ih+RvF+wC2hSbiX56rZFQfRlpKiyyCE4dlMfJjjvT9TaBaVwflkTx+Na2wxiaWBVG5qIBbT0gKdm2vqWnYT5JbF20aStQl3+fM/roXhljbSO4OqT3m92+EGJlNNSuBoN5jSRFdMUj+E8ZaDVZYp5hImWQ4StBuYANNPYxo/WS/OA9/TF3gOqkDnhwtU+9oYmpGL2kxye7vSvG2P352k3kr4V3h9lVb9rkoyw0h8lnHG9OvNnBhRoHGrEt5dJY8ljiVRvzNOowU2/3eAOu5EjCjDpEGufFMXsZKHWYX1wVr1K12VH4Dg1lx9NihtOSnj2iEqaOCPN56Q+zp/j0uoQOKBSXuL43dt9D9q8U0YXWGe8sj3mHmvmpoFQapjVPH/olWmWWOL11BePC73FCyPGp/rN8rdVhBPfA80FXF2heuV0i7F13j4/ojYtf0VkYj0T5pqkWeeECd2gYYhsbNI7ieSZRoOSJbRd3EozrMyYhpBNAMx96msHOMN/iGPEot/XOh+I2yDu3IwNkcvo+5R2j33s7+QqteOC6rjPYyxN2a8BfW4vTniAN6V2jyi4/3RdKOULRy043Rzj29kc3g2f4Da4OMO2sNy7dxw9k7GJmAuAHyWzFkHgcIWn+8aKbukM1BG80zmxfgVijMd8GDVydO9wYsKCf24uYS6hAM9o+/AUGqmASi895e9LzHp4M3jFoqvMV8JQ4HIJ93+SnMf/POI7WZRnmHLPUQWmgPZnM+AYEGNLkStt4yKMe9w0yOyzq7ZYb6GRUtEi2UFxRr/dmDqX26OcTw3VYz4qX4rgpobSIEmZlWV+rlXq/LopTWsKOY8sdR3i/WVl4HckPw2MSQdQSPVARF0emC8lWmqxzl0jqCv2egjCuoTFWF2GDq5Te6hG1z0IuYZk5BXa5mGV+gJ2e7T6EqLFV9bkozaG7TOGcY8IUhsB8sqmAvQeOMg3A2r4jcxFRdpoz2mar1ePwjyx+s05GFCzs4mCFRC7x65QJjJ1JFBW5Nfysf0GE10UBd4+E56MLfWVP+klyjbdhGOYinATj6mWB7rLVsupziMmIJ/WiZPjK/ULA3uuL53zUPcRI4HW3fwZv4fpqEhkcIYNlu7Tp/4YLUR4w/UpxkzRYmmLksUj9ldzwiVh3XkX+Ltc8Y6bhJJY+SbioA== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e4f3249-1f69-40ad-f694-08dcea6be39c X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 03:13:48.1919 (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: mNFvuh8Oiu/8ZmlfAGCD21iIUPFglCpWGwkvXe6Vz6xm/0c31SzR2nCRBzzs4CsnA3VChRyUoindT3PUYT89OdAiz4J9N/geePdpcWe4EP8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0850 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 --- 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 90aa2f8a9ed..be2a1e0d1c8 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 f55c6b5d34c..0c9798f32b8 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -461,6 +461,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 Sat Oct 12 03:13:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1996337 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 4XQTBn6Fl7z1xsc for ; Sat, 12 Oct 2024 14:15:13 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A79A088CBF; Sat, 12 Oct 2024 05:14:04 +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 B735888B55; Sat, 12 Oct 2024 05:14:02 +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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20708.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::708]) (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 0691688C40 for ; Sat, 12 Oct 2024 05:13:57 +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=AW9dI5nRoYLHby6D3r0jDdLXClqTLa7u+BdRZj2po+OIiHpFn4QdkbW1GPR8SqMQzzC6UQ4zYV+yWPAYG5fq7W28KsR2Z6r+QuK+OqMXOkpD+mGgSfpwe4ucoPe7EHtNdSeflgbRL2KF29fQTWnZ2oc0AHwMP+Af2QMOrGniN/iLHpEyKnIa/3Sb+rekHuFJ+EAOqrZ8uS5gIGOAoKkH47rjE6JU86rAiI+0m2+B0lLM1ChYzlBDwB4dnA1v4yKFmdPYkW5ZBzcmCZgk+b0A+E/Kc/pspuSceY0AgxYun9Ah1EiPRIWKHfseYpDGzmtqGQrHbCz7nmutEZ1NSrPXxQ== 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=KyU8RrEQZjV3qU89E7IhqzAdLpaK8PGCPbb1rt+Klm0=; b=bVXgBWzFgmWNhyPJ7EhF7oneQ3WexBcxpcRYwDaGd/lCdHXeHI16x9DDe28L7iYHxqGNM/duRwp87f6aDFt16CxaLPuqABwu3cVhdbZ/Fi8qtk7N2eJrCQO7oX9TXNUpqoiQoaADiBtT2o01gU/5v1q5a0WpBP2rE4CxAjuSGcHr6f8+RRI6Kb5ydZgXvVxd9P29GIMOeps6hW/JWY3/rasop8sV/XqWICEWGVy/Pk3Evs2jSh8MoNxv6ysnXn4hEWmWmnDyF8tnPvKO0PQUP32DLZqzpgZF9GX3ntPplp2wUFPJHwWHivyLpT7DBHToToYxBYBbmTrBVHCd88rZlQ== 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 BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Sat, 12 Oct 2024 03:13:49 +0000 Received: from BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff]) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff%5]) with mapi id 15.20.8048.017; Sat, 12 Oct 2024 03:13:49 +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 v5 6/8] configs: starfive: Add visionfive2 cadence USB configuration Date: Sat, 12 Oct 2024 11:13:26 +0800 Message-Id: <20241012031328.4268-7-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241012031328.4268-1-minda.chen@starfivetech.com> References: <20241012031328.4268-1-minda.chen@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0017.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::26) To BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0850:EE_ X-MS-Office365-Filtering-Correlation-Id: cb756ad0-dac5-4f6d-f654-08dcea6be43b X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|41320700013|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: EqhKcMH5tMrY1u5AZWSFJCuEbHxruolNHjHtqwMBtbv/tWJp9xDxT+/4fbiIIX5yZ277LrY0b4adMlGURQXfsjQ0mWEpl1iuR9B8mgH938haX82T3thH38v2AV1NQMQbBqGjbCj2CjhKk5MU88EegbE3gQDYtmIbcmqtm5iDtc66BV1OnhnBE0jfAxywD2nphonL9pdGXu3zHAVirFNWEH1dfh3CmM6elXHVeJdW+PmcIov2voi6Qjd44Cbhk2CLwdu9/PZhkWltL5v/G/QVZnuE+KEaqbWJjeus9wdoHkIj3//dWR6qqUeJztpo+dXpI6tqWo/WM/lDqNFXLHkoF6x5FDw4dyqSlAnfQU0Xt0jkXieORV0HcolCUDkQDgYXfGPleLzzHshNdJeIXbG/91qe2TUV3T6u+/QfEcc+DiLEodQB8S0sGPAwIbTqtIPEm7/f1rqFaaj5JyJwwKqQYKBagXiuDhR3Eln0vi6R/VwCLLsscl7F04jqjEXna5alSPyT4fBWHZOE7+5GgKFHTWscMD1+JY3yysLsdo4lFacWtzYss2Sq29nnHpMWain5IHUdQFEt6OG+2QH3zeeXLxvqSDC1Xfh7Kps6CxfitmjqKC8zKXkdqNjR0EJaoWNShSUSE3RmrnZK/wtVM6lZng== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(41320700013)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qOgiF2MyDbLsm9AOE0qpIctdRgveyqQVuqZEyiuFd0POqScniiLkcQTNwSNgeZveVa916C58OYRk0//oubbXeEC0I76pLJ+xJ+KHS18tVhtkFn6fB9iNlznljCulgdqwoBppBfiQv2j8DinYhdIh9YPZC+LGMJ+banjJF7613MJGlV+X3fAdC99wa+d8FzqR2OuaVbV+KBFRvOdtwkA40yx+rHRk8vo69fLdMaQXAkn0/GyuusYN6awCUqp7G61Rbt6vnZNJZ0rfFZSs7MMa8bgUFuiwWhnn6/NW0eWZ0knuDI8iXInSgI2+G8YaBQM2O5EyCbItPPUOMncGwV3zYvzniFUVsfrySqGg2sEB4du84+lZZ0Ggb7h7sTFXTed7HrE8esiO/smviRwPokLNa4U94P0RFrrV73f1++vtIbWMa2RS6EZC/X+L+3VINQmGLbBVOVrItbVl0+CFqWHeVqaNpQD0cjC/X4mc+1Kq1/lzBOSP/yKIHsECbNnHZ8DsZa7/jXl1jXfFNGFuK7oCFlZSHX0bA6+SoylBXaYSMJhdgiKLFiNAmQhYdhqQN7RRMxVSB3UQ7xsqkSFq9LFUDQqqE02RcVS5AqTKxePfePm2eSQRL5hYZSkw4RBdJojsjbPtwD+nr/fJ9JlFkFXFGbKjS0R0RK9E4H7c+dg6RMsQg5yrjIoxZt7kuYsGF6C3I7UQI3aUGKXQKkGHupULF3mamWyBZrVYiT9JEUN8ABoEVW0KPTkdWeUCiWjObMObOoMhPViMjMtHatyP6Z7TT8QeoSP+GsffPcaBa/WTdcL7tT8LiAzeSG7Oz/F0qRlXMck1s004amx4HbFoOnPW0u+FER3Zi8Kt1htOwE9QeByzOH28qMnRM9MsOhoX9LZ4NJvwwkdfOTtVSyL05CCvU3vKY+0QCWxCvw8+oQaT0HtBwaYsEKnzbEgYSJ95sGMyfne2iwJb0iKZ2nu+/Dr2xJY+vgQcx3liQST5Dx7XMIF/MnQzMcK3VCrWZyfIZftcCv1xpGjBcwg+QiKzlJEdP7n2pJefe+P6WHd9c2Vo/KBWYka0PwdTEy1I/0we7+e4p+9LPmDYzClA4+l+gBPUI3OiSHRkoJzss5hNDkLZpSCFOt8167ZmYEmFk4RT6Ij+5TgsGmFk2cF1a9GFuiUAx075wpBZOPIUtZ84JxIqrtI4Wwn7aLEwn+1b7G/G+L1WJ+w+OZzbiEWWNvwELKdxr99RmlTU1b582MwsyRyscc5ga5CwT+tXss9Kl/NuL1OTEfC50L48ne8ejCRBeDrIJXn8cYqCr40cHrpQJzEONDY5jZuwwXtj7U+9q18RFlYcNr7IYCj9nreriMeUsz2ly8ofUtYX/nFCyuB517es4buGCUJYb6kIw27e6SBgzMGVNMzrHfJ8krHH/aGS16nphfKM7wt30l+jQhdFN+kME5I6Z8V/KbM+ILyt7DnsbVcTMDa7p9We3UJOCOfH7DMk7PIhIAmoOJdDUa6My3/wbDdphiqwZNIYFEYDSoMlotsFonkf0k9K7EQ5AsqqjqZUoekuh0hvEcxdyoDDtWc+NVjkqfJI1cCCsD9w3Mz/gLHScqmTFiGND1fzQ2pPdZsu2A== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb756ad0-dac5-4f6d-f654-08dcea6be43b X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 03:13:49.2612 (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: /z+YorpyBpboxb1qB5ftFiiff+wpDI+4ze9rayLPvbMLDvJe1UUZ9565Qtlptcwlm8wPKraXWUDSZyDkiwIo2Za8OY2t8746lQqyw5Qcu5I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0850 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig index 174ac24dc74..4329c8705ec 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,9 @@ CONFIG_NVME_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCI_REGION_MULTI_ENTRY=y CONFIG_PCIE_STARFIVE_JH7110=y +CONFIG_PHY=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 +131,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 Sat Oct 12 03:13:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1996336 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 4XQTBZ5Pczz1xtp for ; Sat, 12 Oct 2024 14:15:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4EC9D88B9E; Sat, 12 Oct 2024 05:14:04 +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 B547988D10; Sat, 12 Oct 2024 05:14:02 +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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2072d.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4420:2::72d]) (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 7C02988B55 for ; Sat, 12 Oct 2024 05:13:57 +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=S8TTxJnS2SHCsGbVLSC7rU0yoBnwathO5/YxatfvZ5aljpnXpxt9tajKN2Y/jSrfoWAqqmOw07dOvZ1EZVw59eaNvAcnYo50Z0AW/nmemEU8qKmO5vhD4dNuM3qp9STfR3h477VpUIQUwWpc+ZIIHHJST4V1/kXpxvQgXoNcvl0vC8McwFpDKxuFLOnvEWRVvlpmoC4R40CiY9P7op3UPO+EeBKuZ7AyUpKbH3YnluuX+uIdwOouUzkyGfPp4jkdT5dzesk/84HCu86fslg3sk1En7mIhc+RI15W51rje/LGQ4pzuP8NJAKLI4VIWgrFoebdbnN4EmVtWzv3zwPlrA== 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=Wye2mPwBSaW3vaVCuMr0gSEIeVO9LAsNokz2na894qg=; b=CKd2O+PprZP0XQ4Uf70xke4YBtzMtZKw1ccpVXNLyhJygBmJZUhN5klMDghsAHbdAvxGlv6jlZhTVvhfuqokLEsIC+D9rRYhH3C/UmdxiUIU9Ss3rXjpPTreul2YYiwMQvGKnqJm1KBGxLUudcsket+l9Lcf1wqTG/DlWyB4WVK59VR70Q/CgGV7WP12Owy5TwleR4Ucailo64TE1X7W4n5UmIiRr9fpIF0F6RCQGkdzRswDcRI/zbrwOA1fjBn0I7FyCu2xtwQK6IPjzqQUiDuWuSq7hn7FGqm0MyXt3uRJmkNX9Z71FwySFz/W46s2yVreoinSyr9rkP3hT8yHRw== 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 BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Sat, 12 Oct 2024 03:13:50 +0000 Received: from BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff]) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff%5]) with mapi id 15.20.8048.017; Sat, 12 Oct 2024 03:13:50 +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 v5 7/8] dts: starfive: Add JH7110 Cadence USB dts node Date: Sat, 12 Oct 2024 11:13:27 +0800 Message-Id: <20241012031328.4268-8-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241012031328.4268-1-minda.chen@starfivetech.com> References: <20241012031328.4268-1-minda.chen@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0017.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::26) To BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0850:EE_ X-MS-Office365-Filtering-Correlation-Id: 95e1b75b-3a2d-452d-0060-08dcea6be4de X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|41320700013|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: mkJUj0rL5lGL0Nk+TiETydHKBRQWDC+36e7FixYv2+XgsKYdtH3qzCAHIMv8Km/m3+xQABfJUV0P27wBX/V3PeCh71IH+DvPZE7IqvxQ6/8vJ0Q9s+fL3uNG2gjulMeYY62m6Y8VJgQbcfwVrolCcmaUzxzc0WN6N/CfuIO9trZji7jJE1kMZDsIElE8okT3SmGZauh/+cRy+0T7uEWMyWSBdF5O0uH6kNHrOUNrIdA9Vc0+omm/wyyOBEdFOPwnZ4/HcUCXTUaim77MOQw++EqIxQv2JmCR2xOAcbXQcqLXhZwo16Y9IpqNhY77bjzrppseick8KRXUZ7SAOFq6L4GPvJwABCOXEmfsQ/S0xc21bi9J1HJxflYlyqSfkecDtNXjnHHMwPuG1DyG4ai2RnQb/Cv5N00G4z+k7pGs6TYFInyDvmytFinEmYS7sONn6nHnD8CaZoj516XvO47EwVYAgixaquIReiOpxH+Qbbhu6wmWDgHAZZYh55nhdBXKRZK1goyJsjuw51HNCTWOo02fDpag/zAzlFHe9MugVuyCmqn8hItdqqqfi+AuMK4xlSgJ1NsSMEBSA3QwLwCbQ87QvvhGJnVAdpTqs2FXNRTfbUMZb4SiZpTqMnKK84BcPD3fCkNAMXQ2zc8nCKq8Bw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(41320700013)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yPfhkHXXgIKYM1vhnEq3Nj3SEa5WdIwJnFmt8sUsw+Eg2lz+VYx/q/FfHSHcmEEtV5crZx/yY+PRJSeSRnxle58hTTwrtEcZE47sfxxxnGj8Kb8+llYaoI2Y4TBALaziohil/VT/d2rHBPF0hPNlkMHO4yxMs60AI2Qm5HR/O6YUrO4+biEEMkxugRfFq4NQyJwu3FtuyxAgEsKddDM8VDJbPIzVQS9eEWr+pgkl+ZDLk6sUY3t4b6tydOuGSr6PXTUFmaiou2oCPxLb4Akib3zSyv22n0Y6vrpHu5ffgAID062nkGEVrlIHjW7cDuzSzyizpfyiya/Pqh0cz3A/38mi3aK5RBqqQu3xuGAWZzjOoSX1i79W2JN6CA6GJNgl5U4i9TOZ0qcSDlGHhP3eB/Zhx8EDTkeKt1aeEaOqYWY0L1YIje0ctfUvIKmieQ+ozwQJGcp/SoPPhq7LKye/CtKaNbARHe9d3v0VuPL7Qh7nhq5TCiZskXwGhUPg/SSRL7ZUe5ejIzNg5cjBXL7tUQZ14PEh/yXD1grk/MMnNZlfWV+SN3c4IU/Wy7yWI3PSVOoyf5tXVbslkUk0I4IOTnTKZ6SzvMm//p2R5HdCFuavfCkYALGq9cJb+/zwDIgCz3KJxNequpAI3cRvpHR/h/5WJNhyfp3PIdDa3PaND+2+IXHoHAWAZWBnqIOciOZjgvM6v4/7baj/S4nvIBp5ICj1ku1YdTZqOwMpD7FFY5WisxMlbDewU8/9H8s+07A2bUC77dH5cJREyrbfHCG9eXaYDMIFmHBfc3ZT4RMoU6RhVOLuR8aUKEAT8NEOnScaFM1vWqgAwQPjxwGqq9lw2iAOtR6aJIrLClfiyx1k0o5Pf4JcVR/5C5EtTXIhQne8t4Vs0fc9/sVDtwfEdWy7xkg4BdwREIczWnQWlLxFzoAMRInhT5X7f5BwijXZGN1LAbrMfm6SclXr3VAUThMJrltEG/+jxfbFBNryiPgqKBSaDlFqoCoE0m3sIB+ItP873kM7wiU32Z6W3drasPKqblzZYYbJKnvm1jogItaGrLvrN52gCpQqtCYdJtMC2VAssHnkmDV/xbR/zAFHxdTi7OIm8ZKGMjoMeaVL2zdWX9iLv9ROImwJ6Es2yPrr57fDea0U3sXcj74REHfenmmCL8jkHHBoiZMawmqazecxsd3pZjybjjh0IKJd/8E6X+Wpb059h3IhtClert+rQCJgTxdgZnzv0tdTwBIxVlgwoHWdGGyjmkCqGiu0yHbYRx6uNY8QJEr9G0rIYRGXJNJ/v5KAcJxkLIynVh9aqwGdUbiJyUTIcawd/BwLA3q2HC+nz88XGeI+sq93YeOqSDw+uHA30u2fRvfTc5MNoDU4SDwWvrVwmg9qlOVQqH1UzNtVMHC91u9WW0ueNQSHuDyFkjyR8pk5WwWSPANJ/peCvCfjiy4pcDgWKpR2li9JuhjaDKJhXoZl7rrH/CvFPoiIShZ796Ly1quLR/Jtpt59I2p+q9egkrNYtiSfWAhXN3Wm+/PQJrqvBn1XMPYlH4QjHdXejUZAP7o//kKZw0gIKicTf2N8URnv+stFmPFIXRVjPXWLi/py62CfcvP7C9bFmw== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95e1b75b-3a2d-452d-0060-08dcea6be4de X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 03:13:50.3031 (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: k/1qZq27S6x3t0nrogjTLgg8FXZfMW4pD6rvpGJygsUtvcytXQhsBVhEkPlMXZZJBDh+hxKHogNPEfBPkdDrwfUk0B4GvDk+ikEA+wk1VhU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0850 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 e11babc1cde..f62582cf93e 100644 --- a/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi @@ -378,3 +378,8 @@ }; }; }; + +&usb0 { + dr_mode = "peripheral"; + status = "okay"; +}; diff --git a/arch/riscv/dts/jh7110.dtsi b/arch/riscv/dts/jh7110.dtsi index 2cdc683d49b..c770da2fedd 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"; + status = "disabled"; + + 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"; + #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 Sat Oct 12 03:13:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 1996338 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 4XQTBz5bNHz1xsc for ; Sat, 12 Oct 2024 14:15:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1F36D88A4C; Sat, 12 Oct 2024 05:14:06 +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 D5D1288B55; Sat, 12 Oct 2024 05:14:03 +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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2072d.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4420:2::72d]) (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 CE03F88C9C for ; Sat, 12 Oct 2024 05:13:59 +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=hTAc+jA/ZtX4r54HwVZfgz7QkSb0wFS5buJkE5kdQCTRVotU/yEpvnEz3alCQ36kpHMh4yBL7zN3n8juCcmff8Mk6UPDcsqetWWpoYCNI4G0ERP6gyjN7UxlI6DAZ4uND/zwQ8LlLDDyRQG13Xae71acrzjSvfErJyN4tEGKXLryo7ZK9b3a+0WOO57zzYlcunx7qfjShy4hGO4pQRDR0xv9JL4MoE+FAUJNKX85Gfko6wxgeVSbwxgsyHdpohiGgjtesmX2leyUbdoUkGZ2J5JcYKtU9ePsyivfWCjj6oeFfljHcXKBiCy56zinThxzjgckLYINmOnMV3FFP/A2lA== 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=CBbY04AM2fpxDBKDKIk+bYB3siZwaaUSrfxXQT7cJyQ=; b=ng3c8cPxi4vAexu3Gksl2wjuUFEW24tWGMI5D7NVBnXKIKzwwT7462YoBYyz1vJF3GPJp6SI2I8DRs6dWaqWEoHgv/HYzKVR1lfCgClNkWYJaFYmXerYzYBRA7G5YnZNBS0ZxQTUWsoRIcYMSf8gb4t/PD+9K4t+LhamDXrYptGUzXNZony8zUcaewMEnwtUP18ol1+MtmmvaWNXvtZXyCBbc4hlYH2/1kp809/PuauHLq+7HFUITU/IpfUVtFkZXkPodJ/WndYBxoDV1itNtpw6r0TxzR1ezwjsTvW1sRySf7Kv19DnBmHDLwsSG0IDSNP6Sk37kJucQrTTG2Mffg== 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 BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Sat, 12 Oct 2024 03:13:51 +0000 Received: from BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff]) by BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn ([fe80::480b:a135:6e33:10ff%5]) with mapi id 15.20.8048.017; Sat, 12 Oct 2024 03:13:51 +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 v5 8/8] MAINTAINERS: Update Starfive visionfive2 maintain files. Date: Sat, 12 Oct 2024 11:13:28 +0800 Message-Id: <20241012031328.4268-9-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241012031328.4268-1-minda.chen@starfivetech.com> References: <20241012031328.4268-1-minda.chen@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0017.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::26) To BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0850:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e464b48-b352-48bc-2ef0-08dcea6be580 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; ARA:13230040|41320700013|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: arRj9tPqYgng0Fy/EmJPviloX08RQaoDjHDcyPfJOU17ihKmMcm8UuEM7Vsh2+KiFoly8/u2JS+3szeAHLfYPUyIyDj8Kz8eomgECftblULQnW3pGwz6BQ72HMoUS8B42TODNpNPKeTIbu5WVdwkCPfHrafO8le9zb4hMGZ5PUJ0tjPurWireF3CopUTiBm3N3W5iYbb+oRPoQRImVIeOmGvpCeqtfpZJBntEyX6F64QnYjhKHRiFh9chX72BjBPWg9yfi7QTfIIYI5gRW0d40VndOksI/ct45tfgkLTjSswTOopgoJW8E+4QabwyAGEZU//12c/2pYYSuKwIQyGw6CjMyfWvs3NKVoEBjeb83t4LKyXpRLUbtA5QHrjEGx8ijWVqJkv4Unw/PvEoL8HNMdfHpUpErYTULiPq7jfHOAlrdepAVWvncORkY3ecO9HeLtTurHOAwK0I/G7rigw4EiKvN9TOQ7WJBIoWTxMlYkO+vRkI/Gdati/X3yW+Y6fJBEV2UKKeY7Jb4bZxNRVfzIDDtWQryAeh58Z6D98+Hwqv1I6pJfTKITK9i0plar7Zk1iqYtP2+PShC0Ibwvqy39EKtdW3cg4ayHfhJeW5qNZF7KsJvTyxj2r2MmMmzFuTEECZhNQaWs4tfrHezntYg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230040)(41320700013)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gK76IVveFk4cyoQeF6lbWMuIAyNep3BEYTeNBLT07cPPsdnzZ2w3l7WwLeLux1rmhU89Slf8u5REVO4HlrbwJMpm/401T1WoeHlfu80Hq6687PDFbmH0lnrR5zED30oNkP9pPqAZErfnzs7Tw8ayCWMRhXbBqjDo7QFQ4ZZErses2nmOF7M2S52K38ryBDmoAt41P9haIsg74Y2hsEbVDITocX+WgK9+kgoCd8ZGMmse28GybPe60V/ToUD9GDyGXdapeRFxf69t8hYS3Lcc3cIRtp9t+9/gTgjQ0kpMP3bD1tmWvcM2r2TNlBhcoKlH9Wl/E0pY/xtewz1ag/k0DR5AeDIVr0xCCUkQhhkOorIFBUfAnkq9WpvqRxTGHL+rsdwJ8M+XWkvYvmwxN/nAy2vU3LIOUbWO5jtAU/C3QuzbEszkp/7InKLH7hcTVmJ41w8hDqd83aCbw8TyE05QerCfKfhxKsTCydqj/yM0QhaRhbjTzCmLHC4zgl1f6SL6Czj+2RaKLIuUaGwotzPXJ02lpVENavlZ4NLSWjPXVieRdqgcyJEZEOAm6FjT7jQqN9lzc1IRsMjao5+wvW+4N+U2fK+k8ZgB+2a76WFfmzG+D/c1WRT8/OB5qR+vzUurbqxOlXOnX2DY/mRxusf6q+vDasV+6ngUW8WX8sK49UDHbNdoF5q26FH+OYr3Nc2dVdsNjO6WqQC3qJMWEb3LEKUk+8Cp6GE2pN+7v+nA7e88rgtcemTnYEXoMyxcc3cn0y5kETECUkMg9k7WUKmJuUNGo8pJ7lRwomprAO/EQ06Z+Gxd5cQenLGbiqLIKvUA7q2Dz5gXHrjjpohmG+B41Hoi7l8Vu1X1r1cRGL3U5zRRzkuQlG46WuyGmIzdxqcylLCJcBglGqCKzcQPIXBw5z1LI3DNXmp8BulrtVijAMdvgP2urbjmx/UKxk1gg6XtBx7kaI4PiXIdXnjRDR3uAcL2iPwnDxrTACRsoOCYvtVeMCXtyiWnLLG/fqFNDQ6WCeqaBDKtT7RIzXYsNzUbYPDCcMODUkUpG0aQOoKYZDvbhzZzmVZtNENy1heyBs8vPCvlA7x2anHhivPrDwAvhWZcFBJd3VhA7WioBQv2ZRH8OyG4Z5DaMBsEH26/cfIQekrAEQLnaVwJkqrBaC+FPFIP8RAL/PweXTtIUMZpNV5HvZryeXf6H9FYYVpf3yyJDfhLwcmFYjKnfbwW1oyq7t0PXiud9Vb+dffRR5ttT9lPIAPSp7RldLVSUo1raOmGZhdG5sQi0t/VeF1RGz/9NS8dd/0aShhwZ3iLqc6P5ln5moMlO8/W6QQbzul4oES1buuVXFxR0s1jvbq8+hZcc6B49VC3qyUFb5eIhplamVQ90aByX6bEyWUL/IWmoPqDYzG5HDa8EkD7i+ixbvk89XR2wtV59clb1Wda0iUJbr2bCLpzTLzhxAoic6UofaodGPexRBEKrQpMzvAVPfzr8MZVhdkuaJEFeXODwRkRyDf2Or7hXY4p6KJpzG3E1Ql9+nT8ol9nS6nuhUIDhDCpahuqQRB/CLh52ipIx65gXhvdBcz1rFJzT7OgBxqPQ1RrERQ/2T7gURfMOOmbfG+dTw== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e464b48-b352-48bc-2ef0-08dcea6be580 X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0850.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2024 03:13:51.3944 (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: ueMKA8eVCqpZQUXt1RIMNn0jqNi+vL/OL2U8UJ2+g+Uz6m7asVMStohteURiR6iOXfV2tb7Ef1SvRy/sXk1f+XJSfP+aVjD3Y4h5T7h/5y0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0850 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 d7f638f9b41..1faf83f581c 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