1 (edytowany przez stich86 2022-07-31 18:04:37)

Temat: ZTE MF289F - Porting OpenWRT

Hi guys,

after successful unlocking B20 on my MF289F (Vodafone IT has a combo CA restriction, that can be removed modifing EFS partition) I want to try porting OpenWRT on this device.

ATM i've tried to boot MF286D initramfs, this device has same CPU and WiFi chipset (only modem is different, currently an SDX24 instead of MSM9260)

On my MEGA folder you can find device-tree, mtd layout, mtd backup and openwrt (MF286D initramfs) bootlog and original boot log.

https://mega.nz/folder/L8IGUB6K#WgUqkEiBVfXkY-ln1TBBHg

At first attempt, looks like that there are two SPI NAND (or the same one with two bus), one that contains all stuff from Qualcomm, the other one all Linux stuff, but initramfs of MF286D cannot find the second NAND

Any help is really appreciated

2

Odp: ZTE MF289F - Porting OpenWRT

Use dts from MF286D, add new spi flash ( "flash@1"), change partition layout for flash@0. Recompile system, boot initramfs and show us bootlog.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: ZTE MF289F - Porting OpenWRT

Cezary napisał/a:

Use dts from MF286D, add new spi flash ( "flash@1"), change partition layout for flash@0. Recompile system, boot initramfs and show us bootlog.

I’ve check DTS for MF286D, looks like there are already two flash:

Flash0: all Qualcomm stuff
Flash1: Linux stuff

May be the NAND driver is different?

4

Odp: ZTE MF289F - Porting OpenWRT

Where?  https://github.com/openwrt/openwrt/blob … d.dts#L154 only flash@0 is declared and nand@0.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

5

Odp: ZTE MF289F - Porting OpenWRT

Cezary napisał/a:

Where?  https://github.com/openwrt/openwrt/blob … d.dts#L154 only flash@0 is declared and nand@0.

Oh shit… I’ve seen MF286 (without D) and there are two flashes (0/1).

looks like that MF289F has same layout of MF286D for NAND part, so I can start renaming nand@0 to flash@1 and see if the second flash is recognized.

I’ll try it tomorrow and reports the logs.

Thanks for the tip smile

6

Odp: ZTE MF289F - Porting OpenWRT

Z tego co widzę modem przedstawia się identycznie jak z MF286D , łaczy się po skonfigurowaniu połączenia na openwrt uruchomionym z initramfs ?

7

Odp: ZTE MF289F - Porting OpenWRT

W obrazach initramfs brakuje pakietów do tego.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

8

Odp: ZTE MF289F - Porting OpenWRT

MiG25 napisał/a:

Z tego co widzę modem przedstawia się identycznie jak z MF286D , łaczy się po skonfigurowaniu połączenia na openwrt uruchomionym z initramfs ?

No it’s not the same.
It uses a Snapdragon X24, so it can aggregate 4 band. It should work on OpenWRT, put the modem into MF286D the connection works smile

Ill try to recompile with newer dts to see the other flash

@cezary is it normal that initramfs doesn’t contain firmware for Wi-Fi?

9

Odp: ZTE MF289F - Porting OpenWRT

Yes. Initramfs has only basic packages, everything else with packages specyfic for routers is not included. Just generic image.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

10

Odp: ZTE MF289F - Porting OpenWRT

ok, i've modified the dts of MF286D, but still not work.

Here is the OpenWRT boot log with new dts:

## Booting kernel from FIT Image at 84000000 ...
   Using 'config@ap.dk04.1-c1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM OpenWrt Linux-5.10.131
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x840000e4
     Data Size:    8904600 Bytes = 8.5 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   11a31de1
     Hash algo:    sha1
     Hash value:   5f06a2098f3d96f7ec41fd4174beda05b46fa09a
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
   Using 'config@ap.dk04.1-c1' configuration
   Trying 'fdt-1' FDT blob subimage
     Description:  ARM OpenWrt zte_mf286d device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x8487e1b0
     Data Size:    18783 Bytes = 18.3 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   5dc23d32
     Hash algo:    sha1
     Hash value:   0b8896af845737f360456fd8a027472772e8f8d8
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x8487e1b0
   Loading Kernel Image ... OK
OK
   Loading Device Tree to 84ff8000, end 84fff95e ... OK
