]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
8 months agoconfigs: zynqmp_kria: Deactivate CONFIG_SPI_FLASH_BAR
Tejas Bhumkar [Tue, 9 Apr 2024 09:48:26 +0000 (15:18 +0530)]
configs: zynqmp_kria: Deactivate CONFIG_SPI_FLASH_BAR

The Kria board features a recovery application that activates
when the FW_EN button is pressed.
Upon power-up flash operates in 3B mode, However, the recovery
application changes it back to 4B mode.
Currently, after a reset, u-boot activates CONFIG_SPI_FLASH_BAR
and assumes the flash is in 3B mode. However, there's no code
or reset lines connected to the flash that could return it to
3B mode. To resolve this issue, changes were made to disable
CONFIG_SPI_FLASH_BAR, which activates 4-byte opcodes.

Signed-off-by: Tejas Bhumkar <tejas.arvind.bhumkar@amd.com>
Link: https://lore.kernel.org/r/20240409094826.4131643-1-tejas.arvind.bhumkar@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
8 months agosoc: zynqmp: Add the IDcode for TEG variant
Venkatesh Yadav Abbarapu [Tue, 2 Apr 2024 14:23:14 +0000 (19:53 +0530)]
soc: zynqmp: Add the IDcode for TEG variant

ID code is added for zu3teg variant.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240402142314.7353-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
8 months agoxilinx: zynq: add FDT_FIXUP_PARTITIONS support
James Hilliard [Sun, 31 Mar 2024 23:28:59 +0000 (17:28 -0600)]
xilinx: zynq: add FDT_FIXUP_PARTITIONS support

There are situations where we may want to let U-Boot modify the FDT
nand partitions for the kernel, such as when supporting multiple
sizes of NAND chips.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Link: https://lore.kernel.org/r/20240331232859.727769-1-james.hilliard1@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
8 months agoarm64: dts: zynqmp: make hw-ecc as the default ecc mode
Venkatesh Yadav Abbarapu [Mon, 25 Mar 2024 09:50:13 +0000 (15:20 +0530)]
arm64: dts: zynqmp: make hw-ecc as the default ecc mode

Except for Linux no other component (i.e., u-boot, fsbl
or BootRom) of the software stack supports software ecc
engine. So, make hw-ecc as the default ecc mode.
Update the same for mini u-boot nand configuration as well.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240325095013.29497-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
8 months agoarm64: zynqmp: Add MTD partition handling for dfu_alt_info generation
Michal Simek [Fri, 22 Mar 2024 12:09:19 +0000 (13:09 +0100)]
arm64: zynqmp: Add MTD partition handling for dfu_alt_info generation

Generate dfu_alt_info generation based on information from MTD partitions.
mtd_found_part() is trying to identify MTD partition which code is running
from. If partitions are not defined and location is not found it is going
to previous behavior.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/db58d9f3fc142004d833bb115bfba0e26d660b66.1711109356.git.michal.simek@amd.com
8 months agoarm64: zynqmp: Generate desc when SPL_FS_LOAD_PAYLOAD_NAME is valid
Michal Simek [Fri, 22 Mar 2024 12:09:18 +0000 (13:09 +0100)]
arm64: zynqmp: Generate desc when SPL_FS_LOAD_PAYLOAD_NAME is valid

Generate description only when CONFIG_SPL_FS_LOAD_PAYLOAD_NAME is not
empty. When name is empty there is no reason to generate description for
it because it is not aligned with dfu rules.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/4cec866f5fffa742258c65796371d7bfc6068915.1711109356.git.michal.simek@amd.com
8 months agoxilinx: Do not call private env_get_location() when !ENV_IS_NOWHERE
Michal Simek [Fri, 22 Mar 2024 11:43:17 +0000 (12:43 +0100)]
xilinx: Do not call private env_get_location() when !ENV_IS_NOWHERE

Private function for finding out location of environment is not working
when ENV_IS_NOWHERE is disabled.
The reason is that current fallback is ENVL_UNKNOWN when
CONFIG_ENV_IS_NOWHERE is not enabled. The code could be updated like this

-               return ENVL_NOWHERE;
+               if (IS_ENABLED(CONFIG_ENV_IS_NOWHERE))
+                       return ENVL_NOWHERE;
+               return ENVL_UNKNOWN;

