From: Tom Rini <trini@konsulko.com>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Andre Przywara <andre.przywara@arm.com>,
u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Hans de Goede <hdegoede@redhat.com>,
Richard Genoud <richard.genoud@bootlin.com>,
Michael Trimarchi <michael@amarulasolutions.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Bohdan Chubuk <chbgdn@gmail.com>
Subject: Re: [PATCH] mmc: sunxi: support DM MMC in SPL
Date: Thu, 16 Jul 2026 14:26:38 -0600 [thread overview]
Message-ID: <20260716202638.GQ749385@bill-the-cat> (raw)
In-Reply-To: <CADvTj4q5=qRuCz4=rii-a_2sSRMO6inCoUVO_3UmmZkGdjSg5g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4456 bytes --]
On Thu, Jul 16, 2026 at 02:16:36PM -0600, James Hilliard wrote:
> On Thu, Jul 16, 2026 at 2:03 PM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sun, Jun 28, 2026 at 03:27:48PM -0600, James Hilliard wrote:
> > > On Sun, Jun 28, 2026 at 10:16 AM Andre Przywara <andre.przywara@arm.com> wrote:
> > > >
> > > > On Fri, 26 Jun 2026 14:51:50 -0600
> > > > James Hilliard <james.hilliard1@gmail.com> wrote:
> > > >
> > > > Hi James,
> > > >
> > > > > sunxi SPL normally uses the legacy MMC interface while U-Boot
> > > > > proper uses the DM driver. Boards which enable SPL_DM_MMC need
> > > >
> > > > I think I mentioned this before: enabling the device model in the SPL
> > > > (or not) is not a *device* decision, but a platform one.
> > >
> > > I'm a bit confused here, uboot's configuration system from what I can tell
> > > is designed to allow enabling device model for specific devices and even
> > > for specific drivers.
> >
> > Right. And to be clear, in your tree you're working to upstream out of,
> > only the h616 platforms end up enabling SPL_DM and not all of the
> > existing ARCH_SUNXI, yes?
>
> Well my uboot config is managed out of tree by buildroot technically. I've only
> tested on h616 myself. AFAIU SPL_DM for sunxi is not disabled by kconfig
> on sunxi platform as-is, it's just a bit broken at runtime I think.
>
> >
> > > Why would this need to be a platform level decision? Given that boards
> > > that don't have enough SRAM for SPL DM support tend to be older, we
> > > will presumably want to migrate newer boards to SPL DM at some point
> > > in the future anyways.
> > >
> > > > And for
> > > > technical reasons, mostly to support older devices, which have no other
> > > > choice, but also to keep it simple and the SPL small, we do not use DM
> > > > in the SPL on Allwinner boards.
> > >
> > > I mean, this seems to me to be justification for continuing to support
> > > legacy drivers, not justification for not supporting DM as well since there
> > > are also many sunxi boards that don't have that limitation.
> >
> > This would be a separate set of potential cleanups to evaluate later on.
> >
> > > > I see the SPL as the continuation of the
> > > > BootROM, which is completely board agnostic.
> > >
> > > At a minimum SPL is still fairly SoC specific. Although in practice it seems
> > > to not be all that board agnostic, I think if anything DM support makes it
> > > more agnostic by allowing better factoring of the device specific stuff.
> > >
> > > > The SPL can mimic this
> > > > behaviour, to follow the decisions that the BootROM made, for instance
> > > > about the boot device. The only difference here is the DRAM
> > > > initialisation, which requires some board specific data, but so far we
> > > > got away with just hardcoding it.
> > >
> > > This is one of a few reasons I wanted to get SPL DM functional on sunxi.
> > >
> > > > If that is not good anymore, I think
> > > > we can find other solutions than pulling in the whole world of SPL_DM
> > > > support.
> > > >
> > > > So what is the purpose of this exercise, why do you want DM_SPL
> > > > supported?
> > >
> > > Some cryptoengine uboot drivers I was working on adding seemed to
> > > need DM_SPL, also I think handling DRAM profiles becomes easier with
> > > it somewhat.
> > >
> > > > Keep in mind that there are 178 Allwinner boards supported in
> > > > U-Boot, so there better would be good reasons to change something
> > > > fundamental like this for all of them. It changing it for a number of
> > > > them is not better, because this doubles the test matrix, so we have to
> > > > test now that it works on both legacy and DM_SPL boards - which frankly
> > > > nobody will do.
> > >
> > > Well it doesn't actually double the test matrix since presumably boards
> > > that are not SPL DM compatible will continue to use non-DM drivers only.
> >
> > And today nothing ARCH_SUNXI enables SPL, but they all could enable it
> > today and get an assortment of failures. With what James is doing, some
> > could now enable it and have it work, or more easily work.
>
> There are plenty of sunxi board configs in uboot with SPL enabled, I think
> it's just SPL DM that's always disabled:
> https://github.com/u-boot/u-boot/blob/v2026.07/configs/yuzukihd-chameleon_defconfig
Yes, oops, I mis-typed there. I meant to say SPL_DM.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-07-16 20:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 20:51 [PATCH] mmc: sunxi: support DM MMC in SPL James Hilliard
2026-06-28 15:17 ` Andre Przywara
2026-06-28 21:27 ` James Hilliard
2026-07-16 20:03 ` Tom Rini
2026-07-16 20:16 ` James Hilliard
2026-07-16 20:26 ` Tom Rini [this message]
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=20260716202638.GQ749385@bill-the-cat \
--to=trini@konsulko.com \
--cc=andre.przywara@arm.com \
--cc=chbgdn@gmail.com \
--cc=hdegoede@redhat.com \
--cc=james.hilliard1@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=michael@amarulasolutions.com \
--cc=peng.fan@nxp.com \
--cc=quentin.schulz@cherry.de \
--cc=richard.genoud@bootlin.com \
--cc=u-boot@lists.denx.de \
/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