]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
8 months agommc: Fix potential timer value truncation
Ronald Wahl [Wed, 11 Dec 2024 20:52:00 +0000 (21:52 +0100)] 
mmc: Fix potential timer value truncation

On 64bit systems the timer value might be truncated to a 32bit value
causing malfunctions. For example on ARM the timer might start from 0
again only after a cold reset. The 32bit overflow occurs after a bit
more than 49 days (1000 Hz counter) so booting after that time may lead
to a surprise because the board might become stuck requiring a cold
reset.

Signed-off-by: Ronald Wahl <ronald.wahl@legrand.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
8 months agosmbios: address build warning
Peng Fan [Tue, 3 Dec 2024 13:42:57 +0000 (21:42 +0800)] 
smbios: address build warning

include display_options.h to address build warning:
lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function ‘print_buffer’
[-Wimplicit-function-declaration]
         print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
         ^~~~~~~~~~~~

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 months agoarm: mach-k3: fix typo in devstat macro name
Prasanth Babu Mantena [Wed, 27 Nov 2024 06:13:34 +0000 (11:43 +0530)] 
arm: mach-k3: fix typo in devstat macro name

Fix spelling mistake in the board init files of j721e and j721s2.

s/WKUP_DEVSTAT_MCU_OMLY_MASK/WKUP_DEVSTAT_MCU_ONLY_MASK

Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
8 months agobios_emulator: fix incorrect printing of address in "jump near immediate"
Yuri Zaporozhets [Sun, 1 Dec 2024 22:28:49 +0000 (23:28 +0100)] 
bios_emulator: fix incorrect printing of address in "jump near immediate"

In the x86emuOp_jump_call_near_IMM() function the target address is
printed incorrectly when jumping backwards. For example instead of
"jmp 0xe8bc" the string "jmp ffffe8bc" is printed. That's because
of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
8 months agobios_emulator: fix incorrect printing of address in "call near immediate"
Yuri Zaporozhets [Sat, 30 Nov 2024 20:56:25 +0000 (21:56 +0100)] 
bios_emulator: fix incorrect printing of address in "call near immediate"

In the x86emuOp_call_near_IMM() function the address of CALL is
printed incorrectly when jumping backwards. For example, the correct
disassemble of the bytes below would be:

0000E8DE  E8DBFF            call 0xe8bc

(verified by ndisasm). But instead the address is printed as "ffffe8bc".
That's because of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
8 months agobios_emulator: fix garbled printing of disassembled SET* instructions
Yuri Zaporozhets [Tue, 26 Nov 2024 23:29:53 +0000 (00:29 +0100)] 
bios_emulator: fix garbled printing of disassembled SET* instructions

When DEBUG_DECODE_F is enabled in bios_emulator, the printing of
SET{O,NO,B,NB,Z,NZ,BE,NBE,S,NS,P,TP,L,NL,LE,NLE} instructions
is not followed by newline and is, therefore, immediately followed
by the printed address of a new instruction. This garbles the output
and makes it very difficult to read.

This patch adds missing DECODE_PRINTF("\n") calls to print newlines.

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
8 months agobios_emulator: fix garbled printing of disassembled BSF instruction
Yuri Zaporozhets [Tue, 26 Nov 2024 21:59:37 +0000 (22:59 +0100)] 
bios_emulator: fix garbled printing of disassembled BSF instruction

When DEBUG_DECODE_F is enabled in bios_emulator, the printing of BSF
instructions is garbled because the '\n' symbol is used instead of
the correct '\t'. Fix that.

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
8 months agonet: fec: phy: Don't advertise Gbit on (R)MII
Alexander Sverdlin [Thu, 12 Dec 2024 17:25:24 +0000 (18:25 +0100)] 
net: fec: phy: Don't advertise Gbit on (R)MII

Currently if a gigabit-capable PHY is connected to FEC via RMII or MII, it
will advertise 1000FULL and 1000HALF to a link partner.

Different problems may arise here:
- usually with (R)MII between MAC and PHY the PHY's connection to magnetics
would have only 2 pairs routed as well, otherwise a PHY can negotiate 1000
speed and there will be no traffic possible;
- but even if there is no way to negotiate 1000 speed in HW (only 2 signal
pairs routed), it may take a lot of time for PHY to figure this out; in
case of AD1300 it takes 17-20 seconds, which is waay longer than default
4s PHY_ANEG_TIMEOUT.

Use phy_set_supported() in such cases to disable gigabit advertised
options.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
8 months agoimx: mach: imx8: fdt: set correct frequencies for the industrial SoC
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:55 +0000 (13:18 +0100)] 
imx: mach: imx8: fdt: set correct frequencies for the industrial SoC

Set correct CPU and GPU frequencies for the industrial i.MX8 SoC
variant.

Ensure that the CPU and GPU frequencies are properly configured for the
industrial variant of the SoC. According to the "i.MX 8QuadMax
Industrial Applications Processors" datasheet, the frequency limits for
this variant are as follows:
- Cortex-A72: 1.296 GHz
- Cortex-A53: 1.104 GHz
- GPU core: 625 MHz
- GPU shader: 625 MHz

The CPU clock is enforced by the System Controller Firmware (SCFW), but
the cpufreq driver is unaware of this enforcement. By removing
unsupported frequencies from the operating points, we ensure that the
cpufreq driver aligns correctly with the SCFW's settings.

The GPU frequency, on the other hand, is not enforced by the SCFW. As a
result, the GPU could potentially be overclocked. To prevent this, we
set the correct clock frequency and update the operating points
accordingly, ensuring compliance with the datasheet specifications.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
8 months agotoradex: apalis-imx8: simplify module version handling
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:54 +0000 (13:18 +0100)] 
toradex: apalis-imx8: simplify module version handling

Simplify module version handling by removing the special case for the
Apalis iMX8QM.

The Apalis iMX8QM has been treated as a special case in module version
handling, but was always the default. By removing this special handling,
the code is simplified and easier to maintain.

We will not print the message "Unknown Apalis iMX8 module" anymore.
However, we still handle this because if the config block is missing we
show "MISSING TORADEX CONFIG BLOCK" and if the serial number is unknown
we show "Model: Toradex 0000 UNKNOWN MODULE V1.1A". Therefore, it is
still possible to detect such issues.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
8 months agotoradex: tdx-cfg-block: add new apalis imx8 pids
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:53 +0000 (13:18 +0100)] 
toradex: tdx-cfg-block: add new apalis imx8 pids

Add new PIDs for the Apalis iMX8 modules featuring the industrial
variant of the SoC, which supports a maximum CPU frequency of 1300 MHz.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
8 months agotoradex: tdx-cfg-block: increase indentation for longer defines
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:52 +0000 (13:18 +0100)] 
toradex: tdx-cfg-block: increase indentation for longer defines

This preparation step ensures that the first column has sufficient space
to handle longer defines. This is necessary for the new Apalis iMX8
defines.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
8 months agotoradex: tdx-cfg-block: set apalis imx8dxp to always disabled
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:51 +0000 (13:18 +0100)] 
toradex: tdx-cfg-block: set apalis imx8dxp to always disabled

