]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 years agommc: fsl_esdhc_imx: Replace more #ifdefs by if
Sean Anderson [Tue, 23 Nov 2021 20:03:46 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: Replace more #ifdefs by if

This builds on the previous patch by converting yet more preprocessor
macros to C ifs. This is split off so that the changes adapted from
Micheal's patch may be clearly distinguished from the ones I have
authored myself.

MMC_SUPPORTS_TUNING should really get a Kconfig conversion. And DM_GPIO
needs some -ENOSYS stubs when it isn't defined.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agommc: fsl_esdhc_imx: replace most #ifdefs by IS_ENABLED()
Sean Anderson [Tue, 23 Nov 2021 20:03:45 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: replace most #ifdefs by IS_ENABLED()

[ fsl_esdhc commit 52faec31827ec1a1837977e29c067424426634c5 ]

Make the code cleaner and drop the old-style #ifdef constructs where it is
possible.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agommc: fsl_esdhc_imx: simplify esdhc_setup_data()
Sean Anderson [Tue, 23 Nov 2021 20:03:44 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: simplify esdhc_setup_data()

[ fsl_esdhc commit 7e48a028a42c111ba38a90b86e5f57dace980fa0 ]

First, we need the waterlevel setting for PIO mode only. Secondy, both DMA
setup code is identical for both directions, except for the data pointer.
Thus, unify them.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc_imx: use dma-mapping API
Sean Anderson [Tue, 23 Nov 2021 20:03:43 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: use dma-mapping API

[ fsl_esdhc commit b1ba1460a445bcc67972a617625d0349e4f22b31 ]

Use the dma_{map,unmap}_single() calls. These will take care of the
flushing and invalidation of caches.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc_imx: simplify 64bit check for SDMA transfers
Sean Anderson [Tue, 23 Nov 2021 20:03:42 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: simplify 64bit check for SDMA transfers

[ fsl_esdhc commit da86e8cfcb03ed5c1d8e0718bc8bc8583e60ced8 ]

SDMA can only do DMA with 32 bit addresses. This is true for all
architectures (just doesn't apply to 32 bit ones). Simplify the code and
remove unnecessary CONFIG_FSL_LAYERSCAPE.

Also make the error message more concise.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc_imx: fix mmc->clock with actual clock
Sean Anderson [Tue, 23 Nov 2021 20:03:41 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: fix mmc->clock with actual clock

[ fsl_esdhc commit 30f6444d024a74ee48aa6969c1531aecd3c59deb ]

Fix mmc->clock with actual clock which is divided by the
controller, and record it with priv->clock.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc_imx: drop redundant code for non-removable feature
Sean Anderson [Tue, 23 Nov 2021 20:03:40 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: drop redundant code for non-removable feature

[ fsl_esdhc commit commit 08197cb8dff7cd097ab07a325093043c39d19bbd ]

Drop redundant code for non-removable feature. "non-removable" property
has been read in mmc_of_parse().

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[ set MMC_CAP_NONREMOVABLE in plat->cfg.host_caps ]
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agommc: fsl_esdhc_imx: clean up bus width configuration code
Sean Anderson [Tue, 23 Nov 2021 20:03:39 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: clean up bus width configuration code

[ fsl_esdhc commit 07bae1de382723b94244096953b05225572728cd ]

This patch is to clean up bus width setting code.

- For DM_MMC, remove getting "bus-width" from device tree.
  This has been done in mmc_of_parse().

- For non-DM_MMC, move bus width configuration from fsl_esdhc_init()
  to fsl_esdhc_initialize() which is non-DM_MMC specific.
  And fix up bus width configuration to support only 1-bit, 4-bit,
  or 8-bit. Keep using 8-bit if it's not set because many platforms
  use driver without providing max bus width.

- Remove bus_width member from fsl_esdhc_priv structure.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[ converted if statement to switch ]
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc_imx: fix voltage validation
Sean Anderson [Tue, 23 Nov 2021 20:03:38 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: fix voltage validation

[ fsl_esdhc commit 5b05fc0310cd933acf76ee661577c6b07a95e684 ]

Voltage validation should be done by CMD8. Current comparison between
mmc_cfg voltages and host voltage capabilities is meaningless.
So drop current comparison and let voltage validation is through CMD8.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc_imx: remove redundant DM_MMC checking
Sean Anderson [Tue, 23 Nov 2021 20:03:37 +0000 (15:03 -0500)]
mmc: fsl_esdhc_imx: remove redundant DM_MMC checking

[ fsl_esdhc commit 2913926f3b3dec282f8773e3c02377c9600d8267 ]

Remove redundant DM_MMC checking which is already in DM_MMC conditional
compile block.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc_imx: make BLK as hard requirement of DM_MMC
Sean Anderson [Tue, 11 Jan 2022 23:18:52 +0000 (08:18 +0900)]
mmc: fsl_esdhc_imx: make BLK as hard requirement of DM_MMC

U-boot prefers DM_MMC + BLK for MMC. Now eSDHC driver has already
support it, so let's force to use it.

- Drop non-BLK support for DM_MMC introduced by below patch.
   66fa035 mmc: fsl_esdhc: fix probe issue without CONFIG_BLK enabled

- Support only DM_MMC + BLK (assuming BLK is always enabled for DM_MMC).

- Use DM_MMC instead of BLK for conditional compile.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agoMerge branch 'next'
Tom Rini [Mon, 10 Jan 2022 19:01:57 +0000 (14:01 -0500)]
Merge branch 'next'

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoPrepare v2022.01
Tom Rini [Mon, 10 Jan 2022 18:46:34 +0000 (13:46 -0500)]
Prepare v2022.01

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years ago.mailmap: add Atish Patra, Anup Patel
Heinrich Schuchardt [Sun, 9 Jan 2022 17:51:27 +0000 (18:51 +0100)]
.mailmap: add Atish Patra, Anup Patel

Both have left Western Digital.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agolib/rsa: avoid -Wdiscarded-qualifiers
Heinrich Schuchardt [Sun, 9 Jan 2022 14:39:40 +0000 (15:39 +0100)]
lib/rsa: avoid -Wdiscarded-qualifiers

The return type of EVP_PKEY_get0_RSA() is const struct rsa_st *.
Our code drops the const qualifier leading to

In file included from tools/lib/rsa/rsa-sign.c:1:
./tools/../lib/rsa/rsa-sign.c: In function ‘rsa_add_verify_data’:
./tools/../lib/rsa/rsa-sign.c:631:13: warning:
assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
  631 |         rsa = EVP_PKEY_get0_RSA(pkey);
      |             ^

Add a type conversion.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoMerge tag 'u-boot-amlogic-20220107' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Sun, 9 Jan 2022 12:56:31 +0000 (07:56 -0500)]
Merge tag 'u-boot-amlogic-20220107' of https://source.denx.de/u-boot/custodians/u-boot-amlogic into next

- disable CONFIG_NET_RANDOM_ETHADDR when unnecessary on amlogic based configs
- meson64_android: add board specific env settings, in order to support VIM3/L for android
- add changes to support VIM3/L android boot by using meson64_android.h config

2 years agoMerge branch '2022-01-08-further-important-updates'
Tom Rini [Sun, 9 Jan 2022 01:26:19 +0000 (20:26 -0500)]
Merge branch '2022-01-08-further-important-updates'

- Further udoo_neo fixes, nitrogen6x mmc pinctrl fix
- dwc2_udc_otg fix
- Make imx8mq be consistent with yesterdays imx8 fixes

2 years agoimx8mq: Generate a single bootable flash.bin again
Patrick Wildt [Sat, 8 Jan 2022 15:34:17 +0000 (16:34 +0100)]
imx8mq: Generate a single bootable flash.bin again

All i.MX8MQ boards have been converted to binman, which makes it
necessary to flash both flash.bin and u-boot.itb to get a bootable
system. Prior to the conversion, only flash.bin was needed.

Such new requirement breaks existing distro mechanisms to generate the
final binary because the extra u-boot.itb is now required.

Generate a final flash.bin that can be used again as a single bootable
binary to keep the original behavior.

After this change the SPL binary is called spl.bin, which is a more
descriptive name for its purpose, and can still be used standalone (for
example, for secure boot purposes).

Also update imx8mq_evk.rst to remove the u-boot.itb copy step.

This is a cherry-pick of 028abfd9b157 ("imx8mm-evk: Generate a single
bootable flash.bin again") adjusted to apply to i.MX8MQ.

Signed-off-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agonitrogen6x: add missing pinctrl to fix mmc
Gary Bisson [Wed, 5 Jan 2022 13:17:53 +0000 (14:17 +0100)]
nitrogen6x: add missing pinctrl to fix mmc

Since commit f7ac30b042d, the pin muxing for mmc was removed from the
board file to be managed by DM_MMC which requires PINCTRL to work. It
made the change for sabrelite but nitrogen configs were forgotten.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
2 years agousb: gadget: dwc2_udc_otg: set ep's desc during enable/disable
Gary Bisson [Thu, 6 Jan 2022 15:02:08 +0000 (16:02 +0100)]
usb: gadget: dwc2_udc_otg: set ep's desc during enable/disable

Fastboot support has been broken on platforms using dwc2 controller
since the gadget gets its max packet size from it.
This patch is the equivalent of 723fd5668ff which fixed the same issue
but for the chipidea controller.

Fixes: 27c9141b111 ("usb: gadget: fastboot: use correct max packet size")
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoudoo: Select CMD_DM
Fabio Estevam [Sat, 18 Dec 2021 21:10:25 +0000 (18:10 -0300)]
udoo: Select CMD_DM

CMD_DM is useful for showing the whole DM tree.

Enable it via "imply CMD_DM".

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2 years agoudoo: Increase CONFIG_ENV_OFFSET
Fabio Estevam [Sat, 18 Dec 2021 21:10:24 +0000 (18:10 -0300)]
udoo: Increase CONFIG_ENV_OFFSET

Increase CONFIG_ENV_OFFSET to avoid the environment region to
overlap with U-Boot proper.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2 years agoudoo: Adjust the SD card device numbering
Fabio Estevam [Sat, 18 Dec 2021 21:10:23 +0000 (18:10 -0300)]
udoo: Adjust the SD card device numbering

After the conversion to DM the SD card shows up as 'mmc 2'
device.

Adjust the 'mmcdev' and the distro command 'func' accordingly.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2 years agoudoo: Call gpio_request()
Fabio Estevam [Sat, 18 Dec 2021 21:10:22 +0000 (18:10 -0300)]
udoo: Call gpio_request()

Calling gpio_request() prior to its usage is now mandatory.

This fixes the following GPIO errors:

U-Boot SPL 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300)
Trying to boot from MMC1

U-Boot 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: WDOG
Model: Udoo i.MX6 Quad Board
Board: Udoo Quad
DRAM:  1 GiB
MMC:   FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
gpio@20a0000: set_dir_flags: error: gpio GPIO2_31 not reserved
gpio@20a4000: set_dir_flags: error: gpio GPIO3_23 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_24 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_25 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_27 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_28 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_29 not reserved
gpio@20a4000: set_value: error: gpio GPIO3_23 not reserved
Net:   Could not get PHY for FEC0: addr -2
No ethernet found.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2 years agoARM: dts: imx6qdl-udoo: Properly describe the SD card detect
Fabio Estevam [Sat, 18 Dec 2021 21:10:21 +0000 (18:10 -0300)]
ARM: dts: imx6qdl-udoo: Properly describe the SD card detect

GPIO7_IO00 is used as SD card detect.

Properly describe this in the devicetree.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2 years agoudoo_spl: Initialize the eSDHC controller in SPL
Fabio Estevam [Sat, 18 Dec 2021 21:10:20 +0000 (18:10 -0300)]
udoo_spl: Initialize the eSDHC controller in SPL

Currently, imx6q udoo board fails to boot like this:

U-Boot SPL 2022.01-rc3-00061-g95ca715adad3 (Dec 18 2021 - 18:04:40 -0300)
Trying to boot from MMC1

The reason is that the eSDHC controller is not initialized in SPL.

Initialize the eSDHC controller in SPL via C code as DM is not
used in SPL.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2 years agoMerge branch '2022-01-07-imx8-and-buildman-updates'
Tom Rini [Sat, 8 Jan 2022 00:11:58 +0000 (19:11 -0500)]
Merge branch '2022-01-07-imx8-and-buildman-updates'

- A large number of updates for i.MX8 platforms.  We update buildman /
  binman to be able to fake binaries if needed, for CI, and tell the user
  the binary won't work.  Update platforms to build again with these
  changes.

2 years agoimx: imx8mm: imx8mm-kontron-n801x-s: Fix binman error
Adam Ford [Fri, 7 Jan 2022 21:16:12 +0000 (15:16 -0600)]
imx: imx8mm: imx8mm-kontron-n801x-s: Fix binman error

The binman node is part of the imx8mm-u-boot.dtsi file which
is duplicated in imx8mm-kontron-n801x-s-u-boot.dtsi and causes
a build error.  Remove the duplicate.

Fixes: 3cbb31f0e848 ("arm64: dts: imx8mm: use common binman configuration")
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoboard: phytec: imx8mm-phycore: Remove duplicate binman node
Adam Ford [Fri, 7 Jan 2022 21:16:11 +0000 (15:16 -0600)]
board: phytec: imx8mm-phycore: Remove duplicate binman node

The binman node is part of the imx8mm-u-boot.dtsi file which
is duplicated in phycore-imx8mm-u-boot.dtsi and causes a build
error.  Remove the duplicate.

Fixes: 3cbb31f0e848 ("arm64: dts: imx8mm: use common binman configuration")
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoimx8mm_venice: switch to use binman to pack images
Tim Harvey [Fri, 7 Jan 2022 20:41:35 +0000 (12:41 -0800)]
imx8mm_venice: switch to use binman to pack images

Use binman to pack images.

Note that imx8mm_venice supports several boards via multiple DTB's thus
in the fit node we must use:
- fit,fdt-list = "of-list"
- fdt-SEQ
- config-SEQ

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoarm64: dts: imx8mm-u-boot.dtsi: improve odd blob-ext naming
Marcel Ziswiler [Fri, 22 Oct 2021 23:15:16 +0000 (01:15 +0200)]
arm64: dts: imx8mm-u-boot.dtsi: improve odd blob-ext naming

Rather than using odd implicit blob-ext naming, explicitly specify the
type to be of blob-ext and therefore also simplify the node naming.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoarm64: dts: imx8mm-u-boot.dtsi: explicitly add spl filename
Marcel Ziswiler [Fri, 22 Oct 2021 23:15:15 +0000 (01:15 +0200)]
arm64: dts: imx8mm-u-boot.dtsi: explicitly add spl filename

Explicitly add SPL aka u-boot-spl.bin filename.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoarm64: dts: imx8mm-u-boot.dtsi: alphabetically re-order properties
Marcel Ziswiler [Fri, 22 Oct 2021 23:15:14 +0000 (01:15 +0200)]
arm64: dts: imx8mm-u-boot.dtsi: alphabetically re-order properties

Alphabetically re-order properties.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoarm64: dts: imx8mm: use common binman configuration
Marcel Ziswiler [Fri, 22 Oct 2021 23:15:13 +0000 (01:15 +0200)]
arm64: dts: imx8mm: use common binman configuration

With the move to using binman to generate SPL aka u-boot-spl-ddr.bin and
U-Boot proper aka u-boot.itb every board now covers such configuration
in its own U-Boot specific device tree include. Move the comon part of
that configuration to the common imx8mm-u-boot.dtsi include file.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoarm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: use common imx8mm-u-boot.dtsi
Marcel Ziswiler [Fri, 22 Oct 2021 23:15:12 +0000 (01:15 +0200)]
arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: use common imx8mm-u-boot.dtsi

Use common imx8mm-u-boot.dtsi.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoarm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: alphabetically re-order
Marcel Ziswiler [Fri, 22 Oct 2021 23:15:11 +0000 (01:15 +0200)]
arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: alphabetically re-order

Alphabetically re-order nodes and properties.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx8mm-cl-iot-gate: fix imximage intermediate binary naming
Marcel Ziswiler [Fri, 22 Oct 2021 23:15:10 +0000 (01:15 +0200)]
imx8mm-cl-iot-gate: fix imximage intermediate binary naming

This fixes the following build time issue:

...
  BINMAN  all
binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n
 spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000
 ./mkimage-out.spl.mkimage': mkimage.flash.mkimage: Can't open: No such
 file or directory

make: *** [Makefile:1094: all] Error 1

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agodoc: imx8mq_evk: update doc after using binman
Peng Fan [Fri, 22 Oct 2021 02:42:20 +0000 (10:42 +0800)]
doc: imx8mq_evk: update doc after using binman

Update doc after using binman to pack images

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mq use common imximage.cfg
Peng Fan [Fri, 22 Oct 2021 02:42:19 +0000 (10:42 +0800)]
imx: imx8mq use common imximage.cfg

After all these board switch to binman, we could use common imximage.cfg

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Patrick Wildt <patrick@blueri.se>
2 years agoimx: pico-imx8mq: switch to use binman
Peng Fan [Fri, 22 Oct 2021 02:42:18 +0000 (10:42 +0800)]
imx: pico-imx8mq: switch to use binman

Switch to use binman to pack images

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Patrick Wildt <patrick@blueri.se>
2 years agoimx: imx8mq_phanbell: switch to binman
Peng Fan [Fri, 22 Oct 2021 02:42:17 +0000 (10:42 +0800)]
imx: imx8mq_phanbell: switch to binman

Switch to binman to pack images

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Patrick Wildt <patrick@blueri.se>
2 years agoimx: imx8mq_evk: switch to binman
Peng Fan [Fri, 22 Oct 2021 02:42:16 +0000 (10:42 +0800)]
imx: imx8mq_evk: switch to binman

Switch to use binman to pack images

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx8mn_beacon_2g: Switch to binman
Adam Ford [Fri, 7 Jan 2022 20:39:04 +0000 (14:39 -0600)]
imx8mn_beacon_2g: Switch to binman

The standard 1GB Nano was converted to binman, but the 2G version
was neglected.  Convert it to binman as well.

Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoimx8mn_beacon: Fix booting hang and switch to binman
Adam Ford [Fri, 10 Sep 2021 20:19:22 +0000 (15:19 -0500)]
imx8mn_beacon: Fix booting hang and switch to binman

Somewhere along the line, the board stopped being able to boot.
Rather than just fixing the issue, let's fix the issue and migrate
to binman to eliminate a warning when using custom imx tools for
generating the binary.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoimx8mm_beacon: Switch to binman for generating image
Adam Ford [Fri, 22 Oct 2021 21:43:40 +0000 (23:43 +0200)]
imx8mm_beacon: Switch to binman for generating image

To eliminate a warning when using custom imx tools for generating
a binary, use binman to generate flash.bin.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: add support for creating dummy files for external blobs
Heiko Thiery [Thu, 6 Jan 2022 10:49:41 +0000 (11:49 +0100)]
binman: add support for creating dummy files for external blobs

While converting to binman for an imx8mq board, it has been found that
building in the u-boot CI fails. This is because an imx8mq requires an
external binary (signed_hdmi_imx8m.bin). If this file cannot be found
mkimage fails.
To be able to build this board in the u-boot CI a binman option
(--fake-ext-blobs) is introduced that can be switched on via the u-boot
makefile option BINMAN_FAKE_EXT_BLOBS. With that the needed dummy files are
created.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge branch '2022-01-04-platform-updates' into next
Tom Rini [Fri, 7 Jan 2022 17:00:26 +0000 (12:00 -0500)]
Merge branch '2022-01-04-platform-updates' into next

- Assorted updates for vexpress64, apple m1, iot2050 and stemmy
  platforms.

2 years agoMerge branch '2022-01-06-assorted-important-fixes'
Tom Rini [Fri, 7 Jan 2022 14:30:59 +0000 (09:30 -0500)]
Merge branch '2022-01-06-assorted-important-fixes'

- Revert a clk change, to enable some platforms to work again
- Updates to the udoo NEO family of boards to work correctly
- Fix SiFive Unleashes/Unmatched boards booting
- Update rockchip maintainer entry

2 years agoRevert "clk: Detect failure to set defaults"
Marek Vasut [Sat, 1 Jan 2022 18:51:39 +0000 (19:51 +0100)]
Revert "clk: Detect failure to set defaults"

This reverts commit 92f1e9a4b31c0bf0f4f61ab823a6a88657323646.
The aforementioned patch causes massive breakage on all platforms which
have 'assigned-clock' DT property in their DT which references any clock
that are not supported by the platform clock driver. That can easily
happen either in SPL, or because the clock driver is reduced. Currently
it seems all iMX8M are affected and fail to boot altogether.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Peng Fan <peng.fan@oss.nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoudoo: neo: Do not print the Model information
Fabio Estevam [Mon, 3 Jan 2022 15:15:12 +0000 (12:15 -0300)]
udoo: neo: Do not print the Model information

By default the Model information from DT is printed:

CPU:   Freescale i.MX6SX rev1.2 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 63C
Reset cause: POR
Model: UDOO Neo Basic
Board: UDOO Neo FULL
I2C:   ready

As the udoo basic DT is used, such output may be confusing.

Improve it by only printing the Board model instead, which is
read from the board identification GPIOs.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Tommaso Merciai <tomm.merciai@gmail.com>
Tested-by: Tommaso Merciai <tomm.merciai@gmail.com>
2 years agoudoo: neo: Fix the board model printing
Fabio Estevam [Mon, 3 Jan 2022 15:15:11 +0000 (12:15 -0300)]
udoo: neo: Fix the board model printing

Currently, the board model is not printed correctly:

Board: UDOO Neo UNDEFINED

Read the model type in SPL and store it the internal OCRAM, so that
U-Boot proper can retrieve it correctly.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2 years agoudoo_neo: Enable support for USB and storage
Peter Robinson [Tue, 21 Dec 2021 12:32:49 +0000 (12:32 +0000)]
udoo_neo: Enable support for USB and storage

Enable support for USB and USB storage on the UDOO Neo.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoudoo_neo: Fix ethernet
Peter Robinson [Tue, 21 Dec 2021 12:32:48 +0000 (12:32 +0000)]
udoo_neo: Fix ethernet

The ethernet has a RMII not RGMII, also needs DM_MDIO and finally
initialise it later in the process as it's not needed that early on
and not everything is ready so it locks up the device.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoudoo_neo: Fixes for booting from the mSD card
Peter Robinson [Tue, 21 Dec 2021 12:32:47 +0000 (12:32 +0000)]
udoo_neo: Fixes for booting from the mSD card

This fixes booting from the mSD card from both SPL and when
using it for the OS booting. It also cleans up a few mmc
booting bits that are no longer needed.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoudoo_neo: Call gpio_request()
Peter Robinson [Tue, 21 Dec 2021 12:32:46 +0000 (12:32 +0000)]
udoo_neo: Call gpio_request()

Calling gpio_request() prior to its usage is now mandatory.

This fixes the following GPIO errors:
gpio@20a8000: set_dir_flags: error: gpio GPIO4_16 not reserved
gpio@20a8000: set_dir_flags: error: gpio GPIO4_13 not reserved
gpio@20a8000: set_dir_flags: error: gpio GPIO4_0 not reserved
gpio@20a8000: get_value: error: gpio GPIO4_13 not reserved
gpio@20a8000: get_value: error: gpio GPIO4_0 not reserved
gpio@20a0000: set_dir_flags: error: gpio GPIO2_1 not reserved
gpio@20a0000: set_value: error: gpio GPIO2_1 not reserved

Fixes: 191840ae99 ("ARM: imx: udoo_neo: Enable OF_CONTROL and DM gpio/pin control")
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoriscv: sifive: Fix OF_BOARD boot failure
Bin Meng [Wed, 5 Jan 2022 01:07:57 +0000 (09:07 +0800)]
riscv: sifive: Fix OF_BOARD boot failure

When using QEMU to have a quick test of booting U-Boot S-mode payload
directly without the needs of preparing the SPI flash or SD card images
for SiFive Unleashed board, as per the instructions [1], it currently
does not boot any more.

This was caused by the OF_PRIOR_STAGE removal, as gd->fdt_blob no longer
points to a valid DTB. OF_BOARD is supposed to replace OF_PRIOR_STAGE,
hence we need to add the OF_BOARD logic in board_fdt_blob_setup().

[1] https://qemu.readthedocs.io/en/latest/system/riscv/sifive_u.html#running-u-boot

Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards")
Fixes: d6f8ab30a2af ("treewide: Remove OF_PRIOR_STAGE")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agorockchip: puma/lion: update MAINTAINERS file
Quentin Schulz [Mon, 3 Jan 2022 12:04:18 +0000 (13:04 +0100)]
rockchip: puma/lion: update MAINTAINERS file

Philipp does not work at Theobroma Systems anymore so let's swap
Philipp's address with mine.

Cc: Philipp Tomsich <philipp.tomsich@vrull.eu>
Cc: Quentin Schulz <foss+u-boot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
2 years agoconfigs: khadas-vim3{l}_android_ab: enable A/B support
Mattijs Korpershoek [Mon, 22 Nov 2021 15:22:07 +0000 (16:22 +0100)]
configs: khadas-vim3{l}_android_ab: enable A/B support

meson64_android.h also relies on CMD_AB_SELECT so enable that as well.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20211122152207.219023-5-mkorpershoek@baylibre.com
2 years agoconfigs: prepare khadas-vim3{l}_ab_android for AOSP support
Mattijs Korpershoek [Mon, 22 Nov 2021 15:22:06 +0000 (16:22 +0100)]
configs: prepare khadas-vim3{l}_ab_android for AOSP support

In AOSP, both VIM3 and VIM3L have 2 bootloader flavors,
depending on A/B enablement.

For example, for vim3l, the naming is:
- u-boot_kvim3l_noab.bin : legacy support
- u-boot_kvim3l_ab.bin   : A/B support

Prepare a defconfig to support u-boot_kvim3_ab.bin and
u-boot_kvim3l_ab.bin.

This is identical to khadas-vim3{l}_ab_android but will be updated in
the next commit.

Also update partitioning tables for A/B support.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20211122152207.219023-4-mkorpershoek@baylibre.com
2 years agoconfigs: add khadas-vim3{l}_android for AOSP support
Mattijs Korpershoek [Mon, 22 Nov 2021 15:22:05 +0000 (16:22 +0100)]
configs: add khadas-vim3{l}_android for AOSP support

The Khadas VIM3 and VIM3L board are well supported in AOSP[1].
However, there is no mainline U-Boot support for it.
The U-Boot used in AOSP is based on a vendor tree [2]

Add all the necessary bits to flash and boot Android for both Khadas
VIM3 and VIM3L boards.

For Android instructions, refer to [1]

[1] https://source.android.com/setup/build/devices#vim3_and_vim3l_boards
[2] https://gitlab.com/baylibre/amlogic/atv/u-boot

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20211122152207.219023-3-mkorpershoek@baylibre.com
2 years agoconfigs: meson64_android: add board specific env settings
Mattijs Korpershoek [Mon, 22 Nov 2021 15:22:04 +0000 (16:22 +0100)]
configs: meson64_android: add board specific env settings

This allows us to define extra board variables, such as "board" and
"board_name".

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20211122152207.219023-2-mkorpershoek@baylibre.com
2 years agoconfigs: amlogic: Disable CONFIG_NET_RANDOM_ETHADDR when unnecessary
Neil Armstrong [Mon, 22 Nov 2021 11:07:10 +0000 (12:07 +0100)]
configs: amlogic: Disable CONFIG_NET_RANDOM_ETHADDR when unnecessary

On Meson GXL, GXM, AXG, G12A, G12B & SM1 SoCs, we can generate an unique
MAC address if none valid found in the eFuses storage.

Only the GXBB based boards doesn't have a fallback way to generate an
unique MAC address, so we rely on CONFIG_NET_RANDOM_ETHADDR to have
a valid one.

An exception is the Radxa Zero board who doesn't have Ethernet on board
so depends on an (or multiple) eventual USB adapters, so leaving the
CONFIG_NET_RANDOM_ETHADDR configs seems safer.

Suggested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Vyacheslav Bocharov <adeep@lexina.in>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20211122110710.1038893-1-narmstrong@baylibre.com
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Wed, 5 Jan 2022 18:08:45 +0000 (13:08 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- kwbimage: Fix checksum calculation for v1 images (Pierre)

2 years agotools: kwbimage: Fix checksum calculation for v1 images
Pierre Bourdon [Sat, 25 Dec 2021 19:50:19 +0000 (20:50 +0100)]
tools: kwbimage: Fix checksum calculation for v1 images

Recent changes caused fields in the image main header to be modified
after the header checksum had already been computed. Move the checksum
computation to once again be the last operation performed on the header.

Fixes: 2b0980c24027 ("tools: kwbimage: Fill the real header size into the main header")
Signed-off-by: Pierre Bourdon <delroth@gmail.com>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoconfigs: iot2050: Drop unused CONFIG_OF_LIST from defconfig
Jan Kiszka [Mon, 15 Nov 2021 17:28:54 +0000 (18:28 +0100)]
configs: iot2050: Drop unused CONFIG_OF_LIST from defconfig

DTBs are explicitly listed in the image source file for this board, and
this list already became outdated.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2 years agoarm: apple: Remove CONFIG_SYS_SDRAM_BASE
Mark Kettenis [Sun, 14 Nov 2021 12:09:54 +0000 (13:09 +0100)]
arm: apple: Remove CONFIG_SYS_SDRAM_BASE

The memory layout is taken from the device tree passed to us by
m1n1, so there is no need to define this.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2 years agovexpress64: Enable VIRTIO_NET network driver
Peter Hoyes [Thu, 11 Nov 2021 09:26:03 +0000 (09:26 +0000)]
vexpress64: Enable VIRTIO_NET network driver

The SMSC driver is using the old driver model.

Init the virtio system in vexpress64.c so that the network device is
discovered.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2 years agovexpress64: Enable OF_CONTROL and OF_BOARD for VExpress64
Peter Hoyes [Thu, 11 Nov 2021 09:26:02 +0000 (09:26 +0000)]
vexpress64: Enable OF_CONTROL and OF_BOARD for VExpress64

Capture x0 in lowlevel_init.S as potential fdt address. Modify
board_fdt_blob_setup to use fdt address from either vexpress_aemv8.h
or lowlevel_init.S.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2 years agovexpress64: Clean up BASE_FVP boot configuration
Peter Hoyes [Thu, 11 Nov 2021 09:26:01 +0000 (09:26 +0000)]
vexpress64: Clean up BASE_FVP boot configuration

Move env var address values to #defines so they can be reused elsewhere.

Rename env var names to those recommended in the README and modify
addresses to allow more space for the kernel.

Fix issue where fdt is called with invalid arguments when booting
without a ramdisk.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2 years agovexpress64: Refactor header file to make it easier to add new FVPs
Peter Hoyes [Thu, 11 Nov 2021 09:26:00 +0000 (09:26 +0000)]
vexpress64: Refactor header file to make it easier to add new FVPs

Rename from vexpress_aemv8a.h -> vepxress_aemv8.h as new FVPs may not be
v8-A. No change in behavior.

This is towards future work to enable support for the FVP_BaseR.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2 years agodoc: Add documentation for the Arm VExpress64 board configs
Peter Hoyes [Thu, 11 Nov 2021 09:25:59 +0000 (09:25 +0000)]
doc: Add documentation for the Arm VExpress64 board configs

Create a new documentation section for Arm Ltd boards with a sub-page
for the VExpress64 boards (FVP-A and Juno).

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2 years agoboard: stemmy: Increase boot image to 64 MB
Linus Walleij [Sat, 20 Nov 2021 22:55:42 +0000 (23:55 +0100)]
board: stemmy: Increase boot image to 64 MB

When using a recent kernel with a bunch of compiled-in
stuff the kernel image easily becomes bigger than 8 MB
yielding this error:

  Loading Kernel Image
  Image too large: increase CONFIG_SYS_BOOTM_LEN
  Must RESET board to recover

Fix this by bumping to SZ_64MB.

Cc: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
2 years agoMerge tag 'efi-next' of https://source.denx.de/u-boot/custodians/u-boot-efi into...
Tom Rini [Fri, 31 Dec 2021 12:28:36 +0000 (07:28 -0500)]
Merge tag 'efi-next' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request of efi-next

Documentation:

* Add Sunxi board description

UEFI:

* Improvements to U-Boot running on top of UEFI

2 years agox86: efi: Don't set up global_data again with EFI
Simon Glass [Wed, 29 Dec 2021 18:57:54 +0000 (11:57 -0700)]
x86: efi: Don't set up global_data again with EFI

Since EFI does not relocate and uses the same global_data pointer
throughout the board-init process, drop this unnecessary setup, to avoid
a hang.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agox86: efi: Show the system-table revision
Simon Glass [Wed, 29 Dec 2021 18:57:53 +0000 (11:57 -0700)]
x86: efi: Show the system-table revision

Show the revision of this table as it can be important.

Also update the 'efi table' entry to show the actual address of the EFI
table rather than our table that points to it. This saves a step and the
intermediate table has nothing else in it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Allow easy selection of serial-only operation
Simon Glass [Wed, 29 Dec 2021 18:57:50 +0000 (11:57 -0700)]
efi: Allow easy selection of serial-only operation

Add info about how to select vidconsole or serial.

Also set up a demo boot command.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoefi: Show when allocated pages are used
Simon Glass [Wed, 29 Dec 2021 18:57:49 +0000 (11:57 -0700)]
efi: Show when allocated pages are used

Add a message here so that both paths of memory allocation are reported.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Mention that efi_info_get() is only used in the stub
Simon Glass [Wed, 29 Dec 2021 18:57:48 +0000 (11:57 -0700)]
efi: Mention that efi_info_get() is only used in the stub

This provides access to EFI tables after U-Boot has exited boot services.
It is not needed in the app since boot services remain alive and we can
just call them whenever needed.

Add a comment to explain this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Check for failure when initing the app
Simon Glass [Wed, 29 Dec 2021 18:57:47 +0000 (11:57 -0700)]
efi: Check for failure when initing the app

The stub checks for failure with efi_init(). Add this for the app as well.
It is unlikely that anything can be done, but we may as well stop.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Share struct efi_priv between the app and stub code
Simon Glass [Wed, 29 Dec 2021 18:57:45 +0000 (11:57 -0700)]
efi: Share struct efi_priv between the app and stub code

At present each of these has its own static variable and helper functions.
Move them into a shared file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Add a few comments to the stub
Simon Glass [Wed, 29 Dec 2021 18:57:44 +0000 (11:57 -0700)]
efi: Add a few comments to the stub

Comment some functions that need more information.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Fix ll_boot_init() operation with the app
Simon Glass [Wed, 29 Dec 2021 18:57:43 +0000 (11:57 -0700)]
efi: Fix ll_boot_init() operation with the app

This should return false when the EFI app is running, since UEFI has done
the required low-level init. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Add comments to struct efi_priv
Simon Glass [Wed, 29 Dec 2021 18:57:42 +0000 (11:57 -0700)]
efi: Add comments to struct efi_priv

This structure is uncommented. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoefi: Drop device_path from struct efi_priv
Simon Glass [Wed, 29 Dec 2021 18:57:41 +0000 (11:57 -0700)]
efi: Drop device_path from struct efi_priv

This is not used anywhere drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agox86: efi: Add room for the binman definition in the dtb
Simon Glass [Wed, 29 Dec 2021 18:57:40 +0000 (11:57 -0700)]
x86: efi: Add room for the binman definition in the dtb

At present only 4KB of spare space is left in the DTB when building the
EFI app. Increase this to 32KB so there is plenty of space to insert the
binman definition. This cannot be expanded later (as with OF_SEPARATE)
because the ELF image has already been built.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviwed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agox86: Don't process the kernel command line unless enabled
Simon Glass [Wed, 29 Dec 2021 18:57:39 +0000 (11:57 -0700)]
x86: Don't process the kernel command line unless enabled

If the 'bootm' command is not enabled then this code is not available and
this causes a link error. Fix it.

Note that for the EFI app, there is no indication of missing code. It just
hangs!

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agox86: Allow booting a kernel from the EFI app
Simon Glass [Wed, 29 Dec 2021 18:57:38 +0000 (11:57 -0700)]
x86: Allow booting a kernel from the EFI app

At present this is disabled, but it should work so long as the kernel does
not need EFI services. Enable it and add a note about remaining work.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoefi: serial: Support arrow keys
Simon Glass [Wed, 29 Dec 2021 18:57:37 +0000 (11:57 -0700)]
efi: serial: Support arrow keys

At present only the backspace key is supported in U-Boot, when running as
an EFI app. Add support for arrows, home and end as well, to make the CLI
more friendly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Locate all block devices in the app
Simon Glass [Wed, 29 Dec 2021 18:57:36 +0000 (11:57 -0700)]
efi: Locate all block devices in the app

When starting the app, locate all block devices and make them available
to U-Boot. This allows listing partitions and accessing files in
filesystems.

EFI also has the concept of 'disks', meaning boot media. For now, this
is not obviously useful in U-Boot, but add code to at least locate these.
This can be expanded later as needed.

We cannot use printf() in the early stub or app since it is not compiled
in

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Make unicode printf available to the app
Simon Glass [Wed, 29 Dec 2021 18:57:35 +0000 (11:57 -0700)]
efi: Make unicode printf available to the app

This is needed to show unicode strings. Enable this code in the app.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agosunxi: add board documentation
Andre Przywara [Mon, 27 Dec 2021 15:07:36 +0000 (15:07 +0000)]
sunxi: add board documentation

Add some long overdue instructions for building and installing U-Boot on
Allwinner SoC based boards.
This describes the building process, including TF-A and crust, plus
installation to SD card, eMMC and SPI flash, both from Linux and U-Boot
itself. Also describe FEL booting.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: Don't limit the StMM buffer size explicitly
Ilias Apalodimas [Fri, 24 Dec 2021 08:08:41 +0000 (10:08 +0200)]
efi_loader: Don't limit the StMM buffer size explicitly

Currently we allow and explicitly check a single shared page with
StandAloneMM.  This is dictated by OP-TEE which runs the application.
However there's no way for us dynamically discover the number of pages we
are allowed to use.  Since writing big EFI signature list variable
requires more than a page, OP-TEE has bumped the number of shared pages to
four.

Let's remove our explicit check and allow the request to reach OP-TEE even
if it's bigger than what it supports.  There's no need to sanitize the
number of pages internally.  OP-TEE will fail if we try to write more
than it's allowed. The error will just trigger later on,  during the
StMM access.

While at it add an error message to help users figure out what failed.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Signed-off-by: Ilias Apalodimas <apalos@gmail.com>
2 years agoefi: fix typo in description of struct efi_entry_hdr
Heinrich Schuchardt [Tue, 21 Dec 2021 08:09:48 +0000 (09:09 +0100)]
efi: fix typo in description of struct efi_entry_hdr

Add missing colon.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoMerge tag 'video-next-20211228' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Tue, 28 Dec 2021 16:28:31 +0000 (11:28 -0500)]
Merge tag 'video-next-20211228' of https://source.denx.de/u-boot/custodians/u-boot-video into next

- various fixes to the sandbox display support
- support for showing a logo without splash screen config
- support for BMP drawing to depths other than 16bpp
- tests for the different types of supported BMP images
- support showing a logo when running coreboot via qemu

2 years agoMerge tag 'video-20211228' of https://source.denx.de/u-boot/custodians/u-boot-video
Tom Rini [Tue, 28 Dec 2021 16:19:26 +0000 (11:19 -0500)]
Merge tag 'video-20211228' of https://source.denx.de/u-boot/custodians/u-boot-video

- mxsfb axi/disp_axi clock enable fix

2 years agoMerge tag 'efi-2022-01-rc4-4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Tue, 28 Dec 2021 12:59:43 +0000 (07:59 -0500)]
Merge tag 'efi-2022-01-rc4-4' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2022-01-rc4-4

UEFI:

* allow for more than 16 KiB UEFI variable size when using StMM

Others:

* make watchdog sysreset compatible with separate poweroff driver
* avoid OpenSSL deprecation warnings

2 years agoMerge branch '2021-12-27-CONFIG-migrations' into next
Tom Rini [Mon, 27 Dec 2021 22:20:21 +0000 (17:20 -0500)]
Merge branch '2021-12-27-CONFIG-migrations' into next

- Merge a large number of CONFIG migration patches.  Most of these are
  taking existing migrations and re-running them.  A few of these needed
  additional minor conversions done first, so that more complex
  dependencies could be expressed.  In the end we now have CI jobs to
  ensure that no migrated symbols are used in board config header files.

2 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 27 Dec 2021 13:53:48 +0000 (13:53 +0000)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_JFFS2_DEV et al to Kconfig
Tom Rini [Fri, 17 Dec 2021 23:08:47 +0000 (18:08 -0500)]
Convert CONFIG_JFFS2_DEV et al to Kconfig

This converts the following to Kconfig:
   CONFIG_JFFS2_DEV
   CONFIG_JFFS2_LZO
   CONFIG_JFFS2_NAND
   CONFIG_JFFS2_PART_OFFSET
   CONFIG_JFFS2_PART_SIZE

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_KIRKWOOD_GPIO to Kconfig
Tom Rini [Fri, 17 Dec 2021 23:08:46 +0000 (18:08 -0500)]
Convert CONFIG_KIRKWOOD_GPIO to Kconfig

This converts the following to Kconfig:
   CONFIG_KIRKWOOD_GPIO

Signed-off-by: Tom Rini <trini@konsulko.com>