openwrt/target/linux
INAGAKI Hiroshi 8fb46725cf qualcommax: ipq50xx: fix NAND ECC for ELECOM WRC-X3000GS2
Specify 4-bit ECC strength instead of 8-bit, to resolve NAND I/O errors
on ELECOM WRC-X3000GS2.

ELECOM WRC-X3000GS2 has a Macronix MX35UF1G24AD SPI-NAND chip as a flash
storage. That chip is registered as a chip that has 128 bytes OOB and
requires 8-bit ECC, and described as the same in the Macronix's datasheet.

But on WRC-X3000GS2, 8-bit ECC breaks NAND I/O on mtdblock devices with
the following errors and 4-bit ECC needs to be used to resolve this issue.

current (ECC strength=8):

```
[    1.401566] 0x000000480000-0x000000500000 : "0:appsblenv"
[    1.407128] 1 fixed-partitions partitions found on MTD device 0:appsblenv
[    1.410663] Creating 1 MTD partitions on "0:appsblenv":
[    1.417359] 0x000000000000-0x000000040000 : "env-data"
[    1.479865] u-boot-env-layout: probe of 79b0000.qpic-nand:flash@0:partitions:partition-0-appsblenv:partition@0:nvmem-layout failed with error -74

root@OpenWrt:~# strings /dev/mtdblock10
[   55.693754] mtdblock: MTD device '0:appsblenv' is NAND, please consider using UBI block devices instead.
[   55.694660] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 2
[   55.703147] I/O error, dev mtdblock10, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 2
[   55.711884] I/O error, dev mtdblock10, sector 16 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 2
[   55.720778] I/O error, dev mtdblock10, sector 24 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[   55.730310] I/O error, dev mtdblock10, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[   55.738607] Buffer I/O error on dev mtdblock10, logical block 0, async page read
```

after fixing (ECC strength=4):

```
[    1.402301] 0x000000480000-0x000000500000 : "0:appsblenv"
[    1.407909] 1 fixed-partitions partitions found on MTD device 0:appsblenv
[    1.411370] Creating 1 MTD partitions on "0:appsblenv":
[    1.418075] 0x000000000000-0x000000040000 : "env-data"
(no error)

root@OpenWrt:~# strings /dev/mtdblock10
[   39.131008] mtdblock: MTD device '0:appsblenv' is NAND, please consider using UBI block devices instead.
bootcmd=bootipq
baudrate=115200
wifi2=7C:F8:54:01:BD:F3
CRASH_COUNT=0
...

```

Fixes: 01b72ce61e ("qualcommax: ipq50xx: remove ECC user config from board files")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18770
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-05-10 12:14:18 +02:00
..
airoha kernel: bump 6.6 to 6.6.89 2025-05-03 19:57:53 +02:00
apm821xx kernel: Activate CONFIG_NET_SWITCHDEV in generic config 2025-03-15 13:54:59 +01:00
archs38 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
armsr armsr: drop GC sections ARMv7 patch 2025-04-14 10:28:50 +02:00
at91 at91bootstrap: put at91bootstrap images into image staging directory 2025-04-04 14:39:00 +02:00
ath79 ath79: support Mikrotik RouterBOARD 2011-UiAS-2HnD 2025-05-08 20:32:51 +02:00
bcm27xx bcm27xx: fix kmod-drm-rp1 modules dependencies 2025-05-10 07:58:12 +02:00
bcm47xx bcm47xx: old gpio wdt: use remove_new 2025-04-28 10:31:59 +02:00
bcm53xx kernel: Activate CONFIG_NET_SWITCHDEV in generic config 2025-03-15 13:54:59 +01:00
bcm4908 bcm63xx-cfe: install into image staging dir 2025-04-13 10:44:19 +02:00
bmips bmips: sercomm-msp430: fix include 2025-05-10 09:02:25 +02:00
d1 generic: globally enable CONFIG_PCPU_DEV_REFCNT 2025-03-08 11:33:56 +01:00
gemini Revert "gemini: Add module for VSC73xx switches" 2025-05-02 19:17:53 +02:00
generic generic: config-filter: filter out CONFIG_RUSTC_SUPPORTS_* symbols 2025-05-09 14:13:19 +02:00
imx imx: coretexa53: add network config for single-port Gateworks Venice boards 2025-05-06 11:09:32 +02:00
ipq40xx kernel: bump 6.6 to 6.6.88 2025-05-03 19:57:53 +02:00
ipq806x generic: move QCOM SPI NAND driver to generic backports 2025-04-10 15:01:09 +02:00
ixp4xx kernel: Activate CONFIG_NET_SWITCHDEV in generic config 2025-03-15 13:54:59 +01:00
kirkwood kernel: Activate CONFIG_NET_SWITCHDEV in generic config 2025-03-15 13:54:59 +01:00
lantiq lantig: xway_legacy: remove default build barriers 2025-05-09 11:31:20 +02:00
layerscape kernel: bump 6.6 to 6.6.88 2025-05-03 19:57:53 +02:00
loongarch64 kernel: Add KERNEL_DCB (Data Center Bridging) 2025-03-09 17:05:26 +01:00
malta kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
mediatek mediatek: filogic: increase spi flash memory speed on ZyXEL EX5601 2025-05-08 22:38:13 +02:00
mpc85xx kernel: Activate CONFIG_NET_SWITCHDEV in generic config 2025-03-15 13:54:59 +01:00
mvebu kernel: bump 6.6 to 6.6.88 2025-05-03 19:57:53 +02:00
mxs mxs: adapt default package list for Duckbill devices 2025-02-05 22:00:09 +01:00
octeon octeon: force pcs reset to fix qca833x traffic 2025-04-02 10:04:52 +02:00
omap kernel: Activate CONFIG_NET_SWITCHDEV in generic config 2025-03-15 13:54:59 +01:00
pistachio kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
qoriq kernel: Activate CONFIG_NET_SWITCHDEV in generic config 2025-03-15 13:54:59 +01:00
qualcommax qualcommax: ipq50xx: fix NAND ECC for ELECOM WRC-X3000GS2 2025-05-10 12:14:18 +02:00
qualcommbe qualcommbe: ipq95xx: pcs: fix USXGMII link-up failure 2025-04-12 10:38:52 +02:00
ramips ramips: rt288x: remove default build barriers 2025-05-09 11:31:20 +02:00
realtek realtek rtl931x: mark subtarget as source-only 2025-05-09 16:38:19 +02:00
rockchip rockchip: fix the SD card detection on NanoPi R6C/R6S 2025-04-22 11:00:17 +02:00
sifiveu kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
siflower realtek: use remove_new 2025-05-02 01:34:24 +02:00
starfive kernel: bump 6.6 to 6.6.89 2025-05-03 19:57:53 +02:00
stm32 stm32: Add kmod-stm32-thermal 2025-04-19 18:41:29 +02:00
sunxi kernel: Activate CONFIG_NET_SWITCHDEV in generic config 2025-03-15 13:54:59 +01:00
tegra kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
uml uml: fix glibc-static check with GCC14 2024-06-22 22:06:06 +02:00
x86 generic: 6.12: add new config symbols 2025-05-08 19:05:48 +02:00
zynq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
Makefile linux: fix missing default packages in profiles.json 2024-11-17 19:29:06 +01:00