]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agodoc: dm: Fix typo
Alexander Dahl [Wed, 24 Jan 2024 07:48:58 +0000 (08:48 +0100)] 
doc: dm: Fix typo

That's most probably a typo, because driver model design documents seem
to be from 2012 and there is no 2010.01 release.

Fixes: 282ed24fb3ca ("dm: MIGRATION: Add migration plan for CONFIG_DM")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agosunxi: simplify U-Boot proper only builds
Andre Przywara [Wed, 3 Jan 2024 00:12:27 +0000 (00:12 +0000)] 
sunxi: simplify U-Boot proper only builds

At the moment every Allwinner board builds and requires an SPL, even
though we select this individually in each _defconfig file.
For experiments and for early bringup of new SoCs it would be beneficial
to only build U-Boot proper, for instance to postpone a tedious SPL port
(including DRAM support) in the initial phase.

Protect some SPL related symbols that we unconditionally select at the
moment with "if SPL", to avoid Kconfig conflicts when CONFIG_SPL is
disabled.

This alone does not cleanly build U-Boot proper only yet, but gets it
far enough so that the binary can be harvested.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: remove common.h inclusion
Andre Przywara [Wed, 3 Jan 2024 00:12:26 +0000 (00:12 +0000)] 
sunxi: remove common.h inclusion

The usage of the common.h include file is deprecated, and has already
been removed from several files.

Get rid of all inclusions in the arch/arm/mach-sunxi directory. Most
files actually don't need the header at all, for the few others just
include the headers that we actually require.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: sun9i: remove unneeded base addresses from header
Andre Przywara [Wed, 3 Jan 2024 00:12:24 +0000 (00:12 +0000)] 
sunxi: sun9i: remove unneeded base addresses from header

The cpu_sun9i.h header file defined the base addresses for quite some
peripherals of the Allwinner A80 CPU, even though we now only use a
fraction of that.
Most of the addresses are now either read from the DT, or were never
used in U-Boot in the first place.

Removed the ones that are not used in the whole of the U-Boot source.
to make it clear that this file only contains addresses that are needed
for the SPL operation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: sun4i: remove unneeded base addresses from header
Andre Przywara [Wed, 3 Jan 2024 00:12:23 +0000 (00:12 +0000)] 
sunxi: sun4i: remove unneeded base addresses from header

The cpu_sun4i.h header file defined the base addresses for quite some
peripherals of earlier Allwinner CPUs, even though we now only use a
fraction of that.
Most of the addresses are now either read from the DT, or were never
used in U-Boot in the first place.

Removed the ones that are not used in the whole of the U-Boot source.
to make it clear that this file only contains addresses that are needed
for the SPL operation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: sun50i-h6: remove unneeded base addresses from header
Andre Przywara [Wed, 3 Jan 2024 00:12:22 +0000 (00:12 +0000)] 
sunxi: sun50i-h6: remove unneeded base addresses from header

The cpu_sun50i_h6.h header file defined the base addresses for quite some
peripherals of the Allwinner H6 and related CPUs, even though we now only
use a fraction of that.
Most of the addresses are now either read from the DT, or were never used
in U-Boot in the first place.

Removed the ones that are not used in the whole of the U-Boot source.
to make it clear that this file only contains addresses that are needed
for the SPL operation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: cleanup sunxi-common.h
Andre Przywara [Wed, 3 Jan 2024 00:12:21 +0000 (00:12 +0000)] 
sunxi: cleanup sunxi-common.h

The sunxi-common.h configs header used to contain a lot of random
Allwinner platform related constants, but over the years we moved a lot
of those definitions out there.

Clean up the file to remove outdated comments which are leftovers from
the olden days. Also remove the definition of LOW_LEVEL_SRAM_STACK,
which is actually used nowhere in the whole source tree.

This also uses the opportunity to add some section comments that helps
structuring the header file and improving readability.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoMerge branch 'master-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 28 Jan 2024 01:43:20 +0000 (20:43 -0500)] 
Merge branch 'master-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Assorted code clean-ups

2 years agoARM: renesas: whitehawk: Drop extra leading space
Marek Vasut [Sun, 21 Jan 2024 17:33:12 +0000 (18:33 +0100)] 
ARM: renesas: whitehawk: Drop extra leading space

Drop leading space in front of a comment. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2 years agoARM: renesas: Drop include common.h
Marek Vasut [Sun, 21 Jan 2024 17:31:23 +0000 (18:31 +0100)] 
ARM: renesas: Drop include common.h

The header file is not necessary in either of those files,
remove it as common.h is going away.

Include missing asm/arch/rmobile.h in board/renesas/rcar-common/v3-common.c
to prevent build failure of r8a77970_eagle r8a779a0_falcon r8a77980_v3hsk
and r8a77970_v3msk .

Include missing asm/u-boot.h in falcon.c and grpeach.c to fix build failure
due to missing definition of struct bd_info . Include errno.h in grpeach.c
to fix build error due to missing definition of EINVAL.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2 years agopinctrl: renesas: Drop include common.h
Marek Vasut [Sun, 21 Jan 2024 17:31:22 +0000 (18:31 +0100)] 
pinctrl: renesas: Drop include common.h

The header file is not necessary in either of those files,
remove it as common.h is going away.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2 years agoclk: renesas: Drop include common.h
Marek Vasut [Sun, 21 Jan 2024 17:31:21 +0000 (18:31 +0100)] 
clk: renesas: Drop include common.h

The header file is not necessary in either of those files,
remove it as common.h is going away.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2 years agoMerge tag 'smbios-2024-04-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 27 Jan 2024 12:53:29 +0000 (07:53 -0500)] 
Merge tag 'smbios-2024-04-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request smbios-2024-04-rc1-2

* Add missing field to SMBIOS type 2 structure definition
* Provide smbios command to display smbios table
* Enable the command on sandbox and qemu_arm64_defconfig
* Provide a python test for the smbios command
* Fix copying SMBIOS 2.1 table from QEMU
* Correct EFI TCG measurement to assume SMBIOS 3 table

2 years agolib: support SMBIOS3 table in uuid_guid_get_str()
Heinrich Schuchardt [Mon, 22 Jan 2024 13:04:35 +0000 (14:04 +0100)] 
lib: support SMBIOS3 table in uuid_guid_get_str()

As we support installing SMBIOS3 tables in U-Boot we need to add this GUID
to the translation table used buy uuid_guid_get_str().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2 years agosmbios: use struct_table_length to get SMBIOS 2.1 total table length
Masahisa Kojima [Thu, 25 Jan 2024 01:11:28 +0000 (10:11 +0900)] 
smbios: use struct_table_length to get SMBIOS 2.1 total table length