But then boot is still not working because ENVL_UNKNOWN has no driver and
env_init() returns -ENODEV. That's why it is better not to define board
specific env_get_location() because then weak env_get_location() is used
which is going over env_locations[] and returning locations which are
actually enabled in u-boot instance.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/830b9c93d30688cfa8a5cbb0388e79deb7731f29.1711107795.git.michal.simek@amd.com
8 months agoarm64: zynqmp: Describe DisplayPort connector for Kria
Vishal Sagar [Thu, 21 Mar 2024 15:54:56 +0000 (16:54 +0100)]
arm64: zynqmp: Describe DisplayPort connector for Kria

Add a device tree node to describe the DisplayPort connector, and
connect it to the DPSUB output.

The patch was tested on kv260-revB/rev2 and also kr260-revB.

Signed-off-by: Vishal Sagar <vishal.sagar@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c8738cb9951c73c6c00a4ce8d0025fb372372346.1711036494.git.michal.simek@amd.com
8 months agoarm64: zynqmp: dts: Add required properties for rs485 support for KD240
Manikanta Guntupalli [Tue, 19 Mar 2024 11:27:33 +0000 (12:27 +0100)]
arm64: zynqmp: dts: Add required properties for rs485 support for KD240

Add "rts-gpios" and "linux,rs485-enabled-at-boot-time" properties
to uartps node to support RS485 on KD240.

Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/56e4e135ad796afd1370c3dfa2643c143ba758ee.1710847646.git.michal.simek@amd.com
8 months agoarm64: zynqmp: Disable Tri-state for SDIO
Tejas Bhumkar [Thu, 21 Mar 2024 08:52:20 +0000 (14:22 +0530)]
arm64: zynqmp: Disable Tri-state for SDIO

Since the zynqmp pinctrl driver now includes support for the
tri-state registers, ensure that the pins needing output-enable
are correctly configured for SOMs.

Currently, there is an issue with the detection of the MMC for
the SOM kv260, resulting in the following error:
ZynqMP> mmc dev 1
Card did not respond to voltage select! : -110

To address this problem, configure the SDIO pins for output-enable
to enable MMC detection.

Signed-off-by: Tejas Bhumkar <tejas.arvind.bhumkar@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240321085220.2920792-2-tejas.arvind.bhumkar@amd.com
8 months agoarm64: zynqmp: Add bootcmd_usb4 variable
Shubhangi Shrikrushna Mahalle [Wed, 20 Mar 2024 11:24:16 +0000 (12:24 +0100)]
arm64: zynqmp: Add bootcmd_usb4 variable

Add "bootcmd_usb4" variable to boot through usb4 device.

Signed-off-by: Shubhangi Shrikrushna Mahalle <shubhangi.shrikrushna-mahalle@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/cb36fe6bd1fef540441e1d8c32636ae6f80357b4.1710933852.git.michal.simek@amd.com
8 months agoarm64: zynqmp: Also support JTAG as alternative boot mode
Michal Simek [Wed, 20 Mar 2024 11:18:35 +0000 (12:18 +0100)]
arm64: zynqmp: Also support JTAG as alternative boot mode

if (reg >> BOOT_MODE_ALT_SHIFT) condition rules out alternative jtag boot
mode which is 0. When 0 was used origin(HW) boot mode was used instead.
That's why directly fill reg variable with requested boot mode and don't
let code to read value back. "else" part of code remain unchanged.

Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/ed51a9d51948ab939a53e0b9dc6c2d2546f97a4f.1710933505.git.michal.simek@amd.com
9 months agoarm64: zynqmp: Do not describe u-boot.itb if SPL is disabled
Michal Simek [Fri, 23 Feb 2024 16:18:42 +0000 (17:18 +0100)]
arm64: zynqmp: Do not describe u-boot.itb if SPL is disabled

There is no reason to describe u-boot.itb on system without SPL. Pretty
much this is cover all systems which are using only boot.bin which contains
all images inside.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/561f9d0ee96ebb6cd674042f269f280ab68fbbac.1708705118.git.michal.simek@amd.com
9 months agoarm64: zynqmp: Do not setup default SPL options without SPL
Michal Simek [Tue, 12 Mar 2024 15:51:21 +0000 (16:51 +0100)]
arm64: zynqmp: Do not setup default SPL options without SPL

