From patchwork Wed Jul 28 11:51:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 488466 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5390EC432BE for ; Wed, 28 Jul 2021 11:52:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C5FA60F93 for ; Wed, 28 Jul 2021 11:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236172AbhG1LwE (ORCPT ); Wed, 28 Jul 2021 07:52:04 -0400 Received: from mail-vi1eur05on2074.outbound.protection.outlook.com ([40.107.21.74]:6048 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234537AbhG1LwB (ORCPT ); Wed, 28 Jul 2021 07:52:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DVVnBbsX7MAzcN8zdgy6sh5WcQgTfHeii3sYMZ4uEVAA9LNVDOKOXolOKHOQBJ+ucgmAQIIDVPJaUD8/M0xr9GtkWWTnte36cYqeso4Px6Xe6zDEYQlc1AT2UcmrGQ8muXyozLYsEL3hWU57j2EyxuDv90hzJ+RoGLRUr1Y/rIDf1xfdYnxeYrljUbk/XNcohzzYyZkDILYhKcjtYb1F+5CgL4L8ugg+5apkoYYHlBECo50KH8+fmUggtwj7y5Qo4YCuA7nPyW8MLJz4WYRxkoF/p4G6f+1BY7kcKQ2PmF3xEOKShdt8bmGjCWFaW/zKNUIigxmrW8PFnBTwZH2unA== 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-SenderADCheck; bh=4dBoHA9YqpMrACSvbmy6Yl1sCrm2gEuAaQicnSnyxos=; b=VStl4fx7UNK79KsboPlB4fL8s99FyMC4jCa2aRHrDV6qIp75zY8oTItRpIB0ezQIJZaOVlDgppEYwPyAXLDiqP8RwvVTdTMU+ZnP3c4sKxymj8sU0QC7OeLEKyg69hTI3Rp9Xf9zxPFbcvNXUezoy3TF++njaKKv7iHfhSP1hI1jFQquhL7JY+9UXZY03FnQ3pI1nBjEn13a6Oe2lUjDPCOK5bjHndkIzdb1rQxgbyyqTJ3zU2MErYxqVab/GB88NSFKEKIIUTZQswVca57Mo6kUH9RFfgtiSEg9F83hlXtQ51bhjg7yixdNrbrEIbRx2I3wGdZIZI4wP5I13QVskQ== 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=4dBoHA9YqpMrACSvbmy6Yl1sCrm2gEuAaQicnSnyxos=; b=LHgYjqL7qaryvX4qrZjxtnF/y6zLP1yJu4G9G4te9G7IzH78/vI1EnMp0NcCGnXyujh3g43YZmKlwDKlip+mFlqWtm18fkAn1FzXwDyc1WVUH4EtGSRiMszFXrXCwy1Y2OogjtrHP9rCXvZxGXhOHUdbcaL/5OTbgkPyaOqvbbw= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB6PR04MB3094.eurprd04.prod.outlook.com (2603:10a6:6:10::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Wed, 28 Jul 2021 11:51:57 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9c70:fd2f:f676:4802]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9c70:fd2f:f676:4802%9]) with mapi id 15.20.4352.032; Wed, 28 Jul 2021 11:51:57 +0000 From: Joakim Zhang To: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 net-next 1/7] dt-bindings: net: fsl, fec: update compatible items Date: Wed, 28 Jul 2021 19:51:57 +0800 Message-Id: <20210728115203.16263-2-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210728115203.16263-1-qiangqing.zhang@nxp.com> References: <20210728115203.16263-1-qiangqing.zhang@nxp.com> X-ClientProxiedBy: SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Wed, 28 Jul 2021 11:51:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0f81564-aa55-494b-f9f4-08d951be1a1e X-MS-TrafficTypeDiagnostic: DB6PR04MB3094: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:843; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qNUWaSpTX7n7j/ncDDu5Llbn2aMg4zv/cMYhNkZg5RGRh0WoQ5ALwQVP6Dy/z4jlXf3VGJ7rvIq5bzwo8md5vb4B5j0hoRzLKhgZaiVmyKip7ID5OQoJkKQ2pCOUTqI0ZKxtXYT8YEBYNNwwPOrkSbYw+Qj/IBbkyInyB88iMxGNonljVquSFVnXv1pxxdQeAWS+1v1vYRFIHNTggsFktFGHx1iY6qL0TWk9WpMkJIVtC6h+GI4GvPsplH9hC+0j5oHnIHQDMlOtvqHOr3fm2CIJxf3CYDr8IzkeB5DD28n4B7OTK7Wf2EJF764kg6aqmCXi9NgUUrGf+VftP1C6uKAyP/BLey5nNBNDIkzOgpCGZxiKUhBb49atpJ9zhGOBK32A9arbPWS0qrNp0coAJzBeJ1ZoInhKKGtTyFto98AamcUOWaVWQZk2m69E+JsTZr5v4R/r4pti8cWv9idtUqM0+tCqBz6zY4ieQPPRYPqQ4BbphSb012lWJcHg5bNTNMJ3GgwObYnNyQrtl7NqOfOMv3CCCVn5AMeNalGv0vHT8xUR3pjfv+qhd0cr+rfMNn/HUKWYbV4NjueF4tUO8FaPGbQeerZ2FApcD4bcf2AD6pltXTc+/4B8fvFYq7Z3gldvFkMNGf8GoR91OmVdQmY+NlMTuJg8kJC4/eEh0StQqocGpU1avz9/I1XTn1yE/SrblbWnirdVeSkNaANm3A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39840400004)(136003)(396003)(366004)(376002)(346002)(6512007)(7416002)(26005)(2906002)(4744005)(6486002)(66946007)(66476007)(66556008)(8676002)(1076003)(6506007)(478600001)(38350700002)(38100700002)(186003)(5660300002)(2616005)(956004)(36756003)(86362001)(316002)(52116002)(4326008)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eTsJ225OUUqZq26ThIv7UXzysuuitKXUiOgdMysbqh9i/Uc90qMTO3ESP20mIkwuioCyLVNXJSiOCG/E5MfdQ+koSEI0VkuNTVfzo2/eZKOWQNJ2g6G0klBHZ4phXVDDOV4Zw0PBOq+y+ZACwMIwpx8a67mryB6gomnE9Ls5kAcIy0fPdek6VZH0Rjzu+3RRACpc+Hj9zD7RGrjv6Ai4BMwHNtgJjp3ipi3g9PSwmuHHIq4+fKNMxLqouHk9+LBKBSJ0tOLRs0V5C0kwd8TLwlMpcAyZnorFd3JRLfGmIYbSz/lynIR21666NjMFSOzPzks55JOgYK7nkZIcpRpXLIHjYmUUyCaOKmmjeaz8jCkY1Ufqjx0zKIT7jQpj3eQVn0Vn72uE9vR3OMcFBW1AsHiBW8Q6wIThUmorjgK6CUQ7j9F8UVJp605YDzwMvGLJJ7h3OJ51y9hjfo+ZZPO5PjpfEKPYN4xrCkXABUpEXkQrfx/26v3UD2vLEiK3j/xV/f7nWxVtBviDohqt8rhPvN76+Wd5K4PiVFMKJxsx2KJx+GzP8sfNbMeFVTXmQqAufAfTucd7ZmuqOvnvgxVwTcn9sFdkQgNx9dmja+y2Q+A0oNgUblTfV5MCl0qizst+UL0zX3lgaSjYx9NTiiR9poM3P3cpHAdTak1ZiWwy1IxdQU1fgAsRqIYQpjBdYDdUhcVJbE/UASfCFGhdvU6f+kvwI8V1KxKPs7ECXDwSYDEgD3+/N4wFb807zCtbSpiyQZ+R2L5bYS609okmqbW48kzH9ShuEmHtqvvP4Fl9OywWlwc5fnQtX/kyDhmdA3hV5LBvH1BOZJh72J0kcrzQ84E2ozJ8aJCmfExRwGBfQ3ybMqqbL9ZyRYaERp0WIEKE30MYNWhzUmnhymxWdcIJA78+sgtYNzJ4+ykAhCY9vf8jH2UglxqqwiFJCQk3jaTVA4woDrJETWC4LNPqx8jcRl8ucUF+yl8IMK02zfaSjL284NHW8kYPN+bF7NFusBsgcBue0mBI6wZ8VheJ156y+R9yPZJJDpC9zAzAUKXUKZSLSe3ditfcn0pUj8T7Sh0KmxPQSZMKkXN8tGryx8TwVtz0znMH3tm2H3v0500JgiSvLtqZhLrlrVO1vx0ydTL+sVqh/KvcissxTQEOUzvh9RyV4HcmsQcEzJmzzaaWG/L2mTHHRXnmHIFzoE4AjMN8IR0C2HjDx0JMjMy3Gh9VFLBTbPaBo1KgQBaGzg+XBlMBy53THWcGaEk8RcQ3Po9zHUVKt3N7Eyt8FiAZvBEz2StTFCwbSYYrEt2aT65IpdND75P/CI6pO47ib9AEznBU X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0f81564-aa55-494b-f9f4-08d951be1a1e X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2021 11:51:57.6566 (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: 6ZZCzB9hRPeLAYKjpclxDPV/eiufqNn1s6J4Bon47kCq3i3IJj0fw7SdKNmGWG8lf17KnuMIzzqkDGfucqSQEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3094 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add more compatible items for i.MX8/8M platforms. Signed-off-by: Joakim Zhang --- .../devicetree/bindings/net/fsl,fec.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/net/fsl,fec.yaml b/Documentation/devicetree/bindings/net/fsl,fec.yaml index dbcbec95fc9e..b14e0e7c1e42 100644 --- a/Documentation/devicetree/bindings/net/fsl,fec.yaml +++ b/Documentation/devicetree/bindings/net/fsl,fec.yaml @@ -40,6 +40,24 @@ properties: - enum: - fsl,imx7d-fec - const: fsl,imx6sx-fec + - items: + - const: fsl,imx8mq-fec + - const: fsl,imx6sx-fec + - items: + - enum: + - fsl,imx8mm-fec + - fsl,imx8mn-fec + - fsl,imx8mp-fec + - const: fsl,imx8mq-fec + - const: fsl,imx6sx-fec + - items: + - const: fsl,imx8qm-fec + - const: fsl,imx6sx-fec + - items: + - enum: + - fsl,imx8qxp-fec + - const: fsl,imx8qm-fec + - const: fsl,imx6sx-fec reg: maxItems: 1 From patchwork Wed Jul 28 11:51:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 488465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46629C432BE for ; Wed, 28 Jul 2021 11:52:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30CD060EB2 for ; Wed, 28 Jul 2021 11:52:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236183AbhG1LwP (ORCPT ); Wed, 28 Jul 2021 07:52:15 -0400 Received: from mail-vi1eur05on2058.outbound.protection.outlook.com ([40.107.21.58]:21025 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236186AbhG1LwM (ORCPT ); Wed, 28 Jul 2021 07:52:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DNQQWXSWKeGW2xjQS0C7JZck1kpzL9zxPIrZs58qKfinnsDSObbEjguYmustN8pWJrHVj3GiTR6opaTXui02IWESnx6UKFsMeIyt2z6YAwZEZBwTYPvaYH7nlXAeMg4ZCNJda19uXXsODZ0YpHoKdzbDoBafHaiQcLifZgMWxsGyg+lZ0AjJdyAo9lXrA3ny9+AkwqhxIU+vCtbHx+ZWiNTFkkrPP/rdSbA6yAyZEcKMMayNhUZsxujILdMfpXb58Rn75W+/38ejAAHGiz2U5lJIW3I0cS7zcRJwg5eYQkN8hkTc3MI96JrBUj5FSmNKZz0sFVmsRDkCpBfn7Bjqag== 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-SenderADCheck; bh=43zfs4b5nK8AZVA74c3pSdk24qL9GavyQBs4r2Ja6Y8=; b=j54cNwyHCasdE9qHp9FNhFOehq4W6KrHylKEJegW3fZhNpEzvf3Be7s22SKkf+gDizi8SyxC5FIieVHmCPE8hi5T1YnmOzrL/9G4n07wdf5JxJaSYmVbDqTQK+jOZ0Rvzj5zXbVqauHVu9Aj7Flxi+Ycnr8JCIBptgzJl9NSr/ZnAq2AQdR6rlHjbOnMvf4zvBtq4zQyUxqd52F1K+FVVUKNOa7MPiHBiwUBWWsI0fVyqkC23Qj6ASHThTm1qeFQsPrv6YfoqH2fdXjwOE2muQRIIyvVBvesUxS+534U2Snhf+521l6JNK7VjgWWNiPCpOwwUXb5KPSrtW4fY4Xb7Q== 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=43zfs4b5nK8AZVA74c3pSdk24qL9GavyQBs4r2Ja6Y8=; b=UPpED8s7sa/FNwMrGhxgjYfnk6B28TCceahSshILxa83LMynNPFzV4UOY3XqpGOLnGxmOqU5hROi4DwhHwitQ1dlQAy1hDTPaQm1bwHDie2Q8spZorYfis/lBdnDZPRkDJUAVBD2V2IVxJO+4U0QriF6L6FU6XCfKqMIn2ibVKc= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB6PR04MB3094.eurprd04.prod.outlook.com (2603:10a6:6:10::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Wed, 28 Jul 2021 11:52:05 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9c70:fd2f:f676:4802]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9c70:fd2f:f676:4802%9]) with mapi id 15.20.4352.032; Wed, 28 Jul 2021 11:52:05 +0000 From: Joakim Zhang To: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 net-next 3/7] net: fec: add imx8mq and imx8qm new versions support Date: Wed, 28 Jul 2021 19:51:59 +0800 Message-Id: <20210728115203.16263-4-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210728115203.16263-1-qiangqing.zhang@nxp.com> References: <20210728115203.16263-1-qiangqing.zhang@nxp.com> X-ClientProxiedBy: SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Wed, 28 Jul 2021 11:52:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a6ccba1a-d6be-4ec6-5ec6-08d951be1e9e X-MS-TrafficTypeDiagnostic: DB6PR04MB3094: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +iwz4k1zvoZkxQYKBIhnSeJ3xxd6Wdrn0ge0Jwo/1O/uuwys0e2eauxQIv6cYGl9ayLCfRSro5uWxCC5o1xr8JX/nMzfkNo3tQ55uPuvrcA35aGHDqOMDY/tHRCcnQFY9IhM8Jen9A+XbxjMD6zdiF9QSM0P8q1n1JiF6PtPu3FHBTaFVg42GEA7u4YFuMWpArRfpp4+IrN81xs3zHHZWIoIhMcA0rDf8gklTA4iqiwYThxeUX7FzxB7K6j3wdFEC/j569t1IUkP67hbCsrAkJ0WcfcWYm+jAkPdoTYr41dXv14pcegxnuTCjgZPb5yskbynAmkj+x5Heo5dGun+5V0d1Eg5bq3q/ytuo0vlFKVSZgRGPrNdkQp6HW4soekKo2ix8bTCtPXnDAwjvgVWF8929rR1hpdwV6oKNYAJ+GshSnjQkpaxwv44/emO4Lp3IMHJ2vI3NSaCHKa1uoQW87tQWNrYZLIBSEmKOcOeqBseFT0ZPvlEazu5Qq2OkvGgfDQ5p96VC0mxpLs0sbxT73gnzlJmNw43vmy3lNRzLuj+e0SXwA4Xq9Ef3hSZVA5ynxWxMvrE8xQM9wNvvo75yApUO/RUEszoQcF6zFVhAPY5+rkVEpALZwGN99COo5ug1rHOXvXxeojcbCNoIk3tg7M6rdncfWn0G74cPPXM8bUwVm67QapTr4q+W/kQMCHiDkIpSdnUy6G6GAY3YsBGQm1IQlYYZEaAFtObuB8EM8c= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39840400004)(136003)(396003)(366004)(376002)(346002)(6512007)(7416002)(26005)(2906002)(6486002)(66946007)(66476007)(66556008)(8676002)(1076003)(6506007)(478600001)(38350700002)(38100700002)(186003)(5660300002)(2616005)(956004)(36756003)(86362001)(316002)(52116002)(83380400001)(4326008)(8936002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V0lj0dfXX0EnDf66VmdTk3Dpiax7iM4+VGA8dBxl3HXUcIREbMgk7m+yCURkSNidd/Xq00swZDJcYawx1s1aA4C556b4CADHi/h8mT+HUxKAcmluq3b2IwNOodd43xU14SyMshXRa6Vu4T4nuDLxBJnKiKy6A7fIUocSAL71lIEAJN0Ab1rc+Rtn+rLnIbOF8WkI2tY0LpckIW+EaGPuRG5zS0VKR8kJrBKBUQN/yhP7GhZGnsj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5f6rmzIYEQzWEUKmtUBGhR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6ccba1a-d6be-4ec6-5ec6-08d951be1e9e X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2021 11:52:05.0829 (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: I08uAIFq9Ftjw0WiUrFyLVx1tudPt+B3PZFR3UgGTaGK3krlAHLlPSKmRqvmnemiGeGkKCWD/9DPmAmn4P93YQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3094 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Fugang Duan The ENET of imx8mq and imx8qm are basically the same as imx6sx, but they have new features support based on imx6sx, like: - imx8mq: supports IEEE 802.3az EEE standard. - imx8qm: supports RGMII mode delayed clock. Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang --- drivers/net/ethernet/freescale/fec.h | 13 ++++++++++ drivers/net/ethernet/freescale/fec_main.c | 30 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index 2e002e4b4b4a..c1f93aa79d63 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -472,6 +472,19 @@ struct bufdesc_ex { */ #define FEC_QUIRK_HAS_MULTI_QUEUES (1 << 19) +/* i.MX8MQ ENET IP version add new feature to support IEEE 802.3az EEE + * standard. For the transmission, MAC supply two user registers to set + * Sleep (TS) and Wake (TW) time. + */ +#define FEC_QUIRK_HAS_EEE (1 << 20) + +/* i.MX8QM ENET IP version add new feture to generate delayed TXC/RXC + * as an alternative option to make sure it works well with various PHYs. + * For the implementation of delayed clock, ENET takes synchronized 250MHz + * clocks to generate 2ns delay. + */ +#define FEC_QUIRK_DELAYED_CLKS_SUPPORT (1 << 21) + struct bufdesc_prop { int qid; /* Address of Rx and Tx buffers */ diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index e361be85f26f..d9ba9d6f7af7 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -135,6 +135,26 @@ static const struct fec_devinfo fec_imx6ul_info = { FEC_QUIRK_HAS_COALESCE | FEC_QUIRK_CLEAR_SETUP_MII, }; +static const struct fec_devinfo fec_imx8mq_info = { + .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | + FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | + FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB | + FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE | + FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE | + FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES | + FEC_QUIRK_HAS_EEE, +}; + +static const struct fec_devinfo fec_imx8qm_info = { + .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | + FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | + FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB | + FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE | + FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE | + FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES | + FEC_QUIRK_DELAYED_CLKS_SUPPORT, +}; + static struct platform_device_id fec_devtype[] = { { /* keep it for coldfire */ @@ -161,6 +181,12 @@ static struct platform_device_id fec_devtype[] = { }, { .name = "imx6ul-fec", .driver_data = (kernel_ulong_t)&fec_imx6ul_info, + }, { + .name = "imx8mq-fec", + .driver_data = (kernel_ulong_t)&fec_imx8mq_info, + }, { + .name = "imx8qm-fec", + .driver_data = (kernel_ulong_t)&fec_imx8qm_info, }, { /* sentinel */ } @@ -175,6 +201,8 @@ enum imx_fec_type { MVF600_FEC, IMX6SX_FEC, IMX6UL_FEC, + IMX8MQ_FEC, + IMX8QM_FEC, }; static const struct of_device_id fec_dt_ids[] = { @@ -185,6 +213,8 @@ static const struct of_device_id fec_dt_ids[] = { { .compatible = "fsl,mvf600-fec", .data = &fec_devtype[MVF600_FEC], }, { .compatible = "fsl,imx6sx-fec", .data = &fec_devtype[IMX6SX_FEC], }, { .compatible = "fsl,imx6ul-fec", .data = &fec_devtype[IMX6UL_FEC], }, + { .compatible = "fsl,imx8mq-fec", .data = &fec_devtype[IMX8MQ_FEC], }, + { .compatible = "fsl,imx8qm-fec", .data = &fec_devtype[IMX8QM_FEC], }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fec_dt_ids); From patchwork Wed Jul 28 11:52:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 488464 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32F3DC4338F for ; Wed, 28 Jul 2021 11:52:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19B8060F9D for ; Wed, 28 Jul 2021 11:52:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236312AbhG1LwW (ORCPT ); Wed, 28 Jul 2021 07:52:22 -0400 Received: from mail-vi1eur05on2058.outbound.protection.outlook.com ([40.107.21.58]:21025 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236140AbhG1LwR (ORCPT ); Wed, 28 Jul 2021 07:52:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RWrQRgOuty989/KNRenrc/qWfr0wFdyxgnG2LVcqgh+uqnTBJRzq5Wx8dq7nJoeQrm2pkZIjRqBTCr7TNVy+vfef+aRLL6xfi7kcma9BKPK8jNc62Amas1dYj4EQbQ5/nxQmiMxe1NWARO5RliHffCrsarAPL2tyAqi7T+5n3jigdiQuvvsNYqPscbU5SOupB9yARsn5td8hIUPfRdwX22xtTRDHMoyWPogIo7L7a13H2k5aVI0POZu1fXHhRVY/U8b5j2qCycMdaDYHYNj+98pm+PWXrpkGAXFisWBf5X1/1QAvyh2cvh2Q+Rf5FrOckYyHnOJ64FZgvvE2rsoO4A== 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-SenderADCheck; bh=bOxzyij45vJwYLtgwyflOygjh9g41dRwcjVoOV0WDHA=; b=WBDH0NqCh/Wgijn3mezhLe6xyC+xc6dOsIp8VPaduTtS1UIsMEtnIoKMvZRE00/MvdAYETioa1ZWWoHmZ+tX9K9moQ74Od8442ev4Zhc5SFrqFUAGM/udM0Kk9j6qd9XkPdNQ3eJAtHHhbKiGuB8cr5xM108dUPJLYoOsFzn1HJle+1FCytJlXWpheb9ZDHVWwXT9BXm2dx0xVOVcX5EtMpeueFQLPqD1anGZY/0ClgFfVgn/N40c4E1EqYJdbnxjUhyz4RD6E7E7ax3Qp9LySOg1fJldAjdVR1p2/tOFUfG1epQbFOsIJ6/1UTLEvBAhYtMVr/skIuQPhxFM0EV/A== 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=bOxzyij45vJwYLtgwyflOygjh9g41dRwcjVoOV0WDHA=; b=S5nxVTM9fEWZ+oB77CYtWlyWN5BUccMJmZ4rd+FdSEEDYAieM1Bdf9/YPHbwkboodPdi1FFFvxXFyDhMeUa3bj0rR8PH5NNWK+EX+Llzvc0Rz56eXunEl/Z8qtgQMdkxgszH00sNBaGh5LHRUp8eprWuzKzUSys/qYh3DCQ3KPQ= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB6PR04MB3094.eurprd04.prod.outlook.com (2603:10a6:6:10::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Wed, 28 Jul 2021 11:52:12 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9c70:fd2f:f676:4802]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9c70:fd2f:f676:4802%9]) with mapi id 15.20.4352.032; Wed, 28 Jul 2021 11:52:12 +0000 From: Joakim Zhang To: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 net-next 5/7] net: fec: add MAC internal delayed clock feature support Date: Wed, 28 Jul 2021 19:52:01 +0800 Message-Id: <20210728115203.16263-6-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210728115203.16263-1-qiangqing.zhang@nxp.com> References: <20210728115203.16263-1-qiangqing.zhang@nxp.com> X-ClientProxiedBy: SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Wed, 28 Jul 2021 11:52:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9af0d501-ca30-4610-511c-08d951be22fe X-MS-TrafficTypeDiagnostic: DB6PR04MB3094: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GW8HWLqRbZw/nR6I6x/Kc9SylrFTLka3TWUiRHDqyecGqoCTrqvUOLTTdhrCtI0xjaurcXZMvrizAY39tVJIHcr7uu36QesbW0Hs1a54gLmcBNGAwPJlCFmBVTxixoFBfm+3GHXafmucKtu6VeTVJF1YhQWuDujYvkO/thjg9D8/+6obTnPtem1mQUc+x82H1Ivb0YVls8+nMW+cvdopM2vrMoV890kuYSYFtu49J6WAAcDto9COt+LZOQugiuxkfISyzT+54i9QxQo+lYluY+rGuxM38E6dVvGcnhKL1kkJ12ce0w27zF1xRsdmR0AaKspcQLjRvThtY27yvnQgILLozYeq6n2HddsIeCKxdNZOAAvPDv9Em3cQpCYsOhwa75pqyR/UYkmuUBV/DCMc6qgKIIIwgaQF15ji0t5cwbmfPuszF81aHVFi0Gp+m/Uwo542z1UlG3dpsiXxLSDpSgYAhY95LidQWVNLwYBCLE33eKhAEwjBtIpctZI9aMU+j+MKxUxcrqvSjyn7KKT1RRsyI47LribtXRY2CHu/NxzVVHvU/9xxZbx/MlkTbVfn3rBJ4MDq0JddWsREUShPRWFF5Ld4IS/z07eDIc8tljYXADDP7nwAe707xUElqjHfUho64cTZt6nhBRt4gHspo9ocKmyWPOKbg84/9y92XpIk3rf+uYdB08mBBMR7m2N2xBcin/oyqGoQXTzkG7nmeQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39840400004)(136003)(396003)(366004)(376002)(346002)(6512007)(7416002)(6666004)(26005)(2906002)(6486002)(66946007)(66476007)(66556008)(8676002)(1076003)(6506007)(478600001)(38350700002)(38100700002)(186003)(5660300002)(2616005)(956004)(36756003)(86362001)(316002)(52116002)(83380400001)(4326008)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GFkxElV3+YJsxzM8ogr0inWDUOgm3jq4r9vZ4Z1Ahhg2RWb5GGN+mQiSJN1mZJZVHtYmqDSvIxsDDjDVKYwxWHyT/Tx+2D0cq+DINiWutOTiwJ5HAhhE+483IMuftSs6sbf1tFXe8d4GZ8Bs3KHgSPLYG40+trxdkIohBurVtDG8s07s1/LKEVXbzbQ/RxMVEJ5+j99PaprUlccMS5i7f+/e3Y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hT22U+etA2LVhVwhhecEYmUdre/IetPfFQSxSL+GeUFF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9af0d501-ca30-4610-511c-08d951be22fe X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2021 11:52:12.4136 (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: k8vbzmMaVZlypADU2iiEClb14FvxCxi4KRXBbvwnCPChVz/Kw/7Q2U4jZZEvVOB7ZPi4WuR2+Mirs7uQIoYLug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3094 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Fugang Duan i.MX8QM ENET IP version support timing specification that MAC integrate clock delay in RGMII mode, the delayed TXC/RXC as an alternative option to work well with various PHYs. Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang --- drivers/net/ethernet/freescale/fec.h | 6 +++++ drivers/net/ethernet/freescale/fec_main.c | 27 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index 0a741bc440e4..ae3259164395 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -381,6 +381,9 @@ struct bufdesc_ex { #define FEC_DEFAULT_IMASK (FEC_ENET_TXF | FEC_ENET_RXF) #define FEC_RX_DISABLED_IMASK (FEC_DEFAULT_IMASK & (~FEC_ENET_RXF)) +#define FEC_ENET_TXC_DLY ((uint)0x00010000) +#define FEC_ENET_RXC_DLY ((uint)0x00020000) + /* ENET interrupt coalescing macro define */ #define FEC_ITR_CLK_SEL (0x1 << 30) #define FEC_ITR_EN (0x1 << 31) @@ -543,6 +546,7 @@ struct fec_enet_private { struct clk *clk_ref; struct clk *clk_enet_out; struct clk *clk_ptp; + struct clk *clk_2x_txclk; bool ptp_clk_on; struct mutex ptp_clk_mutex; @@ -565,6 +569,8 @@ struct fec_enet_private { uint phy_speed; phy_interface_t phy_interface; struct device_node *phy_node; + bool rgmii_txc_dly; + bool rgmii_rxc_dly; int link; int full_duplex; int speed; diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index f13a9da180a2..40ea318d7396 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1137,6 +1137,13 @@ fec_restart(struct net_device *ndev) if (fep->bufdesc_ex) ecntl |= (1 << 4); + if (fep->quirks & FEC_QUIRK_DELAYED_CLKS_SUPPORT && + fep->rgmii_txc_dly) + ecntl |= FEC_ENET_TXC_DLY; + if (fep->quirks & FEC_QUIRK_DELAYED_CLKS_SUPPORT && + fep->rgmii_rxc_dly) + ecntl |= FEC_ENET_RXC_DLY; + #ifndef CONFIG_M5272 /* Enable the MIB statistic event counters */ writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT); @@ -2000,6 +2007,10 @@ static int fec_enet_clk_enable(struct net_device *ndev, bool enable) if (ret) goto failed_clk_ref; + ret = clk_prepare_enable(fep->clk_2x_txclk); + if (ret) + goto failed_clk_2x_txclk; + fec_enet_phy_reset_after_clk_enable(ndev); } else { clk_disable_unprepare(fep->clk_enet_out); @@ -2010,10 +2021,14 @@ static int fec_enet_clk_enable(struct net_device *ndev, bool enable) mutex_unlock(&fep->ptp_clk_mutex); } clk_disable_unprepare(fep->clk_ref); + clk_disable_unprepare(fep->clk_2x_txclk); } return 0; +failed_clk_2x_txclk: + if (fep->clk_ref) + clk_disable_unprepare(fep->clk_ref); failed_clk_ref: if (fep->clk_ptp) { mutex_lock(&fep->ptp_clk_mutex); @@ -3704,6 +3719,7 @@ fec_probe(struct platform_device *pdev) char irq_name[8]; int irq_cnt; struct fec_devinfo *dev_info; + u32 rgmii_delay; fec_enet_get_queue_num(pdev, &num_tx_qs, &num_rx_qs); @@ -3761,6 +3777,12 @@ fec_probe(struct platform_device *pdev) if (ret) goto failed_stop_mode; + /* For rgmii internal delay, valid values are 0ps and 2000ps */ + if (of_property_read_u32(np, "tx-internal-delay-ps", &rgmii_delay)) + fep->rgmii_txc_dly = true; + if (of_property_read_u32(np, "rx-internal-delay-ps", &rgmii_delay)) + fep->rgmii_rxc_dly = true; + phy_node = of_parse_phandle(np, "phy-handle", 0); if (!phy_node && of_phy_is_fixed_link(np)) { ret = of_phy_register_fixed_link(np); @@ -3812,6 +3834,11 @@ fec_probe(struct platform_device *pdev) fep->clk_ref = NULL; fep->clk_ref_rate = clk_get_rate(fep->clk_ref); + /* clk_2x_txclk is optional, depends on board */ + fep->clk_2x_txclk = devm_clk_get(&pdev->dev, "enet_2x_txclk"); + if (IS_ERR(fep->clk_2x_txclk)) + fep->clk_2x_txclk = NULL; + fep->bufdesc_ex = fep->quirks & FEC_QUIRK_HAS_BUFDESC_EX; fep->clk_ptp = devm_clk_get(&pdev->dev, "ptp"); if (IS_ERR(fep->clk_ptp)) { From patchwork Wed Jul 28 11:52:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 488463 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55727C4338F for ; Wed, 28 Jul 2021 11:52:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E9D860EB2 for ; Wed, 28 Jul 2021 11:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236332AbhG1Lwm (ORCPT ); Wed, 28 Jul 2021 07:52:42 -0400 Received: from mail-eopbgr80082.outbound.protection.outlook.com ([40.107.8.82]:39300 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236261AbhG1Lw3 (ORCPT ); Wed, 28 Jul 2021 07:52:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jB64N8guVLyldKGNd40qJy2oHBEdUXxYkiwAMxKXhQuSO2mX47w0baQ5kEJEiCJk4o/fOYiYYaJzDbZJWF9DUq6QrOJLlxs4xIegPmIrcA6dMKsfGIrcguQ37L7GCSRcOi3Wm2bRoRJmaq/6l14yWJTC3PELWWjqPGWoJZv5MWBA2DogqgdPVc8X/ctpR4jc17i0S8NKEoTdr060oKFT92IIZDxpmkSOiYpBnJjU9LPdbotMozIR8lP7RdyJ3DAFovIWGeAUHJCmOQIrOQfh7zLvMmrZGbNz3KFzXP63BOL2TJQiiOmpfT1LJMZkC1PdALnXGkh/mayUM5Z6vg99sQ== 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-SenderADCheck; bh=Tw7E2FfkX5J8YEhES8eQgZe6b+hT8Ylfb2aft6BzEbw=; b=GrzE6APxr8zIK1JaJD5tJG1jDmZ6EB7eWes+jVYqsyJFOK7Ssg1AcS56oct/F1fgl7VD/aQfpYM5+yqX9w10V4SCKwxZpm7iaUqmo8NWIlXc/c6a3qhAvZE8NI/zyIA9nCzkxnw168EM/5A40lS/Q2czuENmOerrqurki4f5f5B0yVvp71vil99uiQgmV5GldypihgZetXAmNNtop1a9NMchN52x5692MuZ/AnDDfpvc9JNyY9AAQKbIL/Z35FEiGRUMzTWEdzR1m/tV7od4YbtwN27pZYQyIP8DImjJ0bg24YBNxLEoJRdq4y2yqQYLOCz0nCJMaHyhezG35fSjRA== 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=Tw7E2FfkX5J8YEhES8eQgZe6b+hT8Ylfb2aft6BzEbw=; b=QTn/IntgPDb4XqvSncg7IzQxN00XeUEXqNH+GijO0XyEnxEf44szw0vqCxvXNUCBwVOMEOJ45vOrk95W4FOPv6n7V0jnTbBcSIhcT8uFKBQbj+/7jww/hpKMzM1DwXNpQL5wYsaJbZ5yLSEpQMYk9g0QqtNh/lT1A1/HPbHYBxo= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DBBPR04MB7900.eurprd04.prod.outlook.com (2603:10a6:10:1e8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.28; Wed, 28 Jul 2021 11:52:19 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9c70:fd2f:f676:4802]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::9c70:fd2f:f676:4802%9]) with mapi id 15.20.4352.032; Wed, 28 Jul 2021 11:52:19 +0000 From: Joakim Zhang To: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 net-next 7/7] arm64: dts: imx8qxp: add "fsl, imx8qm-fec" compatible string for FEC Date: Wed, 28 Jul 2021 19:52:03 +0800 Message-Id: <20210728115203.16263-8-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210728115203.16263-1-qiangqing.zhang@nxp.com> References: <20210728115203.16263-1-qiangqing.zhang@nxp.com> X-ClientProxiedBy: SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Wed, 28 Jul 2021 11:52:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e077de9a-9113-47fa-3633-08d951be2756 X-MS-TrafficTypeDiagnostic: DBBPR04MB7900: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1388; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LUglQnW82YuxH5qgSsVQycHurA+4KOvtPajYMh3pfyZw39TaINwAMySmUk9s/k3XJ63xL9itxFtC6USDvzQOPcJSrwgdgsbGpXAAYd9QAkVgzTxs4Bf2qQT9aEVpwrAZms1taUqrdT4RY5viEMcUVEvA5HAzNwzKXxCgwJviSwPxLfPrZm6eeGfhRHfVMVEuMQ7fU/f5xMVI3ve2KxAF+EMXOp+szuNuDMk2/rUX6U6oHt2sRTLkT7JLe1hUxwpjaGK4dVGr0UqiCeZKBbBuHml83adu5hP/NSK3GLNAuSMGl/7Fu1umLy+nAu1vwR+HQgSTHb9EjQ0IqK6d1FjgtC/ZOPY+T/lMI2VZrJjpHnjf085C0TMUi6XtPVDHpWWQnoD+HPyi1FSADaCQp7F0HDvkihC6ug9ZFmdhdhQB+FI5lriM4caU8d6UZ0s9p1Q10glMU5DyqyCVClqv0MtdNWW90au5u5JcgTC26tgDEF5SB6qc9jlh7vTMK0NbLoRXW6cBgKEMKZMS8dxJX8sI6ris/DJdrjwE79M6t/7Jmp4CrMfoISiRSLw8Dx6yP4FMXmI/Z4iYTkyVzD1A/ZCb3De0fDioVmdpr83cl0R+s8fVRiKkJ+KEhTxG2E2pxkvJrU81Jv26dybSVBEv9l01kZPnXP6O54eALdmWvwDSmz3Y/6qcHWe6wG+DlJMvcreemluOjqAB3BWHHTe9qg/p1V7PhepjsmDE3sj0P9EXx0w= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(39840400004)(366004)(376002)(346002)(52116002)(1076003)(8936002)(26005)(956004)(38100700002)(2616005)(7416002)(38350700002)(478600001)(6512007)(6486002)(316002)(2906002)(66556008)(86362001)(186003)(66946007)(6666004)(66476007)(6506007)(4326008)(5660300002)(36756003)(83380400001)(4744005)(8676002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Z5++8VOuKub+uOzgPvvHxatz9DMKilsaltu7KCC0tuPWb41LDrGfjaNDsiNXr9pWK30VR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S9fsytV6DPtBOeAHyiAd6fB2ey2wLpOJA/XwpfLIvVV+NPxoi5n6PiiFV6pKhB3q/uXiGiqBzp1eDeIJr5zwE4Eb1Tefm/7V3WFs4nEz/yo+n/KLsspUwHAVcE5C8gDIme3ogaQkcuEdzFOU9rZSYQIoZVw0JZIXAnaQfyvcqKyKiIJVlsZABPnFAO7OSDDQus X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e077de9a-9113-47fa-3633-08d951be2756 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2021 11:52:19.8628 (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: Hdq92hGIfx0xduQhDEcbmCN70dxMBYbL4RnPu6Ixi3kwz/PMrYPbBqqG9QUfRTh06RCAXk5dHCwK7SY0BGvssg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7900 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add "fsl,imx8qm-fec" compatible string for FEC to support new feature (RGMII delayed clock). Signed-off-by: Joakim Zhang --- arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi index f5f58959f65c..46da21af3702 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-conn.dtsi @@ -17,9 +17,9 @@ }; &fec1 { - compatible = "fsl,imx8qxp-fec", "fsl,imx6sx-fec"; + compatible = "fsl,imx8qxp-fec", "fsl,imx8qm-fec", "fsl,imx6sx-fec"; }; &fec2 { - compatible = "fsl,imx8qxp-fec", "fsl,imx6sx-fec"; + compatible = "fsl,imx8qxp-fec", "fsl,imx8qm-fec", "fsl,imx6sx-fec"; };