Commit Graph

16800 Commits

Author SHA1 Message Date
Wadim Egorov
d5e6401011 board: phycore-am62x: Extend for better environment handling
Select environment location based on the device we boot from.
Also, introduce a "boot" variable that represents the current boot
device and can be used by scripts.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
2024-04-11 20:45:29 -06:00
Marcel Ziswiler
c07bba7a2c verdin-am62: move verdin am62 to OF_UPSTREAM
Move verdin-am62 to OF_UPSTREAM:
- handle the fact that dtbs now have a 'ti/' prefix
- imply OF_UPSTREAM
- remove redundant files from arch/arm/dts leaving only the
  *-u-boot.dtsi files
- update MAINTAINERS file

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2024-04-11 20:44:41 -06:00
Tom Rini
a691594241 Merge patch series "Resolve issues with booting distros on x86"
Simon Glass <sjg@chromium.org> says:

This little series reprises the EFI-video fix, fixes a USB problem and
enables a boot script for coreboot.

It also moves to truetype fonts for coreboot and qemu-x86, since the
menus look much better and there are no strong size constraints.

With these changes it is possible to boot a Linux distro automatically
with U-Boot on x86, including when U-Boot is the second-stage
bootloader.
2024-04-10 20:01:42 -06:00
Simon Glass
9c558dc777 x86: qemu: Expand ROM size
Expand the ROM for x86_64 to 2MB to make space for the font, as it is
already on the edge.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10 20:01:33 -06:00
Tom Rini
843143303c Xilinx changes for v2024.07-rc1
xilinx:
 - Do not call env_get_location when !ENV_IS_NOWHERE
 - Add FDT_FIXUP_PARTITIONS support
 - Fix legacy format MAC decoding
 
 zynqmp:
 - Enable semihosting SPL support
 - DT updates
 - Kconfig resort/cleanup
 - Don't describe second image/capsule if !SPL
 - Add support for dfu/capsule description via MTD
 - Support JTAG as alternative boot mode
 - Add support for TEG soc variant
 
 zynqmp-kria:
 - Wire usb4 boot device
 - Update SDIO tristate pin configuration
 - Disable SPI_FLASH_BAR to avoid issue with SPI after update
 
 mbv:
 - Enable SPL and binman
 - Small platform changes
 
 zynqmp-nand:
 - Error out in case of unsupported SW ECC
 - Clean error path
 
 versal-net:
 - Support multiple locations for variables
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCZhaRdgAKCRDKSWXLKUoM
 IS6LAKCdXJaEtlNLSC5IxeRJGmSTN4xPsACfdVL3mMzOZ1gw2+17uW1kHzzOgM4=
 =vDHW
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2024.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2024.07-rc1

xilinx:
- Do not call env_get_location when !ENV_IS_NOWHERE
- Add FDT_FIXUP_PARTITIONS support
- Fix legacy format MAC decoding

zynqmp:
- Enable semihosting SPL support
- DT updates
- Kconfig resort/cleanup
- Don't describe second image/capsule if !SPL
- Add support for dfu/capsule description via MTD
- Support JTAG as alternative boot mode
- Add support for TEG soc variant

zynqmp-kria:
- Wire usb4 boot device
- Update SDIO tristate pin configuration
- Disable SPI_FLASH_BAR to avoid issue with SPI after update

mbv:
- Enable SPL and binman
- Small platform changes

zynqmp-nand:
- Error out in case of unsupported SW ECC
- Clean error path

versal-net:
- Support multiple locations for variables
2024-04-10 11:51:58 -06:00
Petr Zejdl
f03f962c60 xilinx: common: Fix MAC address read from EEPROM
The upper-to-lowercase character conversion now avoids altering the
MAC address field. In the previous version, this alteration corrupted
the MAC address.

