]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
11 months agostm32mp: stm32prog: add support of stm32mp25
Patrick Delaunay [Mon, 15 Jan 2024 14:05:52 +0000 (15:05 +0100)]
stm32mp: stm32prog: add support of stm32mp25

Change OTP number to 364 for STM32MP25 as it is done in bsec driver.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
11 months agosmt32mp: add setup_mac_address for stm32mp25
Patrick Delaunay [Mon, 15 Jan 2024 14:05:51 +0000 (15:05 +0100)]
smt32mp: add setup_mac_address for stm32mp25

Add a function setup_mac_address() to update the MAC address from the
default location in OTP for stm32mp2 platform.

The max number of OTP for MAC address is increased to 8 for STM32MP25,
defined with get_eth_nb() and checked in setup_mac_address.

The MAC address FF:FF:FF:FF:FF:FF, the broadcast ethaddr, is a invalid
value used for unused MAC address slot in OTP, for example for board
with STM32MP25x part number allows up to 5 ethernet ports but it is not
supported by the hardware, without switch; the associated variable
"enetaddr%d" is not created.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
11 months agostm32mp: add setup_serial_number for stm32mp25
Patrice Chotard [Mon, 15 Jan 2024 14:05:50 +0000 (15:05 +0100)]
stm32mp: add setup_serial_number for stm32mp25

Add support of serial number for stm32mp25, gets from OTP with BSEC driver.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
11 months agostm32mp: add soc.c file
Patrick Delaunay [Mon, 15 Jan 2024 14:05:49 +0000 (15:05 +0100)]
stm32mp: add soc.c file

Add a new file soc.c for common functions between stm32mp1 and stm32mp2
family and move print_cpuinfo() in this new file.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
11 months agoconfigs: stm32mp25: add support of fuse command
Patrick Delaunay [Mon, 15 Jan 2024 14:05:48 +0000 (15:05 +0100)]
configs: stm32mp25: add support of fuse command

Add support of the command fuse with CONFIG_CMD_FUSE to allow access
on OTP with command line.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
11 months agostm32mp: bsec: add support of stm32mp25
Patrick Delaunay [Mon, 15 Jan 2024 14:05:47 +0000 (15:05 +0100)]
stm32mp: bsec: add support of stm32mp25

Add support of BSEC for STM32MP25x family to access OTP.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
11 months agostm32mp: bsec: add driver data
Patrick Delaunay [Mon, 15 Jan 2024 14:05:46 +0000 (15:05 +0100)]
stm32mp: bsec: add driver data

Add driver data in  BSEC driver to test presence of OP-TEE TA,
mandatory for STM32MP13 family and prepare the support of new device
with more OTP than 95.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
11 months agoarm: stm32mp: add Rev.B support for STM32MP25
Yann Gautier [Mon, 15 Jan 2024 14:05:45 +0000 (15:05 +0100)]
arm: stm32mp: add Rev.B support for STM32MP25

Add chip revision B support for STM32MP25, for displaying it in trace.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
11 months agoarm64: dts: st: add bsec support to stm32mp25
Patrick Delaunay [Mon, 15 Jan 2024 14:05:44 +0000 (15:05 +0100)]
arm64: dts: st: add bsec support to stm32mp25

Add BSEC support to STM32MP25 SoC family with SoC information:
- RPN = Device part number (BSEC_OTP_DATA9)
- PKG = package data register (Bits 2:0 of BSEC_OTP_DATA122)

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
11 months agoARM: dts: stm32: Fix reset for usart1 in scmi configuration
Patrice Chotard [Thu, 4 Jan 2024 12:37:50 +0000 (13:37 +0100)]
ARM: dts: stm32: Fix reset for usart1 in scmi configuration

In SCMI configuration, usart1 is secure, so all its resources are secured
(clock and reset) and can't be set/unset by non-secure world but by OP-TEE.

