]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
12 months agoMerge patch series "sysinfo: Expand sysinfo with some more banner information"
Tom Rini [Tue, 28 Nov 2023 17:53:14 +0000 (12:53 -0500)]
Merge patch series "sysinfo: Expand sysinfo with some more banner information"

To quote the author:

The show_board_info() function was adjusted to weak so that it could be
entirely replaced with a board-specific implementation.

The intended way for boards to provide their own information is via a
sysinfo driver. But currently there is no way to show anything other
than the model name.

This series adds support for showing a few more items, in a way that is
easy for boards to extend.

Since there is already a weak checkboard() function, we don't need to
have two levels of weak function here. So this series drops the weak
attribute from show_board_info()

Existing boards will see a slight change in output, in that the model
name will appear first, before any custom output. If that is a problem,
then the solution is to implement a sysinfo driver for the board.

12 months agox86: coreboot: Add a sysinfo driver
Simon Glass [Mon, 13 Nov 2023 02:58:29 +0000 (19:58 -0700)]
x86: coreboot: Add a sysinfo driver

Create a sysinfo driver to avoid needing a custom checkboard()
function. With this the following information is printed when booting
from coreboot under QEMU:

   Model: Standard PC (i440FX + PIIX, 1996)
   Manufacturer: QEMU
   Prior-stage version: 4.21-885-g2a87ef1eca56
   Prior-stage date: 11/11/2023

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agosysinfo: Allow displaying more info on startup
Simon Glass [Mon, 13 Nov 2023 02:58:28 +0000 (19:58 -0700)]
sysinfo: Allow displaying more info on startup

At present only the model name is shown on start. Some boards want to
display more information. Add some more options to allow display of the
manufacturer as well as the version and date of any prior-stage
firmware.

This is useful for coreboot, at least. If other boards have more
information to display, it is easy to add it, now.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agoRevert "generic-board: make show_board_info a weak function"
Simon Glass [Mon, 13 Nov 2023 02:58:27 +0000 (19:58 -0700)]
Revert "generic-board: make show_board_info a weak function"

We already have:

- a sysinfo driver-interface which can obtain the model
- a weak function called checkboard() for showing board info

The current implementation has a weak function on top of a weak
function. Now that all boards have been updated to use checkboard()
instead, drop the __weak on show_board_info()

This reverts commit f7637cc01414b9c87b6b0f861f34d83c19bfaaaf.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agoudoo: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:26 +0000 (19:58 -0700)]
udoo: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agotoradex: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:25 +0000 (19:58 -0700)]
toradex: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Make all the checkboard() functions call the new tdx_checkboard() so
that the same information is displayed.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agosolidrun: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:24 +0000 (19:58 -0700)]
solidrun: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agoturris: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:23 +0000 (19:58 -0700)]
turris: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 months agomeson: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:22 +0000 (19:58 -0700)]
meson: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
12 months agoboard: Move show_board_info() comment to header file
Simon Glass [Mon, 13 Nov 2023 02:58:21 +0000 (19:58 -0700)]
board: Move show_board_info() comment to header file

Move this comment to its prototype and tidy it up a bit.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
12 months agoMerge patch series "ufs: Add a PCI UFS controller support"
Tom Rini [Mon, 27 Nov 2023 21:19:09 +0000 (16:19 -0500)]
Merge patch series "ufs: Add a PCI UFS controller support"

To quote the author:

This adds a PCI UFS controller support and enables the support on
QEMU RISC-V for testing.

Requiring QEMU v8.2+.

12 months agoqemu: riscv: Enable UFS support
Bin Meng [Wed, 11 Oct 2023 13:15:52 +0000 (21:15 +0800)]
qemu: riscv: Enable UFS support

This enables UFS support for QEMU RISC-V 'virt' machine.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoufs: Handle UFS 3.1 controllers
Bin Meng [Wed, 11 Oct 2023 13:15:51 +0000 (21:15 +0800)]
ufs: Handle UFS 3.1 controllers

Extend the version check to handle UFS 3.1 controllers as well.
Tested on QEMU emulated UFS 3.1 controller.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoufs: Add a PCI based UFS controller driver
Bin Meng [Wed, 11 Oct 2023 13:15:50 +0000 (21:15 +0800)]
ufs: Add a PCI based UFS controller driver

This adds a simple PCI based UFS controller driver with a QEMU
emulated UFS controller on the PCI bus.

Requiring QEMU v8.2+.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoufs: Allow mmio registers on the PCI bus
Bin Meng [Wed, 11 Oct 2023 13:15:49 +0000 (21:15 +0800)]
ufs: Allow mmio registers on the PCI bus

Check if the UFS controller is on the PCI bus, and get its register
base address accordingly.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
12 months agopci_ids: Add Red Hat vendor and device IDs
Bin Meng [Wed, 11 Oct 2023 13:15:48 +0000 (21:15 +0800)]
pci_ids: Add Red Hat vendor and device IDs

Red Hat, Inc. donates a part of its device ID range [1] to QEMU,
to be used for virtual devices. This commit adds several typical
devices that are useful in U-Boot.