The current code convert the SMBIOS 2.1 entry point structure to
SMBIOS 3.0 entry point structure. The max_struct_size member in
SMBIOS 2.1 entry point structure indicates
"Size of the largest SMBIOS structure, in bytes".
We need to use struct_table_length instead.

Fixes: 1c5aab803c0b ("smbios: copy QEMU tables")
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 years agoefi_loader: migrate SMBIOS 3.0 entry point structure for measurement
Masahisa Kojima [Fri, 26 Jan 2024 00:53:42 +0000 (09:53 +0900)] 
efi_loader: migrate SMBIOS 3.0 entry point structure for measurement

Current U-Boot only supports the SMBIOS 3.0 entry point structure.
TCG2 measurement code should migrate to SMBIOS 3.0 entry
point structure.

efi_selftest tcg2 test also needs to be updated, and expected
PCR[1] result is changed since guid for SMBIOS EFI system table
uses different guid SMBIOS3_TABLE_GUID instead of SMBIOS_TABLE_GUID.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoconfigs: enable smbios command on qemu_arm64_defconfig
Heinrich Schuchardt [Thu, 25 Jan 2024 15:54:38 +0000 (16:54 +0100)] 
configs: enable smbios command on qemu_arm64_defconfig

We have a Python test the copying of SMBIOS tables from QEMU.
To make use of the test we need the smbios command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoconfigs: enable smbios command on sandbox
Heinrich Schuchardt [Thu, 25 Jan 2024 15:54:37 +0000 (16:54 +0100)] 
configs: enable smbios command on sandbox

To make use of the Python smbios test we need the smbios command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agotest: unit test for smbios command
Heinrich Schuchardt [Thu, 25 Jan 2024 15:54:36 +0000 (16:54 +0100)] 
test: unit test for smbios command

Provide a unit test for the smbios command.

Provide different test functions for QEMU, sandbox, and other systems.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agodoc: man-page for smbios command
Heinrich Schuchardt [Thu, 25 Jan 2024 15:54:35 +0000 (16:54 +0100)] 
doc: man-page for smbios command

Provide a man-page for the smbios command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agocmd: provide command to display SMBIOS information
Heinrich Schuchardt [Thu, 25 Jan 2024 15:54:34 +0000 (16:54 +0100)] 
cmd: provide command to display SMBIOS information

U-Boot can either generated an SMBIOS table or copy it from a prior boot
stage, e.g. QEMU.

Provide a command to display the SMBIOS information.

Currently only type 1 and 2 are translated to human readable text.
Other types may be added later. Currently only a hexdump and the list of
strings is provided for these.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agosmbios: type2: contained object handles
Heinrich Schuchardt [Thu, 25 Jan 2024 15:54:33 +0000 (16:54 +0100)] 
smbios: type2: contained object handles

The type 2 structure must include information about the contained objects.
It is fine to set the number of contained object handles to 0.

Add the missing field.

