From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v5 02/10] cmd: add support for a new "extension" command
Date: Thu, 13 May 2021 15:06:13 -0400 [thread overview]
Message-ID: <20210513190613.GF17669@bill-the-cat> (raw)
In-Reply-To: <20210504173130.22869-3-kory.maincent@bootlin.com>
On Tue, May 04, 2021 at 07:31:22PM +0200, Kory Maincent wrote:
> This patch adds a new "extension" command, which aims at detecting
> extension boards connected to the hardware platform, and apply the
> Device Tree overlays that describe the hardware present on those
> extension boards.
>
> In order to enable this mechanism, board-specific code must implement
> the extension_board_scan() function that fills in a linked list of
> "struct extension", each describing one extension board. In addition,
> the board-specific code must select the SUPPORT_EXTENSION_SCAN Kconfig
> boolean.
>
> Based on this:
>
> - "extension scan" makes the generic code call the board-specific
> extension_board_scan() function to retrieve the list of detected
> extension boards.
>
> - "extension list" allows to list the detected extension boards.
>
> - "extension apply <number>|all" allows to apply the Device Tree
> overlay(s) corresponding to one, or all, extension boards
>
> The latter requires two environment variables to exist and set one variable
> to run:
>
> - extension_overlay_addr: the RAM address where to load the Device
> Tree overlays
>
> - extension_overlay_cmd: the U-Boot command to load one overlay.
> Indeed, the location and mechanism to load DT overlays is very setup
> specific.
>
> - extension_overlay_name: set by the command: the name of the DT which
> will be load during the execution.
>
> When calling the command described in the extension_overlay_cmd
> variable, the variable extension_overlay_name will be defined. So a
> typical extension_overlay_cmd will look like this:
>
> extension_overlay_cmd=load mmc 0:1 $extension_overlay_addr /boot/$extension_overlay_name
>
> Here is an example on how to use it:
> => run loadfdt
> => fdt addr $fdtaddr
> => setenv extension_overlay_addr 0x1000
> => setenv extension_overlay_cmd 'load mmc 0:1 ${extension_overlay_addr} /boot/${extension_overlay_name}'
> => extension scan
> Found 1 extension board(s).
> => extension apply 0
> 519 bytes read in 3 ms (168.9 KiB/s)
>
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210513/5632b935/attachment.sig>
next prev parent reply other threads:[~2021-05-13 19:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 17:31 [PATCH v5 00/10] Add support for extension boards detection and DT overlays application Kory Maincent
2021-05-04 17:31 ` [PATCH v5 01/10] fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.c Kory Maincent
2021-05-13 19:06 ` Tom Rini
2021-05-04 17:31 ` [PATCH v5 02/10] cmd: add support for a new "extension" command Kory Maincent
2021-05-13 19:06 ` Tom Rini [this message]
2021-05-04 17:31 ` [PATCH v5 03/10] pytest: add sandbox test for " Kory Maincent
2021-05-13 19:06 ` Tom Rini
2021-05-04 17:31 ` [PATCH v5 04/10] ti/common: add support for extension_scan_board function Kory Maincent
2021-05-13 19:06 ` Tom Rini
2021-05-04 17:31 ` [PATCH v5 05/10] am57xx: add support for cape detect functionality Kory Maincent
2021-05-13 19:06 ` Tom Rini
2021-05-04 17:31 ` [PATCH v5 06/10] w1: replace dt detection by automatic detection Kory Maincent
2021-05-13 19:06 ` Tom Rini
2021-05-04 17:31 ` [PATCH v5 07/10] arm: sunxi: add support for DIP detection to CHIP board Kory Maincent
2021-05-13 11:01 ` Andre Przywara
2021-05-13 19:06 ` Tom Rini
2021-05-04 17:31 ` [PATCH v5 08/10] configs: CHIP: add support for DIP detect functionality Kory Maincent
2021-05-13 11:03 ` Andre Przywara
2021-05-17 10:19 ` Köry Maincent
2021-05-13 19:06 ` Tom Rini
2021-05-04 17:31 ` [PATCH v5 09/10] arm: am335x: add support for i2c2 bus Kory Maincent
2021-05-13 19:06 ` Tom Rini
2021-05-04 17:31 ` [PATCH v5 10/10] am335x: add support for cape detect functionality Kory Maincent
2021-05-13 19:06 ` Tom Rini
2021-05-12 20:37 ` [PATCH v5 00/10] Add support for extension boards detection and DT overlays application Thomas Petazzoni
2021-05-13 12:18 ` Tom Rini
2021-05-13 12:29 ` Thomas Petazzoni
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=20210513190613.GF17669@bill-the-cat \
--to=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