Signed-off-by: Petr Zejdl <petr.zejdl@cern.ch>
Link: https://lore.kernel.org/r/20240404114422.2905194-1-petr.zejdl@cern.ch
Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-04-10 15:16:57 +02:00
Heinrich Schuchardt
3fe5a37f32 riscv: starfive: avoid including common.h
The usage of common.h is deprecated. Remove it from board files.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09 11:30:37 +08:00
Heinrich Schuchardt
92db23f766 board: starfive: support Milk-V Mars board
The differences between the Milk-V Mars board and the VisionFive 2 board
are small enough that we can support both using the same U-Boot build.

* The model and compatible property are taken from proposed Linux patches.
* The EEPROM is atmel,24c02 according to the vendor U-Boot.
* The second Ethernet port is not available.

usb@10100000 does not exist in U-Boot yet. So we don't have to reflect
differences in usage here.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09 11:30:37 +08:00
Heinrich Schuchardt
0a8b83fb30 riscv: set fdtfile on Milk-V Mars
Set environment variable fdtfile to the correct value for the Milk-V Mars
board.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09 11:30:37 +08:00
Heinrich Schuchardt
90e9dcd709 eeprom: starfive: function get_product_id_from_eeprom()
Export a function get_product_id_from_eeprom() to read the product ID.
This value can be used for fixing up the device-tree on JH7110 based
products.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09 11:30:37 +08:00
Heinrich Schuchardt
0f6310c7ff riscv: do not set default fdt for VisionFive 2
Currently in set_fdtfile() we set the value of environment variable fdtfile
unconditionally. The implies that a value in the environment will be
ignored.

With the patch environment variable fdtfile will only be set if it does not
yet exist. This requires that CONFIG_DEFAULT_FDT_FILE is not set.

Now the user can either set and save fdtfile interactively or in the U-Boot
configuration to overrule the device-tree name chosen based on the
hardware in set_fdtfile().

Reported-by: E Shattow <lucent@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09 11:30:37 +08:00
Łukasz Stelmach
c532ddded9 riscv: Move virtio scan to board_late_init()
When virtio_init() gets called from board_init() PCI isn't ready. Thus,
virtio-over-PCI (e.g. network interfaces) devices can't be detected and
used without additional `virtio scan` scan in the shell or a script.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09 11:30:24 +08:00
Kongyang Liu
ae800aa79a riscv: cpu: cv1800b: Add support for cv1800b SoC
Add Sophgo cv1800b SoC to support RISC-V arch.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09 11:30:02 +08:00
Tom Rini
9cba29b19f Merge tag 'u-boot-imx-master-20240405' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/20228

- Convert imx8mp-beacon and verdin-imx8mm/verdin-imx8mp to OF_UPSTREAM.
- Enable PCIe NVMe support on imx8mp_beacon.
- Fix Ethernet and board detection on mx6cuboxi.
- Fix signature_block_hdr struct fields.
- Fix imx9_probe_mu prototype and make it to get called in
  EVT_DM_POST_INIT_R.
- Test whether ethernet node is enabled before reading MAC EEPROM on
  DHSOM SoMs.
