From: Ahmed Naseef Date: Sat, 7 Feb 2026 10:51:53 +0000 (+0400) Subject: econet: en7528: add basic ethernet support X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32df0bdf5909feac99cbf8e9f4df8fabd7c37dc4;p=thirdparty%2Fopenwrt.git econet: en7528: add basic ethernet support EN7528 shares the same clock/reset controller as EN7523. Enable COMMON_CLK_EN7523 and RESET_CONTROLLER for ethernet hardware resets. Update econet-eth driver and add it as default package. Signed-off-by: Ahmed Naseef Link: https://github.com/openwrt/openwrt/pull/21326 Signed-off-by: Hauke Mehrtens --- diff --git a/package/kernel/econet-eth/Makefile b/package/kernel/econet-eth/Makefile index d6440f84779..356d006d293 100644 --- a/package/kernel/econet-eth/Makefile +++ b/package/kernel/econet-eth/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/cjdelisle/econet_eth.git -PKG_MIRROR_HASH:=1d2e55a486d2573fe206fff8ec524af157455f6d7f8e00121da440bce551c28f -PKG_SOURCE_DATE:=2026-01-15 -PKG_SOURCE_VERSION:=ea5f527f48aeb7aef914f9e4fce6cb173cb06640 +PKG_MIRROR_HASH:=b0136345b176f714e28397b8feba372234e9c87fb33879db2e413fb22c1c09c4 +PKG_SOURCE_DATE:=2026-01-27 +PKG_SOURCE_VERSION:=1db74f832563865680ae0b1c25c0a213bbcdf92c include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk diff --git a/target/linux/econet/Makefile b/target/linux/econet/Makefile index f3e8af3945c..aa8ba09c0f8 100644 --- a/target/linux/econet/Makefile +++ b/target/linux/econet/Makefile @@ -19,6 +19,6 @@ endef include $(INCLUDE_DIR)/target.mk # nand-utils is used by base-files/sbin/en75_chboot -DEFAULT_PACKAGES += nand-utils +DEFAULT_PACKAGES += nand-utils kmod-econet-eth $(eval $(call BuildTarget)) diff --git a/target/linux/econet/dts/en7528.dtsi b/target/linux/econet/dts/en7528.dtsi index 78eab98ed81..f6232ed37c9 100644 --- a/target/linux/econet/dts/en7528.dtsi +++ b/target/linux/econet/dts/en7528.dtsi @@ -2,6 +2,8 @@ /dts-v1/; #include +#include +#include / { compatible = "econet,en7528"; @@ -55,6 +57,14 @@ interrupts = <2>; }; + scu: system-controller@1fb00000 { + compatible = "airoha,en7523-scu"; + reg = <0x1fa20000 0x400>, + <0x1fb00000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + }; + timer_hpt: timer@1fbf0400 { compatible = "econet,en7528-timer"; reg = <0x1fbf0400 0x14>, @@ -100,4 +110,45 @@ clock-frequency = <7372800>; }; + + ethernet: ethernet@1fb50000 { + compatible = "econet,en7528-eth"; + reg = <0x1fb50000 0x10000>; + + #address-cells = <1>; + #size-cells = <0>; + + interrupt-parent = <&gic>; + interrupts = , + ; + + resets = <&scu EN7523_FE_RST>, + <&scu EN7523_FE_PDMA_RST>, + <&scu EN7523_FE_QDMA_RST>, + <&scu EN7523_GSW_RST>, + <&scu EN7523_XPON_MAC_RST>, + <&scu EN7523_XPON_PHY_RST>; + reset-names = "fe", "qdma0", "qdma1", "gsw", + "xpon-mac", "xpon-phy"; + + 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>; + phy-mode = "rgmii-rxid"; + status = "disabled"; + }; + }; }; diff --git a/target/linux/econet/dts/en7528_dasan_h660gm-a.dts b/target/linux/econet/dts/en7528_dasan_h660gm-a.dts index 7614b71ada7..1065e24fbb7 100644 --- a/target/linux/econet/dts/en7528_dasan_h660gm-a.dts +++ b/target/linux/econet/dts/en7528_dasan_h660gm-a.dts @@ -18,6 +18,12 @@ }; }; +&gmac0 { + status = "okay"; + nvmem-cells = <&macaddr_dzs 7>; + nvmem-cell-names = "mac-address"; +}; + &nand { status = "okay"; econet,bmt; @@ -37,6 +43,17 @@ partition@40000 { label = "dzs"; reg = <0x40000 0x40000>; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_dzs: macaddr@a { + compatible = "mac-base"; + reg = <0xa 0x6>; + #nvmem-cell-cells = <1>; + }; + }; }; partition@80000 { diff --git a/target/linux/econet/dts/en7528_generic.dts b/target/linux/econet/dts/en7528_generic.dts index 2a3835eb2b1..d4d25266e34 100644 --- a/target/linux/econet/dts/en7528_generic.dts +++ b/target/linux/econet/dts/en7528_generic.dts @@ -24,6 +24,10 @@ }; }; +&gmac0 { + status = "okay"; +}; + &nand { status = "okay"; diff --git a/target/linux/econet/en7528/config-6.12 b/target/linux/econet/en7528/config-6.12 index c956eb06494..0680fdfb37c 100644 --- a/target/linux/econet/en7528/config-6.12 +++ b/target/linux/econet/en7528/config-6.12 @@ -8,7 +8,7 @@ CONFIG_BOARD_SCACHE=y CONFIG_CLKSRC_MMIO=y CONFIG_CLONE_BACKWARDS=y CONFIG_COMMON_CLK=y -# CONFIG_COMMON_CLK_EN7523 is not set +CONFIG_COMMON_CLK_EN7523=y CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 CONFIG_COMPAT_32BIT_TIME=y CONFIG_CONTEXT_TRACKING=y @@ -159,6 +159,7 @@ CONFIG_RANDSTRUCT_NONE=y CONFIG_RATIONAL=y CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y +CONFIG_RESET_CONTROLLER=y CONFIG_RFS_ACCEL=y CONFIG_RPS=y # CONFIG_SCHED_CORE is not set