mach Kconfig file select some options independently of if SPL is actually
enabled. It ends up in situation that SPL is disabled but symbols are still
present in .config. That's why add SPL dependency for them but also group
them with other SPL options in ARCH_ZYNQMP fragment with using imply
option. This should ensure the same behavior as default y.

Also fixed SPL_ZYNQMP_PSU_INIT_ENABLED for the same.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/8dc4b799d36f963a3e1ebb5b24793632dc360b61.1710258674.git.michal.simek@amd.com
9 months agoxilinx: versal-net: Add support for saving env based on bootmode
Venkatesh Yadav Abbarapu [Tue, 12 Mar 2024 11:34:21 +0000 (17:04 +0530)]
xilinx: versal-net: Add support for saving env based on bootmode

Enable saving variables to MMC(FAT) and SPI based on primary
bootmode. If bootmode is JTAG, dont save env anywhere(NOWHERE).

Enable ENV_FAT_DEVICE_AND_PART="0:auto" for versal-net platform as well.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240312113421.7394-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
9 months agoarm64: zynqmp: Describe USB wakeup interrupt
Michal Simek [Fri, 8 Mar 2024 08:41:55 +0000 (09:41 +0100)]
arm64: zynqmp: Describe USB wakeup interrupt

Describe usb wakeup interrupt.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/d8109a218f70c257e4fc52b5032b7df68fc00786.1709887312.git.michal.simek@amd.com
9 months agoarm64: zynqmp: Remove additional compatible string for sc-revB
Michal Simek [Fri, 8 Mar 2024 08:41:23 +0000 (09:41 +0100)]
arm64: zynqmp: Remove additional compatible string for sc-revB

Based on dt schema there is no need to specify flash via additional
compatible string and generic are enough.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/54e77ad480c5de8703cb5b22408dc3bf72f3f431.1709887280.git.michal.simek@amd.com
9 months agoarm64: zynqmp: Fix gpio-key DT description
Michal Simek [Fri, 8 Mar 2024 08:40:52 +0000 (09:40 +0100)]
arm64: zynqmp: Fix gpio-key DT description

All gpio-key descriptionos with dt-schema.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a67884f4fad98b94198123eef45ffdad511b0dc6.1709887234.git.michal.simek@amd.com
9 months agoarm64: zynqmp: Add label to pmu fwnode
Lukas Funke [Thu, 7 Mar 2024 15:29:56 +0000 (16:29 +0100)]
arm64: zynqmp: Add label to pmu fwnode

ZynqMP CG series devices only have two cpus. In this
case the interrupt-affinity property has to adapted, because
cpu3 and cpu4 are missing. By adding a label to the pmu fwnode the
interrupt-affinity can be adapted in a device specific DT.

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Link: https://lore.kernel.org/r/20240307152956.431104-1-lukas.funke-oss@weidmueller.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
9 months agomtd: nand: arasan: Fix the crash caused by use after free
Venkatesh Yadav Abbarapu [Wed, 6 Mar 2024 03:34:04 +0000 (09:04 +0530)]
mtd: nand: arasan: Fix the crash caused by use after free

The below exception observed on QEMU, as it doesn't support
NAND controller.

"Synchronous Abort" handler, esr 0x96000005, far 0x17acfc878
elr: 000000000803ad40 lr : 000000000805f438 (reloc)
elr: 000000007fcb4d40 lr : 000000007fcd9438
x0 : 000000007bbfc880 x1 : 00000000ff100000
x2 : 000000007fcf059c x3 : 000000007bbfc870
x4 : 000000007fd9a388 x5 : 000000017acfc870
x6 : 0000000000000000 x7 : 000000007bbfd0e0
x8 : 0000000000003dd4 x9 : 000000007bbeec0c
x10: 0000000000000001 x11: 0000000000003f8c
x12: 000000007bbeecfc x13: 000000007bbeeeb0
x14: 000000007bbeeeb0 x15: 000000007bbee474
x16: 000000007fcef18c x17: 0000000000000000
x18: 000000007bbf9d70 x19: 000000007bbfc888
x20: 000000007bbfc870 x21: 000000007fd68ddb
x22: 00000000ffffffed x23: 000000007bbfc878
x24: 0000000000000000 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 0000000000000000 x29: 000000007bbeed10