2024-04-05 17:23:58 -04:00
Tom Rini
0465f8d689 - jethubj100: fix config, MAINTAINERS & update docs
- Switch GXL, GXM, AXG, G12A, G12B & SM1 to using upstream DT
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmYO2kwACgkQd9zb2sjI
 SdG9Og/+N/clBq7jyyLWBZrqmMrFWvLcSeZ/3pK/Suzz32kkFl6l1snl4IxeSctT
 3wnhmy/mMPdZay7R09n1nkGxB+J13zRwW3+uMZ5+DKgltbsZrXL+tzpYIuxrwia3
 gNuyjQjakBAtJe3NbA3kKXRrZwuVTK7EMY0fVSBTba6QdsItxFvFkzpRWFCZarMx
 +IWiafT6QeTw1l0i5hEcQlwY54SnccC2fUC6VbdylrUX7wLLbT+RC/Ern/ilahT2
 1pMzDe8PABWx7mpHtESuz7nL8/zZLbWDcmgP40vPDZmhnYr7KDx6f+0f8oicFFox
 6eaeD6l1vWKN3aSLSh6snKI2wkFJDaDAxnjPUOT4VNYG0vEu0CNJZMvw8ahZasDw
 3VrgpSomRO8PE8+plFwyPJgJpwVLqGj/lAfKLLLE8tcUF5P7pbN5You5bGGyPUqw
 6GWTCS2psqNOpmI6zrAppBfw538tkldIAoH+ESsOZ3U9RxCPz6yYQxtKR8OUiHq0
 PHpk3J7Y+SxRlvhQiV7tKKWt6+64yeNhhtEM7wnisHNCukgdG9vGTZNHwW19VLCt
 DxWeznR83IeLa80+IjB/b1UYx3AQAd3NRIWidn1FTXaLGK41c5YHrhG4jdDlCryy
 7xwjELjER9oeoWF0NTY2gx9Smagdy/KJxAQ2PAavQHkPvqJUGg4=
 =Mldi
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-20240404' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- jethubj100: fix config, MAINTAINERS & update docs
- Switch GXL, GXM, AXG, G12A, G12B & SM1 to using upstream DT
2024-04-05 17:22:28 -04:00
Marcel Ziswiler
23fe2def1e verdin-imx8mm/verdin-imx8mp: move imx verdins to OF_UPSTREAM
Move verdin-imx8mm and verdin-imx8mp to OF_UPSTREAM:
- handle the fact that dtbs now have a 'freescale/' prefix
- imply OF_UPSTREAM
- remove redundant files from arch/arm/dts leaving only the
  *-u-boot.dtsi files
- update MAINTAINERS files

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2024-04-05 09:39:01 -03:00
Ye Li
2513bf3f1b arm: imx9: Correct imx9_probe_mu prototype
Since the event callback imx9_probe_mu is re-defined, update
its prototype.

Signed-off-by: Ye Li <ye.li@nxp.com>
2024-04-05 09:38:30 -03:00
Fabio Estevam
3952365515 mx6cuboxi: Do not print devicetree model
The mx6cuboxi_defconfig target supports several board
variants. All of these variants use the hummingboard devicetree in U-Boot.

Currently, the devicetree model as well as the board variant name
are shown:

...
Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
Board: MX6 Cubox-i
...

Printing the devicetree model that is used internally by U-Boot
may confuse users.

Unselect the CONFIG_DISPLAY_BOARDINFO option so that only the
board name is printed in board_late_init() instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
2024-04-05 09:37:56 -03:00
Marek Vasut
786af90de8 ARM: imx: stm32: Test whether ethernet node is enabled before reading MAC EEPROM on DHSOM
Check whether the ethernet interface is enabled at all before reading
MAC EEPROM. As a cost saving measure, it can happen that the MAC EEPROM
is not populated on SoMs which do not use ethernet.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2024-04-05 09:37:38 -03:00
Viacheslav Bocharov
c687b2c1c9 board: amlogic: jethubj100: update MAINTAINERS
Fix mispell in maintainer name for jethub j100 board files

Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>
Link: https://lore.kernel.org/r/20240227065551.580199-3-adeep@lexina.in
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-04-04 18:48:46 +02:00
Marek Behún
77b0e0c151 arm: mvebu: turris_omnia: Disable Atmel SHA node if not present
If the FEAT_CRYPTO feature bit is present in MCU features, the board
crypto is implemented by MCU and the Atmel SHA chip is not present.
Disable Atmel SHA device-tree node in that case.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-04-04 10:45:27 +02:00
Marek Behún
59840f7b93 arm: mvebu: turris_omnia: Print board ECDSA public key if available
If MCU supports the FEAT_CRYPTO feature, read board ECDSA public key
from MCU and print it.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-04-04 10:45:27 +02:00
Marek Behún
2f1b88affa arm: mvebu: turris_omnia: Implement getting board information from MCU
Implement reading board serial number, first MAC address and board
version from MCU. MCU supports board information if the FEAT_BOARD_INFO
feature bit is set in MCU features.

Prefer getting board information from MCU if supported, fallback to
Atmel SHA chip.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-04-04 10:45:27 +02:00
Marek Behún
ed8d3bd11a arm: mvebu: turris_omnia: Update MCU status and features reading
Refactor MCU status word and MCU firmware features reading to make it
simpler to use.

