u-boot/doc/usage
Kory Maincent 2f84e9cf06 cmd: add support for a new "extension" command
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>
2021-05-13 13:09:05 -04:00
..
x86 x86: Add a command to display coreboot sysinfo 2021-03-27 15:04:30 +13:00
addrmap.rst cmd: Add a command to display the address map 2021-03-05 10:25:43 +05:30
base.rst doc: man-page base command 2021-01-16 11:17:20 +01:00
bootefi.rst doc: man-page for bootefi command 2020-12-20 17:40:06 +01:00
booti.rst doc: booti man-page 2021-02-21 09:21:35 +01:00
bootmenu.rst doc: move README.bootmenu to HTML doc 2020-12-15 09:38:41 +01:00
button.rst doc: button command 2020-12-20 17:40:06 +01:00
conitrace.rst doc: describe command conitrace 2021-01-25 01:15:34 +01:00
dfu.rst doc: move README.dfu to HTML documentation 2021-03-16 09:37:04 +01:00
echo.rst doc: document echo command 2021-01-25 01:15:33 +01:00
exception.rst cmd/exception: support ebreak exception on RISC-V 2021-05-05 16:13:12 +08:00
exit.rst doc: describe exit command 2021-01-25 01:15:33 +01:00
extension.rst cmd: add support for a new "extension" command 2021-05-13 13:09:05 -04:00
false.rst doc: describe the false command 2021-01-25 01:15:34 +01:00
fatinfo.rst doc: fatinfo man-page 2021-04-24 06:53:40 +02:00
fdt_overlays.rst doc: move README.fdt-overlays to HTML documentation 2021-01-16 11:17:20 +01:00
fit.rst binman: doc: Add documentation to htmldocs 2021-03-26 17:03:10 +13:00
for.rst doc: document for statement 2021-01-25 01:15:33 +01:00
index.rst doc: usage: add usage details for reset cmd 2021-04-20 07:31:12 -04:00
load.rst doc: describe load command 2021-02-04 20:36:06 +01:00
loady.rst doc: describe loady command 2021-01-25 01:15:34 +01:00
mbr.rst cmd: Add MBR partition layout control utility 2021-01-15 16:00:32 -05:00
md.rst doc: Add a note about producing 'md.b' output using hexdump 2021-03-02 15:53:37 -05:00
mmc.rst doc: mmc man-page 2021-04-10 12:00:24 +02:00
netconsole.rst doc: move README.NetConsole to HTML documentation 2020-12-15 09:37:00 +01:00
partitions.rst doc: Document partition specifications 2021-02-26 15:30:55 +01:00
pstore.rst doc: add synopsis for pstore command 2021-01-16 11:17:20 +01:00
qfw.rst doc: qfw man-page 2021-02-21 09:21:36 +01:00
reset.rst doc: usage: add usage details for reset cmd 2021-04-20 07:31:12 -04:00
sbi.rst doc: document sbi command 2021-01-25 01:15:33 +01:00
scp03.rst doc: describe the scp03 command 2021-03-14 11:50:16 -04:00
true.rst doc: document true command 2021-01-25 01:15:34 +01:00