* [PATCH net-next 0/2] net: econet: add EcoNet EN751221 ethernet driver
@ 2026-09-09 21:21 Caleb James DeLisle
2026-09-09 21:21 ` [PATCH net-next 1/2] dt-bindings: net: econet: add EN751221 ethernet Caleb James DeLisle
[not found] ` <20260909212146.3184077-3-cjd@cjdns.fr>
0 siblings, 2 replies; 7+ messages in thread
From: Caleb James DeLisle @ 2026-09-09 21:21 UTC (permalink / raw)
To: netdev
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, robh, krzk+dt,
conor+dt, p.zabel, matthias.bgg, angelogioacchino.delregno,
vadim.fedorenko, maxime.chevallier, dong100, wangruikang,
25181214217, hkallweit1, han.junyang, xuanzhuo, enelsonmoore, jes,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
naseefkm, b.larsson, Caleb James DeLisle
The EcoNet EN751221 SoC has an Ethernet device with two ports and two
DMA engines (internally called "QDMA" because they handle both QoS and
DMA). It is fairly similar to the MediaTek and Airoha drivers, but
distinct enough that attempts to attach to those did not prove
fruitful. This ethernet device shows up in the chips based on the
EN751221 die, and also in the EN7528 chip with minor differences.
This ethernet device also has a "packet processing engine" similar to
that of the MediaTek eth driver, but that is not supported in this
driver.
This driver has been used as an OpenWrt package for about 6 months but
was not contributed until now because there was no DSA switch support
for these devices.
Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Caleb James DeLisle (2):
dt-bindings: net: econet: add EN751221 ethernet
net: econet: add EcoNet EN751221 ethernet driver
.../bindings/net/econet,en751221-eth.yaml | 127 ++
MAINTAINERS | 7 +
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/econet/Kconfig | 20 +
drivers/net/ethernet/econet/Makefile | 7 +
drivers/net/ethernet/econet/econet_eth.c | 334 ++++
drivers/net/ethernet/econet/econet_eth.h | 231 +++
.../net/ethernet/econet/econet_eth_debug.c | 617 +++++++
drivers/net/ethernet/econet/econet_port.c | 473 +++++
drivers/net/ethernet/econet/econet_qdma.c | 1209 +++++++++++++
drivers/net/ethernet/econet/gdm_regs.h | 1514 +++++++++++++++++
drivers/net/ethernet/econet/qdma_desc.h | 677 ++++++++
drivers/net/ethernet/econet/qdma_regs.h | 1243 ++++++++++++++
14 files changed, 6461 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/econet,en751221-eth.yaml
create mode 100644 drivers/net/ethernet/econet/Kconfig
create mode 100644 drivers/net/ethernet/econet/Makefile
create mode 100644 drivers/net/ethernet/econet/econet_eth.c
create mode 100644 drivers/net/ethernet/econet/econet_eth.h
create mode 100644 drivers/net/ethernet/econet/econet_eth_debug.c
create mode 100644 drivers/net/ethernet/econet/econet_port.c
create mode 100644 drivers/net/ethernet/econet/econet_qdma.c
create mode 100644 drivers/net/ethernet/econet/gdm_regs.h
create mode 100644 drivers/net/ethernet/econet/qdma_desc.h
create mode 100644 drivers/net/ethernet/econet/qdma_regs.h
--
2.39.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/2] dt-bindings: net: econet: add EN751221 ethernet
2026-09-09 21:21 [PATCH net-next 0/2] net: econet: add EcoNet EN751221 ethernet driver Caleb James DeLisle
@ 2026-09-09 21:21 ` Caleb James DeLisle
[not found] ` <45cb6035-4d15-426d-bb3f-45d20b4201da@gmail.com>
2026-09-10 2:11 ` Andrew Lunn
[not found] ` <20260909212146.3184077-3-cjd@cjdns.fr>
1 sibling, 2 replies; 7+ messages in thread
From: Caleb James DeLisle @ 2026-09-09 21:21 UTC (permalink / raw)
To: netdev
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, robh, krzk+dt,
conor+dt, p.zabel, matthias.bgg, angelogioacchino.delregno,
vadim.fedorenko, maxime.chevallier, dong100, wangruikang,
25181214217, hkallweit1, han.junyang, xuanzhuo, enelsonmoore, jes,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
naseefkm, b.larsson, Caleb James DeLisle
The EN751221 ethernet controller is somewhat similar to the
airoha,en7581-eth but it has a different register layout and different
capabilities of the QDMA engines.
The engine is roughly made up of two "QDMA" modules (which provide QoS
and also DMA), two GDM modules which service the two ports, a PPE
(packet processing engine) similar to that in mediatek,net, and an
overall "frame engine" which coordinates the components.
The QDMA modules provide both communication with the CPU and QoS
prioritized forwarding. For example GDM0 -> QDMA0 -> GDM1 forwarding
path is possible.
Add DT documentation for the EN751221 ethernet system.
Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
---
.../bindings/net/econet,en751221-eth.yaml | 127 ++++++++++++++++++
MAINTAINERS | 6 +
2 files changed, 133 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/econet,en751221-eth.yaml
diff --git a/Documentation/devicetree/bindings/net/econet,en751221-eth.yaml b/Documentation/devicetree/bindings/net/econet,en751221-eth.yaml
new file mode 100644
index 000000000000..5d953eaa16e5
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/econet,en751221-eth.yaml
@@ -0,0 +1,127 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/econet,en751221-eth.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: EcoNet EN751221 Frame Engine Ethernet controller
+
+maintainers:
+ - Caleb James DeLisle <cjd@cjdns.fr>
+
+description:
+ The frame engine ethernet controller can be found on EcoNet chips
+ based on the EN751221 SoC.
+
+properties:
+ compatible:
+ enum:
+ - econet,en751221-eth
+ - econet,en7528-eth
+
+ reg:
+ items:
+ - description: Ethernet device
+
+ interrupts:
+ items:
+ - description: QDMA0 IRQ
+ - description: QDMA1 IRQ
+
+ resets:
+ items:
+ - description: Frame engine
+ - description: QDMA0
+ - description: QDMA1
+ - description: xPON MAC
+ - description: xPON PHY
+
+ reset-names:
+ items:
+ - const: fe
+ - const: qdma0
+ - const: qdma1
+ - const: xpon-mac
+ - const: xpon-phy
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^mac@[0-1]$":
+ type: object
+ unevaluatedProperties: false
+ $ref: ethernet-controller.yaml#
+ description:
+ Ethernet GMAC port associated to the MAC controller
+ properties:
+ compatible:
+ const: econet,eth-mac
+
+ reg:
+ items:
+ - description: GMAC port number
+
+ required:
+ - reg
+ - compatible
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - resets
+ - reset-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/reset/econet,en751221-scu.h>
+
+ soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ ethernet: ethernet@1fb50000 {
+ compatible = "econet,en751221-eth";
+ reg = <0x1fb50000 0x8000>;
+
+ resets = <&scuclk EN751221_FE_RST>,
+ <&scuclk EN751221_FE_QDMA1_RST>,
+ <&scuclk EN751221_FE_QDMA2_RST>,
+ <&scuclk EN751221_XPON_MAC_RST>,
+ <&scuclk EN751221_XPON_PHY_RST>;
+ reset-names = "fe", "qdma0", "qdma1",
+ "xpon-mac", "xpon-phy";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <21>, <22>;
+
+ gmac0: mac@0 {
+ compatible = "econet,eth-mac";
+ reg = <0>;
+ phy-mode = "trgmii";
+ status = "disabled";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ pause;
+ };
+ };
+
+ gmac1: mac@1 {
+ compatible = "econet,eth-mac";
+ reg = <1>;
+ status = "disabled";
+ phy-mode = "rgmii-rxid";
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index b23fb6f2f4ef..7417ca4ccc79 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9330,6 +9330,12 @@ F: drivers/irqchip/irq-econet-en751221.c
F: include/dt-bindings/clock/econet,en751221-scu.h
F: include/dt-bindings/reset/econet,en751221-scu.h
+ECONET ETHERNET DRIVER
+M: Caleb James DeLisle <cjd@cjdns.fr>
+L: netdev@vger.kernel.org
+S: Maintained
+F: Documentation/devicetree/bindings/net/econet,en751221-eth.yaml
+
ECONET PCIE PHY DRIVER
M: Caleb James DeLisle <cjd@cjdns.fr>
L: linux-mips@vger.kernel.org
--
2.39.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] dt-bindings: net: econet: add EN751221 ethernet
[not found] ` <45cb6035-4d15-426d-bb3f-45d20b4201da@gmail.com>
@ 2026-09-10 0:40 ` Caleb James DeLisle
0 siblings, 0 replies; 7+ messages in thread
From: Caleb James DeLisle @ 2026-09-10 0:40 UTC (permalink / raw)
To: Matheus Sampaio Queiroga, lorenzo
Cc: 25181214217, andrew+netdev, angelogioacchino.delregno, b.larsson,
conor+dt, davem, devicetree, dong100, edumazet, enelsonmoore,
han.junyang, hkallweit1, jes, krzk+dt, kuba, linux-arm-kernel,
linux-kernel, linux-mediatek, matthias.bgg, maxime.chevallier,
naseefkm, netdev, p.zabel, pabeni, robh, vadim.fedorenko,
wangruikang, xuanzhuo
On 10/09/2026 01:09, Matheus Sampaio Queiroga wrote:
> Hello everyone, please excuse this email.
>
> In my opinion, the Ethernet driver for the Econet/Airoha MIPS SoCs
> should be merged with the existing Airoha driver.
> i get PPE and xPON to start and work on the en7523, en751221, and en7528.
For my part, I don't agree with that opinion. When I first began
developing this driver, I first began trying to work on that driver and
I couldn't find a way that didn't lead to code which I consider ugly.
The main differences in hardware are the number of RX/TX chains in the
QDMA, number of IRQ banks (we only have 1), QDMA register layout is very
different and we have fewer features, and we have two GDMs rather than
four. Also as I recall we have fewer channels available so QoS logic is
not drop-in.
If someone proposed to me to add Airoha support to this driver, I
wouldn't want the same econet_qdma.c file supporting both platforms, and
in the Airoha driver the QDMA subsystem is more tightly coupled - so if
I maintained that driver, I would not want them merged at all.
I added Lorenzo Bianconi the Airoha maintainer to this thread in case he
may have some thoughts on the topic.
Thanks,
Caleb
>
> With a discussion on the Openwrt forum,
> it is said that integrating the en751627, en7528, and en7580 Ethernet
> drivers into the new EcoNet Ethernet driver.
> These families are closer to what we already have in the Aiorha driver.
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] dt-bindings: net: econet: add EN751221 ethernet
2026-09-09 21:21 ` [PATCH net-next 1/2] dt-bindings: net: econet: add EN751221 ethernet Caleb James DeLisle
[not found] ` <45cb6035-4d15-426d-bb3f-45d20b4201da@gmail.com>
@ 2026-09-10 2:11 ` Andrew Lunn
2026-09-10 9:06 ` Caleb James DeLisle
2026-09-10 12:11 ` Matheus Sampaio Queiroga
1 sibling, 2 replies; 7+ messages in thread
From: Andrew Lunn @ 2026-09-10 2:11 UTC (permalink / raw)
To: Caleb James DeLisle
Cc: netdev, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
krzk+dt, conor+dt, p.zabel, matthias.bgg,
angelogioacchino.delregno, vadim.fedorenko, maxime.chevallier,
dong100, wangruikang, 25181214217, hkallweit1, han.junyang,
xuanzhuo, enelsonmoore, jes, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, naseefkm, b.larsson
> + gmac1: mac@1 {
> + compatible = "econet,eth-mac";
> + reg = <1>;
> + status = "disabled";
> + phy-mode = "rgmii-rxid";
That is a very unusual phy-mode. Is there a reason this is used in the
example?
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] dt-bindings: net: econet: add EN751221 ethernet
2026-09-10 2:11 ` Andrew Lunn
@ 2026-09-10 9:06 ` Caleb James DeLisle
2026-09-10 12:11 ` Matheus Sampaio Queiroga
1 sibling, 0 replies; 7+ messages in thread
From: Caleb James DeLisle @ 2026-09-10 9:06 UTC (permalink / raw)
To: Andrew Lunn
Cc: netdev, andrew+netdev, davem, edumazet, kuba, pabeni, robh,
krzk+dt, conor+dt, p.zabel, matthias.bgg,
angelogioacchino.delregno, vadim.fedorenko, maxime.chevallier,
dong100, wangruikang, 25181214217, hkallweit1, han.junyang,
xuanzhuo, enelsonmoore, jes, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, naseefkm, b.larsson
On 10/09/2026 04:11, Andrew Lunn wrote:
>> + gmac1: mac@1 {
>> + compatible = "econet,eth-mac";
>> + reg = <1>;
>> + status = "disabled";
>> + phy-mode = "rgmii-rxid";
> That is a very unusual phy-mode. Is there a reason this is used in the
> example?
Mac 1 connects to an xPON or xDSL subsystem depending on chip package.
The phy-mode is not used by the driver and when the driver was written 6
months ago this was the best guess about the electrical protocol, left
for documentation purposes.
Your question made me re-investigate this, and I now note that both the
xPON and xDSL "upper halves" as well as the switch on gmac0 are all
on-die, so I think phy-mode = "internal" is more appropriate and I will
re-send as such, and with some light documentation about what this
ethernet connects to - since it's on the die so it'll always be the same.
Thanks,
Caleb
>
> Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] dt-bindings: net: econet: add EN751221 ethernet
2026-09-10 2:11 ` Andrew Lunn
2026-09-10 9:06 ` Caleb James DeLisle
@ 2026-09-10 12:11 ` Matheus Sampaio Queiroga
1 sibling, 0 replies; 7+ messages in thread
From: Matheus Sampaio Queiroga @ 2026-09-10 12:11 UTC (permalink / raw)
To: andrew
Cc: 25181214217, andrew+netdev, angelogioacchino.delregno, b.larsson,
cjd, conor+dt, davem, devicetree, dong100, edumazet, enelsonmoore,
han.junyang, hkallweit1, jes, krzk+dt, kuba, linux-arm-kernel,
linux-kernel, linux-mediatek, matthias.bgg, maxime.chevallier,
naseefkm, netdev, p.zabel, pabeni, robh, vadim.fedorenko,
wangruikang, xuanzhuo
> That is a very unusual phy-mode. Is there a reason this is used in the
> example?
>
> Andrew
the GDM1 and GDM2 behave something similar to the newer Airoha, we have an MT7530 connected to the GDM1 as internal mode, and the GDM2 is also an internal one that communicates with the xPON and xDSL subsystem.
the en751221 has two mt7530 switches, the dsa0 limited to 10/100Mbps and a dsa2 1GbE connected to port 5 of the dsa1 in cascaded mode, but it varies from chip to chip
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/2] net: econet: add EcoNet EN751221 ethernet driver
[not found] ` <20260909212146.3184077-3-cjd@cjdns.fr>
@ 2026-09-12 0:07 ` Jakub Kicinski
0 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2026-09-12 0:07 UTC (permalink / raw)
To: Caleb James DeLisle
Cc: netdev, andrew+netdev, davem, edumazet, pabeni, robh, krzk+dt,
conor+dt, p.zabel, matthias.bgg, angelogioacchino.delregno,
vadim.fedorenko, maxime.chevallier, dong100, wangruikang,
25181214217, hkallweit1, han.junyang, xuanzhuo, enelsonmoore, jes,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
naseefkm, b.larsson
On Wed, 9 Sep 2026 21:21:46 +0000 Caleb James DeLisle wrote:
> The EcoNet ethernet driver is somewhat similar to both the Airoha
> and the MediaTek drivers, but still unique enough that attempts at
> code reuse did not prove fruitful.
Please split this up into multiple patches.
Each patch has to build cleanly with W=1 path/to/your/driver/
Please also use ./scripts/kernel-doc -Wall to validate your kdoc
is correct.
Please don't repost patches less than 24h after previous posting
Please don't repost patches in reply to previous posting, always
start a new thread.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-12 0:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09 21:21 [PATCH net-next 0/2] net: econet: add EcoNet EN751221 ethernet driver Caleb James DeLisle
2026-09-09 21:21 ` [PATCH net-next 1/2] dt-bindings: net: econet: add EN751221 ethernet Caleb James DeLisle
[not found] ` <45cb6035-4d15-426d-bb3f-45d20b4201da@gmail.com>
2026-09-10 0:40 ` Caleb James DeLisle
2026-09-10 2:11 ` Andrew Lunn
2026-09-10 9:06 ` Caleb James DeLisle
2026-09-10 12:11 ` Matheus Sampaio Queiroga
[not found] ` <20260909212146.3184077-3-cjd@cjdns.fr>
2026-09-12 0:07 ` [PATCH net-next 2/2] net: econet: add EcoNet EN751221 ethernet driver Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox