Commit graph

83022 commits

Author SHA1 Message Date
Oliver Graute
55be8433d5 imx: imx8qm-rom7720: switch to binman
Switch to use binman to pack images

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
2022-11-09 17:12:32 +01:00
Fabio Estevam
20cc70a84f wandboard: Select DM_SERIAL
The conversion to DM_SERIAL is mandatory, so select this
option.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2022-11-09 17:12:31 +01:00
Fabio Estevam
f827f84d3f wandboard: Pass mmc aliases
Originally, the mmc aliases node was present in imx6qdl-wandboard.dtsi.

After the sync with Linux in commit d0399a46e7 ("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:

Since commit  the aliases node has been removed
U-Boot 2022.10-00999-gcca41ed3d63f-dirty (Nov 03 2022 - 22:07:38 -0300)

CPU:   Freescale i.MX6QP rev1.0 at 792 MHz
Reset cause: POR
DRAM:  2 GiB
Core:  62 devices, 17 uclasses, devicetree: separate
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... MMC: no card present
*** Warning - No block device, using default environment

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 mmc0.

Fixes: d0399a46e7 ("imx6dl/imx6qdl: synchronise device trees with linux")
Signed-off-by: Fabio Estevam <festevam@denx.de>
2022-11-09 17:12:31 +01:00
Adam Ford
f2fe18fa38 configs: imx8mn_beacon: Enable SPL_DM_PMIC_BD71837
To properly operate the Nano with LPDDR4 at 1.6GHz, the
voltage needs to be adjusted before DDR is initialized.
Enable the PMIC in SPL to do this.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-11-08 17:35:00 +01:00
Adam Ford
899f291bd1 configs: imx8mn_beacon: Re-align memory to standard imx8mn settings
The imx8mn_beacon board does not use the same memory map as the reference
design from NXP or other imx8mn boards.  As such, memory is more limited
in SPL.

Moving SPL_BSS_START_ADDR and SPL_STACK to default locations increases
the amount of available meory for the SPL stack.  Doing this allows
the board to no longer define CONFIG_MALLOC_F_ADDR.

Since SYS_LOAD_ADDR also does not align with other boards, move it too.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-11-08 17:35:00 +01:00
Marcel Ziswiler
dbd5ca2e46 imx8mm: synchronise device tree with linux
Synchronise device tree with linux v6.1-rc3.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8m{m,n,p}-venice-*
2022-11-08 17:35:00 +01:00
Marcel Ziswiler
f067b59743 imx8mn: synchronise device tree with linux
Synchronise device tree with linux v6.1-rc3.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8m{m,n,p}-venice-*
2022-11-08 17:35:00 +01:00
Marcel Ziswiler
0b42fdca2d imx8mp: synchronise device tree with linux
Synchronise device tree with linux v6.1-rc3.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8m{m,n,p}-venice-*
2022-11-08 17:35:00 +01:00
Marcel Ziswiler
cb9b70fd2f imx8mq: synchronise device tree with linux
Synchronise device tree with linux v6.1-rc3.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-11-08 17:35:00 +01:00
Marcel Ziswiler
ed7bda5710 imx8ulp: synchronise device tree with linux
Synchronise device tree with linux v6.1-rc3.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-11-08 17:35:00 +01:00
Marcel Ziswiler
62f96866d3 imxrt1050: synchronise device tree with linux
Synchronise device tree with linux v6.1-rc3.

Note: Nowadays, the intent is for them regular device trees to just be
synchronised from them Linux kernel device trees and any and all U-Boot
specific changes need to go into the -u-boot.dtsi device tree include
files which BTW get included automatically by the U-Boot build system.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-11-08 17:35:00 +01:00
Marcel Ziswiler
59a4e7fd88 imxrt1020: migrate to build system included -u-boot.dtsi
Migrate to using automatic build system included -u-boot.dtsi device
tree include files.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2022-11-08 17:35:00 +01:00
Marcel Ziswiler
05e22e2804 vf610: synchronise device tree with linux
Synchronise device tree with linux v6.1-rc3.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-11-08 17:35:00 +01:00
Tim Harvey
4a71b9c286 configs: imx8m{m,n,p}_venice: disable autoload
disable network autoload

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-11-08 17:35:00 +01:00
Tim Harvey
765f6f1895 imx: imx8m{m,n,p}_venice: migrate to CONFIG_EXTRA_ENV_TEXT
Move the majority of the environment from the board headers to
a separate text file.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-11-08 17:35:00 +01:00
Tim Harvey
e9e03e7984 configs: imx8m{m, n}_venice: remove unneeded CONFIG_FEC_MXC_PHYADDR
The IMX8M based Venice boards all have device-tree fec nodes that
use proper dt with a phy-handle pointing to a phy with reg assigned
to the proper phy address.

There is no need to keep using the CONFIG_FEC_MXC_PHYADDR hack when
a proper dt is used - remove it.

This was previously done in commit 400eebf10d
("configs: imx8m{m, n}_venice: remove unneeded CONFIG_FEC_MXC_PHYADDR")
but got clobbered by commit 6889412ad5
("Convert CONFIG_SYS_BARGSIZE to Kconfig")

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-11-08 17:35:00 +01:00
Tim Harvey
37fa34f727 configs: imx8mn_venice.h: remove unused ifdef
remove unused ifdef left behind after commit ca3369df71
("configs: drop CONFIG_SPL_ABORT_ON_RAW_IMAGE")

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-11-08 17:35:00 +01:00
Tim Harvey
9414097ab7 configs: imx8mn_venice: fix include header protection
Fix typo in the include header protection.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-11-08 17:35:00 +01:00
Tim Harvey
630abef2f1 board: gateworks: venice: remove redundance adjustment of thermal trip points
commit 0543a1ed27 ("imx8m: fixup thermal trips") moved updating the
thermal trip points to all IMX8M so we can remove it from our board
specific dt config.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-11-08 17:35:00 +01:00
Baruch Siach
cf8ffbe36f mx6cuboxi: migrate to DM_SERIAL
Add the needed DT overrides to enable UART in SPL.

Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Tested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-11-08 17:35:00 +01:00
Marek Vasut
b177a2626e ARM: imx: Add version variable to DHSOM
Enable insertion of version variable into U-Boot environment on DHSOM,
to make it possible to check U-Boot version e.g. in U-Boot scripts.

Signed-off-by: Marek Vasut <marex@denx.de>
2022-11-08 17:35:00 +01:00
Martyn Welch
c8f3402ad2 arm: imx8mp: Initial MSC SM2S iMX8MP support
Add support for the MSC SM2S-IMX8PLUS SMARC Module. Tested in conjunction
with the MSC SM2-MB-EP1 Mini-ITX Carrier Board.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
2022-11-08 17:34:47 +01:00
Tom Rini
77b5cc2948 sandbox UCLASS_HOST
-----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmNplEARHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreab6QgAgPuNqE2Rs7lVRY97KO+MvXWE+SqpzULT
 9FbFcKRE/kVb38ty0VbwDKbaBy+BeGPZaBw3TT5D/aXgRVLur+1UNGNC51XLxQx2
 TxMSLJcXB9bxHJgEMh+uAiUp0CZg2lS82E6bsANSv/Zfl0tV7YTy9ocjynxgiO0m
 79FdkM0GhWJAAB5rqpeu0oEu9hr0GzqmmmI6WGVS9eh+ontkJO+IU3FdJTre8tbJ
 Hkdi9o31qQ1ZcCigQMoW/PuKXHvhiNqp3ex5RXJTgTDWm4tDyPbjvvWwrBlYZQUa
 ToI0b5GaP96aVtERNDShyStkZevPf4jm7M5RrukRJXdAYuUg0pXY9g==
 =dI/E
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-7nov22' of https://source.denx.de/u-boot/custodians/u-boot-dm

sandbox UCLASS_HOST
2022-11-08 09:45:10 -05:00
Michal Suchanek
168a0e45fc dm: blk: Add probe in blk_first_device/blk_next_device
The description claims that the device is probed but it isn't.

Add the device_probe() call.

Also consolidate the iteration into one function.

Fixes: 8a5cbc065d ("dm: blk: Use uclass_find_first/next_device() in blk_first/next_device()")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2022-11-07 16:24:30 -07:00
Simon Glass
499503e157 dm: Add tests for the sandbox host driver
Add some unit tests for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
2851cc94f3 dm: Add documentation for host command and implementation
Document the 'host' command and also the internals of how it is
implemented.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
952018117a dm: sandbox: Switch over to using the new host uclass
Update the sandbox implementation to use UCLASS_HOST and adjust all
the pieces to continue to work:

- Update the 'host' command to use the new API
- Replace various uses of UCLASS_ROOT with UCLASS_HOST
- Disable test_eficonfig since it doesn't work (this should have a unit
  test to allow this to be debugged)
