* [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings
2025-01-28 10:25 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
@ 2025-01-28 10:25 ` Swathi K S
2025-01-28 14:14 ` Krzysztof Kozlowski
` (2 more replies)
2025-01-28 10:25 ` [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
` (3 subsequent siblings)
4 siblings, 3 replies; 21+ messages in thread
From: Swathi K S @ 2025-01-28 10:25 UTC (permalink / raw)
To: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
swathi.ks, rcsekar, ssiddha, jayati.sahu, pankaj.dubey,
ravi.patel, gost.dev
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
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings
2025-01-28 10:25 ` [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
@ 2025-01-28 14:14 ` Krzysztof Kozlowski
2025-01-29 9:18 ` Swathi K S
2025-01-30 6:05 ` Swathi K S
2025-01-28 15:40 ` Rob Herring (Arm)
2025-01-28 15:45 ` Rob Herring
2 siblings, 2 replies; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-28 14:14 UTC (permalink / raw)
To: Swathi K S, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
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
^ permalink raw reply [flat|nested] 21+ messages in thread* RE: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings
2025-01-28 14:14 ` Krzysztof Kozlowski
@ 2025-01-29 9:18 ` Swathi K S
2025-01-30 6:05 ` Swathi K S
1 sibling, 0 replies; 21+ messages in thread
From: Swathi K S @ 2025-01-29 9:18 UTC (permalink / raw)
To: 'Krzysztof Kozlowski'
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev,
robh, davem, edumazet, kuba, pabeni, conor+dt, richardcochran,
mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
> -----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
^ permalink raw reply [flat|nested] 21+ messages in thread* RE: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings
2025-01-28 14:14 ` Krzysztof Kozlowski
2025-01-29 9:18 ` Swathi K S
@ 2025-01-30 6:05 ` Swathi K S
1 sibling, 0 replies; 21+ messages in thread
From: Swathi K S @ 2025-01-30 6:05 UTC (permalink / raw)
To: 'Krzysztof Kozlowski'
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev,
robh, davem, edumazet, kuba, pabeni, conor+dt, richardcochran,
mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
> -----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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings
2025-01-28 10:25 ` [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
2025-01-28 14:14 ` Krzysztof Kozlowski
@ 2025-01-28 15:40 ` Rob Herring (Arm)
2025-01-28 15:45 ` Rob Herring
2 siblings, 0 replies; 21+ messages in thread
From: Rob Herring (Arm) @ 2025-01-28 15:40 UTC (permalink / raw)
To: Swathi K S
Cc: kuba, conor+dt, alexandre.torgue, linux-samsung-soc,
mcoquelin.stm32, linux-arm-kernel, pankaj.dubey, edumazet,
peppe.cavallaro, devicetree, jayati.sahu, rcsekar, andrew, pabeni,
gost.dev, joabreu, richardcochran, ravi.patel, linux-kernel,
netdev, ssiddha, alim.akhtar, linux-stm32, davem, linux-fsd, krzk
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.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings
2025-01-28 10:25 ` [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
2025-01-28 14:14 ` Krzysztof Kozlowski
2025-01-28 15:40 ` Rob Herring (Arm)
@ 2025-01-28 15:45 ` Rob Herring
2025-01-29 9:20 ` Swathi K S
2 siblings, 1 reply; 21+ messages in thread
From: Rob Herring @ 2025-01-28 15:45 UTC (permalink / raw)
To: Swathi K S
Cc: krzk, davem, edumazet, kuba, pabeni, conor+dt, richardcochran,
mcoquelin.stm32, andrew, alim.akhtar, linux-fsd, netdev,
devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
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...
^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings
2025-01-28 15:45 ` Rob Herring
@ 2025-01-29 9:20 ` Swathi K S
2025-01-29 12:59 ` Andrew Lunn
0 siblings, 1 reply; 21+ messages in thread
From: Swathi K S @ 2025-01-29 9:20 UTC (permalink / raw)
To: 'Rob Herring'
Cc: krzk, davem, edumazet, kuba, pabeni, conor+dt, richardcochran,
mcoquelin.stm32, andrew, alim.akhtar, linux-fsd, netdev,
devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
> -----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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings
2025-01-29 9:20 ` Swathi K S
@ 2025-01-29 12:59 ` Andrew Lunn
0 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2025-01-29 12:59 UTC (permalink / raw)
To: Swathi K S
Cc: 'Rob Herring', krzk, davem, edumazet, kuba, pabeni,
conor+dt, richardcochran, mcoquelin.stm32, alim.akhtar, linux-fsd,
netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
> > > +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
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
2025-01-28 10:25 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
2025-01-28 10:25 ` [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
@ 2025-01-28 10:25 ` Swathi K S
2025-01-28 13:48 ` Andrew Lunn
2025-01-28 14:59 ` Russell King (Oracle)
2025-01-28 10:25 ` [PATCH v5 3/4] arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC Swathi K S
` (2 subsequent siblings)
4 siblings, 2 replies; 21+ messages in thread
From: Swathi K S @ 2025-01-28 10:25 UTC (permalink / raw)
To: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
swathi.ks, rcsekar, ssiddha, jayati.sahu, pankaj.dubey,
ravi.patel, gost.dev
The FSD SoC contains two instance of the Synopsys DWC ethernet QOS IP core.
The binding that it uses is slightly different from existing ones because
of the integration (clocks, resets).
Signed-off-by: Chandrasekar R <rcsekar@samsung.com>
Signed-off-by: Suresh Siddha <ssiddha@tesla.com>
Signed-off-by: Swathi K S <swathi.ks@samsung.com>
---
.../stmicro/stmmac/dwmac-dwc-qos-eth.c | 74 +++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
index bd4eb187f8c6..81a7038bcdf4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/stmmac.h>
+#include <linux/regmap.h>
#include "stmmac_platform.h"
#include "dwmac4.h"
@@ -37,6 +38,12 @@ struct tegra_eqos {
struct gpio_desc *reset;
};
+struct fsd_eqos_plat_data {
+ struct clk_bulk_data *clks;
+ int num_clks;
+ struct device *dev;
+};
+
static int dwc_eth_dwmac_config_dt(struct platform_device *pdev,
struct plat_stmmacenet_data *plat_dat)
{
@@ -260,6 +267,67 @@ static int tegra_eqos_init(struct platform_device *pdev, void *priv)
return 0;
}
+static int fsd_clks_endisable(void *priv, bool enabled)
+{
+ struct fsd_eqos_plat_data *plat = priv;
+
+ if (enabled) {
+ return clk_bulk_prepare_enable(plat->num_clks, plat->clks);
+ } else {
+ clk_bulk_disable_unprepare(plat->num_clks, plat->clks);
+ return 0;
+ }
+}
+
+static int fsd_eqos_probe(struct platform_device *pdev,
+ struct plat_stmmacenet_data *data,
+ struct stmmac_resources *res)
+{
+ struct fsd_eqos_plat_data *priv_plat;
+ struct clk *rx1 = NULL;
+ struct clk *rx2 = NULL;
+ int ret = 0;
+
+ priv_plat = devm_kzalloc(&pdev->dev, sizeof(*priv_plat), GFP_KERNEL);
+ if (!priv_plat)
+ return -ENOMEM;
+
+ priv_plat->dev = &pdev->dev;
+
+ ret = devm_clk_bulk_get_all(&pdev->dev, &priv_plat->clks);
+ if (ret < 0)
+ return dev_err_probe(&pdev->dev, ret, "No clocks available\n");
+
+ priv_plat->num_clks = ret;
+
+ data->bsp_priv = priv_plat;
+ data->clks_config = fsd_clks_endisable;
+
+ for (int i = 0; i < priv_plat->num_clks; i++) {
+ if (strcmp(priv_plat->clks[i].id, "eqos_rxclk_mux") == 0)
+ rx1 = priv_plat->clks[i].clk;
+ else if (strcmp(priv_plat->clks[i].id, "eqos_phyrxclk") == 0)
+ rx2 = priv_plat->clks[i].clk;
+ }
+
+ /* Eth0 RX clock doesn't support MUX */
+ if (rx1)
+ clk_set_parent(rx1, rx2);
+
+ ret = fsd_clks_endisable(priv_plat, true);
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret, "Failed to enable FSD clock\n");
+
+ return 0;
+}
+
+static void fsd_eqos_remove(struct platform_device *pdev)
+{
+ struct fsd_eqos_plat_data *priv_plat = get_stmmac_bsp_priv(&pdev->dev);
+
+ fsd_clks_endisable(priv_plat, false);
+}
+
static int tegra_eqos_probe(struct platform_device *pdev,
struct plat_stmmacenet_data *data,
struct stmmac_resources *res)
@@ -406,6 +474,11 @@ static const struct dwc_eth_dwmac_data tegra_eqos_data = {
.remove = tegra_eqos_remove,
};
+static const struct dwc_eth_dwmac_data fsd_eqos_data = {
+ .probe = fsd_eqos_probe,
+ .remove = fsd_eqos_remove,
+};
+
static int dwc_eth_dwmac_probe(struct platform_device *pdev)
{
const struct dwc_eth_dwmac_data *data;
@@ -468,6 +541,7 @@ static void dwc_eth_dwmac_remove(struct platform_device *pdev)
static const struct of_device_id dwc_eth_dwmac_match[] = {
{ .compatible = "snps,dwc-qos-ethernet-4.10", .data = &dwc_qos_data },
{ .compatible = "nvidia,tegra186-eqos", .data = &tegra_eqos_data },
+ { .compatible = "tesla,fsd-ethqos", .data = &fsd_eqos_data },
{ }
};
MODULE_DEVICE_TABLE(of, dwc_eth_dwmac_match);
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
2025-01-28 10:25 ` [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
@ 2025-01-28 13:48 ` Andrew Lunn
2025-01-29 9:15 ` Swathi K S
2025-01-28 14:59 ` Russell King (Oracle)
1 sibling, 1 reply; 21+ messages in thread
From: Andrew Lunn @ 2025-01-28 13:48 UTC (permalink / raw)
To: Swathi K S
Cc: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, alim.akhtar, linux-fsd, netdev,
devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
> +static int fsd_clks_endisable(void *priv, bool enabled)
> +{
> + struct fsd_eqos_plat_data *plat = priv;
> +
> + if (enabled) {
> + return clk_bulk_prepare_enable(plat->num_clks, plat->clks);
> + } else {
> + clk_bulk_disable_unprepare(plat->num_clks, plat->clks);
> + return 0;
> + }
> +}
> +
> +static int fsd_eqos_probe(struct platform_device *pdev,
> + struct plat_stmmacenet_data *data,
> + struct stmmac_resources *res)
> +{
> + struct fsd_eqos_plat_data *priv_plat;
> + struct clk *rx1 = NULL;
> + struct clk *rx2 = NULL;
> + int ret = 0;
> +
> + priv_plat = devm_kzalloc(&pdev->dev, sizeof(*priv_plat), GFP_KERNEL);
> + if (!priv_plat)
> + return -ENOMEM;
> +
> + priv_plat->dev = &pdev->dev;
> +
> + ret = devm_clk_bulk_get_all(&pdev->dev, &priv_plat->clks);
> + if (ret < 0)
> + return dev_err_probe(&pdev->dev, ret, "No clocks available\n");
> +
> + priv_plat->num_clks = ret;
It looks like you should be able to share all the clk_bulk code with
tegra_eqos_probe(). The stmmac driver suffers from lots of cut/paste
code with no consolidation. You can at least not make the tegra code
worse by doing a little refactoring.
Andrew
^ permalink raw reply [flat|nested] 21+ messages in thread* RE: [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
2025-01-28 13:48 ` Andrew Lunn
@ 2025-01-29 9:15 ` Swathi K S
2025-01-29 13:01 ` Andrew Lunn
0 siblings, 1 reply; 21+ messages in thread
From: Swathi K S @ 2025-01-29 9:15 UTC (permalink / raw)
To: 'Andrew Lunn'
Cc: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, alim.akhtar, linux-fsd, netdev,
devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 28 January 2025 19:19
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk@kernel.org; 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; 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 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
>
> > +static int fsd_clks_endisable(void *priv, bool enabled) {
> > + struct fsd_eqos_plat_data *plat = priv;
> > +
> > + if (enabled) {
> > + return clk_bulk_prepare_enable(plat->num_clks, plat->clks);
> > + } else {
> > + clk_bulk_disable_unprepare(plat->num_clks, plat->clks);
> > + return 0;
> > + }
> > +}
> > +
> > +static int fsd_eqos_probe(struct platform_device *pdev,
> > + struct plat_stmmacenet_data *data,
> > + struct stmmac_resources *res)
> > +{
> > + struct fsd_eqos_plat_data *priv_plat;
> > + struct clk *rx1 = NULL;
> > + struct clk *rx2 = NULL;
> > + int ret = 0;
> > +
> > + priv_plat = devm_kzalloc(&pdev->dev, sizeof(*priv_plat),
> GFP_KERNEL);
> > + if (!priv_plat)
> > + return -ENOMEM;
> > +
> > + priv_plat->dev = &pdev->dev;
> > +
> > + ret = devm_clk_bulk_get_all(&pdev->dev, &priv_plat->clks);
> > + if (ret < 0)
> > + return dev_err_probe(&pdev->dev, ret, "No clocks
> available\n");
> > +
> > + priv_plat->num_clks = ret;
>
> It looks like you should be able to share all the clk_bulk code with
> tegra_eqos_probe(). The stmmac driver suffers from lots of cut/paste code
> with no consolidation. You can at least not make the tegra code worse by
> doing a little refactoring.
Hi Andrew,
Just to clarify, you were referring to refactoring tegra code to use
clk_bulk APIs, right?
In that case, will look into this and evaluate the best approach for
refactoring the code.
- Swathi
>
> Andrew
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
2025-01-29 9:15 ` Swathi K S
@ 2025-01-29 13:01 ` Andrew Lunn
0 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2025-01-29 13:01 UTC (permalink / raw)
To: Swathi K S
Cc: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, alim.akhtar, linux-fsd, netdev,
devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
> > It looks like you should be able to share all the clk_bulk code with
> > tegra_eqos_probe(). The stmmac driver suffers from lots of cut/paste code
> > with no consolidation. You can at least not make the tegra code worse by
> > doing a little refactoring.
>
> Hi Andrew,
> Just to clarify, you were referring to refactoring tegra code to use
> clk_bulk APIs, right?
Yes.
Andrew
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
2025-01-28 10:25 ` [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
2025-01-28 13:48 ` Andrew Lunn
@ 2025-01-28 14:59 ` Russell King (Oracle)
2025-01-29 9:20 ` Swathi K S
1 sibling, 1 reply; 21+ messages in thread
From: Russell King (Oracle) @ 2025-01-28 14:59 UTC (permalink / raw)
To: Swathi K S
Cc: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd,
netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
On Tue, Jan 28, 2025 at 03:55:56PM +0530, Swathi K S wrote:
> +struct fsd_eqos_plat_data {
> + struct clk_bulk_data *clks;
> + int num_clks;
> + struct device *dev;
You only write to this, so it serves no purpose in this patch. Please
remove.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 21+ messages in thread* RE: [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
2025-01-28 14:59 ` Russell King (Oracle)
@ 2025-01-29 9:20 ` Swathi K S
0 siblings, 0 replies; 21+ messages in thread
From: Swathi K S @ 2025-01-29 9:20 UTC (permalink / raw)
To: 'Russell King (Oracle)'
Cc: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd,
netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
> -----Original Message-----
> From: Russell King (Oracle) <linux@armlinux.org.uk>
> Sent: 28 January 2025 20:30
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk@kernel.org; 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; 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 2/4] net: stmmac: dwc-qos: Add FSD EQoS support
>
> On Tue, Jan 28, 2025 at 03:55:56PM +0530, Swathi K S wrote:
> > +struct fsd_eqos_plat_data {
> > + struct clk_bulk_data *clks;
> > + int num_clks;
> > + struct device *dev;
>
> You only write to this, so it serves no purpose in this patch. Please
remove.
Hi Russell,
Thanks for reviewing.
Will remove struct device *dev from struct fsd_eqos_plat_data
-Swathi
>
> Thanks.
>
> --
> RMK's Patch system: https://protect2.fireeye.com/v1/url?k=8378c0b8-
> e2f3d582-83794bf7-74fe4860008a-3788c416dc857e61&q=1&e=4d22ed29-
> 449b-46e6-90ba-
> 9b1470e01ecb&u=https%3A%2F%2Fwww.armlinux.org.uk%2Fdeveloper%2F
> patches%2F
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v5 3/4] arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC
2025-01-28 10:25 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
2025-01-28 10:25 ` [PATCH v5 1/4] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
2025-01-28 10:25 ` [PATCH v5 2/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
@ 2025-01-28 10:25 ` Swathi K S
2025-01-28 10:25 ` [PATCH v5 4/4] arm64: dts: fsd: Add Ethernet support for PERIC " Swathi K S
2025-02-04 8:40 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Krzysztof Kozlowski
4 siblings, 0 replies; 21+ messages in thread
From: Swathi K S @ 2025-01-28 10:25 UTC (permalink / raw)
To: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
swathi.ks, rcsekar, ssiddha, jayati.sahu, pankaj.dubey,
ravi.patel, gost.dev
The FSD SoC contains two instances of Synopsys DWC QoS Ethernet IP, one
in FSYS0 block and other in PERIC block.
The ethernet interface is managed by a switch which is not managed by
Linux.
Adds device tree node for Ethernet in FSYS0 Block and enables the same for
FSD platform.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Jayati Sahu <jayati.sahu@samsung.com>
Signed-off-by: Swathi K S <swathi.ks@samsung.com>
---
arch/arm64/boot/dts/tesla/fsd-evb.dts | 9 ++++
arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 56 ++++++++++++++++++++++
arch/arm64/boot/dts/tesla/fsd.dtsi | 20 ++++++++
3 files changed, 85 insertions(+)
diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts
index 8d7794642900..2c37097c709a 100644
--- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
+++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
@@ -64,6 +64,15 @@
};
};
+ðernet_0 {
+ status = "okay";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+};
+
&fin_pll {
clock-frequency = <24000000>;
};
diff --git a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi
index 3f898cf4874c..cb437483ff6e 100644
--- a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi
+++ b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi
@@ -64,6 +64,62 @@
samsung,pin-pud = <FSD_PIN_PULL_UP>;
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
};
+
+ eth0_tx_clk: eth0-tx-clk-pins {
+ samsung,pins = "gpf0-0";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_DOWN>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth0_tx_data: eth0-tx-data-pins {
+ samsung,pins = "gpf0-1", "gpf0-2", "gpf0-3", "gpf0-4";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth0_tx_ctrl: eth0-tx-ctrl-pins {
+ samsung,pins = "gpf0-5";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth0_phy_intr: eth0-phy-intr-pins {
+ samsung,pins = "gpf0-6";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_NONE>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV4>;
+ };
+
+ eth0_rx_clk: eth0-rx-clk-pins {
+ samsung,pins = "gpf1-0";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth0_rx_data: eth0-rx-data-pins {
+ samsung,pins = "gpf1-1", "gpf1-2", "gpf1-3", "gpf1-4";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth0_rx_ctrl: eth0-rx-ctrl-pins {
+ samsung,pins = "gpf1-5";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth0_mdio: eth0-mdio-pins {
+ samsung,pins = "gpf1-6", "gpf1-7";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_NONE>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV4>;
+ };
};
&pinctrl_peric {
diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi
index 690b4ed9c29b..cc67930ebf78 100644
--- a/arch/arm64/boot/dts/tesla/fsd.dtsi
+++ b/arch/arm64/boot/dts/tesla/fsd.dtsi
@@ -1007,6 +1007,26 @@
clocks = <&clock_fsys0 UFS0_MPHY_REFCLK_IXTAL26>;
clock-names = "ref_clk";
};
+
+ ethernet_0: ethernet@15300000 {
+ compatible = "tesla,fsd-ethqos";
+ reg = <0x0 0x15300000 0x0 0x10000>;
+ interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_CLK_PTP_REF_I>,
+ <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_ACLK_I>,
+ <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_HCLK_I>,
+ <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_RGMII_CLK_I>,
+ <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_CLK_RX_I>;
+ clock-names = "ptp_ref", "master_bus", "slave_bus", "tx", "rx";
+ pinctrl-names = "default";
+ pinctrl-0 = <ð0_tx_clk>, <ð0_tx_data>, <ð0_tx_ctrl>,
+ <ð0_phy_intr>, <ð0_rx_clk>, <ð0_rx_data>,
+ <ð0_rx_ctrl>, <ð0_mdio>;
+ local-mac-address = [00 00 00 00 00 00];
+ iommus = <&smmu_fsys0 0x0 0x1>;
+ phy-mode = "rgmii-id";
+ status = "disabled";
+ };
};
};
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread* [PATCH v5 4/4] arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC
2025-01-28 10:25 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
` (2 preceding siblings ...)
2025-01-28 10:25 ` [PATCH v5 3/4] arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC Swathi K S
@ 2025-01-28 10:25 ` Swathi K S
2025-01-28 14:18 ` Krzysztof Kozlowski
2025-02-04 8:40 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Krzysztof Kozlowski
4 siblings, 1 reply; 21+ messages in thread
From: Swathi K S @ 2025-01-28 10:25 UTC (permalink / raw)
To: krzk, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
swathi.ks, rcsekar, ssiddha, jayati.sahu, pankaj.dubey,
ravi.patel, gost.dev
The FSD SoC contains two instances of Synopsys DWC QoS Ethernet IP, one in
FSYS0 block and other in PERIC block.
The ethernet interface is connected to a switch which is not managed by
Linux.
Adds device tree node for Ethernet in PERIC Block and enables the same for
FSD platform.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Jayati Sahu <jayati.sahu@samsung.com>
Signed-off-by: Swathi K S <swathi.ks@samsung.com>
---
arch/arm64/boot/dts/tesla/fsd-evb.dts | 9 ++++
arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 56 ++++++++++++++++++++++
arch/arm64/boot/dts/tesla/fsd.dtsi | 27 +++++++++++
3 files changed, 92 insertions(+)
diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts
index 2c37097c709a..80ca120b3d7f 100644
--- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
+++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
@@ -73,6 +73,15 @@
};
};
+ðernet_1 {
+ status = "okay";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+};
+
&fin_pll {
clock-frequency = <24000000>;
};
diff --git a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi
index cb437483ff6e..6f4658f57453 100644
--- a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi
+++ b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi
@@ -437,6 +437,62 @@
samsung,pin-pud = <FSD_PIN_PULL_DOWN>;
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
};
+
+ eth1_tx_clk: eth1-tx-clk-pins {
+ samsung,pins = "gpf2-0";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_DOWN>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth1_tx_data: eth1-tx-data-pins {
+ samsung,pins = "gpf2-1", "gpf2-2", "gpf2-3", "gpf2-4";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth1_tx_ctrl: eth1-tx-ctrl-pins {
+ samsung,pins = "gpf2-5";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth1_phy_intr: eth1-phy-intr-pins {
+ samsung,pins = "gpf2-6";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV4>;
+ };
+
+ eth1_rx_clk: eth1-rx-clk-pins {
+ samsung,pins = "gpf3-0";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth1_rx_data: eth1-rx-data-pins {
+ samsung,pins = "gpf3-1", "gpf3-2", "gpf3-3", "gpf3-4";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth1_rx_ctrl: eth1-rx-ctrl-pins {
+ samsung,pins = "gpf3-5";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV6>;
+ };
+
+ eth1_mdio: eth1-mdio-pins {
+ samsung,pins = "gpf3-6", "gpf3-7";
+ samsung,pin-function = <FSD_PIN_FUNC_2>;
+ samsung,pin-pud = <FSD_PIN_PULL_UP>;
+ samsung,pin-drv = <FSD_PIN_DRV_LV4>;
+ };
};
&pinctrl_pmu {
diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi
index cc67930ebf78..670f6a852542 100644
--- a/arch/arm64/boot/dts/tesla/fsd.dtsi
+++ b/arch/arm64/boot/dts/tesla/fsd.dtsi
@@ -1027,6 +1027,33 @@
phy-mode = "rgmii-id";
status = "disabled";
};
+
+ 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>;
+ local-mac-address = [00 00 00 00 00 00];
+ iommus = <&smmu_peric 0x0 0x1>;
+ phy-mode = "rgmii-id";
+ status = "disabled";
+ };
};
};
--
2.17.1
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [PATCH v5 4/4] arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC
2025-01-28 10:25 ` [PATCH v5 4/4] arm64: dts: fsd: Add Ethernet support for PERIC " Swathi K S
@ 2025-01-28 14:18 ` Krzysztof Kozlowski
2025-01-29 9:19 ` Swathi K S
0 siblings, 1 reply; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-28 14:18 UTC (permalink / raw)
To: Swathi K S, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
On 28/01/2025 11:25, Swathi K S wrote:
>
> &pinctrl_pmu {
> diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi
> index cc67930ebf78..670f6a852542 100644
> --- a/arch/arm64/boot/dts/tesla/fsd.dtsi
> +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi
> @@ -1027,6 +1027,33 @@
> phy-mode = "rgmii-id";
> status = "disabled";
> };
> +
> + ethernet_1: ethernet@14300000 {
Don't add nodes to the end, because that lead to mess we have there.
Squeeze it somewhere where impact on resorting would be the smallest.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread* RE: [PATCH v5 4/4] arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC
2025-01-28 14:18 ` Krzysztof Kozlowski
@ 2025-01-29 9:19 ` Swathi K S
2025-01-29 13:07 ` Andrew Lunn
0 siblings, 1 reply; 21+ messages in thread
From: Swathi K S @ 2025-01-29 9:19 UTC (permalink / raw)
To: 'Krzysztof Kozlowski'
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev,
robh, davem, edumazet, kuba, pabeni, conor+dt, richardcochran,
mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 28 January 2025 19:48
> 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 4/4] arm64: dts: fsd: Add Ethernet support for PERIC
> Block of FSD SoC
>
> On 28/01/2025 11:25, Swathi K S wrote:
> >
> > &pinctrl_pmu {
> > diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi
> b/arch/arm64/boot/dts/tesla/fsd.dtsi
> > index cc67930ebf78..670f6a852542 100644
> > --- a/arch/arm64/boot/dts/tesla/fsd.dtsi
> > +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi
> > @@ -1027,6 +1027,33 @@
> > phy-mode = "rgmii-id";
> > status = "disabled";
> > };
> > +
> > + ethernet_1: ethernet@14300000 {
>
> Don't add nodes to the end, because that lead to mess we have there.
> Squeeze it somewhere where impact on resorting would be the smallest.
Just to clarify, inserting the node somewhere in the middle, where it fits alphabetically, would minimize the impact on resorting.
Is my understanding correct?
-Swathi
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [PATCH v5 4/4] arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC
2025-01-29 9:19 ` Swathi K S
@ 2025-01-29 13:07 ` Andrew Lunn
0 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2025-01-29 13:07 UTC (permalink / raw)
To: Swathi K S
Cc: 'Krzysztof Kozlowski', netdev, devicetree, linux-kernel,
linux-stm32, linux-arm-kernel, linux-samsung-soc,
alexandre.torgue, peppe.cavallaro, joabreu, rcsekar, ssiddha,
jayati.sahu, pankaj.dubey, ravi.patel, gost.dev, robh, davem,
edumazet, kuba, pabeni, conor+dt, richardcochran, mcoquelin.stm32,
alim.akhtar, linux-fsd
On Wed, Jan 29, 2025 at 02:49:14PM +0530, Swathi K S wrote:
>
>
> > -----Original Message-----
> > From: Krzysztof Kozlowski <krzk@kernel.org>
> > Sent: 28 January 2025 19:48
> > 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 4/4] arm64: dts: fsd: Add Ethernet support for PERIC
> > Block of FSD SoC
> >
> > On 28/01/2025 11:25, Swathi K S wrote:
> > >
> > > &pinctrl_pmu {
> > > diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi
> > b/arch/arm64/boot/dts/tesla/fsd.dtsi
> > > index cc67930ebf78..670f6a852542 100644
> > > --- a/arch/arm64/boot/dts/tesla/fsd.dtsi
> > > +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi
> > > @@ -1027,6 +1027,33 @@
> > > phy-mode = "rgmii-id";
> > > status = "disabled";
> > > };
> > > +
> > > + ethernet_1: ethernet@14300000 {
> >
> > Don't add nodes to the end, because that lead to mess we have there.
> > Squeeze it somewhere where impact on resorting would be the smallest.
>
> Just to clarify, inserting the node somewhere in the middle, where it fits alphabetically, would minimize the impact on resorting.
> Is my understanding correct?
I think the coding style says to order them by address. So sort on
14300000.
The issue here is merging patches coming from different subsystems. If
these patches are merged via netdev, and there are other patches for
other devices coming from other subsystem, there is going to be a
merge conflict if they all append to the end. By keeping things
ordered, the chance of a merge conflict is much lower, since the
changes are likely to be separated. So you will find in Linux anything
which can be sorted is sorted. Makefile, Kconfig, order of #includes
etc.
Andrew
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support
2025-01-28 10:25 ` [PATCH v5 0/4] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
` (3 preceding siblings ...)
2025-01-28 10:25 ` [PATCH v5 4/4] arm64: dts: fsd: Add Ethernet support for PERIC " Swathi K S
@ 2025-02-04 8:40 ` Krzysztof Kozlowski
4 siblings, 0 replies; 21+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-04 8:40 UTC (permalink / raw)
To: Swathi K S, robh, davem, edumazet, kuba, pabeni, conor+dt,
richardcochran, mcoquelin.stm32, andrew, alim.akhtar, linux-fsd
Cc: netdev, devicetree, linux-kernel, linux-stm32, linux-arm-kernel,
linux-samsung-soc, alexandre.torgue, peppe.cavallaro, joabreu,
rcsekar, ssiddha, jayati.sahu, pankaj.dubey, ravi.patel, gost.dev
On 28/01/2025 11:25, Swathi K S wrote:
> FSD platform has two instances of EQoS IP, one is in FSYS0 block and
> another one is in PERIC block. This patch series add required DT binding,
> DT file modifications and platform driver specific changes for the same.
>
> Changes since v4:
> 1. Avoided switching between internal and external clocks for every open/
> close.
> 2. Addressed the review comments on DT bindings
>
> Here is the link to v4 patches for reference:
> https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=&submitter=211782&state=&q=&archive=true&delegate=
>
> Swathi K S (4):
> dt-bindings: net: Add FSD EQoS device tree bindings
> net: stmmac: dwc-qos: Add FSD EQoS support
> arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC
> arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC
In next versions, please split DTS from net and send it separately with
*lore* link to the posting of bindings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 21+ messages in thread