Message ID | 20221031101052.14956-3-clin@suse.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2223451wru; Mon, 31 Oct 2022 03:13:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ehzmpbFEI8TpreABBl5lq32N441YcokJ7I28R8rj8GIGE2fiSHzRH68jmZkhySRszYHkG X-Received: by 2002:a17:906:8a6a:b0:79e:2efe:e0 with SMTP id hy10-20020a1709068a6a00b0079e2efe00e0mr12411735ejc.401.1667211193668; Mon, 31 Oct 2022 03:13:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667211193; cv=pass; d=google.com; s=arc-20160816; b=du2MuPZENRWxW+Z/zu6rmDozZDfdCDHIjgVHpUrIraT5AmzV5LlDftLhaC0eWkzFze /WTOTOYIeYlvaZgNcbG7rAGNqpG92/b5vd3oGziFS9e8raf0Ki00Bedksm4rasL2WwrJ jitqY+1GXirwnjJoco8D0SAZEmxMwHo1zhEVIZcHqUdzacYqkh76o190MTQr9YuriL3H MHHxTr2WkeX705iPaaIKvN0c9Nqu4mUEl4Vm5GDDn8R+m5q2r22HentMpjOO25rN9MMn Lz/RykKcAzSRvaBG2plSYNViAvk6WcwfQz2zAMLZuEtFofeDhGgoXFOm+0nXkgv+HVwS 9o0A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Zn2ro5pLzd/AgGErCLQjExxP3xd0AXsaLXFhRxpZhWE=; b=hqmRHD92EGwWaaEdlElupkQccOlUY/ZL4QTQTsohQBSZ3BjS8OSwT5FnBf0iVpavGk BEnjXYHcN42fF4wj4WNFa53urk3XARNamzXAOL6hsJR3GMnKb6sYUUtM+ZWRIPi9RiMk LFZ2lzEBI6GkFKS9Qzir9H07hM96tj5qaszVV3yjyxZtIGMRyws/FhxO9y3e5MTDlvCa Y4Al2ze8LiWNETRvlb5JVvZn8b6ikk4WDS0QvFt6lvcZJV4HCbPFqf7DTvIS21soN9IT dtvCr0OujaBb9yA6s3ks69DQyWEUedYHGJInlvuY0N3hXFKZ/NTw41xxHEkkf8X2SWYU CPrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=selector1 header.b=mcC9BPoE; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020a1709065d1000b007adadfc97c7si6335358ejt.918.2022.10.31.03.12.47; Mon, 31 Oct 2022 03:13:13 -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=@suse.com header.s=selector1 header.b=mcC9BPoE; 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 S230348AbiJaKLl (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Mon, 31 Oct 2022 06:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230397AbiJaKLf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 31 Oct 2022 06:11:35 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2087.outbound.protection.outlook.com [40.107.104.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3EF2DF7A; Mon, 31 Oct 2022 03:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qididk6yo9AiDPTB3pWZVYm9oRqsHj3o1mWOPx8XpWUC+4XHPEBDC10sVaX2j2GYO9vBrxe9hiIm6ZRlxCXu9DvW2ZmulGiexp7vcDeggb0jEzfhJkuRytoDeHSYc40LVOZ01ObpStlqbWXhSHfDCHE8P6FRWQ9uDtuR1JxS7d8wFHeaXXL4+tSIeFseKqWN5eebWXWcXd91hozOUnUcuu8PtfAaQlcx+3Ro4qjnQHUJMADdUevl4byYwel8sSFkmaFKqLcm94/eMxqR/JfanDHk0GvN95ELgRrr79/Row+iTuqSLBkwoqU81fqfClpyxsbNVI9rsvmh6ThiBQnXfw== 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=Zn2ro5pLzd/AgGErCLQjExxP3xd0AXsaLXFhRxpZhWE=; b=oPP8h/0p1zLxPzqKkAOu4hs13B1oXiJht44Ofvv7EcZSypNmP2yw6bNjkwxoIYubU4dpOG88HMyLGkjFQQLS8X9JgBMpUwQkGrjvaK5aaIqAiUtaVm3d7Fi/ug1znq8eoWI156R+w0RmQdeQ0A1CN2VCRJvYoI/limhhytraJqlPxCOhO0TOrTi5k19wbqTzPKA7Yr5CFRwmlfN5EiZj6Mj3TzSUtexN8T0FAOp6SOgWVq46FVF8M9GK9t981AH87ymg/EZ6TUgmGzoerr7qmVtSl1kD6SdHOxPbC3KYxDHHZ1gqTjfnEvCOktJ15LJOiPN+60tKI3LSe1igKYHPcw== 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=Zn2ro5pLzd/AgGErCLQjExxP3xd0AXsaLXFhRxpZhWE=; b=mcC9BPoEdKLfpDn/qipYEwwDK3p0EULJw2/CjDF60JiXPysMKaMHGv8tp90I7RZa5tTenMn/XBbEns4Ngfd1NqEBbHyI33ATRtoF5llgKwPdl8IKDnYcUnGIQUmXqvBpXO9rvdeHftSeQd/LMUWKn2LbAd0C1Zu+7DyTkqZqYz7aRSg5OwTz8i2o3xa85ocKrP1P2UgrS4n8AvP6E1H4Q+Sjk5ZMISoJueyRYMTCpuTTQEv39RIa7p0xcE7he76vgaNn6O79sBqH082t52rC0w1clExSzRvMSW8BeqCRJP2/cchqUreuMhk7W1E/LVasJcvT0+vS02eJE/p6bWMyFQ== 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 VE1PR04MB7261.eurprd04.prod.outlook.com (2603:10a6:800:1a3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Mon, 31 Oct 2022 10:11:28 +0000 Received: from VI1PR0402MB3439.eurprd04.prod.outlook.com ([fe80::41c4:5b70:6fec:a963]) by VI1PR0402MB3439.eurprd04.prod.outlook.com ([fe80::41c4:5b70:6fec:a963%7]) with mapi id 15.20.5746.028; Mon, 31 Oct 2022 10:11:28 +0000 From: Chester Lin <clin@suse.com> To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Jan Petrous <jan.petrous@nxp.com> Cc: Chester Lin <clin@suse.com>, 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_F=C3=A4rber?= <afaerber@suse.de>, Matthias Brugger <mbrugger@suse.com> Subject: [PATCH 2/5] dt-bindings: net: add schema for NXP S32CC dwmac glue driver Date: Mon, 31 Oct 2022 18:10:49 +0800 Message-Id: <20221031101052.14956-3-clin@suse.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221031101052.14956-1-clin@suse.com> References: <20221031101052.14956-1-clin@suse.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYAPR01CA0214.jpnprd01.prod.outlook.com (2603:1096:404:29::34) To VI1PR0402MB3439.eurprd04.prod.outlook.com (2603:10a6:803:4::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0402MB3439:EE_|VE1PR04MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 0094a077-81af-4d5f-b6a6-08dabb28467a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7QrfLYy7NyiSe6ygjSnLT4oUUWVbrED0gs/GiLE4vMdD6NCg79N9GU4cyIfUNb448NYQZXzbSOuL7ZmILNH6h68clGCj7zne2GDZCwTbJDjPdRhFcee/fm/fdAtWCmYP8Mos4MeJCY6REsSNf80gV7CW1QZURJpzfbsvjL4JWivUK5w3aZ7+8MZMVvXaYMlWILZqXK0EtpBiARLWVh9g7ZS1yJQ4hPNNXRKV5cd7lia+I0d6HEAVnFIwuzO4HDYIX4F8YPrNFx+HA/GbSNMNRjy3Dyq2vIJZk6l3h1ffWe0TE+8QM7RxrMMHap5QYdDJEw0iWeepxY47jVXKx6JuE4y7QFGwBw8B56sqGb6ERoTxi+LLkgg2A2cvR8/5JWKGMZlnDRat4Lku3F7Hs4DW/qkH92Q+GAMp2MJZh17Ig0ZzPEKePk9lbcT9DYTxjhveRapa4ggod7zo9ekynVZu8ktEpf3+l7v+8CpE/8TE6GDhK7KE1RDdx14d009e5+jeYxTmDoP3DJPxvzlo4eDhC4Pj3x43EmWGVGoDJJGEa098PJrYArNe0p/pAiqZ6y9QQBjZ/CrRlSwj54yqp76CzTcTSI/mInXVGvTflM52wMJDZ5XMwsKiFpGllILToBgO4O4zpV/1EeLO5L0/DbAhgyVzCjlro/3YQPxuSzBqQ4tkBD58gGYpiOSk/ednoASBPOcDPcwwiqVQnb0GfP8XorZHtSHrLT7qFhurlzjrzEM= 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)(136003)(396003)(39850400004)(376002)(366004)(346002)(451199015)(6486002)(107886003)(478600001)(110136005)(54906003)(316002)(6666004)(86362001)(8676002)(6506007)(4326008)(66476007)(66946007)(66556008)(2906002)(26005)(38100700002)(41300700001)(6512007)(2616005)(186003)(1076003)(83380400001)(8936002)(36756003)(7416002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WtrLQMznBhE4C7xMc2WcjeyAwn2m+XGYwQ1lDLusqV1TTpEOxv5Rbyau6FamaD452Gna2tb0+xJnhl0VD2x+/1dQBnjTLoqTtzPlRNynbJJIuq36gMW1iz+CdsdTdda9L5Q2KEalfBzVNYVwkkwob9r2kn+rDwuFT4MoGgTJDQazis0IaHp2TcFyr4CpwLUjYLDQ1Jsri9qvRr8+wcnqNiaGp/H+sGWqIwQMiXVr/jR0ZH3TEyukq0cIMKhgoGY72hNj+DjomPktKMBQTgucBMtcjsx27DpRof79fjiUT/+/rYB77tJx+WXO+Ic4X4N2fyV1QEnh1yNXJ7fK61dFLMTG7jxZmQCwfLbhFrO9RirvPsaJh1I+zwNK4cIHoGfS0iTG5wVwRWYbBJPbKqZYvwLT3WROPIPUuTkqFBwcuW4RUfPh4QL2Q/zifGITzaG6KmKUPEZYNYfQaok7/9fjFd6CUuEF8PYCI3WPE7tnSKJKPy+7rcMxnDbH6wAfcmU3nhFW12aOR6AYOW+edvBC7OHeQA1K4y1dp3h3DjKlNk5uXPcvHfjngRgLNntmMcyiKLJwco+bXPf0lqfc0iJ1BvcDu7/GxtaxHbhYNTl480hjj/6++1yJXcNpgYkmjbZUKBUMYjsnaeEpoR5FQuwfKmIuD34up5x9YIiyrDTIAHTlpbrTfEmFjKh15FDA3ccbw9Ur3tGc0t6iwoJt1VtjWXw7v2pnNMN2jNSyuhDQJcbBrttisD1NHAxREFi1UtRgV7PDMVjfM+KPJ9Bptsg4TdNy68fMVC4N2J8jS/df8EoH3pB/bp8bivV15DWgJW32EYZc68zc4Jetp0Y37/ayf5WNmL9f4Snp+iNAxTQTETPWUPWYyD/tY1cx7MsY3kgBTvUcpOST77NLs1+Sv3ZhIVH6O95XrPP3O7wBzhcKLKGjit7SCGH1mXqotu3vokXN8RwLqZWTSz4UoA4q10bAxr+YEUcDeCuPDdE58MW6SCosJbon8bf9fFG1FBbDvBAZ1vkmDyne+y0Dwn8yZn0Q37A7urRJ/TocKZYjQh3FizXOtC6mfJe0jn1axVf1h8lIKk0p788ZP/xrzNc7C5hzgOBBpzWhOzjsk31S3hhNWHalsdjr+c+5IXB8wRc/XGWm0fGAiCp0K15IQva5pYGeoQ18sT/vBrHXKKgs41yignoYH56rtqDKxnhsMP9H6MaIWNGB8xAFwBYqWmc8NTKn9Mw/aiIkndC6xnPme+FNw2TdbvjaaIqjUZnl6Xy7swjFSGdNPRi+gGW9ALXfK49XAudveaQ03ZXo0ItS1J4iasKQiO6HlpMlwBWSwbeat4dc0oMCMsNrLTjebSVFrf7zQtPhvH4Dy8MIRxg2Y+4h2RNUANiC/BnDZNDNVrZEMTdSomMtPgArYD/ypYOzMGj1Xk8XbmoOSPsLuTNINB39m+pTdHSYM9rhudCYrs/fddaB0NvZ1rQQZoAftEQwKgkrUqZ8Q3ZO2MHJPvN2GYCmI4ojmq9tC7DKZGgho6qahpZocsXOFOz0QIPuXBQ6kmip+u/Sb9FiWcym3y9ICbkNvEc= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0094a077-81af-4d5f-b6a6-08dabb28467a X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3439.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2022 10:11:28.3442 (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: 6O3TGAn7HknYPrF7820NIs5vXYk/qw406ccS+oxgznPYImmIY7rDgFGNU12LkDx9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7261 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_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748197644574012494?= X-GMAIL-MSGID: =?utf-8?q?1748197644574012494?= |
Series |
Add GMAC support for S32 SoC family
|
|
Commit Message
Chester Lin
Oct. 31, 2022, 10:10 a.m. UTC
Add the DT schema for the DWMAC Ethernet controller on NXP S32 Common Chassis. Signed-off-by: Jan Petrous <jan.petrous@nxp.com> Signed-off-by: Chester Lin <clin@suse.com> --- .../bindings/net/nxp,s32cc-dwmac.yaml | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml
Comments
On Mon, Oct 31, 2022 at 06:10:49PM +0800, Chester Lin wrote: > Add the DT schema for the DWMAC Ethernet controller on NXP S32 Common > Chassis. > > Signed-off-by: Jan Petrous <jan.petrous@nxp.com> > Signed-off-by: Chester Lin <clin@suse.com> > --- > .../bindings/net/nxp,s32cc-dwmac.yaml | 145 ++++++++++++++++++ > 1 file changed, 145 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > > diff --git a/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > new file mode 100644 > index 000000000000..f6b8486f9d42 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > @@ -0,0 +1,145 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright 2021-2022 NXP > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/net/nxp,s32cc-dwmac.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: NXP S32CC DWMAC Ethernet controller > + > +maintainers: > + - Jan Petrous <jan.petrous@nxp.com> > + - Chester Lin <clin@suse.com> > + > +select: Don't need this. > + properties: > + compatible: > + contains: > + enum: > + - nxp,s32cc-dwmac > + required: > + - compatible > + > +allOf: > + - $ref: "snps,dwmac.yaml#" > + > +properties: > + compatible: > + contains: Drop 'contains'. > + enum: > + - nxp,s32cc-dwmac > + > + reg: > + items: > + - description: Main GMAC registers > + - description: S32 MAC control registers > + > + dma-coherent: > + description: > + Declares GMAC device as DMA coherent Don't need a generic description. Just 'true' is enough. > + > + clocks: > + items: > + - description: Main GMAC clock > + - description: Peripheral registers clock > + - description: Transmit SGMII clock > + - description: Transmit RGMII clock > + - description: Transmit RMII clock > + - description: Transmit MII clock > + - description: Receive SGMII clock > + - description: Receive RGMII clock > + - description: Receive RMII clock > + - description: Receive MII clock > + - description: > + PTP reference clock. This clock is used for programming the > + Timestamp Addend Register. If not passed then the system > + clock will be used. If optional, then you need 'minItems'. > + > + clock-names: > + items: > + - const: stmmaceth > + - const: pclk > + - const: tx_sgmii > + - const: tx_rgmii > + - const: tx_rmii > + - const: tx_mii > + - const: rx_sgmii > + - const: rx_rgmii > + - const: rx_rmii > + - const: rx_mii > + - const: ptp_ref > + > + tx-fifo-depth: > + const: 20480 > + > + rx-fifo-depth: > + const: 20480 > + > +required: > + - compatible > + - reg > + - tx-fifo-depth > + - rx-fifo-depth > + - clocks > + - clock-names > + > +additionalProperties: true 'true' is only allowed for common, incomplete schemas. Should be: unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + > + #define S32GEN1_SCMI_CLK_GMAC0_AXI > + #define S32GEN1_SCMI_CLK_GMAC0_TX_SGMII > + #define S32GEN1_SCMI_CLK_GMAC0_TX_RGMII > + #define S32GEN1_SCMI_CLK_GMAC0_TX_RMII > + #define S32GEN1_SCMI_CLK_GMAC0_TX_MII > + #define S32GEN1_SCMI_CLK_GMAC0_RX_SGMII > + #define S32GEN1_SCMI_CLK_GMAC0_RX_RGMII > + #define S32GEN1_SCMI_CLK_GMAC0_RX_RMII > + #define S32GEN1_SCMI_CLK_GMAC0_RX_MII > + #define S32GEN1_SCMI_CLK_GMAC0_TS > + > + soc { > + #address-cells = <1>; > + #size-cells = <1>; > + > + gmac0: ethernet@4033c000 { > + compatible = "nxp,s32cc-dwmac"; > + reg = <0x4033c000 0x2000>, /* gmac IP */ > + <0x4007C004 0x4>; /* S32 CTRL_STS reg */ > + interrupt-parent = <&gic>; > + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "macirq"; > + phy-mode = "rgmii-id"; > + tx-fifo-depth = <20480>; > + rx-fifo-depth = <20480>; > + dma-coherent; > + clocks = <&clks S32GEN1_SCMI_CLK_GMAC0_AXI>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_AXI>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_TX_SGMII>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_TX_RGMII>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_TX_RMII>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_TX_MII>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_RX_SGMII>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_RX_RGMII>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_RX_RMII>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_RX_MII>, > + <&clks S32GEN1_SCMI_CLK_GMAC0_TS>; > + clock-names = "stmmaceth", "pclk", > + "tx_sgmii", "tx_rgmii", "tx_rmii", "tx_mii", > + "rx_sgmii", "rx_rgmii", "rx_rmii", "rx_mii", > + "ptp_ref"; > + > + gmac0_mdio: mdio { > + #address-cells = <1>; > + #size-cells = <0>; > + compatible = "snps,dwmac-mdio"; > + > + ethernet-phy@4 { > + reg = <0x04>; > + }; > + }; > + }; > + }; > -- > 2.37.3 > >
Hi Rob, On 02.11.22 16:55, Rob Herring wrote: > On Mon, Oct 31, 2022 at 06:10:49PM +0800, Chester Lin wrote: >> Add the DT schema for the DWMAC Ethernet controller on NXP S32 Common >> Chassis. >> >> Signed-off-by: Jan Petrous <jan.petrous@nxp.com> >> Signed-off-by: Chester Lin <clin@suse.com> >> --- >> .../bindings/net/nxp,s32cc-dwmac.yaml | 145 ++++++++++++++++++ >> 1 file changed, 145 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml >> >> diff --git a/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml >> new file mode 100644 >> index 000000000000..f6b8486f9d42 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml >> @@ -0,0 +1,145 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +# Copyright 2021-2022 NXP >> +%YAML 1.2 >> +--- >> +$id: "http://devicetree.org/schemas/net/nxp,s32cc-dwmac.yaml#" >> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >> + >> +title: NXP S32CC DWMAC Ethernet controller >> + >> +maintainers: >> + - Jan Petrous <jan.petrous@nxp.com> >> + - Chester Lin <clin@suse.com> [...] >> +properties: >> + compatible: >> + contains: > > Drop 'contains'. > >> + enum: >> + - nxp,s32cc-dwmac In the past you were adamant that we use concrete SoC-specific strings. Here that would mean s32g2 or s32g274 instead of s32cc (which aims to share with S32G3 IIUC). [...] >> + clocks: >> + items: >> + - description: Main GMAC clock >> + - description: Peripheral registers clock >> + - description: Transmit SGMII clock >> + - description: Transmit RGMII clock >> + - description: Transmit RMII clock >> + - description: Transmit MII clock >> + - description: Receive SGMII clock >> + - description: Receive RGMII clock >> + - description: Receive RMII clock >> + - description: Receive MII clock >> + - description: >> + PTP reference clock. This clock is used for programming the >> + Timestamp Addend Register. If not passed then the system >> + clock will be used. > > If optional, then you need 'minItems'. [snip] Do we have any precedence of bindings with *MII clocks like these? AFAIU the reason there are so many here is that there are in fact physically just five, but different parent clock configurations that SCMI does not currently expose to Linux. Thus I was raising that we may want to extend the SCMI protocol with some SET_PARENT operation that could allow us to use less input clocks here, but obviously such a standardization process will take time... What are your thoughts on how to best handle this here? Not clear to me has been whether the PHY mode can be switched at runtime (like DPAA2 on Layerscape allows for SFPs) or whether this is fixed by board design. If the latter, the two out of six SCMI IDs could get selected in TF-A, to have only physical clocks here in the binding. Regards, Andreas
On Wed, Nov 02, 2022 at 06:13:35PM +0100, Andreas Färber wrote: > Hi Rob, > > On 02.11.22 16:55, Rob Herring wrote: > > On Mon, Oct 31, 2022 at 06:10:49PM +0800, Chester Lin wrote: > > > Add the DT schema for the DWMAC Ethernet controller on NXP S32 Common > > > Chassis. > > > > > > Signed-off-by: Jan Petrous <jan.petrous@nxp.com> > > > Signed-off-by: Chester Lin <clin@suse.com> > > > --- > > > .../bindings/net/nxp,s32cc-dwmac.yaml | 145 ++++++++++++++++++ > > > 1 file changed, 145 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > > > new file mode 100644 > > > index 000000000000..f6b8486f9d42 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > > > @@ -0,0 +1,145 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +# Copyright 2021-2022 NXP > > > +%YAML 1.2 > > > +--- > > > +$id: "http://devicetree.org/schemas/net/nxp,s32cc-dwmac.yaml#" > > > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > > > + > > > +title: NXP S32CC DWMAC Ethernet controller > > > + > > > +maintainers: > > > + - Jan Petrous <jan.petrous@nxp.com> > > > + - Chester Lin <clin@suse.com> > [...] > > > +properties: > > > + compatible: > > > + contains: > > > > Drop 'contains'. > > > > > + enum: > > > + - nxp,s32cc-dwmac > > In the past you were adamant that we use concrete SoC-specific strings. Here > that would mean s32g2 or s32g274 instead of s32cc (which aims to share with > S32G3 IIUC). Yes they should be SoC specific. Really, 1 per maskset or die is fine if that level of detail is known. No need for different compatibles for different part numbers created by fused off features or package pinout differences. > [...] > > > + clocks: > > > + items: > > > + - description: Main GMAC clock > > > + - description: Peripheral registers clock > > > + - description: Transmit SGMII clock > > > + - description: Transmit RGMII clock > > > + - description: Transmit RMII clock > > > + - description: Transmit MII clock > > > + - description: Receive SGMII clock > > > + - description: Receive RGMII clock > > > + - description: Receive RMII clock > > > + - description: Receive MII clock > > > + - description: > > > + PTP reference clock. This clock is used for programming the > > > + Timestamp Addend Register. If not passed then the system > > > + clock will be used. > > > > If optional, then you need 'minItems'. > [snip] > > Do we have any precedence of bindings with *MII clocks like these? Don't know... > AFAIU the reason there are so many here is that there are in fact physically > just five, but different parent clock configurations that SCMI does not > currently expose to Linux. Thus I was raising that we may want to extend the > SCMI protocol with some SET_PARENT operation that could allow us to use less > input clocks here, but obviously such a standardization process will take > time... > > What are your thoughts on how to best handle this here? Perhaps use assigned-clocks if it is static for a board. > Not clear to me has been whether the PHY mode can be switched at runtime > (like DPAA2 on Layerscape allows for SFPs) or whether this is fixed by board > design. If the latter, the two out of six SCMI IDs could get selected in > TF-A, to have only physical clocks here in the binding. > > Regards, > Andreas
> > > + - description: Main GMAC clock > > > + - description: Peripheral registers clock > > > + - description: Transmit SGMII clock > > > + - description: Transmit RGMII clock > > > + - description: Transmit RMII clock > > > + - description: Transmit MII clock > > > + - description: Receive SGMII clock > > > + - description: Receive RGMII clock > > > + - description: Receive RMII clock > > > + - description: Receive MII clock > > > + - description: > > > + PTP reference clock. This clock is used for programming the > > > + Timestamp Addend Register. If not passed then the system > > > + clock will be used. > Not clear to me has been whether the PHY mode can be switched at runtime > (like DPAA2 on Layerscape allows for SFPs) or whether this is fixed by board > design. Does the hardware support 1000BaseX? Often the hardware implementing SGMII can also do 1000BaseX, since SGMII is an extended/hacked up 1000BaseX. If you have an SFP connected to the SERDES, a fibre module will want 1000BaseX and a copper module will want SGMII. phylink will tell you what phy-mode you need to use depending on what module is in the socket. This however might be a mute point, since both of these are probably using the SGMII clocks. Of the other MII modes listed, it is very unlikely a runtime swap will occur. Andrew
Hi Rob and Andreas, On Wed, Nov 02, 2022 at 04:44:56PM -0500, Rob Herring wrote: > On Wed, Nov 02, 2022 at 06:13:35PM +0100, Andreas Färber wrote: > > Hi Rob, > > > > On 02.11.22 16:55, Rob Herring wrote: > > > On Mon, Oct 31, 2022 at 06:10:49PM +0800, Chester Lin wrote: > > > > Add the DT schema for the DWMAC Ethernet controller on NXP S32 Common > > > > Chassis. > > > > > > > > Signed-off-by: Jan Petrous <jan.petrous@nxp.com> > > > > Signed-off-by: Chester Lin <clin@suse.com> > > > > --- > > > > .../bindings/net/nxp,s32cc-dwmac.yaml | 145 ++++++++++++++++++ > > > > 1 file changed, 145 insertions(+) > > > > create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > > > > > > > > diff --git a/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > > > > new file mode 100644 > > > > index 000000000000..f6b8486f9d42 > > > > --- /dev/null > > > > +++ b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > > > > @@ -0,0 +1,145 @@ > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > +# Copyright 2021-2022 NXP > > > > +%YAML 1.2 > > > > +--- > > > > +$id: "http://devicetree.org/schemas/net/nxp,s32cc-dwmac.yaml#" > > > > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > > > > + > > > > +title: NXP S32CC DWMAC Ethernet controller > > > > + > > > > +maintainers: > > > > + - Jan Petrous <jan.petrous@nxp.com> > > > > + - Chester Lin <clin@suse.com> > > [...] > > > > +properties: > > > > + compatible: > > > > + contains: > > > > > > Drop 'contains'. > > > > > > > + enum: > > > > + - nxp,s32cc-dwmac > > > > In the past you were adamant that we use concrete SoC-specific strings. Here > > that would mean s32g2 or s32g274 instead of s32cc (which aims to share with > > S32G3 IIUC). > > Yes they should be SoC specific. Really, 1 per maskset or die is fine if > that level of detail is known. No need for different compatibles for > different part numbers created by fused off features or package pinout > differences. > If I understand correctly from NXP, the GMAC0 belongs to a common hardware sub-architecture called "S32 Common Chassis", which is a common IP set applied in many S32 SoC series, such as S32G2/G3 and S32R45. Therefore this binding is not specifically for S32G2 but it supports all S32 SoC series who adopt S32CC sub-arch if they could all be upstreamed in the future. Logically S32G2 and S32R45 have the same subset *S32CC* but it doesn't mean that S32G2 and S32R45 are derived from each other. Regards, Chester > > [...] > > > > + clocks: > > > > + items: > > > > + - description: Main GMAC clock > > > > + - description: Peripheral registers clock > > > > + - description: Transmit SGMII clock > > > > + - description: Transmit RGMII clock > > > > + - description: Transmit RMII clock > > > > + - description: Transmit MII clock > > > > + - description: Receive SGMII clock > > > > + - description: Receive RGMII clock > > > > + - description: Receive RMII clock > > > > + - description: Receive MII clock > > > > + - description: > > > > + PTP reference clock. This clock is used for programming the > > > > + Timestamp Addend Register. If not passed then the system > > > > + clock will be used. > > > > > > If optional, then you need 'minItems'. > > [snip] > > > > Do we have any precedence of bindings with *MII clocks like these? > > Don't know... > > > AFAIU the reason there are so many here is that there are in fact physically > > just five, but different parent clock configurations that SCMI does not > > currently expose to Linux. Thus I was raising that we may want to extend the > > SCMI protocol with some SET_PARENT operation that could allow us to use less > > input clocks here, but obviously such a standardization process will take > > time... > > > > What are your thoughts on how to best handle this here? > > Perhaps use assigned-clocks if it is static for a board. > > > Not clear to me has been whether the PHY mode can be switched at runtime > > (like DPAA2 on Layerscape allows for SFPs) or whether this is fixed by board > > design. If the latter, the two out of six SCMI IDs could get selected in > > TF-A, to have only physical clocks here in the binding. > > > > Regards, > > Andreas
Hi Andrew and Andreas, On Thu, Nov 03, 2022 at 11:05:30PM +0100, Andrew Lunn wrote: > > > > + - description: Main GMAC clock > > > > + - description: Peripheral registers clock > > > > + - description: Transmit SGMII clock > > > > + - description: Transmit RGMII clock > > > > + - description: Transmit RMII clock > > > > + - description: Transmit MII clock > > > > + - description: Receive SGMII clock > > > > + - description: Receive RGMII clock > > > > + - description: Receive RMII clock > > > > + - description: Receive MII clock > > > > + - description: > > > > + PTP reference clock. This clock is used for programming the > > > > + Timestamp Addend Register. If not passed then the system > > > > + clock will be used. > > > Not clear to me has been whether the PHY mode can be switched at runtime > > (like DPAA2 on Layerscape allows for SFPs) or whether this is fixed by board > > design. > > Does the hardware support 1000BaseX? Often the hardware implementing > SGMII can also do 1000BaseX, since SGMII is an extended/hacked up > 1000BaseX. > > If you have an SFP connected to the SERDES, a fibre module will want > 1000BaseX and a copper module will want SGMII. phylink will tell you > what phy-mode you need to use depending on what module is in the > socket. This however might be a mute point, since both of these are > probably using the SGMII clocks. > > Of the other MII modes listed, it is very unlikely a runtime swap will > occur. > > Andrew Here I just focus on GMAC since there are other LAN interfaces that S32 family uses [e.g. PFE]. According to the public GMACSUBSYS ref manual rev2[1] provided on NXP website, theoretically GMAC can run SGMII in 1000Mbps and 2500Mbps so I assume that supporting 1000BASE-X could be achievable. I'm not sure if any S32 board variant might have SFP ports but RJ-45 [1000BASE-T] should be the major type used on S32G-EVB and S32G-RDB2. @NXP, please feel free to correct me if anything wrong. Thanks, Chester [1] https://www.nxp.com/webapp/Download?colCode=GMACSUBSYSRM -> Membership subscription is required although it's free IIRC.
> Here I just focus on GMAC since there are other LAN interfaces that S32 family > uses [e.g. PFE]. According to the public GMACSUBSYS ref manual rev2[1] provided > on NXP website, theoretically GMAC can run SGMII in 1000Mbps and 2500Mbps so I > assume that supporting 1000BASE-X could be achievable. I'm not sure if any S32 > board variant might have SFP ports but RJ-45 [1000BASE-T] should be the major > type used on S32G-EVB and S32G-RDB2. SGMII at 2500Mbps does not exist. Lots of people get this wrong. It will be 2500Base-X. Does the clock need to change in order to support 2500Base-X? If i understand you correctly, Linux does not control the clocks, and so cannot change the clocks? So that probably means you cannot actually support 2500Base-X? Once you have Linux actually controlling the hardware, you can then make use of an SFP or a copper PHY which supports 2.5G. The PHY will swap its host side between SGMII and 2500Base-X depending on what the line side negotiates, 1000Base-T or 2500Base-T. The MAC driver then needs to change its configuration to suite. Andrew
Hi Andrew, On Fri, Nov 04, 2022 at 02:30:11PM +0100, Andrew Lunn wrote: > > Here I just focus on GMAC since there are other LAN interfaces that S32 family > > uses [e.g. PFE]. According to the public GMACSUBSYS ref manual rev2[1] provided > > on NXP website, theoretically GMAC can run SGMII in 1000Mbps and 2500Mbps so I > > assume that supporting 1000BASE-X could be achievable. I'm not sure if any S32 > > board variant might have SFP ports but RJ-45 [1000BASE-T] should be the major > > type used on S32G-EVB and S32G-RDB2. > > SGMII at 2500Mbps does not exist. Lots of people get this wrong. It > will be 2500Base-X. > Thanks for your correction. > Does the clock need to change in order to support 2500Base-X? If i Since I'm not a hardware designer from NXP and I can't find any board that S32G2 CPUs could integrate SFP, so I am not able to tell how the clock could be configured while supporting 2500Base-X. > understand you correctly, Linux does not control the clocks, and so > cannot change the clocks? So that probably means you cannot actually To be more precise, the SCMI clock protocol in ATF [ARM Trusted Firmware] doesn't design any interface to get/set parents of a clock so that re-parenting clocks via the SCMI clk driver [clk-scmi.c] in Linux Kernel is impossible for this case. That means, if any board design allows run-time swap on different phys, the dedicated clks which represent each phy-mode are required in order to trigger clock re-parenting in ATF since different phy connections would need different clock sources. > support 2500Base-X? Once you have Linux actually controlling the > hardware, you can then make use of an SFP or a copper PHY which > supports 2.5G. The PHY will swap its host side between SGMII and > 2500Base-X depending on what the line side negotiates, 1000Base-T or > 2500Base-T. The MAC driver then needs to change its configuration to > suite. > > Andrew
Hi Chester, > Hi Andrew and Andreas, > > On Thu, Nov 03, 2022 at 11:05:30PM +0100, Andrew Lunn wrote: > > > > > + - description: Main GMAC clock > > > > > + - description: Peripheral registers clock > > > > > + - description: Transmit SGMII clock > > > > > + - description: Transmit RGMII clock > > > > > + - description: Transmit RMII clock > > > > > + - description: Transmit MII clock > > > > > + - description: Receive SGMII clock > > > > > + - description: Receive RGMII clock > > > > > + - description: Receive RMII clock > > > > > + - description: Receive MII clock > > > > > + - description: > > > > > + PTP reference clock. This clock is used for programming the > > > > > + Timestamp Addend Register. If not passed then the system > > > > > + clock will be used. > > > > > Not clear to me has been whether the PHY mode can be switched at > runtime > > > (like DPAA2 on Layerscape allows for SFPs) or whether this is fixed by > board > > > design. > > > > Does the hardware support 1000BaseX? Often the hardware implementing > > SGMII can also do 1000BaseX, since SGMII is an extended/hacked up > > 1000BaseX. > > > > If you have an SFP connected to the SERDES, a fibre module will want > > 1000BaseX and a copper module will want SGMII. phylink will tell you > > what phy-mode you need to use depending on what module is in the > > socket. This however might be a mute point, since both of these are > > probably using the SGMII clocks. > > > > Of the other MII modes listed, it is very unlikely a runtime swap will > > occur. > > > > Andrew > > Here I just focus on GMAC since there are other LAN interfaces that S32 > family > uses [e.g. PFE]. According to the public GMACSUBSYS ref manual rev2[1] > provided > on NXP website, theoretically GMAC can run SGMII in 1000Mbps and > 2500Mbps so I > assume that supporting 1000BASE-X could be achievable. I'm not sure if any > S32 > board variant might have SFP ports but RJ-45 [1000BASE-T] should be the > major > type used on S32G-EVB and S32G-RDB2. > > @NXP, please feel free to correct me if anything wrong. > NXP eval boards (EVB or RDB) have also 2.5G PHYs, so together with SerDes driver we support 100M/1G/2.5G on such copper PHYs. /Jan -- NXP Czechia, AP Ethernet
Hi Andreas, > Hi Rob, > > On 02.11.22 16:55, Rob Herring wrote: > > On Mon, Oct 31, 2022 at 06:10:49PM +0800, Chester Lin wrote: > >> Add the DT schema for the DWMAC Ethernet controller on NXP S32 > Common > >> Chassis. > >> > >> Signed-off-by: Jan Petrous <jan.petrous@nxp.com> > >> Signed-off-by: Chester Lin <clin@suse.com> > >> --- > >> .../bindings/net/nxp,s32cc-dwmac.yaml | 145 ++++++++++++++++++ > >> 1 file changed, 145 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc- > dwmac.yaml > >> > >> diff --git a/Documentation/devicetree/bindings/net/nxp,s32cc- > dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32cc- > dwmac.yaml > >> new file mode 100644 > >> index 000000000000..f6b8486f9d42 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > >> @@ -0,0 +1,145 @@ > >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >> +# Copyright 2021-2022 NXP > >> +%YAML 1.2 > >> +--- > >> +$id: [...] > >> +title: NXP S32CC DWMAC Ethernet controller > >> + > >> +maintainers: > >> + - Jan Petrous <jan.petrous@nxp.com> > >> + - Chester Lin <clin@suse.com> > [...] > >> +properties: > >> + compatible: > >> + contains: > > > > Drop 'contains'. > > > >> + enum: > >> + - nxp,s32cc-dwmac > > In the past you were adamant that we use concrete SoC-specific strings. > Here that would mean s32g2 or s32g274 instead of s32cc (which aims to > share with S32G3 IIUC). > > [...] > >> + clocks: > >> + items: > >> + - description: Main GMAC clock > >> + - description: Peripheral registers clock > >> + - description: Transmit SGMII clock > >> + - description: Transmit RGMII clock > >> + - description: Transmit RMII clock > >> + - description: Transmit MII clock > >> + - description: Receive SGMII clock > >> + - description: Receive RGMII clock > >> + - description: Receive RMII clock > >> + - description: Receive MII clock > >> + - description: > >> + PTP reference clock. This clock is used for programming the > >> + Timestamp Addend Register. If not passed then the system > >> + clock will be used. > > > > If optional, then you need 'minItems'. > [snip] > > Do we have any precedence of bindings with *MII clocks like these? > > AFAIU the reason there are so many here is that there are in fact > physically just five, but different parent clock configurations that > SCMI does not currently expose to Linux. Thus I was raising that we may Correct. The different clock names represent different configs of the same clocks. > want to extend the SCMI protocol with some SET_PARENT operation that > could allow us to use less input clocks here, but obviously such a > standardization process will take time... > > What are your thoughts on how to best handle this here? > > Not clear to me has been whether the PHY mode can be switched at runtime > (like DPAA2 on Layerscape allows for SFPs) or whether this is fixed by > board design. If the latter, the two out of six SCMI IDs could get > selected in TF-A, to have only physical clocks here in the binding. The eval board allows to use different PHYs/switches connected by RGMII or SGMII to the GMAC. Some combinations require change of board's hw switches, but not all of them. Anyway, until we get a board with SFP, the connection type can be treated as fixed (declared in DT). /Jan -- NXP Czechia, AP Ethernet
> > Here I just focus on GMAC since there are other LAN interfaces that S32 > > family > > uses [e.g. PFE]. According to the public GMACSUBSYS ref manual rev2[1] > > provided > > on NXP website, theoretically GMAC can run SGMII in 1000Mbps and > > 2500Mbps so I > > assume that supporting 1000BASE-X could be achievable. I'm not sure if any > > S32 > > board variant might have SFP ports but RJ-45 [1000BASE-T] should be the > > major > > type used on S32G-EVB and S32G-RDB2. > > > > @NXP, please feel free to correct me if anything wrong. > > > > NXP eval boards (EVB or RDB) have also 2.5G PHYs, so together with SerDes > driver we support 100M/1G/2.5G on such copper PHYs. Hi Jan Does the SERDES clock need to change when going between 1000BaseX and 2500BaseX? If so, it sounds like Linux not having control of that clock is going to limit what can be supported. Andrew
Hi Andrew, > > > Here I just focus on GMAC since there are other LAN interfaces that S32 > > > family > > > uses [e.g. PFE]. According to the public GMACSUBSYS ref manual rev2[1] > > > provided > > > on NXP website, theoretically GMAC can run SGMII in 1000Mbps and > > > 2500Mbps so I > > > assume that supporting 1000BASE-X could be achievable. I'm not sure if > any > > > S32 > > > board variant might have SFP ports but RJ-45 [1000BASE-T] should be the > > > major > > > type used on S32G-EVB and S32G-RDB2. > > > > > > @NXP, please feel free to correct me if anything wrong. > > > > > > > NXP eval boards (EVB or RDB) have also 2.5G PHYs, so together with SerDes > > driver we support 100M/1G/2.5G on such copper PHYs. > > Hi Jan > > Does the SERDES clock need to change when going between 1000BaseX and > 2500BaseX? > > If so, it sounds like Linux not having control of that clock is going > to limit what can be supported. No, the SerDes clock remains the same, the change is done internally, without any necessity of clock change intervention by GMAC driver. /Jan
On Thu, Nov 10, 2022 at 08:51:43AM +0000, Jan Petrous wrote: > Hi Andrew, > > > > > Here I just focus on GMAC since there are other LAN interfaces that S32 > > > > family > > > > uses [e.g. PFE]. According to the public GMACSUBSYS ref manual rev2[1] > > > > provided > > > > on NXP website, theoretically GMAC can run SGMII in 1000Mbps and > > > > 2500Mbps so I > > > > assume that supporting 1000BASE-X could be achievable. I'm not sure if > > any > > > > S32 > > > > board variant might have SFP ports but RJ-45 [1000BASE-T] should be the > > > > major > > > > type used on S32G-EVB and S32G-RDB2. > > > > > > > > @NXP, please feel free to correct me if anything wrong. > > > > > > > > > > NXP eval boards (EVB or RDB) have also 2.5G PHYs, so together with SerDes > > > driver we support 100M/1G/2.5G on such copper PHYs. > > > > Hi Jan > > > > Does the SERDES clock need to change when going between 1000BaseX and > > 2500BaseX? > > > > If so, it sounds like Linux not having control of that clock is going > > to limit what can be supported. > > No, the SerDes clock remains the same, the change is done internally, without > any necessity of clock change intervention by GMAC driver. Hi Jan Thanks for the information. So this binding should work. The only suggestion i have is that the binding does not call is SGMII clock, because it is used for more than SGMII, also 1000base-X, and 2500Base-X. So PCS clock might be better. Andrew
diff --git a/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml new file mode 100644 index 000000000000..f6b8486f9d42 --- /dev/null +++ b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml @@ -0,0 +1,145 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2021-2022 NXP +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/net/nxp,s32cc-dwmac.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: NXP S32CC DWMAC Ethernet controller + +maintainers: + - Jan Petrous <jan.petrous@nxp.com> + - Chester Lin <clin@suse.com> + +select: + properties: + compatible: + contains: + enum: + - nxp,s32cc-dwmac + required: + - compatible + +allOf: + - $ref: "snps,dwmac.yaml#" + +properties: + compatible: + contains: + enum: + - nxp,s32cc-dwmac + + reg: + items: + - description: Main GMAC registers + - description: S32 MAC control registers + + dma-coherent: + description: + Declares GMAC device as DMA coherent + + clocks: + items: + - description: Main GMAC clock + - description: Peripheral registers clock + - description: Transmit SGMII clock + - description: Transmit RGMII clock + - description: Transmit RMII clock + - description: Transmit MII clock + - description: Receive SGMII clock + - description: Receive RGMII clock + - description: Receive RMII clock + - description: Receive MII clock + - description: + PTP reference clock. This clock is used for programming the + Timestamp Addend Register. If not passed then the system + clock will be used. + + clock-names: + items: + - const: stmmaceth + - const: pclk + - const: tx_sgmii + - const: tx_rgmii + - const: tx_rmii + - const: tx_mii + - const: rx_sgmii + - const: rx_rgmii + - const: rx_rmii + - const: rx_mii + - const: ptp_ref + + tx-fifo-depth: + const: 20480 + + rx-fifo-depth: + const: 20480 + +required: + - compatible + - reg + - tx-fifo-depth + - rx-fifo-depth + - clocks + - clock-names + +additionalProperties: true + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + + #define S32GEN1_SCMI_CLK_GMAC0_AXI + #define S32GEN1_SCMI_CLK_GMAC0_TX_SGMII + #define S32GEN1_SCMI_CLK_GMAC0_TX_RGMII + #define S32GEN1_SCMI_CLK_GMAC0_TX_RMII + #define S32GEN1_SCMI_CLK_GMAC0_TX_MII + #define S32GEN1_SCMI_CLK_GMAC0_RX_SGMII + #define S32GEN1_SCMI_CLK_GMAC0_RX_RGMII + #define S32GEN1_SCMI_CLK_GMAC0_RX_RMII + #define S32GEN1_SCMI_CLK_GMAC0_RX_MII + #define S32GEN1_SCMI_CLK_GMAC0_TS + + soc { + #address-cells = <1>; + #size-cells = <1>; + + gmac0: ethernet@4033c000 { + compatible = "nxp,s32cc-dwmac"; + reg = <0x4033c000 0x2000>, /* gmac IP */ + <0x4007C004 0x4>; /* S32 CTRL_STS reg */ + interrupt-parent = <&gic>; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq"; + phy-mode = "rgmii-id"; + tx-fifo-depth = <20480>; + rx-fifo-depth = <20480>; + dma-coherent; + clocks = <&clks S32GEN1_SCMI_CLK_GMAC0_AXI>, + <&clks S32GEN1_SCMI_CLK_GMAC0_AXI>, + <&clks S32GEN1_SCMI_CLK_GMAC0_TX_SGMII>, + <&clks S32GEN1_SCMI_CLK_GMAC0_TX_RGMII>, + <&clks S32GEN1_SCMI_CLK_GMAC0_TX_RMII>, + <&clks S32GEN1_SCMI_CLK_GMAC0_TX_MII>, + <&clks S32GEN1_SCMI_CLK_GMAC0_RX_SGMII>, + <&clks S32GEN1_SCMI_CLK_GMAC0_RX_RGMII>, + <&clks S32GEN1_SCMI_CLK_GMAC0_RX_RMII>, + <&clks S32GEN1_SCMI_CLK_GMAC0_RX_MII>, + <&clks S32GEN1_SCMI_CLK_GMAC0_TS>; + clock-names = "stmmaceth", "pclk", + "tx_sgmii", "tx_rgmii", "tx_rmii", "tx_mii", + "rx_sgmii", "rx_rgmii", "rx_rmii", "rx_mii", + "ptp_ref"; + + gmac0_mdio: mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + + ethernet-phy@4 { + reg = <0x04>; + }; + }; + }; + };