|
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/net/airoha,en7581-eth.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Airoha EN7581 Frame Engine Ethernet controller |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Lorenzo Bianconi <[email protected]> |
| 11 | + |
| 12 | +description: |
| 13 | + The frame engine ethernet controller can be found on Airoha SoCs. |
| 14 | + These SoCs have multi-GMAC ports. |
| 15 | + |
| 16 | +properties: |
| 17 | + compatible: |
| 18 | + enum: |
| 19 | + - airoha,en7581-eth |
| 20 | + |
| 21 | + reg: |
| 22 | + items: |
| 23 | + - description: Frame engine base address |
| 24 | + - description: QDMA0 base address |
| 25 | + - description: QDMA1 base address |
| 26 | + |
| 27 | + reg-names: |
| 28 | + items: |
| 29 | + - const: fe |
| 30 | + - const: qdma0 |
| 31 | + - const: qdma1 |
| 32 | + |
| 33 | + interrupts: |
| 34 | + items: |
| 35 | + - description: QDMA lan irq0 |
| 36 | + - description: QDMA lan irq1 |
| 37 | + - description: QDMA lan irq2 |
| 38 | + - description: QDMA lan irq3 |
| 39 | + - description: QDMA wan irq0 |
| 40 | + - description: QDMA wan irq1 |
| 41 | + - description: QDMA wan irq2 |
| 42 | + - description: QDMA wan irq3 |
| 43 | + - description: FE error irq |
| 44 | + - description: PDMA irq |
| 45 | + |
| 46 | + resets: |
| 47 | + maxItems: 8 |
| 48 | + |
| 49 | + reset-names: |
| 50 | + items: |
| 51 | + - const: fe |
| 52 | + - const: pdma |
| 53 | + - const: qdma |
| 54 | + - const: xsi-mac |
| 55 | + - const: hsi0-mac |
| 56 | + - const: hsi1-mac |
| 57 | + - const: hsi-mac |
| 58 | + - const: xfp-mac |
| 59 | + |
| 60 | + "#address-cells": |
| 61 | + const: 1 |
| 62 | + |
| 63 | + "#size-cells": |
| 64 | + const: 0 |
| 65 | + |
| 66 | +patternProperties: |
| 67 | + "^ethernet@[1-4]$": |
| 68 | + type: object |
| 69 | + unevaluatedProperties: false |
| 70 | + $ref: ethernet-controller.yaml# |
| 71 | + description: |
| 72 | + Ethernet GMAC port associated to the MAC controller |
| 73 | + properties: |
| 74 | + compatible: |
| 75 | + const: airoha,eth-mac |
| 76 | + |
| 77 | + reg: |
| 78 | + minimum: 1 |
| 79 | + maximum: 4 |
| 80 | + description: GMAC port identifier |
| 81 | + |
| 82 | + required: |
| 83 | + - reg |
| 84 | + - compatible |
| 85 | + |
| 86 | +required: |
| 87 | + - compatible |
| 88 | + - reg |
| 89 | + - interrupts |
| 90 | + - resets |
| 91 | + - reset-names |
| 92 | + |
| 93 | +unevaluatedProperties: false |
| 94 | + |
| 95 | +examples: |
| 96 | + - | |
| 97 | + #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 98 | + #include <dt-bindings/interrupt-controller/irq.h> |
| 99 | + #include <dt-bindings/clock/en7523-clk.h> |
| 100 | +
|
| 101 | + soc { |
| 102 | + #address-cells = <2>; |
| 103 | + #size-cells = <2>; |
| 104 | +
|
| 105 | + eth: ethernet@1fb50000 { |
| 106 | + compatible = "airoha,en7581-eth"; |
| 107 | + reg = <0 0x1fb50000 0 0x2600>, |
| 108 | + <0 0x1fb54000 0 0x2000>, |
| 109 | + <0 0x1fb56000 0 0x2000>; |
| 110 | + reg-names = "fe", "qdma0", "qdma1"; |
| 111 | +
|
| 112 | + resets = <&scuclk 44>, |
| 113 | + <&scuclk 30>, |
| 114 | + <&scuclk 31>, |
| 115 | + <&scuclk 6>, |
| 116 | + <&scuclk 15>, |
| 117 | + <&scuclk 16>, |
| 118 | + <&scuclk 17>, |
| 119 | + <&scuclk 26>; |
| 120 | + reset-names = "fe", "pdma", "qdma", "xsi-mac", |
| 121 | + "hsi0-mac", "hsi1-mac", "hsi-mac", |
| 122 | + "xfp-mac"; |
| 123 | +
|
| 124 | + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, |
| 125 | + <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>, |
| 126 | + <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>, |
| 127 | + <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, |
| 128 | + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, |
| 129 | + <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>, |
| 130 | + <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, |
| 131 | + <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>, |
| 132 | + <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>, |
| 133 | + <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>; |
| 134 | +
|
| 135 | + #address-cells = <1>; |
| 136 | + #size-cells = <0>; |
| 137 | +
|
| 138 | + mac: ethernet@1 { |
| 139 | + compatible = "airoha,eth-mac"; |
| 140 | + reg = <1>; |
| 141 | + }; |
| 142 | + }; |
| 143 | + }; |
0 commit comments