From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Emil Renner Berthing <kernel@esmil.dk>,
Conor Dooley <conor@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Richard Cochran <richardcochran@gmail.com>,
Sagar Kadam <sagar.kadam@sifive.com>,
Yanhong Wang <yanhong.wang@starfivetech.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, kernel@collabora.com
Subject: [PATCH 07/12] dt-bindings: net: Add StarFive JH7100 SoC
Date: Sat, 11 Feb 2023 05:18:16 +0200 [thread overview]
Message-ID: <20230211031821.976408-8-cristian.ciocaltea@collabora.com> (raw)
In-Reply-To: <20230211031821.976408-1-cristian.ciocaltea@collabora.com>
Add DT bindings documentation for the Synopsys DesignWare MAC found on
the StarFive JH7100 SoC.
Adjust 'reset' and 'reset-names' properties to allow using 'ahb' instead
of the 'stmmaceth' reset signal, as required by JH7100.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
.../devicetree/bindings/net/snps,dwmac.yaml | 15 ++-
.../bindings/net/starfive,jh7100-dwmac.yaml | 106 ++++++++++++++++++
MAINTAINERS | 5 +
3 files changed, 122 insertions(+), 4 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/starfive,jh7100-dwmac.yaml
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index e88a86623fce..71522a2cd7a4 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -89,6 +89,7 @@ properties:
- snps,dwmac-5.10a
- snps,dwxgmac
- snps,dwxgmac-2.10
+ - starfive,jh7100-dwmac
reg:
minItems: 1
@@ -131,12 +132,17 @@ properties:
- ptp_ref
resets:
- maxItems: 1
- description:
- MAC Reset signal.
+ minItems: 1
+ items:
+ - description: MAC Reset signal
+ - description: AHB Reset signal
reset-names:
- const: stmmaceth
+ minItems: 1
+ contains:
+ enum:
+ - stmmaceth
+ - ahb
power-domains:
maxItems: 1
@@ -578,6 +584,7 @@ allOf:
- snps,dwxgmac
- snps,dwxgmac-2.10
- st,spear600-gmac
+ - starfive,jh7100-dwmac
then:
properties:
diff --git a/Documentation/devicetree/bindings/net/starfive,jh7100-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7100-dwmac.yaml
new file mode 100644
index 000000000000..6afe30690172
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/starfive,jh7100-dwmac.yaml
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2022 StarFive Technology Co., Ltd.
+# Copyright (C) 2022 Emil Renner Berthing <kernel@esmil.dk>
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/starfive,jh7100-dwmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7100 DWMAC Ethernet Controller
+
+maintainers:
+ - Emil Renner Berthing <kernel@esmil.dk>
+
+# We need a select here so we don't match all nodes with 'snps,dwmac'
+select:
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7100-dwmac
+ required:
+ - compatible
+
+allOf:
+ - $ref: snps,dwmac.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: starfive,jh7100-dwmac
+ - const: snps,dwmac
+
+ clocks:
+ items:
+ - description: GMAC main clock
+ - description: GMAC AHB clock
+ - description: PTP clock
+ - description: GTX clock
+ - description: TX clock
+
+ clock-names:
+ items:
+ - const: stmmaceth
+ - const: pclk
+ - const: ptp_ref
+ - const: gtxc
+ - const: tx
+
+ resets:
+ description: AHB Reset signal
+
+ reset-names:
+ const: ahb
+
+ starfive,syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: phandle to the syscon node
+
+ starfive,gtxclk-dlychain:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: GTX clock delay chain setting
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/starfive-jh7100.h>
+ #include <dt-bindings/reset/starfive-jh7100.h>
+
+ gmac: ethernet@10020000 {
+ compatible = "starfive,jh7100-dwmac", "snps,dwmac";
+ reg = <0x0 0x10020000 0x0 0x10000>;
+ clocks = <&clkgen JH7100_CLK_GMAC_ROOT_DIV>,
+ <&clkgen JH7100_CLK_GMAC_AHB>,
+ <&clkgen JH7100_CLK_GMAC_PTP_REF>,
+ <&clkgen JH7100_CLK_GMAC_GTX>,
+ <&clkgen JH7100_CLK_GMAC_TX_INV>;
+ clock-names = "stmmaceth", "pclk", "ptp_ref", "gtxc", "tx";
+ resets = <&rstgen JH7100_RSTN_GMAC_AHB>;
+ reset-names = "ahb";
+ interrupts = <6>, <7>;
+ interrupt-names = "macirq", "eth_wake_irq";
+ max-frame-size = <9000>;
+ phy-mode = "rgmii-txid";
+ snps,multicast-filter-bins = <32>;
+ snps,perfect-filter-entries = <128>;
+ starfive,syscon = <&sysmain>;
+ rx-fifo-depth = <32768>;
+ tx-fifo-depth = <16384>;
+ snps,axi-config = <&stmmac_axi_setup>;
+ snps,fixed-burst;
+ snps,force_thresh_dma_mode;
+ snps,no-pbl-x8;
+
+ stmmac_axi_setup: stmmac-axi-config {
+ snps,wr_osr_lmt = <0xf>;
+ snps,rd_osr_lmt = <0xf>;
+ snps,blen = <256 128 64 32 0 0 0>;
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index abed40db41f0..d48468b81b94 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19816,6 +19816,11 @@ M: Emil Renner Berthing <kernel@esmil.dk>
S: Maintained
F: arch/riscv/boot/dts/starfive/
+STARFIVE DWMAC GLUE LAYER
+M: Emil Renner Berthing <kernel@esmil.dk>
+S: Maintained
+F: Documentation/devicetree/bindings/net/starfive,jh7100-dwmac.yaml
+
STARFIVE JH7100 CLOCK DRIVERS
M: Emil Renner Berthing <kernel@esmil.dk>
S: Maintained
--
2.39.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-02-11 3:31 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 3:18 [PATCH 00/12] Enable networking support for StarFive JH7100 SoC Cristian Ciocaltea
2023-02-11 3:18 ` [PATCH 01/12] dt-bindings: riscv: sifive-ccache: Add compatible " Cristian Ciocaltea
2023-02-13 9:20 ` Krzysztof Kozlowski
2023-02-14 20:40 ` Conor Dooley
2023-02-15 13:11 ` Emil Renner Berthing
2023-03-20 23:46 ` Palmer Dabbelt
2023-02-11 3:18 ` [PATCH 02/12] dt-bindings: riscv: sifive-ccache: Add 'uncached-offset' property Cristian Ciocaltea
2023-02-13 9:23 ` Krzysztof Kozlowski
2023-02-14 17:58 ` Cristian Ciocaltea
2023-02-16 21:53 ` Conor Dooley
2023-02-11 3:18 ` [PATCH 03/12] soc: sifive: ccache: Add StarFive JH7100 support Cristian Ciocaltea
2023-03-06 23:32 ` Conor Dooley
2023-03-06 23:46 ` Cristian Ciocaltea
2023-02-11 3:18 ` [PATCH 04/12] soc: sifive: ccache: Add non-coherent DMA handling Cristian Ciocaltea
2023-02-16 18:50 ` Conor Dooley
2023-02-19 21:32 ` Emil Renner Berthing
2023-02-20 11:43 ` Conor Dooley
2023-02-11 3:18 ` [PATCH 05/12] riscv: Implement non-coherent DMA support via SiFive cache flushing Cristian Ciocaltea
2023-02-13 8:30 ` Ben Dooks
2023-02-14 18:06 ` Cristian Ciocaltea
2023-02-14 18:17 ` Conor Dooley
2023-02-11 3:18 ` [PATCH 06/12] dt-bindings: mfd: syscon: Add StarFive JH7100 sysmain compatible Cristian Ciocaltea
2023-02-13 9:23 ` Krzysztof Kozlowski
2023-03-03 11:52 ` Lee Jones
2023-02-11 3:18 ` Cristian Ciocaltea [this message]
2023-02-11 16:01 ` [PATCH 07/12] dt-bindings: net: Add StarFive JH7100 SoC Andrew Lunn
2023-02-15 0:34 ` Cristian Ciocaltea
2023-02-15 13:01 ` Andrew Lunn
2023-02-16 15:51 ` Cristian Ciocaltea
2023-02-16 17:54 ` Andrew Lunn
2023-02-17 0:32 ` Cristian Ciocaltea
2023-02-17 13:30 ` Andrew Lunn
2023-02-17 15:25 ` Cristian Ciocaltea
2023-02-13 9:25 ` Krzysztof Kozlowski
2023-02-11 3:18 ` [PATCH 08/12] net: stmmac: Add glue layer for " Cristian Ciocaltea
2023-02-11 16:11 ` Andrew Lunn
2023-02-15 0:08 ` Cristian Ciocaltea
2023-02-15 11:20 ` Emil Renner Berthing
2023-02-15 11:51 ` Cristian Ciocaltea
2023-02-15 12:51 ` Andrew Lunn
2023-02-13 9:26 ` Krzysztof Kozlowski
2023-02-14 18:12 ` Cristian Ciocaltea
2023-02-11 3:18 ` [PATCH 09/12] riscv: dts: starfive: Add dma-noncoherent for " Cristian Ciocaltea
2023-02-11 3:18 ` [PATCH 10/12] riscv: dts: starfive: jh7100: Add ccache DT node Cristian Ciocaltea
2023-02-11 3:18 ` [PATCH 11/12] riscv: dts: starfive: jh7100: Add sysmain and gmac DT nodes Cristian Ciocaltea
2023-02-13 9:26 ` Krzysztof Kozlowski
2023-02-14 18:15 ` Cristian Ciocaltea
2023-02-11 3:18 ` [PATCH 12/12] riscv: dts: starfive: jh7100-common: Setup pinmux and enable gmac Cristian Ciocaltea
2023-02-11 11:11 ` [PATCH 00/12] Enable networking support for StarFive JH7100 SoC Conor Dooley
2023-02-11 11:53 ` Cristian Ciocaltea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230211031821.976408-8-cristian.ciocaltea@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=alexandre.torgue@foss.st.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=kernel@collabora.com \
--cc=kernel@esmil.dk \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peppe.cavallaro@st.com \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sagar.kadam@sifive.com \
--cc=yanhong.wang@starfivetech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).