From patchwork Fri Aug 4 19:00:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Shengyu X-Patchwork-Id: 710696 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F8A6C001DE for ; Fri, 4 Aug 2023 19:01:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbjHDTBf (ORCPT ); Fri, 4 Aug 2023 15:01:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230082AbjHDTBc (ORCPT ); Fri, 4 Aug 2023 15:01:32 -0400 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01olkn2047.outbound.protection.outlook.com [40.92.99.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3441149F8; Fri, 4 Aug 2023 12:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QZCfkP2+gH+7TRu8jZ2aw7c60uG8Vktsg1Q7cnG4Qg4k5ubsNgv5Ir+DrrmIzCKlg7+S6QT80TqjNoV1PF2I5ifpPTc14A5IXiwEx+BIAXitE6mKTeHS87UQSZD/w6gTfBUsuUDZ/rUb2kggExXN/P+HxHsx/A3FSCeIXoYjsrqZ+h4zGzVe1YnHNPiwHDyenCssAUwKN7TJB0g/rcXfKgMXB1fVUkMwKvNSAEZVvkBplUjF6KDVgLQeUCvN8EoPKWHvABQc3/HrspUKVM4chui691gIz9c7wTh7raKRNACheCA3BKtHbJ7NeKunhEdqPjQlfFBM3l1xPdesVq6iAg== 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=s8TI+tvlhNrVHsn+FD1ijhrN3b/IZnhW7occY6VAdho=; b=ZVrNrgf9izbfN0WyXwbH444kWz0mp6Fbo253hsTat9tftQgwezMAIHTPs0WWydtnXKsyQ9SAJrB4xgSWK3tAEBl3hcmX3v222urGh1bhQetVMyspx7J/bSISRSgCOlMaUgpZSoH9y50+LlvwdrqlSdH+6kwGogDl9/LcB/JMVoicsoTUACSTBOc+BPF2hMvzx9OhMhzhaH+1v88/FRRf6gfE72cPRtBnHsNu6iPMkTj3B6tyolVyqazDlw+PatTH9AaHTMgAHfl8Es8lnko9X+UnUJsScPzhKLjICYjQNoPtDaU+4UI4Y3yJHlEWNDaXPkNOC6cmThgmgr0gCov7FQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s8TI+tvlhNrVHsn+FD1ijhrN3b/IZnhW7occY6VAdho=; b=RLqvnn5MKJbhefv87UiPQDrA21ow9x6Y/YzR5YV2eZNdzCa6TMaAamAzx6y+fVlZjpPN4kjk85SsKyXupZDrnmd/vFkdgdr3b8aMkX5JjaU9zcb5q5JOIOMrCjDSllqNeHrd3MFWKGJjXbffLOJtf4W+rJkyLOYRxlw9V8wxwdSew8PU6orBj36nCA0KgkVtk4x6Z2NNkCJm1h+lQtA+v/yGridbiESeZXtCo6QoaxJ8PM+0OE5QAn7PSfTXbbNyeJKkiayf19O2AvCtnTH63MVSiVyUksRd0OiMcZ/1XfP0UAWNiqEdOqXO7NcqZSy08/rLhNmSO8R/LJIqSO1Jqg== Received: from TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:23e::10) by TY3P286MB3567.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3b6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.20; Fri, 4 Aug 2023 19:01:26 +0000 Received: from TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM ([fe80::e67d:f61a:b248:f597]) by TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM ([fe80::e67d:f61a:b248:f597%3]) with mapi id 15.20.6652.022; Fri, 4 Aug 2023 19:01:26 +0000 From: Shengyu Qu To: bcousson@baylibre.com, tony@atomide.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Shengyu Qu , Robert Nelson Subject: [PATCH v1 2/2] ARM: dts: am335x-bone-common: Add GPIO PHY reset on revision C3 board Date: Sat, 5 Aug 2023 03:00:43 +0800 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230804190042.2529-2-wiagn233@outlook.com> References: <20230804190042.2529-2-wiagn233@outlook.com> X-TMN: [r5pGem7VIyW+eYsyHYRfShvE+tAeVVCy] X-ClientProxiedBy: TYCP286CA0110.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29c::17) To TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:23e::10) X-Microsoft-Original-Message-ID: <20230804190042.2529-4-wiagn233@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY3P286MB2611:EE_|TY3P286MB3567:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e5da0d8-48c7-46ce-c764-08db951d3409 X-MS-Exchange-SLBlob-MailProps: m1FWN9UA3JLuNowzViqllKXmXhrH/oplBgeKe00ICNr7HlZtIRP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ORISBWo1afhjtkEIigiyOwO2gw+dXiyw7OPkJFKDXBk6O9cKBAc/3VqNVfVsLEEGH5Cwrqr+ZjMFxoPdQ/jp+iYTksSCp6yr4ax35PggiQ0k1cXWhzT4Y2NyY7QihCLmx3lcA4gCPGAGBVu26Yb45M3PYVLR+TBGBxQhQKMfogBjSORyHtkteYku7wywT9oIoxjxqUPme0sscXdNAeN93ogFUTduv4DbyT5z1GBFF/Q85W0rhXcO/yBnCpYRsQ+q5xl0scj0o3BDJSDdLNzjhtUNuPgwDTMneforyS/pPll559Rx/gF2aGVbEwZETKsnH0BUe8WuyMxEmg7FEoBOfswo9eXh5JNS35qP9n0KyCK5P7QvbUeF9/pSb7v/vCA3h2C7yNMQQ5vqPHDNxqvamPrOoiU3tSOUu0wPAItFp88mkPrKaTgvZowWoKWxfaEEl81hLn0DBBe9rUcKcEJJ/RfKGntupz9QisPsMvPGFdyUd6cHuam8Xdmocm+Bvm1qC6yzpZ9Oo1t929mFSdwiiE57f9KToBAOJkDBEtCs15HlPr8cZ0C2vkOSO/fE+K3xBFIb9gcxIlsB8eHLYOoRxU8Bbv6QtTD2LiIYA6mINhA9PqMFq+qB9wXSJ/EJEp3EIXxRsne8BQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e5da0d8-48c7-46ce-c764-08db951d3409 X-MS-Exchange-CrossTenant-AuthSource: TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2023 19:01:26.5744 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3P286MB3567 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds ethernet PHY reset GPIO config for Beaglebone Black series boards with revision C3. This fixes a random phy startup failure bug discussed at [1]. The GPIO pin used for reset is not used on older revisions, so it is ok to apply to all board revisions. The reset timing was discussed and tested at [2]. [1] https://forum.digikey.com/t/ethernet-device-is-not-detecting-on-ubuntu-20-04-lts-on-bbg/19948 [2] https://forum.beagleboard.org/t/recognizing-a-beaglebone-black-rev-c3-board/31249/ Signed-off-by: Robert Nelson Signed-off-by: Shengyu Qu --- arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi index 7b784a87efc6..943d40fe2272 100644 --- a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi @@ -145,6 +145,8 @@ davinci_mdio_default: davinci-mdio-default-pins { /* MDIO */ AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0) AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0) + /* added to support GPIO controlled PHY reset */ + AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT_PULLUP, MUX_MODE7) >; }; @@ -153,6 +155,8 @@ davinci_mdio_sleep: davinci-mdio-sleep-pins { /* MDIO reset value */ AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7) AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7) + /* added to support GPIO controlled PHY reset */ + AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE7) >; }; @@ -378,6 +382,10 @@ &davinci_mdio_sw { ethphy0: ethernet-phy@0 { reg = <0>; + // Support GPIO Reset on Rev C3 boards + reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + reset-assert-us = <300>; + reset-deassert-us = <6500>; }; };