Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2565947rwb; Wed, 30 Nov 2022 08:08:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf47WL+ezOC1CucrDAwv1sj3k+RHGZkgvJxWXthtfL/3qmu9bdLbDYXlMpJmxFSpp65g6TOZ X-Received: by 2002:a05:6402:3644:b0:45f:c7f2:297d with SMTP id em4-20020a056402364400b0045fc7f2297dmr57449471edb.266.1669824485610; Wed, 30 Nov 2022 08:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669824485; cv=none; d=google.com; s=arc-20160816; b=ZvvjNTpjD5sc2aGJPZ7Lf2uPxi6tcE9SS7rJZe1U2M5p//apfypmehpjwvMeqkRy7C Nx1/cd2rBSHcrVGtPC3Sg+Ba8Uyj9HeizSCD7zOZc2MhnNSu7Ci5IHP7J71j6pSjBnyA Y3Am/eitpL4I2IzDpkXOXWjgfT06eFuaQ/Azygd6Eu4wrWRqw8lnWyZ6yUPMyvODi3no +sgNxaoUx3+y++5hEew/5NKF8FD1aVNTdy8E94a5C+r4NsM8IU7yHGJtc0sQjeJODT/C JRlNmAlRjUATdvnK05cSWVcquxn7NWSU9cjcJRcHcY8a+QfB4tqj7yJTjCdI4k7pLMMH VZdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=PG0uNEVGK4q7da5/MLy+snrbykYNb1/tHqcYAuUGVuE=; b=KPn8M2l33NUX33/Veouk702z59Y3e5SIcpqdEp5CtKPxVhEGqNOf1RCh55fiabVBjH oJUdXreC0kkqSd2XEPb/+l7dB2BonfFMPFlmTEbXo+xuE14jtecwX5JVJu+daUwbSg/I E7Mglsqgu4fHJLuuiNYZjRcsjCeIjqvyB3annLHg8vQZpNNK+kgL8LQsjgJeg00ulKJz BcHOQF0hKzmGXiSQU7YCybBwvRoBEFHzeoO7DPMNNCUn0/nrPJmbWhI2LfbubXWQqr7z 0/O69Y/m+eUcgfZ9hVNJ3sxRoyEGbw6Bo40QUORdLyBRhjTsTgTz6oTe3BIYMu6errQ4 SrFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YNd1J19W; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa17-20020a1709076d1100b0077bd074d50bsi1755219ejc.105.2022.11.30.08.07.44; Wed, 30 Nov 2022 08:08:05 -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=@linaro.org header.s=google header.b=YNd1J19W; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbiK3Pvl (ORCPT + 83 others); Wed, 30 Nov 2022 10:51:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbiK3Pvi (ORCPT ); Wed, 30 Nov 2022 10:51:38 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A470124F3A for ; Wed, 30 Nov 2022 07:51:35 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id a7so21338754ljq.12 for ; Wed, 30 Nov 2022 07:51:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PG0uNEVGK4q7da5/MLy+snrbykYNb1/tHqcYAuUGVuE=; b=YNd1J19Wgi306BQblAaPgKiipYJCYfpfdz/CeUQkZXVXZRPmnsfMyUS9HiqfBZqkX9 W2xdcA4Xj1qpFuxp+n2t4RVMuRUn0EUCcTy3drHjothY/1Zk3YeD6ONjthQnfkoBF95f mBMzqQSRhGWl2rnmw4V47jbq3KbVB/1EF73YnKCD+Os3ZtXVnOmKkLmujB9mCtqcatPZ adja1EwtKGVjCwLIHZWDCAGICaD58aKB5SRN1Y1e5c1jseRZfXRieRnLe11+MIiSBNgU npmdm0g2HeUCZCLRaphw12jBLOzLpOfikY3wLxNgzadTyp3AS4G0jQiMWTTWe2My+pZD Owxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PG0uNEVGK4q7da5/MLy+snrbykYNb1/tHqcYAuUGVuE=; b=F34rz3rqgu2cqvNk+CqHFw8serfrztLJSM39D2KR9Jwz6FGIYlknQBnb1HJCzhAgjE SQyUGU8JFVr3ImkJotVxUmuvkq2oSvi+Hf1ScwFYWfUZ0dkRKmapGOiTXvIShlZyoO6w WPRN31vFcC5cZoq+HPQZYT+PTIt4G5MTRYOk3w3xINGB3PZ0wlQtfxpqWTs3/MMVQMUy +E5ZeGFqd1OWu9GmKxrS6DPvoaS8+o3hgvKG6gWgfNJiPYCn21qfxlk/7y08Az/NW3w+ PpzSZTSv6WtfJkWXrHekVJBvwN16oQDwyJrhD8HSJs6iSA3hgdy7LwA+slMgPHqJxUSk rNwQ== X-Gm-Message-State: ANoB5pmbrpxfbIScJ3iiAM5KayShRFfZ7rW1R3rwo3CHDE0leHmaCv4i cfzop4rmyb5xqJw/JItEpaNINQ== X-Received: by 2002:a2e:bc88:0:b0:26f:ae32:a207 with SMTP id h8-20020a2ebc88000000b0026fae32a207mr21540208ljf.321.1669823493993; Wed, 30 Nov 2022 07:51:33 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id t3-20020a056512208300b004acbfa4a18bsm296625lfr.173.2022.11.30.07.51.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Nov 2022 07:51:33 -0800 (PST) Message-ID: <4a7a9bf7-f831-e1c1-0a31-8afcf92ae84c@linaro.org> Date: Wed, 30 Nov 2022 16:51:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2 2/5] dt-bindings: net: add schema for NXP S32CC dwmac glue driver Content-Language: en-US To: Chester Lin , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Jan Petrous , Andrew Lunn Cc: Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , 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?= , Matthias Brugger References: <20221128054920.2113-1-clin@suse.com> <20221128054920.2113-3-clin@suse.com> From: Krzysztof Kozlowski In-Reply-To: <20221128054920.2113-3-clin@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On 28/11/2022 06:49, Chester Lin wrote: > Add the DT schema for the DWMAC Ethernet controller on NXP S32 Common > Chassis. > > Signed-off-by: Jan Petrous > Signed-off-by: Chester Lin Thank you for your patch. There is something to discuss/improve. > --- > > Changes in v2: > - Fix schema issues. > - Add minItems to clocks & clock-names. > - Replace all sgmii/SGMII terms with pcs/PCS. > > .../bindings/net/nxp,s32cc-dwmac.yaml | 135 ++++++++++++++++++ > 1 file changed, 135 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..c6839fd3df40 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml > @@ -0,0 +1,135 @@ > +# 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#" Drop quotes from both. > + > +title: NXP S32CC DWMAC Ethernet controller > + > +maintainers: > + - Jan Petrous > + - Chester Lin > + > +allOf: > + - $ref: "snps,dwmac.yaml#" Drop quotes. > + > +properties: > + compatible: > + enum: > + - nxp,s32cc-dwmac > + > + reg: > + items: > + - description: Main GMAC registers > + - description: S32 MAC control registers > + > + dma-coherent: true > + > + clocks: > + minItems: 5 Why only 5 clocks are required? Receive clocks don't have to be there? Is such system - only with clocks for transmit - usable? > + items: > + - description: Main GMAC clock > + - description: Peripheral registers clock > + - description: Transmit PCS clock > + - description: Transmit RGMII clock > + - description: Transmit RMII clock > + - description: Transmit MII clock > + - description: Receive PCS 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: > + minItems: 5 > + items: > + - const: stmmaceth > + - const: pclk > + - const: tx_pcs > + - const: tx_rgmii > + - const: tx_rmii > + - const: tx_mii > + - const: rx_pcs > + - 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 > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + #include > + > + #define S32GEN1_SCMI_CLK_GMAC0_AXI > + #define S32GEN1_SCMI_CLK_GMAC0_TX_PCS > + #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_PCS > + #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 Why defines? Your clock controller is not ready? If so, just use raw numbers. > + > + 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 */ Lowercase hex. > + interrupt-parent = <&gic>; > + interrupts = ; > + 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_PCS>, > + <&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_PCS>, > + <&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>; Best regards, Krzysztof