pandora-u-boot.git
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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.

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

3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 months agoARM: renesas: Rename rmobile_cpuinfo_idx() to renesas_cpuinfo_idx()
Marek Vasut [Tue, 27 Feb 2024 16:05:48 +0000 (17:05 +0100)]
ARM: renesas: Rename rmobile_cpuinfo_idx() to renesas_cpuinfo_idx()

Rename rmobile_cpuinfo_idx() to renesas_cpuinfo_idx() 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>
3 months agoARM: renesas: Rename RMOBILE_CPU_TYPE_* to RENESAS_CPU_TYPE_*
Marek Vasut [Tue, 27 Feb 2024 16:05:47 +0000 (17:05 +0100)]
ARM: renesas: Rename RMOBILE_CPU_TYPE_* to RENESAS_CPU_TYPE_*

Rename RMOBILE_CPU_TYPE_* to RENESAS_CPU_TYPE_* 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_CPU_TYPE_[A-Z0-9]\+\>' | \
  xargs -I {} sed -i 's@\<RMOBILE\(_CPU_TYPE_[A-Z0-9]\+\)\>@RENESAS\1@g' {}
"

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

Rename rmobile_get_cpu_rev_*() to renesas_get_cpu_rev_*() 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_cpu_rev_\(integer\|fraction\)\>' | \
  xargs -I {} sed -i 's@\<rmobile_get_cpu_rev_\(integer\|fraction\)\>@renesas_get_cpu_rev_\1@g' {}
"

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

Rename rmobile_get_cpu_type() to renesas_get_cpu_type() 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_cpu_type\>' | \
  xargs -I {} sed -i 's@\<rmobile_get_cpu_type\>@renesas_get_cpu_type@g' {}
"

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agoARM: renesas: Drop unused pfc-r8a7790.h
Marek Vasut [Tue, 27 Feb 2024 16:05:44 +0000 (17:05 +0100)]
ARM: renesas: Drop unused pfc-r8a7790.h

This file is no longer used, the PFC pin controller driver is
superseded by drivers/pinctrl/renesas/pfc-r8a7790.c which
includes all the details of the hardware. Remove this file.
No functional change.

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

This file is no longer used, the MMCIF controller driver is
superseded by drivers/mmc/sh_mmcif.c which includes all the
details of the hardware. Remove this file include from all
board files and remove the file itself. No functional change.

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

This file is no longer used, the SDHI controller driver is long
superseded by drivers/mmc/renesas-sdhi.c which includes all the
details of the hardware. Remove this file include from all board
files and remove the file itself. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agoARM: renesas: Drop remnants of R8A7740 support
Marek Vasut [Tue, 27 Feb 2024 16:05:41 +0000 (17:05 +0100)]
ARM: renesas: Drop remnants of R8A7740 support

Last board with this SoC has been removed in commit
0fb054b3f7ea ("arm: Remove armadillo-800eva board")
in August 2022. Drop the rest of unused code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
3 months agoMerge branch 'master-riic' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sat, 2 Mar 2024 17:24:25 +0000 (12:24 -0500)]
Merge branch 'master-riic' of https://source.denx.de/u-boot/custodians/u-boot-sh

- New renesas I2C controller driver and new PMIC driver along with
  enablement of them.

3 months agodtoc: avoid invalid escape sequence '\s'
Heinrich Schuchardt [Tue, 27 Feb 2024 21:51:38 +0000 (22:51 +0100)]
dtoc: avoid invalid escape sequence '\s'

\s is not a valid escape sequence in strings.
Mark regular expressions with r''.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 months agopylibfdt: Fix "invalid escape sequence '\w'" in setup.py
Florian Schmaus [Tue, 20 Feb 2024 13:52:48 +0000 (08:52 -0500)]
pylibfdt: Fix "invalid escape sequence '\w'" in setup.py

Once u-boot's build system invokes

python3 scripts/dtc/pylibfdt/setup.py --quiet build_ext --inplace

it may fail with

scripts/dtc/pylibfdt/setup.py:40: SyntaxWarning: invalid escape sequence '\w'
  RE_KEY_VALUE = re.compile('(?P<key>\w+) *(?P<plus>[+])?= *(?P<value>.*)$')

depending on the used Python version.