Device nand0 not found!
invalid mtd device 'nand1'
eth0 MAC Address from ART is not valid
eth1 MAC Address from ART is not valid
Using machid 0x8010001 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.131 (lynx@openwrt-buildroot) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.3.0 r20168-b2681e584c) 11.3.0, GNU ld (GNU Binutils) 2.37) #0 SMP Tue Jul 26 07:15:38 2022
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: ZTE MF289F
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000008fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x0000000087dfffff]
[    0.000000]   node   0: [mem 0x0000000087e00000-0x0000000087ffffff]
[    0.000000]   node   0: [mem 0x0000000088000000-0x000000008fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000008fffffff]
[    0.000000] percpu: Embedded 15 pages/cpu s30860 r8192 d22388 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line:  root=/dev/ubiblock0_1
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 225672K/262144K available (6180K kernel code, 605K rwdata, 1552K rodata, 22528K init, 237K bss, 36472K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]     Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns
[    0.000008] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns
[    0.000025] Switching to timer-based delay loop, resolution 20ns
[    0.000332] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.000357] pid_max: default: 32768 minimum: 301
[    0.000538] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000559] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001538] CPU: Testing write buffer coherency: ok
[    0.001896] qcom_scm: convention: smc legacy
[    0.002831] Setting up static identity map for 0x80300000 - 0x8030003c
[    0.002990] rcu: Hierarchical SRCU implementation.
[    0.003253] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.003610] smp: Bringing up secondary CPUs ...
[    0.007082] smp: Brought up 1 node, 4 CPUs
[    0.007108] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[    0.007118] CPU: All CPU(s) started in SVC mode.
[    0.012425] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.012579] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.012606] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.012833] pinctrl core: initialized pinctrl subsystem
[    0.014601] NET: Registered protocol family 16
[    0.014939] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.016048] thermal_sys: Registered thermal governor 'step_wise'
[    0.016470] cpuidle: using governor ladder
[    0.016527] cpuidle: using governor menu
[    0.043150] cryptd: max_cpu_qlen set to 1000
[    0.047356] usbcore: registered new interface driver usbfs
[    0.047434] usbcore: registered new interface driver hub
[    0.047493] usbcore: registered new device driver usb
[    0.047544] pps_core: LinuxPPS API ver. 1 registered
[    0.047556] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.047583] PTP clock support registered
[    0.049234] clocksource: Switched to clocksource arch_sys_counter
[    0.050212] NET: Registered protocol family 2
[    0.050463] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.051143] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.051206] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.051247] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.051298] TCP: Hash tables configured (established 2048 bind 2048)
[    0.051420] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.051461] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.051732] NET: Registered protocol family 1
[    0.051777] PCI: CLS 0 bytes, default 64
[    0.291787] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.296113] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.296135] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.432253] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[    0.432280] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[    0.433643] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[    0.433760] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[    0.433856] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[    0.433947] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[    0.434267] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.434826] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.434871] msm_serial 78af000.serial: uartclk = 1843200
[    0.434925] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 33, base_baud = 115200) is a MSM
[    0.434954] msm_serial: console setup on port #0
[    0.970316] printk: console [ttyMSM0] enabled
[    0.975466] msm_serial: driver initialized
[    0.984444] loop: module loaded
[    0.985424] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.988130] spi-nor spi0.0: gd25q16 (2048 Kbytes)
[    0.993806] 8 fixed-partitions partitions found on MTD device spi0.0
[    0.998297] Creating 8 MTD partitions on "spi0.0":
[    1.004740] 0x000000000000-0x000000040000 : "0:SBL1"
[    1.009903] 0x000000040000-0x000000060000 : "0:MIBIB"
[    1.014925] 0x000000060000-0x0000000c0000 : "0:QSEE"
[    1.019946] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[    1.024874] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[    1.029694] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[    1.035071] 0x0000000f0000-0x0000001b0000 : "0:APPSBL"
[    1.040475] 0x0000001b0000-0x000000200000 : "0:reserved1"
[    1.049247] spi-nand spi0.1: unknown raw ID 00000000
[    1.050481] spi-nand: probe of spi0.1 failed with error -524
[    1.159850] ESS reset ok!
[    1.234131] ESS reset ok!
[    1.906744] EDMA using MAC@ - using
[    1.906763] a2:7e:66:60:3c:b4
[    1.909951] EDMA using MAC@ - using
[    1.909964] 52:d3:cf:6e:42:9d
[    1.994139] i2c /dev entries driver
[    1.996090] sdhci: Secure Digital Host Controller Interface driver
[    1.996440] sdhci: Copyright(c) Pierre Ossman
[    2.002776] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.011091] NET: Registered protocol family 10
[    2.014352] Segment Routing with IPv6
[    2.017178] NET: Registered protocol family 17
[    2.020948] 8021q: 802.1Q VLAN Support v1.8
[    2.025234] Registering SWP/SWPB emulation handler
[    2.099314] Freeing unused kernel memory: 22528K
[    2.172817] Run /init as init process
[    2.974720] init: Console is alive
[    2.975022] init: - watchdog -
[    2.989208] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.993594] genirq: irq_chip msmgpio did not update eff. affinity mask of irq 101
[    2.998481] dwc3-qcom 8af8800.usb3: IRQ hs_phy_irq not found
[    3.002530] dwc3-qcom 8af8800.usb3: IRQ dp_hs_phy_irq not found
[    3.008223] dwc3-qcom 8af8800.usb3: IRQ dm_hs_phy_irq not found
[    3.013896] dwc3-qcom 8af8800.usb3: IRQ ss_phy_irq not found
[    3.022105] dwc3-qcom 60f8800.usb2: IRQ hs_phy_irq not found
[    3.025675] dwc3-qcom 60f8800.usb2: IRQ dp_hs_phy_irq not found
[    3.031356] dwc3-qcom 60f8800.usb2: IRQ dm_hs_phy_irq not found
[    3.036956] dwc3-qcom 60f8800.usb2: IRQ ss_phy_irq not found
[    3.276263] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.276430] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.280964] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f665 hci version 0x100 quirks 0x0000000002010010
[    3.288314] xhci-hcd xhci-hcd.0.auto: irq 104, io mem 0x08a00000
[    3.298516] hub 1-0:1.0: USB hub found
[    3.303953] hub 1-0:1.0: 1 port detected
[    3.307753] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.311559] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.316806] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[    3.324472] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.331601] hub 2-0:1.0: USB hub found
[    3.342388] hub 2-0:1.0: 1 port detected
[    3.343256] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.346848] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    3.352402] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f665 hci version 0x100 quirks 0x0000000002010010
[    3.359772] xhci-hcd xhci-hcd.1.auto: irq 105, io mem 0x06000000
[    3.369924] hub 3-0:1.0: USB hub found
[    3.375342] hub 3-0:1.0: 1 port detected
[    3.379177] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.383012] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    3.388248] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    3.396546] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.403032] hub 4-0:1.0: USB hub found
[    3.410693] hub 4-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    3.416233] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.429966] init: - preinit -
[    3.704224] random: jshn: uninitialized urandom read (4 bytes read)
[    3.766876] random: jshn: uninitialized urandom read (4 bytes read)
[    3.872015] random: jshn: uninitialized urandom read (4 bytes read)
[    4.189973] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    4.421435] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[    6.410780] procd: - early -
[    6.411044] procd: - watchdog -
[    6.967891] procd: - watchdog -
[    6.972411] procd: - ubus -
[    6.996297] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.025529] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.026702] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.040405] procd: - init -
Please press Enter to activate this console.
[    7.443007] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.452121] usbcore: registered new interface driver cdc_wdm
[    7.455608] Loading modules backported from Linux version v5.15.33-0-g06f50ca83ace
[    7.456859] Backport generated by backports.git v5.15.33-1-0-g183c4ab2
[    7.458037] urngd: v1.0.2 started.
[    7.483964] usbcore: registered new interface driver usbserial_generic
[    7.484059] usbserial: USB Serial support registered for generic
[    7.554250] random: crng init done
[    7.554289] random: 30 urandom warning(s) missed due to ratelimiting
[    7.558373] PPP generic driver version 2.4.2
[    7.571668] NET: Registered protocol family 24
[    7.582168] qmi_wwan 2-1:1.5: cdc-wdm0: USB WDM device
[    7.584450] qmi_wwan 2-1:1.5 wwan0: register 'qmi_wwan' at usb-xhci-hcd.0.auto-1, WWAN/QMI device, 26:e2:ad:a4:4a:16
[    7.586499] usbcore: registered new interface driver qmi_wwan
[    7.603501] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    7.603552] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    8.508408] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[    8.508494] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[    8.521919] ath10k_ahb a000000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
[    8.548729] ath10k_ahb a000000.wifi: Loading BDF type 0
[    8.556733] ath10k_ahb a000000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=zte,mf286d from ath10k/QCA4019/hw1.0/board-2.bin
[    8.769421] ath10k_ahb a000000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[    8.769488] ath10k_ahb a000000.wifi: failed to fetch board file: -12
[    8.777825] ath10k_ahb a000000.wifi: could not probe fw (-12)
[    9.698215] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[    9.698312] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[    9.710279] ath10k_ahb a800000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
[    9.738538] ath10k_ahb a800000.wifi: Loading BDF type 0
[    9.746343] ath10k_ahb a800000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=zte,mf286d from ath10k/QCA4019/hw1.0/board-2.bin
[    9.944399] ath10k_ahb a800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[    9.944451] ath10k_ahb a800000.wifi: failed to fetch board file: -12
[    9.953006] ath10k_ahb a800000.wifi: could not probe fw (-12)
[    9.965818] usbcore: registered new interface driver option
[    9.965962] usbserial: USB Serial support registered for GSM modem (1-port)
[    9.970967] option 2-1:1.2: GSM modem (1-port) converter detected
[    9.977508] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[    9.983831] option 2-1:1.3: GSM modem (1-port) converter detected
[    9.990537] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[    9.996620] option 2-1:1.4: GSM modem (1-port) converter detected
[   10.003414] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
[   10.013241] usbcore: registered new interface driver qcserial
[   10.015983] usbserial: USB Serial support registered for Qualcomm USB modem
[   10.022125] kmodloader: done loading kernel modules from /etc/modules.d/*

and this is the new dts:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
// Copyright (c) 2022, Pawel Dembicki <paweldembicki@gmail.com>.

#include "qcom-ipq4019.dtsi"
#include <dt-bindings/soc/qcom,tcsr.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>

/ {
    model = "ZTE MF289F";
    compatible = "zte,mf286d";

    aliases {
        led-boot = &led_internal;
        led-failsafe = &led_internal;
        led-running = &led_internal;
        led-upgrade = &led_internal;
    };

    chosen {
        /*
         * bootargs forced by u-boot bootipq command:
         * 'ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait'
         */
        bootargs-append = " root=/dev/ubiblock0_1";
    };

    gpio-restart {
        compatible = "gpio-restart";
        gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
    };

    leds {
        compatible = "gpio-leds";

        led_internal: led-0 {
            function = LED_FUNCTION_STATUS;
            color = <LED_COLOR_ID_BLUE>;
            gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
            label = "blue:internal_led";
            default-state = "keep";
        };

        led-1 {
            function = LED_FUNCTION_WLAN;
            color = <LED_COLOR_ID_BLUE>;
            gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
            linux,default-trigger = "phy0tpt";
        };
    };

    keys {
        compatible = "gpio-keys";

        wifi {
            label = "wifi";
            linux,code = <KEY_RFKILL>;
            gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
        };

        reset {
            label = "reset";
            linux,code = <KEY_RESTART>;
            gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
        };

        wps {
            label = "wps";
            linux,code = <KEY_WPS_BUTTON>;
            gpios = <&tlmm 68 GPIO_ACTIVE_LOW>;
        };
    };

    soc {
        rng@22000 {
            status = "okay";
        };

        mdio@90000 {
            status = "okay";
            pinctrl-0 = <&mdio_pins>;
            pinctrl-names = "default";
            reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
            reset-delay-us = <2000>;
        };

        ess-psgmii@98000 {
            status = "okay";
        };

        tcsr@1949000 {
            compatible = "qcom,tcsr";
            reg = <0x1949000 0x100>;
            qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
        };

        tcsr@194b000 {
            /* select hostmode */
            compatible = "qcom,tcsr";
            reg = <0x194b000 0x100>;
            qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
            status = "okay";
        };

        ess_tcsr@1953000 {
            compatible = "qcom,tcsr";
            reg = <0x1953000 0x1000>;
            qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
        };

        tcsr@1957000 {
            compatible = "qcom,tcsr";
            reg = <0x1957000 0x100>;
            qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
        };

        usb2@60f8800 {
            status = "okay";
        };

        usb3@8af8800 {
            status = "okay";
        };

        crypto@8e3a000 {
            status = "okay";
        };

        watchdog@b017000 {
            status = "okay";
        };

        ess-switch@c000000 {
            status = "okay";
        };

        edma@c080000 {
            status = "okay";
        };
    };
};

