Re: [PATCH 2/5] dt-bindings: mtd: Add lantiq,nor

From: Miquel Raynal

Date: Tue Nov 17 2026 - 05:36:15 EST


Hi Simon,

On 14/11/2026 at 11:06:04 +01, Simon Wunderlich <sw@xxxxxxxxxxxxxxxxxx> wrote:

> The NOR flash on the External Bus Unit (EBU) of Lantiq SoCs is handled
> by the lantiq-flash driver and used by danube_easy50712.dts, but its
> binding was never documented.
>
> Add a schema for it, including a new optional lantiq,ebu-swap-check
> property. Some boot loaders, like the BOSS bootmonitor on the bintec
> elmeg RS123 and RS353, enable the EBU's own endianness swapping for the
> flash chip select (EBU_BUSCON0 bit 30), and the flash then appears at
> its unswapped addresses. Whether that bit can be trusted depends on the
> SoC: it only works on VR9 (xRX200) from revision 1.2 and on AR10
> (xRX300), and Falcon has no such register. A board property instead of
> a list of SoC revisions in the driver was requested in the review of an
> earlier attempt at this. The property does not state the bit's value,
> so a board keeps working with either boot loader setting.
>
> Link: https://lists.infradead.org/pipermail/linux-mtd/2017-January/071749.html
> Link: https://lists.infradead.org/pipermail/linux-mtd/2017-January/071818.html
> Signed-off-by: Simon Wunderlich <sw@xxxxxxxxxxxxxxxxxx>

Let's be honest, I am not very familiar with that MTD area and all the
legacy content is has, but would it be a lot more work to add lantiq as
a physmap variant? I don't like much the fact that you describe the
flash without describing the EBU. Physmap versions typically are matched
using the more specific compatible (lantiq,ebu?) and the cfi-flash
fallback. All your tweaks are EBU/machine/integration details, not
related to the flash itself.

One consequence of not modeling the controller is your need for
EXPORT_SYMBOL_GPL(ltq_ebu_membase) in patch 3/5, which is quite a hack.

Thanks,
Miquèl