Explicitly mark the regex string as raw string to avoid the warning.

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 months agoarm: mach-k3: Refactor QoS settings
Aradhya Bhatia [Mon, 12 Feb 2024 10:06:35 +0000 (15:36 +0530)]
arm: mach-k3: Refactor QoS settings

Refactor common QoS code into a new common header file, and the soc
specific setup_qos functions into a common API.

Rename $(soc)_qos_count and $(soc)_qos_data variables to qos_count and
qos_data. When QoS settings of more SoCs are added, only one pair will
be defined at a time, based on the config SOC_K3_$(soc).

This refactoring has been done for 2 major purposes.

- The auto-generated $(soc)_qos_data.c and $(soc)_qos.h files cannot
  have any code that is specific to any bootloader. Those files have to
  remain agnostic of different bootloader implementations and their
  header files.

- The existing implementation was less than ideal and would have enabled
  multiple $(soc)_qos_count and $(soc)_qos_data variables for all SoC
  variants.

Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
3 months agoarm: dts: k3-am625-verdin-r5: Change CPU frequency to 1000MHz
Vitor Soares [Mon, 19 Feb 2024 12:34:08 +0000 (12:34 +0000)]
arm: dts: k3-am625-verdin-r5: Change CPU frequency to 1000MHz

The same U-Boot binary is compatible with multiple Verdin AM62 board
variants. However, some of the SoC models can only operate at a maximum
speed of 1 GHz.

Previously, the boards with lower-speed grades were running at
overclocked speeds, leading to kernel complaints about unsupported
configurations.

To resolve this issue, the operating speed has been decreased to the
maximum allowable value across all Verdin AM62 board variants. As a
result, there is a regression in overall boot time, increasing by around
200 milliseconds for the faster SoC variant.

Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
3 months agoMerge patch series "toradex: fix reset and hardware detection regressions"
Tom Rini [Fri, 1 Mar 2024 14:14:36 +0000 (09:14 -0500)]
Merge patch series "toradex: fix reset and hardware detection regressions"

Francesco Dolcini <francesco.dolcini@toradex.com> says:

This series fixes two regressions affecting multiple Toradex boards
(i.MX, TI and TEGRA based) and targets the current master, e.g. v2024.04
release.

U-Boot `reset` command is broken on all Tordex i.MX6* based SoMs since
v2023.07, this series fixes it enabling the `wdt-reboot` driver.

Since v2024.04-rc1 reading the Toradex configuration block is not working
properly anymore, the serial number and the hardware version are not read
correctly, preventing the board from functioning correctly (wrong mac address,
wrong DT, ...). This is fixed by reading the config block in `EVT_SETTINGS_R`
and adding a toradex sysinfo driver. In addition to that, we now use a random
mac address in case the config block is invalid.

Reported-by: Sahaj Sarup <sahaj.sarup@linaro.org>
Closes: https://lore.kernel.org/all/CAKZ1LvM45MB8N0CqgU+C7i9=Bjb6kqNTxWo2Tv407HKLWtCMkA@mail.gmail.com/
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Closes: https://lore.kernel.org/all/e40ed93bd8f371ec56b8fc451dcb458f3ce6dcba.camel@toradex.com/
Reported-by: Francesco Dolcini <francesco@dolcini.it>
Closes: https://lore.kernel.org/all/ZY2ZDWAQuTlRjV9H@francesco-nb/

3 months agotoradex: imx6*: fix reset using wdt-reboot driver
Parth Pancholi [Fri, 23 Feb 2024 09:11:43 +0000 (10:11 +0100)]
toradex: imx6*: fix reset using wdt-reboot driver

commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()")
introduced a regression that 'reset' command unable to reset
imx6 and imx6ull based Toradex's modules in the u-boot.

This change enables a watchdog-based sysreset driver for
Toradex's colibri-imx6, colibri-imx6ull (with nand and emmc)
and apalis-imx6 which solves the reset command regression on
these modules.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Fixes: 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()")
Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agotoradex: common: Use random mac address if toradex config block is missing
Emanuele Ghidoli [Fri, 23 Feb 2024 09:11:42 +0000 (10:11 +0100)]
toradex: common: Use random mac address if toradex config block is missing

Set CONFIG_NET_RANDOM_ETHADDR=y, which sets random eth address in
case there is no toradex config block programmed.
In case of missing toradex config block the generated mac address was
always the same, linked to serial number 0.
Use random generated mac address instead.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agotoradex: common: Add sysinfo driver
Emanuele Ghidoli [Fri, 23 Feb 2024 09:11:41 +0000 (10:11 +0100)]
toradex: common: Add sysinfo driver