Try reading 32 bits of features, if that fails, read 16 bits. Older MCU
firmware supports only 16-bit wide features, and if more bytes are read,
either 0xff is sent or I2C transaction fails. Handle both cases.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-04-04 10:45:27 +02:00
Marek Behún
8983f0a516 arm: mvebu: turris_{omnia, mox}: Don't print model two times
Since commit 8cd4bf7dc9 ("turris: Use checkboard() instead of
show_board_info()") the model is show two times during boot:
  Model: Turris Omnia
  Model: Turris Omnia

This is because the common function show_board_info() shows it, and
Turris' checkboard() also does.

Remove the second print.

Fixes: 8cd4bf7dc9 ("turris: Use checkboard() instead of show_board_info()")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-04-04 10:45:27 +02:00
Marek Behún
b555148fdd arm: mvebu: turris_omnia: Add header containing MCU command interface and use it
Add header containing all MCU command definitions and use it in board
code and in MCU driver.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-04-04 10:45:27 +02:00
James Hilliard
6c4a739807 xilinx: zynq: add FDT_FIXUP_PARTITIONS support
There are situations where we may want to let U-Boot modify the FDT
nand partitions for the kernel, such as when supporting multiple
sizes of NAND chips.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Link: https://lore.kernel.org/r/20240331232859.727769-1-james.hilliard1@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-04-03 15:28:11 +02:00
Tom Rini
cdfcc37428 Merge tag 'u-boot-dfu-next-20240402' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-next-20240402

- Implement Qualcomm wrapper for dwc3
- Multiple sector size support for UMS
- CDC ACM gadget initialization fix
- Refactor board code from dwc3 to prepare better interrupt support
- Bugfix for for qcom-smmu when compiling with -DDEBUG
2024-04-02 22:37:23 -04:00
Michal Simek
c01f594995 arm64: zynqmp: Add MTD partition handling for dfu_alt_info generation
Generate dfu_alt_info generation based on information from MTD partitions.
mtd_found_part() is trying to identify MTD partition which code is running
from. If partitions are not defined and location is not found it is going
to previous behavior.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/db58d9f3fc142004d833bb115bfba0e26d660b66.1711109356.git.michal.simek@amd.com
2024-04-02 15:08:21 +02:00
Michal Simek
65d958d4ab arm64: zynqmp: Generate desc when SPL_FS_LOAD_PAYLOAD_NAME is valid
Generate description only when CONFIG_SPL_FS_LOAD_PAYLOAD_NAME is not
empty. When name is empty there is no reason to generate description for
it because it is not aligned with dfu rules.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/4cec866f5fffa742258c65796371d7bfc6068915.1711109356.git.michal.simek@amd.com
2024-04-02 15:08:21 +02:00
Michal Simek
097ccdf962 xilinx: Do not call private env_get_location() when !ENV_IS_NOWHERE
Private function for finding out location of environment is not working
when ENV_IS_NOWHERE is disabled.
The reason is that current fallback is ENVL_UNKNOWN when
CONFIG_ENV_IS_NOWHERE is not enabled. The code could be updated like this

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

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

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/830b9c93d30688cfa8a5cbb0388e79deb7731f29.1711107795.git.michal.simek@amd.com
2024-04-02 15:07:22 +02:00
Tom Rini
d312d9831f Merge branch 'next'
Merge in all changes from the next branch now that the release is out.
2024-04-02 07:03:25 -04:00
Marek Vasut
4d15898089 usb: udc: dwc3: Fold board dm_usb_gadget_handle_interrupts() into DWC3 gadget
The dm_usb_gadget_handle_interrupts() has no place in board code. Move
this into DWC3 driver. The OMAP implementation is special, add new weak
dwc3_uboot_interrupt_status() function to decide whether DWC3 interrupt
handling should be called, and override it in OMAP DWC3 code, to repair
the special OMAP interrupt handling code until OMAP gets switched over
to DM UDC proper.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3
Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # qcom sdm845
Link: https://lore.kernel.org/r/20240317044357.547037-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-04-02 09:08:07 +02:00
Lukasz Majewski
7e1b8d8f1e arm: xea: Add support for reading SoM (CPU) board HW revision
The XEA board now has several HW revisions for SoM boards.
This patch provides support for reading this revision ID values in early
u-boot proper as production devices boot via falcon boot with correct DTB
flashed at production (so there is no need to alter SPL).

Additionally, the maximal SPL size (~55KiB) constraint is not allowing
having even simplified FIT support in it.

As a result it was necessary to handle reading GPIOs values solely in
u-boot proper as one configuration (i.e. 'single binary' -
imx28_xea_sb_defconfig) is not using SPL framework.

Moreover, the 'board_som_rev' environment variable will be used to point
correct configuration from the Linux FIT file.

Additionally, as now XEA has its second HW revision - this information is
printed when u-boot proper starts.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-03-30 15:12:18 -03:00
Lukasz Majewski
3603e64003 arm: spl: Add definition for PHY reset GPIO for XEA HW rev. 2
The imx287 based XEA board's revision 2 uses GPIO_3_21 for PHY reset

It is safe to keep the GPIO_2_13 as well, as in the SPL SPI1 is not
used for transmission. This simplifies the code, as the proper
configuration is performed either in falcon boot's read DTB or in
u-boot proper (with correct FIT configuration chosen).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-03-30 15:12:13 -03:00
Lukasz Majewski
5bc7bc60e9 arm: spl: xea: Remove I2S pins configuration from early initialization
XEA is not supporting and using I2S codec, so there is no need to
configure pins for it.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-03-30 15:12:09 -03:00
Fabio Estevam
13cca97251 imx8mq_evk: Remove FEC and Ethernet PHY board code
With Ethernet DM in place, there is no longer the need for having
the board_phy_config() and setup_fec() functions anymore.

Remove them.

Successfully tested a TFTP transfer after these changes.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2024-03-30 15:12:05 -03:00
Hiago De Franco
a7fdca901f board: toradex: colibri-imx8x: Remove board_gpio_init
On Colibri iMX8X, the gpio initialization and usage should be handled by
the device tree, not by the colibri-imx8x.c code. Therefore, remove it.

Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
2024-03-30 13:58:29 -03:00
Fabio Estevam
f8b874f542 imx8: Add a default reset_cpu() implementation
Add a weak default reset_cpu() implementation just like
it is done on arch/arm/mach-imx/cpu.c.

This allows the removal of the empty reset_cpu() in several
board files.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Toradex Colibri iMX8X
2024-03-30 13:57:14 -03:00
Fabio Estevam
e7b5250612 mx6cuboxi: Fix board revision detection
Currently, an i.MX6 Cuboxi board is incorrectly detected
as the HummingBoard model:

U-Boot 2024.04-rc5 (Mar 26 2024 - 15:59:22 +0100)

CPU:   Freescale i.MX6Q rev1.3 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 26C
Reset cause: POR
Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
gpio@20a4000: set_dir_flags: error: gpio GPIO3_8 not reserved
gpio@20a4000: get_value: error: gpio GPIO3_8 not reserved
gpio@20a8000: set_dir_flags: error: gpio GPIO4_4 not reserved
gpio@20a8000: get_value: error: gpio GPIO4_4 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_9 not reserved
gpio@20b0000: get_value: error: gpio GPIO6_9 not reserved
Board: MX6 HummingBoard
DRAM:  2 GiB
...

This error happens because request_detect_gpios() uses the GPIO DM
API, but board_type() still uses the legacy non-DM GPIO API.

Fix it by using the GPIO DM API in board_type() to read the
board revision pins in SPL.

Reported-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
2024-03-30 09:49:12 -03:00
Tom Rini
6e2228fb05 Merge patch series "Clean up arm linker scripts"
Ilias Apalodimas <ilias.apalodimas@linaro.org> says:

The arm linker scripts had a mix of symbols and C defined variables in an
effort to emit relative references instead of absolute ones e.g [0]. A
linker bug prevented us from doing so [1] -- fixed since 2016.
This has led to confusion over the years, ending up with mixed section
definitions. Some sections are defined with overlays and different
definitions between v7 and v8 architectures.
For example __efi_runtime_rel_start/end is defined as a linker symbol for
armv8 and a C variable in armv7.

Linker scripts nowadays can emit relative references, as long as the symbol
definition is contained within the section definition. So let's switch most
of the C defined variables and clean up the arm sections.c file.
There's still a few symbols remaining -- __secure_start/end,
__secure_stack_start/end and __end which can be cleaned up
in a followup series.

For both QEMU v7/v8 bloat-o-meter shows now size difference
$~ ./scripts/bloat-o-meter u-boot u-boot.new
add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0)
Function                                     old     new   delta
Total: Before=798861, After=798861, chg +0.00%

