Commit graph

88690 commits

Author SHA1 Message Date
Heinrich Schuchardt
90602e779d riscv: dts: starfive: generate u-boot-spl.bin.normal.out
The StarFive VisionFive 2 board cannot load spl/u-boot-spl.bin but needs a
prefixed header. We have referring to a vendor tool (spl_tool) for this
task. 'mkimage -T sfspl' can generate the prefixed file.

Use binman to invoke mkimage for the generation of file
spl/u-boot-spl.bin.normal.out.

Update the documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
2023-09-20 21:05:16 +08:00
Heinrich Schuchardt
64fd30d367 tools: mkimage: Add StarFive SPL image support
The StarFive JH7110 base boards require a header to be prefixed to the SPL
binary image. This has previously done with a vendor tool 'spl_tool'
published under a GPL-2-or-later license. Integrate this capability into
mkimage.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Chanho Park <chanho61.park@samsung.com>
Tested-by: Milan P. Stanić <mps@arvanta.net>
2023-09-20 21:05:14 +08:00
Milan P. Stanić
98d17450cd starfive: visionfive2: add mmc0 and nvme boot targets
boot from SDIO3.0 (mmc sdcard) first if it is plugged.
If mmc is not plugged try to boot from emmc if it is plugged.
If emmc is not plugged then try to boot from nvme.

Signed-off-by: Milan P. Stanić <mps@arvanta.net>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-09-20 21:04:21 +08:00
Heinrich Schuchardt
ad4b1bc39e configs: NVMe/USB target boot devices on VisionFive 2
Make NVMe and USB target boot devices on the StarFive VisionFive 2 board.
The boot devices are sorted by decreasing device speed.

CONFIG_PCI_INIT_R=y is set via [1]. 'start usb' is added to CONFIG_PREBOOT
by the same patch.

[1] [PATCH v1 1/2] configs: starfive: Enable PCIE auto enum and NVME/USB stuff for Starfive Visionfive 2
    https://lore.kernel.org/u-boot/TY3P286MB2611C9AD6E5BB3756A959E89981FA@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-09-20 20:54:48 +08:00
Heinrich Schuchardt
c5172c10f6 riscv: set fdtfile on VisionFive 2
Multiple revisions of the StarFive VisionFive 2 board exist. They can be
identified by reading their EEPROM.

Linux uses two differently named device-tree files. To load the correct
device-tree we need to set $fdtfile to the device-tree file name that
matches the board revision.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-09-20 20:50:50 +08:00
Tom Rini
c58ee1c994 Merge branch '2023-09-19-tidy-up-some-kconfig-options' into next
- Re-organize and tidy up some of our Kconfig options
2023-09-19 17:44:18 -04:00
Simon Glass
c0e5b0ebab boot: Join ARCH_FIXUP_FDT_MEMORY with related options
Move this to be with the other devicetree-fixup options.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
400a6a3a1b boot: Drop CMD_MTDPARTS condition for FDT_FIXUP_PARTITIONS
This is not needed, so drop it. Also use a capital 'O' for the option,
while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
040a604880 boot: Join FDT_FIXUP_PARTITIONS with related options
Move this to be with the other devicetree-fixup options.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
4483184127 Make ARCH_FIXUP_FDT_MEMORY depend on OF_LIBFDT
We need CONFIG_OF_LIBFDT to be able to do fdt fixups, so add that
condition.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
3b58de4d0b Mark DISTRO_DEFAULTS as deprecated
Standard boot has been in place for a while now. Quite a few problems
have been found and fixed. It seems like a good time to mark the
script-based approach as deprecated and encourage people to use standard
boot.

Update the DISTRO_DEFAULTS Kconfig to encourage people to move to
standard boot, which is able to boot Linux distributions automatically.

Add a short migration guide to make this easier.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
064a57d019 Kconfig: Move TEXT_BASE et al under general setup
These don't relate to booting. Move them out of there and into the same
place as the other related settings.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
4a8fcb6e0b boot: Make standard boot a menu
Collect these options into a menu for easier viewing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
4d8ea26f99 Kconfig: Move SPL_FIT under FIT
This option already depends on FIT, so put it under the same umbrella, so
that it appears in the FIT menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
815f8d3f86 spl: Drop SPL/TPL_RAM_SUPPORT option for SPL_LOAD_FIT_ADDRESS
All boards which actually define this address enable SPL_LOAD_FIT, or at
least just rely on the default value of 0. So drop the dependency.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
63f0da65e1 spl: Tidy up load address in spl_ram
This CONFIG is used but is not given a value by some boards. Use
a default value of 0 explicitly, rather than relying on the 0 value
provided by CONFIG_SPL_LOAD_FIT_ADDRESS