&blsp_dma {
    status = "okay";
};

&blsp1_spi1 {
    pinctrl-0 = <&spi_0_pins>;
    pinctrl-names = "default";
    status = "okay";
    cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;

    flash@0 {
        /* u-boot is looking for "n25q128a11" property */
        compatible = "jedec,spi-nor", "n25q128a11";
        #address-cells = <1>;
        #size-cells = <1>;
        reg = <0>;
        spi-max-frequency = <24000000>;

        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
                label = "0:SBL1";
                reg = <0x0 0x40000>;
                read-only;
            };

            partition@40000 {
                label = "0:MIBIB";
                reg = <0x40000 0x20000>;
                read-only;
            };

            partition@60000 {
                label = "0:QSEE";
                reg = <0x60000 0x60000>;
                read-only;
                };

            partition@c0000 {
                label = "0:CDT";
                reg = <0xc0000 0x10000>;
                read-only;
            };

            partition@d0000 {
                label = "0:DDRPARAMS";
                reg = <0xd0000 0x10000>;
                read-only;
            };

            partition@e0000 {
                label = "0:APPSBLENV";
                reg = <0xe0000 0x10000>;
                read-only;
            };

            partition@f0000 {
                label = "0:APPSBL";
                reg = <0xf0000 0xc0000>;
                read-only;
            };

            partition@1b0000 {
                label = "0:reserved1";
                reg = <0x1b0000 0x50000>;
                read-only;
            };
        };
    };
    flash@1 {

        compatible = "spi-nand";
        reg = <1>;
        spi-max-frequency = <24000000>;

        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
                label = "fota-flag";
                reg = <0x0 0xa0000>;
                read-only;
            };

            partition@a0000 {
                label = "ART";
                reg = <0xa0000 0x80000>;
                read-only;
                compatible = "nvmem-cells";
                #address-cells = <1>;
                #size-cells = <1>;

                precal_art_1000: precal@1000 {
                    reg = <0x1000 0x2f20>;
                };

                precal_art_5000: precal@5000 {
                    reg = <0x5000 0x2f20>;
                };
            };

            partition@120000 {
                label = "mac";
                reg = <0x120000 0x80000>;
                read-only;
                compatible = "nvmem-cells";
                #address-cells = <1>;
                #size-cells = <1>;

                macaddr_config_0: macaddr@0 {
                    reg = <0x0 0x6>;
                };
            };

            partition@1a0000 {
                label = "reserved2";
                reg = <0x1a0000 0xc0000>;
                read-only;
            };

            partition@260000 {
                label = "cfg-param";
                reg = <0x260000 0x400000>;
                read-only;
            };

            partition@660000 {
                label = "log";
                reg = <0x660000 0x400000>;
            };

            partition@a60000 {
                label = "oops";
                reg = <0xa60000 0xa0000>;
            };

            partition@b00000 {
                label = "reserved3";
                reg = <0xb00000 0x500000>;
                read-only;
            };

            partition@1000000 {
                label = "web";
                reg = <0x1000000 0x800000>;
            };

            partition@1800000 {
                label = "rootfs";
                reg = <0x1800000 0x1d00000>;
            };

            partition@3500000 {
                label = "data";
                reg = <0x3500000 0x1900000>;
            };

            partition@4e00000 {
                label = "fota";
                reg = <0x4e00000 0x3200000>;
            };
        };
    };

};

&blsp1_uart1 {
    pinctrl-0 = <&serial_pins>;
    pinctrl-names = "default";
    status = "okay";
};

&cryptobam {
    status = "okay";
};

&gmac0 {
    nvmem-cell-names = "mac-address";
    nvmem-cells = <&macaddr_config_0>;
};

&gmac1 {
    nvmem-cell-names = "mac-address";
    nvmem-cells = <&macaddr_config_0>;
    mac-address-increment = <1>;
};


&qpic_bam {
    status = "okay";
};

&tlmm {
    i2c_0_pins: i2c_0_pinmux {
        mux {
            pins = "gpio20", "gpio21";
            function = "blsp_i2c0";
            bias-disable;
        };
    };

    mdio_pins: mdio_pinmux {
        mux_1 {
            pins = "gpio6";
            function = "mdio";
            bias-pull-up;
        };

        mux_2 {
            pins = "gpio7";
            function = "mdc";
            bias-pull-up;
        };
    };

    nand_pins: nand_pins {
        pullups {
            pins =    "gpio52", "gpio53", "gpio58",
                "gpio59";
            function = "qpic";
            bias-pull-up;
        };

        pulldowns {
            pins =    "gpio54", "gpio55", "gpio56",
                "gpio57", "gpio60",
                "gpio62", "gpio63", "gpio64",
                "gpio65", "gpio66", "gpio67",
                "gpio69";
            function = "qpic";
            bias-pull-down;
        };
    };

    serial_pins: serial_pinmux {
        mux {
            pins = "gpio16", "gpio17";
            function = "blsp_uart0";
            bias-disable;
        };
    };

    spi_0_pins: spi_0_pinmux {
        pinmux {
            function = "blsp_spi0";
            pins = "gpio13", "gpio14", "gpio15";
            drive-strength = <12>;
            bias-disable;
        };

        pinmux_cs {
            function = "gpio";
            pins = "gpio12";
            drive-strength = <2>;
            bias-disable;
            output-high;
        };
    };
};

&usb2_hs_phy {
    status = "okay";
};

&usb3_ss_phy {
    status = "okay";
};

&usb3_hs_phy {
    status = "okay";
};