Code: 927ff8c1 924000c6 8b010065 f9400887 (f94004a2)
Resetting CPU ...

The crash is caused by the use after free.
Updating the correct return codes rather than hardcoding.
Fixes: 3dd0f8cccd6d ("mtd: nand: Remove hardcoded base address of nand")
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240306033404.18537-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
9 months agomtd: nand: arasan: Print warning for unsupported ecc modes
Venkatesh Yadav Abbarapu [Wed, 6 Mar 2024 03:27:03 +0000 (08:57 +0530)]
mtd: nand: arasan: Print warning for unsupported ecc modes

Currently only hw ecc is supported in U-Boot. If any other ecc mode is
given in DT, it simply through an error. So better print
what is being done.

Revert this patch once soft ecc support is fixed in future.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240306032703.17508-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
9 months agoarm64: zynqmp: Add usb4 to the boot targets
Venkatesh Yadav Abbarapu [Tue, 5 Mar 2024 11:02:56 +0000 (16:32 +0530)]
arm64: zynqmp: Add usb4 to the boot targets

USB4 has been added to the boot targets and
also add support to enable JTAG.

Signed-off-by: Shubhangi Shrikrushna Mahalle <shubhangi.shrikrushna-mahalle@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240305110256.153308-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
9 months agoriscv: mbv: Enable SPL and binman
Michal Simek [Wed, 14 Feb 2024 11:52:33 +0000 (12:52 +0100)]
riscv: mbv: Enable SPL and binman

Enable SPL and binman to generate u-boot.img (machine mode) and u-boot.itb
(supervisor mode). DTB is placed at fixed address to ensure that it is 8
byte aligned which is not ensured when dtb is attached behind SPL binary
that's why SPL and U-Boot are taking DTB from the same address.
Also align addresses for both defconfigs.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/85506bce5580d448f095f267d029e3932c5e9990.1707911544.git.michal.simek@amd.com
9 months agoriscv: mbv: Moving little_endian variable to data section
Michal Simek [Wed, 14 Feb 2024 11:52:32 +0000 (12:52 +0100)]
riscv: mbv: Moving little_endian variable to data section

SPL is cleaning bss after calling board_init_f. Setting up console is done
and little_endian global variable is cleared which caused that console
stops to work. That's why move it to data seciton now. The patch should be
reverted when bss is cleared before board_init_f is called.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/934dc8871c59265eb9d8012193aa97d9b8bd7f33.1707911544.git.michal.simek@amd.com
9 months agoriscv: mbv: Switch to OF_SEPARATE with fixed address
Michal Simek [Wed, 14 Feb 2024 11:52:31 +0000 (12:52 +0100)]
riscv: mbv: Switch to OF_SEPARATE with fixed address

Hardcode DTB address to specific address.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a5ad3c8d21be311254dd950e4e322d13cacdc176.1707911544.git.michal.simek@amd.com
9 months agoriscv: mbv: Enable REMAKE_ELF by default
Michal Simek [Wed, 14 Feb 2024 11:52:30 +0000 (12:52 +0100)]
riscv: mbv: Enable REMAKE_ELF by default

Create also u-boot.elf out of u-boot ELF. It is better to align it with
other Xilinx SOC where u-boot.elf also exists and tools like bootgen works
only with files with .elf extension.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/50bc5a360c37accd0eee1eecfd291b145a29acd0.1707911544.git.michal.simek@amd.com
9 months agoriscv: mbv: Align addresses with default DT
Michal Simek [Wed, 14 Feb 2024 11:52:29 +0000 (12:52 +0100)]
riscv: mbv: Align addresses with default DT

Better to align everything with memory map described in DT to avoid
mistakes. Execute both modes form the same address to make address map more
understandable.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/be54c668d5626ccd702507a86c2a95d1eaefc690.1707911544.git.michal.simek@amd.com
9 months agoarm64: zynqmp: Remove snps,enable_guctl1_ipd_quirk property
Michal Simek [Mon, 26 Feb 2024 15:54:13 +0000 (16:54 +0100)]
arm64: zynqmp: Remove snps,enable_guctl1_ipd_quirk property

