diff options
| author | Serge Semin <fancer.lancer@gmail.com> | 2025-09-11 17:31:48 +0300 |
|---|---|---|
| committer | Serge Semin <fancer.lancer@gmail.com> | 2026-08-13 20:38:43 +0300 |
| commit | a20299db9d8b967f2bca4fc2bcfa0f173d331ac4 (patch) | |
| tree | cdc8083fb016b48082d92f121671805c33bba88d | |
| parent | 44b04d99a1b04bd573039a7709ed5f54ab949ce5 (diff) | |
| download | linux-a20299db9d8b967f2bca4fc2bcfa0f173d331ac4.tar.gz linux-a20299db9d8b967f2bca4fc2bcfa0f173d331ac4.zip | |
dt-bindings: net: Add Baikal-T1 XGMAC bindings
Baikal-T1 SoC is equipped with one DW XGMAC v2.11a-based 10GBE interface
synthesized with: XGMII-bus connected to DW XPCS v3.11b, AXI3-DMA and APB3
CSR, 32KB Tx/Rx MTL FIFOs with up two 4 MTL Rx Queues and 2 MTL Tx Queue
using two DMA-interfaces for Tx and Rx, PTP, PMT, TCP/IP CoE, TSO, up to 8
outstanding AXI read/write requests, maximum AXI burst length of 16 beats
(due to AXI3 constraints), up to eight MAC address slots and 64-bits hash
-based MAC-address filter.
Let's add the respective DT-bindings so the device tree sources could be
correctly verified. The STMMAC/Baikal XGMAC platform driver will be added
next.
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
| -rw-r--r-- | Documentation/devicetree/bindings/net/baikal,bt1-xgmac.yaml | 212 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/net/snps,dwmac.yaml | 2 |
2 files changed, 214 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/net/baikal,bt1-xgmac.yaml b/Documentation/devicetree/bindings/net/baikal,bt1-xgmac.yaml new file mode 100644 index 0000000000000..948a2aaaeb6e1 --- /dev/null +++ b/Documentation/devicetree/bindings/net/baikal,bt1-xgmac.yaml @@ -0,0 +1,212 @@ +# 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-xgmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Baikal-T1 DW XGMAC Network Interface + +maintainers: + - Serge Semin <fancer.lancer@gmail.com> + +description: + Baikal-T1 is equipped with one DW XGMAC v2.11a network interfaces. It has + an DW XPCS v3.11b attached supporting the 10GBase-KR/KX4 external interfaces. + +select: + properties: + compatible: + contains: + const: baikal,bt1-xgmac + + required: + - compatible + +allOf: + - $ref: "snps,dwmac.yaml#" + +properties: + compatible: + items: + - const: baikal,bt1-xgmac + + reg: + maxItems: 1 + + interrupts: + minItems: 5 + maxItems: 5 + + interrupt-names: + minItems: 5 + maxItems: 5 + items: + enum: + - macirq + - tx-queue-0 + - tx-queue-1 + - rx-queue-0 + - rx-queue-1 + + 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 + + phy-mode: + description: + Bailal-T1 XGMAC supports 10Gbase-KR/KX4 interfaces via the always + attached XPCS block. The XGMAC and XPCS are connected with the XGMII + interface. So in case of the external interface auto-negotiation + implied by the platform use XGMII phy-mode. + enum: [xgmii, xaui, 10gbase-r, 10gbase-kr] + + rx-fifo-depth: + const: 32768 + + tx-fifo-depth: + const: 32768 + + snps,perfect-filter-entries: + const: 8 + + snps,multicast-filter-bins: + const: 64 + + snps,tso: true + + 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 8 + maximum: 7 + + snps,rd_osr_lmt: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Maximum read outstanding requests is limited with 8 + maximum: 7 + + 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] + + rx-queues-config: + type: object + + properties: + snps,rx-queues-to-use: + $ref: /schemas/types.yaml#/definitions/uint32 + description: At most four MTL Rx Queue supported with two DMA-channels + minimum: 1 + maximum: 4 + + tx-queues-config: + type: object + + properties: + snps,tx-queues-to-use: + $ref: /schemas/types.yaml#/definitions/uint32 + description: At most two MTL Tx Queue supported + minimum: 1 + maximum: 2 + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clocks + - clock-names + - resets + - reset-names + - phy-mode + +unevaluatedProperties: false + +examples: + - | + ethernet@1f054000 { + compatible = "baikal,bt1-xgmac"; + reg = <0x1f054000 0x4000>; + + interrupts = <74>, <75>, <76>, <77>, <78>; + interrupt-names = "macirq", "tx-queue-0", "tx-queue-1", + "rx-queue-0", "rx-queue-1"; + + clocks = <&ccu_sys 4>, <&ccu_axi 4>, <&ccu_sys 5>, <&ccu_sys 6>; + clock-names = "pclk", "stmmaceth", "tx", "ptp_ref"; + + resets = <&ccu_axi 4>; + reset-names = "stmmaceth"; + + phy-mode = "xgmii"; + + rx-fifo-depth = <32768>; + tx-fifo-depth = <32768>; + + snps,pbl = <32>; + snps,data-width = <16>; + + snps,axi-config = <&gmac0_axi_config>; + snps,mtl-rx-config = <&xgmac_rxq_config>; + snps,mtl-tx-config = <&xgmac_txq_config>; + + xgmac_axi_config: stmmac-axi-config { + snps,wr_osr_lmt = <0x7>; + snps,rd_osr_lmt = <0x7>; + snps,blen = <0 0 0 0 16 8 4>; + }; + + xgmac_rxq_config: rx-queues-config { + snps,rx-queues-to-use = <2>; + snps,rx-sched-sp; + + queue0 { + snps,map-to-dma-channel = <0>; + }; + + queue1 { + snps,map-to-dma-channel = <1>; + }; + }; + + xgmac_txq_config: tx-queues-config { + snps,tx-queues-to-use = <2>; + snps,tx-sched-sp; + + queue0 { + snps,dcb-algorithm; + snps,priority = <0x1>; + }; + + queue1 { + snps,dcb-algorithm; + snps,priority = <0x2>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index c37f9ce2011b7..b8186b9aa971f 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -63,6 +63,7 @@ properties: - amlogic,meson-gxbb-dwmac - amlogic,meson-axg-dwmac - baikal,bt1-gmac + - baikal,bt1-xgmac - ingenic,jz4775-mac - ingenic,x1000-mac - ingenic,x1600-mac @@ -663,6 +664,7 @@ allOf: - allwinner,sun8i-r40-gmac - allwinner,sun8i-v3s-emac - allwinner,sun50i-a64-emac + - baikal,bt1-xgmac - loongson,ls2k-dwmac - loongson,ls7a-dwmac - ingenic,jz4775-mac |