The symbols seem largely unchanged apart from a difference in .bss
as well as the emited sections and object types of the affected variables.

On the output below the first value is from -next and the second comes from
-next + this patchset. The .bss_start/end sections have disappeared from
the newer binaries.

# For example on QEMU v8:
efi_runtime_start
  7945: 0000000000000178     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_start
  7942: 0000000000000178     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_start
efi_runtime_stop
  9050: 0000000000000d38     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_stop
  9047: 0000000000000d38     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_stop
__efi_runtime_rel_start
  7172: 00000000000dc2f0     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_start
  7169: 00000000000dc2f0     0 NOTYPE  GLOBAL DEFAULT   10 __efi_runtime_rel_start
__efi_runtime_rel_stop
  7954: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
  7951: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
__rel_dyn_start
  7030: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   11 __rel_dyn_start
  7027: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   11 __rel_dyn_start
__rel_dyn_end
  8959: 0000000000102b10     0 OBJECT  GLOBAL DEFAULT   12 __rel_dyn_end
  8956: 0000000000102b10     0 NOTYPE  GLOBAL DEFAULT   11 __rel_dyn_end
image_copy_start
  9051: 0000000000000000     0 OBJECT  GLOBAL DEFAULT    1 __image_copy_start
  9048: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 __image_copy_start