This commit introduces support for the Toradex sysinfo driver in U-Boot,
which uses information from Toradex config block to print correct
board model.
In case the Toradex config block is not present sysinfo prints the model
of the board provided by device tree removing per board specific prints.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agoarm: dts: Refactor device trees using "&{/aliases}" syntax
Emanuele Ghidoli [Fri, 23 Feb 2024 09:11:40 +0000 (10:11 +0100)]
arm: dts: Refactor device trees using "&{/aliases}" syntax

Use the common syntax to define aliases.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agotoradex: common: Use SETTINGS_R event to read toradex config block
Emanuele Ghidoli [Fri, 23 Feb 2024 09:11:39 +0000 (10:11 +0100)]
toradex: common: Use SETTINGS_R event to read toradex config block

Use SETTINGS_R event to read toradex config block and checkboard()
to print board info.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agotoradex: Remove not necessary model prints from checkboard()
Emanuele Ghidoli [Fri, 23 Feb 2024 09:11:38 +0000 (10:11 +0100)]
toradex: Remove not necessary model prints from checkboard()

Sysinfo prints the model obtained from device tree, checkboard()
take info from hardware and tdx_checkboard() use the model retrieved by
toradex config block.

Remove the print from checkboard() function because the model obtained
from toradex config block is the most complete.
If toradex config block is missing the model info from device tree is
enough.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agotoradex: Fix recursive call to checkboard
Emanuele Ghidoli [Fri, 23 Feb 2024 09:11:37 +0000 (10:11 +0100)]
toradex: Fix recursive call to checkboard

Since checkboard() is used instead of show_board_info(), in case toradex
config block is missing or malformed, checkboard is recursively called.
It prints a long list of "MISSING TORADEX CONFIG BLOCK" till the stack
is full.

