New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mediatek: filogic: add ZyXEL EX5700 (Telenor) support #12276
Conversation
Hi, the "mediatek,eth-mac label" patch has been rejected in #11435.
Should it be 1GB DDR4 here? |
Thanks for the info. Makes absolutely no sense given that the patch already is in OpenWrt.... But in principle, I agree with the idea behind it - follow upstream as closely as possible. AFAICS, "label" is documented in Documentation/devicetree/bindings/net/ethernet-controller.yaml and implemented in at least the DSA subsystem. Allowing that, which could just as well have been done in userspace, but rejecting it for other mac drivers is inconsistent. I'll remove this patch here, and replace it with some hacky userspace solution. Thinking about trying upstream again. Too bad it's hard (impossible?) to implement this in some common infrastructure. Looks like it has to be done in every driver?
Probably. Will fix. Thanks for the review |
Megadevice. 0_o |
Pushed an updated branch with all comments handled. Changes:
|
525da81
to
c6d1380
Compare
rebased onto master, resolving the conflicts caused by the recently added EX5600 sister device |
updated to account for commit 7a0ec00 ("mediatek: sync MT7986 device trees with upstream") and rebased onto current main |
|
Yet another rebase on main, dropping the mkits patch which was merged as commit 2b133ab ("scripts: use sep-char for hash nodes") |
rebased to resolve conflicts after the NWA50AX Pro addition |
The vendor U-Boot implementaion on Telenor branded ZyXEL EX5700 devices does not store its environment on flash. It is instead kept in a memory region. This is persistent over reboots, but not over power cycling. The dual partition failsafe system used by the vendor U-Boot requires the OS to modify a variable in this memory environment. This driver allows the ordinary uboot-envtools to access a memory region like it was a partition on NOR flash. The specific vendor U-Boot adds a "no-map" /reserved-memory section and a top level /ubootenv node pointing to the memory environment. The driver uses this device specific fact to locate the region. The matching and probing code will likely have to be adjusted for any other devices to be supported. Example partial device tree: / { .. ubootenv { memory-region = <&uenv>; compatible = "ubootenv"; }; .. reserved-memory { .. uenv: ubootenv@7ffe8000 { no-map; reg = <0 0x7ffe8000 0 0x4000>; }; Signed-off-by: Bjørn Mork <bjorn@mork.no>
Implement the functionality of target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch in userspace, since the driver patch has been rejected as a generic solution: openwrt#11435 Signed-off-by: Bjørn Mork <bjorn@mork.no>
Telenor quirks -------------- The operator specific firmware running on the Telenor branded ZyXEL EX5700 includes U-Boot modifications affecting the OpenWrt installation. Notable changes to U-Boot include - environment is stored in RAM and reset to defaults when power cycled - dual partition scheme with "nomimal" or "rescue" systems, falling back to "rescue" unless the OS signals success in 3 attempts - several runtime additions to the device-tree Some of these modifications have side effects requiring workarounds - U-Boot modifies /chosen/bootargs in an unsafe manner, and will crash unless this node exists - U-Boot verifies that the selected rootfs UBI volume exists, and refuses to boot if it doesn't. The chosen "rootfs" volume must contain a squashfs signature even for tftp or initramfs booting. - U-Boot parses the "factoryparams" UBI volume, setting the "ethaddr" variable to the label mac. But "factoryparams" does not always exist. Instead there is a "RIP" volume containing all the factory data. Copying the "RIP" volume to "factoryparams" will fix this Hardware -------- SOC: MediaTek MT7986 RAM: 1GB DDR4 FLASH: 512MB SPI-NAND (Mikron xxx) WIFI: Mediatek MT7986 802.11ax 5 GHz Mediatek MT7916 DBDC 802.11ax 2.4 + 6 GHz ETH: MediaTek MT7531 Switch + SoC 3 x builtin 1G phy (lan1, lan2, lan3) 2 x MaxLinear GPY211C 2.5 N-Base-T phy (lan4, wan) USB: 1 x USB 3.2 Enhanced SuperSpeed port UART: 3V3 115200 8N1 (Pinout: GND KEY RX TX VCC) Installation ------------ 1. Download the OpenWrt initramfs image. Copy the image to a TFTP server reachable at 192.168.1.2/24. Rename the image to C0A80101.img. 2. Connect the TFTP server to lan1, lan2 or lan3. Connect to the serial console, Interrupt the autoboot process by pressing ESC when prompted. 3. Download and boot the OpenWrt initramfs image. $ env set uboot_bootcount 0 $ env set firmware nominal $ tftpboot $ bootm 4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device using scp and install using sysupgrade. $ sysupgrade -n <path-to-sysupgrade.bin> Missing features ---------------- - The "lan1", "lan2" and "lan3" port LEDs are driven by the switch but OpenWrt does not correctly configure the output. - The "lan4" and "wan" port LEDs are driven by the GPH211C phys and not configured by OpenWrt. Signed-off-by: Bjørn Mork <bjorn@mork.no>
Add support for the Telenor branded version of the ZyXEL EX5700. This comes with a modified U-Boot requiring device specific workarounds.