- Update the blk test to use the new API
- Drop the old header file

Unfortunately it does not seem to be possible to split this change up
further.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
10aae1145c dm: sandbox: Create a block driver
Create a block driver for the new HOST uclass. This handles attaching and
detaching host files.

For now the uclass is not used but this will be plumbed in with future
patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
9bd1aa8af2 dm: sandbox: Create a new HOST uclass
Sandbox supports block devices which can access files on the host machine.
At present there is no uclass for this. The devices are attached to the
root devic. The block-device type is therefore set to UCLASS_ROOT which
is confusing.

Block devices should be attached to a 'media' device instead, something
which handles access to the actual media and provides the block driver
for the block device.

Create a new uclass to handle this. It supports two operations, to attach
and detach a file on the host machine.

For now this is not fully plumbed in.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
41e751091d dm: blk: Tidy up obtaining a block device from its parent
This function now finds its block-device child by looking for a child
device of the correct uclass (UCLASS_BLK). It cannot produce a device of
any other type, so drop the superfluous check.

Provide a version which does not probe the device, since that is often
needed when setting up the device's platdata.

Also fix up the function's comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
d1b4659570 test: Add a way to detect a test that breaks another
When running unit tests, some may have side effects which cause a
subsequent test to break. This can sometimes be seen when using 'ut dm'
or similar.