Fixes: edb0ecd18708 ("toradex: Use checkboard() instead of show_board_info()")
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 1 Mar 2024 14:06:45 +0000 (09:06 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agoboard: rzg2l: Support reset via Renesas RAA215300 PMIC
Paul Barker [Tue, 27 Feb 2024 20:40:35 +0000 (20:40 +0000)]
board: rzg2l: Support reset via Renesas RAA215300 PMIC

With the SYSRESET subsystem enabled we do not need to implement
reset_cpu() in the board directory.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agopmic: raa215300: Bind sysreset driver
Paul Barker [Tue, 27 Feb 2024 20:40:34 +0000 (20:40 +0000)]
pmic: raa215300: Bind sysreset driver

If SYSRESET support is enabled for the RAA215300 PMIC, we need to bind
the raa215300_sysreset driver as a child device of the PMIC.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agosysreset: Support reset via Renesas RAA215300 PMIC
Paul Barker [Tue, 27 Feb 2024 20:40:33 +0000 (20:40 +0000)]
sysreset: Support reset via Renesas RAA215300 PMIC

This patch adds support for resetting a board via the RAA215300 PMIC.

Note that the RAA215300 documentation names the available reset types
differently to u-boot:

  * A "warm" reset via the RAA215300 PMIC will fully reset the SoC
    (CPU & GPIOs), so this corresponds to SYSRESET_COLD.

  * A "cold" reset via the RAA215300 PMIC will cycle all power supply
    rails, so this corresponds to SYSRESET_POWER.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoboard: rzg2l: Enable access to Renesas RAA215300 PMIC
Paul Barker [Tue, 27 Feb 2024 20:40:32 +0000 (20:40 +0000)]
board: rzg2l: Enable access to Renesas RAA215300 PMIC

Enable the appropriate PMIC driver as well as the `pmic` command.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agopmic: Add Renesas RAA215300 PMIC driver
Paul Barker [Tue, 27 Feb 2024 20:40:31 +0000 (20:40 +0000)]
pmic: Add Renesas RAA215300 PMIC driver

The RZ/G2L SMARC module is powered via a Renesas RAA215300 PMIC which
provides several voltage converters, a real time clock (RTC) and reset
control. A basic driver is implemented for this device so that we can
read, write and dump the PMIC registers.

The raa215300_bind() function is added as a stub, binding of the
sysreset driver will be added in a later patch.

Additional features of this PMIC (such as reset control) may be
supported by future patches.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoi2c: rzg2l: Add I2C driver for RZ/G2L family
Paul Barker [Tue, 27 Feb 2024 20:40:30 +0000 (20:40 +0000)]
i2c: rzg2l: Add I2C driver for RZ/G2L family

This driver supports the I2C module on the Renesas RZ/G2L (R9A07G044)
SoC, also known as the RIIC module.

This patch is based on both the u-boot driver in the Renesas RZ BSP
3.0.5 release [1] (commit 7fcc1fdc2534), and the Linux v6.7 driver
(commit 0dd3ee311255).

Support for deblocking the I2C bus is included as this may be needed
after triggering a reset via the Power Management IC (PMIC) over I2C
(the PMIC asserts the reset line before the SoC completes the I2C write
transaction with obvious bus locking effects). If the SDA line is
observed to be low during initialisation, we automatically attempt to
deblock.

[1]: https://github.com/renesas-rz/renesas-u-boot-cip

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoarm: dts: rzg2l: Sync with Linux v6.7
Paul Barker [Tue, 27 Feb 2024 20:40:29 +0000 (20:40 +0000)]
arm: dts: rzg2l: Sync with Linux v6.7

Pull in the recent changes to the RZ/G2L device tree and related dtsi
files so that we're aligned with Linux v6.7 (commit 0dd3ee311255).

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoclk: renesas: Confirm all clock & reset changes on RZ/G2L
Paul Barker [Tue, 27 Feb 2024 20:40:28 +0000 (20:40 +0000)]
clk: renesas: Confirm all clock & reset changes on RZ/G2L

When enabling/disabling a clock or reset signal, confirm that the change
has completed before returning from the function. A somewhat arbitrary
100ms timeout is defined to ensure that the system doesn't lock up in
the case of an error.

Since we need to dynamically determine if we're waiting for a 0 bit or a
1 bit, it's easier to use wait_for_bit_32() than readl_poll_timeout().

This change is needed for reliable initialization of the I2C driver
which is added in a following patch.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agoMerge patch series "Dockerfile: Build coreboot from source"
Tom Rini [Tue, 27 Feb 2024 21:28:57 +0000 (16:28 -0500)]
Merge patch series "Dockerfile: Build coreboot from source"

To make our CI loops more robust, switch to building and providing the
coreboot binary we test with rather than download from a Google Drive
link.

3 months agoCI: Move to latest container image
Tom Rini [Tue, 13 Feb 2024 14:39:28 +0000 (09:39 -0500)]
CI: Move to latest container image

This moves us to our latest container image, which is now based on the
current "Jammy" tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agoCI: Switch to using coreboot from our image
Tom Rini [Tue, 13 Feb 2024 14:39:27 +0000 (09:39 -0500)]
CI: Switch to using coreboot from our image

Instead of downloading coreboot binaries from a Google drive location,
use the ones we have built ourselves.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agoDockerfile: Build coreboot from source
Tom Rini [Tue, 13 Feb 2024 14:39:26 +0000 (09:39 -0500)]
Dockerfile: Build coreboot from source

To make CI runs rely less on external servers, build a coreboot release
from source and populate /opt/coreboot with the output.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agoPrepare v2024.04-rc3 v2024.04-rc3
Tom Rini [Tue, 27 Feb 2024 02:23:36 +0000 (21:23 -0500)]
Prepare v2024.04-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agoMerge tag 'u-boot-imx-master-20240224' of https://source.denx.de/u-boot/custodians...
Tom Rini [Sat, 24 Feb 2024 22:51:50 +0000 (17:51 -0500)]
Merge tag 'u-boot-imx-master-20240224' of https://source.denx.de/u-boot/custodians/u-boot-imx

- Enable the thermal driver for the imx8m phycore boards.
- Convert imx53-qsb to watchdog driver to fix the 'reset' command.
- Remove multiline string from imx6dl-sielaff.
- Add SPI boot support for imxrt1050-evk.
- Convert opos6uldev to watchdog driver to fix the 'reset' command.

3 months agoopos6uldev: Convert to watchdog driver model
Sébastien Szymanski [Fri, 23 Feb 2024 11:28:04 +0000 (12:28 +0100)]
opos6uldev: 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: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agoimx53-qsb: Convert to watchdog driver model
Fabio Estevam [Wed, 21 Feb 2024 17:39:30 +0000 (14:39 -0300)]
imx53-qsb: 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>
3 months agoimx8mm-phygate-tauri-l_defconfig: Enable CONFIG_IMX_TMU
Benjamin Hahn [Tue, 20 Feb 2024 10:41:45 +0000 (11:41 +0100)]
imx8mm-phygate-tauri-l_defconfig: Enable CONFIG_IMX_TMU

Enable the imx thermal driver to prevent booting when the system is too
hot.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
3 months agophycore-imx8mm_defconfig: Enable CONFIG_IMX_TMU
Benjamin Hahn [Tue, 20 Feb 2024 10:41:44 +0000 (11:41 +0100)]
phycore-imx8mm_defconfig: Enable CONFIG_IMX_TMU

Enable the imx thermal driver to prevent booting when the system is too
hot.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
3 months agophycore-imx8mp_defconfig: Enable CONFIG_IMX_TMU
Benjamin Hahn [Tue, 20 Feb 2024 10:41:43 +0000 (11:41 +0100)]
phycore-imx8mp_defconfig: Enable CONFIG_IMX_TMU

Enable the imx thermal driver to prevent booting when the system is too
hot.

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
3 months agoconfigs: imx93_var_som: Add fastboot support.
Mathieu Othacehe [Tue, 20 Feb 2024 10:35:05 +0000 (11:35 +0100)]
configs: imx93_var_som: Add fastboot support.

Enable the `fastboot` command.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
3 months agoconfigs: imx93_var_som: Add USB support.
Mathieu Othacehe [Tue, 20 Feb 2024 10:35:04 +0000 (11:35 +0100)]
configs: imx93_var_som: Add USB support.

Enable the `usb` command and some USB drivers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
3 months agoarm: dts: imx93-var-som-symphony: Add USB support.
Mathieu Othacehe [Tue, 20 Feb 2024 10:35:03 +0000 (11:35 +0100)]
arm: dts: imx93-var-som-symphony: Add USB support.

Enable both usbotg1 and usbotg2 ports.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
3 months agoarm: dts: imx93: Add USB support.
Mathieu Othacehe [Tue, 20 Feb 2024 10:35:02 +0000 (11:35 +0100)]
arm: dts: imx93: Add USB support.

Copied from:
https://lore.kernel.org/linux-devicetree/20240131114324.3722428-6-xu.yang_2@nxp.com/

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
3 months agoboard: imx6dl-sielaff: spl.c: Remove multiline string
Frieder Schrempf [Tue, 20 Feb 2024 09:01:00 +0000 (10:01 +0100)]
board: imx6dl-sielaff: spl.c: Remove multiline string

Remove the malformed multiline string and fix the checkpatch warning.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
3 months agoimx: imxrt1050-evk: Add documentation for SPI boot
Jesse Taube [Mon, 19 Feb 2024 23:01:00 +0000 (18:01 -0500)]
imx: imxrt1050-evk: Add documentation for SPI boot

Add documentation for SPI boot.

Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
3 months agoimx: imxrt1050-evk: Add support for SPI flash booting
Jesse Taube [Mon, 19 Feb 2024 23:00:59 +0000 (18:00 -0500)]
imx: imxrt1050-evk: Add support for SPI flash booting

Add support for booting the imxrt1050-evk from spi.
Add imximage config and the ability for SPL to boot from NOR.
Enable binman in Kconfig and device tree for imxrt* as it is used to
prepend fspi_header.bin to SPL and u-boot.img.

Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
3 months agoMerge tag 'u-boot-amlogic-fixes-20240223' of https://source.denx.de/u-boot/custodians...
Tom Rini [Fri, 23 Feb 2024 17:54:03 +0000 (12:54 -0500)]
Merge tag 'u-boot-amlogic-fixes-20240223' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- fix AVB oom error for Khadas VIM3 Android configs

3 months agoconfigs: khadas-vim3*_android: fix AVB oom error
Mattijs Korpershoek [Fri, 9 Feb 2024 08:58:35 +0000 (09:58 +0100)]
configs: khadas-vim3*_android: fix AVB oom error

When booting Android with AVB enabled, an OOM is observed:

  => avb init ${mmcdev}
  => avb verify _a
  ## Android Verified Boot 2.0 version 1.1.0
  read_is_device_unlocked not supported yet
  read_rollback_index not supported yet
  avb_util.c:182: ERROR: Failed to allocate memory.
  OOM error occurred during verification

A custom malloc length of 128MB is required as documented in
commit 285a83b12bdf ("configs: meson64_android: increase SYS_MALLOC_LEN to 128M for AVB")

However, this 128M custom malloc length was not ported to Kconfig in
commit 7cfbba36e9f8 ("Convert CONFIG_SYS_MALLOC_LEN to Kconfig")

Add it back to fix AVB verification on VIM3/VIM3L.

Fixes: 7cfbba36e9f8 ("Convert CONFIG_SYS_MALLOC_LEN to Kconfig")
Co-developed-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Link: https://lore.kernel.org/r/20240209-vim3-avb-malloc-v1-1-91427d8c19ab@baylibre.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
3 months agoMerge branch 'qcom-fixes-2024.04' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 22 Feb 2024 16:34:59 +0000 (11:34 -0500)]
Merge branch 'qcom-fixes-2024.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-snapdragon