Apalis iMX8DXP 1GB is currently set to enable when compiling for Apalis
iMX8. This is a mistake the Apalis iMX8DXP 1GB was never released and is
not compatible to the Apalis iMX8 series.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
8 months agoMerge tag 'fsl-qoriq-2024-12-15' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sun, 15 Dec 2024 14:02:46 +0000 (08:02 -0600)] 
Merge tag 'fsl-qoriq-2024-12-15' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq

CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/23856

- Use strcat to replace sprintf for t208xqds
- Fix bootefi for board ls1028a
- Various fixes to sl28 board

8 months agoMerge tag 'doc-2025-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 15 Dec 2024 14:02:22 +0000 (08:02 -0600)] 
Merge tag 'doc-2025-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2025-01-rc5

Documentation:

* sending_patches: Fix spelling of "its"
* environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN
* remove redundant Rockchip bindings
* fwu_updates: Fix formatting
* coolpi: Fix document style
* board: theobroma-systems: fix feature list in introductions

Fix typos in code comments:

* clk: mpc83xx: Fix typo in "Coherent System Bus"
* efi_loader: Fix typos in enum efi_allocate_type

8 months agoboard: freescale: Replace invalid usage of sprintf by strcat
Francois Berder [Wed, 10 Jul 2024 21:37:35 +0000 (23:37 +0200)] 
board: freescale: Replace invalid usage of sprintf by strcat

buf was used as destination and as parameter to sprintf
which triggers an undefined behaviour.
This commit removes this usage of sprintf and uses strcat
to append strings to buf variable.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 months agoconfigs: ls1028a: Fix bootefi issue on Layerscape ls1028ardb platform
Wei Ming Chen [Sun, 13 Oct 2024 07:24:35 +0000 (15:24 +0800)] 
configs: ls1028a: Fix bootefi issue on Layerscape ls1028ardb platform

Without this patch, there will be error indicating that
"Cannot use 64 bit addresses with SDMA", and the booting
process will stuck.

please see full boot log below

U-Boot 2022.04-g18185931 (Sep 11 2024 - 13:15:30 +0800)

SoC:  LS1028AE Rev1.0 (0x870b0010)
Clock Configuration:
       CPU0(A72):1500 MHz  CPU1(A72):1500 MHz
       Bus:      400  MHz  DDR:      1600 MT/s
Reset Configuration Word (RCW):
       000000003c004010 00000030 00000000 00000000
       0000001000000000 018f0000 0030c000 00000000
       00000020020031a0 00002580 00000000 00003296
       0000003000000000 00000010 00000000 00000000
       0000004000000000 00000000 00000000 00000000
       0000005000000000 00000000 00000000 00000000
       0000006000000000 00000000 200e705a 00000000
       00000070bb580000 00000000
Model: LS1028A RDB Board
Board: LS1028AE Rev1.0-RDB, Version: C, boot from SD
FPGA: v8 (RDB)
SERDES1 Reference : Clock1 = 100.00MHz Clock2 = 100.00MHz
DRAM:  3.9 GiB
DDR    3.9 GiB (DDR4, 32-bit, CL=11, ECC on)
Using SERDES1 Protocol: 47960 (0xbb58)
PCIe1: pcie@3400000 Root Complex: no link
PCIe2: pcie@3500000 Root Complex: x1 gen2
Core:  45 devices, 22 uclasses, devicetree: separate
WDT:   Started watchdog@c000000 with servicing (60s timeout)
WDT:   Started watchdog@c010000 with servicing (60s timeout)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

EEPROM: Invalid ID (ff ff ff ff)
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Net:
Warning: enetc-0 (eth0) using random MAC address - d2:9b:a5:37:7b:b5
eth0: enetc-0
Warning: enetc-2 (eth1) using random MAC address - ca:57:11:de:de:cb
, eth1: enetc-2, eth2: swp0, eth3: swp1, eth4: swp2, eth5: swp3
Hit any key to stop autoboot:  0
Trying load HDP firmware from SD..
switch to partitions #0, OK
mmc0 is current device
Device: FSL_SDHC
Manufacturer ID: 9f
OEM: 5449
Name: SD32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 28.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