Remove undocumented DT property. Suggested solution was to apply quirk
via glue logic driver that's why make no sense to have it listed in DT.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/2067eefbad161dee64b1dc7d97c498f09a8307a2.1708962844.git.michal.simek@amd.com
9 months agoarm64: zynqmp: Support semihosting boot method
Sean Anderson [Thu, 22 Feb 2024 20:05:11 +0000 (15:05 -0500)]
arm64: zynqmp: Support semihosting boot method

Currently, when we boot from JTAG we try to boot U-Boot from RAM.
However, this is a bit tricky to time, since the debugger has to wait
for SPL to initialize RAM before it can load U-Boot. This can result in
long waits, since occasionally initializing RAM (and other things in
psu_init) takes a long time to complete and the debugger must wait for
this worst case.

Support semihosting if it is enabled, as it lets U-Boot tell the
debugger when we are ready for the image. This means we don't have to
wait any more than necessary. We don't change the default config to
ensure we don't break compatibility with existing debuggers that don't
expect us to hit semihosting breakpoints.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20240222200512.2679830-1-sean.anderson@linux.dev
Signed-off-by: Michal Simek <michal.simek@amd.com>
9 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.

9 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>
9 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>
9 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>
9 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>
9 months agoMerge tag 'u-boot-imx-master-20240224' of https://source.denx.de/u-boot/custodians...
Tom Rini [Sat, 24 Feb 2024 22:51:50 +0000 (17:51 -0500)]
Merge tag 'u-boot-imx-master-20240224' of https://source.denx.de/u-boot/custodians/u-boot-imx

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

9 months agoopos6uldev: Convert to watchdog driver model
Sébastien Szymanski [Fri, 23 Feb 2024 11:28:04 +0000 (12:28 +0100)]
opos6uldev: Convert to watchdog driver model

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

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

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
9 months agoimx53-qsb: Convert to watchdog driver model
Fabio Estevam [Wed, 21 Feb 2024 17:39:30 +0000 (14:39 -0300)]
imx53-qsb: Convert to watchdog driver model

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

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

Signed-off-by: Fabio Estevam <festevam@gmail.com>
9 months agoimx8mm-phygate-tauri-l_defconfig: Enable CONFIG_IMX_TMU
Benjamin Hahn [Tue, 20 Feb 2024 10:41:45 +0000 (11:41 +0100)]
imx8mm-phygate-tauri-l_defconfig: Enable CONFIG_IMX_TMU

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

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

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

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

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

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

Enable the `fastboot` command.

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

Enable the `usb` command and some USB drivers.

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

Enable both usbotg1 and usbotg2 ports.

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

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

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

Remove the malformed multiline string and fix the checkpatch warning.

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

Add documentation for SPI boot.

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

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

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

- fix AVB oom error for Khadas VIM3 Android configs

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

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

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

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

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

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

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

- Two fixes for the qcom-pmic button driver

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

Nishanth Menon <nm@ti.com> says:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes: 33e06dcbe57a ("common: usb-hub: Reset hub port before scanning")
Link:
https://lore.kernel.org/u-boot/20240207102327.35125-1-i@shantur.com/T/#u
Link:
https://lore.kernel.org/u-boot/20240201164604.13315fa6@donnerap.manchester.arm.com/T/#u

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

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

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

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

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

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

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

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

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

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

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

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

Remove Antti, who no longer works on the project.

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

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

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

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

Redundant environment support is required for software updates.

Add support for it.

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

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

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

Currently, the Ethernet ports are not working.

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

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

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

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Ian Ray <ian.ray@gehealthcare.com>
10 months agomsc_sm2s_imx8mp: Convert to DM_SERIAL
Fabio Estevam [Tue, 13 Feb 2024 11:43:38 +0000 (08:43 -0300)]
msc_sm2s_imx8mp: Convert to DM_SERIAL

The conversion to DM_SERIAL is mandatory, so do the conversion.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Ian Ray <ian.ray@gehealthcare.com>
10 months agoMerge branch 'master-porter' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sat, 17 Feb 2024 23:37:07 +0000 (18:37 -0500)]
Merge branch 'master-porter' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Renesas R-Car Gen2 fixes

