]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
8 months agoandroid_ab: Fix ANDROID_AB_BACKUP_OFFSET
Colin McAllister [Tue, 12 Mar 2024 12:57:29 +0000 (07:57 -0500)]
android_ab: Fix ANDROID_AB_BACKUP_OFFSET

Currently, setting CONFIG_AB_BACKUP_OFFSET in a target's defconfig will
not actually enable the #if protected code in android_ab.c. This is
because "CONFIG_" should have been prepended to the config macro, or the
macros defined in kconfig.h could have been used.

The code included by ANDROID_AB_BACKUP_OFFSET has been refactored to no
longer be conditionally compiled by preprocessor conditionals and
instead use C conditionals. This better aligns with the Linux kernel
style guide.

Fixes: 3430f24bc6 ("android_ab: Try backup booloader_message")
Signed-off-by: Colin McAllister <colin.mcallister@garmin.com>
Cc: Joshua Watt <JPEWhacker@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Colin McAllister <colinmca242@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20240312125729.82695-3-colinmca242@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
8 months agoandroid_ab: Add missing semicolon
Colin McAllister [Tue, 12 Mar 2024 12:57:28 +0000 (07:57 -0500)]
android_ab: Add missing semicolon

Found a missing semicolon in code protected by a #if that will never
evaluate to true due to a separate issue. Fixing this issue before
addressing the #if.

Fixes: 3430f24bc6 ("android_ab: Try backup booloader_message")
Signed-off-by: Colin McAllister <colin.mcallister@garmin.com>
Cc: Joshua Watt <JPEWhacker@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Colin McAllister <colinmca242@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Link: https://lore.kernel.org/r/20240312125729.82695-2-colinmca242@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
8 months agoMerge tag 'u-boot-imx-master-20240330' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sat, 30 Mar 2024 18:07:37 +0000 (14:07 -0400)]
Merge tag 'u-boot-imx-master-20240330' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/20122

- Fix reset regression on mx6cuboxi and warp7.
- Fix Fix board revision detection on mx6cuboxi.

8 months agomx6cuboxi: Convert to watchdog driver model
Fabio Estevam [Wed, 27 Mar 2024 14:18:49 +0000 (11:18 -0300)]
mx6cuboxi: 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>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
8 months agowarp7: Convert to watchdog driver model
Fabio Estevam [Wed, 27 Mar 2024 13:46:51 +0000 (10:46 -0300)]
warp7: 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>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
8 months agomx6cuboxi: Fix board revision detection
Fabio Estevam [Wed, 27 Mar 2024 11:49:59 +0000 (08:49 -0300)]
mx6cuboxi: Fix board revision detection

Currently, an i.MX6 Cuboxi board is incorrectly detected
as the HummingBoard model:

U-Boot 2024.04-rc5 (Mar 26 2024 - 15:59:22 +0100)

CPU:   Freescale i.MX6Q rev1.3 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 26C
Reset cause: POR
Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
gpio@20a4000: set_dir_flags: error: gpio GPIO3_8 not reserved
gpio@20a4000: get_value: error: gpio GPIO3_8 not reserved
gpio@20a8000: set_dir_flags: error: gpio GPIO4_4 not reserved
gpio@20a8000: get_value: error: gpio GPIO4_4 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_9 not reserved
gpio@20b0000: get_value: error: gpio GPIO6_9 not reserved
Board: MX6 HummingBoard
DRAM:  2 GiB
...

This error happens because request_detect_gpios() uses the GPIO DM
API, but board_type() still uses the legacy non-DM GPIO API.

Fix it by using the GPIO DM API in board_type() to read the
board revision pins in SPL.

Reported-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
8 months agoMerge tag 'doc-2024-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 28 Mar 2024 20:01:03 +0000 (16:01 -0400)]
Merge tag 'doc-2024-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2024-04-rc6

Documentation:

* man page of 'itest'
* tee: sandbox: fix spelling errors in function documentation

8 months agodoc: add reference to itest in if man-page
Heinrich Schuchardt [Fri, 22 Mar 2024 07:57:31 +0000 (08:57 +0100)]
doc: add reference to itest in if man-page

Add a cross reference to the itest command.

Fix a typo: %s/Example/Examples/.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
8 months agodoc: man-page for itest
Heinrich Schuchardt [Fri, 22 Mar 2024 07:57:30 +0000 (08:57 +0100)]
doc: man-page for itest

Provide a man-page for the itest command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
8 months agotee: sandbox: fix spelling errors
Igor Opaniuk [Mon, 4 Mar 2024 17:44:50 +0000 (18:44 +0100)]
tee: sandbox: fix spelling errors

Fix spelling errors in comments.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
8 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 26 Mar 2024 14:00:21 +0000 (10:00 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- Fix RISC-V falcon mode booting issue

8 months agospl: riscv: opensbi: fix check of PAYLOAD_ARGS_ADDR
Randolph [Fri, 22 Mar 2024 11:36:37 +0000 (19:36 +0800)]
spl: riscv: opensbi: fix check of PAYLOAD_ARGS_ADDR

When Falcon Mode is enabled on RISC-V, use CONFIG_VAL
to check PAYLOAD_ARGS_ADDR, not CONFIG_IS_ENABLED.

Fixes: 10c4ab898c25 ("spl: riscv: falcon: move fdt blob to specified address")
Signed-off-by: Randolph <randolph@andestech.com>
Tested-by: Leo Yu-Chi Liang <ycliang@andestech.com>
8 months agoPrepare v2024.04-rc5
Tom Rini [Tue, 26 Mar 2024 01:55:55 +0000 (21:55 -0400)]
Prepare v2024.04-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
8 months agoMerge tag 'u-boot-amlogic-fixes-20240325' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 25 Mar 2024 12:18:53 +0000 (08:18 -0400)]
Merge tag 'u-boot-amlogic-fixes-20240325' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- fix Ethernet and random MAC's on WeTek Hub/Play2
- fix buffer overflow in serial, mac & usid read

8 months agoboard: amlogic: fix buffler overflow in seria, mac & usid read
Neil Armstrong [Wed, 20 Mar 2024 08:46:11 +0000 (09:46 +0100)]
board: amlogic: fix buffler overflow in seria, mac & usid read

While meson_sm_read_efuse() doesn't overflow, the string is not
zero terminated and env_set*() will buffer overflow and add random
characters to environment.

