Commit graph

83162 commits

Author SHA1 Message Date
Marek Vasut
519e6641db cmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage
Commit d5ba6188df ("cmd: pxe_utils: Check fdtcontroladdr in label_boot")
forces '$fdtcontroladdr' DT address as a third parameter of bootm command
even if the PXE transfer pulls in a fitImage which contains configuration
node with its own DT that is preferrable to be passed to Linux. Limit the
$fdtcontroladdr fallback utilization to non-fitImages, since it is highly
likely a fitImage would come with its own DT, while single-file images do
need a separate DT.

Fixes: d5ba6188df ("cmd: pxe_utils: Check fdtcontroladdr in label_boot")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Tested-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peter Hoyes <peter.hoyes@arm.com>
Tested-by: Peter Hoyes <peter.hoyes@arm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-06 08:14:19 -05:00
Marek Vasut
bee3551e00 Revert "Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot""
This reverts commit ed6251187a.

Superseded by "cmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage"
which is less heavy-handed approach and retains part of the original
behavior for non-fitImage.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-06 08:14:19 -05:00
Jagan Teki
ab644db9ba rockchip: Fix the broken Video out for rk3288 boards
Video out on RK3288 boards has been broken since from few
releases due to the adding of reset support on vop but
missed enabling DM_RESET on associated boards.

This patch fixes those RK3288 boards.

Cc: Simon Glass <sjg@chromium.org>
Cc: Lin Huang <hl@rock-chips.com>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Fixes: <9749d2ea29e1> ("rockchip: video: vop: Add reset support")
Reported-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-06 08:14:19 -05:00
Dai Okamura
4671435c54 i2c: uniphier-f: correct error recovery
The uniphier i2c block can recognize some handshake errors.
But driver handles all error detections as no error if no timeout.
So this makes unrecoverable state.

This replaces the return values with the right ones to tell the i2c
framework the errors:
- EDEADLK for arbitration lost error
- ENODATA for no answer error

Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
Acked-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2023-01-06 08:14:19 -05:00
Fabio Estevam
f8548ce0e0 imx7d-pico: Fix the name of the u-boot.dtsi file
Since commit 2f96d4dd95 ("imx7s/d: synchronise device trees with linux")
the imx7d-pico board no longer boots.

The reason is that prior to the above commit there was an explicit
inclusion of arch/arm/dts/imx7d-pico-u-boot.dtsi inside imx7d-pico.dtsi.

After the syncing with the Linux upstream dtsi, this u-boot.dtsi inclusion
is gone and the board fails to boot.

U-Boot uses the imx7d-pico-pi.dtb file, so rename the u-boot.dtsi to
imx7d-pico-pi-u-boot.dtsi which gets included automatically by U-Boot
standard make logic and makes the board boot again.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-01-06 08:14:19 -05:00
Pali Rohár
1b697407ae powerpc/mpc85xx: socrates: Re-enable building u-boot-socrates.bin
U-Boot build system builds final U-Boot binary for socrates board in custom
file u-boot-socrates.bin (instead of standard u-boot.bin). Output target
file u-boot-socrates.bin is generated by binman as defined in board binman
config file arch/powerpc/dts/socrates-u-boot.dtsi.

