Commit graph

86834 commits

Author SHA1 Message Date
Eugen Hristev
6832810814 configs: rock5b-rk3588: add PCI drivers and command
Add drivers for PCIe , phy, and command.

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-18 08:44:04 +08:00
Christopher Obbard
bfbef68ae1 ARM: dts: rockchip: rock5b: enable pcie2x1l2 and associated combphy
Enable the PCIe 2x1l 2 device and associated combphy.
On this bus, the Rock5B has an Ethernet transceiver connected.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
[eugen.hristev@collabora.com: minor tweaks]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
[jonas@kwiboo.se: add PCIe pins]
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-18 08:44:04 +08:00
Joseph Chen
ec8242cceb ARM: dts: rockchip: rk3588s-u-boot: add pcie2x1l2 with PHY
Add the node for PCIe 2x1l 2 device together with the corresponding
combphy.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
[eugen.hristev@collabora.com: moved to -u-boot.dtsi, minor
adaptations]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
[jonas@kwiboo.se: adapt to kernel node]
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-18 08:44:04 +08:00
Jonas Karlman
5713135ecc rockchip: rockpro64: Build u-boot-rockchip-spi.bin
Enable CONFIG_ROCKCHIP_SPI_IMAGE to build u-boot-rockchip-spi.bin.
Define CONFIG_SYS_SPI_U_BOOT_OFFS to write u-boot.itb at the expected
offset. Enable CONFIG_LTO to reduce size of SPL so that the mkimage
output fit before the 0x60000 offset in u-boot-rockchip-spi.bin.

  => sf probe
  SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
  => load mmc 1:1 10000000 u-boot-rockchip-spi.bin
  1442304 bytes read in 27 ms (50.9 MiB/s)
  => sf update $fileaddr 0 $filesize
  device 0 offset 0x0, size 0x160200
  1421824 bytes written, 20480 bytes skipped in 9.501s, speed 155432 B/s

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-18 08:44:04 +08:00
Jonas Karlman
6e2b8344d6 rockchip: rock-pi-4: Use SDMA to boost eMMC performance
Enable the use of SDMA mode to boost eMMC performance on ROCK Pi 4.
Also add missing flags to indicate the supported MMC modes.

Using mmc read command to read 32 MiB data shows following improvement:

  => time mmc read 10000000 2000 10000

Before: time: 3.178 seconds
After: time: 0.402 seconds

This also enables CONFIG_SPL_FIT_SIGNATURE option to help discover
any possible future issue with loading TF-A into DRAM/SRAM.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-18 08:44:04 +08:00
Jonas Karlman
cf777572ca rockchip: rockpro64: Use SDMA to boost eMMC performance
Enable the use of SDMA mode to boost eMMC performance on RockPro64.
Also add missing flags to indicate the supported MMC modes.

Using mmc read command to read 32 MiB data shows following improvement:

  => time mmc read 10000000 2000 10000

Before: time: 3.178 seconds
After: time: 0.402 seconds

This also enables CONFIG_SPL_FIT_SIGNATURE option to help discover
any possible future issue with loading TF-A into DRAM/SRAM.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-18 08:34:45 +08:00
Jonas Karlman
3b804b370d mmc: rockchip_sdhci: Disable DMA mode using a device tree property
Loading part of TF-A into SRAM from eMMC using DMA fails on RK3399
similar to other Rockchip SoCs. Checksum validation fails with:

  ## Checking hash(es) for Image atf-2 ... sha256 error!
  Bad hash value for 'hash' hash node in 'atf-2' image node
  spl_load_simple_fit: can't load image loadables index 1 (ret = -1)
  mmc_load_image_raw_sector: mmc block read error
  SPL: failed to boot from all boot devices
  ### ERROR ### Please RESET the board ###

Add a device tree property, u-boot,spl-fifo-mode, to control when the
rockchip_sdhci driver should disable the use of DMA and fallback on PIO
mode. Same device tree property is used by the rockchip_dw_mmc driver.

