]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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.

9 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>
9 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>
9 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>
9 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>
9 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/
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
10 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.

10 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>
10 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>
10 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>
10 months agoPrepare 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>