But binman was disabled in commit 5af42eafd7 ("Makefile: Reduce usage of
custom mpc85xx u-boot.bin target") for all mpc85xx boards which do not use
standard powerpc binman config file arch/powerpc/dts/u-boot.dtsi and boards
which do not require binman at all.

The only such mpc85xx board is socrates. So since that commit, U-Boot does
not final binary for socrates board anymore.

Fix this issue by re-enabling binman for socrates board. And build process
starts again producing u-boot-socrates.bin binary.

Note that build process for this socrates board always produce u-boot.bin
binary which is broken and not usable for socrates board. Long term
solution should be to disable building broken binary u-boot.bin and then
renaming u-boot-socrates.bin to u-boot.bin, or switching to use common
powerpc binman config file arch/powerpc/dts/socrates-u-boot.dtsi (if it is
possible).

Fixes: 5af42eafd7 ("Makefile: Reduce usage of custom mpc85xx u-boot.bin target")
Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Heiko Schocher <hs@denx.de>
2023-01-06 08:14:19 -05:00
Tom Rini
8d6cbf5e6b Pull request for efi-2023-01-rc5-3
Documentation:
 
 * Describe building documentation
 
 UEFI:
 
 * Add .data section to aarch64 EFI binaries and correct section flags
 * Correct sorting of capsules when updating
 * Populate console handles in system table
 
 Other:
 
 * Fix description of eth_env_[gs]et_enetaddr() return value
 * Avoid endless loop in sound play command
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmO1d9EACgkQxIHbvCwF
 GsQh/g/+L8SidakgdgkrKRm1eup+MmUrq1rZr1zdH35fx29nQCu5xUbqTfwLtST4
 NDRKc/WnVqUbfMm9WEgSAp+0cUm2qrv9y5JpSEoLUHmt6ZZUh/KrbOdA32Cm07WD
 FjB+Ki49jGEewBP2wlLuIgXDgiROjiLvQ8fl4DJ0piQGdeFPsSqXJZj4V2gM6/SQ
 eyAwRxwp0dsGoPHxWpvclLJCjgU/9cebiauyN3/pPLYL1MsxP1/HruXgi5TyAxxo
 qBQAv/pjJKIVfjo8l6cPlon4niXembqcybg+jqv+UfFj0ZDZ39XZ/zAoycW4wEhF
 RQRQo5cwQnPEWCUDzFn6qBF7rLBmbfDbuByZfNIEHmneLYysB46+95Qy7lM0sCUi
 wfc2MuWavKZ1H99lR8UTqwf24FY9Q88OVaDw0LCo+GSuiSFv5XnUoMVVe/yu8CmY
 DSUtSoX1VV0JAozDrH+J7O8MkWISBCd/m4S/wDNnrb6b6gig/BSVN9wrpxtvSgrO
 LJ/4zkRbjiNuxDXv3lD1c7Xpq+pcdyBzreTnrvSgadq5sMcLXhuTLcyNXt0L7EbD
 FgMVAkt02HRSA/xovvGLCcqZ7P+DmBitoleWislFvBYS/cY/N16L2LxfEwSZLLpD
 iYcjNddKsECDEk1rVW3+cq1wPstxBSilQhom+dn/nx3rkZuK57Q=
 =ItVV
 -----END PGP SIGNATURE-----

Merge tag 'efi-2023-01-rc5-3' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-01-rc5-3

Documentation:

* Describe building documentation

UEFI:

* Add .data section to aarch64 EFI binaries and correct section flags
* Correct sorting of capsules when updating
* Populate console handles in system table

Other:

* Fix description of eth_env_[gs]et_enetaddr() return value
* Avoid endless loop in sound play command
2023-01-04 08:50:24 -05:00
Heinrich Schuchardt
60bba6e205 efi_loader: populate console handles in system table
The fields ConsoleInHandle, ConsoleOutHandle, ConsoleErrHandle must point
to the handles with the respective console protocols. Failure to do so
leads to an error in the EFI Shell:

    No SimpleTextInputEx was found. CTRL-based features are not usable.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-04 13:17:42 +01:00
Heinrich Schuchardt
93cdb95238 efi_loader: adjust sorting of capsules
Up to now we only compared the first letter of the capsule name to sort
them alphabetically. Properly sort by the Unicode alphabet.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-04 13:17:42 +01:00
Heinrich Schuchardt
07355760b1 test: unit test for u16_strcasecmp()
Provide a unit test for u16_strcasecmp().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-04 13:17:42 +01:00
Heinrich Schuchardt
7a9b366cd9 lib: add function u16_strcasecmp()
Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-04 13:17:42 +01:00
Heinrich Schuchardt
d7ddeb66a6 efi_loader: fix building aarch64 EFI binaries
While our EFI binaries execute without problems on EDK II they crash on
a Lenovo X13s. Let our binaries look more like what EDK II produces:

* move all writable data to a .data section
* align sections to 4 KiB boundaries (matching EFI page size)
* remove IMAGE_SCN_LNK_NRELOC_OVFL from .reloc section flags

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-04 13:17:42 +01:00
Heinrich Schuchardt
673a92c5d2 efi_loader: defines for PE-COFF section flags
Provide constants for the section flags used by binaries.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-04 13:17:42 +01:00
Marek Vasut
fbc595b412 doc: Fix eth_env_[gs]et_enetaddr() return value
Per env/common.c, eth_env_get_enetaddr() returns the same return
values as is_valid_ethaddr(), i.e. true if valid, false otherwise.
Per env/common.c, eth_env_set_enetaddr() may return -EEXIST is the
ethaddr is already set. Fix both.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-04 13:17:42 +01:00
Heinrich Schuchardt
566b7b2f51 doc: building documentation
Provide a man-page describing how to build the U-Boot documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-04 13:17:42 +01:00
Heinrich Schuchardt
532952f63c cmd: avoid endless loop in sound play command
A parameter starting with a hyphen leads to an endless loop in the sound
play command.

Leave it to dectoul() to handle the hyphen. It will return 0 for a negative
number.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-04 13:17:42 +01:00
Tom Rini
582e3c9fb2 Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- orion-timer: Fix problem with early static variable (Stefan)
2023-01-02 09:36:13 -05:00
Stefan Roese
5387b093cb timer: orion-timer: Fix problem with early static variable
We've noticed that at least one Kirkwood board (Pogo v4) has problems
with the new orion DM timer implementation. Debugging revealed that this
issue is related with the static variable "early_init_done" which does
not work correctly before relocation in all cases.

This patch removes this static variable and replaces it's functionality
via a function that detects if the timer is already initialized.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Pali Rohár <pali@kernel.org>
Cc: Michael Walle <michael@walle.cc>
Cc: Tony Dinh <mibodhi@gmail.com>
Tested-by: Tony Dinh <mibodhi@gmail.com>
2023-01-02 09:14:16 +01:00
Tom Rini
3089d12a02 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-29 13:44:21 -05:00
Tom Rini
d36bc89be2 Pull request for efi-2023-01-rc5-2
Documentation:
 
 * Reorganize existing TI docs and add K3 generation page
 * Add texinfodocs and infodocs targets
 * Update qemu-ppce500 documentation
 * Use "changesets" not "csets" in statistics pages
 
 UEFI
 
 * Fix merging of preseeded non-volatile variables
 * Fix a return value in the  EFI_HII_DATABASE_PROTOCOL
 * Set UEFI specification version to 2.10
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmOtm18ACgkQxIHbvCwF
 GsQMJQ//Zfr8kaJQbHRBcA/20LvdMuJj5l1IBW3sQbfr2jRztrkA/Ea23k4T8lHK
 f+Ty1CGDPi5LtdIKrDJDxNF1KDFOUIGgBZ4i+ISoLPazCj9Cug/58GCZM/htO25/
 sFqojKNUVYOLBZ/D3PZBDU42hWTH0do1MwyUNuwVu0KPe6uwUrMFRBcSddXQw77r
 45iotAPe54hL7lzcNfEJSjeSSZ0CfGAsE+8ZN2r7xBTcU2ACOD6DbcCQgeR8FGEv
 CwzKU/3wKNLtonxfFmK44FI6knIxl/B3HKzi82gBDOmvlB4bmB8X+CK82WvJ+Q+j
 9H/6bqj6ZaEKkJ7k1KbhR/cf6Z4QbRwScb82H2YfhjhiAj6UeoPCTI6lgx7WGkxW
 DP8wNej0kE0wxWuoiay5ErRU17hPItpwQIbrCBMpnJrEPTour6yjGpJYcbUeGqW2
 5gw++0rsyn1rOlH/+ukK0Gzq6DSUE9LuCnl76qG6Vwyuj1e1JO2G9Sr/rxiX5XDx
 5h/LoVmhD2yYSSG7MtKNlj38yfnOu1267PSWvQYyLs9XKSnhecT/N4OKMwTmEe1o
 VO8MapuUaw2mzO3NzlDLKXHzMavN2ov+YWWA+9NiFiytjXFvOsPnMVZJXeR86RI/
 Npeu+7jIbQOtSFDQyuV0tGXGZSY5F5WHsXFdwJHkFQGSYhWDwXU=
 =z7b8
 -----END PGP SIGNATURE-----

Merge tag 'efi-2023-01-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-01-rc5-2

Documentation:

* Reorganize existing TI docs and add K3 generation page
* Add texinfodocs and infodocs targets
* Update qemu-ppce500 documentation
* Use "changesets" not "csets" in statistics pages

UEFI

* Fix merging of preseeded non-volatile variables
* Fix a return value in the  EFI_HII_DATABASE_PROTOCOL
* Set UEFI specification version to 2.10
2022-12-29 13:32:50 -05:00
Tom Rini
6f975524cb Merge branch '2022-12-29-assorted-further-fixes'
- Rework Azure CI jobs for Rockchip, minor fixes for wget and correct
  runtime problems on a number of PowerPC platforms.
2022-12-29 13:31:40 -05:00
Tom Rini
88c2e9157c PowerPC: Update dependencies on *SYS_MPC85XX_NO_RESETVEC
In 96699f097a ("powerpc: mpc85xx: Use binman to embed dtb inside
U-Boot") we introduce CONFIG_MPC85XX_HAVE_RESET_VECTOR and do so via
Kconfig. However, much later in de47ff5363 ("Convert
CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig") I converted the symbol that
is the inverse of this to Kconfig. This should have included a
dependency on the first symbol as they are logically opposite.

The dependency being missing lead to some platforms being broken at
runtime due to discarding the require reset vector.

Fixes: de47ff5363 ("Convert CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig")
Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Pali Rohár <pali@kernel.org>
2022-12-29 13:31:30 -05:00
Tom Rini
9348d93b0d Merge branch '2022-12-29-assorted-further-fixes'
- Rework Azure CI jobs for Rockchip, minor fixes for wget and correct a
  one of the runtime problems on a number of PowerPC platforms.
2022-12-29 09:51:00 -05:00
Tom Rini
ec9efcf62a PowerPC: Rework PBL location choice
When converting CONFIG_SDCARD and CONFIG_SPIFLASH to Kconfig, one set of
uses wasn't converted correctly. Allow for the case where platforms
don't rely on "PBL" to boot but instead use other mechanisms. See the
link below for more details.

Link: https://lore.kernel.org/all/20220802091338.f4g45ldhc7qbg6hm@pali/
Fixes: d433c74eec ("Convert CONFIG_SDCARD et al to Kconfig")
Tested-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-29 09:50:53 -05:00
Michael Walle
20422d6930 cmd: net: wget: fix Kconfig dependency
The wget command uses TCP, but fails to select PROT_TCP in Kconfig.
Instead it selects the non-existing symbol TCP. Fix the typo.

Signed-off-by: Michael Walle <michael@walle.cc>
2022-12-29 09:50:53 -05:00
Michael Walle
fe1489bc6d net: wget: fix implicit declaration
The compiler complains about the missing declaration of print_size():
net/wget.c:415:3: warning: implicit declaration of function ‘print_size’ [-Wimplicit-function-declaration]

Fix it.

Signed-off-by: Michael Walle <michael@walle.cc>
2022-12-29 09:50:53 -05:00
Tom Rini
478ed23e11 CI: Rework rockchip jobs in Azure
The rockchip job is getting close to the hard time limit in Azure for
the free tier. Split this in to 32bit and 64bit board jobs.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-29 09:50:53 -05:00
Heinrich Schuchardt
f557cf08b9 efi_loader: use u16_strlen() in efi_var_mem_ins()
Don't duplicate library functionality.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 12:52:39 +01:00
Ilias Apalodimas
77bb14758d efi_loader: avoid adding variables twice
When the efi subsystem starts we restore variables that are both in a
file or stored into the .efi_runtime section of U-Boot.  However once
a variable gets created or changed the preseeded entries will end up in
the file.  As a consequence on the next boot we will end up adding
identical variable entries twice.

Fix this by checking if the to be inserted variable already exists.
Also swap the restoration order and start with the file instead of the
builtin variables,  so a user can replace the preseeded ones if needed.

Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Heinrich Schuchardt
fcf583b4a7 efi_loader: typo non-volatile in efi_var_restore
It is volatile variables that we do not allow to be restored from file.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-29 10:51:50 +01:00
Heinrich Schuchardt
eff6b7157c efi_loader: set UEFI specification version to 2.10
Claim to implement UEFI 2.10 setting EFI_SPECIFICATION_VERSION accordingly.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-29 10:51:50 +01:00
Heinrich Schuchardt
3ec07c99d8 efi_loader: set IMAGE_FILE_LARGE_ADDRESS_AWARE
For the 64bit EFI binaries that we create set the
IMAGE_FILE_LARGE_ADDRESS_AWARE characteristic in the PE-COFF header
to indicate that they can handle addresses above 2 GiB.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Vincent Stehlé
c33d389c7a efi_loader: fix get_package_list_handle() status
When the HII protocol function get_package_list_handle() is called with an
invalid package list handle, it returns EFI_NOT_FOUND but this is not in
its list of possible status codes as per the EFI specification.
Return EFI_INVALID_PARAMETER instead to fix conformance.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Heinrich Schuchardt
159dbe1fb1 doc: improve wget man-page
* correct formatting of synopsis
* improve description of TCP SACK configuration

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Tom Rini
f16086e3e2 doc: Use "changesets" not "csets" in statistics pages
To make things more human readable, say "changesets from" rather than
"csets from" in all our historical pages here. Moving forward this has
been changed in our gitdm with b034e399e31a ("gitdm: fix typo csets").

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Maxim Cournoyer
7fa4c27a2e doc: add texinfodocs and infodocs targets
Sphinx supports generating Texinfo sources and Info documentation,
which can be navigated easily and is convenient to search (via the
indexed nodes or anchors, for example).  This is basically the same as
1f050e904dd6f2955eecbd22031d912ccb2e7683, which was recently applied
to the Linux kernel.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Pali Rohár
a17be96b62 doc: board: qemu-ppce500: Update supported and unsupported
qemu can emulate also e500v1 core but cannot emulate CPUs from Freescale
PowerPC QorIQ T and P series.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Bryan Brattlof
16a30b3474 doc: ti: add the K3 generation page
Texas Instrument's entire K3 generation of SoCs use much of the same
frameworks and boot flow, especially at the uboot level. Though there
are small differences introduced as each new K3 based SoC is developed
and as the K3 generation matures that will also need to be documented.

Rather than copying the same documentation, with the small differences
applicable to that specific SoC to a new page, introduce a new K3
page that can describe the general boot flow and design decisions for
the entire K3 generation of chips, leaving the specifics for that
particular SoC to a unique sub-page below this one.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Bryan Brattlof
0820e117c3 doc: ti: reorganize existing ti docs
Texas Instruments produces quite a lot of SoCs based upon a common
architecture 'generation'. (eg: OMAP, K3) TI's existing documentation
layout makes noticing this generation jump rather difficult.

To make navigation easier, split the existing documentation into
individual SoC families so we may begin grouping them according to their
generational (eg: OMAP, K3) families.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-29 10:51:50 +01:00
Tom Rini
adcee0791f Merge https://source.denx.de/u-boot/custodians/u-boot-pmic
- power: regulator: Add support for NPCM8xx
2022-12-26 21:00:20 -05:00
Jim Liu
dbedf4a56b power: regulator: Add support for NPCM8xx
Add support for setting nuvoton BMC NPCM845 voltage supply.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2022-12-26 15:44:00 +09:00
Tom Rini
e1befc8512 OP-TEE autodiscovery
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEgWII69YpahbL5iK5gS8AYozs+qIFAmOlZoUACgkQgS8AYozs
 +qIqDA//QLRmx5+Rq8+MkXar6Xpt6nP877+onIxJLeZ4RaNY1I9EIv2hjHcR5NpB
 Wj4K4wP7EQobHTfMDD2owEJ5jOPjmMgYrd8j+7g8q+G7160JTYV6FDxYa3V6b55/
 qifW8T6eTyeaNwKEZyLb7+aNHJ/ULx51RQ8AlTM+ttv2iiYeB7+DegqdF3Df6hjT
 8uFHOPX0+ln+8UUKHCm0NKxUsply4qGlJiuK99Pq1xnGTxyZ1G1+qqXvuFazGOZm
 wHm1Ha08hep6Ye2azjBof8FdA7cjM//7SSUgOctEf1agloxblmt26XfDsxn0U3Oa
 5AbGLrPnL5KJjv/ij5TeaAGdOYPhsgsKJj3vwbbdoARLOb3x91rt7e/ZtThrKcF5
 Ygj0+vpnRzLzgfqqSg90OfWW4NBFNPyXl6qG1ykQrKtnVMDrBofFIcqemwpn9moe
 4Ybx/28Vj1vXLpdt9JDR2vVrmJuPookrUBkTcMMRrrB2zBDF6hGx5wmit8pYZV+R
 CfhyzEzq4WrHXijxmNN56GtnpYVp8GQGaDJy1Fo4BZ8f5h85zvUyfplYyeVsejru
 T3HvvEjRgBjZvEzDh3zj6MI37SYQX4vT5FESBhv+Yab7tl2kp1DLKlVtM9UyvJpt
 RuDt6FOMkFXwLO1JjmAfgn2u4L7TdEdThCceY+G8ElAP4OgpWiA=
 =1O+t
 -----END PGP SIGNATURE-----

Merge tag 'tpm-23122022' of https://source.denx.de/u-boot/custodians/u-boot-tpm

OP-TEE autodiscovery
2022-12-23 07:46:41 -05:00
Tom Rini
24a0a00f07 Merge branch '2022-12-22-assorted-important-fixes'
- Split up the aarch64 Azure CI job more, to avoid time limits, nuvoton
  network fix, SPL_OPTEE_IMAGE dependency fix, some fixes to the IPv6
  code, PowerPC build flag fixes, silence pylibfdt version warning.
2022-12-23 07:44:30 -05:00
Etienne Carriere
fe8a4ed011 tee: optee: discover services dependent on tee-supplicant
Makes OP-TEE to enumerate also services depending on tee-supplicant
support in U-Boot. This change allows OP-TEE services like fTPM TA
to be discovered and get a TPM device registered in U-Boot.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-23 10:26:15 +02:00
Etienne Carriere
476a3d58df tee: optee: don't fail probe because of optee-rng
Fixes optee-rng driver bind sequence in optee driver to print a warning
message but not report an error status when a optee-rng service driver
fails to be bound as the optee driver itself is still fully functional.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-23 10:26:11 +02:00
Marek Vasut
440098c42e pylibfdt: Fix version normalization warning
Fix the following version normalization warning:
"
/usr/lib/python3/dist-packages/setuptools/dist.py:530: UserWarning: Normalizing '2023.01' to '2023.1'
"

Using suggestion from Richard Jones:
https://github.com/pypa/setuptools/issues/308#issuecomment-405817468

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-22 15:39:13 -05:00
Jim Liu
dd5f07eb6b net: nuvoton: fix build broken for use phy_get_interface_by_name
The original patch is use phy_get_interface_by_name to set interface.
The new patch is use dev_read_phy_mode to replace it.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-12-22 15:39:13 -05:00
Pali Rohár
1db706edcd powerpc/mpc85xx: Disable AltiVec and VSX instructions
All vector instructions on powerpc mpc85xx must not be used because U-Boot
does not enable them. Usage cause random crashes. SPE vector instructions
are already disabled by compiler flags, so disable also AltiVec and VSX
vector instructions.

Linux kernel disables AltiVec and VSX instructions too.

Signed-off-by: Pali Rohár <pali@kernel.org>
2022-12-22 15:39:13 -05:00
Pali Rohár
138b6061a1 powerpc/mpc85xx: Improve disabling of SPE instructions
Specifying -mspe=no also disables usage of SPE instructions. It is
documented in "[PATCH,rs6000] make -mno-spe work as expected" email:
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html

So replace -mspe=yes by -mspe=no, so make it clear that u-boot has to be
compiled without SPE instructions.

Linux kernel contains following Makefile code to achieve it:

    # No SPE instruction when building kernel
    # (We use all available options to help semi-broken compilers)
    KBUILD_CFLAGS += $(call cc-option,-mno-spe)
    KBUILD_CFLAGS += $(call cc-option,-mspe=no)

Do same for U-Boot.

Signed-off-by: Pali Rohár <pali@kernel.org>
2022-12-22 15:39:13 -05:00
Pali Rohár
c0d0569cf6 powerpc/mpc85xx: Pass correct cpu compiler flags
When gcc's default cpu (selected by --with-cpu= during gcc's configure
phase) does not match target U-Boot board cpu then U-Boot binary does not
have to be compiled correctly. Lot of distributions sets gcc's default cpu
to generic powerpc variant which works fine.

U-Boot already pass -Wa,-me500 flag to gcc which instructs GNU AS to accept
e500 specific instructions when processing assembler source files (.S).

This affects also assembly files generated by gcc from C source files. And
because gcc for generic powerpc cpu puts '.machine ppc' at the beginning of
the generated assembly file, it basically overwrites -me500 flag by which
was GNU AS invoked (from U-boot build system).

It started to be an issue since binutils 2.38 which does not keep enabled
extra functional units selected by previous cpu. Hence issuing directive
'.machine ppc' (generated by gcc for generic powerpc) after '.machine e500'
(specifying at command line) disables usage of e500 specific instructions.

And compiling arch/powerpc/cpu/mpc85xx/tlb.c code throws following
assembler errors:

    {standard input}: Assembler messages:
    {standard input}:127: Error: unrecognized opcode: `tlbre'
    {standard input}:418: Error: unrecognized opcode: `tlbre'
    {standard input}:821: Error: unrecognized opcode: `msync'
    {standard input}:821: Error: unrecognized opcode: `tlbwe'
    {standard input}:884: Error: unrecognized opcode: `tlbsx'

This issue was already hit by Debian people and is reported in bug tracker:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003490

Calling gcc with -mcpu=8540 flag fixes this issue because -mcpu=8540 tells
gcc to compile code for e500 core/cpu (overwriting gcc's default cpu) and
does not put '.machine ppc' directive into assembly anymore.

Also if gcc is invoked with -mcpu=8540 then it pass -me500 flag to GNU AS.
So it is unnecessary to manually specify -Wa,-me500 flag because it is
implicitly added.

Fix this issue properly by specifying correct -mcpu compiler flag for all
supported powerpc cores in U-Boot mpc85xx platform, which are: e500v1,
e500v2, e500mc, e5500 and e6500. For specifying e500v1 and e500v2 cores,
gcc has unintuitive -mcpu=8540 and -mcpu=8548 flag names, for other cores
-mcpu matches core name.

The only difference between gcc's -mcpu=8540 and -mcpu=8548 flags is
support for double precision floating point SPE instructions. As U-Boot
does not use floating point, it is fine to use -mcpu=8540 for both e500v1
and e500v2 cores. Moreover gcc 9 completely removed e500 floating point
support, so since gcc 9 -mcpu=8548 is just alias to -mcpu=8540.

Note that U-Boot's CONFIG_E500 option is set also for other cpus, not only
for e500v1 and e500v2. So do not check for CONFIG_E500 and rather set e500
as last fallback value when no other mpc85xx cpu matches.

Signed-off-by: Pali Rohár <pali@kernel.org>
2022-12-22 15:39:13 -05:00