All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joey Lu <a0987203069@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	openbmc@lists.ozlabs.org, netdev@vger.kernel.org,
	richardcochran@gmail.com, ychuang3@nuvoton.com,
	alexandre.torgue@foss.st.com, linux-kernel@vger.kernel.org,
	andrew+netdev@lunn.ch, edumazet@google.com, joabreu@synopsys.com,
	linux-arm-kernel@lists.infradead.org, mcoquelin.stm32@gmail.com,
	peppe.cavallaro@st.com, schung@nuvoton.com, kuba@kernel.org,
	krzk+dt@kernel.org, pabeni@redhat.com, davem@davemloft.net,
	yclu4@nuvoton.com
Subject: Re: [PATCH v3 1/3] dt-bindings: net: nuvoton: Add schema for Nuvoton MA35 family GMAC
Date: Wed, 20 Nov 2024 16:39:52 +0800	[thread overview]
Message-ID: <ee1c7f01-5e6f-4e0e-89dc-e45c5d1054ab@gmail.com> (raw)
In-Reply-To: <20241119181237.GA1871579-robh@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 7092 bytes --]

Dear Rob,

Thank you for your reply.

Rob Herring 於 11/20/2024 2:12 AM 寫道:
> On Mon, Nov 18, 2024 at 04:27:05PM +0800, Joey Lu wrote:
>> Create initial schema for Nuvoton MA35 family Gigabit MAC.
>>
>> Signed-off-by: Joey Lu<a0987203069@gmail.com>
>> ---
>>   .../bindings/net/nuvoton,ma35d1-dwmac.yaml    | 173 ++++++++++++++++++
>>   .../devicetree/bindings/net/snps,dwmac.yaml   |   1 +
>>   2 files changed, 174 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/net/nuvoton,ma35d1-dwmac.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/net/nuvoton,ma35d1-dwmac.yaml b/Documentation/devicetree/bindings/net/nuvoton,ma35d1-dwmac.yaml
>> new file mode 100644
>> index 000000000000..92cbbcc72f2b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/nuvoton,ma35d1-dwmac.yaml
>> @@ -0,0 +1,173 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id:http://devicetree.org/schemas/net/nuvoton,ma35d1-dwmac.yaml#
>> +$schema:http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Nuvoton DWMAC glue layer controller
>> +
>> +maintainers:
>> +  - Joey Lu<yclu4@nuvoton.com>
>> +
>> +description:
>> +  Nuvoton 10/100/1000Mbps Gigabit Ethernet MAC Controller is based on
>> +  Synopsys DesignWare MAC (version 3.73a).
>> +
>> +# We need a select here so we don't match all nodes with 'snps,dwmac'
> You mean snps,dwmac-3.70a?
I found that the yaml can pass |dt_binding_check| without |select|. I 
will drop these lines.
>> +select:
>> +  properties:
>> +    compatible:
>> +      contains:
>> +        enum:
>> +          - nuvoton,ma35d1-dwmac
>> +  required:
>> +    - compatible
>> +
>> +allOf:
>> +  - $ref: snps,dwmac.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    oneOf:
> oneOf is not correct. I think you wanted 'items'.
I will fix it.
>> +      - enum:
>> +          - nuvoton,ma35d1-dwmac
>> +      - const: snps,dwmac-3.70a
> But you said above the h/w is 3.73a.
>
> Really, I'd prefer to just drop this because it's not useful on its own.
> But the driver does check for snps,dwmac-3.70a. All those
> of_device_is_compatible() calls in the driver should really be replaced
> with static match data structs.
Yes, I will drop it.
>> +
>> +  reg:
>> +    description:
>> +      Register range should be one of the GMAC interface.
> Need to define how many entries and what they are if more than 1.
This will be fixed.
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    items:
>> +      - description: MAC clock
>> +      - description: PTP clock
>> +
>> +  clock-names:
>> +    items:
>> +      - const: stmmaceth
>> +      - const: ptp_ref
>> +
>> +  nuvoton,sys:
>> +    $ref: /schemas/types.yaml#/definitions/phandle-array
>> +    items:
>> +      - items:
>> +          - description: phandle to access syscon registers.
>> +          - description: GMAC interface ID.
>> +            enum:
>> +              - 0
>> +              - 1
>> +    description:
>> +      A phandle to the syscon with one argument that configures system registers
>> +      for MA35D1's two GMACs. The argument specifies the GMAC interface ID.
>> +
>> +  resets:
>> +    maxItems: 1
>> +
>> +  reset-names:
>> +    items:
>> +      - const: stmmaceth
>> +
>> +  phy-mode:
>> +    enum:
>> +      - rmii
>> +      - rgmii
>> +      - rgmii-id
>> +      - rgmii-txid
>> +      - rgmii-rxid
>> +
>> +  phy-handle:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
> The type is already defined. Drop.
I will drop it.
>> +    description:
>> +      Specifies a reference to a node representing a PHY device.
>> +
>> +  tx-internal-delay-ps:
>> +    enum: [0, 2000]
>> +    default: 0
>> +    description:
>> +      RGMII TX path delay used only when PHY operates in RGMII mode with
>> +      internal delay (phy-mode is 'rgmii-id' or 'rgmii-txid') in pico-seconds.
>> +
>> +  rx-internal-delay-ps:
>> +    enum: [0, 2000]
>> +    default: 0
>> +    description:
>> +      RGMII RX path delay used only when PHY operates in RGMII mode with
>> +      internal delay (phy-mode is 'rgmii-id' or 'rgmii-rxid') in pico-seconds.
>> +
>> +  mdio:
>> +    $ref: /schemas/net/mdio.yaml#
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupts
>> +  - interrupt-names
>> +  - clocks
>> +  - clock-names
>> +  - nuvoton,sys
>> +  - resets
>> +  - reset-names
>> +  - phy-mode
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +    #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
>> +    #include <dt-bindings/reset/nuvoton,ma35d1-reset.h>
>> +    //Example 1
> Not a useful comment.
I will drop it.
>> +    gmac0: ethernet@40120000 {
> Drop unused labels.
All unused labels will be dropped.
>> +        compatible = "nuvoton,ma35d1-dwmac";
>> +        reg = <0x0 0x40120000 0x0 0x10000>;
>> +        interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
>> +        interrupt-names = "macirq";
>> +        clocks = <&clk EMAC0_GATE>, <&clk EPLL_DIV8>;
>> +        clock-names = "stmmaceth", "ptp_ref";
>> +
>> +        nuvoton,sys = <&sys 0>;
>> +        resets = <&sys MA35D1_RESET_GMAC0>;
>> +        reset-names = "stmmaceth";
>> +
>> +        phy-mode = "rgmii-id";
>> +        phy-handle = <&eth_phy0>;
>> +        mdio0: mdio {
>> +            compatible = "snps,dwmac-mdio";
>> +            #address-cells = <1>;
>> +            #size-cells = <0>;
>> +
>> +            eth_phy0: ethernet-phy@0 {
>> +                reg = <0>;
>> +            };
>> +        };
>> +    };
>> +
>> +  - |
>> +    //Example 2
>> +    gmac1: ethernet@40130000 {
> Drop the example. It's almost the same as the first one.
I will drop it.
>> +        compatible = "nuvoton,ma35d1-dwmac";
>> +        reg = <0x0 0x40130000 0x0 0x10000>;
>> +        interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
>> +        interrupt-names = "macirq";
>> +        clocks = <&clk EMAC1_GATE>, <&clk EPLL_DIV8>;
>> +        clock-names = "stmmaceth", "ptp_ref";
>> +
>> +        nuvoton,sys = <&sys 1>;
>> +        resets = <&sys MA35D1_RESET_GMAC1>;
>> +        reset-names = "stmmaceth";
>> +
>> +        phy-mode = "rmii";
>> +        phy-handle = <&eth_phy1>;
>> +        mdio1: mdio {
>> +            compatible = "snps,dwmac-mdio";
>> +            #address-cells = <1>;
>> +            #size-cells = <0>;
>> +
>> +            eth_phy1: ethernet-phy@1 {
>> +                reg = <1>;
>> +            };
>> +        };
>> +    };
>> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>> index 4e2ba1bf788c..aecdb3d37b53 100644
>> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>> @@ -66,6 +66,7 @@ properties:
>>           - ingenic,x2000-mac
>>           - loongson,ls2k-dwmac
>>           - loongson,ls7a-dwmac
>> +        - nuvoton,ma35d1-dwmac
>>           - qcom,qcs404-ethqos
>>           - qcom,sa8775p-ethqos
>>           - qcom,sc8280xp-ethqos
>> -- 
>> 2.34.1