This will allow us to make SPL_LOAD_FIT_ADDRESS depend on SPL_LOAD_FIT
as it should.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:26 -04:00
Simon Glass
12a7ea0059 Kconfig: Create a menu for FIT
This is a major feature with a lot of options. Give it its own menu to
tidy up the 'make menuconfig' display. Drop the 'depends on FIT' pieces
which are now unnecessary, since they are now bracketed by an 'if FIT'.

Leave CONFIG_TIMESTAMP out since it affects legacy images too.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
47b18c0e33 boot: Rename Android-boot text
Phrases like 'Enable support for' are pointless since this is an option
which enables things. Drop that part so it is easier to follow.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
96095e131c boot: Move some other fdt-fixup options to the same menu
Move more options relating to fixing up a device tree into the new
devicetree-fixup menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
ddc5f9b13e Move fdt_simplefb to boot/
This relates to booting, so move it there. Create a new Kconfig menu for
things related to devicetree fixup.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
b1a4b46734 boot: Move fdt_support to boot/
This relates to booting since it fixes up the devicetree for the OS. Move
it into the boot/ directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
36778dfc9d test: Move POST under a renamed Testing section
Rename Unit tests to Testing, since it is a stretch to describe some of
the tests as unit tests. Move POST there as well, so it doesn't show up
by itself in the top-level menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
4cc40f618a FWU: Avoid showing an unselectable menu option
Use a menuconfig to avoid showing a menu which cannot be selected in many
cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-09-19 11:36:25 -04:00
Simon Glass
31b097a265 video: Move the BMP options
These appear prominently in the main menu at present. Move them to the
video Kconfig where they belong.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
8168359160 video: Move bmp code to drivers/video
This relates to graphics which is only active when CONFIG_VIDEO is
enabled. Move it into that directory.

For most boards there is no harm in compiling it always, since it if not
used it will be dropped by the linker. But for the EFI app this is not
the case, so retain use of the BMP Kconfig.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
d761eeabcd Kconfig: Move API into general setup
This is perhaps not a commonly used feature so should not have its own
option in the main menu. Move it under general setup.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Simon Glass
a90b5946f4 lib: rational: Move the Kconfigs into the correct place
These should not be part of the 'system tables' menu. Move them outside
on their own.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7d0f3fbb93 ("lib: rational: copy the rational fraction lib...")
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19 11:36:25 -04:00
Tom Rini
08600ff62e Merge branch '2023-09-18-assorted-TI-platform-updates' into next
- A few assorted DT updates and minor fixes for TI platforms
2023-09-19 11:14:03 -04:00
Nishanth Menon
be226cd6ba arm: dts: k3-am642: Sync with kernel v6.6-rc1
Sync device tree with v6.6-rc1

Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-19 09:13:19 -04:00
Nishanth Menon
dfefb85f40 dt-bindings: ti-serdes: Deprecate header with constants with v6.6-rc1
The constants to define the idle state of SERDES MUX were defined in
bindings header. They are used only in DTS and driver uses the dt property
to set the idle state making it unsuitable for bindings.
The constants are moved to header next to DTS ("arch/arm/boot/dts/")
and all the references to bindings header are removed.
So add a warning to mark this bindings header as deprecated.

We could probably drop this header, but let us wait for kernel to
cleanup.

Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-19 09:13:19 -04:00
Nishanth Menon
4d3803d699 arm: dts: k3*: Use local header for SERDES MUX idle-state values
The DTS uses constants for SERDES MUX idle state values which were earlier
provided as bindings header. But they are unsuitable for bindings.
So move these constants in a header next to DTS.

NOTE: sync with v6.6-rc1 will bring in this change naturally.

Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-19 09:13:19 -04:00
Nishanth Menon
c5d51606e8 arm: dts: Introduce k3-serdes.h from v6.6-rc1
Introduce the new serdes header from kernel v6.6-rc1

The DTS uses constants for SERDES MUX idle state values which were earlier
provided as bindings header. But they are unsuitable for bindings.
So move these constants in a header next to DTS.

Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-19 09:13:19 -04:00
Nishanth Menon
0d33f5281a arm: dts: k3-am625: Sync with kernel v6.6-rc1
Sync device tree with v6.6-rc1

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-19 09:13:19 -04:00
Nishanth Menon
cda32b9634 arm: dts: k3-pinctrl: Sync with kernel v6.6-rc1
Sync pinctrl header with v6.6-rc1

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-19 09:13:19 -04:00
Reid Tonking
77269ba93d drivers: misc: k3_avs: Add Linux compatibles to maintain sync
The ti,j7200-vtm and ti,j721e-vtm compatibles are used for voltage
and thermal monitoring (VTM) by (drivers/thermal/k3_j72xx_bandgap.c)
in Linux, but the same hardware is used for adaptive voltage scaling
(AVS) in u-boot, This brings both drivers in line with the same
compatibles.

