U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Liang <ycliang@andestech.com>
To: Conor Dooley <conor@kernel.org>
Cc: <u-boot@lists.denx.de>, Conor Dooley <conor.dooley@microchip.com>,
	Ivan Griffin <ivan.griffin@microchip.com>,
	Cyril Jean <cyril.jean@microchip.com>,
	Tom Rini <trini@konsulko.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Glass <sjg@chromium.org>, <Jamie.Gibbons@microchip.com>
Subject: Re: [PATCH v2] board: mpfs_icicle: implement board_fdt_blob_setup()/board_fit_config_name_match()
Date: Thu, 3 Jul 2025 18:09:53 +0800	[thread overview]
Message-ID: <aGZW8cabMrd_76sw@swlinux02> (raw)
In-Reply-To: <20250623115137.4017059-1-conor@kernel.org>

On Mon, Jun 23, 2025 at 12:51:36PM +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> The firmware on the Icicle is capable of providing a devicetree in a1 to
> U-Boot, but until now the devicetree has been packaged in a "payload" [1]
> alongside U-Boot (or other bootloaders/RTOSes) and appended to the image.
> The address of this appended devicetree is placed in a1 by the firmware.
> This meant that the mechanism used by OF_SEPARATE to locate the
> devicetree at the end of the image would pick up the one provided by the
> firmware when u-boot-nodtb.bin was in the payload and U-Boot's devicetree
> when u-boot.bin was.
> 
> The firmware is now going to be capable of providing a minimal devicetree
> (quite cut down due to severe space constraints), but this devicetree is
> linked into the firmware that runs out of the L2 rather than at the end
> of the U-Boot image.
> 
> Implement board_fdt_blob_setup() so that this devicetree can be
> optionally used, and the devicetree provided in the "payload" can be
> used without relying on "happening" to implement the same strategy as
> OF_SEPARATE expects in combination with u-boot-nodtb.bin.
> Unlike other RISC-V boards, the firmware provided devicetree is only
> used when OF_BOARD is set, so that the almost certainly more complete
> devicetree in U-Boot will be used unless explicitly requested otherwise.
> 
> Implement board_fit_config_name_match(), so that, using the firmware
> provided cut-down/minimal dtb, U-Boot can select one of several
> devicetrees when MULTI_DTB_FIT is enabled.
> 
> Enabling both MULTI_DTB_FIT and OF_BOARD will lead to a conflict
> between the two options, with the latter taking priority due to
> board_fdt_blob_setup() being executed before board_fit_config_name_match(),
> which causes gd->fdt_blob to be overwritten with a pointer to the
> minimal devicetree rather than the location of the fit image containing
> the multiple dtbs. Let MULTI_DTB_FIT take priority in this case, by
> explicitly blocking the override when MULTI_DTB_FIT is enabled.
> 
> Link: https://github.com/polarfire-soc/hart-software-services/blob/master/tools/hss-payload-generator/README.md [1]
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> 
> v2:
> - implement MULTI_DTB_FIT too
> 
> v1 was a year ago here:
> https://lore.kernel.org/u-boot/20240625090806.1787287-2-conor.dooley@microchip.com/
> 
> There was some discussion on that thread, but ultimately I didn't find
> what was mentioned to be worth implementing. Heinrich suggested to me, I
> guess on IRC or something since it's not in that thread, implementing
> MULTI_DTB_FIT, which I have done. A lot of the reason for the patch when
> I wrote it was speculative, but we have some actual users for OF_BOARD
> now - hence the v2 after about a year's gap.
> 
> CC: Ivan Griffin <ivan.griffin@microchip.com>
> CC: Cyril Jean <cyril.jean@microchip.com>
> CC: Tom Rini <trini@konsulko.com>
> CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> CC: Simon Glass <sjg@chromium.org>
> CC: Jamie.Gibbons@microchip.com
> CC: u-boot@lists.denx.de
> ---
>  board/microchip/mpfs_icicle/mpfs_icicle.c | 63 +++++++++++++++++++++++
>  1 file changed, 63 insertions(+)

Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>

  reply	other threads:[~2025-07-03 10:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 11:51 [PATCH v2] board: mpfs_icicle: implement board_fdt_blob_setup()/board_fit_config_name_match() Conor Dooley
2025-07-03 10:09 ` Leo Liang [this message]
2025-07-04 10:40   ` Conor Dooley
2025-07-04 11:01     ` Leo Liang
2025-07-04 11:28       ` Conor Dooley

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=aGZW8cabMrd_76sw@swlinux02 \
    --to=ycliang@andestech.com \
    --cc=Jamie.Gibbons@microchip.com \
    --cc=conor.dooley@microchip.com \
    --cc=conor@kernel.org \
    --cc=cyril.jean@microchip.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=ivan.griffin@microchip.com \
    --cc=sjg@chromium.org \
    --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