Thanks!

BR,

Joey

[-- Attachment #2: Type: text/html, Size: 10208 bytes --]

  reply	other threads:[~2024-11-20 22:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18  8:27 [PATCH v3 0/3] Add support for Nuvoton MA35D1 GMAC Joey Lu
2024-11-18  8:27 ` Joey Lu
2024-11-18  8:27 ` [PATCH v3 1/3] dt-bindings: net: nuvoton: Add schema for Nuvoton MA35 family GMAC Joey Lu
2024-11-18  8:27   ` Joey Lu
2024-11-19 18:12   ` Rob Herring
2024-11-19 18:12     ` Rob Herring
2024-11-20  8:39     ` Joey Lu [this message]
2024-11-18  8:27 ` [PATCH v3 2/3] arm64: dts: nuvoton: Add Ethernet nodes Joey Lu
2024-11-18  8:27   ` Joey Lu
2024-11-26 10:08   ` Krzysztof Kozlowski
2024-11-26 10:08     ` Krzysztof Kozlowski
2024-11-27  8:01     ` Joey Lu
2024-11-27  8:01       ` Joey Lu
2024-11-18  8:27 ` [PATCH v3 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for Nuvoton MA35 family Joey Lu
2024-11-18  8:27   ` Joey Lu
2024-11-19  1:48   ` Andrew Lunn
2024-11-19  1:48     ` Andrew Lunn
2024-11-19 10:08     ` Joey Lu
2024-11-19 10:08       ` Joey Lu
2024-11-20 14:56   ` Uwe Kleine-König
2024-11-20 14:56     ` Uwe Kleine-König
2024-11-26  9:39     ` Joey Lu
2024-11-26  9:39       ` Joey Lu
2024-11-26 10:10   ` Krzysztof Kozlowski
2024-11-26 10:10     ` Krzysztof Kozlowski
2024-11-27  8:03     ` Joey Lu
2024-11-27  8:03       ` Joey Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee1c7f01-5e6f-4e0e-89dc-e45c5d1054ab@gmail.com \
    --to=a0987203069@gmail.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=joabreu@synopsys.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=schung@nuvoton.com \
    --cc=ychuang3@nuvoton.com \
    --cc=yclu4@nuvoton.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.