]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
12 months agosandbox: Add <linux/types.h> to asm/global_data.h and asm/io.h
Tom Rini [Thu, 14 Dec 2023 18:16:50 +0000 (13:16 -0500)]
sandbox: Add <linux/types.h> to asm/global_data.h and asm/io.h

We need <linux/types.h> in these files as we reference Linux types.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoarm: Remove <asm/types.h> from asm/global_data.h
Tom Rini [Thu, 14 Dec 2023 18:16:49 +0000 (13:16 -0500)]
arm: Remove <asm/types.h> from asm/global_data.h

We need and include <linux/types.h> and this in turn already includes
<asm/types.h>, so drop it here.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoglobal: Remove duplicate common.h inclusions
Tom Rini [Thu, 14 Dec 2023 18:16:48 +0000 (13:16 -0500)]
global: Remove duplicate common.h inclusions

These files include <common.h> twice. Start by removing the second
inclusion of the file.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoglobal: Drop common.h inclusion
Tom Rini [Thu, 14 Dec 2023 18:16:47 +0000 (13:16 -0500)]
global: Drop common.h inclusion

In order to make it easier to move on to dropping common.h from code
directly, remove common.h inclusion from the rest of the header file
which had been including it.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agosandbox: Audit config.h and common.h usage
Tom Rini [Thu, 14 Dec 2023 18:16:46 +0000 (13:16 -0500)]
sandbox: Audit config.h and common.h usage

Remove and replace common.h and config.h in sandbox when it's not needed
and add some explicit includes where needed.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoarm: Partial cleanup and audit usage of <config.h>
Tom Rini [Thu, 14 Dec 2023 18:16:45 +0000 (13:16 -0500)]
arm: Partial cleanup and audit usage of <config.h>

We need to include <config.h> directly when a file needs to have
something such as CFG_SYS_SDRAM_SIZE referenced as this file is not
automatically globally included and is most commonly indirectly included
via common.h.  Remove most cases of arm including config.h directly, but
add it where needed. This includes a few board-specific fixes.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoarc: Cleanup and audit usage of <config.h>
Tom Rini [Thu, 14 Dec 2023 18:16:44 +0000 (13:16 -0500)]
arc: Cleanup and audit usage of <config.h>

We need to include <config.h> directly when a file needs to have
something such as CFG_SYS_SDRAM_SIZE referenced as this file is not
automatically globally included and is most commonly indirectly included
via common.h.  Remove most cases of arc including config.h directly, but
add it where needed. Further clean up the tb100 board config.h file so
that we don't rely on config.h being included there for a value used in
a single place.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoqe: Add <config.h> to linux/immap_qe.h
Tom Rini [Thu, 14 Dec 2023 18:16:43 +0000 (13:16 -0500)]
qe: Add <config.h> to linux/immap_qe.h

Given how we define QE_MURAM_SIZE today, this header needs to have
<config.h> added to it.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoglobal: Restrict use of '#include <linux/kconfig.h>'
Tom Rini [Thu, 14 Dec 2023 12:16:54 +0000 (07:16 -0500)]
global: Restrict use of '#include <linux/kconfig.h>'

In general terms, we -include include/linux/kconfig.h and so normal
U-Boot code does not need to also #include it. However, for code which
is shared with userspace we may need to add it so that either our full
config is available or so that macros such as CONFIG_IS_ENABLED() can be
evaluated. In this case make sure that we guard these includes with a
test for USE_HOSTCC so that it clear as to why we're doing this.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoMerge branch '2023-12-20-assorted-general-updates' into next
Tom Rini [Wed, 20 Dec 2023 21:00:22 +0000 (16:00 -0500)]
Merge branch '2023-12-20-assorted-general-updates' into next

- Assorted fixes around the tree

12 months agoMerge tag 'u-boot-imx-next-20231220' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Wed, 20 Dec 2023 19:14:46 +0000 (14:14 -0500)]
Merge tag 'u-boot-imx-next-20231220' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

- Put the USB hub out of reset on colibri-imx8x
- Fix VDDx brownout interrupt register of i.MX23/i.MX28
- Fix Phytec imx8m SoM detection
- Add TPM support for gw72xx boards

12 months agocmd: part: Cover both part type entries with GUID ifdef
Marek Vasut [Sun, 10 Dec 2023 21:25:07 +0000 (22:25 +0100)]
cmd: part: Cover both part type entries with GUID ifdef

The 'part type' subcommand depends on GUID partition table support.
The help text exposes one of two 'part type' subcommand entries,
hide both in case GUID partition table support is not enabled to
avoid confusing users.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agosmbios: Fallback to the default DT if sysinfo nodes are missing
Ilias Apalodimas [Thu, 7 Dec 2023 09:18:50 +0000 (11:18 +0200)]
smbios: Fallback to the default DT if sysinfo nodes are missing

In order to fill in the SMBIOS tables U-Boot currently relies on a
"u-boot,sysinfo-smbios" compatible node.  This is fine for the boards
that already include such nodes.  However with some recent EFI changes,
the majority of boards can boot up distros, which usually rely on
things like dmidecode etc for their reporting.  For boards that
lack this special node the SMBIOS output looks like:

System Information
        Manufacturer: Unknown
        Product Name: Unknown
        Version: Unknown
        Serial Number: Unknown
        UUID: Not Settable
        Wake-up Type: Reserved
        SKU Number: Unknown
        Family: Unknown

This looks problematic since most of the info are "Unknown".  The DT spec
specifies standard properties containing relevant information like
'model' and 'compatible' for which the suggested format is
<manufacturer,model>. Unfortunately the 'model' string found in DTs is
usually lacking the manufacturer so we can't use it for both
'Manufacturer' and 'Product Name' SMBIOS entries reliably.

So let's add a last resort to our current smbios parsing.  If none of
the sysinfo properties are found, scan for those information in the
root node of the device tree. Use the 'model' to fill the 'Product
Name' and the first value of 'compatible' for the 'Manufacturer', since
that always contains one.

pre-patch:
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Unknown
        Product Name: Unknown
        Version: Unknown
        Serial Number: 100000000bb24ceb
        UUID: 30303031-3030-3030-3061-613234636435
        Wake-up Type: Reserved
        SKU Number: Unknown
        Family: Unknown
