summaryrefslogtreecommitdiff
path: root/doc/usage
diff options
context:
space:
mode:
Diffstat (limited to 'doc/usage')
-rw-r--r--doc/usage/cmd/bootefi.rst37
-rw-r--r--doc/usage/cmd/i3c.rst146
-rw-r--r--doc/usage/index.rst1
3 files changed, 177 insertions, 7 deletions
diff --git a/doc/usage/cmd/bootefi.rst b/doc/usage/cmd/bootefi.rst
index d6e4e62e383..7c5448586b7 100644
--- a/doc/usage/cmd/bootefi.rst
+++ b/doc/usage/cmd/bootefi.rst
@@ -12,7 +12,7 @@ Synopsis
::
- bootefi <image_addr>[:<image_size>] [<fdt_addr>]
+ bootefi <image_addr>[:<image_size>] [<initrd_addr>:<initrd_size>] [<fdt_address>]
bootefi bootmgr [<fdt_addr>]
bootefi hello [<fdt_addr>]
bootefi selftest [<fdt_addr>]
@@ -44,6 +44,16 @@ command sequence to run a UEFI application might look like
load mmc 0:1 $kernel_addr_r /EFI/grub/grubaa64.efi
bootefi $kernel_addr_r $fdt_addr_r
+or
+
+::
+
+ setenv bootargs root=/dev/vda1
+ load mmc 0:1 $fdt_addr_r dtb
+ load mmc 0:1 $kernel_addr_r vmlinux
+ load mmc 0:1 $initrd_addr_r intird
+ bootefi $kernel_addr_r $initrd_addr_r:$filesize $fdt_addr_r
+
The last UEFI binary loaded defines the image file path in the loaded image
protocol.
@@ -51,21 +61,34 @@ The value of the environment variable *bootargs* is converted from UTF-8 to
UTF-16 and passed as load options in the loaded image protocol to the UEFI
binary.
+.. note::
+
+ The bootefi command accepts one to three arguments.
+ If the second argument contains a colon ':', it is assumed to specify the
+ initial RAM disk.
+
image_addr
Address of the UEFI binary.
-fdt_addr
- Address of the device-tree or '-'. If no address is specifiy, the
- environment variable $fdt_addr is used as first fallback, the address of
- U-Boot's internal device-tree $fdtcontroladdr as second fallback.
- When using ACPI no device-tree shall be specified.
-
image_size
Size of the UEFI binary file. This argument is only needed if *image_addr*
does not match the address of the last loaded UEFI binary. In this case
a memory device path will be used as image file path in the loaded image
protocol.
+initrd_addr
+ Address of the Linux initial RAM disk or '-'. If no address is specified,
+ no RAM disk is used when booting.
+
+initrd_size
+ Size of the Linux initial RAM disk.
+
+fdt_addr
+ Address of the device-tree or '-'. If no address is specified, the
+ environment variable $fdt_addr is used as first fallback, the address of
+ U-Boot's internal device-tree $fdtcontroladdr as second fallback.
+ When using ACPI no device-tree shall be specified.
+
Note
UEFI binaries that are contained in FIT images are launched via the
*bootm* command.
diff --git a/doc/usage/cmd/i3c.rst b/doc/usage/cmd/i3c.rst
new file mode 100644
index 00000000000..922fa3ea37c
--- /dev/null
+++ b/doc/usage/cmd/i3c.rst
@@ -0,0 +1,146 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. index::
+ single: i3c (command)
+
+i3c command
+===========
+
+Synopsis
+--------
+
+::
+
+ i3c <host_controller>
+ i3c current
+ i3c list
+ i3c device_list
+ i3c write <mem_addr> <length> <device_number>
+ i3c read <mem_addr> <length> <device_number>
+
+Description
+-----------
+
+The ``i3c`` command is used to probe the i3c host controller and perform
+read and write operations on the connected i3c devices.
+
+i3c current
+------------
+
+Display the currently selected i3c host controller.
+
+i3c list
+---------
+
+List all the i3c hosts defined in the device-tree.
+
+i3c device_list
+----------------
+
+List all the i3c devices' device number, static address, dynamic address,
+PID, BCR, DCR, Max Write Speed, and Max Read Speed of the probed i3c host
+controller.
+
+i3c write
+----------
+
+Perform a write operation from memory to the connected i3c device. The data
+is read from a specified memory address and written to the selected i3c
+device, which is identified by its device number.
+
+You need to provide the memory address (``mem_addr``), the length of data
+to be written (``length``), and the device number (``device_number``). The
+data in memory will be transferred to the device in the specified order.
+
+i3c read
+---------
+
+Perform a read operation from the connected i3c device to memory. The data
+is read from the selected i3c device and stored at the specified memory
+address. You need to provide the memory address (``mem_addr``), the length
+of data to be read (``length``), and the device number (``device_number``).
+
+The device will send the requested data, which is then written to the memory
+location you specified. This operation allows you to retrieve information
+from the device and use it in your application. The data is read in the
+order specified and can be multiple bytes.
+
+host_controller
+ The name of the i3c host controller defined in the device-tree.
+
+length
+ The size of the data to be read or written.
+
+device_number
+ The device number in the driver model of the device connected to the i3c
+ host controller.
+
+mem_addr
+ The start address in memory from which to read or write the data.
+
+Examples
+--------
+
+Probe the ``i3c0`` controller::
+
+ => i3c i3c0
+
+Display the current i3c host controller::
+
+ => i3c current
+
+Check the device number and PID of the connected devices::
+
+ => i3c device_list
+
+Perform write operations on the connected i3c device (device 0) from memory::
+
+ => i3c write 0x1000 4 0
+
+ This command reads 4 bytes of data from memory starting at address
+ ``0x1000`` and writes them to device 0, which is identified by its device
+ number in the driver model. Example data from memory could look like this:
+
+ ```
+ Data at 0x1000: 0xAA 0xBB 0xCC 0xDD
+ ```
+
+ The bytes `0xAA`, `0xBB`, `0xCC`, and `0xDD` will be written to device 0.
+
+Perform a read operation from device 0 to memory (multiple bytes)::
+
+ => i3c read 0x1000 4 0
+
+ This command reads 4 bytes of data from device 0 and writes them to
+ memory starting at address ``0x1000``.
+
+ Example output after reading 4 bytes from device 0:
+
+ ```
+ i3c Read:
+ 00000000 AA BB CC DD
+ ```
+
+ The bytes `0xAA`, `0xBB`, `0xCC`, and `0xDD` are read from device 0
+ and written to memory at address `0x1000`.
+
+Configuration
+-------------
+
+The ``i3c`` command is only available if CONFIG_CMD_I3C=y.
+
+Return value
+------------
+
+If the command succeeds, the return value ``$?`` is set to 0. If an error
+occurs, the return value ``$?`` is set to 1.
+
+Note
+----
+
+When specifying the data to be written to the i3c device (for example, with
+the ``i3c write`` command), the data can be provided in either uppercase
+or lowercase hexadecimal format. Both are valid and will be processed
+correctly. Similarly, when reading data with ``i3c read``, the data will be
+retrieved in the specified length and can include multiple bytes, all
+formatted in the same way. \ No newline at end of file
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index b9de87a6ed9..3a48521d5d5 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -82,6 +82,7 @@ Shell commands
cmd/if
cmd/itest
cmd/imxtract
+ cmd/i3c
cmd/load
cmd/loadb
cmd/loadm