]> git.baikalelectronics.ru Git - uboot.git/log
uboot.git
21 months agodts: imx8mp: assign binman_configuration label to config-SEQ
Ying-Chun Liu (PaulLiu) [Tue, 17 Jan 2023 19:14:59 +0000 (03:14 +0800)]
dts: imx8mp: assign binman_configuration label to config-SEQ

assign a label for config-SEQ so that the board dts can modify
the configuration more easily.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agomx53loco: Select CONFIG_CMD_EXT4
Fabio Estevam [Mon, 16 Jan 2023 12:32:11 +0000 (09:32 -0300)]
mx53loco: Select CONFIG_CMD_EXT4

Select the CONFIG_CMD_EXT4 option so that files can be loaded
from an ext4 partition.

Signed-off-by: Fabio Estevam <festevam@denx.de>
21 months agoserial: mxc: Speed-up character transmission
Loic Poulain [Thu, 12 Jan 2023 17:19:51 +0000 (18:19 +0100)]
serial: mxc: Speed-up character transmission

Instead of waiting for empty FIFO condition before writing a
character, wait for non-full FIFO condition.

This helps in saving several tens of milliseconds during boot
(depending verbosity).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Tested-by: Fabio Estevam <festevam@denx.de>
21 months agoserial: mxc: Wait for TX completion before reset
Loic Poulain [Thu, 12 Jan 2023 17:19:50 +0000 (18:19 +0100)]
serial: mxc: Wait for TX completion before reset

The u-boot console may show some corrupted characters when
printing in board_init() due to reset or baudrate change
of the UART (probe) before the TX FIFO has been completely
drained.

To fix this issue, and in case UART is still running, we now
try to flush the FIFO before proceeding to UART reinitialization.
For this we're waiting for Transmitter Complete bit, indicating
that the FIFO and the shift register are empty.

flushing has a 4ms timeout guard, which is normally more than
enough to consume the FIFO @ low baudrate (9600bps).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agopico-imx7d: Add support for the 2GB variant
Fabio Estevam [Wed, 11 Jan 2023 12:22:58 +0000 (09:22 -0300)]
pico-imx7d: Add support for the 2GB variant

Add the board detection mechanism to be able to support
the 2GB variant.

Based on the code from TechNexion U-Boot downstream tree.

Signed-off-by: Fabio Estevam <festevam@denx.de>
21 months agoimx8mm-phg: Add board support
Fabio Estevam [Tue, 10 Jan 2023 20:18:08 +0000 (17:18 -0300)]
imx8mm-phg: Add board support

Add the board support for the i.MX8MM Cloos PHG board.

This board uses a imx8mm-tqma8mqml SoM from TQ-Group.

imx8mm-phg.dts and imx8mm-tqma8mqml.dtsi are taken
directly from Linux 6.2-rc3.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoarm64: dts: imx8mm-kontron: Add RTC aliases
Frieder Schrempf [Mon, 9 Jan 2023 11:42:18 +0000 (12:42 +0100)]
arm64: dts: imx8mm-kontron: Add RTC aliases

Add aliases for the RTCs on the board and on the SoC. This ensures that
the primary RTC is always the one on the board that has a buffered supply
and maximum accuracy.

This is a direct port of the pending commit from linux-next.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoconfigs: verdin-imx8mm: Add bootaux command
Philippe Schenker [Wed, 4 Jan 2023 19:02:16 +0000 (20:02 +0100)]
configs: verdin-imx8mm: Add bootaux command

The i.MX 8M Mini SoC does incorporate an additional M-Core. To be able
to load it with a firmware, enable bootaux command as other Toradex
modules also have it enabled to be consistent.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
21 months agomx7: clock: Use 60MHz for the I2C clocks
Fabio Estevam [Tue, 3 Jan 2023 13:19:39 +0000 (10:19 -0300)]
mx7: clock: Use 60MHz for the I2C clocks

When an I2C clock is enabled inside enable_i2c_clk() the clock rate is
configured as PLL_SYS_MAIN_120M_CLK / 2 = 60MHz.

Currently, the I2C clock is retrieved from I2C1_CLK_ROOT, which
may not be the one that was enabled.

As there is no clock driver for the imx7d, it is better to return 60MHz
for the I2C clock.

This provides a workaround for the imx7d-pico board, where I2C4 is
connected to the PMIC.

With this change, it is possible to convert the imx7d-pico board
to DM_I2C and DM_PMIC.

Signed-off-by: Fabio Estevam <festevam@denx.de>
21 months agoARM: imx: bootaux: Fix LTO -Wlto-type-mismatch
Marek Vasut [Tue, 13 Dec 2022 04:46:07 +0000 (05:46 +0100)]
ARM: imx: bootaux: Fix LTO -Wlto-type-mismatch

Commit 9d22a64ea09d ("imx: bootaux: cleanup code") introduces the
following LTO related warning:

"
arch/arm/mach-imx/imx_bootaux.c:24:31: warning: type of ‘hostmap’ does not match original declaration [-Wlto-type-mismatch]
   24 | const __weak struct rproc_att hostmap[] = { };
      |                               ^