[1] https://www.qemu.org/docs/master/specs/pci-ids.html

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agocmd: ufs: Correct the help text
Bin Meng [Wed, 11 Oct 2023 13:15:47 +0000 (21:15 +0800)]
cmd: ufs: Correct the help text

Remove the additional space and use "sub-system" for consistency
with other commands like "scsi" and "usb".

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
12 months agocmd: kconfig: Make ufs prompt look similar to other commands
Bin Meng [Wed, 11 Oct 2023 13:15:46 +0000 (21:15 +0800)]
cmd: kconfig: Make ufs prompt look similar to other commands

At present the 'ufs' command prompt does not look similar like other
commands. Update it.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
12 months agoufs: Add a line feed to the end of some dev_xxx() messages
Bin Meng [Wed, 11 Oct 2023 13:15:45 +0000 (21:15 +0800)]
ufs: Add a line feed to the end of some dev_xxx() messages

Add a line feed to improve readability of some dev_xxx() messages.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoufs: Correct the UFS terminlogy
Bin Meng [Wed, 11 Oct 2023 13:15:44 +0000 (21:15 +0800)]
ufs: Correct the UFS terminlogy

UFS stands for Universal Flash Storage, not Subsytem.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoMerge tag 'u-boot-dfu-next-20231124' of https://source.denx.de/u-boot/custodians...
Tom Rini [Sat, 25 Nov 2023 17:34:23 +0000 (12:34 -0500)]
Merge tag 'u-boot-dfu-next-20231124' of https://source.denx.de/u-boot/custodians/u-boot-dfu into next

u-boot-dfu-next-20231124

- Make dfu entity name size configurable in KConfig
- Implement start-stop for UMS (graceful shutdown via eject)
- Improve help messages for cmd/bind
- Improve help message for udc bind failures

13 months agoMerge branch '2023-11-25-assorted-platform-updates' into next
Tom Rini [Sat, 25 Nov 2023 17:32:48 +0000 (12:32 -0500)]
Merge branch '2023-11-25-assorted-platform-updates' into next

- Updates for the Siemens AM335x platforms, Nuvoton platforms, and
  disable CONFIG_NET on platforms that lack NETDEVICES, so that
  NETDEVICES can be implied by NET.

13 months agonet: Make NET imply NETDEVICES
Tom Rini [Thu, 9 Nov 2023 00:12:25 +0000 (19:12 -0500)]
net: Make NET imply NETDEVICES

Normally, when NET is enabled, CMD_NET will then be enabled and in turn
NETDEVICES will (likely) be enabled via imply. However, if we disable
CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES
for us. This suggestion (as an imply is) really isn't about the network
commands but network itself and is a legacy of how intertwined
NET/CMD_NET were historically. Move this over to the NET entry instead
where it is a more logical fit.

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
13 months agoboards: Disable NET on platforms without NETDEVICES
Tom Rini [Fri, 17 Nov 2023 15:47:57 +0000 (10:47 -0500)]
boards: Disable NET on platforms without NETDEVICES

None of these platforms enabled a networking devices, and disabled
CMD_NET. Given that we used to gate network support on CMD_NET rather
than NET, we disable CONFIG_NET on these platforms now.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agoboard: nuvoton: update console environment variable
Jim Liu [Tue, 14 Nov 2023 08:51:59 +0000 (16:51 +0800)]
board: nuvoton: update console environment variable

If CONFIG_SYS_SKIP_UART_INIT is enabled, calculate the
current baud rate and update the "console" environment
variable.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
13 months agoserial: npcm: support skip uart clock setting
Jim Liu [Tue, 14 Nov 2023 08:51:58 +0000 (16:51 +0800)]
serial: npcm: support skip uart clock setting

Skip the uart clock setting if CONFIG_SYS_SKIP_UART_INIT is enabled.
Fix divisor error.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
13 months agoconfigs: arbel: Enable full functions
Jim Liu [Tue, 14 Nov 2023 08:51:57 +0000 (16:51 +0800)]
configs: arbel: Enable full functions

Enable more functions/commands for arbel evb.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
13 months agoarm: dts: npcm845-evb: fix/add node and aliases
Jim Liu [Tue, 14 Nov 2023 08:51:56 +0000 (16:51 +0800)]
arm: dts: npcm845-evb: fix/add node and aliases

Modify spi and usb aliases name.
Add dt-binding for usb phy define and fix usb phy reset error.
Add tpm/otpee and host_intf node.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
13 months agoconfigs: draco: restore clock driver
Enrico Leto [Wed, 8 Nov 2023 14:53:22 +0000 (15:53 +0100)]
configs: draco: restore clock driver

Fix 'failed to get fck clock' error on boot. Add missing configs.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
13 months agoconfigs: draco: disable misc init
Enrico Leto [Wed, 8 Nov 2023 14:53:21 +0000 (15:53 +0100)]
configs: draco: disable misc init

The initcall sequence fails at arch_misc_init. Disable misc init until
driver model and DT are clean.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
13 months agoconfigs: draco: remove unused resources from spl
Enrico Leto [Wed, 8 Nov 2023 14:53:20 +0000 (15:53 +0100)]
configs: draco: remove unused resources from spl