Acked-by: Viacheslav Bocharov <adeep@lexina.in>
Link: https://lore.kernel.org/r/20240320-u-boot-fix-p200-serial-v2-1-972be646a301@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
8 months agoboard: amlogic: add meson_generate_serial_ethaddr fallback to p200
Christian Hewitt [Sun, 24 Mar 2024 15:19:05 +0000 (15:19 +0000)]
board: amlogic: add meson_generate_serial_ethaddr fallback to p200

Add a fall-back method to generate ethaddr from CPU serial on p200 boards
if the MAC cannot be read from efuse. This prevents random MAC addresses
on the WeTek Hub/Play2 boards.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20240324151905.3817732-3-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
8 months agoARM: dts: fix Ethernet on WeTek Hub/Play2
Christian Hewitt [Sun, 24 Mar 2024 15:19:04 +0000 (15:19 +0000)]
ARM: dts: fix Ethernet on WeTek Hub/Play2

Placing the snps,reset content needed for Ethernet to probe in a common
uboot.dtsi results in the content not being used and broken Ethernet. Fix
this by creating two board specific dtsi files with the right content.

Fixes: 67d5128df950 ("ARM: dts: add support for WeTek Hub and WeTek Play2")
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20240324151905.3817732-2-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
9 months agoboard: toradex: verdin-am62_r5: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN
Hiago De Franco [Wed, 20 Mar 2024 16:48:45 +0000 (13:48 -0300)]
board: toradex: verdin-am62_r5: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN

Increase the SPL_STACK_R_MALLOC_SIMPLE_LEN to 0x200000 to accommodate the
size of tispl.bin fit image. With the recent upgrade of ti-linux-firmware
from version v9.1.0 to v9.2.5, the size of tispl.bin fit image has
increased to 1.4MB, causing allocation errors in the R5 SPL:

```
alloc space exhausted
Could not get FIT buffer of 1325056 bytes
        check CONFIG_SPL_SYS_MALLOC_SIZE
```

Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
9 months ago.mailmap entry for Masahisa Kojima
Heinrich Schuchardt [Mon, 18 Mar 2024 10:47:16 +0000 (11:47 +0100)]
.mailmap entry for Masahisa Kojima

The Linaro mail address is not valid anymore.

Cc: kojima.masahisa@socionext.com
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Masahisa Kojima <kojima.masahisa@socionext.com>
9 months agoarm: dts: k3-am625-verdin-r5: Change CPU frequency to 800MHz
Joao Paulo Goncalves [Tue, 19 Mar 2024 14:04:27 +0000 (11:04 -0300)]
arm: dts: k3-am625-verdin-r5: Change CPU frequency to 800MHz

The lowest speed grade of Toradex AM62 SoMs is K speed, resulting in a
max value of 800MHz for the CPU operating frequency. A solution with
runtime selection of the CPU frequency is already planned to avoid these
kinds of problems in the future.

Fixes: 8fb8a6d49977 ("arm: dts: k3-am625-verdin-r5:Change CPU frequency to 1000MHz")
Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
9 months agoclk: clk-imx8qm: Add LPUART IPG entries
Fabio Estevam [Fri, 8 Mar 2024 20:13:16 +0000 (17:13 -0300)]
clk: clk-imx8qm: Add LPUART IPG entries

Since commit cc7df0b9e8bc ("serial: lpuart: Enable IPG clock")
the apalis-imx8qm board no longer boots.

The reason is that the imx8qm clock driver does not handle the
LPUART IPG clocks inside get_rate(), set_rate() and enable() functions.

Fix the boot regression by adding the LPUART IPG entries.

Fixes: cc7df0b9e8bc ("serial: lpuart: Enable IPG clock")
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
9 months agoclk: clk-imx8qxp: Add LPUART IPG entries
Fabio Estevam [Fri, 8 Mar 2024 20:13:15 +0000 (17:13 -0300)]
clk: clk-imx8qxp: Add LPUART IPG entries

Since commit cc7df0b9e8bc ("serial: lpuart: Enable IPG clock")
the colibri-imx8qxp board no longer boots.

The reason is that the imx8qxp clock driver does not handle the
LPUART IPG clocks inside get_rate(), set_rate() and enable() functions.

Fix the boot regression by adding the LPUART IPG entries.

Fixes: cc7df0b9e8bc ("serial: lpuart: Enable IPG clock")
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Toradex Colibri iMX8X
Acked-by: Sean Anderson <seanga2@gmail.com>
9 months agoMerge tag 'efi-2024-04-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 21 Mar 2024 12:35:23 +0000 (08:35 -0400)]
Merge tag 'efi-2024-04-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-04-rc5-2

Documentation:

* patman: Properly document the patchwork_url setting
* doc: man-page for if
* colibri-imx8x, apalis-imx8: update board documentation

UEFI:

* correct handling of EFI binary return code
* don't show usage help if EFI binary fails.
* correct error handling for bootefi selftest command

9 months agopatman: Properly document the patchwork_url setting
Douglas Anderson [Mon, 11 Mar 2024 21:02:45 +0000 (14:02 -0700)]
patman: Properly document the patchwork_url setting

The "Series-patchwork-url:" tag description says that it overrides the
settings file but doesn't specify the name of the setting. Elsewhere
in the documentation about the "useful" settings we see a setting that
sounds promising called "patchwork_server" that's actually not a valid
setting. It should be "patchwork_url".

Fix these problems so the doc is right and more useful.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
9 months agodoc: typo Synopis
Heinrich Schuchardt [Sat, 16 Mar 2024 10:09:36 +0000 (11:09 +0100)]
doc: typo Synopis

%s/Synopis/Synopsis/g

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
9 months agodoc: man-page for if
Heinrich Schuchardt [Sat, 16 Mar 2024 09:57:41 +0000 (10:57 +0100)]
doc: man-page for if

Provide a man-page for the if command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
9 months agocmd: bootefi: error handling bootefi selftest
Heinrich Schuchardt [Sat, 16 Mar 2024 09:36:44 +0000 (10:36 +0100)]
cmd: bootefi: error handling bootefi selftest

If bootefi selftest is executed and a problem with the device-tree
installation occurs, efi_install_fdt() writes sensible error messages.
It never returns EFI_INVALID_PARAMETER. It neither makes sense to check
for EFI_INVALID_PARAMETER nor to show the usage help for the bootefi
command in this case.

