>> My motivation is to get rid of this (move it to devicetree):
>>
>> https://elixir.bootlin.com/linux/latest/source/arch/mips/jz4740/board-qi_lb60.c#L93
>> And enable the support of other boards with custom OOB layouts.
>
> Can you list the different layouts you have? I'm pretty sure there's a
> pattern. Maybe we can even deduce the layout from the page size or OOB
> size.
This is the other layout I have for another ingenic device:
http://projects.qi-hardware.com/index.php/p/qi-kernel/source/tree/od-2011-09-18/arch/mips/jz4740/board-a320.c#L125
Page size and OOB size are the same between these two devices.
Indeed. Do you know if there are other kind of layouts in the wild?
Note that <layout-id> can be a string, so if each each board is
defining its own layout, you could specify the board name here.
Otherwise, if you just have those 2 patterns, you can just name them
"contiguous" and "interleaved".