We don't need device tree, GPIO & SPI in SPL.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
13 months agoconfigs: thuban, rastaban: remove emmc
Enrico Leto [Wed, 8 Nov 2023 14:53:19 +0000 (15:53 +0100)]
configs: thuban, rastaban: remove emmc

These targets use NAND FLASH only. Maybe some MMC definitions were added by
trying MMC for the etamin target evaluation and were not removed.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
13 months agoconfigs: draco: remove spi flash support
Enrico Leto [Wed, 8 Nov 2023 14:53:18 +0000 (15:53 +0100)]
configs: draco: remove spi flash support

The SPI FLASH was set in the early development phase for evaluations.
Any target use it anymore.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
13 months agosiemens,am335x: clean-up draco targets
Enrico Leto [Wed, 8 Nov 2023 14:53:17 +0000 (15:53 +0100)]
siemens,am335x: clean-up draco targets

Draco is a family of 3 boards: thuban, rastaban & etamin. Rename all
targets of the family adding the draco- prefix to increase readibility
and simplify future commits about concerning all boards of the family.

The name draco was initially used for the first target. It's deprecated
since a 2nd target was introduced. Unfortunately the draco target was
copied to the thuban target instead to be renamed. Remove it to save
unnecessary maintenance effort.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
13 months agoMerge branch '2023-11-22-TI-K3-cleanups' into next
Tom Rini [Wed, 22 Nov 2023 19:05:53 +0000 (14:05 -0500)]
Merge branch '2023-11-22-TI-K3-cleanups' into next

This brings in a large number of cleanups and reorganizations to the TI
K3 family of SoCs. We get DTS resyncs for most of the SoCs under that
umbrella as well, and a few enhancements too.

13 months agoarm: dts: k3-am68*: Sync with kernel v6.7-rc1
Manorit Chawdhry [Fri, 17 Nov 2023 05:02:57 +0000 (10:32 +0530)]
arm: dts: k3-am68*: Sync with kernel v6.7-rc1

Sync devicetree with kernel v6.7-rc1

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
13 months agoarm: dts: k3-j721s2*: Sync with kernel v6.7-rc1
Manorit Chawdhry [Fri, 17 Nov 2023 05:02:56 +0000 (10:32 +0530)]
arm: dts: k3-j721s2*: Sync with kernel v6.7-rc1

Sync devicetree with kernel v6.7-rc1

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
13 months agoarm: dts: k3-*-binman: Move to using templated FITs
Neha Malcom Francis [Wed, 15 Nov 2023 10:10:24 +0000 (15:40 +0530)]
arm: dts: k3-*-binman: Move to using templated FITs

Reduce redundancy in code by using templates to generate the A72 boot
binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb
(for legacy boot following devices J721E and AM65x).

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
13 months agoarm: dts: k3-binman: Add support for FIT templates
Neha Malcom Francis [Wed, 15 Nov 2023 10:10:23 +0000 (15:40 +0530)]
arm: dts: k3-binman: Add support for FIT templates

Add templates for FIT images used extensively across K3 boards with most
of the code common. This includes the FIT portions of:
- tispl.bin
- u-boot.img
- sysfw.itb (in case of legacy boot flow)

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 months agoarm: dts: k3-am625-sk-r5/u-boot: Drop duplicate bootph-nodes
Nishanth Menon [Wed, 15 Nov 2023 03:28:57 +0000 (21:28 -0600)]
arm: dts: k3-am625-sk-r5/u-boot: Drop duplicate bootph-nodes

Kernel dts import now provides bootph-all and bootph-pre-ram properties
for the properties we have been overriding so far. Drop the same.

While at this enable the DM and TIFS UARTs for programming pinmux
since they are marked reserved by board.dts

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: dts: k3-am625-beagleplay-u-boot: drop duplicate bootph-nodes
Nishanth Menon [Wed, 15 Nov 2023 03:28:56 +0000 (21:28 -0600)]
arm: dts: k3-am625-beagleplay-u-boot: drop duplicate bootph-nodes

Kernel dts import now provides bootph-all and bootph-pre-ram properties
for the properties we have been overriding so far. Drop the same.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: dts: k3-am625: Drop SoC provided bootph params from board u-boot/r5 dtsi
Nishanth Menon [Wed, 15 Nov 2023 03:28:55 +0000 (21:28 -0600)]
arm: dts: k3-am625: Drop SoC provided bootph params from board u-boot/r5 dtsi

k3-am62* SoC dtsi files now provide the following:

bootph-all: dmss secure_proxy_main dmsc k3_pds k3_clks k3_reset
   main_pmx0 main_timer0 mcu_pmx0 wkup_conf chipid

bootph-pre-ram: secure_proxy_sa3 main_esm mcu_esm

Drop these from board r5 and u-boot.dtsi files as these are duplicate in
them now.

Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: dts: k3-am625*: Sync with kernel v6.7-rc1
Nishanth Menon [Wed, 15 Nov 2023 03:28:54 +0000 (21:28 -0600)]
arm: dts: k3-am625*: Sync with kernel v6.7-rc1