Fixes: 296faf4f7ef1 ("cmd: bootefi: re-organize do_bootefi()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
9 months agocmd: bootefi: Don't show usage help if EFI binary fails.
Heinrich Schuchardt [Sat, 16 Mar 2024 09:36:43 +0000 (10:36 +0100)]
cmd: bootefi: Don't show usage help if EFI binary fails.

If an EFI binary returns an error code EFI_INVALID_PARAMETER, we show the
usage help for the bootefi command:

    Shell> exit 0x8000000000000002
    ## Application failed, r = 2
    bootefi - Boots an EFI payload from memory

    Usage:
    bootefi <image address>[:<image size>] [<fdt address>]
      - boot EFI payload
    bootefi bootmgr [fdt address]
      - load and boot EFI payload based on BootOrder/BootXXXX variables.

        If specified, the device tree located at <fdt address> gets
        exposed as EFI configuration table.

This makes no sense.

Fixes: 296faf4f7ef1 ("cmd: bootefi: re-organize do_bootefi()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
9 months agoefi_loader: correct handling of EFI binary return code
Heinrich Schuchardt [Sat, 16 Mar 2024 09:36:42 +0000 (10:36 +0100)]
efi_loader: correct handling of EFI binary return code

We should not try to remove protocol interfaces from a NULL handle.
efi_run_image() should always return the return code of the executed EFI
binary.

Fixes: 6422820ac3e5 ("efi_loader: split unrelated code from efi_bootmgr.c")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
9 months agodoc: board: apalis-imx8: Update and improve documentation
Hiago De Franco [Fri, 15 Mar 2024 21:56:57 +0000 (18:56 -0300)]
doc: board: apalis-imx8: Update and improve documentation

Update and improve the building documentation of Apalis iMX8.
The following changes were made:
- imx-atf repository changed to nxp-imx GitHub.
- imx-atf branch updated to 'lf_v2.6'.
- imx-seco updated to version 5.8.7.
- nxp-imx mfgtools link updated to GitHub releases.
- General writing improvements.

Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
9 months agodoc: board: colibri-imx8x: Update and improve documentation
Hiago De Franco [Fri, 15 Mar 2024 21:56:56 +0000 (18:56 -0300)]
doc: board: colibri-imx8x: Update and improve documentation

Update and improve the building documentation of Colibri iMX8X.
The following changes were made:
- imx-atf repository changed to nxp-imx GitHub.
- imx-atf branch updated to 'lf_v2.6'.
- imx-seco updated to version 5.8.7.
- nxp-imx mfgtools link updated to GitHub releases.
- General writing improvements.

Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
9 months agoMerge tag 'u-boot-imx-master-20240317' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sun, 17 Mar 2024 23:43:02 +0000 (19:43 -0400)]
Merge tag 'u-boot-imx-master-20240317' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/19974

- Fix build error when SoM detection on Phytec board.
- Fix sc_misc_otp_fuse_read() error check on colibri-imx8x/apalis-imx8.
- Fix NPU/VPU fdt disable fixup on i.MX8M.

9 months agoarm: imx: imx8m: soc: Fix NPU/VPU fdt disable fixup
Vitor Soares [Fri, 15 Mar 2024 14:44:25 +0000 (14:44 +0000)]
arm: imx: imx8m: soc: Fix NPU/VPU fdt disable fixup

On imx8m[m|p|q].dtsi, upstream Linux uses different names for NPU/VPU
IP block nodes. It leads variants without such HW block having it
enabled by default.

This patch adds the upstream Linux node's paths to the disable list while
keep the compatibility with downstream Linux.

Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
9 months agoapalis-imx8: Fix sc_misc_otp_fuse_read() error check
Fabio Estevam [Wed, 13 Mar 2024 00:59:41 +0000 (21:59 -0300)]
apalis-imx8: Fix sc_misc_otp_fuse_read() error check

Commit bfb3409d676f ("imx: toradex/apalis-imx8: correct SCU API usage")
made an incorrect logic change in the error code check of
sc_misc_otp_fuse_read():

-       if (scierr == SC_ERR_NONE) {
+       if (scierr) {
                /* QP has one A72 core disabled */
                is_quadplus = ((val >> 4) & 0x3) != 0x0;
        }

The other changes in this commit are correct.

sc_misc_otp_fuse_read() returns 0 on a successful fuse read.

This inversion causes board_mem_get_layout() to report incorrect RAM size.

Go back the original error check logic to fix the problem.

Fixes: bfb3409d676f ("imx: toradex/apalis-imx8: correct SCU API usage")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
9 months agocolibri-imx8x: Fix sc_misc_otp_fuse_read() error check
Fabio Estevam [Wed, 13 Mar 2024 00:36:41 +0000 (21:36 -0300)]
colibri-imx8x: Fix sc_misc_otp_fuse_read() error check

Commit aa6e698a7acd ("imx: toradex/colibri-imx8x: correct SCU API usage")
made an incorrect logic change in the error code check of
sc_misc_otp_fuse_read():

-       if (sc_err == SC_ERR_NONE) {
+       if (sc_err) {
                /* DX has two A35 cores disabled */
                return (val & 0xf) != 0x0;
        }

The other changes in this commit are correct.

sc_misc_otp_fuse_read() returns 0 on a successful fuse read.

This inversion causes board_mem_get_layout() to report incorrect RAM size.

Go back the original error check logic to fix the problem.

Fixes: aa6e698a7acd ("imx: toradex/colibri-imx8x: correct SCU API usage")
Reported-by: Hiago De Franco <hiago.franco@toradex.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Toradex Colibri iMX8X 1GB
9 months agoboard: phytec: define get_som_type also when SoM detection is disabled
Benjamin Hahn [Tue, 12 Mar 2024 09:39:11 +0000 (10:39 +0100)]
board: phytec: define get_som_type also when SoM detection is disabled

define the phytec_get_som_type function also when the SoM detection is
disabled.

Fixes:
commit 110d321a56c3 ("board: phytec: common: phytec_som_detection: Add phytec_get_som_type")

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
9 months agoMerge tag 'efi-2024-04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 14 Mar 2024 00:39:46 +0000 (20:39 -0400)]
Merge tag 'efi-2024-04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-04-rc5

Documentation:

* fix Python string escapes
* develop: commands: Fix function prototype
* fix incorrect path Documentation
* fix mistyped "env flags" command
* board: phytec: phycore-am62x: Update artifact names

UEFI:

* Invoke ft_board_setup() before efi_carve_out_dt_rsv()

9 months agoMerge tag 'mips-fixes-for-v2024.04' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Wed, 13 Mar 2024 21:15:46 +0000 (17:15 -0400)]
Merge tag 'mips-fixes-for-v2024.04' of https://source.denx.de/u-boot/custodians/u-boot-mips

- mips: implement __udivdi3 to fix building of SquashFS
- mips: fix bug in cache init on MIPS32r2 or later

9 months agomips: fix change_k0_cca()
Daniel Schwierzeck [Mon, 6 Nov 2023 16:21:59 +0000 (17:21 +0100)]
mips: fix change_k0_cca()

The intention of change_k0_cca() is to read the C0.Config register into
register $t0, update $t0 with the new cache coherency mode passed in $a0
and write back $t0 to C0.Config. With MIPS32 R2 or later instruction
sets, this can be achieved with a single instruction with INS. The
source and destination register of the INS instruction is passed as
first parameter. In case of change_k0_cca() it is register $t0. But
for writing back the updated value to C0.Config, the incorrect $a0
register is used. This is only correct in the MIPS32 R1 code path.

Fix the `mtc0` instruction to write back the value of the $t0 register.
Fix the MIPS32 R1 code path to also store the updated value in $t0.

Reported by user ddqxy138 on Github.
https://github.com/u-boot/u-boot/commit/b838586086af3278bcaead3720c7a18813cf4619

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 months agomips: implement __udivdi3
Linus Walleij [Mon, 18 Sep 2023 06:11:39 +0000 (08:11 +0200)]
mips: implement __udivdi3

Squashfs wasn't compiling because the lldiv() directives
turn into __udivdi3 and we are using private libgcc.

After this squashfs compiles for MIPS.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Bartel Eerdekens <barteleerdekens@gmail.com>
9 months agodoc: fix incorrect path Documentation
Heinrich Schuchardt [Tue, 5 Mar 2024 18:52:04 +0000 (19:52 +0100)]
doc: fix incorrect path Documentation

When copying the build system for Linux we missed to replace some
instances of 'Documentation' by 'doc'.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
9 months agodoc/sphinx: fix Python string escapes
Benjamin Gray [Tue, 5 Mar 2024 18:52:03 +0000 (19:52 +0100)]
doc/sphinx: fix Python string escapes

Python 3.6 introduced a DeprecationWarning for invalid escape sequences.
This is upgraded to a SyntaxWarning in Python 3.12, and will eventually
be a syntax error.

Fix these now to get ahead of it before it's an error.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Message-ID: <20230912060801.95533-3-bgray@linux.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Adapted for U-Boot
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
9 months agodoc: board: phytec: phycore-am62x: Update artifact names
Wadim Egorov [Wed, 28 Feb 2024 08:58:48 +0000 (09:58 +0100)]
doc: board: phytec: phycore-am62x: Update artifact names

Use proper binary artifact names for HSFS devices.
Do not use the *_unsigned binaries.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
9 months agodoc: develop: commands: Fix function prototype
Alexander Dahl [Mon, 26 Feb 2024 15:46:43 +0000 (16:46 +0100)]
doc: develop: commands: Fix function prototype

When using the previous prototype you got a compiler warning like this:

    warning: initialization of 'int (*)(struct cmd_tbl *, int,  int,  char * const*)' from incompatible pointer type 'int (*)(struct cmd_tbl *, int,  int,  const char **)' [-Wincompatible-pointer-types]

Fixes: 3d9640f55cb2 ("doc: expand README.commands")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
9 months agoefi_loader: Don't carve out memory reservations too early
Mark Kettenis [Thu, 15 Feb 2024 23:25:34 +0000 (00:25 +0100)]
efi_loader: Don't carve out memory reservations too early

Moving the efi_carve_out_dt_rsv() call in commit 1be415b21b2d
("efi_loader: create memory reservations in ACPI case")
broke boards that create additional memory reservations in
ft_board_setup() since it is now called before those additional
memory reservations are made.  This is the case for the rk3588
boards and breaks booting OpenBSD on those boards.

Move the call back to its original location and add a call in
the code path used for ACPI.

Fixes: 1be415b21b2d ("efi_loader: create memory reservations in ACPI case")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
9 months agodoc: fix mistyped "env flags" command
Thomas Weißschuh [Sun, 11 Feb 2024 20:18:41 +0000 (21:18 +0100)]
doc: fix mistyped "env flags" command

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
9 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 12 Mar 2024 13:53:06 +0000 (09:53 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

* riscv: lib: improve extension detection
* riscv: sbi: fix display format and global variable storage
* sifive: fu740: reduce DDR speed
* board: starfive vf2: switch to standard boot and fix DTS

9 months agoboard: starfive: maintainer: Add visionfive2 PCIe driver
Minda Chen [Fri, 8 Mar 2024 06:53:36 +0000 (14:53 +0800)]
board: starfive: maintainer: Add visionfive2 PCIe driver

Add PCIe driver file to visionfive2 board MAINTAINERS list.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
9 months agoboard: starfive: Update maintainer of VisionFive v2 board
Minda Chen [Fri, 8 Mar 2024 06:53:35 +0000 (14:53 +0800)]
board: starfive: Update maintainer of VisionFive v2 board

Update the maintainer of Starfive VisionFive v2 board.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
9 months agocmd: sbi: formatting PolarFire Hart Software Services version
Heinrich Schuchardt [Wed, 6 Mar 2024 14:48:52 +0000 (15:48 +0100)]
cmd: sbi: formatting PolarFire Hart Software Services version

The 'PolarFire Hart Software Services' SBI implementation returns the
version of the incorporated OpenSBI. Format the number accordingly.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
9 months agocmd: sbi: Correctly display unknown implementation IDs
Heinrich Schuchardt [Wed, 6 Mar 2024 14:44:02 +0000 (15:44 +0100)]
cmd: sbi: Correctly display unknown implementation IDs

For an unknown implementation ID an output like

    SBI 1.0Unknown implementation ID 16777216
    Extensions:
      sbi_set_timer
      ...

was shown. The number 16777216 is not the implementation ID.

* Show the correct number
* Use a hexadecimal output format
* Add a missing line feed

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
9 months agoriscv: dts: jh7110: Enable PLL node in SPL
Bo Gan [Wed, 6 Mar 2024 03:00:11 +0000 (19:00 -0800)]
riscv: dts: jh7110: Enable PLL node in SPL

Previously PLL node was missing from SPL dts. This caused BUS_ROOT
to stay on OSC clock (24Mhz). As a result, all peripherals have to
run at a much lower frequency, and loading from sdcard/emmc is slow.
Thus, enabling PLL node in dts to fix this.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
9 months agoriscv: cpu: improve multi-letter extension detection in supports_extension()
Conor Dooley [Mon, 4 Mar 2024 23:28:35 +0000 (23:28 +0000)]
riscv: cpu: improve multi-letter extension detection in supports_extension()

The first multi-letter extension after the single-letter extensions does
not have to be preceded by an underscore, which could cause the parser
to mistakenly find a single-letter extension after the start of the
multi-letter portion of the string.
Three letters precede multi-letter extensions (s, x & z), none of which
are valid single-letter extensions. The dt-binding also allows
multi-letter extensions starting with h, but no such extension have been
frozen or ratified, and the unprivileged spec no longer uses "h" as a
prefix for multi-letter hypervisor extensions, having moved to "sh"
instead. For that reason, modify the parser to stop at s, x & z to prevent
this overrun, ignoring h.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
9 months agoriscv: dts: jh7110: fix indentation
Leon M. Busch-George [Mon, 4 Mar 2024 20:51:47 +0000 (21:51 +0100)]
riscv: dts: jh7110: fix indentation

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
9 months agoserial: move sbi_dbcn_available to .data section
Heinrich Schuchardt [Mon, 26 Feb 2024 16:32:26 +0000 (17:32 +0100)]
serial: move sbi_dbcn_available to .data section

U-Boot SPL loads the device-tree directly behind main U-Boot overlapping
the .bss section. reserve_fdt() is called in board_init_f() to relocate the
device-tree to a safe location.

Debug UARTs are enabled before board_init_f(). With sbi_dbcn_available in
the .bss section the device-tree is corrupted when _debug_uart_init() is
called in the SBI serial driver. Move the variable to the .data section.

Link: https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/2054091
Fixes: dfe08374943c ("risc-v: implement DBCN based debug console")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
9 months agoriscv: sifive: fu740: reduce DDR speed from 1866MT/s to 1600MT/s
Thomas Perrot [Thu, 22 Feb 2024 14:52:03 +0000 (15:52 +0100)]
riscv: sifive: fu740: reduce DDR speed from 1866MT/s to 1600MT/s

It appears that there is some timing marginality either in the
board layout or the SoC that results in occasional data corruption
on some boards.
We observed this issue on some of the new HiFive Unmatched RevB
boards during volume production as well as some of the original
HiFive Unmatched boards from 2021 in our possession. This means
that there are other boards out there that might have the issue
too.

We have done some limited testing with DDR4 at 1600MT/s and
faulty boards (failing at 1866MT/s) passed.
We plan further testing after we procure a temperature chamber.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
9 months agostarfive: visionfive2: switch to standard boot
Nam Cao [Wed, 21 Feb 2024 12:00:14 +0000 (13:00 +0100)]
starfive: visionfive2: switch to standard boot

Distro boot scripts are deprecated. Use standard boot instead.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
9 months agoPrepare v2024.04-rc4
Tom Rini [Mon, 11 Mar 2024 17:11:46 +0000 (13:11 -0400)]
Prepare v2024.04-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
9 months agoMerge tag 'u-boot-imx-master-20240311' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 11 Mar 2024 13:22:44 +0000 (09:22 -0400)]
Merge tag 'u-boot-imx-master-20240311' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

- Use TF-A on imx8mp_beacon to fix boot regression.
- Use latest 6.8 dts for imx8mp_beacon.
- Fix the RAM initialization for phycore_imx8mp PCL-070 rev 1.
- Describe the 0087 i.mx8m mini product variant in tdx-cfg-block.

9 months agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 11 Mar 2024 13:05:01 +0000 (09:05 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
9 months agoarm: dts: imx8mp-beacon-kit: Resync DTS with Linux 6.8
Adam Ford [Sun, 10 Mar 2024 16:59:01 +0000 (11:59 -0500)]
arm: dts: imx8mp-beacon-kit: Resync DTS with Linux 6.8

The device tree has evolved over time, so re-sync.  This also
partial reverts one change on the PCIe, because U-Boot doesn't
have a proper driver.  However, since the clock is configured
to generate a 100MHz reference clock by default, a proper driver
isn't really necessary.

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
9 months agotoradex: tdx-cfg-block: add 0087 i.mx8m mini product variant
Joao Paulo Goncalves [Fri, 8 Mar 2024 14:18:01 +0000 (11:18 -0300)]
toradex: tdx-cfg-block: add 0087 i.mx8m mini product variant

Add new product id 0087 Verdin iMX8M Mini Quad 2GB IT.

Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
9 months agoconfigs: imx8mp_beacon: Fall back to using TF-A
Adam Ford [Thu, 7 Mar 2024 11:58:58 +0000 (05:58 -0600)]
configs: imx8mp_beacon: Fall back to using TF-A

When the board was originally added, it enabled some features which
allowed it to bypass Trusted Firmware, but as the feature set of
Linux grew and more features became available, the U-Boot config
options which bypassed TF-A caused issues, so it needs to return
to the standard operating mode of using TF-A or the system no
longer boots.

Fixes: ab53bd43dbde ("arm64: imx: Add support for imx8mp-beacon-kit")
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
9 months agoboard: phycore_imx8mp: Use 2GHz RAM timings for PCL-070 from pcb_rev 1
Benjamin Hahn [Wed, 6 Mar 2024 16:18:32 +0000 (17:18 +0100)]
board: phycore_imx8mp: Use 2GHz RAM timings for PCL-070 from pcb_rev 1

We need to differ between PCL-070 and PCM-070. PCL-070 supports 2GHz RAM
timings from pcb rev 1 or newer. PCM-070 supports 2GHz RAM timings from
pcb rev 3 or newer.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
9 months agoboard: phytec: common: phytec_som_detection: Add phytec_get_som_type
Benjamin Hahn [Wed, 6 Mar 2024 16:18:31 +0000 (17:18 +0100)]
board: phytec: common: phytec_som_detection: Add phytec_get_som_type

Add a function that gets the som_type from the EEPROM.
Add an enum for the som_type.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
9 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Sat, 9 Mar 2024 16:29:48 +0000 (11:29 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-usb

- Singular quirk DT property rename.

9 months agonet: phy: Use PHY MDIO address from DT if available
Marek Vasut [Sun, 28 Jan 2024 01:19:40 +0000 (02:19 +0100)]
net: phy: Use PHY MDIO address from DT if available

In case the PHY is fully described in DT, use PHY MDIO address
from DT directly instead of always using auto-detection. This
also fixes the behavior of 'mdio list' in such DT setup, which
now prints the PHY connected to the MAC correctly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 5 Mar 2024 12:08:55 +0000 (07:08 -0500)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvell

- net: mv88e6xxx: fix missing SMI address initialization (Marek)
- mvebu: turris_omnia: Enable networking via ethernet switch (Marek)
- mvebu: helios-4: add config fragment for spi booting et al (Josua)
- rng: Add Turris Mox rTWM RNG driver (Max)

9 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Tue, 5 Mar 2024 12:08:10 +0000 (07:08 -0500)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi

One fix makes the reboot more robust on some older board, another one
stabilises the initial clock setup on the A10/A20.
Two patches make sure our DRAM init does not actually change the content
of the DRAM array, which allows to use DRAM for Linux' pstore
functionality.
We get SPI support for U-Boot proper for one more SoC, that patch was
lingering around for a while, and should not affect other SoCs, so I am
merging this now.
As an added bonus, we get the defconfig file for a new board, the DT was
already synced from the kernel tree.

The CI looked happy with changes, and I tested them on five different
boards with different SoCs.

9 months agorng: Add Turris Mox rTWM RNG driver
Max Resch [Thu, 15 Feb 2024 16:57:57 +0000 (17:57 +0100)]
rng: Add Turris Mox rTWM RNG driver

A RNG driver for Armada 3720 boards running the Turris Mox rWTM firmware
from CZ.NIC in the secure processor.

Signed-off-by: Max Resch <resch.max@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
9 months agoboard: helios-4: add config fragment for spi booting
Josua Mayer [Fri, 2 Feb 2024 15:13:34 +0000 (16:13 +0100)]
board: helios-4: add config fragment for spi booting

Add a config fragment with required differences for booting from spi
flash instead of sd-card (default).

Settings for environment location are based on vendor u-boot:
https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59

The fragment can be applied on top of helios4_defconfig by make:
make helios4_defconfig spiboot.config

Signed-off-by: Josua Mayer <josua@solid-run.com>
9 months agoarm: mvebu: helios4_defconfig: enable setexpr command
Josua Mayer [Fri, 2 Feb 2024 15:13:33 +0000 (16:13 +0100)]
arm: mvebu: helios4_defconfig: enable setexpr command

Update the helios4 defconfig to enable the 'setexpr' command, which is a
default and useful for various complex boot-scripts.

Signed-off-by: Josua Mayer <josua@solid-run.com>
9 months agoarm: dts: armada-38x-solidrun-microsom: configure i2c0 bus
Josua Mayer [Fri, 2 Feb 2024 15:13:32 +0000 (16:13 +0100)]
arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus

SolidRun Armada-388 SoM has an i2c bus supporting on-som eeprom, and
peripherals on a carrier.
armada-38x.dtsi disables this bus by default, it should be enabled by
som or carrier dts.

Linux has moved i2c0 from helios-4 board dts to som dtsi, including
status, pinctrl and clock speed.
Copy these settings from mainline.

This fixes accessing i2c bus from u-boot commandline.

Signed-off-by: Josua Mayer <josua@solid-run.com>
9 months agoarm: mvebu: turris_omnia: Enable networking via ethernet switch
Marek Mojík [Tue, 19 Dec 2023 09:55:55 +0000 (10:55 +0100)]
arm: mvebu: turris_omnia: Enable networking via ethernet switch

The Turris Omnia contains the Marvell 88E6176 ethernet switch. Add
config options and device tree to enable the support.

Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
Signed-off-by: Marek Behún <kabel@kernel.org>
9 months agonet: mv88e6xxx: fix missing SMI address initialization
Marek Mojík [Wed, 6 Dec 2023 14:35:56 +0000 (15:35 +0100)]
net: mv88e6xxx: fix missing SMI address initialization

The mv88e6xxx driver does not currently initialize the smi_addr field, but
instead keeps the default zero value. This leads to driver being unusable
on devices where the switch is not on address zero of the mdio bus. Fix
this problem by reading the SMI address from device tree.

Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
Reviewed-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
9 months agosunxi: restore modified memory
Andrey Skvortsov [Wed, 27 Dec 2023 21:28:43 +0000 (00:28 +0300)]
sunxi: restore modified memory

Current sunxi DRAM initialisation code does several test accesses to the
DRAM array to detect aliasing effects and so determine the correct
row/column configuration. This changes the DRAM content, which breaks
use cases like soft reset and Linux's ramoops mechanism.

Fix this problem by saving and restoring the content of the DRAM cells
that is used for the test writes.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
9 months agosunxi: reorganize mctl_mem_matches_* functions
Andrey Skvortsov [Wed, 27 Dec 2023 21:28:42 +0000 (00:28 +0300)]
sunxi: reorganize mctl_mem_matches_* functions

mctl_mem_matches and mctl_mem_matches_base identical functions. To
avoid code duplication move them to dram_helpers and make
mctl_mem_matches use generic mctl_mem_matches_base.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
9 months agousb: xhci-dwc3: Fix support for dis_enblslpm_quirk
Jonas Karlman [Sat, 2 Mar 2024 13:09:49 +0000 (13:09 +0000)]
usb: xhci-dwc3: Fix support for dis_enblslpm_quirk

No device tree in U-Boot or linux use the wrong spelling used in code.

Use correct property name as defined in dwc3 bindings.

Fixes: 062790f46131 ("usb: xhci-dwc3: Add USB2 PHY configuration")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Marek Vasut <marex@denx.de>
9 months agoMerge tag 'u-boot-imx-master-20240304' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 4 Mar 2024 20:41:38 +0000 (15:41 -0500)]
Merge tag 'u-boot-imx-master-20240304' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/19817

- Fix i.MX93 OP-TEE support.
- Use the container image for i.MX93 revision A1.
- Fix display regression on opos6uldev.

9 months agovideo: mxsfb: add back imx6ul/imx6ull support
Sébastien Szymanski [Tue, 27 Feb 2024 15:40:02 +0000 (16:40 +0100)]
video: mxsfb: add back imx6ul/imx6ull support

Because of commit bf947d2a4b15 ("imx6ul: synchronise device tree with
linux"), the compatible property of lcdif in imx6ul.dtsi went from

compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif";

to

compatible = "fsl,imx6ul-lcdif", "fsl,imx6sx-lcdif";

without updating the mxsfb driver to match that change.

Add "fsl,imx6sx-lcdif" as a compatible id to fix that.

Fixes: bf947d2a4b15 ("imx6ul: synchronise device tree with linux")
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
9 months agoopos6uldev: make the LCD work again
Sébastien Szymanski [Tue, 27 Feb 2024 15:40:01 +0000 (16:40 +0100)]
opos6uldev: make the LCD work again

Commit 5d7a95f49999 ("imx6ul/imx6ull: synchronise device trees with
linux") removed the display timings from the board device tree whereas
they are still needed by the mxsfb driver.
Add the timings back (the correct ones) in the
imx6ul-opos6uldev-u-boot.dtsi file and remove them from the
opos6uldev.env file.

Update the opos6uldev_defconfig file so that the LCD turns on at boot.

Fixes: 5d7a95f49999 ("imx6ul/imx6ull: synchronise device trees with linux")
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
9 months agoimx9: Update to mx93 A1 chip revision.
Mathieu Othacehe [Mon, 26 Feb 2024 17:48:34 +0000 (18:48 +0100)]
imx9: Update to mx93 A1 chip revision.

Use the latest, mx93a1-ahab-container.img that is compatible with the
i.MX93 A1 revision.

Using mx93a1-ahab-container.img on an A0 chip and conversely causes a boot
failure without any traces on the UART.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
9 months agotools: imx9_image: Reword warning message.
Mathieu Othacehe [Mon, 26 Feb 2024 17:37:19 +0000 (18:37 +0100)]
tools: imx9_image: Reword warning message.

If the optional `tee.bin` OP-TEE binary is missing, the image will still be
functional. Adapt the warning message accordingly.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
9 months agoimx9: Fix OP-TEE support
Mathieu Othacehe [Mon, 26 Feb 2024 17:37:18 +0000 (18:37 +0100)]
imx9: Fix OP-TEE support

This fixes OP-TEE support by:

- Adding tee.bin to container.cfg
- Starting ELE RNG in SPL

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
9 months agosunxi: H616: Add OrangePi Zero 2W board support
Andre Przywara [Tue, 30 Jan 2024 14:16:42 +0000 (14:16 +0000)]
sunxi: H616: Add OrangePi Zero 2W board support

The OrangePi Zero 2W is a tiny development board featuring the Allwinner
H618 SoC, shipping with up to 4GB of LPDDR4 DRAM, a mini-HDMI connector,
two USB Type-C sockets and a 16MB SPI NOR flash.
There is an FPC connector to connect an expansion board, which sports
two more USB Type-A sockets and a 100MBit Ethernet port. Support for
the expansion board is not in the DT yet, probably a DT overlay would
cover this in the future.

Add a defconfig file selecting the right drivers and DRAM options.
Since the .dts file was synced from the Linux kernel repo already, we
just need to add one line to the Makefile to actually build the .dtb.

The DRAM parameters were derived from the values found in the BSP DRAM
drivers on the SPI NOR flash.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
9 months agosunxi: sun4i: add missing sdelay() to clock_init_safe()
Ludwig Kormann [Thu, 1 Feb 2024 08:45:50 +0000 (09:45 +0100)]
sunxi: sun4i: add missing sdelay() to clock_init_safe()

This delay is required after switching the clock source.

See “A20 Reference manual v1.4” Page 50 / section
“1.5.4.16. CPU/AHB/APB0 CLOCK RATIO”: “If the clock
source is changed, at most to wait for 8 present running
clock cycles.”

This is already implemented in clock_set_pll1(), but was
still missing in clock_init_safe().

Signed-off-by: Ludwig Kormann <ludwig.kormann@ict42.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
9 months agoarm: sunxi: Reduce inrush current on Olimex A20-OLinuXino_MICRO configs
Philippe Coval [Sun, 11 Feb 2024 20:52:13 +0000 (21:52 +0100)]
arm: sunxi: Reduce inrush current on Olimex A20-OLinuXino_MICRO configs

This change fix reboot, both configurations
were tested on my Olimex A20 Micro Rev E with debian-12.

This issue was also present and fixed on A20 Lime2 (in 8311e84b18),
quoting Olliver Schinagl:

    The lime2 features a too large capacitor on the LDO3 output, which
    causes the PMIC to shutdown when enabling power. To be able to still
    boot up however, we must gradually enable power on LDO3 for this board.
    We do this by enabling both the inrush quirk and the maximum slope the
    AXP209 supports.

Link: https://bugs.debian.org/1060752
Cc: Olliver Schinagl <oliver@schinagl.nl>
Cc: Priit Laes <plaes@plaes.org>
Cc: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Philippe Coval <rzr@users.sf.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
9 months agospi: sunxi: Add support for R329/D1/R528/T113 SPI controller
Maksim Kiselev [Sat, 11 Nov 2023 13:33:08 +0000 (16:33 +0300)]
spi: sunxi: Add support for R329/D1/R528/T113 SPI controller

These SoCs have two SPI controllers that are quite similar to the SPI
on previous Allwinner SoCs. The main difference is that new SoCs
don't have a clock divider (SPI_CCR register) inside SPI IP.

Instead SPI sample mode should be configured depending on the input clock.

For now SPI input clock source selection is not supported by this driver,
and only HOSC@24MHz can be used as input clock. Therefore, according to
the, manual we could change the SPI sample mode from delay half
cycle(default) to normal.

This patch adds a quirk for this kind of SPI controllers

Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
Tested-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
9 months agoMerge patch series "ARM: renesas: Rename R-Mobile to Renesas"
Tom Rini [Sat, 2 Mar 2024 19:30:25 +0000 (14:30 -0500)]
Merge patch series "ARM: renesas: Rename R-Mobile to Renesas"

Marek Vasut <marek.vasut+renesas@mailbox.org> says:

Rename R-Mobile to Renesas all over the place because the chips are
made by Renesas, while only a subset of them is from the R-Mobile line.

9 months agogit-mailrc: Add renesas entry and update rmobile entry
Marek Vasut [Tue, 27 Feb 2024 16:05:59 +0000 (17:05 +0100)]
git-mailrc: Add renesas entry and update rmobile entry

Add new renesas entry and update rmobile entry to match.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agommc: renesas-sdhi: Rename rmobile_is_gen3_mmc0() to rcar_is_gen3_mmc0()
Marek Vasut [Tue, 27 Feb 2024 16:05:58 +0000 (17:05 +0100)]
mmc: renesas-sdhi: Rename rmobile_is_gen3_mmc0() to rcar_is_gen3_mmc0()

Rename rmobile_is_gen3_mmc0() to rcar_is_gen3_mmc0() because
this particular function is specific to Renesas R-Car Gen3.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Post rename fix ups
Marek Vasut [Tue, 27 Feb 2024 16:05:57 +0000 (17:05 +0100)]
ARM: renesas: Post rename fix ups

Fix up remains of rename from rmobile to renesas,
namely file paths and remaining RMOBILE strings.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Rename arch-/mach-rmobile to arch-/mach-renesas
Marek Vasut [Tue, 27 Feb 2024 16:05:56 +0000 (17:05 +0100)]
ARM: renesas: Rename arch-/mach-rmobile to arch-/mach-renesas

Rename arch-rmobile to arch-renesas and mach-rmobile to mach-renesas
because all the chips are made by Renesas, while only a subset of
them is from the R-Mobile line.

Use the following command to perform the rename, with manual move of
the directories using git mv and manual fix up to arch/arm/Makefile:

"
$ git grep -l '\<\(arch\|mach\)-rmobile\>' | \
  xargs -I {} sed -i 's@\<\(arch\|mach\)-rmobile\>@\1-renesas@g' {}
$ sed -i 's@rmobile@renesas@' board/*/*/Kconfig
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Rename ARCH_RMOBILE to ARCH_RENESAS
Marek Vasut [Tue, 27 Feb 2024 16:05:55 +0000 (17:05 +0100)]
ARM: renesas: Rename ARCH_RMOBILE to ARCH_RENESAS

Rename ARCH_RMOBILE to ARCH_RENESAS because all the chips are made
by Renesas, while only a subset of them is from the R-Mobile
line.

Use the following command to perform the rename:

"
$ git grep -l 'ARCH_RMOBILE' | xargs -I {} sed -i 's@ARCH_RMOBILE@ARCH_RENESAS@g' {}
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Rename rmobile.h to renesas.h
Marek Vasut [Tue, 27 Feb 2024 16:05:54 +0000 (17:05 +0100)]
ARM: renesas: Rename rmobile.h to renesas.h

Rename rmobile.h to renesas.h because all the chips are made
by Renesas, while only a subset of them is from the R-Mobile
line.

Use the following command to perform the rename:

"
$ git grep -l 'include.*rmobile.h' | \
  xargs -I {} sed -i '/include.*rmobile.h/ s@rmobile.h@renesas.h@g' {}
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Rename CONFIG_ARCH_RMOBILE_EXTRAM_BOOT to CONFIG_RENESAS_EXTRAM_BOOT
Marek Vasut [Tue, 27 Feb 2024 16:05:53 +0000 (17:05 +0100)]
ARM: renesas: Rename CONFIG_ARCH_RMOBILE_EXTRAM_BOOT to CONFIG_RENESAS_EXTRAM_BOOT

Rename CONFIG_ARCH_RMOBILE_EXTRAM_BOOT to CONFIG_RMOBILE_EXTRAM_BOOT
because the former symbol does not exist and it is only incorrectly
converted CONFIG_RMOBILE_EXTRAM_BOOT which does exist. Replace the
RMOBILE with RENESAS because all the chips are made by Renesas, while
only a subset of them is from the R-Mobile line.

Use the following command to perform the rename with manual Kconfig.32 fix:

"
$ sed -i 's@CONFIG_ARCH_RMOBILE_EXTRAM_BOOT@CONFIG_RMOBILE_EXTRAM_BOOT@g' board/renesas/*/*
$ sed -i 's@CONFIG_RMOBILE_EXTRAM_BOOT@CONFIG_RENESAS_EXTRAM_BOOT@g' board/renesas/*/*
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Rename ARCH_RMOBILE_BOARD_STRING to ARCH_RENESAS_BOARD_STRING
Marek Vasut [Tue, 27 Feb 2024 16:05:52 +0000 (17:05 +0100)]
ARM: renesas: Rename ARCH_RMOBILE_BOARD_STRING to ARCH_RENESAS_BOARD_STRING

Rename ARCH_RMOBILE_BOARD_STRING to ARCH_RENESAS_BOARD_STRING
because all the chips are made by Renesas, while only a subset
of them is from the R-Mobile line.

Use the following command to perform the rename:

"
$ git grep -l 'ARCH_RMOBILE_BOARD_STRING' | \
  xargs -I {} sed -i 's@ARCH_RMOBILE_BOARD_STRING@ARCH_RENESAS_BOARD_STRING@g' {}
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Rename rmobile_get_prr() to renesas_get_prr()
Marek Vasut [Tue, 27 Feb 2024 16:05:51 +0000 (17:05 +0100)]
ARM: renesas: Rename rmobile_get_prr() to renesas_get_prr()

Rename rmobile_get_prr() to renesas_get_prr() because all the
chips are made by Renesas, while only a subset of them is from
the R-Mobile line.

Use the following command to perform the rename:

"
$ git grep -l '\<rmobile_get_prr\>' | \
  xargs -I {} sed -i 's@\<rmobile_get_prr\>@renesas_get_prr@g' {}
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Simplify weak symbols
Marek Vasut [Tue, 27 Feb 2024 16:05:50 +0000 (17:05 +0100)]
ARM: renesas: Simplify weak symbols

Simplify the weak symbols use in cpu_info.c by using the __weak macro.
The result is identical, but the syntax is much simpler. Furthermore,
drop three more rmobile* symbols which are now unused.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
9 months agoARM: renesas: Rename rmobile_cpuinfo[] to renesas_cpuinfo[]
Marek Vasut [Tue, 27 Feb 2024 16:05:49 +0000 (17:05 +0100)]
ARM: renesas: Rename rmobile_cpuinfo[] to renesas_cpuinfo[]

Rename rmobile_cpuinfo[] to renesas_cpuinfo[] because all
the chips are made by Renesas, while only a subset of them
is from the R-Mobile line.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>