U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini via U-Boot <u-boot@lists.u-boot-project.org>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: u-boot@lists.denx.de,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Peng Fan <peng.fan@nxp.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Bastien Curutchet <bastien.curutchet@bootlin.com>,
	Anshul Dalal <anshuld@ti.com>, Johan Jonker <jbx6244@gmail.com>
Subject: Re: [PATCH v2] mmc: sunxi: support DM MMC in SPL
Date: Mon, 20 Jul 2026 14:45:27 -0600	[thread overview]
Message-ID: <20260720204527.GJ749385@bill-the-cat> (raw)
In-Reply-To: <20260717210148.3391816-1-james.hilliard1@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2732 bytes --]

On Fri, Jul 17, 2026 at 03:01:41PM -0600, James Hilliard wrote:

> sunxi SPL normally uses the legacy MMC interface while U-Boot proper
> uses the driver-model path. When SPL_DM_MMC is enabled, the existing
> DM probe depends on the devicetree, clock and pinctrl providers being
> available in SPL.
> 
> Select the required SPL clock, OF control, pinctrl and pin configuration
> support from MMC_SUNXI. Retain the main CCU and PIO nodes when their SPL
> frameworks are enabled, and retain the MMC0 controller and pin
> configuration when SPL_DM_MMC is enabled.
> 
> This reuses the existing DM path unchanged and leaves the legacy SPL path
> untouched when SPL_DM_MMC is disabled.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> Changes v1 -> v2:
>   - select the required SPL dependencies in Kconfig  (suggested by Tom)
>   - retain the common CCU, PIO, MMC0 and pin configuration nodes in the
>     SPL devicetree
>   - drop the new preprocessor fallback paths  (suggested by Andre)
>   - reuse the existing DM MMC probe unchanged
>   - drop the no-devicetree platform-data path and controller reinit hook
>   - reduce the driver change to four Kconfig selections
>   - validate an H616 SD boot through SPL FIT verification and U-Boot proper
> ---
>  arch/arm/dts/sunxi-u-boot.dtsi | 22 ++++++++++++++++++++++
>  drivers/mmc/Kconfig            |  4 ++++
>  2 files changed, 26 insertions(+)
> 
> diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
> index e1a9a7f5d4c..fdd8c78c8bf 100644
> --- a/arch/arm/dts/sunxi-u-boot.dtsi
> +++ b/arch/arm/dts/sunxi-u-boot.dtsi
> @@ -19,6 +19,28 @@
>  	};
>  };
>  
> +#ifdef CONFIG_SPL_CLK
> +&ccu {
> +	bootph-pre-ram;
> +};
> +#endif
> +
> +#ifdef CONFIG_SPL_PINCTRL
> +&pio {
> +	bootph-pre-ram;
> +};
> +#endif
> +
> +#ifdef CONFIG_SPL_DM_MMC
> +&mmc0_pins {
> +	bootph-pre-ram;
> +};
> +
> +&mmc0 {
> +	bootph-pre-ram;
> +};
> +#endif
> +
>  /* Let U-Boot be the firmware layer that controls the watchdog. */
>  #ifdef CONFIG_MACH_SUN8I_R528
>  &wdt {
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 6c513328de2..40b6e6882aa 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -806,6 +806,10 @@ config MMC_SUNXI
>  	bool "Allwinner sunxi SD/MMC Host Controller support"
>  	depends on ARCH_SUNXI
>  	default y
> +	select SPL_CLK if SPL_DM_MMC
> +	select SPL_OF_CONTROL if SPL_DM_MMC
> +	select SPL_PINCONF if SPL_DM_MMC
> +	select SPL_PINCTRL if SPL_DM_MMC
>  	help
>  	  This selects support for the SD/MMC Host Controller on
>  	  Allwinner sunxi SoCs.

This seems like a much more reasonable path, thank you.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-07-20 20:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 21:01 [PATCH v2] mmc: sunxi: support DM MMC in SPL James Hilliard
2026-07-20 20:45 ` Tom Rini via U-Boot [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=20260720204527.GJ749385@bill-the-cat \
    --to=u-boot@lists.u-boot-project.org \
    --cc=anshuld@ti.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=james.hilliard1@gmail.com \
    --cc=jbx6244@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=peng.fan@nxp.com \
    --cc=trini@konsulko.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