arch/arm/mach-imx/imx8m/soc.c:1590:24: note: array types have different bounds
 1590 | const struct rproc_att hostmap[] = {
      |                        ^
arch/arm/mach-imx/imx8m/soc.c:1590:24: note: ‘hostmap’ was previously declared here
../aarch64-linux-gnu/bin/ld: warning: u-boot has a LOAD segment with RWX permissions
"

This is because the weak empty array of structures "hostmap" is eventually
replaced by non-empty array of structures with different number of elements.
Fix this by avoiding weak variable size array, instead use a weak function
which returns single pointer to the array.

Fixes: 9d22a64ea09d ("imx: bootaux: cleanup code")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
21 months agoARM: imx: bootaux: Fix macro misuse
Marek Vasut [Tue, 13 Dec 2022 04:46:06 +0000 (05:46 +0100)]
ARM: imx: bootaux: Fix macro misuse

There are no CONFIG_{TOOLS_,SPL_,TPL_,}IMX8M macros, nor is there one for
ARM64. Use plain IS_ENABLED(CONFIG_IMX8M) and IS_ENABLED(CONFIG_ARM64) to
avoid expanding the {TOOLS_,SPL_,TPL_,} part.

Fixes: 9d22a64ea09d ("imx: bootaux: cleanup code")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
21 months agoARM: imx: Factor common code out of Data Modul i.MX8M Mini eDM SBC
Marek Vasut [Sun, 11 Dec 2022 20:17:14 +0000 (21:17 +0100)]
ARM: imx: Factor common code out of Data Modul i.MX8M Mini eDM SBC

Pull common.c into common subdirectory of the board file,
since this code can be reused by other Data Modul SBCs.
Drop the include of lpddr4_timing.h, which is unneeded.

Signed-off-by: Marek Vasut <marex@denx.de>
21 months agoARM: imx: Drop board side icache enable on Data Modul i.MX8M Mini eDM SBC
Marek Vasut [Sun, 11 Dec 2022 20:16:36 +0000 (21:16 +0100)]
ARM: imx: Drop board side icache enable on Data Modul i.MX8M Mini eDM SBC

The icache is enabled in common architecture code since commit:
9e4ff6ca980 ("ARM: imx: Enable instruction cache early on on i.MX8M")
Drop the board side duplicate code.

Signed-off-by: Marek Vasut <marex@denx.de>
21 months agoARM: imx: Enable LTO for Data Modul i.MX8M Mini eDM SBC
Marek Vasut [Sun, 11 Dec 2022 20:16:11 +0000 (21:16 +0100)]
ARM: imx: Enable LTO for Data Modul i.MX8M Mini eDM SBC

Enable LTO to reduce the size of SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
21 months agoimx6qdl-sabresd: Pass mmc alias
Fabio Estevam [Sat, 10 Dec 2022 21:31:19 +0000 (18:31 -0300)]
imx6qdl-sabresd: Pass mmc alias

Originally, the mmc aliases node was present in imx6qdl-sabresd.dtsi.

After the sync with Linux in commit c2092e38fd66 ("imx6dl/imx6qdl:
synchronise device trees with linux"), the aliases node is gone as
the upstream version does not have it.

This causes a regression in which the SD card cannot be found anymore.

Fix it by passing the alias node in the u-boot.dtsi file to
restore the original behaviour where the SD card (esdhc3) was
mapped to mmc1.

Fixes: c2092e38fd66 ("imx6dl/imx6qdl: synchronise device trees with linux")
Reported-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Fabio Estevam <festevam@denx.de>
21 months agoARM: imx: Reinstate decode ECSPI env location from i.MX8M ROMAPI tables
Marek Vasut [Sat, 10 Dec 2022 01:29:52 +0000 (02:29 +0100)]
ARM: imx: Reinstate decode ECSPI env location from i.MX8M ROMAPI tables

Decode ECSPI boot device in env_get_location() from i.MX8M ROMAPI tables.
This is necessary to correctly identify env is in SPI NOR when the system
boots from SPI NOR attached to ECSPI.

This reinstates change from commit:
7444914f785 ("ARM: imx: Decode ECSPI env location from i.MX8M ROMAPI tables")
which has been dropped in commit:
171388d571d ("imx: move get_boot_device to common file")

Fixes: 171388d571d ("imx: move get_boot_device to common file")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoARM: imx: Remove PMIC reset configuration from board files
Marek Vasut [Fri, 9 Dec 2022 19:35:47 +0000 (20:35 +0100)]
ARM: imx: Remove PMIC reset configuration from board files

The PCA9450 reset configuration can now be performed by the PCA9450 PMIC
driver itself, remove the hard-coded variant from board code and let the
PMIC driver perform this task using one-liner:

```
$ sed -i '/set WDOG_B_CFG to cold reset/,+2 d' $(git grep -l PCA9450_RESET_CTRL.*0xA1 board/)
```

Venice and i.MX93 EVK required slight manual fix up.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
21 months agopmic: pca9450: Make warm reset on WDOG_B assertion
Marek Vasut [Fri, 9 Dec 2022 19:35:46 +0000 (20:35 +0100)]
pmic: pca9450: Make warm reset on WDOG_B assertion

The default configuration of the PMIC behavior makes the PMIC
power cycle most regulators on WDOG_B assertion. This power
cycling causes the memory contents of OCRAM to be lost.
Some systems neeeds some memory that survives reset and
reboot, therefore this patch is created.

The implementation is taken almost verbatim from Linux commit
2364a64d0673f ("regulator: pca9450: Make warm reset on WDOG_B assertion")

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
21 months agotools: imx8image: Fix handle leak
Mikhail Ilin [Wed, 23 Nov 2022 10:59:49 +0000 (13:59 +0300)]
tools: imx8image: Fix handle leak

The handle "fd" was created in imx8image.c:249 by calling the "fopen"
 function and is lost in imx8image.c:282.
 Should close the 'fd' file descriptor before exiting the
 parse_cfg_file(image_t *param_stack, char *name) function.

Fixes: e39bfc04356a ("tools: add i.MX8/8X image support")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agotools: imx8mimage: Fix handle leak
Mikhail Ilin [Wed, 23 Nov 2022 10:48:44 +0000 (13:48 +0300)]
tools: imx8mimage: Fix handle leak

The handle "fd" was created in imx8mimage.c:178 by calling
 the "fopen" function and is lost in imx8mimage.c:210.
 Should close the 'fd' file descriptor before exiting
 the parse_cfg_file(char *name) function.

Fixes: e1a587f058cc ("tools: add i.MX8M image support")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
21 months agotools: imximage: Fix check array index
Mikhail Ilin [Tue, 22 Nov 2022 09:34:26 +0000 (12:34 +0300)]
tools: imximage: Fix check array index

The struct dcd_v1_t is initialized to MAX_HW_CFG_SIZE_V1 (60)
 structs 'dcd_type_addr_data_t', so the indexes to use on its elements
 are [0,59]. But on line 478, the variable 'length' can take on the value
 60, which applies to array overflow: cd_v1->addr_data[length].type Thus,
 it is necessary to tighten the check on the 'size' variable on line 463.

Fixes: ceb62128e99b ("Prepare v2020.01")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
21 months agoapalis-imx8: add M4 boot environment helpers
Andrejs Cainikovs [Mon, 16 Jan 2023 19:05:14 +0000 (20:05 +0100)]
apalis-imx8: add M4 boot environment helpers

Add M4 boot environment functions for reference.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: set bootaux memory base and size
Andrejs Cainikovs [Mon, 16 Jan 2023 19:05:13 +0000 (20:05 +0100)]
apalis-imx8: set bootaux memory base and size

Set i.MX auxiliary core memory base and size.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: update env memory layout
Marcel Ziswiler [Mon, 16 Jan 2023 19:05:09 +0000 (20:05 +0100)]
apalis-imx8: update env memory layout

Update the distro config env memory layout for the Apalis iMX8 aka
QuadMax:

- kernel_comp_addr_r=0xf0000000 temporary area for uncompressing (ie FIT
  images or Image.gz booted using booti)
- kernel_comp_size=0x08000000
- loadaddr=0x95400000 avoiding any reserved areas located before that
- fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel
- scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt
- ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script

Basic idea of memory layout taken from commit 44d31a94bdd6
("imx8m{m,n}_venice: update env memory layout"). However, moved past
any reserved areas to avoid any kind of conflicts.

Note that for our regular BSP Layers and Reference Images for Yocto
Project an updated distro boot script is required (see
meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: update update_uboot confirmation message
Marcel Ziswiler [Mon, 16 Jan 2023 19:05:08 +0000 (20:05 +0100)]
apalis-imx8: update update_uboot confirmation message

Update update_uboot confirmation message.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: drop obsolete environment variables
Marcel Ziswiler [Mon, 16 Jan 2023 19:05:07 +0000 (20:05 +0100)]
apalis-imx8: drop obsolete environment variables

Drop obsolete environment variables fdt_addr, finduuid, boot_file,
mmcargs, mmcdev, mmcpart and panel.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: remove obsolete net usb start
Marcel Ziswiler [Mon, 16 Jan 2023 19:05:05 +0000 (20:05 +0100)]
apalis-imx8: remove obsolete net usb start

Remove obsolete net USB start.

While at it also add a comment about enabling distro-boot.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: remove obsolete sdhc related config defines
Marcel Ziswiler [Mon, 16 Jan 2023 19:05:04 +0000 (20:05 +0100)]
apalis-imx8: remove obsolete sdhc related config defines

Remove obsolete SDHC related config defines. Nowadays, all SDHC related
hardware configuration comes from the device tree.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoddr: imx: Handle both 3733 and 3732 MTps rates
Marek Vasut [Mon, 23 Jan 2023 16:53:19 +0000 (17:53 +0100)]
ddr: imx: Handle both 3733 and 3732 MTps rates

The DDR calibration tool for i.MX8M currently produces 3732 MTps rate in
lpddr4_timing.c , while the PHY code expects 3733 MTps rate. Support both
variants to avoid surprises where the system fails to boot.

Signed-off-by: Marek Vasut <marex@denx.de>
21 months agoapalis-imx8: add emmc/mmc card pinctrl's for different speeds
Andrejs Cainikovs [Mon, 16 Jan 2023 19:05:15 +0000 (20:05 +0100)]
apalis-imx8: add emmc/mmc card pinctrl's for different speeds

Add pinctrl's for high speed eMMC and MMC cards.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoboard: apalis-imx8: initialize snvs
Andrejs Cainikovs [Mon, 16 Jan 2023 19:05:12 +0000 (20:05 +0100)]
board: apalis-imx8: initialize snvs

Initialize Secure Non-Volatile Storage, aka SNVS.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoboard: apalis-imx8: remove board_phy_config duplicate
Andrejs Cainikovs [Mon, 16 Jan 2023 19:05:11 +0000 (20:05 +0100)]
board: apalis-imx8: remove board_phy_config duplicate

Remove a duplicate of weak board_phy_config() implementation
in drivers/net/phy/phy.c.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoboard: apalis-imx8: get rid of sc_err_t type
Philippe Schenker [Mon, 16 Jan 2023 19:05:10 +0000 (20:05 +0100)]
board: apalis-imx8: get rid of sc_err_t type

sc_pm_setup_uart() returns int, not sc_err_t.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: introduce setup setting setupargs
Marcel Ziswiler [Mon, 16 Jan 2023 19:05:06 +0000 (20:05 +0100)]
apalis-imx8: introduce setup setting setupargs

Introduce setup setting setupargs and move earlycon there.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: enable environment bootcount limit
Marcel Ziswiler [Mon, 16 Jan 2023 19:05:03 +0000 (20:05 +0100)]
apalis-imx8: enable environment bootcount limit

Enable optional environment bootcount limit functionality.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis/colibri-imx8/8x: remove global variable script
Oleksandr Suvorov [Mon, 16 Jan 2023 19:05:02 +0000 (20:05 +0100)]
apalis/colibri-imx8/8x: remove global variable script

The distroboot script system scans boot_scripts variable and
try to find and use to boot each script name mentioned there.
Setting global variable "script" breaks this general mechanism
of searching and running a distro boot script.
Remove global variables "script" to fix working the general
distro boot script mechanism.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
Oleksandr Suvorov [Mon, 16 Jan 2023 19:05:01 +0000 (20:05 +0100)]
apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms

There is no "apply" command enabled for "fdt".
Enable "apply" command to allow overlays to be applied.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: set bootdelay
Marcel Ziswiler [Mon, 16 Jan 2023 19:05:00 +0000 (20:05 +0100)]
apalis-imx8: set bootdelay

Set the boot delay to one second.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: provide proper config_sys_prompt
Igor Opaniuk [Mon, 16 Jan 2023 19:04:59 +0000 (20:04 +0100)]
apalis-imx8: provide proper config_sys_prompt

This provides correct system prompt for U-Boot console.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: display build info
Marcel Ziswiler [Mon, 16 Jan 2023 19:04:58 +0000 (20:04 +0100)]
apalis-imx8: display build info

Display build info with information about the version of SCFW, SECO and
TF-A (ATF).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: turn off lcd backlight before os handover
Marcel Ziswiler [Mon, 16 Jan 2023 19:04:57 +0000 (20:04 +0100)]
apalis-imx8: turn off lcd backlight before os handover

U-Boot typically tears down the display controller before handing
control over to Linux. On LCD displays disabling pixel clock leads to a
fading out effect with vertical/horizontal lines. Make sure to disable
back light GPIO Apalis BKL1 before booting Linux.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoapalis-imx8: implement pcb version and soc variant handling
Marcel Ziswiler [Mon, 16 Jan 2023 19:04:56 +0000 (20:04 +0100)]
apalis-imx8: implement pcb version and soc variant handling

Implement PCB version and SoC variant handling which automatically loads
the correct device tree for the Linux kernel.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoarm: dts: imx8mn-u-boot: fix DDR3 only support
Dario Binacchi [Sat, 28 Jan 2023 16:04:04 +0000 (17:04 +0100)]
arm: dts: imx8mn-u-boot: fix DDR3 only support

In case the CONFIG_IMX8M_LPDDR4 and CONFIG_IMX8M_DDR4 options are both
disabled (i. e. BSH boards), binmain fails because DDR4 bin files are
missing.

Fixes: d792a5bc41e185 ("arm: dts: imx8mn-u-boot: Create common imx8mn-u-boot.dtsi")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
21 months agoMerge branch '2023-01-27-apple-soc-updates'
Tom Rini [Fri, 27 Jan 2023 19:48:22 +0000 (14:48 -0500)]
Merge branch '2023-01-27-apple-soc-updates'

First, to quote the author:
This series adds support for the PCIe controller found on Apple M1 and
M2 machines and enables support for PCIe XHCI controllers.  This makes
the type-A USB ports on the M1 Mac mini work.  Since the use of Apples
DART IOMMU is mandatory (these PCIe DARTs don't support bypass mode),
this adds DMA mapping operations to the IOMMU uclass and implements
them for the Apple DART.  It modifies the XHCI driver code to go map
DMA buffers through the IOMMU if there is one.  Since the M1 Mac mini
now has two types of XHCI controllers with different number of ports
(2 for the DWC3 controllers, 8 for the Fresco Logic PCIe controller)
this uncovered an issue in with the way the hub descriptor is
implemented in the XHCI driver.

Second, Mark also fixes some Apple-specific instances of
CONFIG_IS_ENABLED that should be IS_ENABLED.

21 months agoMerge tag 'efi-2023-04-rc1-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 27 Jan 2023 19:48:14 +0000 (14:48 -0500)]
Merge tag 'efi-2023-04-rc1-3' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2023-04-rc1-3

Documentation:

* Improve the sl-mx8mm documenation
* Clean up README, move some section to HTML
* Man-pages for the mtime and sleep command
* Description of reducible builds
* Document dynamic event handlers

UEFI:

* Support scrolling in eficonfig command

Other:

* fix mtest on 64 bit systems

21 months agousb: xhci: Fix root hub descriptor
Mark Kettenis [Sat, 21 Jan 2023 19:28:00 +0000 (20:28 +0100)]
usb: xhci: Fix root hub descriptor

When a system has multiple XHCI controllers, some of the
properties described in the descriptor of the root hub (such as
the number of ports) might differ between controllers.  Fix this
by switching from a single global hub descriptor to a hub
descriptor per controller.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Marek Vasut <marex@denx.de>
21 months agoarm: apple: Enable PCIe USB controller
Mark Kettenis [Sat, 21 Jan 2023 19:27:59 +0000 (20:27 +0100)]
arm: apple: Enable PCIe USB controller

Some Apple Silicon machines have a PCIe XHCI controller in additon
to the DWC3 controllers integrated on the SoC.  On the Mac mini
the Type-A ports are handled by this PCIe controller.  Enabling
it allows the use of these ports in U-Boot.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
21 months agopci: Add Apple PCIe controller driver
Mark Kettenis [Sat, 21 Jan 2023 19:27:58 +0000 (20:27 +0100)]
pci: Add Apple PCIe controller driver

This driver supports the PCIe controller on the Apple M1 and
M2 SoCs.  The code is adapted from the Linux driver.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
21 months agotest: Add test for mapping IOMMUs for PCI devices
Mark Kettenis [Sat, 21 Jan 2023 19:27:57 +0000 (20:27 +0100)]
test: Add test for mapping IOMMUs for PCI devices

Test that we correctly probe an IOMMU that is mapped by an
"iommu-map" device tree property of a PCIe controller node.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoiommu: Implement mapping IOMMUs for PCI devices
Mark Kettenis [Sat, 21 Jan 2023 19:27:56 +0000 (20:27 +0100)]
iommu: Implement mapping IOMMUs for PCI devices

Systems such as Apple's M1 and M2 SoCs may have separate IOMMUs
for each PCIe root port.  In this case the right IOMMU for a
PCI device behind a particular root port is described by an
"iommu-map" property in the device tree.  Parse this property
and use it to find the right IOMMU device for PCI devices.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
21 months agousb: xhci: Implement DMA mapping
Mark Kettenis [Sat, 21 Jan 2023 19:27:55 +0000 (20:27 +0100)]
usb: xhci: Implement DMA mapping

An XHCI controller that sits behind an IOMMU needs to map and unmap
its memory buffers to do DMA.  Implement this by inroducing new
xhci_dma_map() and xhci_dma_unmap() helper functions.  The
xhci_dma_map() function replaces the existing xhci_virt_to_bus()
function in the sense that it returns the bus address in the case
of simple address translation in the absence of an IOMMU.  The
xhci_bus_to_virt() function is eliminated by storing the CPU
address of the allocated scratchpad memory in struct xhci_ctrl.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Marek Vasut <marex@denx.de>
21 months agoiommu: apple: Implement DMA mapping operations for Apple DART
Mark Kettenis [Sat, 21 Jan 2023 19:27:54 +0000 (20:27 +0100)]
iommu: apple: Implement DMA mapping operations for Apple DART

Implement translation table support for all the variations of
Apple's DART IOMMU that can be found on Apple's M1 and M2 SoCs.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
21 months agotest: Add test for IOMMU uclass map/unmap ops
Mark Kettenis [Sat, 21 Jan 2023 19:27:53 +0000 (20:27 +0100)]
test: Add test for IOMMU uclass map/unmap ops

Test that the map and unmap operations work for devices that
have DMA translated by an IOMMU and devices that don't have
DMA translated by an IOMMU.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoiommu: Add DMA mapping operations
Mark Kettenis [Sat, 21 Jan 2023 19:27:52 +0000 (20:27 +0100)]
iommu: Add DMA mapping operations

In order to support IOMMUs in non-bypass mode we need device ops
to map and unmap DMA memory.  The map operation enters a mapping
for a region specified by CPU address and size into the translation
table of the IOMMU and returns a DMA address suitable for
programming the device to do DMA.  The unmap operation removes
this mapping from the translation table of the IOMMU.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
21 months agoserial: s5p: Use IS_ENABLED where appropriate
Mark Kettenis [Thu, 26 Jan 2023 13:44:09 +0000 (14:44 +0100)]
serial: s5p: Use IS_ENABLED where appropriate

There are no SPL/TPL variants of CONFIG_CLK_EXYNOS and
CONFIG_ARCH_APPLE, so switch from CONFIG_IS_ENABLED to
IS_ENABLED.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoMerge branch '2023-01-27-assorted-updates'
Tom Rini [Fri, 27 Jan 2023 19:04:51 +0000 (14:04 -0500)]
Merge branch '2023-01-27-assorted-updates'

- TI j721s2 support, Nuvoton npcm8xx updates, bouncebuf fix, mkimage fix
  so you can adjust the magic image, pinctrl fixes, ifwitool bugfix

21 months agomkimage: fit: Support signed configurations in 'auto' FITs
Massimo Pegorer [Thu, 5 Jan 2023 09:31:09 +0000 (10:31 +0100)]
mkimage: fit: Support signed configurations in 'auto' FITs

Extend support for signing in auto-generated (-f auto) FIT. Previously,
it was possible to get signed 'images' subnodes in the FIT using
options -g and -o together with -f auto. This patch allows signing
'configurations' subnodes instead of 'images' ones (which are hashed),
using option -f auto-conf instead of -f auto. Adding also -K <dtb> and
-r options, will add public key to <dtb> file with required = "conf"
property.

Summary:
    -f auto => FIT with crc32 images
    -f auto -g ... -o ... => FIT with signed images
    -f auto-conf -g ... -o ... => FIT with sha1 images and signed confs

Example: FIT with kernel, two device tree files, and signed
configurations; public key (needed to verify signatures) is
added to u-boot.dtb with required = "conf" property.

mkimage -f auto-conf -A arm -O linux -T kernel -C none -a 43e00000 \
        -e 0 -d vmlinuz -b /path/to/first.dtb -b /path/to/second.dtb \
        -k /folder/with/key-files -g keyname -o sha256,rsa4096 \
        -K u-boot.dtb -r kernel.itb

Example: Add public key with required = "conf" property to u-boot.dtb
without needing to sign anything. This will also create a useless FIT
named unused.itb.

mkimage -f auto-conf -d /dev/null -k /folder/with/key-files \
        -g keyname -o sha256,rsa4096 -K u-boot.dtb -r unused.itb

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agocommon: bouncebuf: Use dma-mapping for cache ops
Andrew Davis [Fri, 6 Jan 2023 18:02:50 +0000 (12:02 -0600)]
common: bouncebuf: Use dma-mapping for cache ops

This matches how this would be done in Linux and these functions
do the alignment for us which makes the code look cleaner.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoinclude: configs: Update env for selecting right dtb
Sinthu Raja [Tue, 10 Jan 2023 15:47:58 +0000 (21:17 +0530)]
include: configs: Update env for selecting right dtb

Now that single defconfig shall be used for booting J721S2 EVM and
AM68 SK, the default device tree will not work for selecting dtb for
kernel. Update the findfdt env to select right dtb based on
board_name env variable.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoarm: dts: k3-am68-sk: Add r5 specific dt support
Sinthu Raja [Tue, 10 Jan 2023 15:47:57 +0000 (21:17 +0530)]
arm: dts: k3-am68-sk: Add r5 specific dt support

Add initial support for AM68 SK device tree that runs on R5.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
21 months agoarm: dts: Add support for A72 specific AM68 Starter Kit Base Board
Sinthu Raja [Tue, 10 Jan 2023 15:47:56 +0000 (21:17 +0530)]
arm: dts: Add support for A72 specific AM68 Starter Kit Base Board

The SK architecture comprises of baseboard and a SOM board. The
AM68 Starter Kit's baseboard contains most of the actual connectors,
power supply etc. The System on Module (SoM) is plugged on to the base
board. Therefore, add support for peripherals brought out in the base
board.

Schematics: https://www.ti.com/lit/zip/SPRR463

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
21 months agoarm: dts: Add initial support for AM68 Starter Kit System on Module
Sinthu Raja [Tue, 10 Jan 2023 15:47:55 +0000 (21:17 +0530)]
arm: dts: Add initial support for AM68 Starter Kit System on Module

AM68 Starter Kit (SK) is a low cost, small form factor board designed
for TI’s AM68 SoC. TI’s AM68 SoC comprises of dual core A72, high
performance vision accelerators, hardware accelerators, latest C71x
DSP, high bandwidth real-time IPs for capture and display. The SoC is
power optimized to provide best in class performance for industrial
applications.

        AM68 SK supports the following interfaces:
        * 16 GB LPDDR4 RAM
        * x1 Gigabit Ethernet interface
        * x1 USB 3.1 Type-C port
        * x2 USB 3.1 Type-A ports
        * x1 PCIe M.2 M Key
        * 512 Mbit OSPI flash
        * x2 CSI2 Camera interface (RPi and TI Camera connector)
        * 40-pin Raspberry Pi GPIO header

SK's System on Module (SoM) contains the SoC, PMIC, DDR and OSPI flash.
Therefore, add support for the components present on the SoM.

Schematics: https://www.ti.com/lit/zip/SPRR463
TRM: http://www.ti.com/lit/pdf/spruj28

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
21 months agoboard: ti: j721s2: Add board_init and support for selecting DT based on EEPROM
Sinthu Raja [Tue, 10 Jan 2023 15:47:54 +0000 (21:17 +0530)]
board: ti: j721s2: Add board_init and support for selecting DT based on EEPROM

Add the board_init_f API for SPL and run the platform-required SoC
initialization.

Add the functionality for board name-based DTB selection from FIT
within SPL. This will make it easier to utilise one defconfig for
both the EVM and the SK.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoarch: mach-k3: Update board specific API name to K3 generic API name
Sinthu Raja [Tue, 10 Jan 2023 15:47:53 +0000 (21:17 +0530)]
arch: mach-k3: Update board specific API name to K3 generic API name

Although the board_init_f API initialises the SoC, the API name is
incorrectly specified and misleads the functionality. This file should
only include k3-specific functionality. Change the API's name to something
more K3-specific and separate the function to make it more modular.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoboard: ti: j721s2: Add support for detecting multiple device trees
Sinthu Raja [Tue, 10 Jan 2023 15:47:52 +0000 (21:17 +0530)]
board: ti: j721s2: Add support for detecting multiple device trees

Update the board_fit_config_name_match() to choose the right dtb
based on the board name read from EEPROM.

Also restrict multpile EEPROM reads by verifying if EEPROM is already
read

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoboard: ti: j721s2: Enable support for reading EEPROM at next alternate address
Sinthu Raja [Tue, 10 Jan 2023 15:47:51 +0000 (21:17 +0530)]
board: ti: j721s2: Enable support for reading EEPROM at next alternate address

J721S2 EVM has EEPROM populated at 0x50. AM68 SK has EEPROM populated at
next address 0x51 in order to be compatible with RPi. So start looking
for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoboard: ti: j721s2: Add support to update board_name for am68-sk
Sinthu Raja [Tue, 10 Jan 2023 15:47:50 +0000 (21:17 +0530)]
board: ti: j721s2: Add support to update board_name for am68-sk

Update setup_board_eeprom_env() to choose the right board name
for am68-sk.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agoconfigs: j721s2_evm: Enable configs to store env in MMC FAT partition
Sinthu Raja [Tue, 10 Jan 2023 15:47:49 +0000 (21:17 +0530)]
configs: j721s2_evm: Enable configs to store env in MMC FAT partition

J721S2 EVM used to store env on eMMC, since EVM and SK uses same
defconfig and there is no eMMC on SK, we need to keep env in an
interface which available on both EVM and SK. So, save env in FAT
partition of MMC SD Card.

Enable defconfigs relevant for storing env on FAT partition of MMC.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
21 months agoconfigs: j721s2_evm_a72: Enable support for building multiple dtbs into FIT
Sinthu Raja [Tue, 10 Jan 2023 15:47:48 +0000 (21:17 +0530)]
configs: j721s2_evm_a72: Enable support for building multiple dtbs into FIT

Enable configs for building multiple dtbs into a single fit image
and load the right dtb for next stage. Add k3-am68-sk-base-board
dtb along with evm dtb inside DTB FIT image. This helps to use same
defconfig for both EVM and SK

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
21 months agoconfigs: j721s2_evm_r5: Enable support for building multiple dtbs into FIT
Sinthu Raja [Tue, 10 Jan 2023 15:47:47 +0000 (21:17 +0530)]
configs: j721s2_evm_r5: Enable support for building multiple dtbs into FIT

Enable configs for building multiple dtbs into a single fit image
and load the right dtb for next stage. This will help to use same
defconfig for both EVM and SK.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
21 months agoMAINTAINERS: add include/power/ to POWER
John Keeping [Thu, 19 Jan 2023 12:55:19 +0000 (12:55 +0000)]
MAINTAINERS: add include/power/ to POWER

Add the related include files to the power MAINTAINERS entry.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoifwitool: Fix member access
Simon Glass [Wed, 18 Jan 2023 20:13:17 +0000 (13:13 -0700)]
ifwitool: Fix member access

On a second and third look, a recent patch seems to be writing to the
wrong place - updating offsets from the address of the pointer instead
of what the pointer points to.

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 9a0b40ff5aa ("tool: ifwitool: Fix buffer overflow")
Acked-by: Sean Anderson <seanga2@gmail.com>
21 months agopinctrl: fix docstring
Michael Walle [Wed, 18 Jan 2023 12:12:24 +0000 (13:12 +0100)]
pinctrl: fix docstring

Fix the copy and paste error.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agopinctrl: get rid of some ifdeffery
Michael Walle [Wed, 18 Jan 2023 12:12:23 +0000 (13:12 +0100)]
pinctrl: get rid of some ifdeffery

Don't define an empty version for pinconfig_post_bind(). Just guard the
call and let the linker garbage collection do the rest. This way, we
also don't have to do any guesswork.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Marek Vasut <marex@denx.de>
21 months agopinctrl: don't fall back to pinctrl_select_state_simple()
Michael Walle [Wed, 18 Jan 2023 12:12:22 +0000 (13:12 +0100)]
pinctrl: don't fall back to pinctrl_select_state_simple()

If CONFIG_PINCTRL_FULL is enabled, never fall back to the simple
implementation. pinctrl_select_state() is called for each device and it
is expected to fail. A fallback to the simple imeplementation doesn't
make much sense.

To keep the return code consistent, we need to change the -EINVAL (which
was ignored before) to -ENOSYS.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoarm: npcm8xx: add security feature header
Jim Liu [Tue, 17 Jan 2023 08:59:23 +0000 (16:59 +0800)]
arm: npcm8xx: add security feature header

The NPCM driver can use on npcm7xx/npcm8xx
so add npcm8xx header for driver.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
21 months agoARM: config: enable function for nuvoton npcm845 bmc
Jim Liu [Tue, 17 Jan 2023 08:59:22 +0000 (16:59 +0800)]
ARM: config: enable function for nuvoton npcm845 bmc

Enable npcm845 i2c、ethernet、REGULATOR and security feature

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
21 months agoARM: dts: npcm8xx: add npcm845 function node
Jim Liu [Tue, 17 Jan 2023 08:59:21 +0000 (16:59 +0800)]
ARM: dts: npcm8xx: add npcm845 function node

Add functaion node list as below:
1. i2c
2. gmac
3. otp
4. aes
5. sha
6. rng
7. serial

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
21 months agoefi_loader: don't use HandleProtocol
Heinrich Schuchardt [Tue, 24 Jan 2023 19:36:45 +0000 (20:36 +0100)]
efi_loader: don't use HandleProtocol

HandleProtocol() is deprecrated. According to the UEFI specification it
should be implemented as a call to  OpenProtocolInterface() with a hard
coded agent handle. This implies that we would have to call
CloseProtocolInterfaces() after usage with the same handle.

Getting rid of an EFI_CALL() is also appreciated.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agoeficonfig: increase the number of menu entries
Masahisa Kojima [Tue, 24 Jan 2023 06:56:16 +0000 (15:56 +0900)]
eficonfig: increase the number of menu entries

Current eficonfig has the maximum number of menu entries and
it is 99. If there are more EFI load options and files in the
system, eficonfig can not handle it.

This commit increases this maximum number of menu entries
to INT_MAX.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agoeficonfig: add vertical scroll support
Masahisa Kojima [Tue, 24 Jan 2023 06:56:15 +0000 (15:56 +0900)]
eficonfig: add vertical scroll support

The current eficonfig menu does not support vertical scroll,
so it can not display the menu entries greater than
the console row size.

This commit add the vertial scroll support.
The console size is retrieved by
SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode() service, then
calculates the row size for menu entry by subtracting
menu header and description row size from the console row size.
"start" and "end" are added in the efimenu structure.
"start" keeps the menu entry index at the top, "end" keeps
the bottom menu entry index. item_data_print() menu function
only draws the menu entry between "start" and "end".

This commit also fixes the issue that "Save" and "Quit"
entries can be moved by BKEY_PLUS in change boot order menu.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agoeficonfig: refactor change boot order implementation
Masahisa Kojima [Tue, 24 Jan 2023 06:56:14 +0000 (15:56 +0900)]
eficonfig: refactor change boot order implementation

This commit removes the change boot order specific
menu implementation. The change boot order implementation
calls eficonfig_process_common() same as other menus.

The change boot order menu requires own item_data_print
and item_choice implementation, but display_statusline
function can be a same function as other menus.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agoeficonfig: refactor eficonfig_process_common function
Masahisa Kojima [Tue, 24 Jan 2023 06:56:13 +0000 (15:56 +0900)]
eficonfig: refactor eficonfig_process_common function

Current change boot order implementation does not call
eficonfig_process_common() and call own menu functions
for display_statusline, item_data_print and item_choice.
Change boot order functionality should call
eficonfig_process_common() to improve maintenanceability.

This commit is a preparation to remove the change boot
order specific implementation. The menu functions
(display_statusline, item_data_print and item_choice) are
added as argument of eficonfig_process_common().
The menu description string displayed at the bottom of
the menu is also added as argument.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agoefi_loader: fix comment in ESRT code
Heinrich Schuchardt [Mon, 23 Jan 2023 23:25:23 +0000 (00:25 +0100)]
efi_loader: fix comment in ESRT code

There is no variable num_pages in function efi_esrt_allocate_install().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
21 months agoREADME: remove 'U-Boot Porting Guide' section
Heinrich Schuchardt [Wed, 25 Jan 2023 19:00:23 +0000 (20:00 +0100)]
README: remove 'U-Boot Porting Guide' section

This section does not match the standards of our documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
21 months agodoc: move directory hierarchy to HTML
Heinrich Schuchardt [Wed, 25 Jan 2023 18:15:02 +0000 (19:15 +0100)]
doc: move directory hierarchy to HTML

Move section 'Directory hierarchy' from file README to the HTML
documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoREADME: remove section 'Versioning'
Heinrich Schuchardt [Wed, 25 Jan 2023 18:15:01 +0000 (19:15 +0100)]
README: remove section 'Versioning'

The information is already maintained in doc/develop/release_cycle.rst.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agodoc: move 'Reproducible builds'
Heinrich Schuchardt [Wed, 25 Jan 2023 18:15:00 +0000 (19:15 +0100)]
doc: move 'Reproducible builds'

Move the README section to the HTML documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoREADME: replace references to CHANGELOG
Heinrich Schuchardt [Wed, 25 Jan 2023 18:14:59 +0000 (19:14 +0100)]
README: replace references to CHANGELOG

Board configurations are in configs/ and not in the Makefile.

git log is the adequate way to identify who contributed to our source.
scripts/get_maintainer.pl is the correct way to identify maintainers.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoREADME: remove NetBSD section
Heinrich Schuchardt [Wed, 25 Jan 2023 18:14:58 +0000 (19:14 +0100)]
README: remove NetBSD section

The information in this section is outdated.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoREADME: rework contribution advices
Heinrich Schuchardt [Wed, 25 Jan 2023 18:14:57 +0000 (19:14 +0100)]
README: rework contribution advices

Remove description of coding standards and patch submission process.
Link to the relevant HTML documentation instead.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoREADME: correct path to sandbox.rst
Heinrich Schuchardt [Wed, 25 Jan 2023 18:14:56 +0000 (19:14 +0100)]
README: correct path to sandbox.rst

sandbox.rst was moved.

Fixes: d1db93094033 ("dm: Add documentation for host command and implementation")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agodoc: man-page for mtest
Heinrich Schuchardt [Thu, 26 Jan 2023 18:40:35 +0000 (19:40 +0100)]
doc: man-page for mtest

Provide a man-page for the mtest command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agodoc: add rst references to distro documentation in stm32mp1 board
Patrick Delaunay [Tue, 24 Jan 2023 09:16:02 +0000 (10:16 +0100)]
doc: add rst references to distro documentation in stm32mp1 board

Use internal rst reference with :doc: to have a link to distro.rst page
in the generated U-Boot documentation.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
21 months agodoc: rework doc/mkeficapsule.1
Heinrich Schuchardt [Sun, 22 Jan 2023 10:27:10 +0000 (11:27 +0100)]
doc: rework doc/mkeficapsule.1

* Indicate the location of the directory for EFI capsules.
* Improve the readability.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agodoc: update font man-page
Heinrich Schuchardt [Sat, 21 Jan 2023 16:18:14 +0000 (17:18 +0100)]
doc: update font man-page

* add return values
* move configuration to separate section to match other man-pages
* fix typo

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agospl: doc: use correct name in jump_to_image_optee() description
Ovidiu Panait [Sun, 22 Jan 2023 17:57:13 +0000 (19:57 +0200)]
spl: doc: use correct name in jump_to_image_optee() description

The actual function being documented is jump_to_image_optee(), not
jump_to_image_linux().

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
21 months agodoc: sleep man-page
Heinrich Schuchardt [Sat, 21 Jan 2023 15:24:03 +0000 (16:24 +0100)]
doc: sleep man-page

Provide a man-page for the sleep command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agodoc: example heading should be h2
Heinrich Schuchardt [Sat, 21 Jan 2023 09:25:04 +0000 (10:25 +0100)]
doc: example heading should be h2

The 'Example' heading should be on a lower level than 'bdinfo command'.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
21 months agoevent: Document dynamic event handlers
Simon Glass [Fri, 20 Jan 2023 21:46:05 +0000 (14:46 -0700)]
event: Document dynamic event handlers

Add mention of this feature in the event documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>