&wifi0 {
    status = "okay";
    nvmem-cell-names = "pre-calibration", "mac-address";
    nvmem-cells = <&precal_art_1000>, <&macaddr_config_0>;
    mac-address-increment = <2>;
    qcom,ath10k-calibration-variant = "zte,mf286d";
};

&wifi1 {
    status = "okay";
    nvmem-cell-names = "pre-calibration", "mac-address";
    nvmem-cells = <&precal_art_5000>, <&macaddr_config_0>;
    mac-address-increment = <3>;
    qcom,ath10k-calibration-variant = "zte,mf286d";
};

11

Odp: ZTE MF289F - Porting OpenWRT

Find gpio for chip select for flash1, change line cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

12

Odp: ZTE MF289F - Porting OpenWRT

Cezary napisał/a:

Find gpio for chip select for flash1, change line cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;

but that GPIO should be correct, almost for the first flash gd25q16 that is correctly recognized

this is the log of SPI\NAND on stock firmware:

[    1.267703] sps: BAM device 0x07984000 is not registered yet.
[    1.272424] sps:BAM 0x07984000 is registered.
[    1.276653] msm_nand_bam_init: msm_nand_bam_init: BAM device registered: bam_handle 0xcf0c7000
[    1.285509] sps:BAM 0x07984000 (va:0xd0b40000) enabled: ver:0x19, number of pipes:7
[    1.293231] msm_nand_version_check: nand_major:1, nand_minor:4, qpic_major:1, qpic_minor:4
[    1.301261] msm_nand_flash_onfi_probe: Found a non ONFI device
[    1.307110] msm_nand_scan: unknown nand flashid=0 manuf=0 devid=0
[    1.313146] msm_nand_probe: No nand device found
[    1.319536] sps: BAM device 0x07884000 is not registered yet.
[    1.324287] sps:BAM 0x07884000 is registered.
[    1.328619] sps:BAM 0x07884000 (va:0xd0b80000) enabled: ver:0x19, number of pipes:12
[    1.336759] m25p80 spi0.0: found gd25q16, expected n25q128a11
[    1.342055] m25p80 spi0.0: gd25q16 (2048 Kbytes)
[    1.346707] 8 ofpart partitions found on MTD device spi0.0
[    1.352114] Creating 8 MTD partitions on "spi0.0":
[    1.356913] 0x000000000000-0x000000040000 : "0:SBL1"
[    1.363099] 0x000000040000-0x000000060000 : "0:MIBIB"
[    1.368245] 0x000000060000-0x0000000c0000 : "0:QSEE"
[    1.373363] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[    1.378335] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[    1.383879] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[    1.389145] 0x0000000f0000-0x0000001b0000 : "0:APPSBL"
[    1.394318] 0x0000001b0000-0x000000200000 : "0:reserved1"
[    1.411553] libphy: ipq40xx_mdio: probed
[    1.418237] ipq40xx-mdio 90000.mdio: ipq40xx-mdio driver was registered
[    1.423914] i2c /dev entries driver
[    1.429511] sdhci: Secure Digital Host Controller Interface driver
[    1.434689] sdhci: Copyright(c) Pierre Ossman
[    1.438997] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.445281] sdhci_msm 7824900.sdhci: Got SD LDO GPIO #33
[    1.550324] sdhci_msm 7824900.sdhci: Got CD GPIO #22.
[    1.560851] mmc0: no vmmc regulator found
[    1.632725] mmc0: SDHCI controller on 7824900.sdhci [7824900.sdhci] using ADMA
[    1.645856] spinand_probe: enable hw ecc successfully
[    1.651535] nand: zhao.wl g_zte_spi_nand_id =  0xef
[    1.655491] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
[    1.661800] nand: Winbond W25N01GV 128MiB 3.3V
[    1.666247] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    1.671873] nand: zhao.wl winbond oob64
[    1.675799] Scanning device for bad blocks
[    1.958435] random: nonblocking pool is initialized
[    2.650413] 12 ofpart partitions found on MTD device spi0.1
[    2.654978] Creating 12 MTD partitions on "spi0.1":
[    2.659819] 0x000000000000-0x0000000a0000 : "fota-flag"
[    2.666134] 0x0000000a0000-0x000000120000 : "0:ART"
[    2.670992] 0x000000120000-0x0000001a0000 : "mac"
[    2.675728] 0x0000001a0000-0x000000260000 : "reserved2"
[    2.680908] 0x000000260000-0x000000660000 : "cfg-param"
[    2.686089] 0x000000660000-0x000000a60000 : "log"
[    2.690738] 0x000000a60000-0x000000b00000 : "oops"
[    2.695586] 0x000000b00000-0x000001000000 : "reserved3"
[    2.700789] 0x000001000000-0x000001800000 : "web"
[    2.705530] 0x000001800000-0x000003500000 : "rootfs"
[    2.710527] mtd: device 17 (rootfs) set to be root filesystem
[    2.715279] 0x000003500000-0x000004e00000 : "data"
[    2.721091] 0x000004e00000-0x000008000000 : "fota"

13

Odp: ZTE MF289F - Porting OpenWRT

The CS (chip select) line is individual for each flash chip. Just decode original dtb and look for cs-gpio.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

14

Odp: ZTE MF289F - Porting OpenWRT

Cezary napisał/a:

The CS (chip select) line is individual for each flash chip. Just decode original dtb and look for cs-gpio.

Can be extracted from stock firmware?
On the open-source code there is no kernel source..

15

Odp: ZTE MF289F - Porting OpenWRT

Yep.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

16

Odp: ZTE MF289F - Porting OpenWRT

here is the tgz of /proc/device-tree: https://mega.nz/file/HkJjhZ5A#5RbzB8gSC … mgkkiZRdOU

17

Odp: ZTE MF289F - Porting OpenWRT

ok i think that the NAND is not found because the driver for W25N01GV is missing, while MF286D is using MT29F1G08ABAEAWP

18

Odp: ZTE MF289F - Porting OpenWRT

Qualcomm_Technologies,_Inc._IPQ40xx_AP-DK04.1-C1.dtb

