Trying to shed some light into it, as I have only limited experience with NAND myself, I'm taking the BT Business Hub 5 Type A (lantiq) for comparison:
[ 0.518283] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[ 0.523280] nand: AMD/Spansion S34ML01G1
[ 0.527187] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 0.535262] Bad block table found at page 65472, version 0x01
[ 0.541274] Bad block table found at page 65408, version 0x01
[ 0.546349] nand_read_bbt: bad block at 0x000001fc0000
[ 0.551361] nand_read_bbt: bad block at 0x000002600000
[ 0.556531] nand_read_bbt: bad block at 0x000003c60000
[ 0.561764] 4 fixed-partitions partitions found on MTD device 14000000.flash
[ 0.568686] Creating 4 MTD partitions on "14000000.flash":
[ 0.574178] 0x000000000000-0x0000000a0000 : "u-boot"
[ 0.581290] 0x0000000a0000-0x0000000c0000 : "uboot-env"
[ 0.587246] 0x0000000c0000-0x000000100000 : "unused"
[ 0.592932] 0x000000100000-0x000007f80000 : "ubi"
root@bthub5:~# cat /proc/mtd
dev: size erasesize name
mtd0: 000a0000 00020000 "u-boot"
mtd1: 00020000 00020000 "uboot-env"
mtd2: 00040000 00020000 "unused"
mtd3: 07e80000 00020000 "ubi"
(yes, I do have 3 bad blocks, at 128 KB each.)
0x7e80000 bytes = 126.5 MB
Let's take a look at the usable space (kernel 2.1 MB, rootfs 6.7 MB):
root@bthub5:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 6.8M 6.8M 0 100% /rom
tmpfs 60.0M 84.0K 60.0M 0% /tmp
/dev/ubi0_2 104.0M 180.0K 99.1M 0% /overlay
overlayfs:/overlay 104.0M 180.0K 99.1M 0% /
tmpfs 512.0K 0 512.0K 0% /dev
126.5 MB (ubi)
- 0.768 MB (bad blocks)
- 2.1 MB (kernel)
- 6.7 MB (rootfs)
- 0.180 MB (overlay contents)
==========
116.752 MB (free space, at least mathematically, ignoring padding, overhead, etc.)
actually free space as reported by df -h
, 99.1 MB - so ~17.652 MB (~13,95%) 'unaccounted' for, probably 'lost' for overhead and wear leveling.
ubinfo -a
seems to confirm these rough calculations:
root@bthub5:~# ubinfo -a
UBI version: 1
Count of UBI devices: 1
UBI control device major/minor: 10:58
Present UBI devices: ubi0
ubi0
Volumes count: 4
Logical eraseblock size: 129024 bytes, 126.0 KiB
Total amount of logical eraseblocks: 1009 (130185216 bytes, 124.1 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes 128
Count of bad physical eraseblocks: 3
Count of reserved physical eraseblocks: 17
Current maximum erase counter value: 21
Minimum input/output unit size: 2048 bytes
Character device major/minor: 252:0
Present volumes: 0, 1, 2, 3
Volume ID: 0 (on ubi0)
Type: dynamic
Alignment: 1
Size: 17 LEBs (2193408 bytes, 2.0 MiB)
State: OK
Name: kernel
Character device major/minor: 252:1
-----------------------------------
Volume ID: 1 (on ubi0)
Type: dynamic
Alignment: 1
Size: 54 LEBs (6967296 bytes, 6.6 MiB)
State: OK
Name: rootfs
Character device major/minor: 252:2
-----------------------------------
Volume ID: 2 (on ubi0)
Type: dynamic
Alignment: 1
Size: 916 LEBs (118185984 bytes, 112.7 MiB)
State: OK
Name: rootfs_data
Character device major/minor: 252:3
-----------------------------------
Volume ID: 3 (on ubi0)
Type: dynamic
Alignment: 1
Size: 1 LEBs (129024 bytes, 126.0 KiB)
State: OK
Name: caldata
Character device major/minor: 252:4
Taking padding into account, the overhead delta changes only slightly from ~17.652 MB (~13,95%) to 13,42 MB (~11,93%).
Looking at this for comparisons, the values you see for the wrt1900acs v2 might be reasonable.