|
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/net/sophgo,sg2044-dwmac.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Sophgo SG2044 DWMAC glue layer |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Inochi Amaoto <[email protected]> |
| 11 | + |
| 12 | +select: |
| 13 | + properties: |
| 14 | + compatible: |
| 15 | + contains: |
| 16 | + enum: |
| 17 | + - sophgo,sg2044-dwmac |
| 18 | + required: |
| 19 | + - compatible |
| 20 | + |
| 21 | +properties: |
| 22 | + compatible: |
| 23 | + items: |
| 24 | + - const: sophgo,sg2044-dwmac |
| 25 | + - const: snps,dwmac-5.30a |
| 26 | + |
| 27 | + reg: |
| 28 | + maxItems: 1 |
| 29 | + |
| 30 | + clocks: |
| 31 | + items: |
| 32 | + - description: GMAC main clock |
| 33 | + - description: PTP clock |
| 34 | + - description: TX clock |
| 35 | + |
| 36 | + clock-names: |
| 37 | + items: |
| 38 | + - const: stmmaceth |
| 39 | + - const: ptp_ref |
| 40 | + - const: tx |
| 41 | + |
| 42 | + dma-noncoherent: true |
| 43 | + |
| 44 | + interrupts: |
| 45 | + maxItems: 1 |
| 46 | + |
| 47 | + interrupt-names: |
| 48 | + maxItems: 1 |
| 49 | + |
| 50 | + resets: |
| 51 | + maxItems: 1 |
| 52 | + |
| 53 | + reset-names: |
| 54 | + const: stmmaceth |
| 55 | + |
| 56 | +required: |
| 57 | + - compatible |
| 58 | + - reg |
| 59 | + - clocks |
| 60 | + - clock-names |
| 61 | + - interrupts |
| 62 | + - interrupt-names |
| 63 | + - resets |
| 64 | + - reset-names |
| 65 | + |
| 66 | +allOf: |
| 67 | + - $ref: snps,dwmac.yaml# |
| 68 | + |
| 69 | +unevaluatedProperties: false |
| 70 | + |
| 71 | +examples: |
| 72 | + - | |
| 73 | + #include <dt-bindings/interrupt-controller/irq.h> |
| 74 | +
|
| 75 | + ethernet@30006000 { |
| 76 | + compatible = "sophgo,sg2044-dwmac", "snps,dwmac-5.30a"; |
| 77 | + reg = <0x30006000 0x4000>; |
| 78 | + clocks = <&clk 151>, <&clk 152>, <&clk 154>; |
| 79 | + clock-names = "stmmaceth", "ptp_ref", "tx"; |
| 80 | + interrupt-parent = <&intc>; |
| 81 | + interrupts = <296 IRQ_TYPE_LEVEL_HIGH>; |
| 82 | + interrupt-names = "macirq"; |
| 83 | + resets = <&rst 30>; |
| 84 | + reset-names = "stmmaceth"; |
| 85 | + snps,multicast-filter-bins = <0>; |
| 86 | + snps,perfect-filter-entries = <1>; |
| 87 | + snps,aal; |
| 88 | + snps,tso; |
| 89 | + snps,txpbl = <32>; |
| 90 | + snps,rxpbl = <32>; |
| 91 | + snps,mtl-rx-config = <&gmac0_mtl_rx_setup>; |
| 92 | + snps,mtl-tx-config = <&gmac0_mtl_tx_setup>; |
| 93 | + snps,axi-config = <&gmac0_stmmac_axi_setup>; |
| 94 | + status = "disabled"; |
| 95 | +
|
| 96 | + gmac0_mtl_rx_setup: rx-queues-config { |
| 97 | + snps,rx-queues-to-use = <8>; |
| 98 | + snps,rx-sched-wsp; |
| 99 | + queue0 {}; |
| 100 | + queue1 {}; |
| 101 | + queue2 {}; |
| 102 | + queue3 {}; |
| 103 | + queue4 {}; |
| 104 | + queue5 {}; |
| 105 | + queue6 {}; |
| 106 | + queue7 {}; |
| 107 | + }; |
| 108 | +
|
| 109 | + gmac0_mtl_tx_setup: tx-queues-config { |
| 110 | + snps,tx-queues-to-use = <8>; |
| 111 | + queue0 {}; |
| 112 | + queue1 {}; |
| 113 | + queue2 {}; |
| 114 | + queue3 {}; |
| 115 | + queue4 {}; |
| 116 | + queue5 {}; |
| 117 | + queue6 {}; |
| 118 | + queue7 {}; |
| 119 | + }; |
| 120 | +
|
| 121 | + gmac0_stmmac_axi_setup: stmmac-axi-config { |
| 122 | + snps,blen = <16 8 4 0 0 0 0>; |
| 123 | + snps,wr_osr_lmt = <1>; |
| 124 | + snps,rd_osr_lmt = <2>; |
| 125 | + }; |
| 126 | + }; |
0 commit comments