Since the j7200 uses the config as the j721e, the data is inherited
from j721e vs creating a duplicate

Signed-off-by: Neha Francis <n-francis@ti.com>
Signed-off-by: Reid Tonking <reidt@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2023-09-19 09:13:19 -04:00
Nikhil M Jain
a467fb58b1 tools: logos: Rename TI logo files
Change the file name from ti.gz and ti.bmp to ti_logos_414x97_32bpp to
help user understand the resolution and identify the logo files when
placed in the boot partition and update the splashfile name with the
same in .env file.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
2023-09-18 17:34:14 -04:00
Trevor Woerner
dc38fe2ca5 am33xx: ignore return value from usb_ether_init()
In 2cb43ef1c2 ("usb: ether: Fix error handling in usb_ether_init") the error
handling of usb_ether_init() was changed. Not a single other call site of this
function checks its return value, therefore follow suit in the am33xx code.

Do not cause the boot to halt if the usb gadget ethernet initialization fails:

	initcall sequence 9ffdbd84 failed at call 808024b9 (err=-19)
	### ERROR ### Please RESET the board ###

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Reviewed-by: Michal Suchánek <msuchanek@suse.de>
2023-09-18 17:34:14 -04:00
Tom Rini
8fcd28aae5 Merge branch 'next' of git://source.denx.de/u-boot-usb into next
- Rework gadget device handling
2023-09-16 12:14:08 -04:00
Marek Vasut
2caf974b5f board: usb: Replace legacy usb_gadget_handle_interrupts()
The usb_gadget_handle_interrupts() is no longer used anywhere,
replace the remaining uses with dm_usb_gadget_handle_interrupts()
which takes udevice as a parameter.

Some of the UDC drivers currently ignore the index parameter altogether,
those also ignore the udevice and have to be reworked. Other like the
dwc3_uboot_handle_interrupt() had to be switched from index to udevice
look up to avoid breakage.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on khadas vim3
Signed-off-by: Marek Vasut <marex@denx.de>
2023-09-15 23:38:02 +02:00
Marek Vasut
890076d20e dm: usb: udc: Drop legacy udevice handler functions
Remove legacy functions limited by the dev_array array,
those are no longer used anywhere, all the code uses
plain udevice based access now.

The usb_gadget_handle_interrupts() is doing udevice look up
until all call sites use dm_usb_gadget_handle_interrupts().

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
2023-09-15 23:38:02 +02:00
Marek Vasut
bfa352d1cb usb: gadget: ether: Use plain udevice for UDC controller interaction
Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-15 23:38:02 +02:00
Marek Vasut
99e0532831 usb: gadget: acm: Use plain udevice for UDC controller interaction
Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-15 23:38:02 +02:00
Marek Vasut
5b8c9d1b58 thordown: Use plain udevice for UDC controller interaction
Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-15 23:38:02 +02:00
Marek Vasut
6b84acc978 sdp: Use plain udevice for UDC controller interaction
Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
2023-09-15 23:38:02 +02:00
Marek Vasut
99924db71f spl: sdp: Detach the controller on error
In case anything errors out during the SDP transfer, detach
the controller instead of bailing out right away. This way,
the controller can be reattached on next attempt.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
2023-09-15 23:38:02 +02:00
Marek Vasut
2dfae17512 dfu: Use plain udevice for UDC controller interaction
Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
2023-09-15 23:38:02 +02:00
Marek Vasut
edd6042d45 dfu: Detach the controller on error
In case anything errors out during the DFU registration, detach
the controller instead of bailing out right away. This way, the
controller can be reattached on next attempt.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
2023-09-15 23:38:02 +02:00
Marek Vasut
f032260c7c cmd: ums: Use plain udevice for UDC controller interaction
Convert to plain udevice interaction with UDC controller
device, avoid the use of UDC uclass dev_array .

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on khadas vim3
Signed-off-by: Marek Vasut <marex@denx.de>
2023-09-15 23:38:02 +02:00
Marek Vasut
76dd459487 cmd: thordown: Reorder variable declaration
Move the variable declaration around to improve code readability.
No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-15 23:38:02 +02:00
Marek Vasut
37fb7cb7f8 cmd: sdp: Reorder variable declaration
Move the variable declaration around to improve code readability.
No functional change.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marek Vasut <marex@denx.de>
2023-09-15 23:38:02 +02:00