From patchwork Fri Jun 16 11:14:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josua Mayer X-Patchwork-Id: 109044 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1268208vqr; Fri, 16 Jun 2023 04:27:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kdCyuS+B9vjwpEu5TH33QI+2Umyk9dYD75JxQibHS7wmG/NQYbMJOk7nQh1aUNOIXIqHS X-Received: by 2002:aa7:88cf:0:b0:666:ac6f:e8fd with SMTP id k15-20020aa788cf000000b00666ac6fe8fdmr2017023pff.1.1686914821791; Fri, 16 Jun 2023 04:27:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686914821; cv=pass; d=google.com; s=arc-20160816; b=WtTm9TQjaAE3ZtF4ONZen+yHx/HkPbxeEfZGSPRTwTQDAnhq86IWhWvvBjKWuGGngj 2cm+W7/ewOGBqy2xkZskI88GSzrwtmNXyXUbS+uuuX2pV/M3C7CeD5Jc0EFZY1UuBPHx zJH+gc5fP4MbzFbiZ9WClo8m+CYDcSa4qPqJ/XYpJcoZhgNR4l4ljWmr9FShknGPHeM/ rK/ZCbsSfYzKeX2y4WoAHGE0D2xi6c67QpOkawxnwkxvsfzeZ9NWOxq0Gxa7gJXCjk1H 9KyBtw0AlsifupoRMjYBbVNjbpbkxV/+suNZ2K2vaPfmfr1LpuauryWRNmZ7szgGKvk3 76OQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=Zi///9VArwf/g5asxXvmxXXw8gbc/2TDISEdzhgBNWs=; b=D9xecSarybqJgxU5hnI+4j7WOK5f2waGlMQRfQQ6xxRGU+9rgMtKr+Ym5g86M7nKR1 CGDVfzvXuzfPLWaFRtRMUkYmi9rncwyHyZpsm9EW7OKYZX8+vEZikJLSjooJO7FLCSkP zshN9wsUaCspWcsSnW8CPsxYDyiUBEaBkHqqkCgvawQpdJKSx6ZZF8rGDghIP/hW/iFN yOsxGEqKKeXDNw8jf3P6rIJKYBTvJyz/t3K3Xy4+b7kpTc+4heikEdnYrerxxmy9AlPR kLWdhc0YskTFw3KPIc5HgSvmwz5LpQw/TMMcAQdJ2WvwCQyw+Dk6MYUzVQAmMsD4cidI DKcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@solidrn.onmicrosoft.com header.s=selector1-solidrn-onmicrosoft-com header.b="aDQM/6/7"; arc=pass (i=1 spf=pass spfdomain=solid-run.com dkim=pass dkdomain=solid-run.com dmarc=pass fromdomain=solid-run.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k26-20020aa79d1a000000b006650ccb39e9si11146458pfp.294.2023.06.16.04.26.49; Fri, 16 Jun 2023 04:27:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@solidrn.onmicrosoft.com header.s=selector1-solidrn-onmicrosoft-com header.b="aDQM/6/7"; arc=pass (i=1 spf=pass spfdomain=solid-run.com dkim=pass dkdomain=solid-run.com dmarc=pass fromdomain=solid-run.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345181AbjFPLOh (ORCPT + 99 others); Fri, 16 Jun 2023 07:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345078AbjFPLOc (ORCPT ); Fri, 16 Jun 2023 07:14:32 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2080.outbound.protection.outlook.com [40.107.6.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5593413E; Fri, 16 Jun 2023 04:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CSAM4DBWEwLull/mQa2CKpZnjj7yswRYp9BbLVoFuROcDKBcVq9VWoECYnH2Fswefcvztxm9n11s/1lVnDiyVOXZ8fJoEptwZnVavySqO1/fzcC1ft8jTwh9wyHBOC1dVWsEsxv1wu5LkIS7M9ey5XILwVcEUUTvVKVYy69eQhHPyxAOH4CFSPMunkS1+IUI8F7ly98YhGOwuhreyJ/UL8Mpxz4Lzeqasu8qfVYaG5xW7dbke/xvEDgjTbFePhDIn0/oG8yx0Xfayf3jmq6i0rz55IznvyUxJCBr/y6TIlm9Y9DWXI1Rv4z6yG3A+0RaHeaxDrM5KiqL38xZ3emtOA== 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=Zi///9VArwf/g5asxXvmxXXw8gbc/2TDISEdzhgBNWs=; b=fClILJQd3IQVIl2MjDTZvq5ot3dURBdgiWqu64X8OlnfhwxIZZB0iXLHLtwSb/hw1nzetxi5RucYfS7nbFTimN4798/eaSiPHyNRv9KHB6P5yvCce9fsBtj/bHXCg9IuD6geCTrPgESsCinm0UISzpcUNpnu0j5SWYko1gTMIEgoESDEHe2kfMC63Z9clvG3gyLj+r9OsCeRg3a04behxgApgZp6EMDWZBr2I+ZzfoMfBtPiBCy4kDv9kN8hWkHDTIKd8mQKJ3qaUT/MU9BaFOukLuyYMCnwMLe+z/hthxSC9ilsnNKQeE7zMhlifXEWQollBlzXRJCF8D10njlvmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=solid-run.com; dmarc=pass action=none header.from=solid-run.com; dkim=pass header.d=solid-run.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solidrn.onmicrosoft.com; s=selector1-solidrn-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zi///9VArwf/g5asxXvmxXXw8gbc/2TDISEdzhgBNWs=; b=aDQM/6/7DlBDidclKwYPXkFdqcjbJANQOe0OB+F4G6hywG7Rmk2rOc7IcE6isILbY3nagRw337ZIewLRhBSoMvdeEC07CP2MTU5voxGCCN1tRHbcbOkfckJ363qeCZ/0KmIUqdWF96uXOhLce5vABxNeuF/XpXUgnoPTlyIujs4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=solid-run.com; Received: from AS8PR04MB8963.eurprd04.prod.outlook.com (2603:10a6:20b:42e::18) by AM9PR04MB8258.eurprd04.prod.outlook.com (2603:10a6:20b:3e2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.29; Fri, 16 Jun 2023 11:14:28 +0000 Received: from AS8PR04MB8963.eurprd04.prod.outlook.com ([fe80::5a4:421d:f180:9105]) by AS8PR04MB8963.eurprd04.prod.outlook.com ([fe80::5a4:421d:f180:9105%6]) with mapi id 15.20.6500.025; Fri, 16 Jun 2023 11:14:28 +0000 From: Josua Mayer To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Josua Mayer , Ioana Ciornei , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King Subject: [PATCH] net: dpaa2-mac: add 25gbase-r support Date: Fri, 16 Jun 2023 14:14:14 +0300 Message-Id: <20230616111414.1578-1-josua@solid-run.com> X-Mailer: git-send-email 2.35.3 X-ClientProxiedBy: FR0P281CA0059.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::7) To AS8PR04MB8963.eurprd04.prod.outlook.com (2603:10a6:20b:42e::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8963:EE_|AM9PR04MB8258:EE_ X-MS-Office365-Filtering-Correlation-Id: 75a75f73-6fab-4797-81f2-08db6e5ad98f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4v8sFP3gQm9BKtmz+d3+c7LpNOjMjjeadOkbohcaIBHsY8vgEAFyELPYcOAnWFnI+pTxaw4y8NzAYO2bBRJYFSfp5cqsAWw7iG1CsTPIPogsx/z/fJV/1ji0nfrypGn8goGwB4A7XhLNx79C4ml5JiOEx8QuZdJUA1lgAb+V/5fJt0B/3kqRusbsvYJXfLvah9I+oiikdQPvgJCMNAD5xxG8Ol2nXuedPgpAt+F7U5Y9hPGunfpDByH2+ghqzIhprTnpNIB3Rhq9M0mCo53g6aRu4cwolrz4PbW1xvP53a83y4xnGCxUSohnkrzchKBUqe7R+KwDLqjebWYA1uv2QtTiO4xd8Uu2ZW1ZLHRfDbquFipw6MTzLNEZT9PBRxwab4NdmMvqqTuZt6pyQSkeTaR0g3EyYk5TG6gVdNH6rw0c6rucf7tjzmvjriO/wLUBQ7gEYwVv/6jXpAUJV+bCo/RaBiIr86Wa//if5uHlmomCNSj2czV2HzC+/qttVFlXnFoTtKVNkNuIFe+1hHQuF/rRt6HOPShPRG2/Pr5nuFYwEHfpzCfAt3Zz6MRnMVx5PA5uNJ/lIyr0xTRFRdj01B0Kh7WcYgFPMKVP5uz9GEFTP+GtI0xvA1cWHjlAirsC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8963.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(39840400004)(366004)(136003)(376002)(396003)(451199021)(8936002)(8676002)(86362001)(5660300002)(38350700002)(38100700002)(83380400001)(316002)(41300700001)(66476007)(66946007)(66556008)(4326008)(54906003)(2616005)(186003)(478600001)(6506007)(1076003)(6512007)(36756003)(26005)(6666004)(2906002)(6486002)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9IdozhtO53jeNeWEy53pbjW3Eld2CKnpaMwAgzfnFpJ2Q8g0g91qUpyV9MeCpn00ji3XlXoHc4dim+wg8AYAtEhq+v3BGtromDOvhKAzCCMVbL/rVKYn5xyBshp6FAxpdTSA6yx4Hddi3p7GelfmW172VoBjA4U7IcgKLOoHAD8jz9WjaxPFivJdkOXHfNe5Rr1qScMP02wgbiiTH8Q13Y2nX14DAdhxlPf7O5Bb/dXWs+lknY6E9olnFWTIycqikkKYfKXU9u2RpK44gSGH+14XlislGEQnHuRXYQk6LoOxJwuxG7URCFZiT7NdznhhpIIeOm7F9ET+ZcBL1OBPoNa4fL/d18gHklfaHIpcMVE7rFouooQjECmtdZKO3L7P8LPpK71r6VLdQIDYQj8Fg+M1wZzSEO5s+qBVrANwhau5VZC65ajqAeZKioxEJ4t+mQEI02AvEwcZPGRYcLu3taT+HQWMP3+AIrWUAwE0I+1MLU0sw+SQQrrWL8kJTJc6qB+qLWf7zIYn6L4NJbe+HgUuCraOfxEMQo1SaqFsCZnN9ioKALNdSNe0X1cIt5Hh/O88MkcdWMF7eL1R2sLTJpiQppihhvzUd82sQUQgbFWvZ/0OrYaKjHif+7g32syuvbM6LYX7LRNAEdzGXNCgOzEMc8I2a0UwsLngvq3nG9k15ljr7FOKQQHdOnHC2UihccUcLOxOLMrWcg9t4UG5zn7SAtUbEYyhP4hptcbe58jshCPF5u6TQCKCu/QJ3e0U2DNRYCBZzg8vEQzbfzj+BdDGt4VO6EAYjeT9JJcQdHcv+t00plqP+WNoqs1jKe0ErnFKjLabkCLAeUj7nhloq6j+e75IZhkyI6+4c7PXQGni2cGMUKQ2THfryo9rtFvE+XMEFmWKoMTHOGGLlFLKtGnFkfAMqYuFfSHDJsggLFWFGUBaRuol/M/3xl/+oaFRD3jv082JO9gklIgQh6rP9ysEea2MoSSgFyF3+UpUVXAwOL4YYFixeDB7rhf2yUr6TNl3CifcJ+XH/hiVJNzEYWruRHmR26+8zRTXUsxHZQBRMZI5NBF9CeJ4itwrtixVOA2bfBunWdti9dPUvS/fZJzpBBWLJvQohQJveiXJlYP6AFuqTqf4nW5RZOZRtqTiQf0ZFtccqIzTSD/5I1H7oyb/95E2mCLqxCd2a3yBLMlIwhG8+nPfjCxbKABF7mAQn3umUY6XrvBu4HXwer2j9Mn2ONSu3FvXG46YMWDGrSwV04ZDEhgHu6yw+EiooaidvsX+co8yKtMBd/s/eP9XOI1JvtLm+4wlFGK7dVY+DlZhfix8TRzZ+bzM3TPOheypZo0sB+cQmKdR6Qf6G79eh2ikisobE2+FyQnmXUWM7kn2y7TuKL+sUWU1e7n5UzjBWaiMssVAez48H6646ApWrO/sT3+TmDCAJnnDwITgOwI6nZc+zLIDNVp1odLk0WCRwZtDoY4/DuHSZMVscCb/V6UM7kNMym9y79WSiuegUo1WWmPoP9xcfC4b8FUaH/l9ETD76x3rvChItpZXtSJIS5wmPxYrT97OkoHQAvx/hmJKZ/dyg2BXhN4rJsf+xVCt X-OriginatorOrg: solid-run.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75a75f73-6fab-4797-81f2-08db6e5ad98f X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8963.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 11:14:28.0553 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a4a8aaf3-fd27-4e27-add2-604707ce5b82 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ym3RpefY9CpQIPKpwizJFXVO40bhVmDLQn/4poK+1O8WcLkC+KqbHMzSBK0aLHJ9Ubwb4pTUcqQ8P+N59EH5Vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8258 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768858396025766919?= X-GMAIL-MSGID: =?utf-8?q?1768858396025766919?= Layerscape MACs support 25Gbps network speed with dpmac "CAUI" mode. Add the mappings between DPMAC_ETH_IF_* and HY_INTERFACE_MODE_*, as well as the 25000 mac capability. Tested on SolidRun LX2162a Clearfog, serdes 1 protocol 18. Signed-off-by: Josua Mayer Reviewed-by: Russell King (Oracle) --- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c index d860d9fe73af..a69bb22c37ea 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c @@ -54,6 +54,9 @@ static int phy_mode(enum dpmac_eth_if eth_if, phy_interface_t *if_mode) case DPMAC_ETH_IF_XFI: *if_mode = PHY_INTERFACE_MODE_10GBASER; break; + case DPMAC_ETH_IF_CAUI: + *if_mode = PHY_INTERFACE_MODE_25GBASER; + break; default: return -EINVAL; } @@ -79,6 +82,8 @@ static enum dpmac_eth_if dpmac_eth_if_mode(phy_interface_t if_mode) return DPMAC_ETH_IF_XFI; case PHY_INTERFACE_MODE_1000BASEX: return DPMAC_ETH_IF_1000BASEX; + case PHY_INTERFACE_MODE_25GBASER: + return DPMAC_ETH_IF_CAUI; default: return DPMAC_ETH_IF_MII; } @@ -415,7 +420,7 @@ int dpaa2_mac_connect(struct dpaa2_mac *mac) mac->phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE | MAC_10FD | MAC_100FD | MAC_1000FD | MAC_2500FD | MAC_5000FD | - MAC_10000FD; + MAC_10000FD | MAC_25000FD; dpaa2_mac_set_supported_interfaces(mac);