Fixes: 721e992a8af5 ("x86: Add SMBIOS table support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoMerge branch '2024-01-24-assorted-fixes-and-updates'
Tom Rini [Thu, 25 Jan 2024 16:01:38 +0000 (11:01 -0500)] 
Merge branch '2024-01-24-assorted-fixes-and-updates'

- Increase SYS_MAXARGS default, verdin-am62 improvements (and required
  cleanup), assorted cleanups throughout the code base.

2 years agoreset: reset-hisilicon: also handle #reset-cells = <2>
Yang Xiwen [Fri, 19 Jan 2024 12:49:17 +0000 (20:49 +0800)] 
reset: reset-hisilicon: also handle #reset-cells = <2>

It's also valid to have #reset-cells = <2> while the third arg defaults
to ASSERT_SET.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2 years agotest: enhance unicode_test_utf8_to_utf32_stream()
Heinrich Schuchardt [Thu, 18 Jan 2024 17:57:12 +0000 (18:57 +0100)] 
test: enhance unicode_test_utf8_to_utf32_stream()

Additionally test a UTF-8 string where each code point translates to three
UTF-8 bytes.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agolib: add comment in utf8_to_utf32_stream()
Heinrich Schuchardt [Thu, 18 Jan 2024 17:54:50 +0000 (18:54 +0100)] 
lib: add comment in utf8_to_utf32_stream()

The logic of utf8_to_utf32_stream() is not easy to understand.
Add a comment.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodocker: Add tools/buildman/requirements.txt to the cache
Tom Rini [Thu, 18 Jan 2024 17:10:07 +0000 (12:10 -0500)] 
docker: Add tools/buildman/requirements.txt to the cache

As we have had this file for a while now, we should include installing
and populating our pip cache from here as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agocommon: console: Fix print complete stdio device list
Patrice Chotard [Wed, 17 Jan 2024 12:37:13 +0000 (13:37 +0100)] 
common: console: Fix print complete stdio device list

In case CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are on and
stdin or stdout or stderr are missing in environment, as fallback, get
these either from stdio_devices[std] or stdio_devices[std]->name.

Fixes: 6b343ab38d ("console: Print out complete stdio device list")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agocmd: bootmenu: rename U-Boot console to Exit
Svyatoslav Ryhel [Wed, 17 Jan 2024 10:55:46 +0000 (12:55 +0200)] 
cmd: bootmenu: rename U-Boot console to Exit

It seems that the U-Boot console entry of the bootmenu has lost
its original meaning. Now, even if it is chosen, the probability
that you will enter the actual U-Boot console is quite low.
Boot env, bootflow, bootcommand script may appear, but not the
actual console. Hence, let's remove ambiguity and name this
entry by what it actually does: 'Exit' the bootmenu.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 years agoboard: verdin-am62: set cpu core voltage depending on speed grade
Max Krummenacher [Wed, 17 Jan 2024 10:16:49 +0000 (11:16 +0100)] 
board: verdin-am62: set cpu core voltage depending on speed grade

Speed grade T requires the VDD_CORE voltage to be 0.85V if using
the maximum core frequency.

Speed grades G, K, S allow the VDD_CORE voltage to be 0.75V up to the
maximum core frequency but allow to run at 0.85V.

For efficiency in manufacturing and code maintenance we use 0.85V for
the PMIC defaults and device tree settings and dynamically adjust the
voltage in the PMIC and device tree to 0.75V for lower speed SKU to
gain more than 100mW power consumption reduction.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2 years agoarm: mach-k3: am62: provide more soc feature info accessors
Max Krummenacher [Wed, 17 Jan 2024 10:16:48 +0000 (11:16 +0100)] 
arm: mach-k3: am62: provide more soc feature info accessors

Add two functions, one which returns the SoC speed grade and one
which returns the SoC operating temperature range.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2 years agoarm: mach-k3: am62: move device identification accessor functions to header
Max Krummenacher [Wed, 17 Jan 2024 10:16:47 +0000 (11:16 +0100)] 
arm: mach-k3: am62: move device identification accessor functions to header

mach-k3/am625_fdt.c does fdt fixup depending on fields in the device
identification register. Move the accessors to the device identification
register as inline functions into the am62_hardware.h header, so that
they can be used for other functionality.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2 years agoboard: verdin-am62: improve comment on usb phy core voltage
Max Krummenacher [Wed, 17 Jan 2024 10:16:46 +0000 (11:16 +0100)] 
board: verdin-am62: improve comment on usb phy core voltage

TI recommends to clear the bit independent of the used voltage.
So the comment which claims to do it due to the core voltage
at 0.85V is bogus.

See https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1252724/am625-usb-phy-core-voltage-selection-and-vdda_core_usb-mismatch

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2 years agoheaders: don't depend on errno.h being available
Max Krummenacher [Thu, 18 Jan 2024 18:10:47 +0000 (19:10 +0100)] 
headers: don't depend on errno.h being available

These headers follow the pattern:

| #if CONFIG_IS_ENABLED(FANCY_FEATURE)
|   void foo(void);
| #else
|   static inline void foo(void) { return -ENOSYS; }
| #endif

In the #else path ENOSYS is used, however linux/errno.h is not included.
If errno.h has not been included already the compiler errors out even
if the inline function is not referenced.

Make those headers self contained.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agocmd: increase default for SYS_MAXARGS
Heinrich Schuchardt [Mon, 15 Jan 2024 13:46:56 +0000 (14:46 +0100)] 
cmd: increase default for SYS_MAXARGS

The value of CONFIG SYS_MAXARGS limits the usability of the 'for' command.
The current default of 16 is too low for some use case. Cf.
https://bugs.launchpad.net/snap-core18/+bug/1910094

Increase the default to 64.

Reported-by: Dave Jones <dave.jones@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoboard: ti: common: board_detect: Fix EEPROM offset read for 1-byte
Prasanth Babu Mantena [Mon, 30 Oct 2023 17:04:58 +0000 (22:34 +0530)] 
board: ti: common: board_detect: Fix EEPROM offset read for 1-byte

EEPROM detection logic in ti_i2c_eeprom_get() involves reading
the total size and the 1-byte size with an offset 1. The commit
9f393a2d7af8 ("board: ti: common: board_detect: Fix EEPROM read
quirk for 2-byte") that attempts to fix this uses a wrong pointer to
compare.

The value with one offset is read into offset_test, but the pointer
used to match was still ep, resulting in an invalid comparison of the
values. The intent is to identify bad 2-byte addressing eeproms that
get stuck on the successive reads.

Fixes: 9f393a2d7af8 (board: ti: common: board_detect: Fix EEPROM read quirk for 2-byte)
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Tested-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2 years agoMAINTAINERS: Add new Samsung subsystems
Sam Protsenko [Thu, 11 Jan 2024 03:09:09 +0000 (21:09 -0600)] 
MAINTAINERS: Add new Samsung subsystems

Add next Samsung subsystems with Sam Protsenko as a maintainer:

- Samsung CCF Clock Framework
- Exynos850 SoC Support
- Samsung SoC Drivers

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoboard: samsung: Add support for E850-96 board
Sam Protsenko [Thu, 11 Jan 2024 03:09:08 +0000 (21:09 -0600)] 
board: samsung: Add support for E850-96 board

Add support for WinLink E850-96 board [1]. It's based on Exynos850 SoC
and follows 96boards specification, so it's compatible with 96boards
mezzanine boards [2]. This patch enables next features:

  * Serial console
  * USI
  * PMU (muxing AP UART path)
  * Pinctrl
  * Clocks
  * Timer (ARMv8 architected)
  * Reset control

It's quite a minimal enablement. Features like MMC, USB and Ethernet
will be enabled later.

The rationale for config values is as follows:

  * TEXT_BASE = 0xf8800000

    That's where BL2 loads the U-Boot payload, so TEXT_BASE must be
    exactly this value. Overall the memory map is designed in a way to
    keep the bootloader in the upper 128 MiB area of RAM, which is
    0xf8000000..0xffffffff. That includes bootloader's code, stack,
    data, heap, MMU tables, etc. All the memory below that 128 MiB chunk
    can be used for storing boot images (0x80000000..0xf8000000).

  * CUSTOM_SYS_INIT_SP_ADDR = 0xf8c00000

    Just 4 MiB above the TEXT_BASE address, to leave enough space for
    U-Boot code and stack itself (grows downwards).

  * SYS_LOAD_ADDR = 0x80000000

    The beginning of RAM. That's where Linux kernel image must be
    loaded.

  * SYS_MALLOC_LEN = 0x81f000

    8 MiB for malloc() + ENV_SIZE (128 KiB)

  * SYS_MALLOC_F_LEN = 0x4000

    Increase malloc() pool size available before relocation from 8 KiB
    (default) to 16 KiB. Otherwise "alloc space exhausted" message
    appears in U-Boot log during board_init_f() stage. There are next
    reasons for doing so:

      1. Having "bootph-all" flags in some dts nodes leads to binding
         those during pre-relocation stage, and binding (DM) uses
         dynamic memory allocation
      2. clk-exynos850 driver uses CCF clocks, which in turn use dynamic
         memory allocation

Device tree file was imported from Linux kernel. All nodes and boot
phase flags added in exynos850-e850-96-u-boot.dtsi are only needed to
enable serial console:

  * oscclk -> cmu_top -> cmu_peri: generate UART/USI clocks
  * pinctrl_alive and uart1_pins: needed to mux UART pins
  * pmu_system_controller: configures AP UART path to uart1_pins
  * usi_uart: configures USI block to operate as a UART protocol
  * serial_0: enables serial console (UART)

[1] https://www.96boards.org/product/e850-96b/
[2] https://www.96boards.org/products/mezzanine/

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoarm: exynos: Add Exynos850 SoC support
Sam Protsenko [Thu, 11 Jan 2024 03:09:07 +0000 (21:09 -0600)] 
arm: exynos: Add Exynos850 SoC support

Samsung Exynos850 is ARMv8-based mobile-oriented SoC. It features
Cortex-A55 CPU (8 cores) and it's built using 8nm process.

Add Exynos850 support by enabling next features:

  * Import Exynos850 SoC dtsi files from Linux kernel
  * Add Exynos850 MMU memory map
  * Introduce ARCH_EXYNOS9 platform config option

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoserial: s5p: Add Exynos850 compatible
Sam Protsenko [Thu, 11 Jan 2024 03:09:06 +0000 (21:09 -0600)] 
serial: s5p: Add Exynos850 compatible

Enable serial support for Exynos850 SoC by adding the corresponding
compatible string. No additional changes needed, the driver works as is
on Exynos850. Related USI and PMU configuration is enabled in separate
drivers. The only other dependencies are clock and pinctrl drivers,
which are already enabled too.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agopinctrl: exynos: Add pinctrl support for Exynos850
Sam Protsenko [Thu, 11 Jan 2024 03:09:05 +0000 (21:09 -0600)] 
pinctrl: exynos: Add pinctrl support for Exynos850

Add pinctrl support for Exynos850 SoC. It was mostly extracted from
corresponding Linux kernel code [1]. Power down modes and external
interrupt data were removed while converting the code for U-Boot, but
everything else was kept almost unchanged.

[1] drivers/pinctrl/samsung/pinctrl-exynos-arm64.c

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoclk: exynos: Add Exynos850 clock driver
Sam Protsenko [Thu, 11 Jan 2024 03:09:04 +0000 (21:09 -0600)] 
clk: exynos: Add Exynos850 clock driver

Heavily influenced by its Linux kernel counterpart. It's implemented on
top of recently added Samsung CCF clock framework API. For now only UART
leaf clocks are implemented, along with all preceding clocks in CMU_TOP
and CMU_PERI. The UART baud clock is required in the serial driver, to
get its rate for the consequent baud rate calculation.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoclk: exynos: Add Samsung clock framework
Sam Protsenko [Thu, 11 Jan 2024 03:09:03 +0000 (21:09 -0600)] 
clk: exynos: Add Samsung clock framework

Heavily based on Linux kernel Samsung clock framework, with some changes
to accommodate the differences in U-Boot CCF implementation. It's also
quite minimal as compared to the Linux version.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoclk: exynos: Move pll code into clk-exynos7420
Sam Protsenko [Thu, 11 Jan 2024 03:09:02 +0000 (21:09 -0600)] 
clk: exynos: Move pll code into clk-exynos7420

PLL utilities code is only used by clk-exynos7420 driver at the moment.
Move it into clk-exynos7420 to make clk-pll.c file available for CCF PLL
clocks implementation, which is coming in the next patches.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agosoc: samsung: Add Exynos PMU driver
Sam Protsenko [Thu, 11 Jan 2024 03:09:01 +0000 (21:09 -0600)] 
soc: samsung: Add Exynos PMU driver

Add basic Power Management Unit (PMU) driver for Exynos SoCs. For now
it's only capable of changing UART path in PMU, which is needed for
E850-96 board. The driver's structure resembles the exynos-pmu driver
from Linux kernel, and although it's very basic and slim at the moment,
it can be easily extended in future if the need arises.

UCLASS_NOP is used, as there are no benefits in using more elaborate
classes like UCLASS_MISC in this case. The DM_FLAG_PROBE_AFTER_BIND flag
is added in bind function, as the probe function must be always called
for this driver.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agosoc: samsung: Add Exynos USI driver
Sam Protsenko [Thu, 11 Jan 2024 03:09:00 +0000 (21:09 -0600)] 
soc: samsung: Add Exynos USI driver

USIv2 IP-core is found on modern ARM64 Exynos SoCs (like Exynos850) and
provides selectable serial protocol (one of: UART, SPI, I2C). USIv2
registers usually reside in the same register map as a particular
underlying protocol it implements, but have some particular offset. E.g.
on Exynos850 the USI_UART has 0x13820000 base address, where UART
registers have 0x00..0x40 offsets, and USI registers have 0xc0..0xdc
offsets. Desired protocol can be chosen via SW_CONF register from System
Register block of the same domain as USI.

Before starting to use a particular protocol, USIv2 must be configured
properly:
  1. Select protocol to be used via System Register
  2. Clear "reset" flag in USI_CON
  3. Configure HWACG behavior (e.g. for UART Rx the HWACG must be
     disabled, so that the IP clock is not gated automatically); this is
     done using USI_OPTION register
  4. Keep both USI clocks (PCLK and IPCLK) running during USI registers
     modification

This driver implements the above behavior. Of course, USIv2 driver
should be probed before UART/I2C/SPI drivers. It can be achieved by
embedding UART/I2C/SPI nodes inside of the USI node (in Device Tree);
driver then walks underlying nodes and instantiates those. Driver also
handles USI configuration on PM resume, as register contents can be lost
during CPU suspend.

This driver is designed with different USI versions in mind. So it
should be relatively easy to add new USI revisions to it later.

Driver's code was copied over from Linux kernel [1] and adapted
correspondingly for U-Boot API. UCLASS_MISC is used, and although no
misc operations are implemented, it makes it easier to probe the driver
this way (as compared to UCLASS_NOP) and keep the code compact.

[1] drivers/soc/samsung/exynos-usi.c

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agodt-bindings: clock: Add Exynos850 clock controller
Sam Protsenko [Thu, 11 Jan 2024 03:08:59 +0000 (21:08 -0600)] 
dt-bindings: clock: Add Exynos850 clock controller

Add bindings documentation and the header file for Exynos850 clock
controller. It was taken from Linux kernel [1,2].

[1] Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml
[2] include/dt-bindings/clock/exynos850.h

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agodt-bindings: soc: samsung: Add Exynos PMU
Sam Protsenko [Thu, 11 Jan 2024 03:08:58 +0000 (21:08 -0600)] 
dt-bindings: soc: samsung: Add Exynos PMU

Add bindings documentation for Exynos PMU hardware block. It was taken
from Linux kernel [1], but minimized and modified to reflect features
that will be actually supported in U-Boot soon. For example,
the "samsung,uart-debug-1" property is not available in Linux kernel
bindings and only present in U-Boot.

[1] Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agodt-bindings: soc: samsung: Add Exynos USI
Sam Protsenko [Thu, 11 Jan 2024 03:08:57 +0000 (21:08 -0600)] 
dt-bindings: soc: samsung: Add Exynos USI

Add USI bindings documentation and header file. Those are taken from
Linux kernel [1,2], but the documentation was reworked a bit to only
describe the compatibles that will be supported in U-Boot soon.

[1] Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
[2] include/dt-bindings/soc/samsung,exynos-usi.h

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoMerge patch series "omap3: Make SPL_OMAP3_ID_NAND depend on NAND_OMAP_GPMC"
Tom Rini [Mon, 22 Jan 2024 18:30:23 +0000 (13:30 -0500)] 
Merge patch series "omap3: Make SPL_OMAP3_ID_NAND depend on NAND_OMAP_GPMC"

This series results in making it such that with CONFIG_MTD disabled we
then do not prompt the user for a number of memory technology device
related options and so clean up our configuration menu / display.

2 years agomtd: Make CONFIG_MTD be the gate symbol for the menu
Tom Rini [Wed, 10 Jan 2024 18:46:10 +0000 (13:46 -0500)] 
mtd: Make CONFIG_MTD be the gate symbol for the menu

The help for CONFIG_MTD explains that it needs to be enabled for various
things like NAND, etc to be available. It however then doesn't enforce
this dependency and so if you have none of these systems present you
still need to disable a number of options. Fix this by making places
that select/imply one type of flash, but did not do the same, also do
this for "MTD". Make boards which hadn't been enabling MTD already but
need it now, do so. In a few places, disable CONFIG_CMD_MTDPARTS as it
wasn't previously enabled but was now being implied.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agocmd/flash: Make this default y for CFI and NOR only
Tom Rini [Wed, 10 Jan 2024 18:46:09 +0000 (13:46 -0500)] 
cmd/flash: Make this default y for CFI and NOR only

This command is only useful on CFI and NOR type flashes and not others.
Update the dependency so that it's not enabled by default in other
cases. This will lead to a number of platforms no longer building this
command, where it was not useful.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoenv: Make ENV_IS_IN_SPI_FLASH depend on SPI flash being present
Tom Rini [Wed, 10 Jan 2024 18:46:08 +0000 (13:46 -0500)] 
env: Make ENV_IS_IN_SPI_FLASH depend on SPI flash being present

In order for our environment to be present on SPI flash we need to
depend not on the symbol for a SPI controller but rather that SPI flash
of some sort is present. Update the dependencies.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agocmd/mtdparts: Make this select MTD_PARTITIONS
Tom Rini [Wed, 10 Jan 2024 18:46:07 +0000 (13:46 -0500)] 
cmd/mtdparts: Make this select MTD_PARTITIONS

Rather than rely on someone selecting or implying this hidden symbol
that the command requires, select it explicitly.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoomap3: Make SPL_OMAP3_ID_NAND depend on NAND_OMAP_GPMC
Tom Rini [Wed, 10 Jan 2024 18:46:06 +0000 (13:46 -0500)] 
omap3: Make SPL_OMAP3_ID_NAND depend on NAND_OMAP_GPMC

This specific bit logic is used to determine what NAND chip is present
on a board in order to then know what revision of the board we have and
so what DDR chips are present. We can only do this if we have a NAND
chip, and so we will have NAND_OMAP_GPMC enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agocommon: usb-hub: Reset hub port before scanning
Shantur Rathore [Sat, 9 Dec 2023 18:10:56 +0000 (18:10 +0000)] 
common: usb-hub: Reset hub port before scanning

Currently when a hub is turned on, all the ports are powered on.
This works well for hubs which have individual power control.

For the hubs without individual power control this has no effect.
Mostly in these scenarios the hub port is powered before the USB
controller is enabled, this can lead to some devices in unexpected
state.

With this patch, we explicitly reset the port while powering up hub
This resets the port for hubs without port power control and has
no effect on hubs with port power control as the port is still off.

Before this patch AMicro AM8180 based NVME to USB adapter won't be
detected as a USB3.0 Mass Storage device but with this it works as
expected.

Tested working after this patch:
1. AMicro AM8180 based NVME to USB Adapter
2. Kingston DataTraveler 3.0
3. GenesysLogic USB3.0 Hub

The drives were tested while connected directly and via the hub.

Signed-off-by: Shantur Rathore <i@shantur.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 22 Jan 2024 15:59:20 +0000 (10:59 -0500)] 
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- solidrun: clearfog gtr: add serdes configuration (Josua)

2 years agoMerge tag 'u-boot-imx-master-20240122' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 22 Jan 2024 14:47:52 +0000 (09:47 -0500)] 
Merge tag 'u-boot-imx-master-20240122' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