...
             spi@78b5000 {
                        compatible = "qcom,spi-qup-v2";
                        #address-cells = <0x1>;
                        #size-cells = <0x0>;
                        reg-names = "spi_physical", "spi_bam_physical";
                        reg = <0x78b5000 0x600 0x7884000 0x23000>;
                        interrupt-names = "spi_irq", "spi_bam_irq";
                        interrupts = <0x0 0x5f 0x0 0x0 0xee 0x0>;
                        spi-max-frequency = <0x16e3600>;
                        clocks = <0x2 0x17 0x2 0x15>;
                        clock-names = "core_clk", "iface_clk";
                        qcom,infinite-mode = <0x0>;
                        qcom,use-bam;
                        qcom,bam-consumer-pipe-index = <0x4>;
                        qcom,bam-producer-pipe-index = <0x5>;
                        qcom,master-id = <0x0>;
                        status = "ok";
                        pinctrl-0 = <0x49>;
                        pinctrl-names = "default";
                        cs-gpios = <0x0 0x4a 0x36 0x0>;
                        num-cs = <0x2>;

                        m25p80@0 {
                                #address-cells = <0x1>;
                                #size-cells = <0x1>;
                                reg = <0x0>;
                                compatible = "n25q128a11";
                                linux,modalias = "m25p80", "n25q128a11";
                                spi-max-frequency = <0x16e3600>;
                                use-default-sizes;

                                partition@0 {
                                        label = "0:SBL1";
                                        reg = <0x0 0x40000>;
                                };

                                partition@40000 {
                                        label = "0:MIBIB";
                                        reg = <0x40000 0x20000>;
                                };

                                partition@60000 {
                                        label = "0:QSEE";
                                        reg = <0x60000 0x60000>;
                                };

                                partition@c0000 {
                                        label = "0:CDT";
                                        reg = <0xc0000 0x10000>;
                                };

                                partition@d0000 {
                                        label = "0:DDRPARAMS";
                                        reg = <0xd0000 0x10000>;
                                };

                                partition@e0000 {
                                        label = "0:APPSBLENV";
                                        reg = <0xe0000 0x10000>;
                                };

                                partition@f0000 {
                                        label = "0:APPSBL";
                                        reg = <0xf0000 0xc0000>;
                                };

                                partition@1b0000 {
                                        label = "0:reserved1";
                                        reg = <0x1b0000 0x50000>;
                                };
                        };

                        mt29f@1 {
                                #address-cells = <0x1>;
                                #size-cells = <0x1>;
                                compatible = "spinand,mt29f";
                                reg = <0x1>;
                                spi-max-frequency = <0x16e3600>;

                                partition@0 {
                                        label = "fota-flag";
                                        reg = <0x0 0xa0000>;
                                };

                                partition@a0000 {
                                        label = "0:ART";
                                        reg = <0xa0000 0x80000>;
                                };

                                partition@120000 {
                                        label = "mac";
                                        reg = <0x120000 0x80000>;
                                };

                                partition@1a0000 {
                                        label = "reserved2";
                                        reg = <0x1a0000 0xc0000>;
                                };

                                partition@260000 {
                                        label = "cfg-param";
                                        reg = <0x260000 0x400000>;
                                };

                                partition@660000 {
                                        label = "log";
                                        reg = <0x660000 0x400000>;
                                };

                                partition@a60000 {
                                        label = "oops";
                                        reg = <0xa60000 0xa0000>;
                                };

                                partition@b00000 {
                                        label = "reserved3";
                                        reg = <0xb00000 0x500000>;
                                };

                                partition@1000000 {
                                        label = "web";
                                        reg = <0x1000000 0x800000>;
                                };

                                partition@1800000 {
                                        label = "rootfs";
                                        reg = <0x1800000 0x1d00000>;
                                };

                                partition@3500000 {
                                        label = "data";
                                        reg = <0x3500000 0x1900000>;
                                };

                                partition@4e00000 {
                                        label = "fota";
                                        reg = <0x4e00000 0x3200000>;
                                };
                        };
                };

Hmm, gpio 74 and 54? Looks strange.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

19

Odp: ZTE MF289F - Porting OpenWRT

Cezary napisał/a:

Qualcomm_Technologies,_Inc._IPQ40xx_AP-DK04.1-C1.dtb

...
             spi@78b5000 {
                        compatible = "qcom,spi-qup-v2";
                        #address-cells = <0x1>;
                        #size-cells = <0x0>;
                        reg-names = "spi_physical", "spi_bam_physical";
                        reg = <0x78b5000 0x600 0x7884000 0x23000>;
                        interrupt-names = "spi_irq", "spi_bam_irq";
                        interrupts = <0x0 0x5f 0x0 0x0 0xee 0x0>;
                        spi-max-frequency = <0x16e3600>;
                        clocks = <0x2 0x17 0x2 0x15>;
                        clock-names = "core_clk", "iface_clk";
                        qcom,infinite-mode = <0x0>;
                        qcom,use-bam;
                        qcom,bam-consumer-pipe-index = <0x4>;
                        qcom,bam-producer-pipe-index = <0x5>;
                        qcom,master-id = <0x0>;
                        status = "ok";
                        pinctrl-0 = <0x49>;
                        pinctrl-names = "default";
                        cs-gpios = <0x0 0x4a 0x36 0x0>;
                        num-cs = <0x2>;

                        m25p80@0 {
                                #address-cells = <0x1>;
                                #size-cells = <0x1>;
                                reg = <0x0>;
                                compatible = "n25q128a11";
                                linux,modalias = "m25p80", "n25q128a11";
                                spi-max-frequency = <0x16e3600>;
                                use-default-sizes;

                                partition@0 {
                                        label = "0:SBL1";
                                        reg = <0x0 0x40000>;
                                };

                                partition@40000 {
                                        label = "0:MIBIB";
                                        reg = <0x40000 0x20000>;
                                };

                                partition@60000 {
                                        label = "0:QSEE";
                                        reg = <0x60000 0x60000>;
                                };

                                partition@c0000 {
                                        label = "0:CDT";
                                        reg = <0xc0000 0x10000>;
                                };

                                partition@d0000 {
                                        label = "0:DDRPARAMS";
                                        reg = <0xd0000 0x10000>;
                                };

                                partition@e0000 {
                                        label = "0:APPSBLENV";
                                        reg = <0xe0000 0x10000>;
                                };

                                partition@f0000 {
                                        label = "0:APPSBL";
                                        reg = <0xf0000 0xc0000>;
                                };

                                partition@1b0000 {
                                        label = "0:reserved1";
                                        reg = <0x1b0000 0x50000>;
                                };
                        };

                        mt29f@1 {
                                #address-cells = <0x1>;
                                #size-cells = <0x1>;
                                compatible = "spinand,mt29f";
                                reg = <0x1>;
                                spi-max-frequency = <0x16e3600>;

                                partition@0 {
                                        label = "fota-flag";
                                        reg = <0x0 0xa0000>;
                                };

                                partition@a0000 {
                                        label = "0:ART";
                                        reg = <0xa0000 0x80000>;
                                };

                                partition@120000 {
                                        label = "mac";
                                        reg = <0x120000 0x80000>;
                                };

                                partition@1a0000 {
                                        label = "reserved2";
                                        reg = <0x1a0000 0xc0000>;
                                };

                                partition@260000 {
                                        label = "cfg-param";
                                        reg = <0x260000 0x400000>;
                                };

                                partition@660000 {
                                        label = "log";
                                        reg = <0x660000 0x400000>;
                                };

                                partition@a60000 {
                                        label = "oops";
                                        reg = <0xa60000 0xa0000>;
                                };

                                partition@b00000 {
                                        label = "reserved3";
                                        reg = <0xb00000 0x500000>;
                                };

                                partition@1000000 {
                                        label = "web";
                                        reg = <0x1000000 0x800000>;
                                };

                                partition@1800000 {
                                        label = "rootfs";
                                        reg = <0x1800000 0x1d00000>;
                                };

                                partition@3500000 {
                                        label = "data";
                                        reg = <0x3500000 0x1900000>;
                                };

                                partition@4e00000 {
                                        label = "fota";
                                        reg = <0x4e00000 0x3200000>;
                                };
                        };
                };

Hmm, gpio 74 and 54? Looks strange.

this is from stock firmware?

20

Odp: ZTE MF289F - Porting OpenWRT

From your mtd20, yes.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

21

Odp: ZTE MF289F - Porting OpenWRT

Cezary napisał/a:

From your mtd20, yes.

so I can try to modify DTS using that part and see if it works?

Or should I use same syntax of MF286D?

Can you share how to get dtb from the mtd20? i've tried "extract-dtb", but doesn't work

22

Odp: ZTE MF289F - Porting OpenWRT

Exactly, from extract_dtb.py.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

23

Odp: ZTE MF289F - Porting OpenWRT

so looking at original dts there are two SPI and also the mux has two GPIO 54:

spi_0_pinmux {
                linux,phandle = <0x49>;
                phandle = <0x49>;

                mux {
                    pins = "gpio12\0gpio13\0gpio14\0gpio15";
                    function = "blsp_spi0";
                    bias-disable;
                };

                mux_2 {
                    pins = "gpio54";
                    function = "gpio";
                    bias-disable;
                    output-high;
                };
            };

any suggestion how to modify the MF286D dts?

using dts from mtd_20 doesn't work :\

