summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2025-09-11 16:53:13 +0300
committerSerge Semin <fancer.lancer@gmail.com>2026-08-13 20:38:43 +0300
commit44b04d99a1b04bd573039a7709ed5f54ab949ce5 (patch)
treee2f14c03eb787c38feb2845bb7729b9997f30d6f
parent91706ab69f5ee4ca615bb0dc9bf577ac482cc477 (diff)
downloadlinux-44b04d99a1b04bd573039a7709ed5f54ab949ce5.tar.gz
linux-44b04d99a1b04bd573039a7709ed5f54ab949ce5.zip
dt-bindings: net: Add Baikal-T1 GMAC bindings
Baikal-T1 SoC is equipped with two DW GMAC v3.73a-based 1GBE Ethernet interfaces synthesized with: RGMII PHY interface, AXI-DMA and APB3 CSR, 16KB Tx/Rx FIFOs and PBL up to half of that, PTP, PMT, TCP/IP CoE, up to 4 outstanding AXI read/write requests, maximum AXI burst length of 16 beats, up to eight MAC address slots, one GPI and one GPO ports. Let's add the respective DT-bindings so the device tree sources could be correctly verified. The STMMAC/Baikal GMAC platform driver will be added next. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/net/baikal,bt1-gmac.yaml169
-rw-r--r--Documentation/devicetree/bindings/net/snps,dwmac.yaml1
2 files changed, 170 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/net/baikal,bt1-gmac.yaml b/Documentation/devicetree/bindings/net/baikal,bt1-gmac.yaml
new file mode 100644
index 0000000000000..7e29400964f08
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/baikal,bt1-gmac.yaml
@@ -0,0 +1,169 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/baikal,bt1-gmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Baikal-T1 DW GMAC Network Interface
+
+maintainers:
+ - Serge Semin <fancer.lancer@gmail.com>
+
+description:
+ Baikal-T1 is equipped with two DW GMAC v3.73a network interfaces. Each of
+ them doesn't have any on-SoC PHY attached, but instead exports RGMII
+ interface to connect any compatible physical layer transceiver.
+
+select:
+ properties:
+ compatible:
+ contains:
+ const: baikal,bt1-gmac
+
+ required:
+ - compatible
+
+allOf:
+ - $ref: "snps,dwmac.yaml#"
+
+properties:
+ compatible:
+ items:
+ - const: baikal,bt1-gmac
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ const: macirq
+
+ clocks:
+ minItems: 4
+ maxItems: 4
+
+ clock-names:
+ minItems: 4
+ maxItems: 4
+ contains:
+ enum:
+ - stmmaceth
+ - pclk
+ - tx
+ - ptp_ref
+
+ resets:
+ maxItems: 1
+
+ reset-names:
+ const: stmmaceth
+
+ ngpios:
+ description:
+ Baikal-T1 GMAC have been created with one GPI and one GPO ports
+ enabled. So there are total two GPIOs available.
+ const: 2
+
+ phy-mode:
+ description:
+ Bailal-T1 GMACs always add 2ns delay of TXC with respect to TXD.
+ So either PCB or PHY shall add the RXC delay.
+ enum: [rgmii-id, rxgmii-txid]
+
+ tx-internal-delay-ps:
+ description:
+ DW MAC Tx clocks generator has been designed to always add 2ns delay
+ of TXC with respect to TXD.
+ const: 2000
+
+ rx-fifo-depth:
+ const: 16384
+
+ tx-fifo-depth:
+ const: 16384
+
+ snps,perfect-filter-entries:
+ const: 8
+
+ snps,multicast-filter-bins:
+ const: 0
+
+ snps,data-width:
+ const: 16
+
+ stmmac-axi-config:
+ type: object
+
+ properties:
+ snps,wr_osr_lmt:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Maximum write outstanding requests is limited with 4
+ maximum: 3
+
+ snps,rd_osr_lmt:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Maximum read outstanding requests is limited with 4
+ maximum: 3
+
+ snps,blen:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: AXI-bus burst length width is limited with just 4 bits
+ items:
+ enum: [16, 8, 4, 0]
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-names
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - phy-mode
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ ethernet@1f05e000 {
+ compatible = "baikal,bt1-gmac";
+ reg = <0x1f05e000 0x2000>;
+ #address-cells = <1>;
+ #size-cells = <2>;
+
+ interrupts = <72>;
+ interrupt-names = "macirq";
+
+ clocks = <&ccu_sys 1>, <&ccu_axi 3>, <&ccu_sys 2>, <&ccu_sys 3>;
+ clock-names = "pclk", "stmmaceth", "tx", "ptp_ref";
+
+ resets = <&ccu_axi 3>;
+ reset-names = "stmmaceth";
+
+ ngpios = <2>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ phy-mode = "rgmii-id";
+ tx-internal-delay-ps = <2000>;
+
+ rx-fifo-depth = <16384>;
+ tx-fifo-depth = <16384>;
+
+ snps,pbl = <32>;
+ snps,data-width = <16>;
+
+ snps,axi-config = <&gmac_axi_config>;
+
+ gmac_axi_config: stmmac-axi-config {
+ snps,wr_osr_lmt = <0x3>;
+ snps,rd_osr_lmt = <0x3>;
+ snps,blen = <0 0 0 0 16 8 4>;
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 80e0a83de9ca3..c37f9ce2011b7 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -62,6 +62,7 @@ properties:
- amlogic,meson8m2-dwmac
- amlogic,meson-gxbb-dwmac
- amlogic,meson-axg-dwmac
+ - baikal,bt1-gmac
- ingenic,jz4775-mac
- ingenic,x1000-mac
- ingenic,x1600-mac