[...]

and post patch:
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: raspberrypi
        Product Name: Raspberry Pi 4 Model B Rev 1.1
        Version: Unknown
        Serial Number: 100000000bb24ceb
        UUID: 30303031-3030-3030-3061-613234636435
        Wake-up Type: Reserved
        SKU Number: Unknown
        Family: Unknown
[...]

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
12 months agosmbios: Simplify reporting of unknown values
Ilias Apalodimas [Thu, 7 Dec 2023 09:18:49 +0000 (11:18 +0200)]
smbios: Simplify reporting of unknown values

If a value is not valid during the DT or SYSINFO parsing,  we explicitly
set that to "Unknown Product" and "Unknown" for the product and
manufacturer respectively.  It's cleaner if we move the checks insisde
smbios_add_prop_si() and provide an alternative string in case the
primary is NULL or empty

pre-patch dmidecode
<snip>
Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Unknown
        Product Name: Unknown Product
        Version: Not Specified
        Serial Number: Not Specified
        UUID: Not Settable
        Wake-up Type: Reserved
        SKU Number: Not Specified
        Family: Not Specified

[...]

post-patch dmidecode:

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Unknown
        Product Name: Unknown
        Version: Unknown
        Serial Number: Unknown
        UUID: Not Settable
        Wake-up Type: Reserved
        SKU Number: Unknown
        Family: Unknown
[...]

While at it make smbios_add_prop_si() add a string directly if the prop
node is NULL and replace smbios_add_string() calls with
smbios_add_prop_si(ctx, NULL, ....)

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
12 months agopxe_utils: Increase feedback to user when fdt file is not found
Michael Trimarchi [Thu, 7 Dec 2023 14:28:19 +0000 (15:28 +0100)]
pxe_utils: Increase feedback to user when fdt file is not found

extlinux.conf can set fdtdir. fdtdir look for fdt file using
information found in the environment variable. The function does
not report any error in the case the file is not found

Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
No EFI system partition
No EFI system partition
Failed to persist EFI variables
Scanning bootdev 'mmc@fa10000.bootdev':
  0  extlinux     ready   mmc          1  mmc@fa10000.bootdev.part_ /boot/extlinux/extlinux.conf
** Booting bootflow 'mmc@fa10000.bootdev.part_1' with extlinux
1:      am62x-sk-buildroot
Retrieving file: /boot/Image
append: console=ttyS2,115200n8 root=PARTUUID=c586a30c-0bf1-4323-aba8-779c814ee135 rw
rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000
Retrieving file: /boot/k3-am623_ccm_m3.dtb
Skipping fdtdir /boot/ for failure retrieving dts

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agocolibri-imx8x: configure usb hub to bypass mode
Andrejs Cainikovs [Wed, 20 Dec 2023 10:38:11 +0000 (11:38 +0100)]
colibri-imx8x: configure usb hub to bypass mode

This change configures Toradex Colibri iMX8X SoM USB
hub to bypass mode, and brings out of the reset state.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
12 months agocolibri-imx8x: remove -u-boot.dtsi include
Andrejs Cainikovs [Wed, 20 Dec 2023 10:38:10 +0000 (11:38 +0100)]
colibri-imx8x: remove -u-boot.dtsi include

This file is included automatically since quite some time now.

From documentation:

U-Boot automatically looks for and includes a file with updates
to the standard devicetree for your board, searching for them in
the same directory as the main file, in this order:

<orig_filename>-u-boot.dtsi
<CONFIG_SYS_SOC>-u-boot.dtsi
<CONFIG_SYS_CPU>-u-boot.dtsi
<CONFIG_SYS_VENDOR>-u-boot.dtsi
u-boot.dtsi

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
12 months agoapalis-imx8: remove -u-boot.dtsi include
Andrejs Cainikovs [Wed, 20 Dec 2023 10:38:09 +0000 (11:38 +0100)]
apalis-imx8: remove -u-boot.dtsi include

This file is included automatically since quite some time now.

From documentation:

U-Boot automatically looks for and includes a file with updates
to the standard devicetree for your board, searching for them in
the same directory as the main file, in this order:

<orig_filename>-u-boot.dtsi
<CONFIG_SYS_SOC>-u-boot.dtsi
<CONFIG_SYS_CPU>-u-boot.dtsi
<CONFIG_SYS_VENDOR>-u-boot.dtsi
u-boot.dtsi

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
12 months agoboard: phytec: phytec_som_detection: fix uninitialized bug
Yannic Moog [Wed, 20 Dec 2023 08:45:36 +0000 (09:45 +0100)]
board: phytec: phytec_som_detection: fix uninitialized bug

When som_type does not match any case, it is uninitialized and the
function still tries to print the SoM info. Rather, this is an error
condition and the function should abort prematurely. Highlight this by
printing an error message and returning early.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoboard: phytec: som_detection: move definitions to source file
Yannic Moog [Wed, 20 Dec 2023 08:45:35 +0000 (09:45 +0100)]
board: phytec: som_detection: move definitions to source file

Move all function definitions in {phytec|imx8m}_som_detection from the
header to the source file to prevent potential linker error regarding
multiple definitions. Also move the #if blocks with the definitions.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoboard: phytec: phytec_som_detection: fix eeprom_data zero check
Yannic Moog [Wed, 20 Dec 2023 08:45:34 +0000 (09:45 +0100)]
board: phytec: phytec_som_detection: fix eeprom_data zero check

In phytec_eeprom_data_init, after reading eeprom data into buffer, it is
checked whether all bytes are 0x0 by iterating over chunks of the
buffer. The offset, or index of the chunk, was never changed, leading to
repeated comparison of only the first chunk. Use array notation and
access chunk via array index to compare all chunks of the buffer.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoboard: phytec: imx8m_som_detection: fix uninitialized pointer bug
Yannic Moog [Wed, 20 Dec 2023 08:45:33 +0000 (09:45 +0100)]
board: phytec: imx8m_som_detection: fix uninitialized pointer bug