- Two fixes for the qcom-pmic button driver

3 months agoMerge patch series "board/ti: k3 boards: Stop using findfdt"
Tom Rini [Tue, 20 Feb 2024 22:57:52 +0000 (17:57 -0500)]
Merge patch series "board/ti: k3 boards: Stop using findfdt"

Nishanth Menon <nm@ti.com> says:

This is a wide cleanup to switch to setting fdtfile using env_set
instead of scripted magic. 'fdtfile' is expected to be set by default.
This allows the stdboot triggered efi loaders to find the correct OS
device tree file even if regular boot process is interrupted by user
intervention.

3 months agoinclude: env: ti: Drop default_findfdt
Nishanth Menon [Mon, 12 Feb 2024 19:47:26 +0000 (13:47 -0600)]
include: env: ti: Drop default_findfdt

We shouldn't need finfdt anymore. Drop the env script.

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: beagle: beagleplay: Set fdtfile from C code instead of findfdt script
Nishanth Menon [Mon, 12 Feb 2024 19:47:25 +0000 (13:47 -0600)]
board: beagle: beagleplay: Set fdtfile from C code instead of findfdt script

Stop using the findfdt script and switch to setting the fdtfile from C
code.

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: beagle: beagleboneai64: Set fdtfile from C code instead of findfdt script
Nishanth Menon [Mon, 12 Feb 2024 19:47:24 +0000 (13:47 -0600)]
board: beagle: beagleboneai64: Set fdtfile from C code instead of findfdt script