In commit 2cc6cde647 ("mmc: rockchip_sdhci: Limit number of blocks
read in a single command") the DMA mode was disabled using a CONFIG
option on RK3588. Revert that and instead disable DMA using the device
tree property for all RK3588 boards, also apply similar workaround for
all RK3399 boards.

Fixes: 2cc6cde647 ("mmc: rockchip_sdhci: Limit number of blocks read in a single command")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Quentin Schulz <foss+uboot@0leil.net> # RK3399 Puma, RK3588 Tiger
2023-05-18 08:34:45 +08:00
Jonas Karlman
41fc80b8da mmc: rockchip_sdhci: Skip blocks read workaround on RK3399
The workaround to limit number of blocks to read in a single command
should only be applied to RK3568 and RK3588. Change to be more strict
when to apply the workaround.

Fixes: 2cc6cde647 ("mmc: rockchip_sdhci: Limit number of blocks read in a single command")
Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Quentin Schulz <foss+uboot@0leil.net> # RK3399 Puma, RK3588 Tiger
2023-05-18 08:34:45 +08:00
Jon Lin
c5b4a012bc phy: rockchip: naneng-combphy: Support rk3588
Add support for rk3588 phy variant.
The PHY clock is fixed at 100MHz.

Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
[kever.yang@rock-chips.com: update pcie pll parameters]
Co-developed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
[eugen.hristev@collabora.com: squashed, tidy up]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-17 17:36:18 +08:00
Eugen Hristev
d49dc884cb phy: rockchip: naneng-combphy: Add support for multiple resets
Some variants of the PHY have more than just one reset.
To cover all cases, request the rests in bulk rather than just
the reset at index 0.

Co-developed-by: Ren Jianing <jianing.ren@rock-chips.com>
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-17 17:36:18 +08:00
Jon Lin
014a31907a pci: pcie_dw_rockchip: Support max_link_speed dts property
Add support for max_link_speed specified in the PCI DT binding.

Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
[eugen.hristev@collabora.com: port to latest API, set default correctly,
align to 80 chars]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
[jonas@kwiboo.se: switch to dev_read_u32_default]
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-17 17:36:18 +08:00
Jon Lin
5374480395 pci: pcie_dw_rockchip: Add rk3588 compatible
Add compatible for RK3588 SoC.

Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-17 17:36:18 +08:00
Eugen Hristev
bb52f1c604 reset: rockchip: implement rk3588 lookup table
The current DT bindings for the rk3588 clock use a different ID than the
one that is supposed to be written to the hardware registers.
Thus, we cannot use directly the id provided in the phandle, but rather
use a lookup table to correctly setup the hardware.

This approach has been implemented already in Linux, by commit :
f1c506d152ff ("clk: rockchip: add clock controller for the RK3588")

Hence, implement a similar approach using the lookup table, and adapt
the existing reset driver to work with SoCs using lookup table.
The file rst-rk3588.c has been copied as much as possible from Linux.

Adapt the clk rk3588 driver as well to bind the reset driver with the
lookup table.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
2023-05-17 17:36:18 +08:00
Eugen Hristev
6891bdf711 configs: rockchip: rock5b-rk3588: add pinctrl to SPL
Add pinctrl driver in SPL. Do not remove pinctrl properties for SPL dtb.

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-17 17:36:18 +08:00
Eugen Hristev
cec4f82f11 ARM: dts: rk3588-rock-5b-u-boot: add bootph-all to pinctrl for sdmmc
To be able to initialize the pinctrl correctly at SPL level and read
u-boot proper from SD-Card, the pinctrl must be initialized.

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-05-17 17:36:18 +08:00
Jonas Karlman
e74ac44f79 phy: Keep balance of counts when ops is missing
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Fixes: 226fce6108 ("phy: Track power-on and init counts in uclass")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-05-17 17:36:18 +08:00
Eugen Hristev
cdf9010f6e phy: rockchip-inno-usb2: add initial support for rk3588 PHY
Add initial support for the rk3588 PHY variant.
The lookup for the host-port reg inside the struct now does a do {} while()
instead of a while() {} in order to allow a first check for reg == 0.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Co-developed-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
2023-05-17 17:36:18 +08:00
Eugen Hristev
b59e031a7d phy: remove phy-supply related code
phy-supply is now handled at uclass level. Remove it from the drivers that
implement it at the driver level.

Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
2023-05-17 17:36:18 +08:00
Eugen Hristev
c57e0dcd93 phy: add support for phy-supply
Some phys require a phy-supply property that is a phandle to a regulator
that needs to be enabled for phy operations.
Implement basic supply lookup, enable and disabling, if DM_REGULATOR is
available.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
[jonas@kwiboo.se:
use regulator_set_enable_if_allowed and disable if power_on ops fails]
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
2023-05-17 17:36:18 +08:00
Eugen Hristev
adef6ebc06 configs: rockchip: rock5b-rk3588: enable USB and regulators
Enable USB command, USB drivers, PHY and regulators, for USB host
operations.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
2023-05-17 17:36:14 +08:00
Eugen Hristev
9ceef3d9a7 ARM: dts: rockchip: rk3588-rock-5b-u-boot: add USB 2.0 host
Add USB 2.0 host nodes and PHYs.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Co-developed-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
2023-05-17 09:53:32 +08:00
Tom Rini
f0e201433a Merge branch 'next_gpio' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
- gpio: renesas: Simplify .request/.rfree callbacks
2023-05-16 20:24:44 -04:00
Tom Rini
f9c58e0f1a Merge branch '2023-05-16-remove-misuse-of-env-is-nowhere' into next
To quote the author:

When using a list of writeable variables, the initial values come from
the built-in default environment since commit 5ab8105836
("env: Complete generic support for writable list"). Remove unnecessary
misuse of the env is nowhere driver as default environment.
2023-05-16 20:24:21 -04:00
Marek Vasut
da83ada02a usb: gadget: Add and use matching SPL USB ethernet gadget Kconfig symbols
Define SPL_USB_ETH_RNDIS symbol to make it possible to select USB
gadget ethernet support in SPL and U-Boot separately in Kconfig .
Make use of the new symbols in gadget Makefile and move the rndis.o
just below the now merged USB_ETHER symbol in Makefile.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-17 01:51:39 +02:00
Marek Vasut
0007fb2ff7 usb: Move SPL_USB_GADGET and related Kconfig symbols to drivers/usb/
To avoid piling up all the various Kconfig symbols in one place, i.e.
common/spl/Kconfig, move the USB Kconfig symbols into drivers/usb/ .
This commit moves SPL_USB_GADGET and related symbols. Fix typo and
rename SPL_USB_GADGET to "USB Gadget Support in SPL" .

Update the gadget Makefile to match the symbol changes.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-17 01:51:39 +02:00
Marek Vasut
6308731648 usb: Move SPL_USB_STORAGE Kconfig symbol to drivers/usb/
To avoid piling up all the various Kconfig symbols in one place, i.e.
common/spl/Kconfig, move the USB Kconfig symbols into drivers/usb/ .
This commit moves SPL_USB_STORAGE and matching SYS_USB_FAT_BOOT_PARTITION .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-17 01:51:39 +02:00
Marek Vasut
df104411d1 usb: Move SPL_USB_HOST Kconfig symbol to drivers/usb/
To avoid piling up all the various Kconfig symbols in one place, i.e.
common/spl/Kconfig, move the USB Kconfig symbols into drivers/usb/ .
This commit moves SPL_USB_HOST and updates help text of both USB_HOST
and SPL_USB_HOST .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-17 01:51:39 +02:00
Pali Rohár
a74931a945 gpio: renesas: Simplify .request/.rfree callbacks
Remove identify wrapper functions.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
2023-05-16 22:24:24 +02:00
Stefan Herbrechtsmeier
8344162ea8 env: Remove misuse of env is nowhere leftover
When using a list of writeable variables, the initial values come from
the built-in default environment since commit 5ab8105836
("env: Complete generic support for writable list"). Remove leftover of
misuse of the env is nowhere driver as default environment.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2023-05-16 16:12:21 -04:00
Stefan Herbrechtsmeier
35a6fdc58d powerpc/mpc85xx: socrates: Remove misuse of env is nowhere driver
When using a list of writeable variables, the initial values come from
the built-in default environment since commit 5ab8105836
("env: Complete generic support for writable list"). Remove unnecessary
misuse of the env is nowhere driver as default environment.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2023-05-16 16:12:21 -04:00
Stefan Herbrechtsmeier
b16fd7f75f imx6q: acc: Remove misuse of env is nowhere driver
When using a list of writeable variables, the initial values come from
the built-in default environment since commit 5ab8105836
("env: Complete generic support for writable list"). Remove unnecessary
misuse of the env is nowhere driver as default environment.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2023-05-16 16:12:21 -04:00
Stefan Herbrechtsmeier
78b54e323f imx6: aristainetos: Remove misuse of env is nowhere driver
When using a list of writeable variables, the initial values come from
the built-in default environment since commit 5ab8105836
("env: Complete generic support for writable list"). Remove unnecessary
misuse of the env is nowhere driver as default environment.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2023-05-16 16:12:21 -04:00
Tom Rini
6e1852ca2c Pull request efi-2023-07-rc3
Documentation:
 
 * update the description of signature algorithms
 
 UEFI:
 
 * fix unaligned access to GUID in HII database protocol
 * fix launching EFI binaries loaded via semihosting
 * fix filling of file path in loaded image protocol for non-block devices
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmRjIuIACgkQxIHbvCwF
 GsQsZQ/9HijBls1e0WV58F01w3ky0NQoJRVi0ujMEzQuPBkJX1i718f1O+QxJF43
 dpHNiPkXvC9PHDHxBevyC0x0ptsqeNB5Tg5gpl3/M1Ko+23nP4ozhJ6TrtngJ50h
 P9aadOhVAUPH1c4/tIqVFNBI8DrRl8waQ9F8hnycJQ8kw76ye5YBYWwcHKVBwoyc
 1ZIt60M3pBsopQJEVbaoUOc223yYnaV2mLweihndUsRjAI8xO8FNBcyTnDtwazLj
 5F99AnZ1JWH5fYVI+M8ssfMS14SkmdGXH3drbcsQtiUs3k1pFHihBfQdYalfgB/9
 QYsPc7A84Nua+5SajNd6aSFuZCmCXU/4yaAWKIaoKVfGVgsGrRxbqvDuKz3ax4Gb
 jLHWt+mLnk8IrLYNG91QrlA7vUxEcurSUnvq3j69MRUSJWUlDj+bkyGBzWcsdB2K
 niliWo53CFCqRmVL9wf8kLEdaOMV8KJ1V7dxZvbbUa48HccfBXzxbSYnNm1//RYL
 M3jOmBYr0p//I6vLk2P8NWpPqyJUPgrcCHF7RGS8axfa24HMhj2ECJMiXlO8beUx
 CeVov+8GhuRKAcUyf6NaUcbQhyHCk5szEbBKqlH4rwLyuuumOdyB+4SP/WDs7n+x
 +JEqK4m6yfzlkJM9UBHM/yG88DwDhEszk8u22x5/oU9SbYsvTx8=
 =gJu0
 -----END PGP SIGNATURE-----

Merge tag 'efi-2023-07-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2023-07-rc3

Documentation:

* update the description of signature algorithms

UEFI:

* fix unaligned access to GUID in HII database protocol
* fix launching EFI binaries loaded via semihosting
* fix filling of file path in loaded image protocol for non-block devices
2023-05-16 11:23:30 -04:00
Tom Rini
5645a50a86 Merge branch '2023-05-15-assorted-bugfixes'
- Merge in a long-standing fix for some exynos platforms, correct a
  Kconfig description, fix some env issues, fix an issue in
  devfdt_get_addr_size_index_ptr and look for "panel-timings" not
  "panel-timing" per upstream binding.
2023-05-16 11:16:42 -04:00
Tom Rini
c21fc9e152 Xilinx changes for v2023.07-rc3
.mailmap
 - Fix Xilinx IDs
 
 ZynqMP:
 - Fix R5 split boot mode
 - DT fixes - sync with Linux
 
 Xilinx:
 - Enable virtio and RNG support
 - Enable ADI ethernet phy
 
 SPI/Zynq:
 - Fix dummy byte calculation
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCZGM+/gAKCRDKSWXLKUoM
 Id6XAKCEfBfLOxuya8r8jdh8N5QCjTj0FACfXAZQYVX67bUr00PHRlHmSppV65Q=
 =Thv+
 -----END PGP SIGNATURE-----

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

Xilinx changes for v2023.07-rc3

.mailmap
- Fix Xilinx IDs

ZynqMP:
- Fix R5 split boot mode
- DT fixes - sync with Linux

Xilinx:
- Enable virtio and RNG support
- Enable ADI ethernet phy

SPI/Zynq:
- Fix dummy byte calculation
2023-05-16 09:10:57 -04:00
Manorit Chawdhry
6d677ea8ec environment: ti: rproc: fix remoteproc environment variables
During refactor this seemed to have been missed.

Fixes: 65dbb128fb ("include: environment: ti: Use .env for environment variables")

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-05-15 17:14:46 -04:00
Johan Jonker
58f4bb833b core: fdtaddr: use map_sysmem() as cast for the return (part 2)
For the devfdt_get_addr_size_index_ptr() function use
map_sysmem() function as cast for the return for use in
sandbox.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2023-05-15 17:14:46 -04:00
Raphael Gallais-Pou
cd88058da3 drivers: core: ofnode: fix typo in panel timing decode
In case where a single timing resolution is implemented in the
device-tree, the property is named "panel-timing", as specify
in Linux kernel binding file:

Documentation/devicetree/bindings/display/panel/panel-common.yaml

  # Display Timings
  panel-timing:
    description:
      Most display panels are restricted to a single resolution and
      require specific display timings. The panel-timing subnode expresses those
      timings.
    $ref: panel-timing.yaml#

  display-timings:
    description:
      Some display panels support several resolutions with different timings.
      The display-timings bindings supports specifying several timings and
      optionally specifying which is the native mode.
    $ref: display-timings.yaml#

Fixes: 0347cc7732 ("drivers: core: ofnode: Add panel timing decode.")
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-05-15 17:14:46 -04:00
Christophe Leroy
40b77f2a3a envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in
After converting my targets from CFG_EXTRA_ENV_SETTINGS to
CONFIG_EXTRA_ENV_TEXT as suggested by Tom, I discovered that
fw_setenv doesn't set the entire defaut environment anymore.

I tried to fix it with the below patch, but it fails qemu-x86 CI test,
see https://source.denx.de/u-boot/custodians/u-boot-mpc8xx/-/pipelines/16326
That's the only CI test that fails AFAICS.

Could you help with a solution ? This needs to be fixed.

Thanks
Christophe

---- >8 ----
From: Christophe Leroy <christophe.leroy@csgroup.eu>
Subject: [RFC PATCH] envtools: Fix default environment

After converting some targets from CFG_EXTRA_ENV_SETTINGS to
CONFIG_EXTRA_ENV_TEXT, default environment embedded in
fw_env tool missed all extra settings.

Commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in
a .env file") restricted the inclusion of the content of that
file to builds without USE_HOSTCC.

But as mentionned in commit 79fc0c5f49 ("tools/env: cross-compile
fw_printenv without setting HOSTCC"), HOSTCC and USE_HOSTCC are
kept for code re-use.

Remove the restricting so that settings included in a .env
file are also added to fw_env tool.

Fixes: 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in a .env file")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-15 17:14:46 -04:00
Henrik Grimler
c9901bd2ad samsung: common: do not reset if cros-ec uclass is missing
Otherwise non-ChromeOS samsung devices, like the odroid boards, are
stuck in a bootloop if CONFIG_CROS_EC is not enabled:

    <...>
    MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    cros-ec communications failure -96

    Please reset with Power+Refresh

    Cannot init cros-ec device
    resetting ...

Issue started after commit e44d7e73fe ("dm: core: Switch
uclass_*_device_err to use uclass_*_device_check").

Signed-off-by: Henrik Grimler <henrik@grimler.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2023-05-15 17:14:46 -04:00
Henrik Grimler
7d01ee9d19 Revert "mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B"
This reverts commit a034ec06ff.

Commit 4a3ea75de4 ("Revert "mmc: sdhci: set to INT_DATA_END when
there are data"") reverted the alternative fix that was added for
Exynos 4 devices, causing an error when trying to boot from an sdcard:

    <...>
    Loading Environment from MMC... sdhci_send_command: Timeout for status update!
    mmc fail to send stop cmd
    <...>

Re-add the quirk to allow booting from sdcards again.

Signed-off-by: Henrik Grimler <henrik@grimler.se>
2023-05-15 17:14:46 -04:00
John Keeping
03972ff671 video: tweak CONFIG_SPL_VIDEO description
Make it clear that this is the SPL option to avoid potential confusion
when the description for CONFIG_SPL_VIDEO is the same as that for
CONFIG_VIDEO.

Signed-off-by: John Keeping <john@metanate.com>
2023-05-15 17:14:46 -04:00
Tom Rini
5d0b3dde11 Merge branch '2023-05-15-build-system-updates' into next
- Bring in a few kbuild changes from upstream Linux to fix running the
  checker (make C=1/C=2), and clean up some of the logic related to how
  choose what device trees to build.
2023-05-15 15:26:54 -04:00
Christophe Leroy
6ab7c3d6ba Fix sparse checks processing
A lot of errors are encountered when building with sparse checking
activated (make C=1 or make C=2).

Many of them are fixed in Linux.

Resynchronise Makefile and include/linux/build_bug.h with Linux
kernel sources by porting the following Linux commits into u-boot:
- 6c49f359ca14 ("kbuild: disable sparse warnings about unknown attributes")
- 80591e61a0f7 ("kbuild: tell sparse about the $ARCH")
- 8788994376d8 ("linux/build_bug.h: change type to int")
- 527edbc18a70 ("build_bug.h: remove most of dummy BUILD_BUG_ON stubs for Sparse")
- c60d3b79423a ("build_bug.h: remove negative-array fallback for BUILD_BUG_ON()")
- 14e83077d55f ("include: drop pointless __compiler_offsetof indirection")

Also revert commit aa9e891c63 ("include/linux/stddef.h: avoid
'warning: preprocessor token offsetof redefined'") because the
error it creates is worse than the warning it is trying to fix.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-15 14:08:45 -04:00
Rasmus Villemoes
a0f9a77912 kbuild: Allow DTB overlays to built from .dtso named source files
[Linux commit 363547d2191c]

Currently DTB Overlays (.dtbo) are build from source files with the same
extension (.dts) as the base DTs (.dtb). This may become confusing and
even lead to wrong results. For example, a composite DTB (created from a
base DTB and a set of overlays) might have the same name as one of the
overlays that create it.

Different files should be generated from differently named sources.
 .dtb  <-> .dts
 .dtbo <-> .dtso

We do not remove the ability to compile DTBO files from .dts files here,
only add a new rule allowing the .dtso file name. The current .dts named
overlays can be renamed with time. After all have been renamed we can
remove the other rule.

[Import notes: Adapt to U-Boot by using the cmd_dtco function instead
of cmd_dtc just like the current .dts -> .dtbo rule.]

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-15 14:08:45 -04:00
Rasmus Villemoes
d50af66343 kbuild: add dtc as dependency on .dtb files
[Linux commit b8fc5b2157b1]

If dtc is rebuilt, we should rebuild .dtb files with the new dtc.

[Import notes: Back then there was no .dtbo rule in Linux's
Makefile.lib, but the current .dtbo rules in Linux also have the
$(DTC) dependency, so also add it to our .dtbo rule.]

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-15 14:08:45 -04:00
Rasmus Villemoes
6923f49d3a scripts/Makefile.dts: tweak logic for deciding which dtbs to build
The idea in 3609e1dc5f (dts: automatically build necessary .dtb
files) was fine, but the implementation was suboptimal due to some
misunderstandings on my part (and possibly defects in some defconfig
files):

- Sometimes DEFAULT_DEVICE_TREE is not included in OF_LIST or
  SPL_OF_LIST

- SPL_OF_LIST is not always a subset of OF_LIST

- While SPL_OF_LIST governs the list of dtbs relevant to SPL (i.e.,
  may be built into an
  SPL-with-bunch-of-dtbs-to-choose-between-at-runtime), those dtbs are
  not actually _built_ during the SPL build phase, i.e. when $(SPL_)
  would expand to SPL_. fdtgrep runs on the artifacts produced during
  the ordinary U-Boot build.

Tweak the logic so that we simply add the union of all dtbs mentioned
in either DEFAULT_DEVICE_TREE, OF_LIST and SPL_OF_LIST to dtb-y. That
should, for real, ensure that we always build all the dtbs that is
relevant to the current board, and should in turn enable us to
massively simplify arch/*/dts/Makefile.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Tested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-15 14:08:44 -04:00
Martin Hundebøll
f07381529b scripts: dtc-version: support git version strings too
Building dtc from git causes the version number to start with a 'v'
(e.g. v1.7.0). printf then fails to parse 'v1' as a decimal value, and
prints '000700' instead of '010700'. Subsequently, the build fails,
because '000700' is less than the required '010400' version.

Signed-off-by: Martin Hundebøll <martin@geanix.com>
2023-05-15 14:08:44 -04:00
Tom Rini
c9b2a78928 Merge https://source.denx.de/u-boot/custodians/u-boot-cfi-flash
- cfi: respect reg address length (Nuno)
2023-05-15 08:33:16 -04:00
Nuno Sá
43bacbe6ab mtd: cfi: respect reg address length
flash_get_size() will get the flash size from the device itself and go
through all erase regions to read protection status. However, the device
mappable region (eg: devicetree reg property) might be lower than the
device full size which means that the above cycle will result in a data
bus exception. This change fixes it by reading the 'addr_size' during
probe() and also use that as one possible upper limit.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
2023-05-15 10:00:30 +02:00