Pointer in phytec_imx8m_detect was accessed without checking it first.
Fix this by moving the pointer check in front of any accesses.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoboard: phytec: imx8m_som_detection: change phytec_imx8m_detect return type
Yannic Moog [Wed, 20 Dec 2023 08:45:32 +0000 (09:45 +0100)]
board: phytec: imx8m_som_detection: change phytec_imx8m_detect return type

phytec_imx8m_detect returns -1 on error, but the return type is u8
leading to 255 return values. Fix this by changing the return type to
int; there is no reason to keep it as u8 .

Signed-off-by: Yannic Moog <y.moog@phytec.de>
12 months agoconfigs: imx8m{m, n, p}_venice_defconfig: add arch_misc_init
Tim Harvey [Thu, 14 Dec 2023 16:25:42 +0000 (08:25 -0800)]
configs: imx8m{m, n, p}_venice_defconfig: add arch_misc_init

Enable call to arch_misc_init in order to probe the CAAM driver.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
12 months agoarm: dts: imx8mp-venice-gw72xx: add TPM device
Tim Harvey [Mon, 27 Nov 2023 19:37:23 +0000 (11:37 -0800)]
arm: dts: imx8mp-venice-gw72xx: add TPM device

Add the TPM device found on the GW72xx revision F PCB.

This hangs off of SPI2, uses gpio1_10 as a CS and gpio1_11 as RST#.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoarm: dts: imx8mm-venice-gw72xx: add TPM device
Tim Harvey [Mon, 27 Nov 2023 19:36:58 +0000 (11:36 -0800)]
arm: dts: imx8mm-venice-gw72xx: add TPM device

Add the TPM device found on the GW72xx revision F PCB.

This hangs off of SPI2, uses gpio1_10 as a CS and gpio1_11 as RST#.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agomxs: Fix VDDx brownout interrupt disable/enable
Cody Green [Mon, 3 Jul 2023 20:57:00 +0000 (21:57 +0100)]
mxs: Fix VDDx brownout interrupt disable/enable

Incorrect registers HW_POWER_VDDIOCTRL, HW_POWER_VDDACTRL
and HW_POWER_VDDDCTRL are used in the current code to disable/enable
brownout interrupts in 'mxs_power_set_vddx()'.
Change register to HW_POWER_CTRL which contains brownout interrupt
enable bits ENIRQ_VDDIO_BO, ENIRQ_VDDA_BO and ENIRQ_VDDD_BO.

Signed-off-by: Cody Green <cody@londelec.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
12 months agocommand: Move command completion temporary buffer to stack
Marek Vasut [Sat, 2 Dec 2023 20:52:31 +0000 (21:52 +0100)]
command: Move command completion temporary buffer to stack

The command completion temporary buffer seems to be only
used by the argv tokenizer, move it to stack. This saves
2 kiB from the binary size (depends on configuration) per:
$ aarch64-linux-gnu-readelf -s u-boot | sort -n -k 3

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agocommand: Allocate history buffer using calloc()
Marek Vasut [Sat, 2 Dec 2023 20:52:30 +0000 (21:52 +0100)]
command: Allocate history buffer using calloc()

The history buffer is currently a static array which can be some
10-40 kiB depending on configuration, and so adds considerably to
the U-Boot binary size. Allocate it dynamically instead to reduce
the U-Boot binary size.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
12 months agobootflow: Allow setting a cmdline arg with no value
Simon Glass [Wed, 29 Nov 2023 17:31:19 +0000 (10:31 -0700)]
bootflow: Allow setting a cmdline arg with no value

This is supposed to be supported by the 'bootflow cmd' command, at
least according to the help. There is a 'bootflow cmd clear' but it is
often more intuitive to use 'bootcmd cmd set' with an empty value.

Update the command to pass BOOTFLOWCL_EMPTY in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agobootm: Fix flags used for bootargs string substitution
Piotr Kubik [Fri, 24 Nov 2023 16:30:46 +0000 (17:30 +0100)]
bootm: Fix flags used for bootargs string substitution