Stop using the findfdt script and switch to setting the fdtfile from C
code.

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: ti: j721s2: Set fdtfile from C code instead of findfdt script
Nishanth Menon [Mon, 12 Feb 2024 19:47:23 +0000 (13:47 -0600)]
board: ti: j721s2: Set fdtfile from C code instead of findfdt script

We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

While at this, replace findfdt in environment with a warning as it is no
longer needed.

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: ti: j721e: Set fdtfile from C code instead of findfdt script
Nishanth Menon [Mon, 12 Feb 2024 19:47:22 +0000 (13:47 -0600)]
board: ti: j721e: Set fdtfile from C code instead of findfdt script

We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

While at this, replace findfdt in environment with a warning as it is no
longer needed.

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: ti: am65x: Set fdtfile from C code instead of findfdt script
Nishanth Menon [Mon, 12 Feb 2024 19:47:21 +0000 (13:47 -0600)]
board: ti: am65x: Set fdtfile from C code instead of findfdt script

We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

While at this, replace findfdt in environment with a warning as it is no
longer needed.

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: ti: am64x: Set fdtfile from C code instead of findfdt script
Nishanth Menon [Mon, 12 Feb 2024 19:47:20 +0000 (13:47 -0600)]
board: ti: am64x: Set fdtfile from C code instead of findfdt script

We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

While at this, replace findfdt in environment with a warning as it is no
longer needed.

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: ti: am62x: Set fdtfile from C code instead of findfdt script
Nishanth Menon [Mon, 12 Feb 2024 19:47:19 +0000 (13:47 -0600)]
board: ti: am62x: Set fdtfile from C code instead of findfdt script

Stop using the findfdt script and switch to setting the fdtfile from
C code.