MMC read: dev # 0, block # 18944, count 512 ... 512 blocks read: OK
Loading hdp firmware from 0x00000000a0000000 offset 0x0000000000002000
Loading hdp firmware Complete
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@2140000.blk...
Scanning disk mmc@2150000.blk...
Found 7 disks
ERROR: invalid device tree
Found EFI removable media binary efi/boot/bootaa64.efi
981992 bytes read in 44 ms (21.3 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
WARNING could not find node vivante,gc: FDT_ERR_NOTFOUND.
Booting /efi\boot\bootaa64.efi
Cannot use 64 bit addresses with SDMA
Error reading cluster
** Unable to read file /efi/boot/grubaa64.efi **
Unexpected return from initial read: Device Error, buffersize 29D790
Failed to load image ぀¬ : Device Error
start_image() returned Device Error
EFI LOAD FAILED: continuing...
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
BootOrder not defined
EFI boot manager: Cannot load any image
Scanning mmc 1:2...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
BootOrder not defined
EFI boot manager: Cannot load any image
starting USB...
Bus usb@3100000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3110000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@3100000 for devices... 1 USB Device(s) found
scanning bus usb@3110000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Trying load from SD ...
switch to partitions #0, OK
mmc0 is current device
Device: FSL_SDHC
Manufacturer ID: 9f
OEM: 5449
Name: SD32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 28.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

MMC read: dev # 0, block # 32768, count 81920 ... 81920 blocks read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 months agodoc: cosmetic: fwu_updates: Fix formatting
Leonard Anderweit [Fri, 13 Dec 2024 10:20:24 +0000 (11:20 +0100)] 
doc: cosmetic: fwu_updates: Fix formatting

Remove one of the double colon so ..code-block is used for formatting.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
8 months agodoc: environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN
Jerome Forissier [Tue, 3 Dec 2024 13:50:51 +0000 (14:50 +0100)] 
doc: environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN

Document environment variables set by the dhcp command when the network
stack is lwIP.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
8 months agodoc: board: theobroma-systems: fix feature list in introductions
Quentin Schulz [Mon, 2 Dec 2024 13:01:26 +0000 (14:01 +0100)] 
doc: board: theobroma-systems: fix feature list in introductions

Board introductions have a feature list which isn't formatted properly
according to rST and is thus rendered incorrectly.

Fix this by adding the missing newlines in the appropriate places.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
8 months agoefi_loader: Fix typos in enum efi_allocate_type
Simon Glass [Sun, 1 Dec 2024 15:24:21 +0000 (08:24 -0700)] 
efi_loader: Fix typos in enum efi_allocate_type

Fix 'indicatged' and 'adress' typos.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 months agodoc: coolpi: Fix document style
Andy Yan [Mon, 2 Dec 2024 12:03:53 +0000 (20:03 +0800)] 
doc: coolpi: Fix document style

Add a blank line after title "Specification:" to
make it render correctly html.

And also remove the useless > in bash code block.

Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
8 months agodoc: remove redundant Rockchip bindings
Johan Jonker [Sat, 30 Nov 2024 21:18:57 +0000 (22:18 +0100)] 
doc: remove redundant Rockchip bindings

Most Rockchip device tree related bindings are converted to YAML
and available in the U-boot /dts/upstream/Bindings/ directory.
Remove all redundant U-boot entries.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
8 months agodoc: sending_patches: Fix spelling of "its"
J. Neuschäfer [Fri, 29 Nov 2024 19:42:29 +0000 (20:42 +0100)] 
doc: sending_patches: Fix spelling of "its"

Although it has historically been different, the current standard
spelling of the neutral singular possessive pronoun is "its".

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
8 months agoclk: mpc83xx: Fix typo in "Coherent System Bus"
J. Neuschäfer [Fri, 29 Nov 2024 19:42:28 +0000 (20:42 +0100)] 
clk: mpc83xx: Fix typo in "Coherent System Bus"

Cosmetic change.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
8 months agoboard: sl28: fix USB0
Michael Walle [Fri, 13 Dec 2024 10:23:21 +0000 (11:23 +0100)] 
board: sl28: fix USB0

Since commit 61ff13283c3b ("board: sl28: move to OF_UPSTREAM") USB0 is
broken because the former u-boot soc dtsi was setting dr_mode to "host"
but the linux device tree isn't. That is because linux fully supports
OTG but u-boot doesn't. Therefore, u-boot only ever enabled host mode
and never OTG mode. Add it to our board "-u-boot.dtsi" to fix it.

Fixes: 61ff13283c3b ("board: sl28: move to OF_UPSTREAM")
Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Michael Walle <mwalle@kernel.org>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 months agodoc: board: sl28: fix table
Michael Walle [Fri, 13 Dec 2024 10:23:20 +0000 (11:23 +0100)] 
doc: board: sl28: fix table

Convert the table to a correct reST table syntax.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 months agoboard: sl28: fix network on variant 3
Michael Walle [Fri, 13 Dec 2024 10:23:19 +0000 (11:23 +0100)] 
board: sl28: fix network on variant 3

Network is broken on variant 3 boards since commit 61ff13283c3b ("board:
sl28: move to OF_UPSTREAM") because it was removing the variant 3
handling. That is because at that time the var3 device tree was not
upstream. FWIW variant 3 is actually the same as the base variant, but
I've missed that the -u-boot.dtsi is not inlcuded in this case which
will set the ethernet alias.  Now that the var3 device tree is upstream,
just re-add it to the SPL handling again.

Fixes: 61ff13283c3b ("board: sl28: move to OF_UPSTREAM")
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 months agoboard: sl28: increase SPL_SYS_MALLOC_SIZE
Michael Walle [Fri, 13 Dec 2024 10:23:18 +0000 (11:23 +0100)] 
board: sl28: increase SPL_SYS_MALLOC_SIZE

Increase the malloc size to 2MiB because our FIT image exceeds the 1MiB
limit either if BL31 mode is enabled or if another device tree is added
to the image.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 months agoboard: sl28: fix linking with disabled watchdog
Michael Walle [Fri, 13 Dec 2024 10:23:17 +0000 (11:23 +0100)] 
board: sl28: fix linking with disabled watchdog

We don't have a reference to the driver used by
uclass_get_device_by_driver() in stop_recovery_watchdog(). Fix it by not
calling that function if the watchdog driver isn't enabled.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 months agoMerge patch series "Hyperflash Boot fixes for J7200/J721E"
Tom Rini [Sat, 14 Dec 2024 15:34:27 +0000 (09:34 -0600)] 
Merge patch series "Hyperflash Boot fixes for J7200/J721E"

Anurag Dutta <a-dutta@ti.com> says:

Hi All,
In u-boot, hbmc is broken and has been removed from j7200
configs. This series re-enables the hbmc driver and introduces a series
of hyperflash boot fixes. At present, in u-boot, the parent device (fss)
gets registered as a syscon device. This is done because the MMIO
mux driver in u-boot did not support the mux functionality when the
parent device is not a syscon. In this series, we make relevant changes
in the hbmc driver as well as dts' so that we can use the reg-mux driver for
selecting the appropriate state of the mux.

Test logs:

1) j721e-idk-gw hyperflash boot test: https://gist.github.com/anuragdutta731/50aae6fec707a3ffad6d985de6757fe4
2) j7200-evm hyperflash boot test: https://gist.github.com/anuragdutta731/c3a4d60f8bfd9c425d6c44b36eb7322b

Link: https://lore.kernel.org/r/20241129113136.383277-1-a-dutta@ti.com
8 months agomtd: Kconfig: Change HBMC driver's dependency to MULTIPLEXER and MUX_MMIO
Anurag Dutta [Fri, 29 Nov 2024 11:31:36 +0000 (17:01 +0530)] 
mtd: Kconfig: Change HBMC driver's dependency to MULTIPLEXER and MUX_MMIO

The HBMC_AM654 driver was dependent on SYSCON because syscon APIs were
being used to select the multiplexer state. Change the dependency to
MULTIPLEXER and MUX_MMIO because mux APIs are now being used to
select mux state.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
8 months agoconfigs: j7200_evm_*_defconfig: Add configs for Hyperflash boot
Vaishnav Achath [Fri, 29 Nov 2024 11:31:35 +0000 (17:01 +0530)] 
configs: j7200_evm_*_defconfig: Add configs for Hyperflash boot

