Add FSD Ethernet compatible in Synopsys dt-bindings document. Add FSD
Ethernet YAML schema to enable the DT validation.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Ravi Patel <ravi.patel@samsung.com>
Signed-off-by: Swathi K S <swathi.ks@samsung.com>
---
.../devicetree/bindings/net/snps,dwmac.yaml | 5 +-
.../bindings/net/tesla,fsd-ethqos.yaml | 91 +++++++++++++++++++
2 files changed, 94 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 91e75eb3f329..2243bf48a0b7 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -103,6 +103,7 @@ properties:
- starfive,jh7100-dwmac
- starfive,jh7110-dwmac
- thead,th1520-gmac
+ - tesla,fsd-ethqos
reg:
minItems: 1
@@ -126,7 +127,7 @@ properties:
clocks:
minItems: 1
- maxItems: 8
+ maxItems: 10
additionalItems: true
items:
- description: GMAC main clock
@@ -138,7 +139,7 @@ properties:
clock-names:
minItems: 1
- maxItems: 8
+ maxItems: 10
additionalItems: true
contains:
enum:
diff --git a/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml b/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml
new file mode 100644
index 000000000000..579a7bd1701d
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml
@@ -0,0 +1,91 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/tesla,fsd-ethqos.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: FSD Ethernet Quality of Service
+
+maintainers:
+ - Swathi K S <swathi.ks@samsung.com>
+
+description:
+ Tesla ethernet devices based on dwmmac support Gigabit ethernet.
+
+allOf:
+ - $ref: snps,dwmac.yaml#
+
+properties:
+ compatible:
+ const: tesla,fsd-ethqos.yaml
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ minItems: 5
+ maxItems: 10
+
+ clock-names:
+ minItems: 5
+ maxItems: 10
+
+ iommus:
+ maxItems: 1
+
+ phy-mode:
+ enum:
+ - rgmii-id
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - iommus
+ - phy-mode
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/fsd-clk.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ ethernet_1: ethernet@14300000 {
+ compatible = "tesla,fsd-ethqos";
+ reg = <0x0 0x14300000 0x0 0x10000>;
+ interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_CLK_PTP_REF_I>,
+ <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_ACLK_I>,
+ <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_HCLK_I>,
+ <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_RGMII_CLK_I>,
+ <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_CLK_RX_I>,
+ <&clock_peric PERIC_BUS_D_PERIC_IPCLKPORT_EQOSCLK>,
+ <&clock_peric PERIC_BUS_P_PERIC_IPCLKPORT_EQOSCLK>,
+ <&clock_peric PERIC_EQOS_PHYRXCLK_MUX>,
+ <&clock_peric PERIC_EQOS_PHYRXCLK>,
+ <&clock_peric PERIC_DOUT_RGMII_CLK>;
+ clock-names = "ptp_ref",
+ "master_bus",
+ "slave_bus",
+ "tx",
+ "rx",
+ "master2_bus",
+ "slave2_bus",
+ "eqos_rxclk_mux",
+ "eqos_phyrxclk",
+ "dout_peric_rgmii_clk";
+ pinctrl-names = "default";
+ pinctrl-0 = <ð1_tx_clk>, <ð1_tx_data>, <ð1_tx_ctrl>,
+ <ð1_phy_intr>, <ð1_rx_clk>, <ð1_rx_data>,
+ <ð1_rx_ctrl>, <ð1_mdio>;
+ iommus = <&smmu_peric 0x0 0x1>;
+ phy-mode = "rgmii-id";
+ };
+
+...
--
2.17.1
On Tue, Jan 28, 2025 at 03:55:55PM +0530, Swathi K S wrote: > Add FSD Ethernet compatible in Synopsys dt-bindings document. Add FSD > Ethernet YAML schema to enable the DT validation. > > Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> > Signed-off-by: Ravi Patel <ravi.patel@samsung.com> > Signed-off-by: Swathi K S <swathi.ks@samsung.com> > --- > .../devicetree/bindings/net/snps,dwmac.yaml | 5 +- > .../bindings/net/tesla,fsd-ethqos.yaml | 91 +++++++++++++++++++ > 2 files changed, 94 insertions(+), 2 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > index 91e75eb3f329..2243bf48a0b7 100644 > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > @@ -103,6 +103,7 @@ properties: > - starfive,jh7100-dwmac > - starfive,jh7110-dwmac > - thead,th1520-gmac > + - tesla,fsd-ethqos > > reg: > minItems: 1 > @@ -126,7 +127,7 @@ properties: > > clocks: > minItems: 1 > - maxItems: 8 > + maxItems: 10 > additionalItems: true > items: > - description: GMAC main clock > @@ -138,7 +139,7 @@ properties: > > clock-names: > minItems: 1 > - maxItems: 8 > + maxItems: 10 > additionalItems: true > contains: > enum: > diff --git a/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml b/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml > new file mode 100644 > index 000000000000..579a7bd1701d > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml > @@ -0,0 +1,91 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/tesla,fsd-ethqos.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: FSD Ethernet Quality of Service > + > +maintainers: > + - Swathi K S <swathi.ks@samsung.com> > + > +description: > + Tesla ethernet devices based on dwmmac support Gigabit ethernet. > + > +allOf: > + - $ref: snps,dwmac.yaml# > + > +properties: > + compatible: > + const: tesla,fsd-ethqos.yaml Humm...
> -----Original Message----- > From: Rob Herring <robh@kernel.org> > Sent: 28 January 2025 21:16 > To: Swathi K S <swathi.ks@samsung.com> > Cc: krzk@kernel.org; davem@davemloft.net; edumazet@google.com; > kuba@kernel.org; pabeni@redhat.com; conor+dt@kernel.org; > richardcochran@gmail.com; mcoquelin.stm32@gmail.com; andrew@lunn.ch; > alim.akhtar@samsung.com; linux-fsd@tesla.com; netdev@vger.kernel.org; > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-stm32@st- > md-mailman.stormreply.com; linux-arm-kernel@lists.infradead.org; linux- > samsung-soc@vger.kernel.org; alexandre.torgue@foss.st.com; > peppe.cavallaro@st.com; joabreu@synopsys.com; rcsekar@samsung.com; > ssiddha@tesla.com; jayati.sahu@samsung.com; > pankaj.dubey@samsung.com; ravi.patel@samsung.com; > gost.dev@samsung.com > Subject: Re: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree > bindings > > On Tue, Jan 28, 2025 at 03:55:55PM +0530, Swathi K S wrote: > > Add FSD Ethernet compatible in Synopsys dt-bindings document. Add FSD > > Ethernet YAML schema to enable the DT validation. > > > > Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> > > Signed-off-by: Ravi Patel <ravi.patel@samsung.com> > > Signed-off-by: Swathi K S <swathi.ks@samsung.com> > > --- > > .../devicetree/bindings/net/snps,dwmac.yaml | 5 +- > > .../bindings/net/tesla,fsd-ethqos.yaml | 91 +++++++++++++++++++ > > 2 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 > > Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml > > > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > index 91e75eb3f329..2243bf48a0b7 100644 > > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > @@ -103,6 +103,7 @@ properties: > > - starfive,jh7100-dwmac > > - starfive,jh7110-dwmac > > - thead,th1520-gmac > > + - tesla,fsd-ethqos > > > > reg: > > minItems: 1 > > @@ -126,7 +127,7 @@ properties: > > > > clocks: > > minItems: 1 > > - maxItems: 8 > > + maxItems: 10 > > additionalItems: true > > items: > > - description: GMAC main clock > > @@ -138,7 +139,7 @@ properties: > > > > clock-names: > > minItems: 1 > > - maxItems: 8 > > + maxItems: 10 > > additionalItems: true > > contains: > > enum: > > diff --git > > a/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml > > b/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml > > new file mode 100644 > > index 000000000000..579a7bd1701d > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml > > @@ -0,0 +1,91 @@ > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 > > +--- > > +$id: > > +https://protect2.fireeye.com/v1/url?k=6d811f84-0c0a0abe-6d8094cb- > 74fe > > +4860008a-af9296512b2d412c&q=1&e=ccfde7ee-b20c-400e-ab77- > 48df91b2df3c& > > +u=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fnet%2Ftesla%2Cfsd- > ethqos.ya > > +ml%23 > > +$schema: > > +https://protect2.fireeye.com/v1/url?k=82ab8361-e320965b-82aa082e- > 74fe > > +4860008a-8834d7e9197f59d4&q=1&e=ccfde7ee-b20c-400e-ab77- > 48df91b2df3c& > > +u=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23 > > + > > +title: FSD Ethernet Quality of Service > > + > > +maintainers: > > + - Swathi K S <swathi.ks@samsung.com> > > + > > +description: > > + Tesla ethernet devices based on dwmmac support Gigabit ethernet. > > + > > +allOf: > > + - $ref: snps,dwmac.yaml# > > + > > +properties: > > + compatible: > > + const: tesla,fsd-ethqos.yaml > > Humm... Hi Rob, Could you help me understand if there is anything wrong here? -Swathi
> > > +properties: > > > + compatible: > > > + const: tesla,fsd-ethqos.yaml > > > > Humm... > > Hi Rob, > Could you help me understand if there is anything wrong here? Is your compatible really "tesla,fsd-ethqos.yaml"? If so, i think this file needs to be called tesla,fsd-ethqos.yaml.yaml. Andrew
On Tue, 28 Jan 2025 15:55:55 +0530, Swathi K S wrote: > Add FSD Ethernet compatible in Synopsys dt-bindings document. Add FSD > Ethernet YAML schema to enable the DT validation. > > Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> > Signed-off-by: Ravi Patel <ravi.patel@samsung.com> > Signed-off-by: Swathi K S <swathi.ks@samsung.com> > --- > .../devicetree/bindings/net/snps,dwmac.yaml | 5 +- > .../bindings/net/tesla,fsd-ethqos.yaml | 91 +++++++++++++++++++ > 2 files changed, 94 insertions(+), 2 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: ./Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml:41:6: [warning] wrong indentation: expected 6 but found 5 (indentation) dtschema/dtc warnings/errors: doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250128102558.22459-2-swathi.ks@samsung.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 28/01/2025 11:25, Swathi K S wrote:
> + Tesla ethernet devices based on dwmmac support Gigabit ethernet.
> +
> +allOf:
> + - $ref: snps,dwmac.yaml#
> +
> +properties:
> + compatible:
> + const: tesla,fsd-ethqos.yaml
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + minItems: 5
> + maxItems: 10
Why is this flexible?
Anyway, you need to list and describe the items instead of min/maxItems.
> +
> + clock-names:
> + minItems: 5
> + maxItems: 10
Same here.
> +
> + iommus:
> + maxItems: 1
> +
> + phy-mode:
> + enum:
> + - rgmii-id
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> + - iommus
> + - phy-mode
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/fsd-clk.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + ethernet_1: ethernet@14300000 {
Please implement last comment from Rob.
> + compatible = "tesla,fsd-ethqos";
> + reg = <0x0 0x14300000 0x0 0x10000>;
And since there is going to be new version, switch to the preferred
indentation (4-space). Other option is 2 spaces, but not 8.
> +...
Best regards,
Krzysztof
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 28 January 2025 19:45
> To: Swathi K S <swathi.ks@samsung.com>; robh@kernel.org;
> davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
> pabeni@redhat.com; conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; andrew@lunn.ch; alim.akhtar@samsung.com;
> linux-fsd@tesla.com
> Cc: netdev@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org;
> alexandre.torgue@foss.st.com; peppe.cavallaro@st.com;
> joabreu@synopsys.com; rcsekar@samsung.com; ssiddha@tesla.com;
> jayati.sahu@samsung.com; pankaj.dubey@samsung.com;
> ravi.patel@samsung.com; gost.dev@samsung.com
> Subject: Re: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree
> bindings
>
> On 28/01/2025 11:25, Swathi K S wrote:
> > + Tesla ethernet devices based on dwmmac support Gigabit ethernet.
> > +
> > +allOf:
> > + - $ref: snps,dwmac.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: tesla,fsd-ethqos.yaml
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks:
> > + minItems: 5
> > + maxItems: 10
>
> Why is this flexible?
>
> Anyway, you need to list and describe the items instead of min/maxItems.
>
> > +
> > + clock-names:
> > + minItems: 5
> > + maxItems: 10
>
> Same here.
>
> > +
> > + iommus:
> > + maxItems: 1
> > +
> > + phy-mode:
> > + enum:
> > + - rgmii-id
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > + - clock-names
> > + - iommus
> > + - phy-mode
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/clock/fsd-clk.h>
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +
> > + ethernet_1: ethernet@14300000 {
>
> Please implement last comment from Rob.
This label is used to enable the node in dts. Could see similar labels in other yaml files. Am I missing something here?
>
> > + compatible = "tesla,fsd-ethqos";
> > + reg = <0x0 0x14300000 0x0 0x10000>;
>
> And since there is going to be new version, switch to the preferred
> indentation (4-space). Other option is 2 spaces, but not 8.
>
> > +...
>
>
> Best regards,
> Krzysztof
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 28 January 2025 19:45
> To: Swathi K S <swathi.ks@samsung.com>; robh@kernel.org;
> davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
> pabeni@redhat.com; conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; andrew@lunn.ch; alim.akhtar@samsung.com;
> linux-fsd@tesla.com
> Cc: netdev@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org;
> alexandre.torgue@foss.st.com; peppe.cavallaro@st.com;
> joabreu@synopsys.com; rcsekar@samsung.com; ssiddha@tesla.com;
> jayati.sahu@samsung.com; pankaj.dubey@samsung.com;
> ravi.patel@samsung.com; gost.dev@samsung.com
> Subject: Re: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree
> bindings
>
> On 28/01/2025 11:25, Swathi K S wrote:
> > + Tesla ethernet devices based on dwmmac support Gigabit ethernet.
> > +
> > +allOf:
> > + - $ref: snps,dwmac.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: tesla,fsd-ethqos.yaml
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks:
> > + minItems: 5
> > + maxItems: 10
>
> Why is this flexible?
>
> Anyway, you need to list and describe the items instead of min/maxItems.
Hi Krzysztof,
There are 2 Ethernet instances where Eth0 has 5 clocks and Eth1 has 10 clocks.
Would it be sufficient to list the clock names?
>
> > +
> > + clock-names:
> > + minItems: 5
> > + maxItems: 10
>
> Same here.
Ack
>
> > +
> > + iommus:
> > + maxItems: 1
> > +
> > + phy-mode:
> > + enum:
> > + - rgmii-id
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > + - clock-names
> > + - iommus
> > + - phy-mode
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/clock/fsd-clk.h>
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +
> > + ethernet_1: ethernet@14300000 {
>
> Please implement last comment from Rob.
>
> > + compatible = "tesla,fsd-ethqos";
> > + reg = <0x0 0x14300000 0x0 0x10000>;
>
> And since there is going to be new version, switch to the preferred
> indentation (4-space). Other option is 2 spaces, but not 8.
Ack, will update it this way in v6.
- Swathi
>
> > +...
>
>
> Best regards,
> Krzysztof
© 2016 - 2026 Red Hat, Inc.