* [PATCH v6 0/2] net: stmmac: dwc-qos: Add FSD EQoS support
[not found] <CGME20250213044950epcas5p1a7badb480a7e8d843fe0ff51bcf5cbf4@epcas5p1.samsung.com>
@ 2025-02-13 4:46 ` Swathi K S
[not found] ` <CGME20250213044955epcas5p110d1e582c8ee02579ead73f9686819ff@epcas5p1.samsung.com>
[not found] ` <CGME20250213044959epcas5p1b6f6d5554f69b5c24a5b4a15c8bf1fc9@epcas5p1.samsung.com>
0 siblings, 2 replies; 17+ messages in thread
From: Swathi K S @ 2025-02-13 4:46 UTC (permalink / raw)
To: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue
Cc: rmk+kernel, swathi.ks, netdev, devicetree, linux-stm32,
linux-arm-kernel, linux-kernel
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
and platform driver specific changes for the same.
Changes since v1:
1. Updated dwc_eqos_setup_rxclock() function as per the review comments
given by Andrew.
Changes since v2:
1. Addressed all the review comments suggested by Krzysztof with respect to
DT binding file.
2. Added SOB Swathi.
Changes since v3:
1. Avoided using alias-id to configure the HW.
2. Modified the clock implementation.
Changes since v4:
1. Avoided switching between internal and external clocks for every open/
close.
2. Addressed the review comments on DT bindings
Changes since v5:
1. Addressed the review comment on correcting the intendation.
2. Corrected the compatible name in dt-binding file.
3. Listed and described the clocks in dt-binding.
4. Modified FSD probe as per the changes in the refactoring patch given
below: https://lore.kernel.org/netdev/20250207121849.55815-1-swathi.ks@samsung.com/
Here is the link to v5 patches for reference:
https://lore.kernel.org/netdev/1cb63ff4-8926-4bbc-8a78-59103d167140@kernel.org/
Swathi K S (2):
dt-bindings: net: Add FSD EQoS device tree bindings
net: stmmac: dwc-qos: Add FSD EQoS support
.../devicetree/bindings/net/snps,dwmac.yaml | 5 +-
.../bindings/net/tesla,fsd-ethqos.yaml | 114 ++++++++++++++++++
.../stmicro/stmmac/dwmac-dwc-qos-eth.c | 28 +++++
3 files changed, 145 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml
--
2.17.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
[not found] ` <CGME20250213044955epcas5p110d1e582c8ee02579ead73f9686819ff@epcas5p1.samsung.com>
@ 2025-02-13 4:46 ` Swathi K S
2025-02-13 7:54 ` Krzysztof Kozlowski
2025-02-14 0:19 ` Andrew Lunn
0 siblings, 2 replies; 17+ messages in thread
From: Swathi K S @ 2025-02-13 4:46 UTC (permalink / raw)
To: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue
Cc: rmk+kernel, swathi.ks, netdev, devicetree, linux-stm32,
linux-arm-kernel, linux-kernel
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 | 114 ++++++++++++++++++
2 files changed, 117 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..c7004eaa8eae 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -102,6 +102,7 @@ properties:
- snps,dwxgmac-2.10
- starfive,jh7100-dwmac
- starfive,jh7110-dwmac
+ - tesla,fsd-ethqos
- thead,th1520-gmac
reg:
@@ -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..9d7d632fcd92
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/tesla,fsd-ethqos.yaml
@@ -0,0 +1,114 @@
+# 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
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ items:
+ - const: macirq
+
+ clocks:
+ minItems: 5
+ items:
+ - description: PTP clock
+ - description: Master bus clock
+ - description: Slave bus clock
+ - description: MAC TX clock
+ - description: MAC RX clock
+ - description: Master2 bus clock
+ - description: Slave2 bus clock
+ - description: RX MUX clock
+ - description: PHY RX clock
+ - description: PERIC RGMII clock
+
+ clock-names:
+ minItems: 5
+ maxItems: 10
+ contains:
+ enum:
+ - ptp_ref
+ - master_bus
+ - slave_bus
+ - tx
+ - rx
+ - master2_bus
+ - slave2_bus
+ - eqos_rxclk_mux
+ - eqos_phyrxclk
+ - dout_peric_rgmii_clk
+
+ 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>
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ethernet1: ethernet@14300000 {
+ compatible = "tesla,fsd-ethqos";
+ reg = <0x0 0x14300000 0x0 0x10000>;
+ interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ 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] 17+ messages in thread
* [PATCH v6 2/2] net: stmmac: dwc-qos: Add FSD EQoS support
[not found] ` <CGME20250213044959epcas5p1b6f6d5554f69b5c24a5b4a15c8bf1fc9@epcas5p1.samsung.com>
@ 2025-02-13 4:46 ` Swathi K S
0 siblings, 0 replies; 17+ messages in thread
From: Swathi K S @ 2025-02-13 4:46 UTC (permalink / raw)
To: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue
Cc: rmk+kernel, swathi.ks, netdev, devicetree, linux-stm32,
linux-arm-kernel, linux-kernel
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: Swathi K S <swathi.ks@samsung.com>
---
.../stmicro/stmmac/dwmac-dwc-qos-eth.c | 28 +++++++++++++++++++
1 file changed, 28 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 5d2dd123979b..e3b383d8e7ef 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -308,6 +308,29 @@ static void tegra_eqos_remove(struct platform_device *pdev)
gpiod_set_value(eqos->reset, 1);
}
+static int fsd_eqos_probe(struct platform_device *pdev,
+ struct plat_stmmacenet_data *data,
+ struct stmmac_resources *res)
+{
+ struct clk *clk_rx1 = NULL;
+ struct clk *clk_rx2 = NULL;
+
+ for (int i = 0; i < data->num_clks; i++) {
+ if (strcmp(data->clks[i].id, "slave_bus") == 0)
+ data->stmmac_clk = data->clks[i].clk;
+ else if (strcmp(data->clks[i].id, "eqos_rxclk_mux") == 0)
+ clk_rx1 = data->clks[i].clk;
+ else if (strcmp(data->clks[i].id, "eqos_phyrxclk") == 0)
+ clk_rx2 = data->clks[i].clk;
+ }
+
+ /* Eth0 RX clock doesn't support MUX */
+ if (clk_rx1)
+ clk_set_parent(clk_rx1, clk_rx2);
+
+ return 0;
+}
+
struct dwc_eth_dwmac_data {
int (*probe)(struct platform_device *pdev,
struct plat_stmmacenet_data *data,
@@ -324,6 +347,10 @@ 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,
+};
+
static int dwc_eth_dwmac_probe(struct platform_device *pdev)
{
const struct dwc_eth_dwmac_data *data;
@@ -402,6 +429,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] 17+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-13 4:46 ` [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
@ 2025-02-13 7:54 ` Krzysztof Kozlowski
2025-02-13 11:04 ` Swathi K S
2025-02-14 0:19 ` Andrew Lunn
1 sibling, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-13 7:54 UTC (permalink / raw)
To: Swathi K S
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On Thu, Feb 13, 2025 at 10:16:23AM +0530, Swathi K S wrote:
> + clock-names:
> + minItems: 5
> + maxItems: 10
> + contains:
> + enum:
> + - ptp_ref
> + - master_bus
> + - slave_bus
> + - tx
> + - rx
> + - master2_bus
> + - slave2_bus
> + - eqos_rxclk_mux
> + - eqos_phyrxclk
> + - dout_peric_rgmii_clk
This does not match the previous entry. It should be strictly ordered
with minItems: 5.
> +
> + 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>
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ethernet1: ethernet@14300000 {
> + compatible = "tesla,fsd-ethqos";
> + reg = <0x0 0x14300000 0x0 0x10000>;
> + interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "macirq";
> + 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";
> + };
Misaligned/misindented.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-13 7:54 ` Krzysztof Kozlowski
@ 2025-02-13 11:04 ` Swathi K S
2025-02-13 12:00 ` Krzysztof Kozlowski
0 siblings, 1 reply; 17+ messages in thread
From: Swathi K S @ 2025-02-13 11:04 UTC (permalink / raw)
To: 'Krzysztof Kozlowski'
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 13 February 2025 13:24
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
> bindings
>
> On Thu, Feb 13, 2025 at 10:16:23AM +0530, Swathi K S wrote:
> > + clock-names:
> > + minItems: 5
> > + maxItems: 10
> > + contains:
> > + enum:
> > + - ptp_ref
> > + - master_bus
> > + - slave_bus
> > + - tx
> > + - rx
> > + - master2_bus
> > + - slave2_bus
> > + - eqos_rxclk_mux
> > + - eqos_phyrxclk
> > + - dout_peric_rgmii_clk
>
> This does not match the previous entry. It should be strictly ordered with
> minItems: 5.
Hi Krzysztof,
Thanks for reviewing.
In FSD SoC, we have 2 instances of ethernet in two blocks.
One instance needs 5 clocks and the other needs 10 clocks.
I tried to understand this by looking at some other dt-binding files as given below, but looks like they follow similar approach
Documentation/devicetree/bindings/net/stm32-dwmac.yaml
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
Could you please guide me on how to implement this?
Also, please help me understand what is meant by 'strictly ordered'
>
>
> > +
> > + 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>
> > + soc {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > + ethernet1: ethernet@14300000 {
> > + compatible = "tesla,fsd-ethqos";
> > + reg = <0x0 0x14300000 0x0 0x10000>;
> > + interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "macirq";
> > + 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";
> > + };
>
> Misaligned/misindented.
Ack
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-13 11:04 ` Swathi K S
@ 2025-02-13 12:00 ` Krzysztof Kozlowski
2025-02-14 4:53 ` Swathi K S
0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-13 12:00 UTC (permalink / raw)
To: Swathi K S
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On 13/02/2025 12:04, Swathi K S wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzk@kernel.org>
>> Sent: 13 February 2025 13:24
>> To: Swathi K S <swathi.ks@samsung.com>
>> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
>> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
>> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
>> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
>> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
>> devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
>> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
>> bindings
>>
>> On Thu, Feb 13, 2025 at 10:16:23AM +0530, Swathi K S wrote:
>>> + clock-names:
>>> + minItems: 5
>>> + maxItems: 10
>>> + contains:
>>> + enum:
>>> + - ptp_ref
>>> + - master_bus
>>> + - slave_bus
>>> + - tx
>>> + - rx
>>> + - master2_bus
>>> + - slave2_bus
>>> + - eqos_rxclk_mux
>>> + - eqos_phyrxclk
>>> + - dout_peric_rgmii_clk
>>
>> This does not match the previous entry. It should be strictly ordered with
>> minItems: 5.
>
> Hi Krzysztof,
> Thanks for reviewing.
> In FSD SoC, we have 2 instances of ethernet in two blocks.
> One instance needs 5 clocks and the other needs 10 clocks.
I understand and I do not think this is contradictory to what I asked.
If it is, then why/how?
>
> I tried to understand this by looking at some other dt-binding files as given below, but looks like they follow similar approach
> Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
>
> Could you please guide me on how to implement this?
> Also, please help me understand what is meant by 'strictly ordered'
Every other 99% of bindings. Just like your clocks property.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-13 4:46 ` [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
2025-02-13 7:54 ` Krzysztof Kozlowski
@ 2025-02-14 0:19 ` Andrew Lunn
2025-02-14 5:17 ` Swathi K S
1 sibling, 1 reply; 17+ messages in thread
From: Andrew Lunn @ 2025-02-14 0:19 UTC (permalink / raw)
To: Swathi K S
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
> + phy-mode:
> + enum:
> + - rgmii-id
phy-mode is normally a board property, in the .dts file, since the
board might decide to have extra long clock lines and so want
'rgmii'.
The only reason i can think of putting rgmii-id here is if the MAC
only supports 'rgmii-id', it is impossible to make it not add delays.
If that is true, a comment would be good.
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-13 12:00 ` Krzysztof Kozlowski
@ 2025-02-14 4:53 ` Swathi K S
2025-02-14 7:31 ` Krzysztof Kozlowski
0 siblings, 1 reply; 17+ messages in thread
From: Swathi K S @ 2025-02-14 4:53 UTC (permalink / raw)
To: 'Krzysztof Kozlowski'
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 13 February 2025 17:31
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
> bindings
>
> On 13/02/2025 12:04, Swathi K S wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzk@kernel.org>
> >> Sent: 13 February 2025 13:24
> >> To: Swathi K S <swathi.ks@samsung.com>
> >> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch;
> davem@davemloft.net;
> >> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> >> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> >> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> >> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> >> devicetree@vger.kernel.org; linux-stm32@st-md-
> mailman.stormreply.com;
> >> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> >> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device
> >> tree bindings
> >>
> >> On Thu, Feb 13, 2025 at 10:16:23AM +0530, Swathi K S wrote:
> >>> + clock-names:
> >>> + minItems: 5
> >>> + maxItems: 10
> >>> + contains:
> >>> + enum:
> >>> + - ptp_ref
> >>> + - master_bus
> >>> + - slave_bus
> >>> + - tx
> >>> + - rx
> >>> + - master2_bus
> >>> + - slave2_bus
> >>> + - eqos_rxclk_mux
> >>> + - eqos_phyrxclk
> >>> + - dout_peric_rgmii_clk
> >>
> >> This does not match the previous entry. It should be strictly ordered
> >> with
> >> minItems: 5.
> >
> > Hi Krzysztof,
> > Thanks for reviewing.
> > In FSD SoC, we have 2 instances of ethernet in two blocks.
> > One instance needs 5 clocks and the other needs 10 clocks.
>
> I understand and I do not think this is contradictory to what I asked.
> If it is, then why/how?
>
> >
> > I tried to understand this by looking at some other dt-binding files
> > as given below, but looks like they follow similar approach
> > Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> > Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
> >
> > Could you please guide me on how to implement this?
> > Also, please help me understand what is meant by 'strictly ordered'
>
> Every other 99% of bindings. Just like your clocks property.
Hi Krzysztof,
Thanks for your feedback.
I want to make sure I fully understand your comment.
I can see we have added clocks and clock names in the same order.
Could you please help in detail what specifically needs to be modified regarding the ordering and minItems/maxItems usage?
-Swathi
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-14 0:19 ` Andrew Lunn
@ 2025-02-14 5:17 ` Swathi K S
2025-02-14 13:10 ` Andrew Lunn
0 siblings, 1 reply; 17+ messages in thread
From: Swathi K S @ 2025-02-14 5:17 UTC (permalink / raw)
To: 'Andrew Lunn'
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, 'Pankaj Dubey'
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 14 February 2025 05:50
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
> bindings
>
> > + phy-mode:
> > + enum:
> > + - rgmii-id
>
> phy-mode is normally a board property, in the .dts file, since the board
might
> decide to have extra long clock lines and so want 'rgmii'.
>
> The only reason i can think of putting rgmii-id here is if the MAC only
> supports 'rgmii-id', it is impossible to make it not add delays.
> If that is true, a comment would be good.
Hi Andrew,
Thanks for reviewing.
I think we already discussed this part some time back here [1]
[1] :
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20230814112539.7
0453-2-sriranjani.p@samsung.com/#25879995
Please do let me know if there is any other concern on this.
-Swathi
>
> Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-14 4:53 ` Swathi K S
@ 2025-02-14 7:31 ` Krzysztof Kozlowski
2025-02-14 9:33 ` Swathi K S
0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-14 7:31 UTC (permalink / raw)
To: Swathi K S
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On 14/02/2025 05:53, Swathi K S wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzk@kernel.org>
>> Sent: 13 February 2025 17:31
>> To: Swathi K S <swathi.ks@samsung.com>
>> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
>> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
>> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
>> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
>> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
>> devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
>> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
>> bindings
>>
>> On 13/02/2025 12:04, Swathi K S wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Krzysztof Kozlowski <krzk@kernel.org>
>>>> Sent: 13 February 2025 13:24
>>>> To: Swathi K S <swathi.ks@samsung.com>
>>>> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch;
>> davem@davemloft.net;
>>>> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
>>>> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
>>>> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
>>>> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
>>>> devicetree@vger.kernel.org; linux-stm32@st-md-
>> mailman.stormreply.com;
>>>> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
>>>> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device
>>>> tree bindings
>>>>
>>>> On Thu, Feb 13, 2025 at 10:16:23AM +0530, Swathi K S wrote:
>>>>> + clock-names:
>>>>> + minItems: 5
>>>>> + maxItems: 10
>>>>> + contains:
>>>>> + enum:
>>>>> + - ptp_ref
>>>>> + - master_bus
>>>>> + - slave_bus
>>>>> + - tx
>>>>> + - rx
>>>>> + - master2_bus
>>>>> + - slave2_bus
>>>>> + - eqos_rxclk_mux
>>>>> + - eqos_phyrxclk
>>>>> + - dout_peric_rgmii_clk
>>>>
>>>> This does not match the previous entry. It should be strictly ordered
>>>> with
>>>> minItems: 5.
>>>
>>> Hi Krzysztof,
>>> Thanks for reviewing.
>>> In FSD SoC, we have 2 instances of ethernet in two blocks.
>>> One instance needs 5 clocks and the other needs 10 clocks.
>>
>> I understand and I do not think this is contradictory to what I asked.
>> If it is, then why/how?
>>
>>>
>>> I tried to understand this by looking at some other dt-binding files
>>> as given below, but looks like they follow similar approach
>>> Documentation/devicetree/bindings/net/stm32-dwmac.yaml
>>> Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
>>>
>>> Could you please guide me on how to implement this?
>>> Also, please help me understand what is meant by 'strictly ordered'
>>
>> Every other 99% of bindings. Just like your clocks property.
>
> Hi Krzysztof,
> Thanks for your feedback.
> I want to make sure I fully understand your comment.
> I can see we have added clocks and clock names in the same order.
No, you did not. You can see syntax is very different - one uses items,
other uses contains-enum. And now test it, change the order in DTS and
see if you see any warning.
> Could you please help in detail what specifically needs to be modified regarding the ordering and minItems/maxItems usage?
You did not try hard enough.
Open other bindings and look how they list clocks. For example any
Samsung clock controller bindings. Or any qcom bindings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-14 7:31 ` Krzysztof Kozlowski
@ 2025-02-14 9:33 ` Swathi K S
2025-02-14 10:55 ` Krzysztof Kozlowski
0 siblings, 1 reply; 17+ messages in thread
From: Swathi K S @ 2025-02-14 9:33 UTC (permalink / raw)
To: 'Krzysztof Kozlowski'
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, 'Pankaj Dubey'
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: 14 February 2025 13:02
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
> bindings
>
> On 14/02/2025 05:53, Swathi K S wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzk@kernel.org>
> >> Sent: 13 February 2025 17:31
> >> To: Swathi K S <swathi.ks@samsung.com>
> >> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch;
> davem@davemloft.net;
> >> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> >> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> >> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> >> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> >> devicetree@vger.kernel.org; linux-stm32@st-md-
> mailman.stormreply.com;
> >> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> >> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device
> >> tree bindings
> >>
> >> On 13/02/2025 12:04, Swathi K S wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Krzysztof Kozlowski <krzk@kernel.org>
> >>>> Sent: 13 February 2025 13:24
> >>>> To: Swathi K S <swathi.ks@samsung.com>
> >>>> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch;
> >> davem@davemloft.net;
> >>>> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> >>>> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> >>>> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> >>>> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> >>>> devicetree@vger.kernel.org; linux-stm32@st-md-
> >> mailman.stormreply.com;
> >>>> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> >>>> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device
> >>>> tree bindings
> >>>>
> >>>> On Thu, Feb 13, 2025 at 10:16:23AM +0530, Swathi K S wrote:
> >>>>> + clock-names:
> >>>>> + minItems: 5
> >>>>> + maxItems: 10
> >>>>> + contains:
> >>>>> + enum:
> >>>>> + - ptp_ref
> >>>>> + - master_bus
> >>>>> + - slave_bus
> >>>>> + - tx
> >>>>> + - rx
> >>>>> + - master2_bus
> >>>>> + - slave2_bus
> >>>>> + - eqos_rxclk_mux
> >>>>> + - eqos_phyrxclk
> >>>>> + - dout_peric_rgmii_clk
> >>>>
> >>>> This does not match the previous entry. It should be strictly
> >>>> ordered with
> >>>> minItems: 5.
> >>>
> >>> Hi Krzysztof,
> >>> Thanks for reviewing.
> >>> In FSD SoC, we have 2 instances of ethernet in two blocks.
> >>> One instance needs 5 clocks and the other needs 10 clocks.
> >>
> >> I understand and I do not think this is contradictory to what I asked.
> >> If it is, then why/how?
> >>
> >>>
> >>> I tried to understand this by looking at some other dt-binding files
> >>> as given below, but looks like they follow similar approach
> >>> Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> >>> Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
> >>>
> >>> Could you please guide me on how to implement this?
> >>> Also, please help me understand what is meant by 'strictly ordered'
> >>
> >> Every other 99% of bindings. Just like your clocks property.
> >
> > Hi Krzysztof,
> > Thanks for your feedback.
> > I want to make sure I fully understand your comment.
> > I can see we have added clocks and clock names in the same order.
>
> No, you did not. You can see syntax is very different - one uses items, other
> uses contains-enum. And now test it, change the order in DTS and see if you
> see any warning.
>
> > Could you please help in detail what specifically needs to be modified
> regarding the ordering and minItems/maxItems usage?
> You did not try hard enough.
>
> Open other bindings and look how they list clocks. For example any Samsung
> clock controller bindings. Or any qcom bindings.
Thanks for your insight. I tried understanding the dt-binding implementations from Samsung/ qcom as you suggested.
I am thinking of making the following modification in clock-names:
clock-names:
minItems: 5
items:
- const: ptp_ref
- const: master_bus
- const: slave_bus
- const: tx
- const: rx
- const: master2_bus
- const: slave2_bus
- const: eqos_rxclk_mux
- const: eqos_phyrxclk
- const: dout_peric_rgmii_clk
Does this align with your feedback or do you suggest any further changes?
-Swathi
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-14 9:33 ` Swathi K S
@ 2025-02-14 10:55 ` Krzysztof Kozlowski
0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-14 10:55 UTC (permalink / raw)
To: Swathi K S
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, 'Pankaj Dubey'
On 14/02/2025 10:33, Swathi K S wrote:
>>> Could you please help in detail what specifically needs to be modified
>> regarding the ordering and minItems/maxItems usage?
>> You did not try hard enough.
>>
>> Open other bindings and look how they list clocks. For example any Samsung
>> clock controller bindings. Or any qcom bindings.
>
> Thanks for your insight. I tried understanding the dt-binding implementations from Samsung/ qcom as you suggested.
> I am thinking of making the following modification in clock-names:
>
> clock-names:
> minItems: 5
> items:
> - const: ptp_ref
> - const: master_bus
> - const: slave_bus
> - const: tx
> - const: rx
> - const: master2_bus
> - const: slave2_bus
> - const: eqos_rxclk_mux
> - const: eqos_phyrxclk
> - const: dout_peric_rgmii_clk
>
> Does this align with your feedback or do you suggest any further changes?
Yes.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-14 5:17 ` Swathi K S
@ 2025-02-14 13:10 ` Andrew Lunn
2025-02-17 5:19 ` Swathi K S
0 siblings, 1 reply; 17+ messages in thread
From: Andrew Lunn @ 2025-02-14 13:10 UTC (permalink / raw)
To: Swathi K S
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, 'Pankaj Dubey'
On Fri, Feb 14, 2025 at 10:47:39AM +0530, Swathi K S wrote:
>
>
> > -----Original Message-----
> > From: Andrew Lunn <andrew@lunn.ch>
> > Sent: 14 February 2025 05:50
> > To: Swathi K S <swathi.ks@samsung.com>
> > Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
> > edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> > robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> > mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> > rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> > devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
> > bindings
> >
> > > + phy-mode:
> > > + enum:
> > > + - rgmii-id
> >
> > phy-mode is normally a board property, in the .dts file, since the board
> might
> > decide to have extra long clock lines and so want 'rgmii'.
> >
> > The only reason i can think of putting rgmii-id here is if the MAC only
> > supports 'rgmii-id', it is impossible to make it not add delays.
> > If that is true, a comment would be good.
>
>
> Hi Andrew,
> Thanks for reviewing.
> I think we already discussed this part some time back here [1]
> [1] :
> https://patchwork.kernel.org/project/linux-arm-kernel/patch/20230814112539.7
> 0453-2-sriranjani.p@samsung.com/#25879995
> Please do let me know if there is any other concern on this.
We partially discussed this in this thread.
As i said, what value you need here depends on the board design. The
PCB could provide the 2ns delay, in which case, 'rgmii' would be the
correct value to have in the board .dts file. Hence the binding should
not restrict the value of phy-mode to just rgmii-id. All 4 rmgii
values should be accepted.
The only reason you would force only rgmii-id is if the MAC/PHY pair
cannot do anything else. If that really is true, i would expect a
comment in the binding, and the MAC driver to return -EINVAL for
anything but rgmii-id.
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-14 13:10 ` Andrew Lunn
@ 2025-02-17 5:19 ` Swathi K S
2025-02-17 15:18 ` Andrew Lunn
0 siblings, 1 reply; 17+ messages in thread
From: Swathi K S @ 2025-02-17 5:19 UTC (permalink / raw)
To: 'Andrew Lunn'
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, 'Pankaj Dubey', ravi.patel
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 14 February 2025 18:40
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
'Pankaj
> Dubey' <pankaj.dubey@samsung.com>
> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
> bindings
>
> On Fri, Feb 14, 2025 at 10:47:39AM +0530, Swathi K S wrote:
> >
> >
> > > -----Original Message-----
> > > From: Andrew Lunn <andrew@lunn.ch>
> > > Sent: 14 February 2025 05:50
> > > To: Swathi K S <swathi.ks@samsung.com>
> > > Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch;
> davem@davemloft.net;
> > > edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> > > robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> > > mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> > > rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> > > devicetree@vger.kernel.org;
> > > linux-stm32@st-md-mailman.stormreply.com;
> > > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> > > Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device
> > > tree bindings
> > >
> > > > + phy-mode:
> > > > + enum:
> > > > + - rgmii-id
> > >
> > > phy-mode is normally a board property, in the .dts file, since the
> > > board
> > might
> > > decide to have extra long clock lines and so want 'rgmii'.
> > >
> > > The only reason i can think of putting rgmii-id here is if the MAC
> > > only supports 'rgmii-id', it is impossible to make it not add delays.
> > > If that is true, a comment would be good.
> >
> >
> > Hi Andrew,
> > Thanks for reviewing.
> > I think we already discussed this part some time back here [1] [1] :
> > https://patchwork.kernel.org/project/linux-arm-kernel/patch/2023081411
> > 2539.7
> > 0453-2-sriranjani.p@samsung.com/#25879995
> > Please do let me know if there is any other concern on this.
>
> We partially discussed this in this thread.
>
> As i said, what value you need here depends on the board design. The PCB
> could provide the 2ns delay, in which case, 'rgmii' would be the correct
value
> to have in the board .dts file. Hence the binding should not restrict the
value
> of phy-mode to just rgmii-id. All 4 rmgii values should be accepted.
>
> The only reason you would force only rgmii-id is if the MAC/PHY pair
cannot
> do anything else. If that really is true, i would expect a comment in the
> binding, and the MAC driver to return -EINVAL for anything but rgmii-id.
Hi Andrew,
What you said is right. Generally, PCB provides internal delay.
But in this case, due to customer request, the delay was added into SoC.
The following doc on rgmii says that "Devices which implement internal delay
shall be referred to as RGMII-ID.
Devices may offer an option to operate with/without internal delay and still
remain compliant with this spec"
https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/2
0655/1/RGMIIv2_0_final_hp.pdf
Also, the driver is in such a way that it handles all four rgmii in the same
way.
Considering this, could you let us know what will be the right approach to
take in this case?
-Swathi
>
> Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-17 5:19 ` Swathi K S
@ 2025-02-17 15:18 ` Andrew Lunn
2025-02-18 3:55 ` Swathi K S
0 siblings, 1 reply; 17+ messages in thread
From: Andrew Lunn @ 2025-02-17 15:18 UTC (permalink / raw)
To: Swathi K S
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, 'Pankaj Dubey', ravi.patel
> > > > > + phy-mode:
> > > > > + enum:
> > > > > + - rgmii-id
> > > >
> > > > phy-mode is normally a board property, in the .dts file, since the
> > > > board
> > > might
> > > > decide to have extra long clock lines and so want 'rgmii'.
> Hi Andrew,
> What you said is right. Generally, PCB provides internal delay.
It is actually pretty unusual for the PCB to add the delays. But there
are some boards which do this. Which is why you should support it.
> But in this case, due to customer request, the delay was added into SoC.
Idealy, by the PHY. However, in terms of DT, the board .dts file just
needs to say 'rmgii-id', meaning that the board does not provide the
delays, so the MAC/PHY pair needs to provide the delay.
> The following doc on rgmii says that "Devices which implement internal delay
> shall be referred to as RGMII-ID.
> Devices may offer an option to operate with/without internal delay and still
> remain compliant with this spec"
> https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/2
> 0655/1/RGMIIv2_0_final_hp.pdf
>
> Also, the driver is in such a way that it handles all four rgmii in the same
> way.
>
> Considering this, could you let us know what will be the right approach to
> take in this case?
List all four phy-modes in the binding. They should all be
valid. However, the .dtsi file should not list a phy-mode, since it is
a board property, not a SoC property.
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-17 15:18 ` Andrew Lunn
@ 2025-02-18 3:55 ` Swathi K S
2025-02-18 15:33 ` Andrew Lunn
0 siblings, 1 reply; 17+ messages in thread
From: Swathi K S @ 2025-02-18 3:55 UTC (permalink / raw)
To: 'Andrew Lunn'
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, 'Pankaj Dubey', ravi.patel
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: 17 February 2025 20:48
> To: Swathi K S <swathi.ks@samsung.com>
> Cc: krzk+dt@kernel.org; andrew+netdev@lunn.ch; davem@davemloft.net;
> edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> robh@kernel.org; conor+dt@kernel.org; richardcochran@gmail.com;
> mcoquelin.stm32@gmail.com; alexandre.torgue@foss.st.com;
> rmk+kernel@armlinux.org.uk; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
'Pankaj
> Dubey' <pankaj.dubey@samsung.com>; ravi.patel@samsung.com
> Subject: Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree
> bindings
>
> > > > > > + phy-mode:
> > > > > > + enum:
> > > > > > + - rgmii-id
> > > > >
> > > > > phy-mode is normally a board property, in the .dts file, since
> > > > > the board
> > > > might
> > > > > decide to have extra long clock lines and so want 'rgmii'.
>
> > Hi Andrew,
> > What you said is right. Generally, PCB provides internal delay.
>
> It is actually pretty unusual for the PCB to add the delays. But there are
some
> boards which do this. Which is why you should support it.
>
> > But in this case, due to customer request, the delay was added into SoC.
>
> Idealy, by the PHY. However, in terms of DT, the board .dts file just
needs to
> say 'rmgii-id', meaning that the board does not provide the delays, so the
> MAC/PHY pair needs to provide the delay.
>
> > The following doc on rgmii says that "Devices which implement internal
> > delay shall be referred to as RGMII-ID.
> > Devices may offer an option to operate with/without internal delay and
> > still remain compliant with this spec"
> >
> https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-
> proces
> > sors/2
> > 0655/1/RGMIIv2_0_final_hp.pdf
> >
> > Also, the driver is in such a way that it handles all four rgmii in
> > the same way.
> >
> > Considering this, could you let us know what will be the right
> > approach to take in this case?
>
> List all four phy-modes in the binding. They should all be valid. However,
the
> .dtsi file should not list a phy-mode, since it is a board property, not a
SoC
> property.
Hi Andrew,
Thanks for the clarification.
Will post v7 with the following updates:
1. Changing phy-mode in dt-binding as shown below:
phy-mode:
enum:
- rgmii
- rgmii-id
- rgmii-rxid
- rgmii-txid
2. Removing phy-mode from .dtsi and example given in dt-binding
3. Add phy-mode to .dts file and specify 'rgmii-id' there.
Hope this will address your review comment.
Thanks,
Swathi
>
> Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings
2025-02-18 3:55 ` Swathi K S
@ 2025-02-18 15:33 ` Andrew Lunn
0 siblings, 0 replies; 17+ messages in thread
From: Andrew Lunn @ 2025-02-18 15:33 UTC (permalink / raw)
To: Swathi K S
Cc: krzk+dt, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
conor+dt, richardcochran, mcoquelin.stm32, alexandre.torgue,
rmk+kernel, netdev, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, 'Pankaj Dubey', ravi.patel
> Hi Andrew,
> Thanks for the clarification.
> Will post v7 with the following updates:
>
> 1. Changing phy-mode in dt-binding as shown below:
> phy-mode:
> enum:
> - rgmii
> - rgmii-id
> - rgmii-rxid
> - rgmii-txid
>
> 2. Removing phy-mode from .dtsi and example given in dt-binding
The example can use phy-mode, since the example is the combination of
the .dtsi and the .dts parts of the device tree. And having the
example using 'rgmii-id' will hopefully prevent some people wrongly
using 'rgmii'
> 3. Add phy-mode to .dts file and specify 'rgmii-id' there.
Great. History shows if you get the example and the first user
correct, everybody blindly copies it and gets it right by accident. If
the first user is wrong, everybody blindly copies it, and get is wrong
by not sanity checking what they copy.
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2025-02-18 15:33 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20250213044950epcas5p1a7badb480a7e8d843fe0ff51bcf5cbf4@epcas5p1.samsung.com>
2025-02-13 4:46 ` [PATCH v6 0/2] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
[not found] ` <CGME20250213044955epcas5p110d1e582c8ee02579ead73f9686819ff@epcas5p1.samsung.com>
2025-02-13 4:46 ` [PATCH v6 1/2] dt-bindings: net: Add FSD EQoS device tree bindings Swathi K S
2025-02-13 7:54 ` Krzysztof Kozlowski
2025-02-13 11:04 ` Swathi K S
2025-02-13 12:00 ` Krzysztof Kozlowski
2025-02-14 4:53 ` Swathi K S
2025-02-14 7:31 ` Krzysztof Kozlowski
2025-02-14 9:33 ` Swathi K S
2025-02-14 10:55 ` Krzysztof Kozlowski
2025-02-14 0:19 ` Andrew Lunn
2025-02-14 5:17 ` Swathi K S
2025-02-14 13:10 ` Andrew Lunn
2025-02-17 5:19 ` Swathi K S
2025-02-17 15:18 ` Andrew Lunn
2025-02-18 3:55 ` Swathi K S
2025-02-18 15:33 ` Andrew Lunn
[not found] ` <CGME20250213044959epcas5p1b6f6d5554f69b5c24a5b4a15c8bf1fc9@epcas5p1.samsung.com>
2025-02-13 4:46 ` [PATCH v6 2/2] net: stmmac: dwc-qos: Add FSD EQoS support Swathi K S
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.