- Allow i.MX8M Plus DHCOM to operate in overdrive mode.
- Allow i.MX8M Plus eDM SBC to operate in overdrive mode.
- Enable the 'kaslrseed' command on DH i.MX8M Plus DHCOM.
- Select LTO by default on i.MX8M.
- Convert pico-dwarf/hobbit-imx6ul to CONFIG_DM_SERIAL.
- Fix 'reset' command on wandboard.

2 years agoMerge commit '3c9bb8fbdc77f6bd56e97597d875d8965db3b96c' of https://github.com/tienfon...
Tom Rini [Mon, 22 Jan 2024 14:35:38 +0000 (09:35 -0500)] 
Merge commit '3c9bb8fbdc77f6bd56e97597d875d8965db3b96c' of https://github.com/tienfong/uboot_mainline

A few small SoCFPGA updates

2 years agoboard: solidrun: clearfog: fix serdes 1 / eth2 speed for clearfog gtr
Josua Mayer [Fri, 12 Jan 2024 13:35:11 +0000 (14:35 +0100)] 
board: solidrun: clearfog: fix serdes 1 / eth2 speed for clearfog gtr

Clearfog GTR connects eth2 / serdes 1 to a 2.5Gbps capable ethernet
switch port. Linux already configures a fixed-link at speed 2500 from
device-tree.

