Skip to content

Commit ecb1e1d

Browse files
committed
Merge branch 'introduce-en7581-ethernet-support'
Lorenzo Bianconi says: ==================== Introduce EN7581 ethernet support Add airoha_eth driver in order to introduce ethernet support for Airoha EN7581 SoC available on EN7581 development board. EN7581 mac controller is mainly composed by Frame Engine (FE) and QoS-DMA (QDMA) modules. FE is used for traffic offloading (just basic functionalities are supported now) while QDMA is used for DMA operation and QOS functionalities between mac layer and the dsa switch (hw QoS is not available yet and it will be added in the future). Currently only hw lan features are available, hw wan will be added with subsequent patches. ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 861f34e + 23020f0 commit ecb1e1d

File tree

5 files changed

+2892
-1
lines changed

5 files changed

+2892
-1
lines changed
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
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+
};

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,15 @@ S: Supported
682682
F: fs/aio.c
683683
F: include/linux/*aio*.h
684684

685+
AIROHA ETHERNET DRIVER
686+
M: Lorenzo Bianconi <[email protected]>
687+
L: [email protected] (moderated for non-subscribers)
688+
L: [email protected] (moderated for non-subscribers)
689+
690+
S: Maintained
691+
F: Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
692+
F: drivers/net/ethernet/mediatek/airoha_eth.c
693+
685694
AIROHA SPI SNFI DRIVER
686695
M: Lorenzo Bianconi <[email protected]>
687696
M: Ray Liu <[email protected]>

drivers/net/ethernet/mediatek/Kconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config NET_VENDOR_MEDIATEK
33
bool "MediaTek devices"
4-
depends on ARCH_MEDIATEK || SOC_MT7621 || SOC_MT7620 || COMPILE_TEST
4+
depends on ARCH_MEDIATEK || ARCH_AIROHA || SOC_MT7621 || SOC_MT7620 || COMPILE_TEST
55
help
66
If you have a Mediatek SoC with ethernet, say Y.
77

88
if NET_VENDOR_MEDIATEK
99

10+
config NET_AIROHA
11+
tristate "Airoha SoC Gigabit Ethernet support"
12+
depends on NET_DSA || !NET_DSA
13+
select PAGE_POOL
14+
help
15+
This driver supports the gigabit ethernet MACs in the
16+
Airoha SoC family.
17+
1018
config NET_MEDIATEK_SOC_WED
1119
depends on ARCH_MEDIATEK || COMPILE_TEST
1220
def_bool NET_MEDIATEK_SOC != n

drivers/net/ethernet/mediatek/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_debugfs.o
1111
endif
1212
obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o
1313
obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
14+
obj-$(CONFIG_NET_AIROHA) += airoha_eth.o

0 commit comments

Comments
 (0)