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
ipq40xx: Add ZTE MF289F #10710
ipq40xx: Add ZTE MF289F #10710
Conversation
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
Outdated
Show resolved
Hide resolved
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
Outdated
Show resolved
Hide resolved
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
Outdated
Show resolved
Hide resolved
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
Outdated
Show resolved
Hide resolved
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
Outdated
Show resolved
Hide resolved
@stich86 Aside from a few tiny cosmetic issues in device tree, and the DEVICE_PACKAGES line, LGTM. Great work! |
thanks for you time Let me know if i'm missing something |
It'd be nice to restore Paweł's copyright notice in the device tree, maybe it was dropped by accident. |
Do you mean these?
EDIT: it should be fixed now, i've also restore Pawel 's Copyright Let me know! |
Just to make it clear: |
Tested by @MiG-41 , works without issues on my MF289F. |
Tested-by: @MayorBug on my MF289F AT2 with the build uploaded on @stich86 github. Flashing went smoothly and everything seems to work except I have some isolated issues when connecting to 5 GHz network when set to 80 MHz with my laptop. My phone (OP7TP) connects fine. So it might be a problem with my QCA6174 network card. |
Tested by @Angemon25 on my MF289F AT2. The installation was very simple and everything works perfectly, besides it's stable and I have not had any crashes. |
here is a build from SNAPSHOT r20640-780e592f03 using these patches, if anyone want to test it feel free to comment :) Inside the build there are some custom packages (from @4IceG and eko.one.pl) and it's preconfigured with: hostname: MF289F Custom packages:
https://github.com/stich86/OpenWRT-ZTE-MF289F/tree/main/test_build_220924 |
Hi, thanks for adding support for that device. I've found only a small issue on my device (Vodafone device, AT2)) The led-status is not gpio controlled (at least on my device) . To me it looks like it's directly connected to the power supply Probably it's better to rm the led-status node add the board-led (the blue one on the board, gpio 35) as a default led to see the boot/sysupgrade status. In addition it would be good to add a note, that the 3rd led (network led) seems controlled by the wwan card. Cheers |
@stich86 I flashed your latest build via sysupgrade with the keep settings flag. Booted right up and seems to be working. Can't comment on stability yet. The previous build was rock solid for me. Also the issue with the 80 mhz setting went away when I ran linux on my pc, that rules out router firmware problems. |
uh thanks for that feedback. I'm rebuilding the led-status with correct GPIO, after tested i'll push new commit let you know in the next few minutes :) |
What are advantages of DSA conversion? @chunkeey regarding you last commit, only change was related to wrong GPIO of internal status led. How do you want to proceed? Thx |
DSA is the successor of the legacy OpenWrt switchdev. robimarko has added a DSA compatible driver + a newer Ethernet driver for IPQ40xx and all IPQ40xx devices needs to be converted to DSA logic. |
the LED that we talk about is now led-0, right? From what I understand, you could just make a separate patch that replaces the GPIO 10 with 35. Cheers, |
Should I need to open another PR? |
now the PR has some conflicts because device was added on master branch. Some people also told me to swap eth0 with eth1 and viceversa to match the labeling on back cover. At the moment i've used eth0 as LAN1/WAN and eth1 as LAN, but on OpenWRT are LAN and WAN respectivly. @Leo-PL What do you think? I'm referring about thread on eko.one thx |
@stich86 I would swap the interfaces, so 'wan' is at least on that has WAN label, so WAN/LAN1, and thus 'lan' on LAN2. |
ok so to recap:
on the last one, how to do it? Just change label on DTS or I need to modify custom configuration? thx! |
@stich86 I looked here: Mapping of ports to the (virtual) Ethernet links inside chip is done in the device tree. If so, then the device tree will need two new properties:
to actually swap the mapping between LAN (eth0) which now covers ports 1-4, and WAN (eth1) which covers port 5. |
thx for the hints. I'll try this week on my unit, if it works i'll open new PR with both fixes (LED+eth swap) |
@chunkeey can I close this PR? let me know thx! |
I take a look at original DTS, switch is configured in this way:
So i've added to my DTS these one and configured 02_network as suggested:
But booting the image doesn't work. I see that at OS level eth0 is still LAN1/WAN and eth1 LAN, but no more traffic pass on these interfaces Same problem also using your data. Any suggestion? Thx |
According to the stock firmware (etc/init.d/zte_init.sh) they using vlan's to separate wan/lan and assigning the eth ports. So if you are using the stock wan/lan switch BMP you would also need the same vlan config I guess. Can you try that bitmask?
|
using that bitmask (same suggested by @Leo-PL), eth0\eth1 still the same on booted image but there is no more traffic passing.. |
Without a documentation of the possible bit-masks it's hard to tell which would be the correct one. BTW with my mentioned DSA change the eth ports are in the right order (matching the silkscreen) |
@kirdesde the DSA conversion for ipq40xx finally landed. Could you post your conversion for MF289F somewhere, as it got disabled? |
Yes I can create a PR later this week.
|
After quick look, LGTM. I think you can drop |
So we will avoid swap on original switch? I'll open just a PR to fix led DTS Thx! |
I'm not sure that you mean, with my DSA patch the LAN/WAN ports are matching the silk print on the case.
|
Yes I understand @Leo-PL what do you think? |
DSA-PR: #10908 |
@hauke I think this can be close, device is now on master i've openend new one #10936 that fix wrong GPIO for statis led @Leo-PL @chunkeey @robimarko let me know if it's ok and can be merged :) |
It's a 4G Cat.20 router used by Vodafone Italy (called Vodafone FWA) and Vodafone DE\T-Mobile PL (called GigaCube). Modem is a MiniPCIe-to-USB based on Snapdragon X24, it supports 4CA aggregation.
There are currently two hardware revisions, which differ on the 5Ghz radio:
AT1 = QCA9984 5Ghz Radio on PCI-E bus
AT2 = IPQ4019 5Ghz Radio insde IPQ4019 like 2.4Ghz
Device specification
SoC Type: Qualcomm IPQ4019
RAM: 256 MiB
Flash: 128 MiB SPI NAND (Winbond W25N01GV)
ROM: 2MiB SPI Flash (GD25Q16)
Wireless 2.4 GHz (IP4019): b/g/n, 2x2
Wireless 5 GHz (QCA9984): a/n/ac, 4x4 HW REV AT1 OR 5 GHz (IPA4019): a/n/ac, 2x2 HW REV AT2 Ethernet: 2xGbE (WAN/LAN1, LAN2)
USB ports: No
Button: 2 (Reset/WPS)
LEDs: 3 external leds: Network (white or red), Wifi, Power and 1 internal (blue) -- NOTE: Power and Network leds are controlled by board and cannot be modified by OpenWRT
Power: 12 VDC, 1 A
Connector type: Barrel
Bootloader: U-Boot
Installation
setenv serverip 192.168.0.2
setenv ipaddr 192.168.0.1
set fdt_high 0x85000000
tftp openwrt-ipq40xx-generic-zte_mf289f-initramfs-fit-zImage.itb bootm $loadaddr
WEB PARITION
cat /dev/mtd16 > /tmp/mtd16.bin
scp /tmp/mtd16.bin root@YOURSERVERIP:/
rm /tmp/mtd16.bin
ROOT PARITION
cat /dev/mtd17 > /tmp/mtd17.bin
scp /tmp/mtd17.bin root@YOURSERVERIP:/
rm /tmp/mtd17.bin
ubiattach -m 17 # it could return error if ubi was attached before or rootfs part was erased before ubirmvol /dev/ubi0 -N ubi_rootfs # it could return error if rootfs part was erased before ubirmvol /dev/ubi0 -N ubi_rootfs_data # some devices doesn't have it
Flash Layout
NAND:
mtd8: 000a0000 00020000 "fota-flag"
mtd9: 00080000 00020000 "0:ART"
mtd10: 00080000 00020000 "mac"
mtd11: 000c0000 00020000 "reserved2"
mtd12: 00400000 00020000 "cfg-param"
mtd13: 00400000 00020000 "log"
mtd14: 000a0000 00020000 "oops"
mtd15: 00500000 00020000 "reserved3"
mtd16: 00800000 00020000 "web"
mtd17: 01d00000 00020000 "rootfs"
mtd18: 01900000 00020000 "data"
mtd19: 03200000 00020000 "fota"
mtd20: 0041e000 0001f000 "kernel"
mtd21: 0101b000 0001f000 "ubi_rootfs"
SPI:
mtd0: 00040000 00010000 "0:SBL1"
mtd1: 00020000 00010000 "0:MIBIB"
mtd2: 00060000 00010000 "0:QSEE"
mtd3: 00010000 00010000 "0:CDT"
mtd4: 00010000 00010000 "0:DDRPARAMS"
mtd5: 00010000 00010000 "0:APPSBLENV"
mtd6: 000c0000 00010000 "0:APPSBL"
mtd7: 00050000 00010000 "0:reserved1"
Back to Stock (!!! need original dump taken from initramfs !!!) -------------
This will erase RootFS+Web:
nand erase 0x1000000 0x800000
nand erase 0x1800000 0x1D00000
This will restore RootFS:
tftpboot 0x84000000 ${dir}root_uImage_s
nand erase 0x1800000 0x1D00000
nand write $fileaddr 0x1800000 $filesize
This will restore Web Interface:
tftpboot 0x84000000 ${dir}web.img
nand erase 0x1000000 0x800000
nand write $fileaddr 0x1000000 $filesize
After first boot on stock firwmare, do a factory reset. Push reset button for 5 seconds so all parameters will be reverted to the one printed on label on bottom of the router
Signed-off-by: Giammarco Marzano stich86@gmail.com