Kernel commit dbb124cf6888 ("configs: j7200: Remove HBMC_AM654
config") removed the HBMC_AM654 config because hbmc was broken
in u-boot. Hence, add the missing configs necessary to re-enable
Hyperflash boot.

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
8 months agoinclude: configs: j721e_evm: Increase memory offset for tiboot3.bin in HyperFlash
Aswath Govindraju [Fri, 29 Nov 2024 11:31:34 +0000 (17:01 +0530)] 
include: configs: j721e_evm: Increase memory offset for tiboot3.bin in HyperFlash

The size of J7200 tiboot3.bin is 516KB but the memory reserved for it in
HyperFlash was 512KB. This led to overlap of tiboot3.bin over tispl.bin
region and break in HyperFlash boot mode.

Therefore, fix this by increasing the memory allocated for tiboot3.bin
to 1MB for J7200.

Fixes: cf1d6867f774 ("board: ti: j7200: Introduce support for j7200 build targets")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
8 months agoconfigs: j721e_evm_*_defconfig: Add configs for Hyperflash boot
Vaishnav Achath [Fri, 29 Nov 2024 11:31:33 +0000 (17:01 +0530)] 
configs: j721e_evm_*_defconfig: Add configs for Hyperflash boot

Kernel commit 5b2671594b80 ("configs: j721e: Remove HBMC_AM654
config") removed the HBMC_AM654 config because hbmc was broken
in u-boot. Hence, add the missing configs necessary to re-enable
Hyperflash boot.

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
8 months agoarm: dts: k3-j721e-r5-common: Add HBMC overrides for R5 SPL
Vaishnav Achath [Fri, 29 Nov 2024 11:31:32 +0000 (17:01 +0530)] 
arm: dts: k3-j721e-r5-common: Add HBMC overrides for R5 SPL

Add 32-bit address overrides for Hyper Bus Memory Controller
for Hyperflash to be functional in R5 SPL.

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
8 months agoarm: dts: k3-j7200-r5-common: Add HBMC overrides for R5 SPL
Vaishnav Achath [Fri, 29 Nov 2024 11:31:31 +0000 (17:01 +0530)] 
arm: dts: k3-j7200-r5-common: Add HBMC overrides for R5 SPL

Add 32-bit address overrides for Hyper Bus Memory Controller
for Hyperflash to be functional in R5 SPL.

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
8 months agomtd: HBMC-AM654: Changed syscon API to mux APIs
Anurag Dutta [Fri, 29 Nov 2024 11:31:30 +0000 (17:01 +0530)] 
mtd: HBMC-AM654: Changed syscon API to mux APIs

The syscon APIs were used for selecting the state of the mux
device because the mmio-mux driver in u-boot did not support
the mux functionality when the parent device is not a syscon.
Change to mux APIs which utilizes the reg-mux driver to select the
state of the multiplexer.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
8 months agomux: Makefile: Add config for mux drivers
Anurag Dutta [Fri, 29 Nov 2024 11:31:29 +0000 (17:01 +0530)] 
mux: Makefile: Add config for mux drivers

Add config required to build mmio-mux driver and dependencies.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
8 months agoMerge patch series "configs: Enable CMD_NFS by default"
Tom Rini [Sat, 14 Dec 2024 15:33:18 +0000 (09:33 -0600)] 
Merge patch series "configs: Enable CMD_NFS by default"

Neha Malcom Francis <n-francis@ti.com> says:

Enable the NFS command across all platforms to allow network booting via
the NFS. Clean up the J7 configs to use TI_COMMON_CMD_OPTIONS.

Link: https://lore.kernel.org/r/20241129110333.444270-1-n-francis@ti.com
8 months agoconfigs: j7*: Enable TI_COMMON_CMD_OPTIONS
Neha Malcom Francis [Fri, 29 Nov 2024 11:03:33 +0000 (16:33 +0530)] 
configs: j7*: Enable TI_COMMON_CMD_OPTIONS

Instead of bloating the defconfig with CONFIG_CMD_*, move J7 devices to
start using TI_COMMON_CMD_OPTIONS.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoboard: ti: common: Kconfig: Add CMD_NFS
Neha Malcom Francis [Fri, 29 Nov 2024 11:03:32 +0000 (16:33 +0530)] 
board: ti: common: Kconfig: Add CMD_NFS

Add CMD_NFS to list of configs implied by CONFIG_TI_COMMON_CMD_OPTIONS.
This allows network booting via the NFS protocol from the U-Boot prompt.

Fixes: 10de12570799 ("disable NFS support by default")
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
8 months agoMerge patch series "UART support for higher baudrate"
Tom Rini [Sat, 14 Dec 2024 15:33:03 +0000 (09:33 -0600)] 
Merge patch series "UART support for higher baudrate"

Gokul Praveen <g-praveen@ti.com> says:

The OMAP specific UART driver is changed from a generic implementation of
certain ops functions to an OMAP specific implementation of it to add
support for higher baudrates for OMAP devices.

Hence to support the above change, static functionality of ops functions
in generic ns16550 UART U-Boot driver is removed and also migrated certain
macros to its header file for usage in device-specific drivers.

Boot logs link :

https://gist.github.com/GOKU-THUG/8b90117c963e5da5c1b6caeee427c82c

Link: https://lore.kernel.org/r/20241126105131.43359-1-g-praveen@ti.com
8 months agodrivers: serial: serial_omap: Fix TI OMAP UART U-Boot driver to support higher baudrates
Gokul Praveen [Tue, 26 Nov 2024 10:51:31 +0000 (16:21 +0530)] 
drivers: serial: serial_omap: Fix TI OMAP UART U-Boot driver to support higher baudrates

Move to OMAP specific implementation of certain ops functions as the UART
prints on the serial console fail for baudrates greater than 460800.

The MDR1 register is responsible for determining the speed mode at which
the UART should operate for OMAP specific devices. The baud divisor is used
to set the UART_DLL register which is used for generation of the baud
clock in the baud rate generator. The implementation logic is similar to
how it is implemented in omap_8250_get_divisor function of 8250_omap UART
linux driver.

Signed-off-by: Gokul Praveen <g-praveen@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 months agoserial: ns16550: Increase scope of ops functions
Gokul Praveen [Tue, 26 Nov 2024 10:51:30 +0000 (16:21 +0530)] 
serial: ns16550: Increase scope of ops functions

Increase scope of ops functions and do some clean up for usage in device
-specific UART drivers.

Remove the static functionality of ops functions and migrate certain macros
to header file for usage in device-specific drivers.

Signed-off-by: Gokul Praveen <g-praveen@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 months agoMerge patch series "Add phyCORE AM62Ax"
Tom Rini [Fri, 13 Dec 2024 23:30:27 +0000 (17:30 -0600)] 
Merge patch series "Add phyCORE AM62Ax"

Garrett Giordano <ggiordano@phytec.com> says:

This patch set adds the phyCORE AM62Ax board support and documenation to
u-boot.

The phyCORE-AM62Ax is a SoM (System on Module) featuring TI's AM62Ax SoC. It can
be used in combination with different carrier boards. This module can come
with different sizes and models for DDR, eMMC, SPI NOR Flash and various SoCs
from the AM62x family.

A development Kit, called phyBOARD-Lyra is used as a carrier board reference
design around the AM62x SoM.

This series depends on the following two patches:
- [PATCH v2] arm: mach-k3: am62a7: Provide a way to obtain boot device for non SPL
  https://lists.denx.de/pipermail/u-boot/2024-October/570156.html
- [PATCH] board: phytec: common: Introduce CONFIG_PHYTEC_K3_DDR_PATCH
  https://lists.denx.de/pipermail/u-boot/2024-November/571543.html

Link: https://lore.kernel.org/r/20241118231606.3161665-1-ggiordano@phytec.com
[trini: Fix warning in board/phytec/common/k3/board.c when
        CONFIG_EFI_HAVE_CAPSULE_SUPPORT is not enabled]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 months agoarm: mach-k3: am62a7: Provide a way to obtain boot device for non SPLs
Garrett Giordano [Thu, 31 Oct 2024 16:21:03 +0000 (09:21 -0700)] 
arm: mach-k3: am62a7: Provide a way to obtain boot device for non SPLs

Introduce get_boot_device() to obtain the booting device. Make it also
available for non SPL builds so u-boot can also know the device it
is booting from.

Signed-off-by: Garrett Giordano <ggiordano@phytec.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
8 months agotoradex: tdx-cfg-block: rework modules pid4 handling
Vitor Soares [Mon, 25 Nov 2024 17:49:10 +0000 (17:49 +0000)] 
toradex: tdx-cfg-block: rework modules pid4 handling

The module pid4 currently corresponds to the index of the toradex_module
array. If a new pid4 is introduced that does not follow the sequence of
the previous entries, it will create a gap in the array.

To address this, embed pid4 within the toradex_som structure and
implement a function to retrieve the index corresponding to pid4.

Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
8 months agodoc: board: phytec: Add phyCORE-AM62ax
Garrett Giordano [Mon, 18 Nov 2024 23:16:06 +0000 (15:16 -0800)] 
doc: board: phytec: Add phyCORE-AM62ax

Add documentation for PHYTEC phyCORE-AM62ax SoM.

Signed-off-by: Garrett Giordano <ggiordano@phytec.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
8 months agoboard: phytec: am62a7: Add PHYTEC phyCORE-AM62A7 SoM
Garrett Giordano [Mon, 18 Nov 2024 23:16:05 +0000 (15:16 -0800)] 
board: phytec: am62a7: Add PHYTEC phyCORE-AM62A7 SoM

Add support for PHYTEC phyCORE-AM62A7 SoM.

Supported features:
  - 2GB LPDDR4 RAM
  - eMMC
  - External SD
  - Ethernet
  - debug UART

Signed-off-by: Garrett Giordano <ggiordano@phytec.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
8 months agoMerge patch series "Enable EFI capsule updates for PHYTEC K3 SoMs"
Tom Rini [Fri, 13 Dec 2024 20:15:43 +0000 (14:15 -0600)] 
Merge patch series "Enable EFI capsule updates for PHYTEC K3 SoMs"

Wadim Egorov <w.egorov@phytec.de> says:

This implements capsule updates for all our K3 SoMs for
eMMC, OSPI NOR and uSD cards.

We can use capsule updates to update the bootloader on all our
supported flash devices.

Link: https://lore.kernel.org/r/20241127121736.1525948-1-w.egorov@phytec.de
8 months agoconfigs: phycore_am6*_a53_defconfig: Enable capsule update
Wadim Egorov [Wed, 27 Nov 2024 12:17:36 +0000 (13:17 +0100)] 
configs: phycore_am6*_a53_defconfig: Enable capsule update

Enable raw & on disk capsule updates and provide configs required
for updating MTD devices. Also resync after savedefconfig.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
8 months agoboard: phytec: k3: Add EFI capsule update support
Wadim Egorov [Wed, 27 Nov 2024 12:17:35 +0000 (13:17 +0100)] 
board: phytec: k3: Add EFI capsule update support

Implement EFI capsule update functionality for PHYTEC K3-based SoMs.
These SoMs feature various flash device options, including eMMC,
OSPI NOR, and uSD card at the board level.

This update provides the necessary logic to enable EFI capsule updates
across all three flash devices, ensuring flexible and robust firmware
upgrade capabilities.

The GUID is dynamically generated for the board, to get it:

  efidebug capsule esrt
  ========================================
  ESRT: fw_resource_count=3
  ESRT: fw_resource_count_max=3
  ESRT: fw_resource_version=1
  [entry 0]==============================
  ESRT: fw_class=C7D64D6D-10B2-54BC-A3BF-06A9DC3653D9
  ESRT: fw_type=unknown
  ESRT: fw_version=0
  ESRT: lowest_supported_fw_version=0
  ESRT: capsule_flags=0
  ESRT: last_attempt_version=0
  ESRT: last_attempt_status=success
  [entry 1]==============================
  ESRT: fw_class=09841C3F-F177-5D57-B1F6-754D92879205
  ESRT: fw_type=unknown
  ESRT: fw_version=0
  ESRT: lowest_supported_fw_version=0
  ESRT: capsule_flags=0
  ESRT: last_attempt_version=0
  ESRT: last_attempt_status=success
  [entry 2]==============================
  ESRT: fw_class=D11A9016-515E-503A-8872-3FF65384D0C4
  ESRT: fw_type=unknown
  ESRT: fw_version=0
  ESRT: lowest_supported_fw_version=0
  ESRT: capsule_flags=0
  ESRT: last_attempt_version=0
  ESRT: last_attempt_status=success
  ========================================

On the board (from uSD card containing capsule binaries at boot):

  load mmc 1:1 $loadaddr tiboot3-capsule.bin
  efidebug capsule update $loadaddr

  load mmc 1:1 $loadaddr tispl-capsule.bin
  efidebug capsule update $loadaddr

  load mmc 1:1 $loadaddr uboot-capsule.bin
  efidebug capsule update $loadaddr

The binaries will be flashed to the flash device you are booted from.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
8 months agoarm: dts: k3-am642-phycore-som-binman: Provide capsule nodes
Wadim Egorov [Wed, 27 Nov 2024 12:17:34 +0000 (13:17 +0100)] 
arm: dts: k3-am642-phycore-som-binman: Provide capsule nodes

Fill in phycore-am64x capsule GUID properties of the base
binman capsule nodes.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
8 months agoarm: dts: k3-am625-phycore-som-binman: Provide capsule nodes
Wadim Egorov [Wed, 27 Nov 2024 12:17:33 +0000 (13:17 +0100)] 
arm: dts: k3-am625-phycore-som-binman: Provide capsule nodes

Fill in phycore-am62x capsule GUID properties of the base
binman capsule nodes.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
8 months agoMerge patch series "AM62A DWC3: Add support for USB DFU boot in OTG mode"
Tom Rini [Fri, 13 Dec 2024 20:14:50 +0000 (14:14 -0600)] 
Merge patch series "AM62A DWC3: Add support for USB DFU boot in OTG mode"

Siddharth Vadapalli <s-vadapalli@ti.com> says:

Hello,

This series adds support for USB DFU boot on TI's AM62A SoC which has
two instances of DWC3 USB Controllers namely USB0 and USB1. The USB0
instance of the USB Controller supports USB DFU boot:
ROM => tiboot3.bin => tispl.bin => u-boot.img

USB DFU Boot requires the USB Controller to be configured for Gadget
mode of operation. Since the USB0 instance of the DWC3 USB Controller
supports both Host and Gadget modes of operation via the Type-C interface
on the AM62A7-SK board, the device-tree specifies the "dr_mode" as "OTG".
However, there is currently no support for dynamically switching the "mode"
from Host to Gadget and vice-versa with the help of a state-machine.
The OTG mode is treated as a separate mode in itself rather than being
treated as an intermediate stage before assuming the Host/Gadget mode.
Due to this, USB DFU boot via the Type-C interface doesn't work as the
USB Controller hasn't been appropriately configured for Device/Gadget
mode of operation. One option is to change the device-tree to specify
"dr_mode" as "peripheral" and force the controller to assume the Device
role. This will imply that the U-Boot device-tree for AM62A diverges
from its Linux counterpart. Therefore, with the intent of keeping the
device-tree uniform across Linux and U-Boot, and at the same time, in
order to enable USB DFU boot in "OTG" mode with the DWC3 Controller,
the first patch in this series sets the "mode" on the basis of the
caller function, rather than using the "dr_mode" property in the
device-tree. There are only two callers of "dwc3_generic_probe()",
each of which clearly specify the expected mode of configuration.
This will enable both Host and Device mode of operation based on the
command executed by the user, thereby truly supporting "OTG"
functionality when the USB Controller supports it.

The second patch in this series adds USB DFU environment for AM62A,
enabling USB DFU Boot and USB DFU flash on AM62A.

In addition to the patches in this series, the following device-tree
changes will be required to test USB DFU on AM62A (bootph-all property
to be added to ensure that USB Controller is present at all stages
for DFU Boot):
https://gist.github.com/Siddharth-Vadapalli-at-TI/53ba02cb0ff4a09c47e920d08247065f
The above device-tree changes will be made to the Linux device-tree,
which shall ensure that the same shall be a part of U-Boot device-tree
eventually.

The USB DFU config fragments for AM62x have been used for enabling
USB DFU boot on AM62a as follows:
R5  => am62ax_evm_r5_defconfig + am62x_r5_usbdfu.config
A53 => am62ax_evm_a53_defconfig + am62x_a53_usbdfu.config

Logs validating USB DFU boot with this series:
https://gist.github.com/Siddharth-Vadapalli-at-TI/daa71da1b0e478a51afea42605fb2d2c

Link: https://lore.kernel.org/r/20241126120322.1760862-1-s-vadapalli@ti.com
8 months agoboard: ti: am62ax: env: include environment for DFU
Siddharth Vadapalli [Tue, 26 Nov 2024 12:03:19 +0000 (17:33 +0530)] 
board: ti: am62ax: env: include environment for DFU

Include the TI K3 DFU environment to support DFU Boot and DFU Flash.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
8 months agousb: dwc3-generic: set "mode" based on caller of dwc3_generic_probe()
Siddharth Vadapalli [Tue, 26 Nov 2024 12:03:18 +0000 (17:33 +0530)] 
usb: dwc3-generic: set "mode" based on caller of dwc3_generic_probe()

There are only two callers of "dwc3_generic_probe()", namely:
1. dwc3_generic_peripheral_probe()
2. dwc3_generic_host_probe()
Currently, the "mode" is set based on the device-tree node of the
platform device. Also, the DWC3 core doesn't support updating the "mode"
dynamically at runtime if it is set to "OTG", i.e. "OTG" is treated as a
separate mode in itself, rather than being treated as a mode which should
eventually lead to "host"/"peripheral".

Given that the callers of "dwc3_generic_probe()" clarify the expected
"mode" of the USB Controller, use that "mode" instead of the one
specified in the device-tree. This shall allow the USB Controller to
function both as a "Host" and as a "Peripheral" when the "mode" is "otg"
in the device-tree, based on the caller of "dwc3_generic_probe()".

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
8 months agoMerge patch series "J721S2: Enable ESMs and related PMIC"
Tom Rini [Fri, 13 Dec 2024 20:12:46 +0000 (14:12 -0600)] 
Merge patch series "J721S2: Enable ESMs and related PMIC"

Udit Kumar <u-kumar1@ti.com> says:

This enables the ESMs and the associated PMIC. Programming these bits is
a requirement to make the watchdog actually reset the board.

Logs
WDT reset J721S2
https://gist.github.com/uditkumarti/93cfe863d1f3fe3abb82b1821105f274#file-j721s2-L2708

AM68 boot (this does not support WDT)
https://gist.github.com/uditkumarti/93cfe863d1f3fe3abb82b1821105f274#file-am68

Link: https://lore.kernel.org/r/20241126053426.2627686-1-u-kumar1@ti.com
[trini: Merge configs/am68_sk_r5_defconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 months agoconfigs: j721s2_evm_r5_defconfig: Add ESM configs
Manorit Chawdhry [Tue, 26 Nov 2024 05:34:26 +0000 (11:04 +0530)] 
configs: j721s2_evm_r5_defconfig: Add ESM configs

Enables ESM configs for j721s2 and disables them for AM68 as AM68
includes J721s2 configs by default.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
8 months agoarch: arm: dts: k3-j721s2-r5-common-proc-board: Add esm node
Manorit Chawdhry [Tue, 26 Nov 2024 05:34:25 +0000 (11:04 +0530)] 
arch: arm: dts: k3-j721s2-r5-common-proc-board: Add esm node

Add esm node for j721s2.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
8 months agoboard: ti: j721s2: Initialize the ESM & PMIC ESM
Keerthy [Tue, 26 Nov 2024 05:34:24 +0000 (11:04 +0530)] 
board: ti: j721s2: Initialize the ESM & PMIC ESM

Initialize the 3 instances of SOC ESM & PMIC ESM.
This is needed for watchdog functionality.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
8 months agoMerge patch series "Add QOS support for J722S and AM62P"
Tom Rini [Fri, 13 Dec 2024 20:12:01 +0000 (14:12 -0600)] 
Merge patch series "Add QOS support for J722S and AM62P"

Jayesh Choudhary <j-choudhary@ti.com> says:

Add QOS support for DSS in TI K3 SoC to route the DSS traffic through
RT queue by setting orderID as 15:
- J722S
- AM62P

Link: https://lore.kernel.org/r/20241126070614.47136-1-j-choudhary@ti.com
8 months agoconfigs: am62p_evm_r5_defconfig: Enable CONFIG_K3_QOS
Jayesh Choudhary [Tue, 26 Nov 2024 07:06:14 +0000 (12:36 +0530)] 
configs: am62p_evm_r5_defconfig: Enable CONFIG_K3_QOS

Enable CONFIG_K3_QOS to set QoS registers in R5 boot stage.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
8 months agoconfigs: j722s_evm_r5_defconfig: Enable CONFIG_K3_QOS
Jayesh Choudhary [Tue, 26 Nov 2024 07:06:13 +0000 (12:36 +0530)] 
configs: j722s_evm_r5_defconfig: Enable CONFIG_K3_QOS

Enable CONFIG_K3_QOS to set QoS registers in R5 boot stage.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
8 months agoarm: mach-k3: am62p: Add QoS support for DSS
Jayesh Choudhary [Tue, 26 Nov 2024 07:06:12 +0000 (12:36 +0530)] 
arm: mach-k3: am62p: Add QoS support for DSS

Enable Quality of Service (QoS) blocks for Display SubSystem (DSS), by
servicing the DSS - DDR traffic from the Real-Time (RT) queue. This is
done by setting the DSS DMA orderID to greater than 7.

DDR intensive software applications can overwhelm the DSS's access to
the DDR because of their higher frequency DDR accesses. This can cause
flickering in display with certain applications running parallely if
the DSS traffic is being serviced through non-RT queue.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
8 months agoarm: mach-k3: j722s: Add QoS support for DSS
Jayesh Choudhary [Tue, 26 Nov 2024 07:06:11 +0000 (12:36 +0530)] 
arm: mach-k3: j722s: Add QoS support for DSS

Enable Quality of Service (QoS) blocks for Display SubSystem (DSS), by
servicing the DSS - DDR traffic from the Real-Time (RT) queue. This is
done by setting the DSS DMA orderID to greater than 7.

The C7x and VPAC can overwhelm the DSS's access to the DDR because of
their higher frequency DDR accesses. This can cause flickering in
display with certain edgeAI models running parallely if the DSS traffic
is being serviced through non-RT queue.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
8 months agoRevert "Merge patch series "vbe: Series part E""
Tom Rini [Fri, 13 Dec 2024 03:07:26 +0000 (21:07 -0600)] 
Revert "Merge patch series "vbe: Series part E""

This reverts commit 1fdf53ace13f745fe8ad4d2d4e79eed98088d555, reversing
changes made to e5aef1bbf11412eebd4c242b46adff5301353c30.

I had missed that this caused too much size growth on rcar3_salvator-x.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 months agoMerge patch series "vbe: Series part E"
Tom Rini [Thu, 12 Dec 2024 22:35:47 +0000 (16:35 -0600)] 
Merge patch series "vbe: Series part E"

Simon Glass <sjg@chromium.org> says:

This includes various patches towards implementing the VBE abrec
bootmeth in U-Boot. It mostly focuses on SPL tweaks and adjusting what
fatures are available in VPL.

Link: https://lore.kernel.org/r/20241207172412.1124558-1-sjg@chromium.org
8 months agohash: Plumb crc8 into the hash functions
Simon Glass [Sat, 7 Dec 2024 17:24:12 +0000 (10:24 -0700)] 
hash: Plumb crc8 into the hash functions

Add an entry for crc8, with watchdog handling.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agoboot: Imply CRC8 with VBE
Simon Glass [Sat, 7 Dec 2024 17:24:11 +0000 (10:24 -0700)] 
boot: Imply CRC8 with VBE

VBE uses a crc8 checksum to verify that the nvdata is valid, so make
sure it is available if VBE is enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agolib: Allow crc8 in TPL and VPL
Simon Glass [Sat, 7 Dec 2024 17:24:10 +0000 (10:24 -0700)] 
lib: Allow crc8 in TPL and VPL

Provide options to enable the CRC8 feature in TPL and VPL builds.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agoboot: Allow use of FIT in TPL and VPL
Simon Glass [Sat, 7 Dec 2024 17:24:09 +0000 (10:24 -0700)] 
boot: Allow use of FIT in TPL and VPL

With VBE we want to use FIT in all phases of the boot. Add Kconfig
options to support this.

Disable the options for sandbox_vpl for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agospl: lib: Allow for decompression in any SPL build
Simon Glass [Sat, 7 Dec 2024 17:24:08 +0000 (10:24 -0700)] 
spl: lib: Allow for decompression in any SPL build

Add Kconfig symbols and update the Makefile rules so that decompression
can be used in TPL and VPL

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agospl: Add some more debugging to load_simple_fit()
Simon Glass [Sat, 7 Dec 2024 17:24:07 +0000 (10:24 -0700)] 
spl: Add some more debugging to load_simple_fit()

Add debugging of image-loading progress. Fix a stale comment in the
function comment while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agospl: Drop a duplicate variable in boot_from_devices()
Simon Glass [Sat, 7 Dec 2024 17:24:06 +0000 (10:24 -0700)] 
spl: Drop a duplicate variable in boot_from_devices()

The variable 'ret' is defined twice, which is not intended. This may
have been a local merge error.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 2eefeb6d893 ("spl: Report a loader failure")
8 months agospl: Drop use of uintptr_t
Simon Glass [Sat, 7 Dec 2024 17:24:05 +0000 (10:24 -0700)] 
spl: Drop use of uintptr_t

U-Boot uses ulong for addresses. It is confusing to use uintptr_t in a
few places, since it makes people wonder if the types are compatible.
Change the few occurences in SPL to use ulong

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agospl: Support a relocated stack in any XPL phase
Simon Glass [Sat, 7 Dec 2024 17:24:04 +0000 (10:24 -0700)] 
spl: Support a relocated stack in any XPL phase

The current check looks only at SPL, but TPL or VPL might have a
different setting. Update the condition.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agospl: Allow serial to be disabled in any XPL phase
Simon Glass [Sat, 7 Dec 2024 17:24:03 +0000 (10:24 -0700)] 
spl: Allow serial to be disabled in any XPL phase

The current check looks only at SPL, but TPL or VPL might have a
different setting. Update the condition.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agospl: Report a loader failure
Simon Glass [Sat, 7 Dec 2024 17:24:02 +0000 (10:24 -0700)] 
spl: Report a loader failure

If a loader returns an error code it is silently ignored. Show a message
to at least provide some feedback to the user.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agoSupport setting a maximum size for the VPL image
Simon Glass [Sat, 7 Dec 2024 17:24:01 +0000 (10:24 -0700)] 
Support setting a maximum size for the VPL image

Add a size limit for VPL, to match those for SPL and TPL

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agomalloc: Provide a simple malloc for VPL
Simon Glass [Sat, 7 Dec 2024 17:24:00 +0000 (10:24 -0700)] 
malloc: Provide a simple malloc for VPL

The VPL phase may want to use the smaller malloc() implementation, so
add an option for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agomalloc: Show amount of used space when memory runs out
Simon Glass [Sat, 7 Dec 2024 17:23:59 +0000 (10:23 -0700)] 
malloc: Show amount of used space when memory runs out

Show a bit more information when malloc() space is exhausted and
debugging is enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agoboot: Respect the load_op in fit_image_load()
Simon Glass [Sat, 7 Dec 2024 17:23:58 +0000 (10:23 -0700)] 
boot: Respect the load_op in fit_image_load()

Some code has crept in which ignores this parameter. Fix this and add a
little debugging.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: b1307f884a9 ("fit: Support compression for non-kernel components (e.g. FDT)")
8 months agobootstd: Avoid sprintf() in SPL when creating bootdevs
Simon Glass [Sat, 7 Dec 2024 17:23:57 +0000 (10:23 -0700)] 
bootstd: Avoid sprintf() in SPL when creating bootdevs

The name of the bootdev device is not that important, particular in SPL.
Save a little code space by using a simpler name.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agoboot: Allow FIT to fall back from best-match option
Simon Glass [Sat, 7 Dec 2024 17:23:56 +0000 (10:23 -0700)] 
boot: Allow FIT to fall back from best-match option

When the best-match feature fails to find something, use the provided
config name as a fallback. The allows SPL to select a suitable config
when best-match is enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agoimage: Add a prototype for fit_image_get_phase()
Simon Glass [Sat, 7 Dec 2024 17:23:55 +0000 (10:23 -0700)] 
image: Add a prototype for fit_image_get_phase()

This function exists but is not exported. Add a prototype so it can be
used elsewhere.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 months agospl: mmc: Avoid size growth in spl_mmc_find_device() debug
Simon Glass [Sat, 7 Dec 2024 17:23:54 +0000 (10:23 -0700)] 
spl: mmc: Avoid size growth in spl_mmc_find_device() debug

The for() loop ends up being in the code even if the log_debug() does
nothing. Add a condition to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
8 months agoclk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present
Sam Protsenko [Fri, 8 Mar 2024 00:04:32 +0000 (18:04 -0600)] 
clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present

Sometimes clocks provided to a consumer might not have .set_rate
operation (like gate or mux clocks), but have CLK_SET_PARENT_RATE flag
set. In that case it's usually possible to find a parent up the tree
which is capable of setting the rate (div, pll, etc). Implement a simple
lookup procedure for such cases, to traverse the clock tree until
.set_rate capable parent is found, and use that parent to actually
change the rate. The search will stop once the first .set_rate capable
clock is found, which is usually enough to handle most cases.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Thu, 12 Dec 2024 15:50:25 +0000 (09:50 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb

- USB onboard-hub fix

8 months agoMerge tag 'xilinx-for-v2025.01-rc5' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Thu, 12 Dec 2024 15:20:52 +0000 (09:20 -0600)] 
Merge tag 'xilinx-for-v2025.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

AMD/Xilinx changes for v2025.01-rc5

- Fix reset issue for SOM

8 months agoboot: fdt: Handle already reserved memory in boot_fdt_reserve_region()
Sam Protsenko [Wed, 11 Dec 2024 02:17:02 +0000 (20:17 -0600)] 
boot: fdt: Handle already reserved memory in boot_fdt_reserve_region()

The boot_fdt_add_mem_rsv_regions() function can be called twice, e.g.
first time during the board init (as a part of LMB init), and then when
booting the OS with 'booti' command:

    lmb_add_region_flags
    lmb_reserve_flags
    boot_fdt_reserve_region
    boot_fdt_add_mem_rsv_regions
               ^
               |
               +-----------------------+
               | (1)                   | (2)
    lmb_reserve_common        image_setup_linux
    lmb_init                  ...
    initr_lmb                 do_booti
    board_init_r              'booti'

That consequently leads to the attempt of reserving the same memory
areas (described in the 'reserved-memory' dts node) in LMB. The
lmb_add_region_flags() returns -EEXIST error code in such cases, but
boot_fdt_reserve_region() handles all negative error codes as a failure
to reserve fdt memory region, printing corresponding error messages,
which are essentially harmless, but misleading. For example, this is the
output of 'booti' command on E850-96 board:

    => booti $loadaddr - $fdtaddr
    ...
    ERROR: reserving fdt memory region failed
           (addr=bab00000 size=5500000 flags=2)
    ERROR: reserving fdt memory region failed
           (addr=f0000000 size=200000 flags=4)
    ...
    Starting kernel ...

The mentioned false positive error messages are observed starting with
commit 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory
areas with !LMB_NONE"), which removes the check for the already added
memory regions in lmb_add_region_flags(), making it return -1 for
!LMB_NONE cases. Another commit 827dee587b75 ("fdt: lmb: add reserved
regions as no-overwrite") changes flags used for reserving memory in
boot_fdt_add_mem_rsv_regions() from LMB_NONE to LMB_NOOVERWRITE. So
together with the patch mentioned earlier, it makes
lmb_add_region_flags() return -1 when called from
boot_fdt_reserve_region().

Since then, the different patch was implemented, returning -EEXIST error
code in described cases, which is:

   lmb: Return -EEXIST in lmb_add_region_flags() if region already added

Handle -EEXIST error code as a normal (successful) case in
lmb_reserve_flags() and don't print any messages.

Fixes: 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory areas with !LMB_NONE")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
8 months agolmb: Return -EEXIST in lmb_add_region_flags() if region already added
Sam Protsenko [Wed, 11 Dec 2024 02:17:01 +0000 (20:17 -0600)] 
lmb: Return -EEXIST in lmb_add_region_flags() if region already added

An attempt to add the already added LMB region using
lmb_add_region_flags() ends up in lmb_addrs_overlap() check, which
eventually leads to either returning 0 if 'flags' is LMB_NONE, or -1
otherwise. It makes it impossible for the user of this function to catch
the case when the region is already added and differentiate it from
regular errors. That in turn may lead to incorrect error handling in the
caller code, like reporting misleading errors or interrupting the normal
code path where it could be treated as the normal case. An example is
boot_fdt_reserve_region() function, which might be called twice (e.g.
during board startup in initr_lmb(), and then during 'booti' command
booting the OS), thus trying to reserve exactly the same memory regions
described in the device tree twice, which produces an error message on
second call.

Return -EEXIST error code in case when the added region exists and it's
not LMB_NONE; for LMB_NONE return 0, to conform to unit tests
(specifically test_alloc_addr() in test/lib/lmb.c) and the preferred
behavior described in commit 1d9aa4a283da ("lmb: Fix the allocation of
overlapping memory areas with !LMB_NONE"). The change of
lmb_add_region_flags() return values is described in the table below:

    Return case                        Pre-1d9   1d9    New
    -----------------------------------------------------------
    Added successfully                    0      0      0
    Failed to add                         -1     -1     -1
    Already added, flags == LMB_NONE      0      0      0
    Already added, flags != LMB_NONE      0      -1     -EEXIST

Rework all affected functions and their documentation. Also fix the
corresponding unit test which checks reserving the same region with the
same flags to account for the changed return value.

No functional change is intended (by this patch itself).

Fixes: 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory areas with !LMB_NONE")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
8 months agoconfigs: am62x_evm_*: Fix USB DFU configuration
Roger Quadros [Tue, 3 Dec 2024 20:40:29 +0000 (22:40 +0200)] 
configs: am62x_evm_*: Fix USB DFU configuration

CONFIG_USB_XHCI_DWC3 is not required for AM62x as the XHCI
driver is registered through the dwc3-generic driver.

CONFIG_USB_XHCI_DWC3 causes problems by hijacking the
USB controller even if it is not set for Host mode in
device tree.

'dm tree' output after 'usb start' is fixed from

 simple_bus    5  [ + ]   dwc3-am62             |   |-- dwc3-usb@f900000
 usb_gadget    0  [   ]   dwc3-generic-periphe  |   |   |-- usb@31000000
 usb           0  [ + ]   xhci-dwc3             |   |   `-- usb@31000000
 usb_hub       0  [ + ]   usb_hub               |   |       `-- usb_hub
 simple_bus    6  [ + ]   dwc3-am62             |   |-- dwc3-usb@f910000
 usb           1  [ + ]   dwc3-generic-host     |   |   |-- usb@31100000
 usb_hub       1  [ + ]   usb_hub               |   |   |   `-- usb_hub
 usb           1  [ + ]   xhci-dwc3             |   |   `-- usb@31100000
 usb_hub       2  [ + ]   usb_hub               |   |       `-- usb_hub

[notice that 'xhci-dwc3' and 'usb_hub' drivers are probed
 for both USB instances although the first instance
 is supposed to be 'peripheral' only]

to

 simple_bus    5  [   ]   dwc3-am62             |   |-- dwc3-usb@f900000
 usb_gadget    0  [   ]   dwc3-generic-periphe  |   |   `-- usb@31000000
 simple_bus    6  [ + ]   dwc3-am62             |   |-- dwc3-usb@f910000
 usb           1  [ + ]   dwc3-generic-host     |   |   `-- usb@31100000
 usb_hub       0  [ + ]   usb_hub               |   |       `-- usb_hub

Fixes: dfc2dff5a844 ("configs: am62x_evm_*: Enable USB and DFU support")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
8 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Wed, 11 Dec 2024 18:50:29 +0000 (12:50 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Fix some spelling mistakes

8 months agoMerge tag 'rpi-2025.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-raspbe...
Tom Rini [Wed, 11 Dec 2024 16:17:59 +0000 (10:17 -0600)] 
Merge tag 'rpi-2025.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi

Updates for RPi for 2025.01:

- Enable capsule updates
- Pass CMA through from firmware DT

8 months agoboard: rpi: Enable capsule updates
Ilias Apalodimas [Fri, 13 Sep 2024 09:53:15 +0000 (12:53 +0300)] 
board: rpi: Enable capsule updates

Since RPI works well using EFI and has no size limitations with regards
to U-Boot, add the needed structures to support capsule updates.

While at it update the most commonly used defconfigs and include capsule
support and U-Boot commands needed by EFI

Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
8 months agovideo: zynqmp: Add support for reset
Michal Simek [Mon, 9 Dec 2024 11:11:50 +0000 (12:11 +0100)] 
video: zynqmp: Add support for reset

In Kria SOM configuration DP is under reset and access to DP is causing
hang that's why call reset at probe to avoid this situation.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/0504474a91a9839828aecd37f8855fd154cdf2e1.1733742708.git.michal.simek@amd.com
8 months agoboard: rpi: Pass CMA through from firmware DT
Peter Robinson [Fri, 11 Oct 2024 17:09:11 +0000 (18:09 +0100)] 
board: rpi: Pass CMA through from firmware DT

For a lot of usecases, such as display, camera, media
the Raspberry Pi needs a lot more CMA than distros
configure as default so we should pass this parameter
through so things work as expected. Fix a spelling
mistake while we're at it.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Matthias Brugger <mbrugger@suse.com>
8 months agousb: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:37 +0000 (08:30 +0100)] 
usb: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>