Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14317714rwb; Sun, 27 Nov 2022 22:18:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf7EqlzLed+rgil6Dy2jqMAUWMFQsTEsxdaTP6oeyUFiXkYMHCEwWQuHCv6NHkTVDNRFk+0n X-Received: by 2002:a05:6a00:3385:b0:56c:309:b900 with SMTP id cm5-20020a056a00338500b0056c0309b900mr29982599pfb.21.1669616331671; Sun, 27 Nov 2022 22:18:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669616331; cv=pass; d=google.com; s=arc-20160816; b=r2zRhIp/yNj5kj4ja1tyq5RA+byGZWDU53aFzZ1CIgegca6Wv/um26xatuE/yenu1r uYKBZ98x/N0pO4bx3ux4G1plWdfuCLTihW0k6xRuKLwLSxbgUBuSZevzbOmLbLTXxKT1 /BgsqzJ9ZXSwwyMzuGIONow2lZ9aAP5L9uUkjd0vT/sBnExr55kmY7LRMRuxeZws4VEb +Anj0hrSfH2ogGxIOTpZO45Q8TGCbkJ8KM410qrXErIXofBJtuGSJimgBM6Xo0DBLJ5F KmVtwnavlWWmGgof8lBuvmm/NBYXLjvVQ6dOoFQlewkCg90rCyp5P6gjTCOK6c31Rbkn eZpQ== 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=I8g2j1DEBPGGaobCBB+WdxuHsbh6N46Zh+l5wnT8WPI=; b=vohyYGaDWCWZdH8QxV3GYAseGx3o2KjRQ33LTHRgxYxOMQnjr17yQ7JE4AeAhZPisG +74pJWyzjckYsa5nnZlHWHd7x4FYyotDFoLTVL0a/C7C30BKQD103wH9zYTreDKpMmeh EuAtSH+kE4Hy+AvW1pCqWCKkjSYmVbgiUv6zCUihnfQTg3c1M6zjR5Xq9lFNX02saH4S zLofWbW/A/TbA17XaCXvz0Yh6wMIlld0Eb0Fs3NJJ/KsGevpci3qYGZAdWbzi33GQX37 oxLt6OUQY30M0WE/K8PQWSm5VPXehd3M6CY5Es3/Kjt+Ud7scfaP3exwxXuXNDPSHBkO GdkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=MpY0pORZ; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a63f718000000b0045a3e1d1a77si10614132pgh.111.2022.11.27.22.18.36; Sun, 27 Nov 2022 22:18:51 -0800 (PST) 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=@suse.com header.s=selector1 header.b=MpY0pORZ; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbiK1Ftl (ORCPT + 84 others); Mon, 28 Nov 2022 00:49:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbiK1Ftk (ORCPT ); Mon, 28 Nov 2022 00:49:40 -0500 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2058.outbound.protection.outlook.com [40.107.15.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D67A13EB7; Sun, 27 Nov 2022 21:49:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XId2VGU8Kiu/2QTKDzDIHhroM4PfVPV++ojz1vYAmiVmfq34ROkV4DqQb5jwOXhXjsd4Zro74eD8nxMn+XB6vOyPPTWglc44TljfRBJAaNHA/M+ba9RKDpzrmwl5UpKPDKBuJSUMsv6L9R43MssMs8DpEpXc9LIZKFRM3jbCQ2QzSg+D9IU4/z+/mrGz8spGRhBvAj6jpEOdu7M7CyQipXpIdAWr6Ht3MiYAlQ4yGtTVVIlXG0iZo6AZtHYunUwozJ0/a+1OwCkpqiPmV/PienUX1zliX3hBeIAs64onPKN1AnXiUqNtpvxI39RhkNaY57CGdiGm26G5u/4ZMJdvUA== 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=I8g2j1DEBPGGaobCBB+WdxuHsbh6N46Zh+l5wnT8WPI=; b=C/vPVg8n7bd1Fr3JX7lXQUPhBFoloVD3PpnoPeza8iStgjun+gC946LNbMAdpY7pK6ROh54wVGLGagj2WpCBpC3rWfApVQ0JNWufLlbe0hQ7maeTyHo67OBwxDQEY5baYTaog6JMuHai+K5QiwWHZcCaXtf7oAV4hrR8R9U6WlW+A5XpW7ttuAXW0jtD3BHUQf/rYf2UDTC+JJpwgYeyCFXSc0sTBjW/8o4xHcEyuzw7vHmHpw4NdBigFh33xraggPE2XdWOfeOBzQNTcDjsF/4fQsWK2AAjibnErXhQp9nzjcpJlKCMp5EQbORxGCXj+CeGBJc3oyIxqW09llgUDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I8g2j1DEBPGGaobCBB+WdxuHsbh6N46Zh+l5wnT8WPI=; b=MpY0pORZi97GzFHul+lMjwH7HKjyE4B9eB3jVmSZGOUf7ensVQFEtcdWkgSG+/FnvIHSDp9elGR7VHgIJZWEa3mzBnAWSzibWUA7S6YIkdG6FPw8SlSQPqalzpmFb/WDjUv/v2i3h/zM7izJkFUfd/baJ64fvm4LkLYSLo+wPvrsmj1idpbwgemuSCa/OntQfQWPo3LdRwBlgBS+XvFNcyfu18ZIY8kSRO2U9pRY5LJhii1xuF66DZQnhg7ohgCLDC9Mm9tuuO4dWrs4OQkFpk/eT3CO46/izjoyyJrRp6CxSkLh2PHRvxTEaRNy0bD3IqvUK2ClL+uoDhIsY2W8FA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3439.eurprd04.prod.outlook.com (2603:10a6:803:4::13) by AS8PR04MB7655.eurprd04.prod.outlook.com (2603:10a6:20b:292::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Mon, 28 Nov 2022 05:49:28 +0000 Received: from VI1PR0402MB3439.eurprd04.prod.outlook.com ([fe80::28d6:1b8:94d9:89f5]) by VI1PR0402MB3439.eurprd04.prod.outlook.com ([fe80::28d6:1b8:94d9:89f5%7]) with mapi id 15.20.5857.023; Mon, 28 Nov 2022 05:49:28 +0000 From: Chester Lin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Jan Petrous , Ondrej Spacek , Ghennadi Procopciuc , Andrew Lunn Cc: Chester Lin , netdev@vger.kernel.org, s32@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Matthias Brugger Subject: [PATCH v2 0/5] Add GMAC support for S32 SoC family Date: Mon, 28 Nov 2022 13:49:15 +0800 Message-Id: <20221128054920.2113-1-clin@suse.com> X-Mailer: git-send-email 2.37.3 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYCP286CA0137.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31b::15) To VI1PR0402MB3439.eurprd04.prod.outlook.com (2603:10a6:803:4::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0402MB3439:EE_|AS8PR04MB7655:EE_ X-MS-Office365-Filtering-Correlation-Id: fb54f2ea-b861-4aee-d3ed-08dad1045020 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aKUPmmD5RQ/H38ZRtf+LOWewRTybgjHSyjpEOn3DzRhWvgTYoTzhQJwGlR73AcNJ0y9zcmX4MkNexwU7bL1mpG7frAMTf/7HWAZ+Lc2mbcLE4+3Bs7scN+2D17x8bxOvBiITvSG9B2rBwcEjOBUBN48uv3DIAEACDF/sCjfIThJi8lfba/hRhxnvRvgA2Ei3FZrQ0Sm7b2t0GYpS1dJP78AlV+kM6NJOF0h1QJxaogOHvXf2YQiKPLLXONXCEPd38nW4Y44xFp+8/do3ul/LaKoX6MA6pQy2q857b6JQWRFqml1pWbWlKGiE53piKwexYobS/PhHKrwMhlVS6jtGfFzde1PHJswuBTyqNCUznF09WXmzQeTmZBry534NxOtIluROi5qRU6vrEAua9+fYoct/+0L330Z0s+1/kI9ofWHFlZaARypJ7BqSnxKZS+aNLValfkWS0eWPSeH6oEi7hLHK/3j+VnGxpoGK8sgRBY5R9DI1fGaGXcQ1EFfWI1kh1QabcB8VUFpduwgMvfzf0CDSBTZsjairKjA3/lcLaSVWUAcZuxpSuULnzYZG6+fW9r4asR781GnAf1WO4bg324NNg/IJkhkArjpDowIKNp33gzYtv/czooA3J0Po17Z0e84Kst6Co38V8o0TkgmSX6sOhtAoDjbb6Vm0WWayfbgpp4jBVAP54YPTGjixmxvIqo8W9/AxwrYyOFWrInE8sA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0402MB3439.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(366004)(346002)(136003)(396003)(376002)(451199015)(2616005)(6506007)(6512007)(36756003)(7416002)(1076003)(186003)(5660300002)(54906003)(86362001)(110136005)(66476007)(8676002)(4326008)(66946007)(66556008)(2906002)(41300700001)(38100700002)(316002)(83380400001)(8936002)(478600001)(6486002)(966005)(66899015)(107886003)(6666004)(921005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?K3S0cg5UkjW/YAOdW5oZRVQKZYLktpln4czq+gVpgQg2Hn1G61ZxDLJWkuhM?= =?us-ascii?Q?YSuHZErwZQqyfcGbZ7hs7PSuk0MbtIaUvP4tLguuaf3+gkwjrqOimqoU03Ny?= =?us-ascii?Q?GePfruxL65hKNb2PnwXL2IFo0dKx/+2w9ReCpgCV1Bkcq6bsHw661pSjNa5U?= =?us-ascii?Q?RcsPT6kqnYM11Del3hVVmTXUat6E1ch8odJoNxvjsKblbo9mawKk7jyPwu0n?= =?us-ascii?Q?g4hVxXISmsShmwRsNFRZTjaAt/cE+WCBXXinacYxUjX6Xlgn0KcTUwgoHPAF?= =?us-ascii?Q?u4UNtNgmsKqaQw1ZHrTFDfXuemKjQxuh57qwc/ssxS2OIogrgTWeLCtr0S3v?= =?us-ascii?Q?n+O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4N?= =?us-ascii?Q?zc2/13L1Q84hgtq8Mw4OFZhDI6BiEA5vPAO/RLgioJNoniBsXnvwA/t5GSF0?= =?us-ascii?Q?cfXi/F37l1vwBb8n0sd62p2ZjsGldRR/GkJw0wSBPt5m1PlVckflEWKZUisL?= =?us-ascii?Q?CY/hKusCwMY8LS6xMubuT87th1Tf+FTgEjLweSRWftOB6Ujja+HLwYqRuIpA?= =?us-ascii?Q?8BF/Qfr7kimXCk3rO0X643R/kgegFNS3DLZ1oalKruNpRy9wysTL/URgGEYY?= =?us-ascii?Q?7pp4Ljk2rxoIIHsUCeVfpGVMicuGW8gxjbG1A8yki/JxJq8hxRhM5wGBgx1m?= =?us-ascii?Q?bbkGJU+OIPS+i8qt1PtfU8mLJNBAAbt9FxX8GOX4kQitroU94k3CbfASx0a/?= =?us-ascii?Q?WY2OdUG1vYSXtvIXrs6JjacnI796qL2+GdqAA5khfRfQ?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb54f2ea-b861-4aee-d3ed-08dad1045020 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3439.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2022 05:49:28.4030 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cMLEqk8y5Su4XLZjYViyA7cS0aipEFlmmRlpPRCFwZD4aZ77KK9pj4rlBdky0hjv X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7655 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 Hello, Here I want to introduce a new patch series, which aims to support GMAC functions on S32 SoCs, such as S32G2. This series is originally from NXP's implementation on CodeAurora[1] and it will be required by upstream kernel to configure platform settings at the DWMAC glue layer before activating the DWMAC core on different S32G boards. In this patchset I also introduce more register fields needed by S32 SoCs, such as higher CSR clock ranges and cache coherency settings. For more information please see NXP's GMACSUBSYS Reference Manual[2]. Currently, the whole architecture relies on FDTs offered by ATF[3] on CodeAurora to keep the flexibility of handling multiple S32 platforms since now S32 clks can be triggered via the ARM SCMI clock protocol and clk IDs/ settings can vary according to different board designs. To ensure that the driver can work properly, the dt-binding schemas in this patchset is still required as a reference. Thanks, Chester Changes in v2: - Fix schema issues. - Add minItems to clocks & clock-names. - Replace all sgmii/SGMII terms with pcs/PCS. - clock-names: tx_sgmii -> tx_pcs, rx_sgmii -> rx_pcs - Adjust error handlings while calling devm_clk_get(). - Remove redundant dev_info messages. - Remove unnecessary if conditions. - Fix the copyright format suggested by NXP. [1] https://source.codeaurora.org/external/autobsps32/linux/tree/drivers/net/ethernet/stmicro/stmmac?h=bsp34.0-5.10.120-rt [2] https://www.nxp.com/webapp/Download?colCode=GMACSUBSYSRM [3] https://source.codeaurora.org/external/autobsps32/arm-trusted-firmware/tag/?h=bsp34.0-2.5 Chester Lin (5): dt-bindings: net: snps, dwmac: add NXP S32CC support dt-bindings: net: add schema for NXP S32CC dwmac glue driver net: stmmac: Add CSR clock 500Mhz/800Mhz support net: stmmac: Add AXI4 ACE control support net: stmmac: Add NXP S32 SoC family support .../bindings/net/nxp,s32cc-dwmac.yaml | 135 ++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 5 +- drivers/net/ethernet/stmicro/stmmac/Kconfig | 13 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/common.h | 2 + .../net/ethernet/stmicro/stmmac/dwmac-s32cc.c | 304 ++++++++++++++++++ .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 10 + .../net/ethernet/stmicro/stmmac/dwmac4_dma.h | 4 +- drivers/net/ethernet/stmicro/stmmac/hwif.h | 5 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 7 + include/linux/stmmac.h | 9 + 11 files changed, 492 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c -- 2.37.3