24

Odp: ZTE MF289F - Porting OpenWRT

looking at U-Boot, looks like this is the ID of the NAND:

U-Boot 2012.07 [Chaos Calmer 15.05.1,IPQ4019.ILQ.6.1.0.r2-00006-P-1] (Apr 20 2021 - 04:30:48)

smem ram ptable found: ver: 1 len: 3
DRAM:  256 MiB
machid : 0x8010001
NAND:  spi_nand: spi_nand_flash_probe SF NAND ID ff:ef:aa:21
SF: Detected W25N01GV with page size 2 KiB, total 128 MiB
SF: Detected GD25Q16 with page size 4 KiB, total 2 MiB
ipq_spi: page_size: 0x100, sector_size: 0x1000, size: 0x200000

During my test, I got this ID using GPIO54.

So here is current DTS:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
// Copyright (c) 2022, Pawel Dembicki <paweldembicki@gmail.com>.

#include "qcom-ipq4019.dtsi"
#include <dt-bindings/soc/qcom,tcsr.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>

/ {
    model = "ZTE MF289F";
    compatible = "zte,mf286d";

    aliases {
        led-boot = &led_internal;
        led-failsafe = &led_internal;
        led-running = &led_internal;
        led-upgrade = &led_internal;
    };

    chosen {
        /*
         * bootargs forced by u-boot bootipq command:
         * 'ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait'
         */
        bootargs-append = " root=/dev/ubiblock0_1";
    };

    gpio-restart {
        compatible = "gpio-restart";
        gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
    };

    leds {
        compatible = "gpio-leds";

        led_internal: led-0 {
            function = LED_FUNCTION_STATUS;
            color = <LED_COLOR_ID_BLUE>;
            gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
            label = "blue:internal_led";
            default-state = "keep";
        };

        led-1 {
            function = LED_FUNCTION_WLAN;
            color = <LED_COLOR_ID_BLUE>;
            gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
            linux,default-trigger = "phy0tpt";
        };
    };

    keys {
        compatible = "gpio-keys";

        wifi {
            label = "wifi";
            linux,code = <KEY_RFKILL>;
            gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
        };

        reset {
            label = "reset";
            linux,code = <KEY_RESTART>;
            gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
        };

        wps {
            label = "wps";
            linux,code = <KEY_WPS_BUTTON>;
            gpios = <&tlmm 68 GPIO_ACTIVE_LOW>;
        };
    };

    soc {
        rng@22000 {
            status = "okay";
        };

        mdio@90000 {
            status = "okay";
            pinctrl-0 = <&mdio_pins>;
            pinctrl-names = "default";
            reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
            reset-delay-us = <2000>;
        };

        ess-psgmii@98000 {
            status = "okay";
        };

        tcsr@1949000 {
            compatible = "qcom,tcsr";
            reg = <0x1949000 0x100>;
            qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
        };

        tcsr@194b000 {
            /* select hostmode */
            compatible = "qcom,tcsr";
            reg = <0x194b000 0x100>;
            qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
            status = "okay";
        };

        ess_tcsr@1953000 {
            compatible = "qcom,tcsr";
            reg = <0x1953000 0x1000>;
            qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
        };

        tcsr@1957000 {
            compatible = "qcom,tcsr";
            reg = <0x1957000 0x100>;
            qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
        };

        usb2@60f8800 {
            status = "okay";
        };

        usb3@8af8800 {
            status = "okay";
        };

        crypto@8e3a000 {
            status = "okay";
        };

        watchdog@b017000 {
            status = "okay";
        };

        ess-switch@c000000 {
            status = "okay";
        };

        edma@c080000 {
            status = "okay";
        };
    };
};

&blsp_dma {
    status = "okay";
};

&blsp1_spi1 {
    pinctrl-0 = <&spi_0_pins>;
    pinctrl-names = "default";
    status = "okay";
    cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>,
           <&tlmm 54 GPIO_ACTIVE_HIGH>;

    flash@0 {
                compatible = "jedec,spi-nor", "n25q128a11";
        #address-cells = <1>;
        #size-cells = <1>;
        reg = <0>;
        spi-max-frequency = <24000000>;

        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
                label = "0:SBL1";
                reg = <0x0 0x40000>;
                read-only;
            };

            partition@40000 {
                label = "0:MIBIB";
                reg = <0x40000 0x20000>;
                read-only;
            };

            partition@60000 {
                label = "0:QSEE";
                reg = <0x60000 0x60000>;
                read-only;
                };

            partition@c0000 {
                label = "0:CDT";
                reg = <0xc0000 0x10000>;
                read-only;
            };

            partition@d0000 {
                label = "0:DDRPARAMS";
                reg = <0xd0000 0x10000>;
                read-only;
            };

            partition@e0000 {
                label = "0:APPSBLENV";
                reg = <0xe0000 0x10000>;
                read-only;
            };

            partition@f0000 {
                label = "0:APPSBL";
                reg = <0xf0000 0xc0000>;
                read-only;
            };

            partition@1b0000 {
                label = "0:reserved1";
                reg = <0x1b0000 0x50000>;
                read-only;
            };
        };
    };

    spi-nand@1 {
        compatible = "spi-nand";
        reg = <1>;
        spi-max-frequency = <24000000>;

        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
                label = "fota-flag";
                reg = <0x0 0xa0000>;
                read-only;
            };

            partition@a0000 {
                label = "ART";
                reg = <0xa0000 0x80000>;
                read-only;
                compatible = "nvmem-cells";
                #address-cells = <1>;
                #size-cells = <1>;

                precal_art_1000: precal@1000 {
                    reg = <0x1000 0x2f20>;
                };

                precal_art_5000: precal@5000 {
                    reg = <0x5000 0x2f20>;
                };
            };

            partition@120000 {
                label = "mac";
                reg = <0x120000 0x80000>;
                read-only;
                compatible = "nvmem-cells";
                #address-cells = <1>;
                #size-cells = <1>;

                macaddr_config_0: macaddr@0 {
                    reg = <0x0 0x6>;
                };
            };

            partition@1a0000 {
                label = "reserved2";
                reg = <0x1a0000 0xc0000>;
                read-only;
            };

            partition@260000 {
                label = "cfg-param";
                reg = <0x260000 0x400000>;
                read-only;
            };

            partition@660000 {
                label = "log";
                reg = <0x660000 0x400000>;
            };

            partition@a60000 {
                label = "oops";
                reg = <0xa60000 0xa0000>;
            };

            partition@b00000 {
                label = "reserved3";
                reg = <0xb00000 0x500000>;
                read-only;
            };

            partition@1000000 {
                label = "web";
                reg = <0x1000000 0x800000>;
            };

            partition@1800000 {
                label = "rootfs";
                reg = <0x1800000 0x1d00000>;
            };

            partition@3500000 {
                label = "data";
                reg = <0x3500000 0x1900000>;
            };

            partition@4e00000 {
                label = "fota";
                reg = <0x4e00000 0x3200000>;
            };
        };
    };

};

&blsp1_uart1 {
    pinctrl-0 = <&serial_pins>;
    pinctrl-names = "default";
    status = "okay";
};

&cryptobam {
    status = "okay";
};

&gmac0 {
    nvmem-cell-names = "mac-address";
    nvmem-cells = <&macaddr_config_0>;
};

&gmac1 {
    nvmem-cell-names = "mac-address";
    nvmem-cells = <&macaddr_config_0>;
    mac-address-increment = <1>;
};


&qpic_bam {
    status = "okay";
};

