From: Simon Wunderlich <sw@simonwunderlich.de>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-mips@vger.kernel.org, Hauke Mehrtens <hauke@hauke-m.de>,
Aleksander Jan Bajkowski <olek2@wp.pl>,
John Crispin <john@phrozen.org>,
Sebastien Decourriere <sebtx452@gmail.com>,
Yangtao Li <frank.li@vivo.com>,
linux-kernel@vger.kernel.org,
Simon Wunderlich <sw@simonwunderlich.de>
Subject: [PATCH 0/5] mtd: maps: lantiq-flash: support boot loaders using the EBU endianness swap
Date: Sat, 14 Nov 2026 11:06:02 +0100 [thread overview]
Message-ID: <20261114100608.3432120-1-sw@simonwunderlich.de> (raw)
Some Lantiq boards, like the bintec elmeg RS123 and RS353, have a boot
loader that enables the EBU's own endianness swapping for the NOR flash
chip select. lantiq-flash then fails to probe the flash. Patch 4 lets
such boards opt in to honouring that bit with a new
"lantiq,ebu-swap-check" property. The bit only works on VR9 from
revision 1.2 and on AR10, so the driver cannot rely on it on every SoC.
The property follows Hauke's review of an earlier attempt at this fix
in 2017 [1].
While porting the change from OpenWrt to mainline I noticed that
lantiq-flash dereferences a NULL pointer on probe since v6.6. Patch 1
fixes that and can go to mtd/fixes on its own. OpenWrt never ran into
it because it carries a downstream rework of the probe function.
Patch 2 documents the "lantiq,nor" binding, which was never documented,
together with the new property. Patch 3 exports ltq_ebu_membase so that
lantiq-flash still builds as a module. It would need an Acked-by from
Thomas to go through the MTD tree together with patch 4. Patch 5
renames the NOR node of the only in-tree user, danube_easy50712.dts, so
that it validates against the new binding. It is meant for the MIPS
tree and does not depend on the other patches.
The EBU swap change is used in OpenWrt on the RS123 with a 6.18 kernel,
on top of OpenWrt's reworked probe function. The series itself is
build-tested on mtd/next for XWAY (built-in and as a module) and Falcon
with W=1, the binding passes dt_binding_check and dt-check-style, and
danube_easy50712.dtb passes dtbs_check against it.
[1] https://lists.infradead.org/pipermail/linux-mtd/2017-January/071818.html
Simon Wunderlich (5):
mtd: maps: lantiq-flash: fix NULL pointer dereference on probe
dt-bindings: mtd: Add lantiq,nor
mips: lantiq: xway: sysctrl: export ltq_ebu_membase
mtd: maps: lantiq-flash: honour the EBU's own endianness swap
mips: lantiq: danube: rename NOR node on EASY50712 reference board
.../devicetree/bindings/mtd/lantiq,nor.yaml | 79 +++++++++++++++++++
.../mips/boot/dts/lantiq/danube_easy50712.dts | 2 +-
arch/mips/lantiq/xway/sysctrl.c | 1 +
drivers/mtd/maps/lantiq-flash.c | 39 +++++++--
4 files changed, 112 insertions(+), 9 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mtd/lantiq,nor.yaml
base-commit: 0ef71adafaa9b36a06dd5b823aebcd2fa9b9b9c2
--
2.47.3
next reply other threads:[~2026-11-14 10:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 10:06 Simon Wunderlich [this message]
2026-11-14 10:06 ` [PATCH 1/5] mtd: maps: lantiq-flash: fix NULL pointer dereference on probe Simon Wunderlich
2026-11-14 10:06 ` [PATCH 2/5] dt-bindings: mtd: Add lantiq,nor Simon Wunderlich
2026-11-14 10:06 ` [PATCH 3/5] mips: lantiq: xway: sysctrl: export ltq_ebu_membase Simon Wunderlich
2026-11-14 10:06 ` [PATCH 4/5] mtd: maps: lantiq-flash: honour the EBU's own endianness swap Simon Wunderlich
2026-11-14 10:06 ` [PATCH 5/5] mips: lantiq: danube: rename NOR node on EASY50712 reference board Simon Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261114100608.3432120-1-sw@simonwunderlich.de \
--to=sw@simonwunderlich.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frank.li@vivo.com \
--cc=hauke@hauke-m.de \
--cc=john@phrozen.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=olek2@wp.pl \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=sebtx452@gmail.com \
--cc=tsbogend@alpha.franken.de \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®