Commit 51bb33846ad2 ("bootm: Support string substitution in
bootargs") introduced a feature of bootargs string substitution
and changed a flag used in bootm_process_cmdline_env() call
to be either true or false. With this flag value,
condition in bootm_process_cmdline()
`if (flags & BOOTM_CL_SUBST)` is never true
and process_subst() is never called.

Add a simple test to verify if substitution works OK.

Signed-off-by: Piotr Kubik <piotr.kubik@iopsys.eu>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoarm: afs: Set the filesize env. var. on load
Robert Catherall [Thu, 23 Nov 2023 14:16:01 +0000 (14:16 +0000)]
arm: afs: Set the filesize env. var. on load

The `afs load` command copies data to RAM. Set the filesize
environment variable to record how much data was 'loaded'

Signed-off-by: Robert Catherall <robert.catherall@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
12 months agorsa: use pkcs11 uri as defined in rfc7512
Ayoub Zaki [Sat, 26 Aug 2023 11:53:29 +0000 (13:53 +0200)]
rsa: use pkcs11 uri as defined in rfc7512

pkcs11 : change engine uri to use full pk11-URI as defined in:

https://www.rfc-editor.org/rfc/rfc7512.html
Signed-off-by: Ayoub Zaki <ayoub.zaki@embetrix.com>
12 months agoimxtract: specify max gunzip size
Nikita Shubin [Mon, 19 Dec 2022 08:05:27 +0000 (11:05 +0300)]
imxtract: specify max gunzip size

Specify max gunzip size from config to override SYS_XIMG_LEN
default value wich is 0x800000. In case we have a large portion of FIT
image, for example gzipped kernel with decompressed size large than
0x800000 we should enlarge imxract area, otherwise extracting it will
fail.

It used to be a hardcoded define in cmd/ximg.c and we are moving it to
config.

Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoMerge tag 'u-boot-amlogic-next-20231220' of https://source.denx.de/u-boot/custodians...
Tom Rini [Wed, 20 Dec 2023 13:34:12 +0000 (08:34 -0500)]
Merge tag 'u-boot-amlogic-next-20231220' of https://source.denx.de/u-boot/custodians/u-boot-amlogic into next

- Add support for new GXL MDIO mux, with driver and Linux DT sync from v6.4

12 months agoMerge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into...
Tom Rini [Tue, 19 Dec 2023 20:16:13 +0000 (15:16 -0500)]
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next

This PR contains 4 patchsets:

1. PMIC GPIO cells bringup. Created drivers for MAX7663 and Palmas
PMICs and gpio-uclass patch isolated behind configs for these 2
drivers. No unintentional size increase on any board. (proposed
2023-11-06 without any reaction)

2. Simple PLL clocks support in common tegra clock code which allows
use of simple PLL the same way main PLLs are used (before only
clock_start_pll was available). PLLD2 is an example of simple PLL, it
is used as a video subsystem parent clock and was used to test this
code. So far everything worked as expected. (proposed 2023-11-16
without any reaction)

3. A small patch for tegra emmc to allow pass max frequency from
device tree since some devices may not support full speed.

4. Pinmux DM conversion. Patchset consists of commit with DM wrapper
for existing pinmux code for t20/t30/t114, pinmux and funcmux files
relocation into a dedicated folder inside pinctrl, conversion of some
tegra boards to device tree pinmux setup.

12 months agoboard: compal: paz00: clean up the board
Svyatoslav Ryhel [Sat, 2 Dec 2023 08:08:02 +0000 (10:08 +0200)]
board: compal: paz00: clean up the board

Since implementation of pinctrl driver for T20 Paz00 can switch
to device tree pinmux setup along with remove of board pinmux
and some minor device tree and defconfig tweaks.

Tested-by: Agneli <poczt@protonmail.ch> # Toshiba AC100 T20
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoboard: htc: endeavoru: switch to DM pinmux
Svyatoslav Ryhel [Tue, 28 Nov 2023 11:43:31 +0000 (13:43 +0200)]
board: htc: endeavoru: switch to DM pinmux

Drop the pinmux setup in the board in favor of setting it up in
the device tree. Device tree nodes match nodes used for the Linux
device tree and are set according to the downstream kernel. 

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoboard: asus: transformer: switch to DM pinmux
Svyatoslav Ryhel [Mon, 27 Nov 2023 17:20:21 +0000 (19:20 +0200)]
board: asus: transformer: switch to DM pinmux

Drop the pinmux setup in the board in favor of setting it up in
the device tree. Device tree nodes match nodes used in the Linux
device tree. 

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoboard: lg: x3-t30: switch to DM pinmux
Svyatoslav Ryhel [Mon, 27 Nov 2023 17:08:32 +0000 (19:08 +0200)]
board: lg: x3-t30: switch to DM pinmux

Drop the pinmux setup in the board in favor of setting it up in
the device tree. Device tree nodes match nodes used for the Linux
device tree and are set according to the service manual.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoboard: asus: grouper: switch to DM pinmux
Svyatoslav Ryhel [Mon, 27 Nov 2023 16:16:50 +0000 (18:16 +0200)]
board: asus: grouper: switch to DM pinmux

Drop the pinmux setup in the board in favor of setting it up in
the device tree. Device tree nodes match nodes used in the Linux
device tree.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agodrivers: pinctrl: tegra: incorporate existing code
Svyatoslav Ryhel [Mon, 27 Nov 2023 09:54:21 +0000 (11:54 +0200)]
drivers: pinctrl: tegra: incorporate existing code

Move all existing pinmux and funcmux code into a dedicated folder in
pinctrl to simplify further maintenance.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agodrivers: pinctrl: create Tegra DM pinctrl driver
Svyatoslav Ryhel [Sun, 26 Nov 2023 15:54:03 +0000 (17:54 +0200)]
drivers: pinctrl: create Tegra DM pinctrl driver

The existing pinctrl driver available for Tegra SOC is well
designed, but it lacks DM support. Let's add a DM compatible
overlay, which allows use of the device tree, along with preserving
backward compatibility with all existing setups and the ability
to use it in SPL board configuration stage.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoARM: mach-tegra: rearrange SPL configs
Svyatoslav Ryhel [Fri, 1 Dec 2023 11:22:00 +0000 (13:22 +0200)]
ARM: mach-tegra: rearrange SPL configs

SPL configs are used only by the ARMv7-based Tegra SOC's, so move
SPL_SYSRESET under TEGRA_ARMV7_COMMON selection and enable SPL_DM
since SPL_SYSRESET depends on it.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agommc: tegra: use max-frequency from device tree if provided
Peter Geis [Tue, 19 Dec 2023 13:35:52 +0000 (15:35 +0200)]
mmc: tegra: use max-frequency from device tree if provided

The driver currently hard-codes the max freqency for the sdhci
controllers. If the controller is unable to operate at the max
frequency, the mmc card will not be available on the first scan.
Subsequent scans will eventually find a working combination.

Fix this by allowing the driver to check for the max-frequency
property and default to the original value if it doesn't exist.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoARM: tegra114: clock: implement PLLD2 support
Svyatoslav Ryhel [Thu, 16 Nov 2023 07:35:26 +0000 (09:35 +0200)]
ARM: tegra114: clock: implement PLLD2 support

PLLD2 is a simple clock (controlled by 2 registers) and appears starting
from T30. Primary use of PLLD2 is as main HDMI clock parent.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoARM: tegra30: clock: implement PLLD2 support
Svyatoslav Ryhel [Mon, 3 Jul 2023 15:11:58 +0000 (18:11 +0300)]
ARM: tegra30: clock: implement PLLD2 support

PLLD2 is a simple clock (controlled by 2 registers) and appears starting
from T30. Primary use of PLLD2 is as main HDMI clock parent.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoARM: tegra: clock: support get and set rate for simple PLL
Svyatoslav Ryhel [Mon, 3 Jul 2023 15:06:54 +0000 (18:06 +0300)]
ARM: tegra: clock: support get and set rate for simple PLL

Simple PLL clocks like PLLD2 were omitted since they do not share common
4 register structure with main clocks. Such clocks are containd in simple
PLL group. Only clock_start_pll function supported them. This patch expands
this support on clock_set_rate and clock_get_rate which should make
simple PLL clocks equal to main PLL clocks.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agodrivers: gpio-uclass: support PMIC GPIO children
Svyatoslav Ryhel [Wed, 26 Jul 2023 14:10:06 +0000 (17:10 +0300)]
drivers: gpio-uclass: support PMIC GPIO children

UCLASS_PMIC may have GPIO children without exposed fdt node,
in this case if requesting fails, check if uclass is PMIC.

Restrict build for supported devices only to save those precious
bytes on devices with no spare memory.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agodrivers: gpio: implement PALMAS GPIO cell
Svyatoslav Ryhel [Fri, 21 Jul 2023 07:50:15 +0000 (10:50 +0300)]
drivers: gpio: implement PALMAS GPIO cell

Add gpio driver for TI Palmas series PMIC. This has 8 gpio which can
work as input/output.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agodrivers: gpio: implement MAX77663 GPIO cell
Svyatoslav Ryhel [Sat, 15 Jul 2023 19:25:03 +0000 (22:25 +0300)]
drivers: gpio: implement MAX77663 GPIO cell

MAXIM Semiconductor's PMIC, MAX77663 has 8 GPIO pins and 3 GPIO-like
pins. It also supports interrupts from these pins.

Add GPIO driver for these pins to control via GPIO APIs.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
12 months agoMerge patch series "Fix J7200 kernel boot when using upstream u-boot"
Tom Rini [Tue, 19 Dec 2023 15:15:57 +0000 (10:15 -0500)]
Merge patch series "Fix J7200 kernel boot when using upstream u-boot"

Reid Tonking <reidt@ti.com> says:

Since the 09.01.00.002 release of ti-linux-firmware [0] upstream uboot
has led to the kernel hanging during boot [1] for the TI J7200 S0C. The
issue was found to be a few patches that had be added to ti-u-boot, but not
yet upstreamed. This series adds the missing two patches to allow upstream
u-boot to boot the kernel properly [2].

[0] https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/commit/?h=ti-linux-firmware-next&id=952fd03e36a50ec070e73560dc1060102d637ce0

Boot logs:
[1] https://gist.github.com/reidt1/5f4e85a0db258bcf20d7168bd0caebd0
[2] https://gist.github.com/reidt1/e950dc97f15ad0a09623d64f81edac39

Links to patches on ti-u-boot:
https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2023.04-next&id=d878fbef4d4460e87608d8d2dfe5311499de49c5
https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/?h=ti-u-boot-2023.04-next&id=543e735fe495be233a8a75b19b3d7f8ed44251e0

12 months agoMerge patch series "Add support for MediaTek MT8365 EVK Board"
Tom Rini [Tue, 19 Dec 2023 15:09:14 +0000 (10:09 -0500)]
Merge patch series "Add support for MediaTek MT8365 EVK Board"

Julien Masson <jmasson@baylibre.com> says:

This patch series add the support for the MediaTek MT8365 EVK Board [1].
Most of the code have been copied/adapted from Linux tag v6.7-rc2.

For now we only enable/test these features:
Boot, UART, Watchdog and MMC.

[trini: This includes two clocks not listed in the Linux binding, which
 needs resyncing later]

12 months agoMerge branch '2023-12-19-assorted-platform-updates' into next
Tom Rini [Tue, 19 Dec 2023 15:07:56 +0000 (10:07 -0500)]
Merge branch '2023-12-19-assorted-platform-updates' into next

- Assorted platform updates for TI K3, vexpress64, mediatek and related
  cleanups to the DW GPIO driver and OPTEE

12 months agoarm: dts: k3-j7200-r5-common-proc-board: Set parent clock for clock ID 323
Reid Tonking [Thu, 7 Dec 2023 16:52:11 +0000 (10:52 -0600)]
arm: dts: k3-j7200-r5-common-proc-board: Set parent clock for clock ID 323

Previously, dynamic frequency scaling supported rates only through fixed
divison.

This virtual clock mux configuration enables more varied rates on A72
clock ID 202 by setting up the required register.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Apurva Nandan <a-nandan@ti.com>
Signed-off-by: Reid Tonking <reidt@ti.com>
12 months agoarm: mach-k3: j72xx: add new 'virtual' mux
Bryan Brattlof [Thu, 7 Dec 2023 16:52:10 +0000 (10:52 -0600)]
arm: mach-k3: j72xx: add new 'virtual' mux

In order for the Cortex-A72s to operate at different frequencies other
than the default 2GHz, add in a new 'virtual' mux (a mux that does not
physically exist in the clock tree) that can be selected.

CC: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Apurva Nandan <a-nandan@ti.com>
Signed-off-by: Reid Tonking <reidt@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
12 months agoboard: mediatek: add MT8365 EVK board support
Julien Masson [Mon, 4 Dec 2023 10:48:58 +0000 (11:48 +0100)]
board: mediatek: add MT8365 EVK board support

This adds support for the MT8365 EVK board with the following
features enabled/tested: Boot, UART, Watchdog and MMC.

Signed-off-by: Julien Masson <jmasson@baylibre.com>
12 months agodt-bindings: clock: add Mediatek MT8365 pinctrl bindings
Julien Masson [Mon, 4 Dec 2023 10:48:56 +0000 (11:48 +0100)]
dt-bindings: clock: add Mediatek MT8365 pinctrl bindings

This adds the pinctrl bindings for Mediatek MT8365 SoC based on the
dt-bindings in Linux tag v6.7-rc2.
(commit 8b4c397d88d97d4fd9c3f3527aa66688b1a3387a)

Signed-off-by: Julien Masson <jmasson@baylibre.com>
12 months agoarm: mediatek: add support for MediaTek MT8365 SoC
Julien Masson [Mon, 4 Dec 2023 10:48:55 +0000 (11:48 +0100)]
arm: mediatek: add support for MediaTek MT8365 SoC

This patch adds basic support for MediaTek MT8365 SoC.
The dtsi has been copied from Linux source code tag v6.7-rc2.
(commit 9b5d64654ea8f51fe1e8e29ca1777b620be8fb7c)

Signed-off-by: Julien Masson <jmasson@baylibre.com>
12 months agodt-bindings: power: add power-domain header for MediaTek MT8365 SoC
Julien Masson [Mon, 4 Dec 2023 10:48:53 +0000 (11:48 +0100)]
dt-bindings: power: add power-domain header for MediaTek MT8365 SoC

Add power-domain header for MediaTek MT8365 SoC copied from Linux
source code tag v6.7-rc2.
(commit a1571f1f333c2fced076f0d54ed771d1838d827f)

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
12 months agoclk: mediatek: add clock driver support for MediaTek MT8365 SoC
Julien Masson [Mon, 4 Dec 2023 10:48:52 +0000 (11:48 +0100)]
clk: mediatek: add clock driver support for MediaTek MT8365 SoC

This patch adds clock driver support for MediaTek MT8365 SoC.
The changes are based on the Linux source code tag v6.7-rc2.

clk-mt8365.c has been written based on these kernel files:
- clk-mt8365.c (a96cbb146a9736f501fe66ebda6a9018735e5e8a)
- clk-mt8365-apmixedsys.c (65c9ad77cbc0eed78db94d80041aba675cfbdfa9)
And adapted following the clk attributes supported by U-Boot.

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
12 months agodt-bindings: clock: add Mediatek MT8365 SoC clock bindings
Julien Masson [Mon, 4 Dec 2023 10:48:51 +0000 (11:48 +0100)]
dt-bindings: clock: add Mediatek MT8365 SoC clock bindings

This adds the clock bindings for Mediatek MT8365 SoC based on the
dt-bindings in Linux tag v6.7-rc2.
(commit c61978175ac1337f028ac1f956666f16db84f4e5)

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
12 months agoarm: mach-k3: am625: Relax emmc boot condition
Michael Trimarchi [Fri, 8 Dec 2023 07:53:05 +0000 (08:53 +0100)]
arm: mach-k3: am625: Relax emmc boot condition

spl_mmc_emmc_boot_partition return a number different from 0
if the partition is a boot one. We can have the uboot img
for instance in a raw offset in emmc partition 0 so we would
like to continue to load the next stage. If the user want
to use EMMC as boot device allow him to use any part of the
emmc and not only boot partition

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
12 months agommc: mediatek: set b_max according CONFIG_SYS_MMC_MAX_BLK_COUNT
Julien Masson [Mon, 4 Dec 2023 13:41:45 +0000 (14:41 +0100)]
mmc: mediatek: set b_max according CONFIG_SYS_MMC_MAX_BLK_COUNT

The block count limit on MMC based devices should be set according to
CONFIG_SYS_MMC_MAX_BLK_COUNT instead of hardcoding value.

Signed-off-by: Julien Masson <jmasson@baylibre.com>
12 months agogpio: dw: Drop unused headers
Maksim Kiselev [Wed, 29 Nov 2023 21:47:31 +0000 (00:47 +0300)]
gpio: dw: Drop unused headers

Drop headers which are not used or needed in this file.

Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
12 months agotee: optee: don't enumerate services if there ain't any
Etienne Carriere [Wed, 29 Nov 2023 12:37:53 +0000 (13:37 +0100)]
tee: optee: don't enumerate services if there ain't any

Change optee driver service enumeration to not enumerate (and
allocate a zero sized shared memory buffer) when OP-TEE
reports that there is no service to enumerate.

This change fixes an existing issue that occurs when the such zero
sized shared memory buffer allocated from malloc() has a physical
address of offset 0 of a physical 4kB page. In such case, OP-TEE
secure world refuses to register the zero-sized shared memory
area and makes U-Boot optee service enumeration to fail.

Fixes: 94ccfb78a4d6 ("drivers: tee: optee: discover OP-TEE services")
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
12 months agotee: optee: don't fail on services enumeration failure
Etienne Carriere [Wed, 29 Nov 2023 12:37:52 +0000 (13:37 +0100)]
tee: optee: don't fail on services enumeration failure

Change optee probe function to only warn when service enumeration
sequence fails instead of reporting an optee driver probe failure.
Indeed U-Boot can still use OP-TEE even if some OP-TEE services are
not discovered.

Fixes: 94ccfb78a4d6 ("drivers: tee: optee: discover OP-TEE services")
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
12 months agoremoteproc: k3-dsp: Avoid reloading of firmware
Udit Kumar [Sat, 25 Nov 2023 18:29:39 +0000 (23:59 +0530)]
remoteproc: k3-dsp: Avoid reloading of firmware

DSP core is going into abnormal state when load callback is called
after starting of DSP core.
Reload of firmware needs core to be stopped first, followed by
load.
So avoid loading of firmware, when core is started.

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
12 months agoarm: vexpress64: juno: Allow boot from VirtIO
Robert Catherall [Thu, 23 Nov 2023 18:22:58 +0000 (18:22 +0000)]
arm: vexpress64: juno: Allow boot from VirtIO

The AEM and Juno FVPs (Fixed Virtual Platforms) support a VirtIO
disc interface. Adding VIRTIO to the list of boot devices allows
these FastModel platforms to boot from 'disc' in the same way
the hardware counterpart can boot from SATA or USB.

This is a NOP if CONFIG_CMD_VIRTIO is not enabled, so no impact
on Juno hardware (which is built with vexpress_aemv8a_juno_defconfig)

Signed-off-by: Robert Catherall <robert.catherall@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
12 months agoARM: dts: sync Amlogic GX DT to Linux v6.4
Neil Armstrong [Wed, 13 Dec 2023 09:30:13 +0000 (10:30 +0100)]
ARM: dts: sync Amlogic GX DT to Linux v6.4

Sync Amlogic GXBB, GXL & GXM DTs from Linux v6.4, and also
switch to GXL MDIO MUX driver to adapt to DT change,

Most of the changes are only cosmetic or doesn't concern U-Boot,
the most important change for U-Boot is the GXL mdio mux compatible
switch to amlogic,gxl-mdio-mux.

Link: https://lore.kernel.org/r/20231213-u-boot-gxl-mdio-mux-v2-2-c56bb02a75ea@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
12 months agonet: Add Amlogic GXL MDIO Mux driver
Neil Armstrong [Wed, 13 Dec 2023 09:30:12 +0000 (10:30 +0100)]
net: Add Amlogic GXL MDIO Mux driver

Port the mdio-mux-meson-gxl.c Linux driver introduced in [1],
and adapt it to U-Boot.

This driver is needed to boot U-Boot with Linux DT since v6.4,
since it switched the MDIO mux from the mmio to a proper GXL driver.

[1] 9a24e1ff4326 ("net: mdio: add amlogic gxl mdio mux support")

Link: https://lore.kernel.org/r/20231213-u-boot-gxl-mdio-mux-v2-1-c56bb02a75ea@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
12 months agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into...
Tom Rini [Mon, 18 Dec 2023 14:56:58 +0000 (09:56 -0500)]
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into next

- VisionFive2: Enable CONFIG_SYSRESET
- StarFive: Modify starfive timer driver
- AMD/Xilinx: Add MicroBlaze V support
- Unmatched: Migrate to text environment

12 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-spi into...
Tom Rini [Mon, 18 Dec 2023 14:56:42 +0000 (09:56 -0500)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-spi into next

- spi_nor_read_sfdp_dma_unsafe (Vaishnav)
- w25q01/02 (Jim)

12 months agoMerge tag 'v2024.01-rc5' into next
Tom Rini [Mon, 18 Dec 2023 13:31:50 +0000 (08:31 -0500)]
Merge tag 'v2024.01-rc5' into next

Prepare v2024.01-rc5

12 months agoPrepare v2024.01-rc5
Tom Rini [Mon, 18 Dec 2023 12:49:45 +0000 (07:49 -0500)]
Prepare v2024.01-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoriscv: sifive: unmatched: migrate to text environment
Yong-Xuan Wang [Tue, 5 Dec 2023 11:09:55 +0000 (11:09 +0000)]
riscv: sifive: unmatched: migrate to text environment

Migrate to the new environment format and drop most of the config.h.

Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agotimer: starfive: Add Starfive timer support
Kuan Lim Lee [Mon, 11 Dec 2023 02:22:10 +0000 (10:22 +0800)]
timer: starfive: Add Starfive timer support

Add timer driver in Starfive SoC. It is an timer that outside
of CPU core and inside Starfive SoC.

Signed-off-by: Kuan Lim Lee <kuanlim.lee@starfivetech.com>
Signed-off-by: Wei Liang Lim <weiliang.lim@starfivetech.com>
Changes for v2:
- correct driver name, comment, variable
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
12 months agoriscv: Add support for AMD/Xilinx MicroBlaze V
Michal Simek [Mon, 6 Nov 2023 11:56:47 +0000 (12:56 +0100)]
riscv: Add support for AMD/Xilinx MicroBlaze V

MicroBlaze V is new AMD/Xilinx soft-core 32bit RISC-V processor IP.
It is hardware compatible with classic MicroBlaze processor.

The patch contains initial wiring and configuration for initial HW design
with memory, cpu, interrupt controller, timers and uartlite console
(interrupt controller is listed but U-Boot is not using it).

Provided DT is just describing one configuration and should be taken only
as example.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
12 months agoconfigs: visionfive2: Enable CONFIG_SYSRESET config
Jaehoon Chung [Tue, 31 Oct 2023 08:24:39 +0000 (17:24 +0900)]
configs: visionfive2: Enable CONFIG_SYSRESET config

Enable CONFIG_SYSRESET config to do reset.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
12 months agoriscv: dts: jh7110: Add a gpio-restart node
Jaehoon Chung [Tue, 31 Oct 2023 08:24:38 +0000 (17:24 +0900)]
riscv: dts: jh7110: Add a gpio-restart node

Add gpio-restart node to do reset.

Before applied this patch, System Reset Extension doesn't appear with
sbi command.

OpenSBI 1.3
Machine:
  Vendor ID 489
  Architecture ID 8000000000000007
  Implementation ID 4210427
Extensions:
  sbi_set_timer
  sbi_console_putchar
...[snip]...
  IPI Extension
  RFENCE Extension
  Hart State Management Extension
  Performance Monitoring Unit Extension

After applied this patch, System Reset Extension is supported from SBI.

OpenSBI 1.3
Machine:
  Vendor ID 489
  Architecture ID 8000000000000007
  Implementation ID 4210427
Extensions:
  sbi_set_timer
  sbi_console_putchar
...[snip]...
  IPI Extension
  RFENCE Extension
  Hart State Management Extension
  System Reset Extension
  Performance Monitoring Unit Extension

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
12 months agoMerge tag 'efi-next-20231217' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sun, 17 Dec 2023 14:11:06 +0000 (09:11 -0500)]
Merge tag 'efi-next-20231217' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request for efi-next-20231217

Documentation:

* replace MD5 and SHA1 by SHA256 in examples

UEFI:

* Refactor boot manager and bootefi command to let the EFI boot method work
  without shell.

12 months agodoc: Replace examples of MD5 and SHA1 with SHA256
Sean Anderson [Sat, 2 Dec 2023 19:33:14 +0000 (14:33 -0500)]
doc: Replace examples of MD5 and SHA1 with SHA256

Both SHA1 and (especially) MD5 are no longer as safe as they once were for
cryptographic use. Replaces examples which use them with examples using
SHA256 instead. This will provide more-secure defaults for users who use
documentation examples as a base for their own use. This is not too
necessary for non-verified-boot scenarios (since someone could just replace
the checksum), but I wanted to be complete.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agobootmeth: use efi_loader interfaces instead of bootefi command
AKASHI Takahiro [Tue, 21 Nov 2023 01:29:46 +0000 (10:29 +0900)]
bootmeth: use efi_loader interfaces instead of bootefi command

Now that efi_loader subsystem provides interfaces that are equivalent
with bootefi command, we can replace command invocations with APIs.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
12 months agocmd: efidebug: ease efi configuration dependency
AKASHI Takahiro [Tue, 21 Nov 2023 01:29:45 +0000 (10:29 +0900)]
cmd: efidebug: ease efi configuration dependency

Now it is clear that the command actually depends on interfaces,
not "bootefi bootmgr" command.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
12 months agocmd: bootefi: move library interfaces under lib/efi_loader
AKASHI Takahiro [Tue, 21 Nov 2023 01:29:44 +0000 (10:29 +0900)]
cmd: bootefi: move library interfaces under lib/efi_loader

In the prior commits, interfaces for executing EFI binary and boot manager
were carved out. Move them under efi_loader directory so that they can
be called from other places without depending on bootefi command.

Only efi_selftest-related code will be left in bootefi.c.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
12 months agocmd: bootefi: localize global device paths for efi_selftest
AKASHI Takahiro [Tue, 21 Nov 2023 01:29:43 +0000 (10:29 +0900)]
cmd: bootefi: localize global device paths for efi_selftest

Device paths allocated in bootefi_test_prepare() will be immediately
consumed by do_efi_selftest() and there is no need to keep them for later
use. Introduce test-specific varialbles to make it easier to move other
bootmgr functions into library directory in the next commit.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
12 months agocmd: bootefi: carve out binary execution interface
AKASHI Takahiro [Tue, 21 Nov 2023 01:29:42 +0000 (10:29 +0900)]
cmd: bootefi: carve out binary execution interface

Carve binary execution code out of do_bootefi_image() in order to move
binary-execution specific code into library directory in the later
commit.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
12 months agocmd: bootefi: carve out EFI boot manager interface
AKASHI Takahiro [Tue, 21 Nov 2023 01:29:41 +0000 (10:29 +0900)]
cmd: bootefi: carve out EFI boot manager interface

Carve EFI boot manager related code out of do_bootefi_image() in order
to move boot manager specific code into library directory in the later
commit.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
12 months agocmd: bootefi: re-organize do_bootefi()
AKASHI Takahiro [Tue, 21 Nov 2023 01:29:40 +0000 (10:29 +0900)]
cmd: bootefi: re-organize do_bootefi()

Replicate some code and re-organize do_bootefi() into three cases, which
will be carved out as independent functions in the next two commits.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
12 months agocmd: bootefi: unfold do_bootefi_image()
AKASHI Takahiro [Tue, 21 Nov 2023 01:29:39 +0000 (10:29 +0900)]
cmd: bootefi: unfold do_bootefi_image()

Unfold do_bootefi_image() into do_bootefi() in order to make it easier
to re-organize do_bootefi() in the next commit.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
12 months agoRevert "board: ti: am62x/am62ax: Update virtual interrupt allocations in board config"
Tom Rini [Sat, 16 Dec 2023 01:23:59 +0000 (20:23 -0500)]
Revert "board: ti: am62x/am62ax: Update virtual interrupt allocations in board config"

After talking with the author off-list I was reminded that this part of
the series was not supposed to be merged, only parts 1-3 upon further
review.

This reverts commit 58a277c207927530469f0ae56eff7d5f702d5486.

Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoMerge tag 'clk-2024.01-next' of https://source.denx.de/u-boot/custodians/u-boot-clk...
Tom Rini [Fri, 15 Dec 2023 22:49:13 +0000 (17:49 -0500)]
Merge tag 'clk-2024.01-next' of https://source.denx.de/u-boot/custodians/u-boot-clk into next

clock patches for u-boot/next

The main thing in here is Igor's conversion of soc_clk_dump to a clk_ops
member. There's also a write-protect feature for nuvoton clocks.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
12 months agoMerge tag 'clk-2024.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-clk
Tom Rini [Fri, 15 Dec 2023 22:48:52 +0000 (17:48 -0500)]
Merge tag 'clk-2024.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-clk

clock changes for u-boot/master

This has some clock fixes which should go in before the release. It's a bit
late in the cycle, but most of these have tests to go along with them.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
12 months agoMerge branch '2023-12-15-assorted-TI-platform-updates' into next
Tom Rini [Fri, 15 Dec 2023 21:20:24 +0000 (16:20 -0500)]
Merge branch '2023-12-15-assorted-TI-platform-updates' into next

- Assorted updates and fixes for some TI K3 platforms and SoCs

12 months agoboard: ti: k3: Remove need for CFG_SYS_SDRAM_BASE
Andrew Davis [Thu, 30 Nov 2023 14:49:11 +0000 (08:49 -0600)]
board: ti: k3: Remove need for CFG_SYS_SDRAM_BASE

The base address of extended DDR does not change across the K3 family.
Setting this per SoC is not needed. Remove this definition to help
remove the last bits from K3 include/configs/*.h files.

Signed-off-by: Andrew Davis <afd@ti.com>
12 months agotest: dm: clk_ccf: fix building error
Yang Xiwen [Fri, 15 Dec 2023 20:21:11 +0000 (04:21 +0800)]
test: dm: clk_ccf: fix building error

Fix unused variable error produced by building tests

Fixes: d3061824 (test: dm: clk_ccf: test ccf_clk_ops)
Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231216-b4-fix_build-v1-1-b8e79c94744f@outlook.com
12 months agoboard: ti: am62x/am62ax: Update virtual interrupt allocations in board config
Vishal Mahaveer [Tue, 28 Nov 2023 19:40:24 +0000 (13:40 -0600)]
board: ti: am62x/am62ax: Update virtual interrupt allocations in board config

Updates as a result of TIFS core now reserving a virtual interrupt
for enabling interrupts between DM to TIFS core. Because of this
change other virtual interrupt counts decrease by one.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
12 months agoboard: ti: am62x/am62ax: Update MCU GPIO interrupt allocation in board config
Vishal Mahaveer [Tue, 28 Nov 2023 19:40:23 +0000 (13:40 -0600)]
board: ti: am62x/am62ax: Update MCU GPIO interrupt allocation in board config

Share the MCU GPIO interrupts between A53 core and DM R5 core. Allocating
2 instances each to A53 and DM R5.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
12 months agoboard: ti: am62ax: Add C7x resource allocation entries to board config
Vishal Mahaveer [Tue, 28 Nov 2023 19:40:22 +0000 (13:40 -0600)]
board: ti: am62ax: Add C7x resource allocation entries to board config

Update am62ax rm-cfg with allocation entries for C7x core. Following
updates are added for C7x:
- Share split BCDMA tx and rx channels between DM R5 and C7x
- Share rings for split BCDMA tx and rx channels between DM R5 and C7x
- Add Global events and Virtual interrupts for C7x

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
12 months agoboard: ti: am62x/am62ax: Formatting updates to board config files
Vishal Mahaveer [Tue, 28 Nov 2023 19:40:21 +0000 (13:40 -0600)]
board: ti: am62x/am62ax: Formatting updates to board config files

Minor formatting updates to the rm board configuration file for
am62x and am62ax boards.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>