&tlmm {
    i2c_0_pins: i2c_0_pinmux {
        mux {
            pins = "gpio20", "gpio21";
            function = "blsp_i2c0";
            bias-disable;
        };
    };

    mdio_pins: mdio_pinmux {
        mux_1 {
            pins = "gpio6";
            function = "mdio";
            bias-pull-up;
        };

        mux_2 {
            pins = "gpio7";
            function = "mdc";
            bias-pull-up;
        };
    };

    serial_pins: serial_pinmux {
        mux {
            pins = "gpio16", "gpio17";
            function = "blsp_uart0";
            bias-disable;
        };
    };

    spi_0_pins: spi_0_pinmux {
        pinmux {
            function = "blsp_spi0";
            pins = "gpio13", "gpio14", "gpio15";
            drive-strength = <12>;
            bias-disable;
        };

        pinmux_cs {
            function = "gpio";
            pins = "gpio12", "gpio54";
            drive-strength = <2>;
            bias-disable;
            output-high;
        };
    };
};

&usb2_hs_phy {
    status = "okay";
};

&usb3_ss_phy {
    status = "okay";
};

&usb3_hs_phy {
    status = "okay";
};

&wifi0 {
    status = "okay";
    nvmem-cell-names = "pre-calibration", "mac-address";
    nvmem-cells = <&precal_art_1000>, <&macaddr_config_0>;
    mac-address-increment = <2>;
    qcom,ath10k-calibration-variant = "zte,mf286d";
};

&wifi1 {
    status = "okay";
    nvmem-cell-names = "pre-calibration", "mac-address";
    nvmem-cells = <&precal_art_5000>, <&macaddr_config_0>;
    mac-address-increment = <3>;
    qcom,ath10k-calibration-variant = "zte,mf286d";
};

and the OpenWRT bootlog that now recognized the NAND:

## Booting kernel from FIT Image at 84000000 ...
   Using 'config@ap.dk04.1-c1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM OpenWrt Linux-5.10.131
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x840000e4
     Data Size:    8904600 Bytes = 8.5 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   11a31de1
     Hash algo:    sha1
     Hash value:   5f06a2098f3d96f7ec41fd4174beda05b46fa09a
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
   Using 'config@ap.dk04.1-c1' configuration
   Trying 'fdt-1' FDT blob subimage
     Description:  ARM OpenWrt zte_mf286d device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x8487e1b0
     Data Size:    18536 Bytes = 18.1 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   af519cbb
     Hash algo:    sha1
     Hash value:   29e261c753acc6776c4bd47c0b5e7a3016162ad2
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x8487e1b0
   Loading Kernel Image ... OK
OK
   Loading Device Tree to 87067000, end 8706e867 ... OK
