mirror of
https://github.com/VIKINGYFY/immortalwrt.git
synced 2025-12-16 09:10:38 +00:00
econet: basic Ethernet support
This is about as simple as it gets, it's able to start up and put the onboard switch into dumb switch mode and then send untagged frames which become available on every switch port. It is out-of-tree to allow for rapid development and it is being proposed now because even in this state it brings a lot of value to the EcoNet platform and it is a fairly complex ethernet system so it will take some time before the driver is in a state that may be considered for upstreaming. Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr> Link: https://github.com/openwrt/openwrt/pull/20685 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
dac466452b
commit
d6b4b63850
35
package/kernel/econet-eth/Makefile
Normal file
35
package/kernel/econet-eth/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=econet-eth
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/cjdelisle/econet_eth.git
|
||||
PKG_MIRROR_HASH:=764e18fe2f87cb0c742711c18ed995a2270b02f0072e7a0938906d0246287111
|
||||
PKG_SOURCE_DATE:=2025-11-07
|
||||
PKG_SOURCE_VERSION:=40aac736a46fec0d96beadd7513c53d1f0459737
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/econet-eth
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=EcoNet EN751221 Ethernet Driver
|
||||
DEPENDS:=@TARGET_econet
|
||||
FILES:=$(PKG_BUILD_DIR)/econet-eth.ko
|
||||
AUTOLOAD:=$(call AutoLoad,90,econet-eth)
|
||||
endef
|
||||
|
||||
define KernelPackage/econet-eth/description
|
||||
Out-of-tree ethernet driver for EcoNet EN751221 devices.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) M=$(PKG_BUILD_DIR) modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,econet-eth))
|
||||
@ -56,6 +56,93 @@
|
||||
econet,shadow-interrupts = <7 2>, <8 3>, <13 12>, <30 29>;
|
||||
};
|
||||
|
||||
ethernet: ethernet@1fb50000 {
|
||||
compatible = "econet,en751221-eth";
|
||||
reg = <0x1fb50000 0x10000>;
|
||||
|
||||
#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";
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch0: switch@1f {
|
||||
compatible = "mediatek,mt7530";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x1f>;
|
||||
mediatek,mcm;
|
||||
reset-names = "mcm";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
|
||||
port@0 {
|
||||
status = "disabled";
|
||||
reg = <0>;
|
||||
label = "lan0";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "disabled";
|
||||
reg = <1>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "disabled";
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "disabled";
|
||||
reg = <3>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "trgmii";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
usb: usb@1fb90000 {
|
||||
compatible = "mediatek,mt8173-xhci", "mediatek,mtk-xhci";
|
||||
reg = <0x1fb90000 0x4000>,
|
||||
|
||||
@ -50,3 +50,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -123,3 +123,9 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
nvmem-cells = <&macaddr_ri_3e 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@ -104,3 +104,9 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
nvmem-cells = <&macaddr_bootloader_ff48 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@ -96,3 +96,9 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
nvmem-cells = <&macaddr_misc_8f100 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user