I have Buffalo BHR-4GRV router. This model is a wired router with the same design as WZR-HP-G450H, and we can use WZR-HP-G450H's firmware for installation in ar71xx target.
I tried to install the OpenWrt firmware for WZR-HP-G450H in ath79 target to BHR-4GRV, but mtd partitions are not defined in dts and boot failed. So I added that definition in dts, however, detected only one of the two flash devices installed on BHR-4GRV.
Are there any ideas...?
initramfs bootlog (ath79)
[ 0.590708] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.595558] 5 fixed-partitions partitions found on MTD device spi0.0
[ 0.601940] Creating 5 MTD partitions on "spi0.0":
[ 0.606781] 0x000000000000-0x000000040000 : "u-boot"
[ 0.612893] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.619365] 0x000000050000-0x000000060000 : "ART"
[ 0.625214] 0x000000060000-0x000001fe0000 : "firmware"
[ 0.630390] mtd: partition "firmware" extends beyond the end of device "spi0.0" -- size truncated to 0xfa0000
[ 0.663863] 2 uimage-fw partitions found on MTD device firmware
[ 0.669842] 0x000000060000-0x0000001c7fdb : "kernel"
[ 0.675895] 0x0000001c7fdb-0x000001000000 : "rootfs"
[ 0.681902] mtd: device 5 (rootfs) set to be root filesystem
[ 0.687713] 1 squashfs-split partitions found on MTD device rootfs
[ 0.693955] 0x0000003c0000-0x000001000000 : "rootfs_data"
[ 0.700409] 0x000001fe0000-0x000002000000 : "user_property"
[ 0.706087] mtd: partition "user_property" is out of reach -- disabled
A simple research let me think that this mtdconcat driver isn´t supported with a dts based device definition.
The function mtd_concat_create() has to be called after registration of mtd devices and this is currently only possible with code (mach-files + init code)...
You have to live with non concated mtd devices on ath79 until anyone (or you) implement somthing that could be defined in dts to use the driver drivers/mtd/mtdconcat.c on dts based tagets.
But 16MB (one nor flash of your router) are not that bad for a router device.
What you can do, you could register both mtd devices and use the second one for other purposes...
If you want to use the two nor flash devices on your router here is a example:
Read the comment above cs-gpios = <0>, <&gpio 2 GPIO_ACTIVE_HIGH>;.
This describes how you use the single cs gpio for two devices...
The first one gets activated if the cs gpio (gpio 2) is low and the second device get active if the same gpio is high.
This should be also true for your device.
Don´t think this has a high priority because there are not that much devices that use the mtdconcat driver...
Actually I looked at that thread and I was interested in cs-gpios property, but I did not know how to identify gpio pin that might be connected, and I gave it up.
Don´t think this has a high priority because there are not that much devices that use the mtdconcat driver...
If i´m right it should be exactly like in the example with cs-gpios = <0>, <&gpio 2 GPIO_ACTIVE_HIGH>;, but for your device you have two flash nodes with compatible = "jedec,spi-nor";.
If you take a look in the datasheet on page 11 you see that gpio 2 is the spi hw cs pin and this one is used for both spi devices on the exapmle. Device one gets selected if gpio two = low and device two get selected with the same gpio = high.
And the the first gpio is <0> because this says here we use the hw cs gpio (gpio 2 = low).