10 months agoARM: renesas: Enable LTO on R-Car
Marek Vasut [Sun, 11 Feb 2024 17:34:30 +0000 (18:34 +0100)]
ARM: renesas: Enable LTO on R-Car

Enable LTO globally on Renesas R-Car platforms. This has been enabled
on a subset of boards already, but at this point it is safe to enable
it globally. This saves units or tens of kiB from the resulting build.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
10 months agoARM: renesas: Set R-Car Gen2 board size limit to 512 kiB
Marek Vasut [Sun, 11 Feb 2024 17:34:29 +0000 (18:34 +0100)]
ARM: renesas: Set R-Car Gen2 board size limit to 512 kiB

The maximum size of u-boot.img on R-Car Gen2 is 0x80000 or 512 kiB,
set the limit to avoid overflows as new functionality gets pulled in.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
10 months agoARM: renesas: Disable EFI on R-Car Gen2
Marek Vasut [Sun, 11 Feb 2024 17:34:28 +0000 (18:34 +0100)]
ARM: renesas: Disable EFI on R-Car Gen2

These systems are unlikely to use EFI as this functionality has not been
enabled until it got pulled in by Kconfig default. This functionality
does add some 60-70 kiB to the u-boot.img size, which overflows the size
limit. Disable it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
10 months agoclk: renesas: Fix broken clocks on all Gen2 boards
Niklas Söderlund [Fri, 9 Feb 2024 21:15:35 +0000 (22:15 +0100)]
clk: renesas: Fix broken clocks on all Gen2 boards

To prepare support for multiple register layouts pointers to register
tables where added to struct cpg_mssr_info. These pointers are suppose
to be filled in at probe time and no intended change in behavior was
intended.

However the new pointers where only filled in by some paths of the
driver implemented in clk-rcar-gen3.c. The path implemented in
clk-rcar-gen2.c was not updated leaving the pointers uninitialized
leading to a crash when trying to probe the clocks.

Fix this by filling in the pointers in the Gen2 code path with the
values used before they where moved to struct cpg_mssr_info.

Fixes: d413214fb748 ("clk: renesas: Add register pointers into struct cpg_mssr_info")
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # R8A7791 Porter
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
10 months agoMerge tag 'u-boot-dfu-20240215' of https://source.denx.de/u-boot/custodians/u-boot-dfu
Tom Rini [Thu, 15 Feb 2024 15:26:24 +0000 (10:26 -0500)]
Merge tag 'u-boot-dfu-20240215' of https://source.denx.de/u-boot/custodians/u-boot-dfu

u-boot-dfu-20240215

- Fix avb_verify command with SD cards
- Add u-boot-dfu maintainer tree for AB/AVB
- Avb: report verified boot state based on lock state
- Misc avb refactors improve code quality

10 months agodoc: android: avb: sync usage details
Igor Opaniuk [Fri, 9 Feb 2024 19:20:45 +0000 (20:20 +0100)]
doc: android: avb: sync usage details

Sync usage info with the one cmd/avb.c.

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240209192045.3961832-8-igor.opaniuk@foundries.io
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
10 months agocmd: avb: rework do_avb_verify_part
Igor Opaniuk [Fri, 9 Feb 2024 19:20:44 +0000 (20:20 +0100)]
cmd: avb: rework do_avb_verify_part

Use existing str_avb_slot_error() function for obtaining
verification fail reason details.
Take into account device lock state for setting correct
androidboot.verifiedbootstate kernel cmdline parameter.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Link: https://lore.kernel.org/r/20240209192045.3961832-7-igor.opaniuk@foundries.io
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
10 months agocommon: avb_verify: add str_avb_io_error/str_avb_slot_error
Igor Opaniuk [Fri, 9 Feb 2024 19:20:43 +0000 (20:20 +0100)]
common: avb_verify: add str_avb_io_error/str_avb_slot_error

Introduce str_avb_io_error() and str_avb_slot_error() functions,
that provide a pointer to AVB runtime error message.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Link: https://lore.kernel.org/r/20240209192045.3961832-6-igor.opaniuk@foundries.io
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
10 months agocmd: avb: rework prints
Igor Opaniuk [Fri, 9 Feb 2024 19:20:42 +0000 (20:20 +0100)]
cmd: avb: rework prints

