Add support of the LigoWave device (QCA9558 + NAND)

I'm working on a LigoWave device. I'm stuck at point where ubi's driver attach the mtd device.

 *  SoC	: QCA9558
 *  RAM	: 128 MiB
 *  Nand   : Hynix NAND 128MiB [ HY27UF081G2M ]
 *  Eth	: Switch QCA3837
 *  phy0	: Single band radio, bgn mimo 3x3:3, built.
 *  phy1	: Single band radio, a/ac mimo  3x3:3; [ hw QCA9880 ]
 *  phy2	: Dual band radio, bgn/a [ hw AR9280 ]
 *  Antennas	: Gain 5dbi for 2.4GHz and 5GHz, omni-directional
  • Setup of the rootfs (it is an UBI volume).
    I deduct the ubifs options --min-io-size (-m), --leb-size (-e), -max-leb-cnt (-c) from OEM log and bootloader.
/data/fw/staging_dir/host/bin/mkfs.ubifs -m 2048 -e 124KiB -c 256 --space-fixup  --compr=lzo   --squash-uids -r /data/fw/build_dir/target-mips_24kc_uClibc-1.0.20/root-ar71xx -o /data/fw/build_dir/target-mips_24kc_uClibc-1.0.20/linux-ar71xx_ligowave-nand/openwrt-nft3ac-rootfs.ubifs
  • The factory consists in a FIT image and the bootloader has a custom recovery mode.

  • In my mach file:

	/*
	 * Register NAND device
	 */
	ath79_nfc_set_parts(infinity_nft_nand_partitions,
				 ARRAY_SIZE(infinity_nft_nand_partitions));
	ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_SOFT_BCH);
	ath79_register_nfc();
 * NAND INTERFACE
 *  - x8 bus width.
 * Memory Cell Array
 *  = (2K+ 64) Bytes x 64 Pages x 1,024 Blocks
 *  = (1K+32) Words x 64 pages x 1,024 Blocks
 * PAGE SIZE
 *  - x8 device  : (2K + 64 spare) Bytes 
 * BLOCK SIZE
 *  - x8 device: (128K + 4K spare) Bytes

The hang happens because the kernel don't read the rootfs' volume. I don't know if:

  1. Board needs a ath79_nfc_set_scan_fixup where I must set the ecc setups,
  2. Change the ath79_nfc_set_ecc_mode, (but nand requires a software ecc.)
  3. Fix arguments of mkfs.ubifs

From my bootlog:

[    0.830006] bootconsole [early0] disabled
[    0.840608] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    0.847059] nand: Hynix NAND 128MiB 3,3V 8-bit
[    0.851499] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.861678] Scanning device for bad blocks
[    0.962696] Creating 4 MTD partitions on "ar934x-nfc":
[    0.967925] 0x000000000000-0x000000300000 : "u-boot"
[    0.974092] 0x000000300000-0x000000500000 : "u-boot-env"
[    0.980816] 0x000000500000-0x000000600000 : "art"
[    0.986873] 0x000007a00000-0x000008000000 : "ubi"
[    1.578867] ag71xx ag71xx.0: invalid speed specified
[    1.583941] ag71xx: probe of ag71xx.0 failed with error -22
[    2.179389] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:SGMII
[    2.186725] NET: Registered protocol family 17
[    2.191349] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    2.207688] ubi0: attaching mtd3
[    2.212111] ecc unrecoverable error
[    2.215666] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry

thanks.

hi,Did you make it?
I have an ea4500 v3 router,it looks similer like yours,I want flash it to openwrt too

thanks

Feel free to open a new topic "Adding OpenWrt support for Linksys EA4500 v3" in the developers section of this forum.

A serial bootlog would be a good start.

OK,thanks for your suggesion
I will do it later

hi Ciusss89 , I have this problem with my nand flash ( hynix H27U518S2CT ) ( nand: 64 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16 )

do you have any solution