image_copy_end
  7467: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   11 __image_copy_end
  7464: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   11 __image_copy_end
bss_start
    12: 0000000000102b10     0 SECTION LOCAL  DEFAULT   12 .bss_start
  8087: 0000000000000018     0 NOTYPE  GLOBAL DEFAULT    1 _bss_start_ofs
  8375: 0000000000102b10     0 OBJECT  GLOBAL DEFAULT   12 __bss_start
  8084: 0000000000000018     0 NOTYPE  GLOBAL DEFAULT    1 _bss_start_ofs
  8372: 0000000000102b10     0 NOTYPE  GLOBAL DEFAULT   12 __bss_start
bss_end
    14: 000000000010bc30     0 SECTION LOCAL  DEFAULT   14 .bss_end
  7683: 000000000010bc30     0 OBJECT  GLOBAL DEFAULT   14 __bss_end
  8479: 0000000000000020     0 NOTYPE  GLOBAL DEFAULT    1 _bss_end_ofs
  7680: 000000000010bbb0     0 NOTYPE  GLOBAL DEFAULT   12 __bss_end
  8476: 0000000000000020     0 NOTYPE  GLOBAL DEFAULT    1 _bss_end_ofs

# For QEMU v7:
efi_runtime_start
 10703: 000003bc     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_start
 10699: 000003c0     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_start
efi_runtime_stop
 11796: 000012ec     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_stop
 11792: 000012ec     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_stop
__efi_runtime_rel_start
  9937: 000c40dc     0 OBJECT  GLOBAL DEFAULT    8 __efi_runtime_rel_start
  9935: 000c40dc     0 NOTYPE  GLOBAL DEFAULT    9 __efi_runtime_rel_start
__efi_runtime_rel_stop
 10712: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
 10708: 000c41dc     0 NOTYPE  GLOBAL DEFAULT    9 __efi_runtime_rel_stop
__rel_dyn_start
  9791: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __rel_dyn_start
  9789: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   10 __rel_dyn_start