Simplify and add more context for prints where it's needed.

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240209192045.3961832-5-igor.opaniuk@foundries.io
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
10 months agocommon: avb_verify: rework error/debug prints
Igor Opaniuk [Fri, 9 Feb 2024 19:20:41 +0000 (20:20 +0100)]
common: avb_verify: rework error/debug prints

Make error prints more verbose with additional context.
Also s/print/debug/g for prints, which might be relevant only
for debugging purposes.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Link: https://lore.kernel.org/r/20240209192045.3961832-4-igor.opaniuk@foundries.io
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
10 months agoavb: move SPDX license identifiers to the first line
Igor Opaniuk [Fri, 9 Feb 2024 19:20:40 +0000 (20:20 +0100)]
avb: move SPDX license identifiers to the first line

Move SPDX license identifiers to the first line, so it conforms
to license placement rule [1]:

Placement:
The SPDX license identifier in kernel files shall be added at the first
possible line in a file which can contain a comment.  For the majority
of files this is the first line, except for scripts which require the
'#!PATH_TO_INTERPRETER' in the first line.  For those scripts the SPDX
identifier goes into the second line.

[1] https://www.kernel.org/doc/Documentation/process/license-rules.rst

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Link: https://lore.kernel.org/r/20240209192045.3961832-3-igor.opaniuk@foundries.io
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
10 months agocommon: avb_verify: don't call mmc_switch_part for SD
Igor Opaniuk [Fri, 9 Feb 2024 19:20:39 +0000 (20:20 +0100)]
common: avb_verify: don't call mmc_switch_part for SD

mmc_switch_part() is used for switching between hw partitions
on eMMC (boot0, boot1, user, rpmb).
There is no need to do that for SD card.

This fixes the avb command usage on SD cards.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/20240209192045.3961832-2-igor.opaniuk@foundries.io
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
10 months agoMAINTAINERS: add custodian tree info for AVB/AB
Igor Opaniuk [Tue, 13 Feb 2024 07:36:38 +0000 (08:36 +0100)]
MAINTAINERS: add custodian tree info for AVB/AB

Add information about a custodian tree [1] for AVB/AB, which is
maintained by Mattijs Korpershoek.

[1] https://source.denx.de/u-boot/custodians/u-boot-dfu

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20240213073638.1125429-1-igor.opaniuk@foundries.io
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
10 months agoMerge tag 'xilinx-for-v2024.04-rc3' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Wed, 14 Feb 2024 20:23:10 +0000 (15:23 -0500)]
Merge tag 'xilinx-for-v2024.04-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2024.04-rc3

zynqmp:
- Cover missing _SE chip variants to fix fpga programming

versal:
- Enable LTO for mini configurations

versal-net:
- Enable LTO for mini configurations
- Fix GIC address to aligned with real silicon

xilinx:
- DTs cleanup and fixups
- Enable HTTP boot
- Add missing spl header to zynqmp.c

10 months agobutton: qcom-pmic: demote "unknown button" message to debug
Caleb Connolly [Fri, 9 Feb 2024 15:11:34 +0000 (15:11 +0000)]
button: qcom-pmic: demote "unknown button" message to debug

This message isn't an error (there can be a watchdog subnode for example)
but it shouldn't be printed unless this driver is being debugged. Demote
it to a debug print.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
10 months agobutton: qcom-pmic: fix some error checking
Dan Carpenter [Wed, 31 Jan 2024 07:09:15 +0000 (10:09 +0300)]
button: qcom-pmic: fix some error checking

The pmic_reg_read() function can return errors.  Add a check for that.

