Message ID | 20240730091648.72322-2-swathi.ks@samsung.com |
---|---|
State | New |
Headers | show |
Series | net: stmmac: dwc-qos: Add FSD EQoS support | expand |
On Tue, Jul 30, 2024 at 02:46:45PM +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 +- > .../devicetree/bindings/net/tesla,ethqos.yaml | 91 +++++++++++++++++++ > 2 files changed, 94 insertions(+), 2 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/tesla,ethqos.yaml > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > index 3eb65e63fdae..0da11fe98cec 100644 > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > @@ -98,6 +98,7 @@ properties: > - snps,dwxgmac-2.10 > - starfive,jh7100-dwmac > - starfive,jh7110-dwmac > + - tesla,fsd-ethqos > > reg: > minItems: 1 > @@ -121,7 +122,7 @@ properties: > > clocks: > minItems: 1 > - maxItems: 8 > + maxItems: 10 > additionalItems: true > items: > - description: GMAC main clock > @@ -133,7 +134,7 @@ properties: > > clock-names: > minItems: 1 > - maxItems: 8 > + maxItems: 10 > additionalItems: true > contains: > enum: > diff --git a/Documentation/devicetree/bindings/net/tesla,ethqos.yaml b/Documentation/devicetree/bindings/net/tesla,ethqos.yaml > new file mode 100644 > index 000000000000..9246b0395126 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/tesla,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,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: > + dwmmac based tesla ethernet devices which support Gigabit > + ethernet. Please write complete sentences. > + > +allOf: > + - $ref: snps,dwmac.yaml# > + > +properties: > + compatible: > + const: tesla,fsd-ethqos.yaml ??? Filename matching compatible means for compatible string "tesla,fsd-ethqos" the filename should be 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: > + $ref: ethernet-controller.yaml#/properties/phy-connection-type No need for this. phy-mode should already be included by snps,dwmac.yaml including ethernet-controller.yaml. Though you may want to define what subset of modes are valid. > + > +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 { Drop unused label. > + 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 >
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 3eb65e63fdae..0da11fe98cec 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -98,6 +98,7 @@ properties: - snps,dwxgmac-2.10 - starfive,jh7100-dwmac - starfive,jh7110-dwmac + - tesla,fsd-ethqos reg: minItems: 1 @@ -121,7 +122,7 @@ properties: clocks: minItems: 1 - maxItems: 8 + maxItems: 10 additionalItems: true items: - description: GMAC main clock @@ -133,7 +134,7 @@ properties: clock-names: minItems: 1 - maxItems: 8 + maxItems: 10 additionalItems: true contains: enum: diff --git a/Documentation/devicetree/bindings/net/tesla,ethqos.yaml b/Documentation/devicetree/bindings/net/tesla,ethqos.yaml new file mode 100644 index 000000000000..9246b0395126 --- /dev/null +++ b/Documentation/devicetree/bindings/net/tesla,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,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: + dwmmac based tesla ethernet devices which 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: + $ref: ethernet-controller.yaml#/properties/phy-connection-type + +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"; + }; + +...