Sync with kernel v6.7-rc1 and sync up the u-boot dts files accordingly.

Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA with BCDMA
Roger Quadros [Tue, 14 Nov 2023 20:28:56 +0000 (22:28 +0200)]
arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA with BCDMA

BCDMA can be used at SPL for OSPI boot and mem-to-mem DMA
so add "bootph-all" to BCDMA node.

Suggested-by: Nishanth Menon <nm@ti.com>
Fixes: 9a3f2b6798b0 ("arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA/Ethernet")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
13 months agoarm: dts: k3-j7200: Sync with Linux 6.7-rc1
Reid Tonking [Mon, 13 Nov 2023 20:43:09 +0000 (14:43 -0600)]
arm: dts: k3-j7200: Sync with Linux 6.7-rc1

Sync u-boot device tree with Linux kernel 6.7-rc1

Signed-off-by: Reid Tonking <reidt@ti.com>
13 months agoarm: k3: Enable instruction cache for main domain SPL
Joao Paulo Goncalves [Mon, 13 Nov 2023 19:07:21 +0000 (16:07 -0300)]
arm: k3: Enable instruction cache for main domain SPL

Change spl_enable_dcache so it also enable icache on SPL
initialization for the main domain part of the boot flow. This
improves bootloader booting time.

Link: https://lore.kernel.org/all/20231109140958.1093235-1-joao.goncalves@toradex.com/
Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
Tested-by: Nishanth Menon <nm@ti.com>
13 months agodoc: board: ti: Add AM62A documentation
Jai Luthra [Mon, 13 Nov 2023 14:51:49 +0000 (08:51 -0600)]
doc: board: ti: Add AM62A documentation

Add generic boot-flow diagrams, and SoC-specific info around build
steps.

Signed-off-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoconfigs: am62ax_evm_a53_defconfig: switch to stdboot
Nishanth Menon [Mon, 13 Nov 2023 14:51:48 +0000 (08:51 -0600)]
configs: am62ax_evm_a53_defconfig: switch to stdboot

Switch over to stdboot

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoboard: ti: am62ax: env: Set the boot_targets
Nishanth Menon [Mon, 13 Nov 2023 14:51:47 +0000 (08:51 -0600)]
board: ti: am62ax: env: Set the boot_targets

Set the default boot_targets to map up SD card as priority followed by
emmc and so on.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoboard: ti: am62ax: env: Use default findfdt
Nishanth Menon [Mon, 13 Nov 2023 14:51:46 +0000 (08:51 -0600)]
board: ti: am62ax: env: Use default findfdt

Use the default findfdt instead of local logic.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoconfigs: am62ax_evm_a53_defconfig: Enable networking
Nishanth Menon [Mon, 13 Nov 2023 14:51:45 +0000 (08:51 -0600)]
configs: am62ax_evm_a53_defconfig: Enable networking

Enable networking

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agodma: ti: k3-udma: Introduce DMA support for the am62ax
Vignesh Raghavendra [Mon, 13 Nov 2023 14:51:44 +0000 (08:51 -0600)]
dma: ti: k3-udma: Introduce DMA support for the am62ax

In preparation for enabling ethernet for the am62ax family of SoCs,
introduce the initial DMA channel settings for the am62ax

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
[bb@ti.com: expanded on commit message]
Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: dts: k3-am62a*: Sync with kernel v6.7-rc1
Nishanth Menon [Mon, 13 Nov 2023 14:51:43 +0000 (08:51 -0600)]
arm: dts: k3-am62a*: Sync with kernel v6.7-rc1

Sync with kernel v6.7-rc1 and sync up the u-boot dts files accordingly.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: mach-k3: am62a: Add main_timer0 id to the dev list
Nishanth Menon [Mon, 13 Nov 2023 14:51:42 +0000 (08:51 -0600)]
arm: mach-k3: am62a: Add main_timer0 id to the dev list

main_timer0 is used by u-boot as the tick-timer. Add it to the soc
devices list so it an be enabled via the k3 power controller.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoarm: dts: k3-j721e-*: Sync with kernel v6.7-rc1
Neha Malcom Francis [Mon, 13 Nov 2023 04:30:23 +0000 (10:00 +0530)]
arm: dts: k3-j721e-*: Sync with kernel v6.7-rc1

Sync the U-Boot DTS files with those of Kernel v6.7-rc1.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
13 months agodt-bindings: misc: Move esm-k3.txt to ti,j721e-esm.yaml
Neha Malcom Francis [Mon, 13 Nov 2023 04:30:22 +0000 (10:00 +0530)]
dt-bindings: misc: Move esm-k3.txt to ti,j721e-esm.yaml

Move esm-k3.txt to ti,j721e-esm.yaml in line with the devicetree
documentation in kernel.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
13 months agodoc: board: beagle: Add BeagleBone AI-64 documentation
Nishanth Menon [Sat, 4 Nov 2023 08:11:03 +0000 (03:11 -0500)]
doc: board: beagle: Add BeagleBone AI-64 documentation

Add base documentation for BeagleBone AI-64.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoconfigs: Add j721e_beagleboneai64_* configs
Nishanth Menon [Sat, 4 Nov 2023 08:11:02 +0000 (03:11 -0500)]
configs: Add j721e_beagleboneai64_* configs