Upgrade serdes 1 rate to 3.125Gbps to support a 2.5Gbps link.

Additionally add comments documenting each serdes' function of clearfog
gtr, which are shared with clearfog pro.

Signed-off-by: Josua Mayer <josua@solid-run.com>
2 years agoarm: mvebu: clearfog gtr: add config option to select serdes0 interface
Josua Mayer [Fri, 12 Jan 2024 13:35:10 +0000 (14:35 +0100)] 
arm: mvebu: clearfog gtr: add config option to select serdes0 interface

Clearfog GTR has an assembly option for a SATA connector, CON18.
It shares the serdes with mini-pcie connector CON3.

Add new kconfig option to select betweenata and pci, defaulting to pci
as it was previously configured in board-file.

Clearfog GTR connects eth2 / serdes 1 to a 2.5Gbps capable ethernet
switch port. Linux already configures a fixed-link at speed 2500 from
device-tree.
Upgrade serdes 1 rate to 3.125Gbps to support a 2.5Gbps network link on
Clearfog GTR.

Signed-off-by: Josua Mayer <josua@solid-run.com>
2 years agoARM: imx: Enable kaslrseed command on DH i.MX8M Plus DHCOM
Marek Vasut [Sat, 20 Jan 2024 00:35:58 +0000 (01:35 +0100)] 
ARM: imx: Enable kaslrseed command on DH i.MX8M Plus DHCOM