Fixes: 6cccc8d396bf ("ARM: dts: stm32: add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
11 months agoRevert "test: hush: dollar: fix bugous behavior"
Tom Rini [Thu, 18 Jan 2024 16:38:25 +0000 (11:38 -0500)]
Revert "test: hush: dollar: fix bugous behavior"

What we were doing here amounts to simplifying the code for the new hush
parser, and the workarounds are required when using the old one. As we
have returned to having the old parser be default for now, we must undo
this so that the test passes again.

This reverts commit 6c2f753f4ad3dcee60190949d1286736a6d51d17.

Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agoRevert "cmd: Set modern hush as default shell"
Tom Rini [Thu, 18 Jan 2024 14:07:25 +0000 (09:07 -0500)]
Revert "cmd: Set modern hush as default shell"

Currently at least two SoC families are able to cause a crash using
their regular boot scripts, with the new parser.  For now, revert to the
old parser as default.

This reverts commit 78912cfde281146d28254b230ecaa9b06722e6ff.

Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agoRevert "test/py: net: Add dhcp abort test"
Tom Rini [Thu, 18 Jan 2024 14:05:38 +0000 (09:05 -0500)]
Revert "test/py: net: Add dhcp abort test"

In practice, as this test defaults to enabled rather than disabled, too
many platforms now fail.

This reverts commit d8364738623ff47dd2321dd68da310abb58fe861.

Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agoCI: Move to latest Ubuntu "Jammy" tag
Tom Rini [Wed, 17 Jan 2024 20:04:50 +0000 (15:04 -0500)]
CI: Move to latest Ubuntu "Jammy" tag

Move to the latest "Jammy" tag from Ubuntu.

Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agotest: test_trace.py: Have trace-cmd report always use -l
Tom Rini [Wed, 17 Jan 2024 22:12:36 +0000 (17:12 -0500)]
test: test_trace.py: Have trace-cmd report always use -l

With newer versions of trace-cmd the report subcommand will have
different output from before if we do or do not pass -l. However, with
the -l flag passed our put is consistent here. This updates our regular
expressions and comments for this as well now.

Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agotest/py/requirements.txt: Update packaging requirement
Tom Rini [Wed, 17 Jan 2024 20:06:54 +0000 (15:06 -0500)]
test/py/requirements.txt: Update packaging requirement

Update packaging to be version 23.2 to match our Sphinx requirements.
This will let us build a pip cache out of both of our requirements.txt
files.

Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agodocker: build QEMU v8.2.0
Heinrich Schuchardt [Fri, 12 Jan 2024 02:17:57 +0000 (03:17 +0100)]
docker: build QEMU v8.2.0

ACPI support for RISC-V requires a recent QEMU.

Upgrade the used QEMU to v8.2.0.

QEMU commit 0c7ffc977195 ("hw/net: cadence_gem: Fix MDIO_OP_xxx values")
is needed to fix the Ethernet PHY driver used by the emulated SiFive
Unleashed Board emulation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agoMerge tag 'xilinx-for-v2024.04-rc1-v2' of https://source.denx.de/u-boot/custodians...
Tom Rini [Wed, 17 Jan 2024 14:27:43 +0000 (09:27 -0500)]
Merge tag 'xilinx-for-v2024.04-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2024.04-rc1-v2

xilinx:
- Enable NFS, WGET, DNS and BLKMAP by default

zynqmp:
- Support new power-management node
- Remove multiple blank lines from DTSes
- Wire multiboot with DFU infrastructure
- Fix i2c-gpio pinctrl group name
- SOM DT changes (phy on kd240, kv260 cleanups
- Cleanup i2c bus on zcu1285
- DT cleanup (fix node names not to use _)
- Fix USB interrupts
- Cleanup zcu100 DT
- Add support for kaslr-seed

zynqmp_r5:
- Fix W=1 issue with missing dir

tools:
- Improve zynqmpimage mkimage support

11 months agoMerge tag 'efi-2024-04-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 17 Jan 2024 14:27:23 +0000 (09:27 -0500)]
Merge tag 'efi-2024-04-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Documentation:

* add generated index to table of contents
* create index entries for commands
* update Python packages used to build the documentation
* fix typos in dfu documentation

UEFI:

* split unrelated code from efi_bootmgr.c
* rename CONFIG_BOOTEFI_BOOTMGR to CONFIG_EFI_BOOTMGR
* net: tftp: remove explicit EFI configuration dependency
* fs: remove explicit EFI configuration dependency

Other:

* Add Goldfish RTC driver and make it available on RISC-V QEMU

11 months agoMerge branch '2024-01-16-assorted-updates-and-improvements'
Tom Rini [Wed, 17 Jan 2024 14:12:27 +0000 (09:12 -0500)]
Merge branch '2024-01-16-assorted-updates-and-improvements'

- Add more pytests to exercise functionality on real hardware, cleanup
  and add tests around "cp"/memmove, add phyCORE-AM62x and Phytium
  Pe2201 platforms, Nuvoton NPCM BMC reset driver and improve QEMU
  SMBIOS support

11 months agotest.py: Update pycryptodomex to address CVE-2023-52323
Tom Rini [Fri, 5 Jan 2024 19:43:43 +0000 (14:43 -0500)]
test.py: Update pycryptodomex to address CVE-2023-52323

The version of pycryptodomex that we use is vulnerable to this CVE.
While not likely an issue for us, let us upgrade to be on the safe side.

Reported-by: GitHub dependabot
Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agodoc: drop references to non-existing CONFIG_MEM_SUPPORT_64BIT_DATA
Rasmus Villemoes [Wed, 3 Jan 2024 10:47:10 +0000 (11:47 +0100)]
doc: drop references to non-existing CONFIG_MEM_SUPPORT_64BIT_DATA

Such a config option does not exist. Rephrase, and avoid mentioning
MEM_SUPPORT_64BIT_DATA, which is an implementation detail.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11 months agoREADME: drop mention of MEM_SUPPORT_64BIT_DATA
Rasmus Villemoes [Wed, 3 Jan 2024 10:47:09 +0000 (11:47 +0100)]
README: drop mention of MEM_SUPPORT_64BIT_DATA

The first sentence is half-way true; the macro is always defined, but
has the value 0 or 1.

The second is outright false. A lot of code guarded by
MEM_SUPPORT_64BIT_DATA uses a "ulong" to store values, so if
sizeof(long) is not 8, that code would probably compile, but not work
at all as expected.

It would probably be possible to make all such code explicitly use u64
and thus make it work on 32 bit targets, but until that is done, do
not pretend that it's ok to override the automatic value of
MEM_SUPPORT_64BIT_DATA.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11 months agocmd/mem.c: fix wrong use of ifdef, drop pointless SUPPORT_64BIT_DATA macro
Rasmus Villemoes [Wed, 3 Jan 2024 10:47:08 +0000 (11:47 +0100)]
cmd/mem.c: fix wrong use of ifdef, drop pointless SUPPORT_64BIT_DATA macro

The macro MEM_SUPPORT_64BIT_DATA is always defined, as either 1 or 0,
so using "#ifdef MEM_SUPPORT_64BIT_DATA" doesn't do what one
expects.

This means that currently all 32 bit targets get compiled with the .q
suffix mentioned in the help text, while it doesn't actually work.

Use the proper "#if" instead.

There's really no point defining another similarly-named macro with
exactly the same value, so just use MEM_SUPPORT_64BIT_DATA throughout.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11 months agotest: add test of "cp" shell command
Rasmus Villemoes [Wed, 3 Jan 2024 10:47:07 +0000 (11:47 +0100)]
test: add test of "cp" shell command

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11 months agoriscv: qemu: imply GOLDFISH_RTC
Heinrich Schuchardt [Sat, 30 Dec 2023 23:53:01 +0000 (00:53 +0100)]
riscv: qemu: imply GOLDFISH_RTC

QEMU's virt board provides an emulated Goldfish RTC. Enable the driver by
default.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agortc: driver for Goldfish RTC
Heinrich Schuchardt [Sat, 30 Dec 2023 23:53:00 +0000 (00:53 +0100)]
rtc: driver for Goldfish RTC

The Goldfish RTC is a virtual device which may be supplied by QEMU.
It is enabled by default on QEMU's RISC-V virt machine.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agofs: remove explicit efi configuration dependency
AKASHI Takahiro [Wed, 17 Jan 2024 04:39:44 +0000 (13:39 +0900)]
fs: remove explicit efi configuration dependency

Now it is clear that the feature actually depends on efi interfaces,
not "bootefi" command. efi_set_bootdev() will automatically be nullified
if necessary efi component is disabled.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 months agonet: tftp: remove explicit efi configuration dependency
AKASHI Takahiro [Wed, 17 Jan 2024 04:39:43 +0000 (13:39 +0900)]
net: tftp: remove explicit efi configuration dependency

Now it is clear that the feature actually depends on efi interfaces,
not "bootefi" command. efi_set_bootdev() will automatically be nullified
if necessary efi component is disabled.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
11 months agoefi_loader: rename BOOTEFI_BOOTMGR to EFI_BOOTMGR
AKASHI Takahiro [Wed, 17 Jan 2024 04:39:42 +0000 (13:39 +0900)]
efi_loader: rename BOOTEFI_BOOTMGR to EFI_BOOTMGR

At this point, EFI boot manager interfaces is fully independent from
bootefi command. So just rename the configuration parameter.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 months agoefi_loader: split unrelated code from efi_bootmgr.c
AKASHI Takahiro [Wed, 17 Jan 2024 04:39:41 +0000 (13:39 +0900)]
efi_loader: split unrelated code from efi_bootmgr.c

Some code moved from cmd/bootefi.c is actually necessary only for "bootefi
<addr>" command (starting an image manually loaded by a user using U-Boot
load commands or other methods (like JTAG debugger).

The code will never been opted out as unused code by a compiler which
doesn't know how EFI boot manager is implemented. So introduce a new
configuration, CONFIG_EFI_BINARY_EXEC, to enforce them opted out
explicitly.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
11 months agodoc: update requirements.txt
Heinrich Schuchardt [Sun, 14 Jan 2024 13:18:23 +0000 (14:18 +0100)]
doc: update requirements.txt

Update requirements.txt to most current packages as produced by

   python3 -m pip install six sphinx-rtd-theme sphinx-prompt
   python3 -m pip freeze

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
11 months agodoc: import Sphinx theme.css and pygments.css
Heinrich Schuchardt [Sun, 14 Jan 2024 13:18:22 +0000 (14:18 +0100)]
doc: import Sphinx theme.css and pygments.css

We want to override the Sphinx theme only partially. So we need to
import the Sphinx theme.css. Cf.
https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html

We also need to import the pygments.css for syntax highlighing.

Use sans-serif for body.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agodoc: update theme_overrides.css
Heinrich Schuchardt [Sun, 14 Jan 2024 13:18:21 +0000 (14:18 +0100)]
doc: update theme_overrides.css

Update theme_overrides.css from Linux v6.7.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agodoc: add sphinx_rtd_theme extension
Heinrich Schuchardt [Sun, 14 Jan 2024 13:18:20 +0000 (14:18 +0100)]
doc: add sphinx_rtd_theme extension

Newer versions of sphinx_rtd_theme require to add sphinx_rtd_theme to the
list of extensions. Cf.
https://github.com/readthedocs/readthedocs.org/pull/9654

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agodocs/sphinx: Explicitly convert Sphinx paths to str
Oliver Faso [Sun, 14 Jan 2024 13:18:19 +0000 (14:18 +0100)]
docs/sphinx: Explicitly convert Sphinx paths to str

Sphinx 7.2+ is switching to using pathlib.Path
instead of str to represent paths. This fixes the
current deprecation warnings and eventual breakage.
This conversion will be a no-op when using older
Sphinx versions.

Signed-off-by: Oliver Faso <erer1243@gmail.com>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20230910040811.53046-1-erer1243@gmail.com
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agodoc: create index entries for commands
Heinrich Schuchardt [Sun, 14 Jan 2024 13:53:13 +0000 (14:53 +0100)]
doc: create index entries for commands

Add the description of CLI commands to the generated index.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agodoc: add generated index to table of contents
Heinrich Schuchardt [Sun, 14 Jan 2024 13:54:03 +0000 (14:54 +0100)]
doc: add generated index to table of contents

Show the index in the navigation sidebar.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agodoc: dfu: fix a handful of typos
Mattijs Korpershoek [Wed, 3 Jan 2024 08:00:04 +0000 (09:00 +0100)]
doc: dfu: fix a handful of typos

Reword some sentences, add missing periods and fix various typos in the
dfu documentation.

This was originally contributed on [1]

[1] https://github.com/Maalobs/u-boot/commit/9a21ed8ba722d904b68945f40ca6697b4b1cc4d4

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
11 months agoconfigs: zynqmp_kria: Enable CONFIG_OF_BOARD_SETUP
Venkatesh Yadav Abbarapu [Wed, 17 Jan 2024 03:20:14 +0000 (08:50 +0530)]
configs: zynqmp_kria: Enable CONFIG_OF_BOARD_SETUP

Enable CONFIG_OF_BOARD_SETUP, so we could use ft_board_setup()
to enable the kaslr-seed and pass to kernel.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240117032014.1014084-3-venkatesh.abbarapu@amd.com
11 months agoxilinx: board: Update the kaslr-seed property
Venkatesh Yadav Abbarapu [Wed, 17 Jan 2024 03:20:13 +0000 (08:50 +0530)]
xilinx: board: Update the kaslr-seed property

Create a ft_board_setup() api that gets called as part
of bootm/booti before jumping to kernel. In this
ft_board_setup() callback that will inspect the DTB
and insert the device tree blob with the "kaslr-seed" property.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240117032014.1014084-2-venkatesh.abbarapu@amd.com
11 months agocmd/command.c: relax length check in cmd_get_data_size()
Rasmus Villemoes [Wed, 3 Jan 2024 10:47:06 +0000 (11:47 +0100)]
cmd/command.c: relax length check in cmd_get_data_size()

Just check that the length is at least 2. This allows passing strings
like ".b", which can be convenient when constructing
tests (i.e. parametrizing the suffix used).

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11 months agocmd/command.c: constify "arg" argument of cmd_get_data_size()
Rasmus Villemoes [Wed, 3 Jan 2024 10:47:05 +0000 (11:47 +0100)]
cmd/command.c: constify "arg" argument of cmd_get_data_size()

This function obviously does not and must not modify "arg". Change the
prototype to allow passing an argument of type "const char*" without
requiring a cast.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11 months agodoc/usage/cmd/cp.rst: document that overlapping regions are supported
Rasmus Villemoes [Wed, 3 Jan 2024 10:47:04 +0000 (11:47 +0100)]
doc/usage/cmd/cp.rst: document that overlapping regions are supported

Now that the cp command is changed to use memmove() internally, update
the documentation to explicitly state that overlapping regions are
allowed.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11 months agocmd/mem.c: use memmove in do_mem_cp()
Rasmus Villemoes [Wed, 3 Jan 2024 10:47:03 +0000 (11:47 +0100)]
cmd/mem.c: use memmove in do_mem_cp()

There's no 'mv' shell command for handling overlapping src and dst
regions, and there's no point introducing one, when we can just make
the existing 'cp' command DTRT in all cases. memmove() should at most
be a few instructions more then memcpy() (to detect the appropriate
direction to do the copy), which is of course completely in the noise
with all the string processing that a shell command does.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11 months agotest/py: memtest: Add tests for mtest command
Love Kumar [Wed, 3 Jan 2024 10:29:42 +0000 (15:59 +0530)]
test/py: memtest: Add tests for mtest command

Add the following memory tests:
memtest_negative - To test mtest command by providing incorrect inputs
memtest_ddr - To test memory write-read-comparision for DDR memory

Signed-off-by: Love Kumar <love.kumar@amd.com>
11 months agoreset: npcm: Add support for Nuvoton NPCM BMC family
Jim Liu [Wed, 3 Jan 2024 07:29:33 +0000 (15:29 +0800)]
reset: npcm: Add support for Nuvoton NPCM BMC family

Add reset controller driver for Nuvoton BMCs.
The npcm reset driver not only supports reset each module reset
but setting initial value of reset Control Registers.

And The driver support each module reset.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
11 months agotest/py: i2c: Add tests for i2c command
Love Kumar [Tue, 2 Jan 2024 06:47:07 +0000 (12:17 +0530)]
test/py: i2c: Add tests for i2c command

Add below test cases for i2c commands:
i2c_bus - To show i2c bus info,
i2c_dev - To set or show the current bus,
i2c_probe - To probe the i2c device,
i2c_eeprom - To test i2c eeprom device,
i2c_probe_all_buses - To list down all the buses and probes it

Signed-off-by: Love Kumar <love.kumar@amd.com>
11 months agotest/py: mii: Add tests for mii command
Love Kumar [Tue, 2 Jan 2024 06:44:35 +0000 (12:14 +0530)]
test/py: mii: Add tests for mii command

Add below test cases for mii commands:
mii_info -To display MII PHY info
mii_list - To list MII devices
mii_set_device - To set MII device
mii_read - To reads register from MII PHY address
mii_dump - To display data from MII PHY address

Signed-off-by: Love Kumar <love.kumar@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
11 months agoARM add initial support for the Phytium Pe2201 Board.
TracyMg_Li [Mon, 25 Dec 2023 03:21:34 +0000 (11:21 +0800)]
ARM add initial support for the Phytium Pe2201 Board.

Add pe2201 platform code and the device tree of pe2201 platform board.
The initial support comprises the UART and PCIe.

Signed-off-by: TracyMg_Li <TracyMg_Li@outlook.com>
Changes since v1:
        fix space corrupt.
Changes since v2:
        switch to bootstd and text environment.
Changes since v3:
        add environment variables.

11 months agolib: smbios: remove redundant next_header()
Heinrich Schuchardt [Sat, 23 Dec 2023 01:17:33 +0000 (02:17 +0100)]
lib: smbios: remove redundant next_header()

next_header() and get_next_header() only differ in how the const attribute
is used. One function taking a const parameter and returning a non-const is
good enough.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
11 months agosmbios: copy QEMU tables
Heinrich Schuchardt [Sat, 23 Dec 2023 01:03:34 +0000 (02:03 +0100)]
smbios: copy QEMU tables

QEMU provides SMBIOS tables with detailed information. We should not try to
replicate them in U-Boot.

If we want to inform about U-Boot, we can add a Firmware Inventory
Information (type 45) table in future.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 months agoarm: dts: k3-j721e-binman: Add support for HS-SE 2.0
Neha Malcom Francis [Wed, 20 Dec 2023 11:34:33 +0000 (17:04 +0530)]
arm: dts: k3-j721e-binman: Add support for HS-SE 2.0

Add support for J721E HS-SE 2.0 device. Make use of the existing
templates and override the phandles for sysfw.itb so that builds do not
fail.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
11 months agodoc: board: phytec: Add phyCORE-AM62x
Wadim Egorov [Wed, 20 Dec 2023 09:18:11 +0000 (10:18 +0100)]
doc: board: phytec: Add phyCORE-AM62x

Add documentation for PHYTEC phyCORE-AM62x SoM.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
11 months agoboard: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM
Wadim Egorov [Wed, 20 Dec 2023 09:18:10 +0000 (10:18 +0100)]
board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM

Add basic support for PHYTEC phyCORE-AM62x SoM.

Supported features:
  - 2GB DDR4 RAM
  - eMMC Flash
  - OSPI NOR Flash
  - external uSD
  - Ethernet
  - debug UART

Product page SoM: https://www.phytec.com/product/phycore-am62x

Device trees were taken from Linux v6.7-rc3.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
11 months agotest/py: mdio: Add tests for mdio command
Love Kumar [Tue, 19 Dec 2023 12:20:51 +0000 (17:50 +0530)]
test/py: mdio: Add tests for mdio command

Add below test cases for mdio commands:
mdio_list - To list MDIO buses
mdio_read - To read PHY's register at <devad>.<reg>
mdio_write - To write PHY's register at <devad>.<reg>

Signed-off-by: Love Kumar <love.kumar@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
11 months agotest/py: net: Add dhcp abort test
Love Kumar [Tue, 21 Nov 2023 13:02:47 +0000 (18:32 +0530)]
test/py: net: Add dhcp abort test

Abort the dhcp request in the middle by pressing ctrl + c on u-boot
prompt and validate the abort status.

Signed-off-by: Love Kumar <love.kumar@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
11 months agoMerge tag 'qcom-2024.04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-snapd...
Tom Rini [Tue, 16 Jan 2024 14:51:16 +0000 (09:51 -0500)]
Merge tag 'qcom-2024.04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-snapdragon

Qualcomm architecture changes:

* Move clock and pinctrl drivers out of mach-snapdragon
* Various clock driver improvements
* Convert PMIC power/reset key driver to use the button API
* Preparetory work for migrating to upstream DT

11 months agoMerge tag 'u-boot-imx-20240115' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Tue, 16 Jan 2024 14:49:48 +0000 (09:49 -0500)]
Merge tag 'u-boot-imx-20240115' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

11 months agosandbox_flattree: enable button support
Caleb Connolly [Mon, 15 Jan 2024 18:03:17 +0000 (18:03 +0000)]
sandbox_flattree: enable button support

sandbox_flattree enables QCOM_PMIC_GPIO which now depends on BUTTON. As
a result the button tests now get run, but fail because the ADC and GPIO
button drivers aren't enabled.

Enable them to run the tests for sandbox_flattree.

Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agotest: spmi: fix tests
Caleb Connolly [Mon, 8 Jan 2024 15:30:51 +0000 (15:30 +0000)]
test: spmi: fix tests

With the recent changes to the Qualcomm PMIC GPIO driver the sandbox
tests for it no longer pass, update the DTS and tests to work with the
changes.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agopmic: qcom: dont use dev_read_addr to get USID
Caleb Connolly [Tue, 5 Dec 2023 13:46:54 +0000 (13:46 +0000)]
pmic: qcom: dont use dev_read_addr to get USID

Linux DTs stuff a value indicating if the USID is a USID or a GSID in the
reg property, the Linux SPMI driver then reads the two address cells
separately. U-boot's dev_read_addr() doesn't know how to handle this, so
use ofnode_read_u32_index() to get just the USID.

The Qcom pmic driver doesn't have support for GSID handling, so just
ignore the second value for now.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agospmi: msm: fix register range names
Caleb Connolly [Tue, 5 Dec 2023 13:46:53 +0000 (13:46 +0000)]
spmi: msm: fix register range names

The core and chnl register ranges were swapped on SDM845. Fix it, and
fetch the register ranges by name instead of by index.

Drop the cosmetic "version" variable and clean up the debug logging.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agogpio: qcom_pmic: drop gpio-count property
Caleb Connolly [Tue, 5 Dec 2023 13:46:52 +0000 (13:46 +0000)]
gpio: qcom_pmic: drop gpio-count property

This property is not part of the dt bindings and all boards use the new
gpio-ranges property instead. Drop support for this.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agodts: qcom: adjust pmic gpio to use upstream bindings
Caleb Connolly [Tue, 5 Dec 2023 13:46:51 +0000 (13:46 +0000)]
dts: qcom: adjust pmic gpio to use upstream bindings

Use the upstream gpio-ranges property instead of gpio-count, and drop
the bank-name property for Qualcomm boards.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agogpio: qcom_pmic: support upstream DT
Caleb Connolly [Tue, 5 Dec 2023 13:46:50 +0000 (13:46 +0000)]
gpio: qcom_pmic: support upstream DT

Upstream uses the gpio-ranges property to define the number of GPIOs,
support for parsing this when gpio-count is unspecified

Additionally, drop the bank-name property as it isn't used in upstream,
and we can just hardcode the bank name instead.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agogpio: qcom_pmic: drop pon GPIO driver
Caleb Connolly [Tue, 5 Dec 2023 13:46:49 +0000 (13:46 +0000)]
gpio: qcom_pmic: drop pon GPIO driver

Remove the (now unused) GPIO driver for the power and resin buttons on
the PMIC.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agomach-snapdragon: switch to PMIC button driver
Caleb Connolly [Tue, 5 Dec 2023 13:46:48 +0000 (13:46 +0000)]
mach-snapdragon: switch to PMIC button driver

The PMIC button driver is a much better representation of the hardware
here, adjust the boards to use upstream DT and the PMIC button driver
instead of exposing the buttons as GPIOs and relying on the GPIO-button
driver.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agobutton: qcom-pmic: introduce Qualcomm PMIC button driver
Caleb Connolly [Tue, 5 Dec 2023 13:46:47 +0000 (13:46 +0000)]
button: qcom-pmic: introduce Qualcomm PMIC button driver

Qualcomm PMICs include a "pon" function which handles two buttons, the
power button and "resin" button (usually volume down). Introduce a new
driver following upstream Linux DT to enable these and map them to Enter
and Down respectively to enable use in boot menus.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agogpio: qcom_pmic: fix silent dev_read_addr downcast
Caleb Connolly [Tue, 5 Dec 2023 13:46:46 +0000 (13:46 +0000)]
gpio: qcom_pmic: fix silent dev_read_addr downcast

priv->pid is uint32_t, but dev_read_addr() returns a uint64_t on arm64,
with the upper bits being used for error codes. Do error checking before
downcasting to u32 to prevent errors being silently ignored.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoserial: msm-geni: handle devm_clk_get() errors
Caleb Connolly [Tue, 14 Nov 2023 12:51:12 +0000 (12:51 +0000)]
serial: msm-geni: handle devm_clk_get() errors

devm_clk_get() returns an ERR_PTR on failure, not null. Fix the check to
avoid the board crashing when the clock isn't available.

Additionally, add the missing error handling for this function.

Fixes: 324df15a292e ("serial: qcom: add support for GENI serial driver")
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoserial: msm-geni: don't rely on parent misc device
Caleb Connolly [Tue, 14 Nov 2023 12:51:11 +0000 (12:51 +0000)]
serial: msm-geni: don't rely on parent misc device

commit 1b15483deb3f ("misc: add Qualcomm GENI SE QUP device driver")
introduced support for platform-specific oversampling values, necessary
to configure the UART clocks on all platforms at runtime. However it
relies in probing a parent device. Despite the DM_FLAG_PRE_RELOC flag,
this is not done consistently during boot.

Instead, take another approach by relying on ofnode_ helpers to read the
serial engine base address and do the read directly. This fixes early
UART on boards with a non-default oversampling rate.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agomsm_gpio: use unsigned int
Caleb Connolly [Tue, 14 Nov 2023 12:55:43 +0000 (12:55 +0000)]
msm_gpio: use unsigned int

Replaces the uses of "unsigned" with "unsigned int".

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agopinctrl: qcom: make compatible with linux DTs
Caleb Connolly [Tue, 14 Nov 2023 12:55:42 +0000 (12:55 +0000)]
pinctrl: qcom: make compatible with linux DTs

The pinctrl and GPIO drivers are currently heavily incompatible with
upstream. Most Qualcomm pinctrl blocks feature "tiles" of pins, each at
it's own address. Introduce support for these by allowing the soc driver
to specify per-pin register offsets similarly to the Linux driver.

Adjust the GPIO driver to handle these too, and finally enable support
for all pins with the same numbering as used in Linux.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agopinctrl: qcom: move ipq4019 driver from mach-ipq40xx
Caleb Connolly [Tue, 14 Nov 2023 12:55:41 +0000 (12:55 +0000)]
pinctrl: qcom: move ipq4019 driver from mach-ipq40xx

Drop the duplicated pinctrl-snapdragon driver from mach-ipq40xx and add
it to drivers/pinctrl/qcom.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agopinctrl: qcom: move out of mach-snapdragon
Caleb Connolly [Tue, 14 Nov 2023 12:55:40 +0000 (12:55 +0000)]
pinctrl: qcom: move out of mach-snapdragon

Move the Qualcomm pinctrl drivers out of mach-snapdragon and over to the
rest of the pinctrl drivers, adjust the drivers so that support for each
platform can be enabled/disabled individually and introduce platform
specific configuration options.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoclk/qcom: fix rcg divider value
Caleb Connolly [Tue, 7 Nov 2023 12:41:05 +0000 (12:41 +0000)]
clk/qcom: fix rcg divider value

The RCG divider field takes a value of (2*h - 1) where h is the divisor.
This allows fractional dividers to be supported by calculating them at
compile time using a macro.

However, the clk_rcg_set_rate_mnd() function was also performing the
calculation. Clean this all up and consistently use the F() macro to
calculate these at compile time and properly support fractional divisors.

Additionally, improve clk_bcr_update() to timeout with a warning rather
than hanging the board, and make the freq_tbl struct and helpers common
so that they can be reused by future platforms.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoclk/qcom: add mnd_width to clk_rcg_set_rate_mnd()
Caleb Connolly [Tue, 7 Nov 2023 12:41:04 +0000 (12:41 +0000)]
clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()

This property is needed on some platforms to ensure that only the
relevant bits are set in the M/N/D registers.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoclk/qcom: use function pointers for enable and set_rate
Caleb Connolly [Tue, 7 Nov 2023 12:41:03 +0000 (12:41 +0000)]
clk/qcom: use function pointers for enable and set_rate

Currently, it isn't possible to build clock drivers for more than one
platform due to how the msm_enable() and msm_set_rate() callbacks are
implemented.

Extend qcom_clk_data to include function pointers for these and convert
all platforms to use them.

Previously, clock drivers relied on include/configs/<board.h> to include the
board specific sysmap header, however as most of the header contents are clock
driver related, import the contents directly into each clock driver and
remove the header. The only exception here is the dragonboard820c board file
which includes some pinctrl macros, those are also inlined.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
[caleb: remove additional sysmap-sdm845.h mention]

11 months agoclk/qcom: sdm845: add register map for simple gate clocks
Caleb Connolly [Tue, 7 Nov 2023 12:41:02 +0000 (12:41 +0000)]
clk/qcom: sdm845: add register map for simple gate clocks

Many gate clocks can be enabled with a single register write, add support
for defining these simple gate clocks and add the ones found on SDM845.

While we're here, inline clk_init_uart() into msm_set_rate().

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoclk/qcom: handle resets and clocks in one device
Konrad Dybcio [Tue, 7 Nov 2023 12:41:01 +0000 (12:41 +0000)]
clk/qcom: handle resets and clocks in one device

Qualcomm's clock controller blocks actually do much more than it
says on the tin.. They provide clocks, resets and power domains.
Currently, U-Boot requires one to spawn 2 separate devices for
controlling clocks and resets, both spanning the same register space.
Refactor the code to make it work with just a single DT node, making
it compatible with upstream Linux bindings and dropping the dedicated
reset driver in favour of including it in the clock driver.

Heavily inspired by Renesas code for a similar hw block.

[caleb: moved drivers to clk/qcom, added reset driver and adjusted bind
logic. Imported qcom,gcc-ipq4019.h from Linux]

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoclk/qcom: move ipq4019 driver from mach-ipq40xx
Caleb Connolly [Tue, 7 Nov 2023 12:41:00 +0000 (12:41 +0000)]
clk/qcom: move ipq4019 driver from mach-ipq40xx

This driver is just a stub, but it's necessary to support the upcoming
reset driver changes.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoclk/qcom: move from mach-snapdragon
Caleb Connolly [Tue, 7 Nov 2023 12:40:59 +0000 (12:40 +0000)]
clk/qcom: move from mach-snapdragon

Clock drivers don't belong here, move them to the right place and
declutter mach-snapdragon a bit.

To de-couple these drivers from specific "target" platforms, add
additional config options to enable each clock driver gated behind a
common CLK_QCOM option and enable them by default for the respective
targets. This will make future work easier as we move towards a generic
Qualcomm target.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agoMerge tag 'u-boot-nand-20240115' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 15 Jan 2024 14:29:57 +0000 (09:29 -0500)]
Merge tag 'u-boot-nand-20240115' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash

Pull request for u-boot-nand-20240115

The first patch is by Heinrich Schuchardt and fixes an integer overflow

The following two patches are by Dario Binacchi and add arguments check
to the nand_mtd_to_devnum() and nand_register() functions.

The remaining patches are by Roger Quadros and include various fixes for
the OMAP platform.

11 months agoarm: xea: Add support for boot image source descriptor in SPL
Anatolij Gustschin [Mon, 15 Jan 2024 13:51:30 +0000 (14:51 +0100)]
arm: xea: Add support for boot image source descriptor in SPL

We load two boot image source descriptor structures from last
two sectors in the SPI NOR flash and determine the boot source
for loading the kernel/DTB images, then adjust the boot order for
loading image from eMMC boot0 or boot1 partition.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
11 months agoarm: config: Enable CRC8 support in SPL on imx287 XEA board
Lukasz Majewski [Mon, 15 Jan 2024 13:51:29 +0000 (14:51 +0100)]
arm: config: Enable CRC8 support in SPL on imx287 XEA board

The boot0/1 feature uses simple CRC8 to check (in SPL) if
SPI-NOR content is not corrupted, hence the need to enable
it.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
11 months agoarm: xea: Move XEA's environment variables from xea.h to xea.env
Lukasz Majewski [Mon, 15 Jan 2024 13:51:28 +0000 (14:51 +0100)]
arm: xea: Move XEA's environment variables from xea.h to xea.env