Add basic support for mmc/emmc and networking support for BeagleBone
AI-64.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoboard: beagle: Add BeagleBone AI-64 support
Nishanth Menon [Sat, 4 Nov 2023 08:11:01 +0000 (03:11 -0500)]
board: beagle: Add BeagleBone AI-64 support

Add base support for BeagleBone AI-64 board support.

Further information at  https://beagleboard.org/ai-64

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: dts: Add k3-j721e-beagleboneai64
Robert Nelson [Sat, 4 Nov 2023 08:11:00 +0000 (03:11 -0500)]
arm: dts: Add k3-j721e-beagleboneai64

BeagleBoard.org BeagleBone AI-64 is an open source hardware single
board computer based on the Texas Instruments TDA4VM SoC featuring
dual-core 2.0GHz Arm Cortex-A72 processor, C7x+MMA and 2 C66x
floating-point VLIW DSPs, 3x dual ARM Cortex-R5 co-processors,
2x 6-core Programmable Real-Time Unit and Industrial Communication
SubSystem, PowerVR Rogue 8XE GE8430 3D GPU. The board features 4GB
DDR4, USB3.0 Type-C, 2x USB SS Type-A, miniDisplayPort, 2x 4-lane
CSI, DSI, 16GB eMMC flash, 1G Ethernet, M.2 E-key for WiFi/BT, and
BeagleBone expansion headers.

This board family can be indentified by the BBONEAI-64-B0 in the
at24 eeprom:

[aa 55 33 ee 01 37 00 10  2e 00 42 42 4f 4e 45 41 |.U3..7....BBONEA|]
[49 2d 36 34 2d 42 30 2d  00 00 42 30 30 30 37 38 |I-64-B0-..B00078|]

Baseline of the devicetree is from v6.6-rc1

https://beagleboard.org/ai-64
https://git.beagleboard.org/beagleboard/beaglebone-ai-64

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoboard: Move omap3 beagle under beagle vendor folder
Nishanth Menon [Sat, 4 Nov 2023 08:01:37 +0000 (03:01 -0500)]
board: Move omap3 beagle under beagle vendor folder

Move the omap3 beagle to the beagle vendor folder representing
BeagleBoard.org platforms.

Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agodoc: board: Move am62x_beagleplay to it's own vendor
Nishanth Menon [Sat, 4 Nov 2023 08:01:36 +0000 (03:01 -0500)]
doc: board: Move am62x_beagleplay to it's own vendor

Move BeaglePlay documentation to beagle as a board vendor and update
references accordingly.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
13 months agoboard: Move beagleplay under beagle vendor folder
Nishanth Menon [Sat, 4 Nov 2023 08:01:35 +0000 (03:01 -0500)]
board: Move beagleplay under beagle vendor folder

Move beagleplay support away from ti/am62x to it's own beagle vendor
folder.

This forms the starting point for new beagle platforms added under it's
own board vendor folder.

As part of this create all the associated files with a bare minimum
beagleplay.c file.

Suggested-by: Andrew Davis <afd@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
[trini: Update k3-binman.dtsi to use full path to scheme.yaml now]
Signed-off-by: Tom Rini <trini@konsulko.com>
13 months agoconfigs: Add am62x_beagleplay_*_defconfig
Nishanth Menon [Sat, 4 Nov 2023 08:01:34 +0000 (03:01 -0500)]
configs: Add am62x_beagleplay_*_defconfig

Add am62x_beagleplay_* defconfig customized for the configuration of
BeaglePlay and drop the config fragments.

This is in preparation for dropping the dependency on ti vendor folder
entirely.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: dts: k3-am625-beagleplay-u-boot/r5: Just depend on k3-binman.dtsi
Nishanth Menon [Sat, 4 Nov 2023 08:01:33 +0000 (03:01 -0500)]
arm: dts: k3-am625-beagleplay-u-boot/r5: Just depend on k3-binman.dtsi

With the upcoming folder separation, there is no further need to depend
on am625-binman.dtsi. Duplicate the existing definitions to u-boot.dtsi
and r5.dts as appropriate.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
13 months agodoc: board: ti: j721e_evm: Use board relative path for include directives
Nishanth Menon [Sat, 4 Nov 2023 07:21:50 +0000 (02:21 -0500)]
doc: board: ti: j721e_evm: Use board relative path for include directives

When using include directives within a section that is included by non
TI board rst file, k3.rst and other include paths need to be relative to
doc/board/ base.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoconfigs: j7200_evm_a72_defconfig: Switch to bootstd
Nishanth Menon [Sat, 4 Nov 2023 07:21:49 +0000 (02:21 -0500)]
configs: j7200_evm_a72_defconfig: Switch to bootstd

Switch to using bootstd. Note with this change, we will stop using
distro_bootcmd and instead depend entirely on bootflow method of
starting the system up.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoconfigs: j7200: Remove HBMC_AM654 config
Nishanth Menon [Sat, 4 Nov 2023 07:21:48 +0000 (02:21 -0500)]
configs: j7200: Remove HBMC_AM654 config