Add a new argument which allows a particular (failing) test to be run
immediately after a certain number of tests have run. This allows the
test causing the failure to be determined.

Update the documentation also.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
6580b61830 test: Allow showing basic information about tests
Add a 'ut info' command to show the number of suites and tests. This is
useful to get a feel for the scale of the tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
93e2673982 test: doc: Add documentation for ut command
Before adding more options, document this command.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
cdd964e380 test: Tidy up help for ut command
Sort this and put the command summary at the top instead of the bottom.

Adjust it so that the newlines are at the start of the strings, so that
there is not a blank line at the end.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
f7a68d2284 test: Drop an unused parameter to ut_run_test_live_flat()
The select_name parameter is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
5ea894ac42 dm: test: Clear the block cache after running a test
Some tests access data in block devices and so cause the cache to fill
up. This results in memory being allocated.

Some tests check the malloc usage at the beginning and then again at the
end, to ensure there is no memory leak caused by the test. The block cache
makes this difficult, since the any test may cause entries to be allocated
or even freed, if the cache becomes full.

It is simpler to clear the block cache after each test. This ensures that
it will not introduce noise in tests which check malloc usage.

Add the logic to clear the cache, using the existing blkcache_invalidate()
function. Drop the duplicate code at the same time.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
fa1e420ab0 dm: test: Drop the special function for running DM tests
This is not needed since the flag takes care of all differences. Make use
of the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
7cbb57321e test: Correct pylint warnings in fs_helper
Tidy this up so that pylint is happy. Use hex for the 1MB size and make
sure it is not a floating-point value.

Add a little main program to allow the code to be tried out, since at
present is only called from a long-running test.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
4349ba5977 test: Split out mk_fs function into a helper
This function is useful for other tests. Move it into common code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
6ca4d5b96b sandbox: Add missing comments for os_alarm()
Add the documentation to avoid a warning with 'make htmldocs'.

Fixes: 10107efedd ("sandbox: add SIGALRM-based watchdog device")

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Simon Glass
ff1f0e414a dm: sandbox: Drop non-BLK code from host implementation
This is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-07 16:24:30 -07:00
Martyn Welch
e055457759 drivers: power: pmic: Enable use of rn5t567 PMIC in SPL
The support added later in this series tweaks the PMIC voltages in the
SPL. Enable support for the rn5t567 in SPL builds to allow this to be done
cleanly.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-11-07 22:45:05 +01:00
Martyn Welch
da470ddbb3 drivers: power: pmic: Add support for rn5t568 PMIC
Add support for the rn5t568 PMIC to the rn5t567 driver.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Jaehoon Chung <j80.chung@samsung.com>
2022-11-07 22:45:05 +01:00
Martyn Welch
c92c3a4453 ARM: imx: imx8mp: Enable support for i2c5 and i2c6 on i.MX8MP
The i.MX8MP SoC contains 2 more i2c buses. Add support for the
configuration of these buses.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
2022-11-07 22:45:05 +01:00
Martyn Welch
03a7a82970 imx8m: USDHC3 base address definition for i.MX8MP
The i.MX8MP also has USDHC3, allow access to the relvant base address
definition.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
2022-11-07 22:45:05 +01:00
Adam Ford
78f34793ed imx: imx8mm-beacon: Move Environment to eMMC partition 2
The downstream U-Boot distributed by Beacon stores the environment
in the eMMC and the end of partition 2.  This allow the environment
to stay on the SOM regardless of the boot source.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-11-07 22:45:05 +01:00
Adam Ford
3a7943a90c imx: imx8mm-beacon: Enable USB booting via SDP
In order to boot over USB, the device tree needs to enable
a few extra nodes in SPL.  Since the USB driver has the
ability to detect host/device, the dr_mode can be removed
from the device tree since it needs to act as a device when
booting and OTG is the default mode.  Add USB boot support
to spl_board_boot_device and enable the corresponding config
options.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-11-07 22:45:05 +01:00
Adam Ford
b6c8a28090 imx: imx8mm_beacon: Eliminate a few extras to free up SPL space
There are a few functions which are not essential for use in
SPL, but they take up enough space to make other preferred
features not fit.  Remove the extras.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-11-07 22:45:05 +01:00
Adam Ford
a5685ea488 imx: imx8mn-beacon: Fix out of spec voltage
The DDR is configured for LPDDR4 running at 1.6GHz which requires
the voltage on the PMIC to rise a bit before initializing LPDDR4
or it will be running out of spec.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-11-07 22:45:04 +01:00
Adam Ford
4dbe07f275 regulator: bd718x7: Only bind children when PMIC_CHILDREN is enabled
If the bd718x7 is required, but PMIC_CHILDREN is disabled, this
driver throws a compile error.  Fix this by putting the function
to bind children into an if-statement checking for PMIC_CHILDREN.

Allowing PMIC_CHILDREN to be disabled in SPL saves some space and
still permits some read/write functions to access the PMIC in
early startup.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2022-11-07 22:45:04 +01:00