Fixes: 4e8aa0065d4b ("button: qcom-pmic: introduce Qualcomm PMIC button driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
10 months agoarm64: versal-net: Setup correct addresses of GICR/GICD
Michal Simek [Tue, 6 Feb 2024 11:51:39 +0000 (12:51 +0100)]
arm64: versal-net: Setup correct addresses of GICR/GICD

Previous addresses where used in past in emulation environment but never
gets to silicon that's why use correct addresses.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/5d3d0e1afb1f673ffeb4a1c5d7f040475c806a30.1707220293.git.michal.simek@amd.com
10 months agoPrepare v2024.04-rc2
Tom Rini [Tue, 13 Feb 2024 23:16:57 +0000 (18:16 -0500)]
Prepare v2024.04-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
10 months agoMerge branch '2024-02-13-assorted-updates'
Tom Rini [Tue, 13 Feb 2024 22:31:11 +0000 (17:31 -0500)]
Merge branch '2024-02-13-assorted-updates'

- Add the button command patch, update MAINTAINERS entry for a platform,
  fix a problem with the hash command, fix a problem on K3 platforms and
  revert a change on verdin-am62.

10 months agoRevert "board: verdin-am62: set cpu core voltage depending on speed grade"
Francesco Dolcini [Tue, 13 Feb 2024 16:00:03 +0000 (17:00 +0100)]
Revert "board: verdin-am62: set cpu core voltage depending on speed grade"

This reverts commit d2099587d661c6ca2309256c0e04c06e26c8d34c.

According to TI changing the VDD_CORE while the SoC is running is not
allowed, the voltage must be set before the AM62 device reset is
released, revert this change therefore.

The correct solution would be to program the PMIC during manufactoring
according to the speed grade of the SoC.

Link: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1318338/am623-booting-from-mmc-failed-after-lowering-vdd_core-to-0-75v/5036508#5036508
Fixes: d2099587d661 ("board: verdin-am62: set cpu core voltage depending on speed grade")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
10 months agoboot: add support for button commands
Caleb Connolly [Tue, 9 Jan 2024 11:51:09 +0000 (11:51 +0000)]
boot: add support for button commands

With the relatively new button API in U-Boot, it's now much easier to
model the common usecase of mapping arbitrary actions to different
buttons during boot - for example entering fastboot mode, setting some
additional kernel cmdline arguments, or booting with a custom recovery
ramdisk, to name a few.

Historically, this functionality has been implemented in board code,
making it fixed for a given U-Boot binary and requiring the code be
duplicated and modified for every board.

Implement a generic abstraction to run an arbitrary command during boot
when a specific button is pressed. The button -> command mapping is
configured via environment variables with the following format:

  button_cmd_N_name=<button label>
  button_cmd_N=<command to run>

Where N is the mapping number starting from 0. For example:

  button_cmd_0_name=vol_down
  button_cmd_0=fastboot usb 0

This will cause the device to enter fastboot mode if volume down is held
during boot.

After we enter the cli loop the button commands are no longer valid,
this allows the buttons to additionally be used for navigating a boot
menu.

Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # Tegra30
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
10 months agocmd: hash: fix param count check
Igor Opaniuk [Wed, 7 Feb 2024 00:01:32 +0000 (01:01 +0100)]
cmd: hash: fix param count check

Add correct check for parameter count.

This fixes this issue when `hash` cmd is invoked without params:

=> hash
data abort
pc : [<bf739204>]    lr : [<ba6effa8>]
reloc pc : [<60019204>]    lr : [<5afcffa8>]
sp : ba6dd9c8  ip : bf7391f0  fp : bf74ec14
r10: 00000001  r9 : ba6dfea0  r8 : bf7ea030
r7 : 00000000  r6 : ba6effa8  r5 : 00000000  r4 : ffffffff
r3 : bf7c257c  r2 : 00000001  r1 : 00000000  r0 : bf7e6e34
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32
Code: e5934004 e1a0e003 e59f3050 e2444001 (e5f4c001)
Resetting CPU ...

resetting ...

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
10 months agomemory: ti-gpmc: Fix lock up at A53 SPL during NAND boot on AM64-EVM
Roger Quadros [Tue, 6 Feb 2024 14:02:51 +0000 (16:02 +0200)]
memory: ti-gpmc: Fix lock up at A53 SPL during NAND boot on AM64-EVM

AM64 ES2.0 bootrom seems to enable WAIT0EDGEDETECTION interrupt.
This causes a lockup at A53 SPL when accessing NAND controller
or ELM registers.

A good option would be to softrest GPMC block at probe
but this cannot be done for AM64 as SOFTRESET bit is marked
as reserved in SYSCONFIG register.

Fix the issue by disabling all IRQs at probe.

Signed-off-by: Roger Quadros <rogerq@kernel.org>