Kernel commit 1b77265626a4 ("arm64: dts: ti: k3-j7200-mcu-wakeup: Add
HyperBus node") was merged to kernel without its dependent patch [1].
Similar fix is needed in U-Boot, and hbmc currently breaks boot. Till
this gets fixed in U-Boot, disable the config by default so that the
hbmc probe that happens in board/ti/j721e/evm.c will not take place
and lead to boot failure.

This is similar to the approach in commit 5b2671594b80 ("configs:
j721e: Remove HBMC_AM654 config"), introduced to j7200 evm platform.

[1] https://lore.kernel.org/all/20230424184810.29453-1-afd@ti.com/

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoarm: mach-k3: j721e: Improve support for UDA FS
Nishanth Menon [Sat, 4 Nov 2023 07:21:47 +0000 (02:21 -0500)]
arm: mach-k3: j721e: Improve support for UDA FS

Commit 5019170970ad ("arch: arm: mach-k3: j721e: add support for UDA
FS") introduced basic UDA FS support, however, we can Take approach
similar to commit 0f1c1e8b368b ("arm: mach-k3: am625: Add support for
UDA FS"). While boot partition support with EMMC boot is useful, it is
constrained by the size of boot hardware partition itself.

In the case of K3 devices, tispl images can contain OP-TEE images that
can substantially vary in size and the u-boot image itself can vary over
time as we enable various features.

So use the CSD information in the case of EMMC_BOOT configuration being
enabled to pick boot partition or UDA FS mode operation to pick.

If EMMC_BOOT is disabled, then depend on filesystem configuration to
pick data from UDA.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: mach-k3: arm64-mmu: Refactor to be independent of board
Nishanth Menon [Sat, 4 Nov 2023 07:21:46 +0000 (02:21 -0500)]
arm: mach-k3: arm64-mmu: Refactor to be independent of board

Refactor J721E J7200 definition to make this independent of board
macros.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoboard: ti: j721e: Select SOC_K3_J721E_J7200 for J7200evm
Nishanth Menon [Sat, 4 Nov 2023 07:21:45 +0000 (02:21 -0500)]
board: ti: j721e: Select SOC_K3_J721E_J7200 for J7200evm

Enable SOC_K3_J721E_J7200 when board is J7200 EVM - this allows us to
differentiate J7200 platform cleanly in board independent codebase.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoarm: mach-k3: Kconfig: Introduce a symbol to indicate J7200
Nishanth Menon [Sat, 4 Nov 2023 07:21:44 +0000 (02:21 -0500)]
arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200

J7200 shares quite a few characteristics with J721E. However a few sets
are different. Introduce a Kconfig to differentiate the two to allow for
new boards to be introduced in a seamless manner.

Signed-off-by: Nishanth Menon <nm@ti.com>
13 months agoconfigs: j721e_evm_a72_defconfig: Switch to bootstd
Nishanth Menon [Sat, 4 Nov 2023 07:21:43 +0000 (02:21 -0500)]
configs: j721e_evm_a72_defconfig: Switch to bootstd

Switch to using bootstd. Note with this change, we will stop using
distro_bootcmd and instead depend entirely on bootflow method of
starting the system up.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoboard: ti: j721e: j721e.env: Add explicit boot_targets
Nishanth Menon [Sat, 4 Nov 2023 07:21:42 +0000 (02:21 -0500)]
board: ti: j721e: j721e.env: Add explicit boot_targets

Add explicit boot_targets to indicate the specific boot sequence to
follow.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoboard: ti: j721e: evm: Switch to using IS_ENABLED
Nishanth Menon [Sat, 4 Nov 2023 07:21:41 +0000 (02:21 -0500)]
board: ti: j721e: evm: Switch to using IS_ENABLED

Switch to using IS_ENABLED() for inline function usage.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoboard: ti: j721e: evm: Drop board check for ESM
Nishanth Menon [Sat, 4 Nov 2023 07:21:40 +0000 (02:21 -0500)]
board: ti: j721e: evm: Drop board check for ESM

When config is enabled, the esm dt probe makes sense. Simplify by
dropping board specific checks.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoboard: ti: j721e: evm: Drop unused headers
Nishanth Menon [Sat, 4 Nov 2023 07:21:39 +0000 (02:21 -0500)]
board: ti: j721e: evm: Drop unused headers

Drop headers that are no longer necessary for build

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoarm: mach-k3: Move TI dummy keys out of board folder
Nishanth Menon [Sat, 4 Nov 2023 02:45:11 +0000 (21:45 -0500)]
arm: mach-k3: Move TI dummy keys out of board folder

This file is used to emulate customer keys on TI development board
ecosystems, move it out of board/ directory and into mach-k3. And
change the relative paths to absolute paths in the binman paths.

While at it, drop the reference in verdin-binman file which is
redundant.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Manorit Chawdhry <m-chawdhry@ti.com>
13 months agoarm: mach-k3: Move K3 degenerate keys out of board folder
Nishanth Menon [Sat, 4 Nov 2023 02:45:10 +0000 (21:45 -0500)]
arm: mach-k3: Move K3 degenerate keys out of board folder

This file is common for all of K3, move it out of board/ directory and
into mach-k3. And change the relative paths to absolute paths in the
binman paths.

While at it, drop the reference in verdin-binman file which is
redundant.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: Move sysfw-loader into R5 directory
Andrew Davis [Tue, 14 Nov 2023 15:59:50 +0000 (09:59 -0600)]
arm: mach-k3: Move sysfw-loader into R5 directory

SYSFW is only ever loaded by the R5 core, move the code into that
directory. While here also move the related Kconfig symbols.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: Remove incorrect checks for SPL build
Andrew Davis [Tue, 14 Nov 2023 15:59:49 +0000 (09:59 -0600)]
arm: mach-k3: Remove incorrect checks for SPL build

The kconfig option SPL means this build supports SPL but not that
this build is SPL, nor that this build is the SPL running on R5.
For options that are for R5 SPL use CPU_V7R.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: Move R5 specific code into new r5/ directory
Andrew Davis [Tue, 14 Nov 2023 15:59:48 +0000 (09:59 -0600)]
arm: mach-k3: Move R5 specific code into new r5/ directory

This makes it clear these are only to be used by the R5 builds of SPL.
And this will be used to later more cleanly split the two builds.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: j721s2: Move board selection to mach-k3
Andrew Davis [Wed, 1 Nov 2023 20:35:30 +0000 (15:35 -0500)]
arm: mach-k3: j721s2: Move board selection to mach-k3

Currently each set of board targets from a vendor is selected inside
the board directory for that vendor. This has the problem of multiple
targets, one from each vendor, being selectable at the same time.
For instance you can select both TARGET_AM654_A53_EVM and
TARGET_IOT2050_A53 in the same build.

To fix this we need to move the target board choice to a common location
for each parent SoC selection. Do this in arch/arm/mach-k3.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: am62ax: Move board selection to mach-k3
Andrew Davis [Wed, 1 Nov 2023 20:35:29 +0000 (15:35 -0500)]
arm: mach-k3: am62ax: Move board selection to mach-k3

Currently each set of board targets from a vendor is selected inside
the board directory for that vendor. This has the problem of multiple
targets, one from each vendor, being selectable at the same time.
For instance you can select both TARGET_AM654_A53_EVM and
TARGET_IOT2050_A53 in the same build.

To fix this we need to move the target board choice to a common location
for each parent SoC selection. Do this in arch/arm/mach-k3.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: am62x: Move board selection to mach-k3
Andrew Davis [Wed, 1 Nov 2023 20:35:28 +0000 (15:35 -0500)]
arm: mach-k3: am62x: Move board selection to mach-k3

Currently each set of board targets from a vendor is selected inside
the board directory for that vendor. This has the problem of multiple
targets, one from each vendor, being selectable at the same time.
For instance you can select both TARGET_AM654_A53_EVM and
TARGET_IOT2050_A53 in the same build.

To fix this we need to move the target board choice to a common location
for each parent SoC selection. Do this in arch/arm/mach-k3.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: am64x: Move board selection to mach-k3
Andrew Davis [Wed, 1 Nov 2023 20:35:27 +0000 (15:35 -0500)]
arm: mach-k3: am64x: Move board selection to mach-k3

Currently each set of board targets from a vendor is selected inside
the board directory for that vendor. This has the problem of multiple
targets, one from each vendor, being selectable at the same time.
For instance you can select both TARGET_AM654_A53_EVM and
TARGET_IOT2050_A53 in the same build.

To fix this we need to move the target board choice to a common location
for each parent SoC selection. Do this in arch/arm/mach-k3.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: am65x: Move board selection to mach-k3
Andrew Davis [Wed, 1 Nov 2023 20:35:26 +0000 (15:35 -0500)]
arm: mach-k3: am65x: Move board selection to mach-k3

Currently each set of board targets from a vendor is selected inside
the board directory for that vendor. This has the problem of multiple
targets, one from each vendor, being selectable at the same time.
For instance you can select both TARGET_AM654_A53_EVM and
TARGET_IOT2050_A53 in the same build.

To fix this we need to move the target board choice to a common location
for each parent SoC selection. Do this in arch/arm/mach-k3.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoarm: mach-k3: j721e: Move board selection to mach-k3
Andrew Davis [Wed, 1 Nov 2023 20:35:25 +0000 (15:35 -0500)]
arm: mach-k3: j721e: Move board selection to mach-k3

Currently each set of board targets from a vendor is selected inside
the board directory for that vendor. This has the problem of multiple
targets, one from each vendor, being selectable at the same time.
For instance you can select both TARGET_AM654_A53_EVM and
TARGET_IOT2050_A53 in the same build.

To fix this we need to move the target board choice to a common location
for each parent SoC selection. Do this in arch/arm/mach-k3.

Signed-off-by: Andrew Davis <afd@ti.com>
13 months agoboard: ti: Add dependency from TARGET selection to SOC
Andrew Davis [Wed, 1 Nov 2023 20:35:24 +0000 (15:35 -0500)]
board: ti: Add dependency from TARGET selection to SOC

Currently the K3 selection for TARGET boards does not depend on the SoC
for which it is based. This leds to the odd ability to select for instance
both SOC_K3_AM625 and TARGET_J721E_A72_EVM.

To fix this the target choice should depend on the matching SOC config.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
13 months agoMerge tag 'tpm-next-22112023' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Wed, 22 Nov 2023 13:26:46 +0000 (08:26 -0500)]
Merge tag 'tpm-next-22112023' of https://source.denx.de/u-boot/custodians/u-boot-tpm into next

tpm_tis_send-cleanup

13 months agotpm: remove superfluous check in tpm_tis_send()
Heinrich Schuchardt [Sat, 11 Nov 2023 00:35:30 +0000 (01:35 +0100)]
tpm: remove superfluous check in tpm_tis_send()

Checking if variable chip is NULL after dereferencing it makes no sense.
As discribed in [1] it is not expected that the variable can ever be NULL.

[1] Re: [PATCH] tpm: avoid NULL pointer dereference in tpm_tis_send()
    https://lore.kernel.org/u-boot/YaFwDtKKYRr7qzWc@apalos.home/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
13 months agousb: udc: Try to clarify an error message
Miquel Raynal [Tue, 10 Oct 2023 09:03:04 +0000 (11:03 +0200)]
usb: udc: Try to clarify an error message

At some point when trying to use USB gadgets, two situations may arise
and lead to a failure. Either the UDC (USB Device Controller) is not
available at all (not described or not probed) or the UDC is already in
use. For instance, as the USB Ethernet gadget remains bound to the UDC,
the use of any other USB gadget (fastboot, dfu, etc) *after* will always
fail with the "couldn't find an available UDC" error.

Let's give a more helpful message by making a difference between the two
cases. Let's also hint people who would get this error and grep it into
the sources a better explanation of what's wrong with their workflow.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-4-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
13 months agocmd: bind: Try to improve the (un)bind help
Miquel Raynal [Tue, 10 Oct 2023 09:03:03 +0000 (11:03 +0200)]
cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
13 months agocmd: Change the dependencies between CMD_BIND and USB_GADGET
Miquel Raynal [Tue, 10 Oct 2023 09:03:02 +0000 (11:03 +0200)]
cmd: Change the dependencies between CMD_BIND and USB_GADGET

Today CMD_BIND defaults to 'y' when USB_ETHER is enabled. In practice,
CMD_BIND should default to 'y' when any USB gadget is enabled not only
USB_ETHER. Let's invert the logic of the dependency and use the weak
'imply' keyword to enforce this.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3
Link: https://lore.kernel.org/r/20231010090304.49335-2-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
13 months agousb: gadget: f_mass_storage: Stop ums on START-STOP UNIT SCSI command
Marek Vasut [Tue, 7 Nov 2023 00:09:59 +0000 (01:09 +0100)]
usb: gadget: f_mass_storage: Stop ums on START-STOP UNIT SCSI command

Exit the UMS handler loop in case START-STOP UNIT SCSI command is
received. This is sent e.g. by the util-linux eject(1) command and
indicates to the device that it is supposed to spin down the media
and enter low power state.

This effectively adds support for exitting the 'ums' command from
host using 'eject /dev/sdN' that is on par with 'dfu-util -e' .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231107001018.55640-1-marex@denx.de
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
13 months agodfu: add CONFIG_DFU_NAME_MAX_SIZE configuration
Jaehoon Chung [Mon, 20 Jun 2022 11:13:54 +0000 (20:13 +0900)]
dfu: add CONFIG_DFU_NAME_MAX_SIZE configuration

Add CONFIG_DFU_NAME_MAX_SIZE to change the proper size.
If name is longer than default size, it can do wrong behavior during updating
image. So it need to change the proper maximum size.

This patch is proviced the solution to change value with configuration.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Link: https://lore.kernel.org/r/20220620111354.448512-1-jh80.chung@samsung.com
[mkorpershoek: fixed build errors for dfu.h includes]
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
13 months agoMerge tag 'v2024.01-rc3' into next
Tom Rini [Mon, 20 Nov 2023 14:19:50 +0000 (09:19 -0500)]
Merge tag 'v2024.01-rc3' into next

Prepare v2024.01-rc3

13 months agoPrepare v2024.01-rc3
Tom Rini [Mon, 20 Nov 2023 13:43:46 +0000 (08:43 -0500)]
Prepare v2024.01-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
13 months agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 20 Nov 2023 13:37:27 +0000 (08:37 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
13 months agoscsi: set dma direction to NONE for TEST UNIT READY
Nikita Yushchenko [Mon, 13 Nov 2023 05:51:02 +0000 (11:51 +0600)]
scsi: set dma direction to NONE for TEST UNIT READY

SCSI device scan code was executing TEST UNIT READY command without
explicitly setting dma direction in struct scsi_cmd to NONE, so command
was passed to driver with dma direction set to DMA_FROM_DEVICE,
inherited from older usage.

With WDC SDINDDH6-64G ufs device, that caused TEST UNIT READY to
return error.

Fix that, by explicitly setting dma direction to NONE for
TEST UNIT READY, and restoring it back DMA_FROM_DEVICE for the
following READ CAPACITY.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Reviewed-by: Marek Vasut <marex@denx.de>