__rel_dyn_end
 11708: 000da5f4     0 OBJECT  GLOBAL DEFAULT   10 __rel_dyn_end
 11704: 000da5f4     0 NOTYPE  GLOBAL DEFAULT   10 __rel_dyn_end
image_copy_start
   448: 0000177c     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_start_ofs
 11797: 00000000     0 OBJECT  GLOBAL DEFAULT    1 __image_copy_start
   445: 0000177c     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_start_ofs
 11793: 00000000     0 NOTYPE  GLOBAL DEFAULT    1 __image_copy_start
image_copy_end
   450: 00001780     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_end_ofs
 10225: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __image_copy_end
   447: 00001780     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_end_ofs
 10222: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   10 __image_copy_end
bss_start
    11: 000c41dc     0 SECTION LOCAL  DEFAULT   11 .bss_start
 11124: 000c41dc     0 OBJECT  GLOBAL DEFAULT   11 __bss_start
 11120: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   11 __bss_start
bss_end
    13: 000cbbf8     0 SECTION LOCAL  DEFAULT   13 .bss_end
 10442: 000cbbf8     0 OBJECT  GLOBAL DEFAULT   13 __bss_end
 10439: 000cbbf8     0 NOTYPE  GLOBAL DEFAULT   11 __bss_end

It's worth noting that since the efi regions are affected by the change, booting
with EFI is preferable while testing. Booting the kernel only should be enough
since the efi stub and the kernel proper do request boottime and runtime
services respectively.
Something along the lines of
> virtio scan && load virtio 0 $kernel_addr_r Image && bootefi $kernel_addr_r
will work for QEMU aarch64.

Tested platforms:
- QEMU aarch64
- Xilinx kv260 kria starter kit & zynq
- QEMU armv7
- STM32MP157C-DK2

[0] commit 3ebd1cbc49 ("arm: make __bss_start and __bss_end__ compiler-generated")
[1] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")
2024-03-29 10:39:38 -04:00
Ilias Apalodimas
fb5706746b arm: baltos: remove custom linker script
commit 3d74a0977f ("ti: am335x: Remove unused linker script") removed
the linker script for the TI variant. This linker script doesn't seem to
do anything special and on top of that, has no definitions for the EFI
runtime sections.

So let's get rid of it and use the generic linker script which defines
those correctly

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-03-29 10:39:25 -04:00
Tom Rini
ab8d9ca304 Prepare v2024.04-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmYCK3wACgkQFHw5/5Y0
 tyzV9wwAo6JN9dVBBivLFROeDb24t3TmgT7e0AEql6Vjfj1x9xzW/L7ki0cdbGjW
 sNmqPR9ObnONv5hxMV1nlUE6lRYOj/eRaWZsz1N8e02VFhegePNgd/ZDeaPZyO10
 mDhKdGh5yr0AaIer1Yj21b7QKxrriAN9ct/qR4sw2j1AlxF959PSw0qOzb6wjpDp
 I3QCbUkmKt6ATwyYzZnM0mifs0fb1u4M6C91V50SsyBBC30veEL8Bpgd83rTtZl+
 gm1ruekfKXhmT6V92Ok3maFNU+odF6X/R1YcM2n3DTso+MugPHFYTj5VZy5qZN3+
 4x6wHTQLDr81vPz7hx4gDTK42nVplFnIHp8p9WBSH6Zs7gCYPyZAfCPmF4EzBVfo
 bjpixpGuhmM8yQweD5nFWpvnXK/e5nbfxW2vt85G+cjjNbw0OZ182UJH8PEAUam6
 786p5y1YyS9pFgJgLSHrQ041E6EQ4QjMpNbVF+7MUpe49emA0l/V7VLSNGWpeKzg
 tcuO1ycK
 =4m/d
 -----END PGP SIGNATURE-----

Merge tag 'v2024.04-rc5' into next

Prepare v2024.04-rc5
2024-03-25 22:15:47 -04:00
Shubhangi Shrikrushna Mahalle
28d9777f40 arm64: zynqmp: Add bootcmd_usb4 variable
Add "bootcmd_usb4" variable to boot through usb4 device.

