]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
11 months agopico-dwarf/hobbit-imx6ul: Convert to CONFIG_DM_SERIAL
Fabio Estevam [Fri, 19 Jan 2024 19:41:34 +0000 (16:41 -0300)]
pico-dwarf/hobbit-imx6ul: Convert to CONFIG_DM_SERIAL

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

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

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

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

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

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

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

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

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

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

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

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

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

Select LTO to prevent that.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
11 months agoMerge patch series "k3-j721e: beagleboneai: Fix USB"
Tom Rini [Sat, 20 Jan 2024 16:39:13 +0000 (11:39 -0500)]
Merge patch series "k3-j721e: beagleboneai: Fix USB"

Roger Quadros <rogerq@kernel.org> says:

Hi,

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

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

This is required for USB Super-Speed operation.

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

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

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

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

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

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

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

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

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

Proper use case should be via PHY_UCLASS APIs.

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

We need BOOTSTD_DEFAULT when BOOTSTD_FULL is selected.

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

Add CMDLINE dependecy for CMD_STM32KEY

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

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

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

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

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

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

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

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

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

Sort the default environment as well.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Add support of BSEC for STM32MP25x family to access OTP.

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

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

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

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

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

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

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

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

Fixes: 6cccc8d396bf ("ARM: dts: stm32: add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
11 months agoMerge tag 'u-boot-rockchip-20240119' of https://source.denx.de/u-boot/custodians...
Tom Rini [Fri, 19 Jan 2024 13:02:58 +0000 (08:02 -0500)]
Merge tag 'u-boot-rockchip-20240119' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Add board: rk3328 FriendlyARM NanoPi R2C Plus, rk3588 Turing RK1 SoM;
- Enable SPI boot for rk3588 and rk3528;
- Set boot device in SPL as common code;
- other misc fixes;

11 months agorockchip: rk3128: remove noop file
Quentin Schulz [Thu, 18 Jan 2024 13:56:00 +0000 (14:56 +0100)]
rockchip: rk3128: remove noop file

arch_cpu_init is already returning 0 in its weak definition in
common/board_f.c so let's just remove the file entirely since nothing
else is done in it.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agorockchip: remove unused global data ptr
Quentin Schulz [Thu, 18 Jan 2024 13:55:59 +0000 (14:55 +0100)]
rockchip: remove unused global data ptr

Remove leftover import and global data ptr from files since they aren't
used anymore.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agorockchip: find U-boot proper boot device by inverting the logic that sets it
Quentin Schulz [Thu, 18 Jan 2024 13:55:58 +0000 (14:55 +0100)]
rockchip: find U-boot proper boot device by inverting the logic that sets it

BOOT_DEVICE_* is set by spl_node_to_boot_device() depending on the block
device number associated with the MMC device the SPL used to load U-Boot
proper from. It is NOT related to the mmc alias in the Device Tree.

For SPI flashes, all SPI flashes will return BOOT_DEVICE_SPI so there's
currently no way to know from which one the SPL loaded U-Boot proper
from. Therefore, let's just find the first valid candidate in
/chosen/u-boot,spl-boot-order that is a SPI flash and return that path.
This is a best effort.

While the original implementation may have worked, using the exact same
mechanism but in inverted fashion makes it less likely to have
surprising corner-cases or side-effects.

A nice side-effect is that all existing and future Rockchip SoCs now
automatically have their /chosen/u-boot,spl-boot-device set.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agorockchip: factor out spl_perform_fixups into common spl-boot-order
Quentin Schulz [Thu, 18 Jan 2024 13:55:57 +0000 (14:55 +0100)]
rockchip: factor out spl_perform_fixups into common spl-boot-order

All SoCs are susceptible to wanting to know which storage medium was
used to load U-Boot SPL. So instead of reimplementing the same functions
in SoCs over and over again (here just rk3399 and px30 but rk3588 is
coming), let's just put all this in common into spl-boot-order.c
allowing to support a new SoC just by defining the spl_boot_devices
array in the appropriate SoC file.

Note that spl_perform_fixups() now calls spl_image_fdt_addr() to get the
address of the fdt instead of directly reading the
spl_image_info->fdt_addr member, because that member is not guaranteed
to be present (guarded with compile flags). This is essential because we
move the logic away from px30 and rk3399 which had those compile flags
enabled to code run for all Rockchip SoCs.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agorockchip: px30: simplify logic for getting SPL boot medium DT node
Quentin Schulz [Thu, 18 Jan 2024 13:55:56 +0000 (14:55 +0100)]
rockchip: px30: simplify logic for getting SPL boot medium DT node

In preparation of moving spl_perform_fixups to spl-boot-order.c, let's
simplify the logic around mapping the BOOT_DEVICE_x enum index to a DT
node by using an instantiated array of chars instead of creating a new
data structure on the fly.
This will make it easier to factor out the code handling the SPL boot
medium detection by having spl_decode_boot_device common to all SoCs.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agorockchip: rk3399: simplify logic for getting SPL boot medium DT node
Quentin Schulz [Thu, 18 Jan 2024 13:55:55 +0000 (14:55 +0100)]
rockchip: rk3399: simplify logic for getting SPL boot medium DT node

In preparation of moving spl_perform_fixups to spl-boot-order.c, let's
simplify the logic around mapping the BOOT_DEVICE_x enum index to a DT
node by using an instantiated array of chars instead of creating a new
data structure on the fly.

This will make it easier to factor out the code handling the SPL boot
medium detection by having spl_decode_boot_device common to all SoCs.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agodoc: board: anbernic: Update rgxx3 to add new boards
Chris Morgan [Tue, 2 Jan 2024 15:46:54 +0000 (09:46 -0600)]
doc: board: anbernic: Update rgxx3 to add new boards

Update the RGxx3 documentation to note that it now supports the
RG-ARC-D, RG-ARC-S, Powkiddy RK2023, and Powkiddy RGB30. Also update
verbiage around panel detection to note that it is no longer hard coded
to the RG503.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agoboard: rockchip: Add support for new boards to RGxx3
Chris Morgan [Tue, 2 Jan 2024 15:46:53 +0000 (09:46 -0600)]
board: rockchip: Add support for new boards to RGxx3

Add support for the Anbernic RG-ARC-D, Anbernic RG-ARC-S, Powkiddy
RK2023, and Powkiddy RGB30 to the Anbernic RGxx3. While the Powkiddy
devices are manufactured by Powkiddy instead of Anbernic,
the hardware is so similar they can all use the same bootloader.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: board: Add board_rng_seed() for all Rockchip devices
Chris Morgan [Tue, 2 Jan 2024 15:46:52 +0000 (09:46 -0600)]
rockchip: board: Add board_rng_seed() for all Rockchip devices

Allow all rockchip devices to use the hardware RNG to seed Linux
RNG.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agoboard: rockchip: Refactor panel auto-detect code
Chris Morgan [Tue, 2 Jan 2024 15:46:48 +0000 (09:46 -0600)]
board: rockchip: Refactor panel auto-detect code

Make the inability to detect a panel using the auto detection code not
fail the entire boot process. This means that if the panel ID cannot
be read we don't set an environment variable for the panel, and if an
environment variable for the panel is not set we don't attempt to
update the compatible string. Changes to the code also ensure that
when there are multiple compatible strings required for the panel
we use them both, which solves some issues that will pop up soon
for the Linux driver.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: rk3328: Set efuse auto mode and timing control
Jonas Karlman [Sun, 7 Jan 2024 18:18:33 +0000 (18:18 +0000)]
rockchip: rk3328: Set efuse auto mode and timing control

Reading from efuse return zero when mainline TF-A is used.

  => dump_efuse
  00000000: 00 00 00 00  ....
  00000004: 00 00 00 00  ....
  00000008: 00 00 00 00  ....
  0000000c: 00 00 00 00  ....
  00000010: 00 00 00 00  ....
  00000014: 00 00 00 00  ....
  00000018: 00 00 00 00  ....
  0000001c: 00 00 00 00  ....

However, when vendor TF-A blobs is used reading from efuse works.

Change to use auto mode, enable finish and auto access err interrupts
and set timing control using same values that vendor TF-A blob use to
fix this.

With this efuse can be read when either of mainline TF-A or vendor blob
is used.

  => dump_efuse
  00000000: 52 4b 33 82  RK3.
  00000004: 00 fe 21 55  ..!U
  00000008: 52 4b 57 34  RKW4
  0000000c: 35 30 32 39  5029
  00000010: 00 00 00 00  ....
  00000014: 08 25 0c 0f  .%..
  00000018: 02 0d 08 00  ....
  0000001c: 00 00 f0 00  ....

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: theobroma-systems: fix modified boot_targets detection
Quentin Schulz [Wed, 17 Jan 2024 17:59:13 +0000 (18:59 +0100)]
rockchip: theobroma-systems: fix modified boot_targets detection

U-Boot proper automatically modifies boot_targets to swap the order in
which MMC storage media are used for standard boot based on which MMC
storage medium was used to load U-Boot proper. This is however only done
if the user has not changed it manually, therefore a check between the
default and current value is done.

This used to work fine until the migration to standard boot where
boot_targets value size in the default environment went above the 32
characters that env_get_default function can return, thus resulting in a
truncated variable.

Therefore the check between default and current value would always fail.

By using the newly added env_get_default_into function, a buffer of
the appropriate size can be allocated on the stack to get the whole
value of boot_targets in the default environment and thus fixing the
check.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agoenv: migrate env_get_default to call env_get_default_into
Quentin Schulz [Wed, 17 Jan 2024 17:59:12 +0000 (18:59 +0100)]
env: migrate env_get_default to call env_get_default_into

Since both functions share a similar goal and env_get_default_into can
do what env_get_default wants to do with specific arguments, let's make
env_get_default call env_get_default_into so as to avoid code
duplication.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agoenv: allow to copy value from default environment into a buffer
Quentin Schulz [Wed, 17 Jan 2024 17:59:11 +0000 (18:59 +0100)]
env: allow to copy value from default environment into a buffer

env_get_default suffers from a particular issue int that it can only
return a value truncated to gd->env_buf (32) characters. This may be
enough for most variables but it isn't for others, so let's allow users
to provide a preallocated buffer to copy the value into instead,
allowing for more control, though it'll still be truncated if the value
size is bigger than the preallocated buffer.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
11 months agorockchip: ringneck-px30/puma-rk3399: factor out storage medium selection
Quentin Schulz [Wed, 17 Jan 2024 17:59:10 +0000 (18:59 +0100)]
rockchip: ringneck-px30/puma-rk3399: factor out storage medium selection

Ringneck PX30 and Puma RK3399 both have the same expectation with regard
to bootstd device order and U-Boot environment storage device, except
that Puma RK3399 also supports SPI Flash.

Let's move all of this into a common file where common logic can be put.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: puma-rk3399: do not hardcode MMC controller paths
Quentin Schulz [Wed, 17 Jan 2024 17:59:09 +0000 (18:59 +0100)]
rockchip: puma-rk3399: do not hardcode MMC controller paths

To prepare to put the similar logic around storage medium selection for
Ringneck PX30 and Puma RK3399 in common, let's not use hardcoded paths
but use uclass functions instead to find udevice based on their DT node
full path.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: ringneck-px30: do not hardcode MMC controller paths
Quentin Schulz [Wed, 17 Jan 2024 17:59:08 +0000 (18:59 +0100)]
rockchip: ringneck-px30: do not hardcode MMC controller paths

To prepare to put the similar logic around storage medium selection for
Ringneck PX30 and Puma RK3399 in common, let's not use hardcoded paths
but use uclass functions instead to find udevice based on their DT node
full path.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agoboard: rockchip: Add the Turing RK1 SoM
Joshua Riek [Wed, 10 Jan 2024 01:30:24 +0000 (20:30 -0500)]
board: rockchip: Add the Turing RK1 SoM

The Turing RK1 is a Rockchip RK3588 based SoM from Turing Machines.

Specifications:

    Rockchip RK3588 SoC
    4x ARM Cortex-A76, 4x ARM Cortex-A55
    8/16/32GB memory LPDDR4x
    Mali G610MC4 GPU
    32GB eMMC HS400
    2x USB 2.0, 2x USB 3.0
    2x MIPI CSI 4x lanes
    1x MIPI-DSI DPHY 2x lanes
    PCIe 2.0 x1, PCIe 3.0 x4
    1x HDMI 2.1 output, 1x DP 1.4 output
    Gigabit Ethernet
    Size: 69.6mm x 45mm (260-pin SO-DIMM connector)

Kernel commit:
2806a69f3fef ("arm64: dts: rockchip: Add Turing RK1 SoM support")

Signed-off-by: Joshua Riek <jjriek@verizon.net>
Tested-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: rk3588s-orangepi-5: Build SPI image
Jonas Karlman [Fri, 17 Nov 2023 23:24:37 +0000 (23:24 +0000)]
rockchip: rk3588s-orangepi-5: Build SPI image

Enable building of the SPI image, u-boot-rockchip-spi.bin, now that we
know what bootsource id values BootRom use for SPI flash on RK3588.

Fixes: 28c5f941edf7 ("board: rockchip: Add Xunlong Orange Pi 5")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: rk3588-orangepi-5-plus: Build SPI image
Slawomir Stepien [Fri, 17 Nov 2023 23:24:36 +0000 (23:24 +0000)]
rockchip: rk3588-orangepi-5-plus: Build SPI image

Enable building of the SPI image, u-boot-rockchip-spi.bin, now that we
know what bootsource id values BootRom use for SPI flash on RK3588.

Fixes: b51cf8bb09b6 ("board: rockchip: Add Xunlong Orange Pi 5 Plus")
Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: rk3588-nanopc-t6: Build SPI image
John Clark [Fri, 17 Nov 2023 23:24:35 +0000 (23:24 +0000)]
rockchip: rk3588-nanopc-t6: Build SPI image

Enable building of the SPI image, u-boot-rockchip-spi.bin, now that we
know what bootsource id values BootRom use for SPI flash on RK3588.

Fixes: b0b8086898f8 ("board: rockchip: add FriendlyElec NanoPC-T6 rk3588 board")
Signed-off-by: John Clark <inindev@gmail.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: rk3588: Fix boot from SPI flash
Jonas Karlman [Fri, 17 Nov 2023 23:24:34 +0000 (23:24 +0000)]
rockchip: rk3588: Fix boot from SPI flash

The commit fd6e425be243 ("rockchip: rk3588-rock-5b: Enable boot from SPI
NOR flash") added a new BROM_BOOTSOURCE_SPINOR_RK3588 with value 6.

At the time the reason for this new bootsource id value 6 was unknown.

We now know that the BootRom on RK3588 use different bootsource id
values depending on the iomux used by the flash spi controller, and not
by the type of spi nor or spi nand flash used.

Add the following enum values and use them for RK3588 boot_devices.

- BROM_BOOTSOURCE_FSPI_M0 = 3
- BROM_BOOTSOURCE_FSPI_M1 = 4
- BROM_BOOTSOURCE_FSPI_M2 = 6

Fixes: fd6e425be243 ("rockchip: rk3588-rock-5b: Enable boot from SPI NOR flash")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Slawomir Stepien <sst@poczta.fm>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agoboard: rockchip: Add support for FriendlyARM NanoPi R2C Plus
Tianling Shen [Sat, 23 Dec 2023 04:00:07 +0000 (12:00 +0800)]
board: rockchip: Add support for FriendlyARM NanoPi R2C Plus

The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board
eMMC flash (8G) included.

The device tree is taken from the kernel v6.5.

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agoarm: dts: rockchip: rk3288: move to 64 bit reg size
Johan Jonker [Wed, 27 Dec 2023 12:06:47 +0000 (13:06 +0100)]
arm: dts: rockchip: rk3288: move to 64 bit reg size

To make automatic Rockchip DT syncing possible from Linux to U-boot prepare
rk3288.dtsi by moving to 64 bit reg size.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: rk35xx: expand space for decompressed kernel
Hugh Cole-Baker [Tue, 26 Dec 2023 16:43:30 +0000 (16:43 +0000)]
rockchip: rk35xx: expand space for decompressed kernel

An uncompressed 6.7.0-rc1 Linux kernel Image built with the arm64
defconfig is about 40MB. This does not fit in to the space between
kernel_comp_addr_r and fdt_addr_r, so when uncompressing an Image.gz
to this size, the FDT will be overwritten. Rearrange addresses to have
128MiB for the kernel and its decompression buffer, then devicetree,
overlay and ramdisk at the end.

Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agorockchip: board: Remove dwc3 usb init and gadget handler functions
Jonas Karlman [Sun, 12 Nov 2023 17:48:58 +0000 (17:48 +0000)]
rockchip: board: Remove dwc3 usb init and gadget handler functions

Remove board_usb_init() and dm_usb_gadget_handle_interrupts() functions
related to dwc3, they use e.g. a hard-coded reg address for RK3399 and
are obsolete with use of DM_USB_GADGET.

Use of DM_USB_GADGET, USB_DWC3_GENERIC and USB_DWC3_GADGET have replaced
same feature provided by the removed functions on RK3399 boards.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agoconfigs: rockchip: Use dwc3-generic driver on RK3328 and RK3399
Jonas Karlman [Sun, 12 Nov 2023 17:48:57 +0000 (17:48 +0000)]
configs: rockchip: Use dwc3-generic driver on RK3328 and RK3399

Complete the transition away from xhci-dwc3 and dwc3-of-simple drivers
and change to use the dwc3-generic driver on remaining RK3328 and RK3399
boards.

MISC, USB_DWC3 and USB_DWC3_GENERIC is enabled on boards that used to
enable USB_XHCI_DWC3. USB_XHCI_DWC3 is dropped from updated boards along
with the default y of USB_XHCI_DWC3_OF_SIMPLE.

There is no intended change in functionality with this changes, USB 3.0
is expected to continue same as before this change.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
11 months agoget_maintainer.pl: slightly modify penguin_chief
Anthony Loiseau [Thu, 11 Jan 2024 16:51:27 +0000 (17:51 +0100)]
get_maintainer.pl: slightly modify penguin_chief

Penguin chiefs are actually stripped out from get_maintainer results unless
--git-chief-penguins is provided, which appends them to all results instead.

This is a issue for U-Boot since Tom Rini (penguin chief) is also maintainer
of some sub-trees ("ARM", "ARM TI" and "THE REST").

Hopefully, this match is performed case-senditive over name and email,
therefore upper-casing Tom Rini last name workarounds the issue.

Important note: This also fixes "THE REST" catch all section resulting
in Tom Rini listed as (maintainer:THE REST) for all files. Hope there is not
too much developers scripting their patch email header from get_maintainer.pl
output, otherwise Tom Rini may be flooded.

Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Anthony Loiseau <anthony.loiseau@allcircuits.com>
11 months agosmbios: fix matching issues for table types
Ilias Apalodimas [Thu, 11 Jan 2024 14:39:36 +0000 (16:39 +0200)]
smbios: fix matching issues for table types

commit 738b34668f28 ("smbios: Fallback to the default DT if sysinfo nodes are missing")
allowed the code to fallback and fill in SMBIOS tables with properties
from the compatible and product nodes of the DT, in case the
'smbios,sysinfo' node is missing.
That works fine for Type1/2 tables, but for other types we need to
match the smbios,sysinfo subnode name as well. So add it to the
smbios_ctx and check it during the sysinfo <-> DT mathcing

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
11 months agosmbios: shorten sysinfo_str declarations and use
Ilias Apalodimas [Thu, 11 Jan 2024 14:39:35 +0000 (16:39 +0200)]
smbios: shorten sysinfo_str declarations and use

sysinfo_str is a bit too long and makes indentation weird. Shorten it
to si_str.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
11 months agocmd: license: Add CONFIG_GZIP dependency
Ivan Orlov [Thu, 11 Jan 2024 12:58:19 +0000 (12:58 +0000)]
cmd: license: Add CONFIG_GZIP dependency

'License' command processing code could be successfully compiled only
when CONFIG_GZIP option is enabled, otherwise it can't find the 'gunzip'
function definition (it is defined in lib/gunzip.c).

Add CONFIG_GZIP dependency to 'license' command config option in the
corresponding Kconfig.

Signed-off-by: Ivan Orlov <ivan.orlov@codethink.co.uk>
11 months agocmd: bootflow: remove dead code in do_bootflow_cmdline()
Heinrich Schuchardt [Thu, 11 Jan 2024 08:14:33 +0000 (09:14 +0100)]
cmd: bootflow: remove dead code in do_bootflow_cmdline()

Checking argc < 3 twice is redundant.

Addresses-Coverity-ID: 477198 Logically dead code
Fixes: 921f63e57238 ("bootflow: Allow setting a cmdline arg with no value")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agosmbios: buffer overflow when zeroing entry point
Heinrich Schuchardt [Thu, 11 Jan 2024 06:34:08 +0000 (07:34 +0100)]
smbios: buffer overflow when zeroing entry point

A SMBIOS 3 entry point has a different length than an SMBIOS 2.1 entry
point.

Fixes: 70924294f375 ("smbios: Use SMBIOS 3.0 to support an address above 4GB")
Fixes: 1c5f6fa3883d ("smbios: Drop support for SMBIOS2 tables")
Addresses-Coverity-ID: 477212 ("Wrong sizeof argument")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
11 months agonvme: Update nvme_scan_namespace to keep trying on busy
Moritz Fischer [Wed, 10 Jan 2024 05:04:48 +0000 (05:04 +0000)]
nvme: Update nvme_scan_namespace to keep trying on busy

A busy controller shouldn't be game-over for all controllers,
so keep trying on hitting -EBUSY.

This change brings the actual behavior of the routine in line
with what the descriptions says.

Fixes: 982388eaa991 ("nvme: Add NVM Express driver support")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Moritz Fischer <moritzf@google.com>
11 months agonvme: Fix error code and log to indicate busy
Moritz Fischer [Wed, 10 Jan 2024 05:04:47 +0000 (05:04 +0000)]
nvme: Fix error code and log to indicate busy

Return -EBUSY if controller is found busy rather than -ENOMEM
and update the error message accordingly.

Fixes: 982388eaa991 ("nvme: Add NVM Express driver support")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Moritz Fischer <moritzf@google.com>
11 months agodrivers: pci: Fix dm_pci_map_bar() to support 64b BARs
Moritz Fischer [Wed, 10 Jan 2024 04:59:02 +0000 (04:59 +0000)]
drivers: pci: Fix dm_pci_map_bar() to support 64b BARs

This enables 64b BARs if CONFIG_SYS_PCI_64BIT is enabled.

Reviewed-by: Philip Oberfichtner <pro@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Moritz Fischer <moritzf@google.com>
11 months agogetchar(): Correct usage
Tom Rini [Tue, 9 Jan 2024 22:57:16 +0000 (17:57 -0500)]
getchar(): Correct usage

The function getchar() returns an 'int' and not a 'char'. Coverity notes
that "Assigning the return value of getchar to char ... truncates its value."
and so for the most part we can resolve this easily by using 'int' as
intended, and often used throughout the codebase. A few places are not
so simple and would require further re-architecting of the code in order
to change this, so we leave them be.

Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agotest/py: bootstage: Add test for bootstage command
Love Kumar [Tue, 9 Jan 2024 09:09:57 +0000 (14:39 +0530)]
test/py: bootstage: Add test for bootstage command

Add test cases for bootstage command to print the bootstage report, to
stash the data into memory and to unstash the data from memory.

Signed-off-by: Love Kumar <love.kumar@amd.com>
11 months agoarch: mach-k3: Fix incorrect mapping of higher DDR addresses as device memory
Sekhar Nori [Tue, 9 Jan 2024 08:45:51 +0000 (14:15 +0530)]
arch: mach-k3: Fix incorrect mapping of higher DDR addresses as device memory

Entry for physical address 0x500000000 in memory map table for MMU
configuration is spilling over and inadvertently making DDR available at
higher address (above 4GB address space) get mapped as device memory
(nGnRnE).

Fix this by adjusting entry size. Tested on AM62A SK. Before this patch:

=> time crc32 0x881000000 0x20000000
crc32 for 881000000 ... 8a0ffffff ==> 7f34d7ca

time: 1 minutes, 14.716 seconds

After patch:

=> time crc32 0x881000000 0x20000000
crc32 for 881000000 ... 8a0ffffff ==> 7f34d7ca

time: 2.710 seconds

Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agotest: Skip cleanup test if not built out of tree
Tobias Deiminger [Mon, 8 Jan 2024 21:11:00 +0000 (22:11 +0100)]
test: Skip cleanup test if not built out of tree

With commit 42c0e5bb054d ("test: Find leftovers after clean/mrproper")
we assume that we are performing out of tree builds. test_clean and
test_mrproper fail if the assumption isn't met.

However there are valid scenarios where tests run with in source builds
(i.e., test.py --build-dir=.).

Automatically skip cleanup tests in such scenarios to prevent false
positives.

Signed-off-by: Tobias Deiminger <tdmg@linutronix.de>
Reviewed-by: Harald Seiler <u-boot@rahix.de>
11 months agocmd: nvedit: Fix typo in 'illegal character' error
Ivan Orlov [Mon, 8 Jan 2024 17:20:45 +0000 (17:20 +0000)]
cmd: nvedit: Fix typo in 'illegal character' error

Fix a typo: add a space after the single quote in 'illegal character'
error message in 'env set' command

Signed-off-by: Ivan Orlov <ivan.orlov@codethink.co.uk>
11 months agoimage-host: refactor and protect for very long filenames
Hugo Cornelis [Mon, 8 Jan 2024 14:24:30 +0000 (15:24 +0100)]
image-host: refactor and protect for very long filenames

This patch adds a function fit_image_read_key_iv_data that checks the
return value of snprintf and allows to generate a sensible error
message when generating binary images using filenames that are too
long for the OS to handle.

This is especially relevant for automated builds such as Buildroot and
Yocto builds.

Signed-off-by: Hugo Cornelis <hugo.cornelis@essensium.com>
11 months agoboard: ti: am64: Support TMDS64EVM
Roger Quadros [Mon, 8 Jan 2024 13:16:50 +0000 (15:16 +0200)]
board: ti: am64: Support TMDS64EVM

The TMDS64EVM [1] ships with AM64X SR2.0 HS-FS chip
and a slightly different board name in the board information
EEPROM header. Support this board.

[1] https://www.ti.com/tool/TMDS64EVM

Gets rid of below message at boot
"Unidentified board claims AM64-EVM in eeprom header"

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoinclude: env: ti: add default for do_main_cpsw0_qsgmii_phyinit
Manorit Chawdhry [Mon, 8 Jan 2024 08:18:49 +0000 (13:48 +0530)]
include: env: ti: add default for do_main_cpsw0_qsgmii_phyinit

By default this variable is unset and this causes the test condition to
fail on devices that don't have this defined. Set a default value for
this.

   => boot
   ## Error: "main_cpsw0_qsgmii_phyinit" not defined
   [...]

Fixes: 0d72b0f2f83b ("include: env: ti: ti_common: Run main_cpsw0_qsgmii_phyinit conditionally")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
11 months agoinclude: env: ti: ti_common: Fix a missing semicolon
Manorit Chawdhry [Mon, 8 Jan 2024 08:18:48 +0000 (13:48 +0530)]
include: env: ti: ti_common: Fix a missing semicolon

Fix a missing semicolon that leads to syntax error while booting j721s2.

    Importing environment from mmc1 ...
    syntax error at 'run'HUSH died!

Fixes: 0d72b0f2f83b ("include: env: ti: ti_common: Run main_cpsw0_qsgmii_phyinit conditionally")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
11 months agoboot: superfluous assignment in bootflow_menu_new()
Heinrich Schuchardt [Sun, 7 Jan 2024 09:01:07 +0000 (10:01 +0100)]
boot: superfluous assignment in bootflow_menu_new()

ret is assigned a value 0 which is never used but
is immediately overwritten in the next statement.

Addresses-Coverity-ID: 453304 ("Unused value")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agoboot: remove dead code in bootflow_check()
Heinrich Schuchardt [Sun, 7 Jan 2024 08:43:40 +0000 (09:43 +0100)]
boot: remove dead code in bootflow_check()

The 'return 0;' statement is not reachable. Remove it.
'else' is superfluous after an if statement with return.

Addresses-Coverity-ID: 352451 ("Logically dead code")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
11 months agolib: rsa: Allow legacy URI specification without "pkcs11:"
Csókás Bence [Fri, 5 Jan 2024 14:08:04 +0000 (15:08 +0100)]
lib: rsa: Allow legacy URI specification without "pkcs11:"

But emit a warning for it. Then we can remove support when
everyone had time to update their scripts, docs, CI etc.

Fixes: ece85cc020 rsa: use pkcs11 uri as defined in rfc7512
Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
11 months agolib: rsa: Fix PKCS11 URI if one is not given in `keydir`
Csókás Bence [Fri, 5 Jan 2024 14:08:03 +0000 (15:08 +0100)]
lib: rsa: Fix PKCS11 URI if one is not given in `keydir`

If `keydir` is not present, we need to build a PKCS11 URI
from just the key name. In this case, we *do* need 'pkcs11:'

Fixes: ece85cc020 rsa: use pkcs11 uri as defined in rfc7512
Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
11 months agotools: binman: ti_board_cfg: Check for linting problems
Neha Malcom Francis [Fri, 5 Jan 2024 11:39:17 +0000 (17:09 +0530)]
tools: binman: ti_board_cfg: Check for linting problems

Use yamllint for checking whether YAML configuration files are adhering
to default yamllint rules.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Suggested-by: Nishanth Menon <nm@ti.com>
11 months agoboard: ti: *-cfg.yaml: Adhere to yamllint rules
Neha Malcom Francis [Fri, 5 Jan 2024 11:39:16 +0000 (17:09 +0530)]
board: ti: *-cfg.yaml: Adhere to yamllint rules

Clean up all configuration files to adhere to yamllint rules.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
[trini: Update more yaml files added since this was posted]
Signed-off-by: Tom Rini <trini@konsulko.com>
Suggested-by: Nishanth Menon <nm@ti.com>
11 months agoiommu: dont fail silently
Caleb Connolly [Thu, 4 Jan 2024 17:12:22 +0000 (17:12 +0000)]
iommu: dont fail silently

When attempting to probe a device which has an associated IOMMU, if the
IOMMU device can't be found (no driver, disabled driver, driver failed
to probe, etc) then we currently fail to probe the device with no
discernable error.

If we fail to hook the device up to its IOMMU, we should make sure that
the user knows about it. Write some better error messages for
dev_iommu_enable() to facilitate this.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
11 months agobootdev: avoid infinite probe loop
Caleb Connolly [Thu, 4 Jan 2024 16:03:35 +0000 (16:03 +0000)]
bootdev: avoid infinite probe loop

Sometimes, when only one bootdev is available, and it fails to probe, we
end up in an infinite loop calling probe() on the same device over and
over. With only debug level log output.

Break the loop if we fail to probe the same device twice in a row, and
promote the probe failure message to log_warning().

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
11 months agoRevert "test: hush: dollar: fix bugous behavior"
Tom Rini [Thu, 18 Jan 2024 16:38:25 +0000 (11:38 -0500)]
Revert "test: hush: dollar: fix bugous behavior"

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

This reverts commit 6c2f753f4ad3dcee60190949d1286736a6d51d17.

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

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

This reverts commit 78912cfde281146d28254b230ecaa9b06722e6ff.

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

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

This reverts commit d8364738623ff47dd2321dd68da310abb58fe861.

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

Move to the latest "Jammy" tag from Ubuntu.

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

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

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

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

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

ACPI support for RISC-V requires a recent QEMU.

Upgrade the used QEMU to v8.2.0.

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

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

Xilinx changes for v2024.04-rc1-v2

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

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

zynqmp_r5:
- Fix W=1 issue with missing dir

tools:
- Improve zynqmpimage mkimage support

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

Documentation:

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

UEFI:

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

Other:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Use the proper "#if" instead.

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

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>