From patchwork Tue Jul 26 14:38:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 12928753 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2DB8C433EF for ; Tue, 26 Jul 2022 06:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=64JHvFbcqxtJpIFa2p3npXAbgYFkq7hicPqjap0oSSg=; b=EHuZshK1QlAlc6 eI9AqEvf3xuykiW1QmBB3KW1nNEE7vf5qu2YNSLSPidya3mW27NKBLVeud9jBR3qy4fTgOttd9p5F gzDxGBcMlv2fpMxH26CebnO3TrSzppWWxRGzcfb8pvswbHvMx4F4ACFqraWPuUf4waSrLyEuwPfzF iwIU8CJ6kk9aYSdaDeo/jGC4ItkiefTUg6gFlc1jwO57C0jLbxU+ZIjJxCphR4JYsnS0i+7tFXEK6 ZHBugJRbxkN92bZCSWAY1V0aNyJvEnb5yKTa2kN+2Ujz9twQDOUR5AWsyMSMMue/eJo6gh86Ox6K+ HUddMWjarQOr1uvRoYIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGEKa-008znc-W1; Tue, 26 Jul 2022 06:46:14 +0000 Received: from mail-eopbgr70042.outbound.protection.outlook.com ([40.107.7.42] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGEKM-008zfB-4F for linux-arm-kernel@lists.infradead.org; Tue, 26 Jul 2022 06:45:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C9hLSui0PEkuw2YPb4Ydx9kEPKpIFfAt48wP/12yHLTaC+RjyJGAskQiBPdwL/OHVFGY3XxxlOUCidmSQDIGjacjO6US1LwudjmcyjGjo7cv5sP73SGsBMUWiahCXcpwAPJ/tjKXBTxttjJmOJ4pnAZeDKISm4Ult9j9TN7HUQU3qYije+5lLgDbGOpQM4LlEAKxIw5ij2Ou7FPazZTxXn+mFo0FgM6+4t50woOadI896SeUa9zfHyHacYOFGsYIC2+Pfj8hJnw+alI10Zwfz5KNWbLy/bRhmcGq7u7HGILxCWvP5KXLlE6pTd7yOQLwI1LSgD3LAfsmRVkqh9ZQnA== 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=FlXIpfRZB7DEn5CS+BDtMxj+y1o25GZe4aBuWpJ1QNQ=; b=dp1n88mP3Ou64ph0WEp/tO4ylzDrMCktYlqe+bVxEMXRsZw2Z9ezN13oDgblwqvjDrAYNDw9zxF3hIpzdaGS0TrPdkLi3hyGJEuTyevaBMiND+DMFX8FKZHMd6zeMT6zfO8dLfRW/ynUdhASd9TVHoEpY/qkKWEIpZ52TFIMrxCNV+U8V37S9iV6iaMHtSLIoVVU9LJ7Hxg9i0FU2W9n9NU4dzN8B1YW3lNfWYXS7anQU8UeJNDf/vebB+zgWWDzSgr+67BhEGTtc2AmvMKDgYuKUnL45W1FNntk9wOcDPO/zLvke/sbLBHoxZOmTDtAhSECFwpprmPjcERwjK2n7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FlXIpfRZB7DEn5CS+BDtMxj+y1o25GZe4aBuWpJ1QNQ=; b=FQxoQ3wEGFpAt/L+vUWcV4KUasTfsw8mcs+XAKvto1cRX8yNNYi+fPq3bZXpbuXGDAmnaLl5j56W9CDJASmhW8ZDNEWhcWNIZw49MdCFfY1FSlNkNY5H0whLT4fWweezuzlfLorBZoTX0HiguFY+AuxIKnPG2wV/xlW7y2S2Imw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB9003.eurprd04.prod.outlook.com (2603:10a6:20b:40a::9) by VI1PR04MB3247.eurprd04.prod.outlook.com (2603:10a6:802:8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.25; Tue, 26 Jul 2022 06:45:53 +0000 Received: from AM9PR04MB9003.eurprd04.prod.outlook.com ([fe80::3848:9db:ca98:e5c1]) by AM9PR04MB9003.eurprd04.prod.outlook.com ([fe80::3848:9db:ca98:e5c1%8]) with mapi id 15.20.5458.024; Tue, 26 Jul 2022 06:45:53 +0000 From: wei.fang@nxp.com To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, peng.fan@nxp.com, ping.bai@nxp.com, sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org, aisheng.dong@nxp.com Subject: [PATCH V4 3/3] arm64: dts: imx8ulp-evk: Add the fec support Date: Wed, 27 Jul 2022 00:38:53 +1000 Message-Id: <20220726143853.23709-4-wei.fang@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220726143853.23709-1-wei.fang@nxp.com> References: <20220726143853.23709-1-wei.fang@nxp.com> X-ClientProxiedBy: SI2P153CA0003.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::20) To AM9PR04MB9003.eurprd04.prod.outlook.com (2603:10a6:20b:40a::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 84325a7a-18e6-4416-e694-08da6ed27c21 X-MS-TrafficTypeDiagnostic: VI1PR04MB3247:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f5lb0FggFwWOeQA+wYMG0ILGZLBf/ibSO+rQy+kC+HxaGBbZsx6zYlGs4xrIhUC/FmH0WeR44AHRM4euXcvspVALg3cJ6oPL1oAAOqq9g7lkRRm+IyeC+XuWahVk+y4MFrG9rmo+0PMAsoIk+62f+CMe3k264rpE6b1/LE6ZLJ2V8I328PhLkVpiVBUf5a7sKH6F8+M+LYI8BnRShdYa89KTwnIsLCisi3fA6HTONpOYj0EyA0AWOARtvaxcbUuSFvkgc8mPpV4EhUO6iIPK4vwKzPBxBLgykVR8WVU0hdP6FN31/ZU/qI+RUkmy/LxPMo5rjYIH27AlrA4XLQnskw232cfXVlLXygZnMTy0HdKHAGIQykDo3OwA5iqljjURMm94+vz7vd7ZjNWkei0+fo7AyEGJ1n2IYmgtzbayjOp22p/fQliDPgchPgbaUrrYqkYHbvO5wXF1dQmrItjhe2gJPyu67Qzz8urBwBl9T6EGitzXBQH3XHcGvdEXvt7d/ttrzzRXTqaHGNK/L2A/pLmwM/GtGm6lINXSd4OSsJ/AE9ZxmgprFgCOtbGuNreDN3OwLIJT1INkBGV8u7A3vezRjzjf2l1VYpwVoOQuYt2Bbg2Xxq+DvVBg/O6ImvnxJDHOm1H6YjFXCvelEQ50VL32b7ZgMP+Xdn+8kNxWXVqFdwZP3CPAMhxuWr5GxyAaL6MLe4aamyY0jT7P68whzPtaFQI7UhQ9Fq3rjpxJJmFuqoyfpCxWxER3bOxodPkQ+Q0LIQqQQaxecjZ63FyOcV1uC+czhYInBMrPTm2us7soQilm29C4IgKuFofcwltH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB9003.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(366004)(136003)(39860400002)(346002)(376002)(36756003)(1076003)(186003)(86362001)(2616005)(83380400001)(2906002)(5660300002)(7416002)(4326008)(38100700002)(8676002)(66946007)(66556008)(66476007)(38350700002)(8936002)(41300700001)(316002)(6506007)(52116002)(9686003)(6512007)(26005)(6486002)(478600001)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hLlUKDKy7EJ53D8GjRGZpYuAEC8SBeElu2q7SB8egeiocqpqwQbyolaQC1lrnczoTmjSwmP57RFfl0KP8vNeszpIxm+QCzypNAd5tXx+YFQb5B4DBakamR5rYxqgw16/xLXXn1ufxSyUwj4cV7ItMeu4FlzDIcjZn8G4yZLchZlr+eMgB7Af58S077DZfy6cfJ3DASadpyoEL+KsXkJOLk+tGjt0UXgeN815eZKFj+hqzwgNFSwY1O6Qy3vK77wSPM/rpNHBhFwGGC6lhCRIDePF4B88/obfi6Sx0pLjWL5liOrA2uIh4o2ED7+4mRTyzn3IYDhyadDLotuQRu956GN3+m75Yt36udImYg2oubb7h1fu8Fs/9cLTDDB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HXOhpEgjJyaGy7sZkCOrCfHNYeF/qxosNU5sP/P6dkCoz5btUolLGyjXvkrRFBWuSnHZ9uefrcpOJwGJXPWcGCz3usGJWagNvUYI3UsjVdy2MlMEvJQtE+DuP4Kj/jPtxU+Txt6XWy0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84325a7a-18e6-4416-e694-08da6ed27c21 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB9003.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2022 06:45:53.2848 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Z02NgQ+FlQFzT8SMygi1KNUAvLVoHKgM/IvgjA31V06Tlk4fvp7iM33YqYcBXXJQr9csphOujgbEiit9m6r8aQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3247 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_234558_209114_85AE575F X-CRM114-Status: GOOD ( 10.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Wei Fang Enable the fec on i.MX8ULP EVK board. Signed-off-by: Wei Fang --- V2 change: Add clock_ext_rmii and clock_ext_ts. They are both related to EVK board. V3 change: No change. V4 change: Add ethernet-phy address "@1". --- arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts index 33e84c4e9ed8..f1c6d933a17c 100644 --- a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts @@ -19,6 +19,21 @@ memory@80000000 { device_type = "memory"; reg = <0x0 0x80000000 0 0x80000000>; }; + + clock_ext_rmii: clock-ext-rmii { + compatible = "fixed-clock"; + clock-frequency = <50000000>; + clock-output-names = "ext_rmii_clk"; + #clock-cells = <0>; + }; + + clock_ext_ts: clock-ext-ts { + compatible = "fixed-clock"; + /* External ts clock is 50MHZ from PHY on EVK board. */ + clock-frequency = <50000000>; + clock-output-names = "ext_ts_clk"; + #clock-cells = <0>; + }; }; &lpuart5 { @@ -38,7 +53,49 @@ &usdhc0 { status = "okay"; }; +&fec { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pinctrl_enet>; + pinctrl-1 = <&pinctrl_enet>; + clocks = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>, + <&pcc4 IMX8ULP_CLK_ENET>, + <&cgc1 IMX8ULP_CLK_ENET_TS_SEL>, + <&clock_ext_rmii>; + clock-names = "ipg", "ahb", "ptp", "enet_clk_ref"; + assigned-clocks = <&cgc1 IMX8ULP_CLK_ENET_TS_SEL>; + assigned-clock-parents = <&clock_ext_ts>; + phy-mode = "rmii"; + phy-handle = <ðphy>; + status = "okay"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethphy: ethernet-phy@1 { + reg = <1>; + micrel,led-mode = <1>; + }; + }; +}; + &iomuxc1 { + pinctrl_enet: enetgrp { + fsl,pins = < + MX8ULP_PAD_PTE15__ENET0_MDC 0x43 + MX8ULP_PAD_PTE14__ENET0_MDIO 0x43 + MX8ULP_PAD_PTE17__ENET0_RXER 0x43 + MX8ULP_PAD_PTE18__ENET0_CRS_DV 0x43 + MX8ULP_PAD_PTF1__ENET0_RXD0 0x43 + MX8ULP_PAD_PTE20__ENET0_RXD1 0x43 + MX8ULP_PAD_PTE16__ENET0_TXEN 0x43 + MX8ULP_PAD_PTE23__ENET0_TXD0 0x43 + MX8ULP_PAD_PTE22__ENET0_TXD1 0x43 + MX8ULP_PAD_PTE19__ENET0_REFCLK 0x43 + MX8ULP_PAD_PTF10__ENET0_1588_CLKIN 0x43 + >; + }; + pinctrl_lpuart5: lpuart5grp { fsl,pins = < MX8ULP_PAD_PTF14__LPUART5_TX 0x3