Signed-off-by: Shubhangi Shrikrushna Mahalle <shubhangi.shrikrushna-mahalle@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/cb36fe6bd1fef540441e1d8c32636ae6f80357b4.1710933852.git.michal.simek@amd.com
2024-03-25 15:16:12 +01:00
Tom Rini
8ef8dcc54a First set of u-boot-at91 features for the 2024.07 cycle
-----BEGIN PGP SIGNATURE-----
 
 iQFQBAABCgA6FiEEqxhEmNJ6d7ZdeFLIHrMeAg6sL8gFAmX8JnYcHGV1Z2VuLmhy
 aXN0ZXZAY29sbGFib3JhLmNvbQAKCRAesx4CDqwvyFfPB/4g0YTnWiI0ENLumM+Q
 RwcfIZJZ9YS49QPGil04i8+3TKH9b/vJZc6oyeKBQ1ZYis/kgcUHFFeMjZek8Ou5
 yKd/zj861sRmRSBPD5WCSPx4YX1V6xln64vlYTvjeWs1auRuj16sPOcacxlpR6J/
 p95DMt0EF5kUzCPD1WbZC6fIMhyXJT7OD1NiIJXCQT6w1hnkS2pC3Y5fiPsyR9yz
 7R7yQ+hJyWBp/KsYNcgDpINSQqDSis5dd4RD/2felQ6kKGvZfuDW5pK2LyL0xAt0
 Q+jNoaMw8nJQ/RxH7WbbVd0lKX0S94t/PRlCLVQkZRoWsioQ9puT38ToKTRq3yvS
 2Omr
 =GQJV
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-at91-2024.07-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

First set of u-boot-at91 features for the 2024.07 cycle:
- This feature set includes a new board named sama7g54 Curiosity.
2024-03-25 08:19:04 -04:00
Neil Armstrong
d54f87f09a board: amlogic: fix buffler overflow in seria, mac & usid read
While meson_sm_read_efuse() doesn't overflow, the string is not
zero terminated and env_set*() will buffer overflow and add random
characters to environment.

Acked-by: Viacheslav Bocharov <adeep@lexina.in>
Link: https://lore.kernel.org/r/20240320-u-boot-fix-p200-serial-v2-1-972be646a301@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-25 09:16:19 +01:00
Christian Hewitt
65d5c367b0 board: amlogic: add meson_generate_serial_ethaddr fallback to p200
Add a fall-back method to generate ethaddr from CPU serial on p200 boards
if the MAC cannot be read from efuse. This prevents random MAC addresses
on the WeTek Hub/Play2 boards.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20240324151905.3817732-3-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-03-25 09:14:36 +01:00
Yannic Moog
9d27e441bb board: phytec: phycore_imx8mp.env fix netboot issues
The "run netargs" command should come later in the "netboot" command
order when using dhcp since it sets the server and client ip addresses.
The previous order led to misconfigured kernel boot params and thus
kernel panic when serverip was not manually set.
Further, following Linux FHS 3.0, change the nfsroot default directory
to /srv/nfs.

Fixes: 60f64bec41 ("board: phytec: phycore_imx8mp: Add fec support")
Signed-off-by: Yannic Moog <y.moog@phytec.de>
2024-03-24 13:42:10 -03:00
Michal Simek
3d3cb2857e arm64: zynqmp: Do not describe u-boot.itb if SPL is disabled
There is no reason to describe u-boot.itb on system without SPL. Pretty
much this is cover all systems which are using only boot.bin which contains
all images inside.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/561f9d0ee96ebb6cd674042f269f280ab68fbbac.1708705118.git.michal.simek@amd.com
2024-03-22 12:55:52 +01:00
Venkatesh Yadav Abbarapu
8da257f4da xilinx: versal-net: Add support for saving env based on bootmode
Enable saving variables to MMC(FAT) and SPI based on primary
bootmode. If bootmode is JTAG, dont save env anywhere(NOWHERE).

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

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240312113421.7394-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-03-22 12:41:31 +01:00