public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Rob Herring <robh@kernel.org>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
	Sasha Levin <sashal@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Doug Anderson <dianders@chromium.org>,
	Julius Werner <jwerner@chromium.org>,
	chrome-platform@lists.linux.dev
Subject: Re: [regression] of: mis-parsing Depthcharge's /firmware
Date: Mon, 20 Apr 2026 13:57:45 -0700	[thread overview]
Message-ID: <aeaTSYyaqQjuP29U@google.com> (raw)
In-Reply-To: <CAL_Jsq+UCYbKMXG5m8BRNVRA_03Ki8aGF0uoaDs8HHvOSCZ2Mg@mail.gmail.com>

Hi Rob,

On Mon, Apr 20, 2026 at 07:57:40AM -0500, Rob Herring wrote:
> On Fri, Apr 17, 2026 at 4:26 PM Brian Norris <briannorris@chromium.org> wrote:
> >
> > Hi all,
> >
> > (New subject; was "Re: [GIT PULL] Devicetree updates for v6.13")
> >
> > On Mon, Dec 09, 2024 at 05:28:09PM +0800, Chen-Yu Tsai wrote:
> > > steelix.dtb is the same, plus the firmware now inserts #address-cells
> > > and #size-cells under /firmware. This fix has landed for all future
> > > ChromeOS devices via our main firmware branch [1].
> > >
> > > AFAIK they also have a bad FDT END symbol. This was only recently
> > > discovered and fixed for future devices [2].
> > >
> > >
> > > ChenYu
> > >
> > > [1] Gerrit: https://crrev.com/c/6051580
> > > [2] Gerrit: https://review.coreboot.org/c/coreboot/+/85462
> >
> > This all comes back to bite us, since nobody went back to patch the
> > existing Chromebook device trees, and now we've added a true regression
> > on top:
> >
> > In commit 6e5773d52f4a ("of/address: Fix WARN when attempting
> > translating non-translatable addresses") we now reject devices without
> > '#address-cells', and this breaks the DTs generated by bootloaders
> > without Chen-Yu's https://crrev.com/c/6051580 fix (this is ... pretty
> > much all Chromebooks). Specifically, Linux now refuses to add 'reg'
> > resources to the /firmware/coreboot device, and we fail with:
> >
> > [   11.886271] coreboot_table firmware:coreboot: probe with driver coreboot_table failed with error -22
> >
> > This is almost certainly a DTB ABI regression.
> >
> > This was noticed here (OpenWrt supports some Chromium-based WiFi routers
> > that use Depthcharge-based bootloaders from many years ago):
> >
> > https://github.com/openwrt/openwrt/issues/21243
> >
> > For now, I just patched up the OpenWrt DTS files like so:
> > https://github.com/openwrt/openwrt/pull/22951
> >
> > But what should we do going forward? I note that Rob says "We may
> > revisit this later and address with a fixup to the DT itself" in commit
> > 8600058ba28a ("of: Add coreboot firmware to excluded default cells
> > list").
> >
> > That never happened, and a ton of Chromium devices are still broken.
> 
> The above just silenced the warning. If they are broken, then
> something else broke them.

Right.

To be clear, the regression is in commit 6e5773d52f4a, not 8600058ba28a.
But 8600058ba28a (and this thread I'm replying to):

(a) started the precedent of treating this known-problemtatic DT pattern
    specially;

(b) started to consider "fixing" those old DTs (but notably, not
    reliably/proactively -- even if Google updates official bootloaders,
    many devices are far out of Google support; or even if supported,
    don't have a systematic way of receiving Google-provided updates
    because they run non-Google software); and

(c) because (a)/(b) hid the problem partially, it was less noticeable
    that commit 6e5773d52f4a *really* broke things a month later, in the
    last days of the v6.13 cycle. (Official Google testing probably
    didn't notice, because they only tested devices with the latest
    Google bootloaders. Only people with old bootloaders / non-Google
    software noticed.)

> > (They don't have WARNINGs, but /sys/firmware/vpd, etc., is still
> > missing.)
> >
> > Can we patch of_bus_default_match() to accept an empty 'ranges' [1]? Or
> > should I go patch every Chromium-device DTS file I can find? So far, I
> > think I can get that done in 17 files in the upstream tree...
> 
> Both.

To be clear, my options were:

1. fix up kernel parsing to accept these /firmware/coreboot node
   structures (with empty ranges / no #{address,size}-cells)
2. add #{address,size}-cells into the kernel-included dts(i) files (this
   will merge safely with the DTB modifications patched in by old
   bootloaders).

I wouldn't call #2 "kernel fixup the DT", personally. I'd call it "fix
up the DT source that happens to be provided by the kernel." This
assumes no one is using device trees that are exclusively maintained
outside the kernel. (I believe that's generally true, except for
OpenWrt. And even there, it's still acceptable to patch the DT source,
and I've already done so.)

> Though I'd rather the kernel fixup the DT rather than relax the
> parsing code for everyone. Then we know what platforms need this and
> don't let new ones in.

I'm not sure how to parse this. This paragraph sounds like a 3rd option:

3. "kernel fixup the DT" -- sound like you want the kernel to identify
   these specific /firmware/coreboot structures, and activtly
   modify/patch the FDT at runtime

Is that an accurate interpretation? If so, that sounds rather novel, and
nothing like "both" (#1 + #2 above). It's certainly possible, but seems
like a large lift for this particular incompatibility.

So I assume you actually meant something else, possibly a clarification
or narrowing of #1 or #2. Can you help un-confuse me on what you think
the best route or routes are?

Brian

  reply	other threads:[~2026-04-20 20:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 21:07 [GIT PULL] Devicetree updates for v6.13 Rob Herring
2024-11-20 22:56 ` pr-tracker-bot
2024-11-24 16:29 ` Sasha Levin
2024-11-24 16:47   ` Krzysztof Kozlowski
2024-11-24 16:59     ` Sasha Levin
2024-11-25  9:48       ` AngeloGioacchino Del Regno
2024-11-25 10:34         ` Chen-Yu Tsai
2024-11-25 11:00           ` Krzysztof Kozlowski
2024-11-25 11:33             ` Krzysztof Kozlowski
2024-11-25 12:11               ` AngeloGioacchino Del Regno
2024-11-25 13:24               ` Sasha Levin
2024-11-25 15:15                 ` Rob Herring
2024-12-09  9:28                   ` Chen-Yu Tsai
2026-04-17 21:25                     ` [regression] of: mis-parsing Depthcharge's /firmware Brian Norris
2026-04-20 12:57                       ` Rob Herring
2026-04-20 20:57                         ` Brian Norris [this message]
2026-04-20 22:19                           ` Rob Herring
2026-04-20 22:54                             ` Brian Norris

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=aeaTSYyaqQjuP29U@google.com \
    --to=briannorris@chromium.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chrome-platform@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=jwerner@chromium.org \
    --cc=krzk@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashal@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wenst@chromium.org \
    /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