The default set of environment variables from CFG_EXTRA_ENV_SETTINGS
has been moved to a separate file - board/liebherr/xea/xea.env

Adjustments done:
- fitImage support
- SPI-NOR layout re-organization

Signed-off-by: Lukasz Majewski <lukma@denx.de>
11 months agoboard: phytec: fix link error when disabling PHYTEC_SOM_DETECTION
Yannic Moog [Mon, 15 Jan 2024 09:31:41 +0000 (10:31 +0100)]
board: phytec: fix link error when disabling PHYTEC_SOM_DETECTION

Commit aa7858fe5e2e ("board: phytec: som_detection: move definitions to
source file") moved function definitions from header to source file.
Makefile however was not updated to unconditionally (from
[..]_SOM_DETECTION) build the imx8 and phytec som detection units.
Also remove unused includes that cause build failures on arm 32bit
boards. SoM detection shall support 32bit boards as well, but arch
specific code should not be included in the generic module.

Fixes: aa7858fe5e2e ("board: phytec: som_detection: move definitions to source file")
Signed-off-by: Yannic Moog <y.moog@phytec.de>
11 months agoarm: mach-k3: am642: Define NAND boot device
Roger Quadros [Thu, 11 Jan 2024 13:19:20 +0000 (15:19 +0200)]
arm: mach-k3: am642: Define NAND boot device

AM642 SoC supports booting from GPMC NAND device.
Define boot device for it.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499180.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
11 months agomtd: rawnand: omap_gpmc: fix OF based partition parsing for NAND
Roger Quadros [Thu, 11 Jan 2024 13:19:19 +0000 (15:19 +0200)]
mtd: rawnand: omap_gpmc: fix OF based partition parsing for NAND

Set NAND chip ofnode and device so OF based partition parsing
can work.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499178.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
11 months agomtd: rawnand: omap_gpmc: Use DT provided IO address
Roger Quadros [Thu, 11 Jan 2024 13:19:18 +0000 (15:19 +0200)]
mtd: rawnand: omap_gpmc: Use DT provided IO address

For DM case we can get the NAND chip's IO address from DT
so we don't need to rely on CFG_SYS_NAND_BASE.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499177.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
11 months agomemory: ti-gpmc: Fix build
Roger Quadros [Thu, 11 Jan 2024 13:19:17 +0000 (15:19 +0200)]
memory: ti-gpmc: Fix build

sys_proto.h no longer exists for K3 platform so drop it.
Include sizes.h to so SZ_16M is visible.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499176.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
11 months agomtd: rawnand: omap_elm: Fix elm_init definition
Roger Quadros [Mon, 11 Dec 2023 11:46:00 +0000 (13:46 +0200)]
mtd: rawnand: omap_elm: Fix elm_init definition

The macro ELM_BASE is defined in mach/hardware.h and is
not visible at the omap_elm.h header file. Avoid using it
in omap_elm.h.

Reported-by: Hong Guan <hguan@ti.com>
Fixes: 7363cf0581a3 ("mtd: rawnand: omap_elm: u-boot driver model support")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/all/20231211114600.4414-3-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
11 months agomtd: nand: omap_gpmc: Fix NAND in SPL for AM335x
Roger Quadros [Mon, 11 Dec 2023 11:45:59 +0000 (13:45 +0200)]
mtd: nand: omap_gpmc: Fix NAND in SPL for AM335x

AM335x uses a special driver "am335x_spl_bch.c" as SPL
NAND loader. This driver expects 1 sector at a time ECC
and doesn't work well with multi-sector ECC that was implemented in
commit 04fcd2587321 ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction")

Additionally, the omap_elm driver does not support multi sector ECC and will
need more work and tests to get multi sector working correctly on all
platforms.

Switch back to 1 sector at a time read/ECC.

Fixes: 04fcd2587321 ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Tested-by: Enrico Leto <enrico.leto@siemens.com>
Tested-by: Heiko Schocher <hs@denx.de>
Link: https://lore.kernel.org/all/20231211114600.4414-2-rogerq@kernel.org/
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
11 months agomtd: nand: check nand_mtd_to_devnum() argument
Dario Binacchi [Thu, 2 Nov 2023 11:38:22 +0000 (12:38 +0100)]
mtd: nand: check nand_mtd_to_devnum() argument

If the "mtd" parameter is NULL, the search will definitely yield a
negative result. In that case, it's better to exit immediately.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20231102113829.58852-1-dario.binacchi@amarulasolutions.com
11 months agomtd: nand: complete nand_register() arguments check
Dario Binacchi [Thu, 2 Nov 2023 11:27:33 +0000 (12:27 +0100)]
mtd: nand: complete nand_register() arguments check

The patch checks that the "mtd" parameter is accessible before
proceeding.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20231102112743.57420-1-dario.binacchi@amarulasolutions.com
11 months agocmd: mtd: avoid unintentional integer overflow
Heinrich Schuchardt [Thu, 11 Jan 2024 07:31:55 +0000 (08:31 +0100)]
cmd: mtd: avoid unintentional integer overflow

mtd dump beyond 4 GiB will show incorrect results.

Multiplying two u32 will yield a u32. Add a missing cast.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Addresses-Coverity-ID: 477205 ("Unintentional integer overflow")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/all/20240111073155.19545-1-heinrich.schuchardt@canonical.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
11 months agoMerge branch 'master-sync-dts-663' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Sun, 14 Jan 2024 23:07:49 +0000 (18:07 -0500)]
Merge branch 'master-sync-dts-663' of https://source.denx.de/u-boot/custodians/u-boot-sh

11 months agoARM: dts: renesas: Synchronize R-Car R8A779F0 S4 DTs with Linux 6.6.3
Marek Vasut [Sun, 3 Dec 2023 13:15:24 +0000 (14:15 +0100)]
ARM: dts: renesas: Synchronize R-Car R8A779F0 S4 DTs with Linux 6.6.3

Synchronize R-Car R8A779F0 S4 DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
11 months agoARM: dts: renesas: Synchronize R-Car R8A77990 E3 DTs with Linux 6.6.3
Marek Vasut [Sun, 3 Dec 2023 13:15:23 +0000 (14:15 +0100)]
ARM: dts: renesas: Synchronize R-Car R8A77990 E3 DTs with Linux 6.6.3

Synchronize R-Car R8A77990 E3 DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>