While at this, replace findfdt in environment with a warning as it is
no longer needed

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: ti: am62ax: Set fdtfile from C code instead of findfdt script
Nishanth Menon [Mon, 12 Feb 2024 19:47:18 +0000 (13:47 -0600)]
board: ti: am62ax: Set fdtfile from C code instead of findfdt script

Stop using the findfdt script and switch to setting the fdtfile from
C code.

While at this, replace findfdt in environment with a warning as it is
no longer needed

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: ti: common: Introduce a common fdt ops library
Nishanth Menon [Mon, 12 Feb 2024 19:47:17 +0000 (13:47 -0600)]
board: ti: common: Introduce a common fdt ops library

Introduce a common fdt operations library for basic device tree
operations that are common between various boards.

The first library to introduce here is the capability to set up
fdtfile as a standard variable as part of board identification rather
than depend on scripted ifdeffery.

Reviewed-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoboard: ti: Add missing common/Kconfig references
Nishanth Menon [Mon, 12 Feb 2024 19:47:16 +0000 (13:47 -0600)]
board: ti: Add missing common/Kconfig references

Add missing board/ti/common/Kconfig references for the platforms that
missed it. The intent is for the common Kconfig to be usable across TI
reference boards as required.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
3 months agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Tue, 20 Feb 2024 13:03:21 +0000 (08:03 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb

3 months agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Tue, 20 Feb 2024 13:02:49 +0000 (08:02 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-samsung

3 months agousb: ehci-mx6: Add i.MX93 support
Mathieu Othacehe [Mon, 19 Feb 2024 17:05:31 +0000 (18:05 +0100)]
usb: ehci-mx6: Add i.MX93 support

i.MX93 uses the same USB IP as i.MX8MM. It can then reuse the ehci-mx6
driver.

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agocommon: usb-hub: Reset USB 3.0 hubs only
Shantur Rathore [Wed, 14 Feb 2024 09:54:03 +0000 (09:54 +0000)]
common: usb-hub: Reset USB 3.0 hubs only

Additional testing of the changes introduced in commit 33e06dcbe57a "common:
usb-hub: Reset hub port before scanning") revealed that some USB 2.0 and 3.0
flash drives didn't work in U-Boot on some Allwinner SoCs that support USB
2.0 interfaces only.  More precisely, some of the tested USB 2.0 and 3.0
flash drives failed to be detected and work on an OrangePi Zero 3, based on
the Allwinner H616 SoC that supports USB 2.0 only, while the same USB flash
drives worked just fine on a Pine64 H64, based on the Allwinner H6 SoC that
supports both USB 2.0 and USB 3.0 interfaces.

The USB ID of the above-mentioned USB 3.0 flash drive that failed to work is
1f75:0917 (Innostor Technology Corporation IS917 Mass storage), it is 32 GB
in size and sold under the PNY brand.  The mentioned USB 2.0 drive is some
inexpensive no-name drive with an invalid USB ID.

Resetting USB 3.0 hubs only, which this patch introduces to the USB hub
resets, has been tested to work as expected, resolving the identified issues
on the Allwinner H616, while not introducing any new issues on other tested
Allwinner SoCs.  Thus, let's fix it that way.

According to the USB 3.0 specification, resetting a USB 3.0 port is required
when an attached USB device transitions between different states, such as
when it resumes from suspend.  Though, the Linux kernel performs additional
USB 3.0 port resets upon initial USB device attachment, as visible in commit
07194ab7be63 ("USB: Reset USB 3.0 devices on (re)discovery") in the kernel
source, to ensure proper state of the USB 3.0 hub port and proper USB mode
negotiation during the initial USB device attachment and enumeration.

These additional types of USB port resets don't exist for USB 2.0 hubs,
according the USB 2.0 specification.  The resets seem to be added to the USB
3.0 specification as part of the port and device mode negotiation.

The Linux kernel resets USB 3.0 (i.e. SuperSpeed) hubs only, as visible in
commit 10d674a82e55 ("USB: When hot reset for USB3 fails, try warm reset.")
in the kernel source.  The check for SuperSpeed hubs is performed in a way
that also applies to newer SuperSpeed Plus (USB 3.1 or 3.2) hubs as well,
which hopefully makes it future proof.

Fixes: 33e06dcbe57a ("common: usb-hub: Reset hub port before scanning")

Link:
https://lore.kernel.org/u-boot/20240207102327.35125-1-i@shantur.com/T/#u
Link:
https://lore.kernel.org/u-boot/20240201164604.13315fa6@donnerap.manchester.arm.com/T/#u

Signed-off-by: Shantur Rathore <i@shantur.com>
Helped-by: Dragan Simic <dsimic@manjaro.org>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
3 months agoMerge tag 'u-boot-imx-master-20240219' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 19 Feb 2024 13:55:17 +0000 (08:55 -0500)]
Merge tag 'u-boot-imx-master-20240219' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

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

- Convert msc_sm2s_imx8mp to DM_SERIAL.
- Make Ethernel functional on msc_sm2s_imx8mp.
- General improvements for msc_sm2s_imx8mp.
- Add suport for the Sielaff i.MX6 Solo board.
- Update GE HealthCare maitainers' e-mail addresses.

3 months agodoc: board: Add minimal documentation for Sielaff i.MX6 Solo board
Frieder Schrempf [Thu, 15 Feb 2024 14:00:36 +0000 (15:00 +0100)]
doc: board: Add minimal documentation for Sielaff i.MX6 Solo board

Describe how to build and boot for the Sielaff i.MX6 Solo board.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
3 months agoboard: Add support for Sielaff i.MX6 Solo board
Frieder Schrempf [Thu, 15 Feb 2024 14:00:35 +0000 (15:00 +0100)]
board: Add support for Sielaff i.MX6 Solo board

The Sielaff i.MX6 Solo board is a control and HMI board for vending
machines. Add support for this board.

The devicetree files are taken from pending changes in the Linux
kernel that are available from linux-next and will likely be
part of Linux v6.9.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
3 months agomtd: spi-nor-ids: Add support for ESMT/EON EN25Q80B
Frieder Schrempf [Thu, 15 Feb 2024 14:00:34 +0000 (15:00 +0100)]
mtd: spi-nor-ids: Add support for ESMT/EON EN25Q80B

The datasheet can be found here:
https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/EN25Q80B_Ver.E.pdf

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agoMAINTAINERS: Update after GEHC spin-off
Ian Ray [Tue, 13 Feb 2024 13:17:06 +0000 (15:17 +0200)]
MAINTAINERS: Update after GEHC spin-off

Update our email addresses, from @ge.com to @gehealthcare.com, after GE
HealthCare was spun-off from GE.

Remove Antti, who no longer works on the project.

Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
3 months agomsc_sm2s_imx8mp: Fix CONFIG_DEFAULT_FDT_FILE
Fabio Estevam [Tue, 13 Feb 2024 11:43:42 +0000 (08:43 -0300)]
msc_sm2s_imx8mp: Fix CONFIG_DEFAULT_FDT_FILE

There is no imx8mp-msc-sm2s.dtb file in upstream Linux.

Change it to imx8mp-msc-sm2s-ep1.dtb.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Ian Ray <ian.ray@gehealthcare.com>
3 months agomsc_sm2s_imx8mp: Add redundant environment support
Fabio Estevam [Tue, 13 Feb 2024 11:43:41 +0000 (08:43 -0300)]
msc_sm2s_imx8mp: Add redundant environment support

Redundant environment support is required for software updates.

Add support for it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Ian Ray <ian.ray@gehealthcare.com>
3 months agoimx8mp-msc-sm2s: Add mmc aliases
Fabio Estevam [Tue, 13 Feb 2024 11:43:40 +0000 (08:43 -0300)]
imx8mp-msc-sm2s: Add mmc aliases

Add mmc alias so that the eMMC is mmc0 and the SD card
is mmc1 to have a well defined device numbering scheme.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Ian Ray <ian.ray@gehealthcare.com>
3 months agomsc_sm2s_imx8mp: Make Ethernet functional
Fabio Estevam [Tue, 13 Feb 2024 11:43:39 +0000 (08:43 -0300)]
msc_sm2s_imx8mp: Make Ethernet functional

Currently, the Ethernet ports are not working.

The Ethernet PHY reset lines are controlled by the TCA6424 I2C GPIO
expander.

The TCA6424 I2C GPIO expander is supported by the CONFIG_DM_PCA953X
driver.

Select the CONFIG_DM_PCA953X option so that the Ethernet PHYs can
go through a proper reset making Ethernet to be functional.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Ian Ray <ian.ray@gehealthcare.com>