Linux 6.6.y with KASLR enabled would print the following message on boot:
"
KASLR disabled due to lack of seed
"
Enable the 'kaslrseed' command so a random number seed can be pulled
from CAAM and inserted into the /chosen node 'kaslr-seed' property of
Linux kernel DT before boot, thus letting KASLR work properly.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agopico-dwarf/hobbit-imx6ul: Convert to CONFIG_DM_SERIAL
Fabio Estevam [Fri, 19 Jan 2024 19:41:34 +0000 (16:41 -0300)] 
pico-dwarf/hobbit-imx6ul: Convert to CONFIG_DM_SERIAL

The conversion to CONFIG_DM_SERIAL is mandatory, so select
this option.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2 years agowandboard: Convert to watchdog driver model
Fabio Estevam [Fri, 19 Jan 2024 17:25:33 +0000 (14:25 -0300)] 
wandboard: Convert to watchdog driver model

Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2 years agoARM: imx: Configure GIC clock parent on Data Modul i.MX8M Plus eDM SBC
Marek Vasut [Fri, 19 Jan 2024 16:08:32 +0000 (17:08 +0100)] 
ARM: imx: Configure GIC clock parent on Data Modul i.MX8M Plus eDM SBC

The CONFIG_SPL_BOARD_INIT lets SPL common code call spl_board_init()
during the SPL start up. On this particular system, spl_board_init()
is used to reconfigure GIC clock parent to PLL2 500M, which is the
configuration expected by the Linux kernel. Enable SPL_BOARD_INIT
and fill in the GIC clock configuration code.

Set GIC clock to 500 MHz for OD VDD_SOC. Kernel driver does not
allow to change it. Should set the clock after PMIC setting done.
Default is 400 MHz (system_pll1_800m with div = 2) set by ROM for
ND VDD_SOC.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoARM: imx: Enable SPL_BOARD_INIT on DH i.MX8M Plus DHCOM
Marek Vasut [Fri, 19 Jan 2024 16:07:54 +0000 (17:07 +0100)] 
ARM: imx: Enable SPL_BOARD_INIT on DH i.MX8M Plus DHCOM

The CONFIG_SPL_BOARD_INIT lets SPL common code call spl_board_init()
during the SPL start up. On this particular system, spl_board_init()
is used to reconfigure GIC clock parent to PLL2 500M, which is the
configuration expected by the Linux kernel. Enable SPL_BOARD_INIT .

Set GIC clock to 500 MHz for OD VDD_SOC. Kernel driver does not
allow to change it. Should set the clock after PMIC setting done.
Default is 400 MHz (system_pll1_800m with div = 2) set by ROM for
ND VDD_SOC.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx8m: Enable LTO by default
Fabio Estevam [Thu, 18 Jan 2024 15:06:39 +0000 (12:06 -0300)] 
imx8m: Enable LTO by default

In an attempt to select ARMV8_SPL_EXCEPTION_VECTORS, the SPL size
could not fit into the internal SRAM of some imx8m targets:

   aarch64:  +   imx8mm_phg