Device nand0 not found!
invalid mtd device 'nand1'
eth0 MAC Address from ART is not valid
eth1 MAC Address from ART is not valid
Using machid 0x8010001 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.131 (lynx@openwrt-buildroot) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.3.0 r20168-b2681e584c) 11.3.0, GNU ld (GNU Binutils) 2.37) #0 SMP Tue Jul 26 07:15:38 2022
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: ZTE MF289F
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000008fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x0000000087dfffff]
[    0.000000]   node   0: [mem 0x0000000087e00000-0x0000000087ffffff]
[    0.000000]   node   0: [mem 0x0000000088000000-0x000000008fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000008fffffff]
[    0.000000] percpu: Embedded 15 pages/cpu s30860 r8192 d22388 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line:  root=/dev/ubiblock0_1
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 225672K/262144K available (6180K kernel code, 605K rwdata, 1552K rodata, 22528K init, 237K bss, 36472K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]     Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns
[    0.000009] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns
[    0.000026] Switching to timer-based delay loop, resolution 20ns
[    0.000331] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.000359] pid_max: default: 32768 minimum: 301
[    0.000536] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000555] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001539] CPU: Testing write buffer coherency: ok
[    0.001895] qcom_scm: convention: smc legacy
[    0.002833] Setting up static identity map for 0x80300000 - 0x8030003c
[    0.002992] rcu: Hierarchical SRCU implementation.
[    0.003254] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.003612] smp: Bringing up secondary CPUs ...
[    0.007070] smp: Brought up 1 node, 4 CPUs
[    0.007096] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[    0.007106] CPU: All CPU(s) started in SVC mode.
[    0.012346] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.012513] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.012540] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.012772] pinctrl core: initialized pinctrl subsystem
[    0.014556] NET: Registered protocol family 16
[    0.014883] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.016003] thermal_sys: Registered thermal governor 'step_wise'
[    0.016427] cpuidle: using governor ladder
[    0.016483] cpuidle: using governor menu
[    0.043064] cryptd: max_cpu_qlen set to 1000
[    0.047271] usbcore: registered new interface driver usbfs
[    0.047342] usbcore: registered new interface driver hub
[    0.047401] usbcore: registered new device driver usb
[    0.047452] pps_core: LinuxPPS API ver. 1 registered
[    0.047465] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.047493] PTP clock support registered
[    0.049154] clocksource: Switched to clocksource arch_sys_counter
[    0.050130] NET: Registered protocol family 2
[    0.050382] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.051068] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.051131] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.051171] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.051224] TCP: Hash tables configured (established 2048 bind 2048)
[    0.051345] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.051386] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.051659] NET: Registered protocol family 1
[    0.051706] PCI: CLS 0 bytes, default 64
[    0.291249] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.295569] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.295592] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.431745] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[    0.431772] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[    0.433167] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[    0.433273] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[    0.433374] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[    0.433466] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[    0.433779] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.434344] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.434391] msm_serial 78af000.serial: uartclk = 1843200
[    0.434445] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 33, base_baud = 115200) is a MSM
[    0.434474] msm_serial: console setup on port #0
[    0.969831] printk: console [ttyMSM0] enabled
[    0.974963] msm_serial: driver initialized
[    0.983947] loop: module loaded
[    0.984964] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.987643] spi-nor spi0.0: gd25q16 (2048 Kbytes)
[    0.993302] 8 fixed-partitions partitions found on MTD device spi0.0
[    0.997803] Creating 8 MTD partitions on "spi0.0":
[    1.004241] 0x000000000000-0x000000040000 : "0:SBL1"
[    1.009427] 0x000000040000-0x000000060000 : "0:MIBIB"
[    1.014442] 0x000000060000-0x0000000c0000 : "0:QSEE"
[    1.019433] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[    1.024378] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[    1.029087] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[    1.034632] 0x0000000f0000-0x0000001b0000 : "0:APPSBL"
[    1.039976] 0x0000001b0000-0x000000200000 : "0:reserved1"
[    1.048726] spi-nand spi0.1: Winbond SPI NAND was found.
[    1.050015] spi-nand spi0.1: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.055582] 12 fixed-partitions partitions found on MTD device spi0.1
[    1.063484] OF: Bad cell count for /soc/spi@78b5000/spi-nand@1/partitions
[    1.069801] OF: Bad cell count for /soc/spi@78b5000/spi-nand@1/partitions
[    1.077188] OF: Bad cell count for /soc/spi@78b5000/spi-nand@1/partitions
[    1.083358] OF: Bad cell count for /soc/spi@78b5000/spi-nand@1/partitions
[    1.090758] Creating 12 MTD partitions on "spi0.1":
[    1.096845] 0x000000000000-0x0000000a0000 : "fota-flag"
[    1.103897] 0x0000000a0000-0x000000120000 : "ART"
[    1.108681] 0x000000120000-0x0000001a0000 : "mac"
[    1.113590] 0x0000001a0000-0x000000260000 : "reserved2"
[    1.118870] 0x000000260000-0x000000660000 : "cfg-param"
[    1.132690] 0x000000660000-0x000000a60000 : "log"
[    1.143827] 0x000000a60000-0x000000b00000 : "oops"
[    1.146086] 0x000000b00000-0x000001000000 : "reserved3"
[    1.161309] 0x000001000000-0x000001800000 : "web"
[    1.183082] 0x000001800000-0x000003500000 : "rootfs"
[    1.260173] mtd: device 17 (rootfs) set to be root filesystem
[    1.261414] mtdsplit: no squashfs found in "rootfs"
[    1.264934] 0x000003500000-0x000004e00000 : "data"
[    1.336161] 0x000004e00000-0x000008000000 : "fota"
[    1.574498] ESS reset ok!
[    1.648791] ESS reset ok!
[    2.404040] i2c /dev entries driver
[    2.405978] sdhci: Secure Digital Host Controller Interface driver
[    2.406341] sdhci: Copyright(c) Pierre Ossman
[    2.412671] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.420744] NET: Registered protocol family 10
[    2.424066] Segment Routing with IPv6
[    2.427096] NET: Registered protocol family 17
[    2.430837] 8021q: 802.1Q VLAN Support v1.8
[    2.435137] Registering SWP/SWPB emulation handler
[    2.461679] �[    2.506927] Freeing unused kernel memory: 22528K
[    2.542060] Run /init as init process
[    3.339789] init: Console is alive
[    3.340092] init: - watchdog -
[    3.356170] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.361426] genirq: irq_chip msmgpio did not update eff. affinity mask of irq 101
[    3.365963] dwc3-qcom 8af8800.usb3: IRQ hs_phy_irq not found
[    3.369506] dwc3-qcom 8af8800.usb3: IRQ dp_hs_phy_irq not found
[    3.375158] dwc3-qcom 8af8800.usb3: IRQ dm_hs_phy_irq not found
[    3.380838] dwc3-qcom 8af8800.usb3: IRQ ss_phy_irq not found
[    3.389207] dwc3-qcom 60f8800.usb2: IRQ hs_phy_irq not found
[    3.392601] dwc3-qcom 60f8800.usb2: IRQ dp_hs_phy_irq not found
[    3.398241] dwc3-qcom 60f8800.usb2: IRQ dm_hs_phy_irq not found
[    3.403935] dwc3-qcom 60f8800.usb2: IRQ ss_phy_irq not found
[    3.640624] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.640789] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.645278] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f665 hci version 0x100 quirks 0x0000000002010010
[    3.652689] xhci-hcd xhci-hcd.0.auto: irq 104, io mem 0x08a00000
[    3.663162] hub 1-0:1.0: USB hub found
[    3.668305] hub 1-0:1.0: 1 port detected
[    3.672161] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.675879] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.681218] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[    3.689524] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.695875] hub 2-0:1.0: USB hub found
[    3.703628] hub 2-0:1.0: 1 port detected
[    3.707796] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.711263] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    3.716759] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f665 hci version 0x100 quirks 0x0000000002010010
[    3.724173] xhci-hcd xhci-hcd.1.auto: irq 105, io mem 0x06000000
[    3.734264] hub 3-0:1.0: USB hub found
[    3.739737] hub 3-0:1.0: 1 port detected
[    3.743540] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.747320] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    3.752655] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    3.760295] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.767324] hub 4-0:1.0: USB hub found
[    3.775111] hub 4-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    3.780750] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.786566] init: - preinit -
[    4.035864] random: jshn: uninitialized urandom read (4 bytes read)
[    4.094271] random: jshn: uninitialized urandom read (4 bytes read)
[    4.192231] random: jshn: uninitialized urandom read (4 bytes read)
[    4.500845] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    4.810515] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[    6.686945] procd: - early -
[    6.687201] procd: - watchdog -
[    7.249709] procd: - watchdog -
[    7.253632] procd: - ubus -
[    7.275425] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.305195] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.305681] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.319314] procd: - init -
Please press Enter to activate this console.
[    7.725954] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.733864] usbcore: registered new interface driver cdc_wdm
[    7.736506] Loading modules backported from Linux version v5.15.33-0-g06f50ca83ace
[    7.738602] Backport generated by backports.git v5.15.33-1-0-g183c4ab2
[    7.746608] urngd: v1.0.2 started.
[    7.761368] usbcore: registered new interface driver usbserial_generic
[    7.761465] usbserial: USB Serial support registered for generic
[    7.826058] PPP generic driver version 2.4.2
[    7.827207] NET: Registered protocol family 24
[    7.837236] random: crng init done
[    7.837275] random: 30 urandom warning(s) missed due to ratelimiting
[    7.850095] qmi_wwan 2-1:1.5: cdc-wdm0: USB WDM device
[    7.851603] qmi_wwan 2-1:1.5 wwan0: register 'qmi_wwan' at usb-xhci-hcd.0.auto-1, WWAN/QMI device, d6:45:12:d5:9c:f6
[    7.854409] usbcore: registered new interface driver qmi_wwan
[    7.871252] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    7.871306] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    8.874663] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[    8.874749] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[    8.886654] ath10k_ahb a000000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
[    8.946019] ath10k_ahb a000000.wifi: Loading BDF type 0
[    8.956610] ath10k_ahb a000000.wifi: board_file api 2 bmi_id 0:20 crc32 de0d18b2
[   10.254348] ath10k_ahb a000000.wifi: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96
[   10.254407] ath10k_ahb a000000.wifi: msdu-desc: 2500  skid: 32
[   10.303444] ath10k_ahb a000000.wifi: wmi print 'P 48/48 V 16 K 144 PH 176 T 186  msdu-desc: 2500  sw-crypt: 0 ct-sta: 0'
[   10.304429] ath10k_ahb a000000.wifi: wmi print 'free: 53252 iram: 13432 sram: 35752'
[   10.449150] ath10k_ahb a000000.wifi: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-nvmem max-sta 32 raw 0 hwcrypto 1
[   11.589256] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[   11.589324] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   11.602648] ath10k_ahb a800000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
[   11.660350] ath10k_ahb a800000.wifi: Loading BDF type 0
[   11.660541] ath10k_ahb a800000.wifi: failed to fetch board data for bus=ahb,bmi-chip-id=0,bmi-board-id=31,variant=zte,mf286d from ath10k/QCA4019/hw1.0/board-2.bin
[   11.851608] ath10k_ahb a800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[   11.851677] ath10k_ahb a800000.wifi: failed to fetch board file: -12
[   11.859901] ath10k_ahb a800000.wifi: could not probe fw (-12)
[   11.874226] usbcore: registered new interface driver option
[   11.874371] usbserial: USB Serial support registered for GSM modem (1-port)
[   11.879470] option 2-1:1.2: GSM modem (1-port) converter detected
[   11.885932] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[   11.892203] option 2-1:1.3: GSM modem (1-port) converter detected
[   11.898879] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[   11.905266] option 2-1:1.4: GSM modem (1-port) converter detected
[   11.911798] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
[   11.921325] usbcore: registered new interface driver qcserial
[   11.924406] usbserial: USB Serial support registered for Qualcomm USB modem
[   11.930597] kmodloader: done loading kernel modules from /etc/modules.d/*
[   70.207792] br-lan: port 1(eth0) entered blocking state
[   70.207837] br-lan: port 1(eth0) entered disabled state
[   70.212339] device eth0 entered promiscuous mode
[   70.311152] ess_edma c080000.edma eth1: Link is Down
[   71.209261] br-lan: port 1(eth0) entered blocking state
[   71.209312] br-lan: port 1(eth0) entered forwarding state
[   71.213725] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

so now I've to understood if the mapping are correct, right?

25

Odp: ZTE MF289F - Porting OpenWRT

Yes. Next - backup all partition, check if you can recover system from backup, try sysupgrade and flash image...

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.