+aarch64-linux-ld.bfd: u-boot-spl section `__u_boot_list' will not fit in region `.sram'
+aarch64-linux-ld.bfd: region `.sram' overflowed by 1824 bytes

Select LTO to prevent that.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agoarm: dts: agilex: Increase reserved memory size to 32MB
Dinesh Maniyam [Fri, 15 Dec 2023 07:21:51 +0000 (15:21 +0800)] 
arm: dts: agilex: Increase reserved memory size to 32MB

The reserved space is extended to 32MB in Linux kernel because
additional space is needed for authorization execution of JIC/RBF file.
U-Boot required to align with Linux.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2 years agoclk: altera: n5x: Fix MEMCLKMGR_EXTCNTRST_C0CNTRST to bit(0)
Dinesh Maniyam [Fri, 15 Dec 2023 07:15:19 +0000 (15:15 +0800)] 
clk: altera: n5x: Fix MEMCLKMGR_EXTCNTRST_C0CNTRST to bit(0)

MEMCLKMGR_EXTCNTRST_C0CNTRST register defined as BIT[0] in documentation
but it is wrongly defined as BIT[7] in u-boot code. This register is used
to hold associated pingpong counter in reset
while PLL and 5:1 mux configuration is changed.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2 years agoarm: socfpga: stratix10: SPI clock support
Dinesh Maniyam [Thu, 7 Dec 2023 07:46:02 +0000 (15:46 +0800)] 
arm: socfpga: stratix10: SPI clock support

This patch is to add SPI clock support for stratix10. Get clock rate
function always returning 0 because the DW-SPI driver get the rate
from clock node in dts but Stratix10 does not support device tree
clock node.To overcome this spi will get the clock_rate directly
from spi clock controller override the weaker function.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2 years agomtd: nand: raw: atmel: Remove duplicate definitions
Alexander Dahl [Tue, 12 Dec 2023 16:04:23 +0000 (17:04 +0100)] 
mtd: nand: raw: atmel: Remove duplicate definitions

These removed definitions were specific to some sam9 SoCs, but not
generic over all at91 SoCs.  The correct SoC specific definitions for
ATMEL_BASE_PMECC are spread over different header files in
arch/arm/mach-at91/include/mach directory.

Fixes a build error on a custon board based on SAMA5D2:

    Building current source for 73 boards (16 threads, 1 job per thread)
           arm:  +   vera2
    +drivers/mtd/nand/raw/atmel/pmecc.c:819: warning: "ATMEL_BASE_PMECC" redefined
    +  819 | #define ATMEL_BASE_PMECC        0xffffe000
    +      |
    +In file included from include/configs/vera2.h:11,
    +                 from include/config.h:3,
    +                 from include/linux/mtd/rawnand.h:16,
    +                 from drivers/mtd/nand/raw/atmel/pmecc.c:44:
    +include/asm/arch/sama5d2.h:171: note: this is the location of the previous definition
    +  171 | #define ATMEL_BASE_PMECC        (ATMEL_BASE_HSMC + 0x70)
    +drivers/mtd/nand/raw/atmel/pmecc.c:820: warning: "ATMEL_BASE_PMERRLOC" redefined
    +  820 | #define ATMEL_BASE_PMERRLOC     0xffffe600
    +include/asm/arch/sama5d2.h:172: note: this is the location of the previous definition
    +  172 | #define ATMEL_BASE_PMERRLOC     (ATMEL_BASE_HSMC + 0x500)

Fixes: a490e1b7c017 ("nand: atmel: Add pmecc driver")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
2 years agoARM: dts: at91: sama5d2: Align more node names with Linux
Alexander Dahl [Tue, 12 Dec 2023 16:04:22 +0000 (17:04 +0100)] 
ARM: dts: at91: sama5d2: Align more node names with Linux

Port from Linux v6.7-rc4.  Should not hurt U-Boot but makes diffing
easier and allows referencing node names in board dts.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
2 years agoARM: dts: at91: sama5d2: Port ebi/nand nodes from linux
Alexander Dahl [Tue, 12 Dec 2023 16:04:21 +0000 (17:04 +0100)] 
ARM: dts: at91: sama5d2: Port ebi/nand nodes from linux

Required for using the new DM based atmel nand driver.
Ported from Linux v6.7-rc4.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
2 years agoARM: dts: at91: sama5d2: Move sfr node
Alexander Dahl [Tue, 12 Dec 2023 16:04:20 +0000 (17:04 +0100)] 
ARM: dts: at91: sama5d2: Move sfr node

Nodes are ordered by register offset.

Fixes: 56246d1e8705 ("ARM: dts: at91: sama5: Add the sfr node")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
2 years agoMerge tag 'efi-2024-04-rc1-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 21 Jan 2024 14:11:33 +0000 (09:11 -0500)] 
Merge tag 'efi-2024-04-rc1-3' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-04-rc1-3

Documentation:

* correct documentation of part_get_bootable()
* remove duplicate word "has" in UEFI documentation

UEFI:

* rename check_disk_has_default_file function
* auto-generate boot option for each blkio device
* auto-generate removable media boot option first
* avoid pointer access after calling efi_delete_handle
* create common function to free struct efi_disk_obj
* return immediately in UCLASS_EFI_LOADER removal

2 years agoefi_loader: return immediately in UCLASS_EFI_LOADER removal
Masahisa Kojima [Fri, 19 Jan 2024 00:45:46 +0000 (09:45 +0900)] 
efi_loader: return immediately in UCLASS_EFI_LOADER removal

In case of UCLASS_EFI_LOADER, EFI handles are managed by
EFI application/driver, we must not delete EFI handles.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: create common function to free struct efi_disk_obj
Masahisa Kojima [Fri, 19 Jan 2024 00:45:45 +0000 (09:45 +0900)] 
efi_loader: create common function to free struct efi_disk_obj

Current error handling of creating raw disk/partition has
following issues.
 - duplicate free for EFI handle, EFI handle is already freed
   in efi_delete_handle()
 - missing free for struct efi_device_path and
   struct efi_simple_file_system_protocol in some error paths

To address those issues, this commit creates the common function
to free the struct efi_disk_obj resources and calls it in case
of error.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoefi_loader: avoid pointer access after calling efi_delete_handle
Masahisa Kojima [Fri, 19 Jan 2024 00:45:44 +0000 (09:45 +0900)] 
efi_loader: avoid pointer access after calling efi_delete_handle

efi_delete_handle() calls efi_purge_handle(), then it finally
frees the EFI handle.
Both diskobj and handle variables in efi_disk_remove() have
the same pointer, we can not access diskobj->dp after calling
efi_delete_handle().

This commit saves the struct efi_device_path pointer before
calling efi_delete_handle(). This commit also fixes the
missing free for volume member in struct efi_disk_obj.

This commit also removes the container_of() calls, and
adds the TODO comment of missing efi_close_protocol() call
for the parent EFI_BLOCK_IO_PROTOCOL.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoefi_loader: auto-generate removable media boot option first
Masahisa Kojima [Fri, 12 Jan 2024 00:19:23 +0000 (09:19 +0900)] 
efi_loader: auto-generate removable media boot option first

This commit auto-generates the boot option for removable
block io devices followed by fixed block io devices.
This is what EDK II reference implementation does.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: auto-generate boot option for each blkio device
Masahisa Kojima [Fri, 12 Jan 2024 00:19:22 +0000 (09:19 +0900)] 
efi_loader: auto-generate boot option for each blkio device

Current efibootmgr auto-generates the boot option for all
disks and partitions installing EFI_SIMPLE_FILE_SYSTEM_PROTOCOL,
while EDK II reference implementation auto-generates the boot option
for all devices installing  EFI_BLOCK_IO_PROTOCOL with
eliminating logical partitions.

This commit modifies the efibootmgr to get aligned to EDK II.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: rename check_disk_has_default_file function
Masahisa Kojima [Fri, 12 Jan 2024 00:19:21 +0000 (09:19 +0900)] 
efi_loader: rename check_disk_has_default_file function

check_disk_has_default_file() function checks if the
architecture-specific default file exists on the block
device, and fills the default file device path if it exists.

Rename the function name to fill_default_file_path().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agopart: correct documentation of part_get_bootable()
Heinrich Schuchardt [Tue, 16 Jan 2024 14:00:20 +0000 (15:00 +0100)] 
part: correct documentation of part_get_bootable()

We have to use 'Return:' to render the description of the return value in
the HTML documentation.

Fixes: f55aa4454ac3 ("part: Add a fallback for part_get_bootable()")
Fixes: dcffa4428d03 ("part: Add a function to find the first bootable partition")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: uefi: remove duplicate word "has"
Wei Ming Chen [Fri, 19 Jan 2024 01:34:14 +0000 (09:34 +0800)] 
doc: uefi: remove duplicate word "has"

There should be only one "has" instead of "has has"

Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoMerge patch series "k3-j721e: beagleboneai: Fix USB"
Tom Rini [Sat, 20 Jan 2024 16:39:13 +0000 (11:39 -0500)] 
Merge patch series "k3-j721e: beagleboneai: Fix USB"

Roger Quadros <rogerq@kernel.org> says:

Hi,

This series fixes USB operation on k3-j721e based boards.

2 years agoconfigs/j721e_beagleboneai64_a72_defconfig: Enable Sierra PHY
Roger Quadros [Fri, 12 Jan 2024 12:49:51 +0000 (14:49 +0200)] 
configs/j721e_beagleboneai64_a72_defconfig: Enable Sierra PHY

This is required for USB Super-Speed operation.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2 years agoarm: dts: k3-j721e-beagleboneai64: Fix USB operation
Roger Quadros [Fri, 12 Jan 2024 12:49:50 +0000 (14:49 +0200)] 
arm: dts: k3-j721e-beagleboneai64: Fix USB operation

Without correct SERDES MUX and Lane control settings
USB0 will be broken. Set the MUX and Lane control devices
to be auto probed so they are configured correctly.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2 years agoarm: dts: k3-j721e: Fix USB0 operation
Roger Quadros [Fri, 12 Jan 2024 12:49:49 +0000 (14:49 +0200)] 
arm: dts: k3-j721e: Fix USB0 operation

Without correct SERDES MUX and Lane control settings
USB0 will be broken. Set the MUX and Lane control devices
to be auto probed so they are configured correctly.

Fixes: 69b19ca67bcb ("arm: dts: k3-j721e: Sync with v6.6-rc1")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
2 years agousb: cdns3: avoid error messages if phys don't exist
Roger Quadros [Fri, 12 Jan 2024 12:49:48 +0000 (14:49 +0200)] 
usb: cdns3: avoid error messages if phys don't exist

The phys property is optional so don't complain
if it doesn't exist in device tree.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2 years agoboard: ti: j721e: Drop SERDES PHY init from board file
Roger Quadros [Fri, 12 Jan 2024 12:49:47 +0000 (14:49 +0200)] 
board: ti: j721e: Drop SERDES PHY init from board file

Since commit 69b19ca67bcb ("arm: dts: k3-j721e: Sync with v6.6-rc1"),
the following error message is seen at u-boot
"Sierra init failed:-19"

Probing and initializing the SERDES PHY from
board file is not a clean solution so drop it.

Proper use case should be via PHY_UCLASS APIs.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2 years agoKconfig: boot: Imply BOOTSTD_DEFAULT when BOOTSTD_FULL=y
Shantur Rathore [Sat, 23 Dec 2023 06:51:59 +0000 (06:51 +0000)] 
Kconfig: boot: Imply BOOTSTD_DEFAULT when BOOTSTD_FULL=y

We need BOOTSTD_DEFAULT when BOOTSTD_FULL is selected.

Signed-off-by: Shantur Rathore <i@shantur.com>
2 years agoMerge tag 'u-boot-stm32-20240119' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Fri, 19 Jan 2024 16:59:28 +0000 (11:59 -0500)] 
Merge tag 'u-boot-stm32-20240119' of https://source.denx.de/u-boot/custodians/u-boot-stm

Add CMDLINE dependecy for CMD_STM32KEY

STM32MP1:
---------
Set stdio to serial on DH STM32MP15xx DHSOM
Fix reset for usart1 in scmi configuration

STM32MP2:
---------
Add BSEC and OTP support for STM32MP25
Fix CONFIG_STM32MP25X flag usage

2 years agostm32mp2: Fix CONFIG_STM32MP25X flag usage
Patrice Chotard [Tue, 9 Jan 2024 14:00:17 +0000 (15:00 +0100)] 
stm32mp2: Fix CONFIG_STM32MP25X flag usage

"#if" was used instead of "#ifdef"

Fixes: 01a701994b05 ("stm32mp2: initial support")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agostm32mp: Add dependencies on CMDLINE for command stm32key
Patrick Delaunay [Mon, 15 Jan 2024 13:30:54 +0000 (14:30 +0100)] 
stm32mp: Add dependencies on CMDLINE for command stm32key

We cannot use stm32key commands without CONFIG_CMDLINE so add the
required condition.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: stm32: Set stdio to serial on DH STM32MP15xx DHSOM
Marek Vasut [Sat, 13 Jan 2024 17:57:27 +0000 (18:57 +0100)] 
ARM: stm32: Set stdio to serial on DH STM32MP15xx DHSOM

In case CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are enabled, the console
stdin, stdout, stderr must be defined in environment. Define the default
settings to fix the following warning on boot:

"
In:    No input devices available!
Out:   No output devices available!
Err:   No error devices available!
"

Sort the default environment as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoMerge branch '2024-01-18-assorted-fixes'
Tom Rini [Fri, 19 Jan 2024 13:46:47 +0000 (08:46 -0500)] 
Merge branch '2024-01-18-assorted-fixes'

- A number of OS boot related cleanups, a number of TI platform
  fixes/cleanups, SMBIOS fixes, tweak get_maintainers.pl to report me
  for more places, fix the "clean the build" pytest and add a bootstage
  pytest, fix PKCS11 URI being omitted in some valid cases, make an iommu
  problem easier to debug on new platforms, nvme and pci improvements,
  refactor image-host code a bit, fix a typo in env setting, add a missing
  dependency for CMD_LICENSE, and correct how we call getchar() in some
  places.

2 years agoarm: Rename STM32MP15x
Patrick Delaunay [Mon, 15 Jan 2024 14:05:57 +0000 (15:05 +0100)] 
arm: Rename STM32MP15x

CONFIG options must not use lower-case letter. Convert this and related
ones to upper case.

Signed-off-by: Simon Glass <sjg@chromium.org
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: Rename STM32MP13x
Patrick Delaunay [Mon, 15 Jan 2024 14:05:56 +0000 (15:05 +0100)] 
arm: Rename STM32MP13x

CONFIG options must not use lower-case letter. Convert this and related
ones to upper case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2 years agoboard: st: stm32mp2: display the board identification
Patrick Delaunay [Mon, 15 Jan 2024 14:05:55 +0000 (15:05 +0100)] 
board: st: stm32mp2: display the board identification

Add the display of the STMicroelectronics board identification saved in OTP
in stm32mp2 checkboard function.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agoboard: st: stm32mp2: add checkboard
Patrick Delaunay [Mon, 15 Jan 2024 14:05:54 +0000 (15:05 +0100)] 
board: st: stm32mp2: add checkboard

Implement the weak function checkboard to identify the used board with
compatible in device tree for the support of stm32mp2 STMicroelectronics
boards.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agostm32mp: activate the command stboard for stm32mp25 boards
Patrick Delaunay [Mon, 15 Jan 2024 14:05:53 +0000 (15:05 +0100)] 
stm32mp: activate the command stboard for stm32mp25 boards

Activate the command stboard for stm32mp25 STMicroelectronics boards,
add the default used OTP identifier and the associated board identifier:
- stm32mp25xx-ev1 = MB1936
- stm32mp25xx-dk = MB1605

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>