Commit graph

78469 commits

Author SHA1 Message Date
Heinrich Schuchardt
ae794fae09 efi_loader: nocolor command line attr for initrddump.efi
initrddump.efi uses colored output and clear the screen. This is not
helpful for integration into Python tests. Allow specifying 'nocolor' in
the load option data to suppress color output and clearing the screen.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-26 07:46:21 +01:00
Heinrich Schuchardt
df96deeed6 efi_loader: typo devie-path
%s/devie-path/device-path/

Reported-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-26 07:46:21 +01:00
Heinrich Schuchardt
814a7eea80 doc: man-page for the wdt command
Describe the wdt command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-26 07:46:21 +01:00
Tom Rini
28c2ebef37 Merge https://source.denx.de/u-boot/custodians/u-boot-sunxi
- Fix A20 GBit Ethernet operation
- Update board .dts files to provide correct RGMII PHY mode
2022-03-25 21:20:29 -04:00
Andre Przywara
85da558762 sunxi: dts: Update RGMII phy-mode properties
Commit f11513d997 ("net: phy: realtek: Add tx/rx delay config for
8211e") made the Realtek PHY driver honour the phy-mode DT property,
to set up the proper delay scheme for the RX and TX lines. A similar
change in the kernel revealed that those properties were mostly wrong.
The kernel DTs got updated over the last few months, but we were missing
out on the U-Boot version.

Just sync in the phy-mode properties from the mainline kernel,
v5.17-rc7, to avoid the breaking DT sync that late in the cycle.

This fixes Ethernet operation on the affected boards.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
2022-03-26 00:16:44 +00:00
Andre Przywara
e943753dc2 sunxi: Fix old GMAC pinmux setup
Commit 5bc4cd05d7 ("sunxi: move non-essential code out of s_init()")
moved the call to eth_init_board() from s_init() into board_init_f().
This means it's now only called from the SPL, which makes sense for
most of the other moved low-level functions. However the GMAC pinmux and
clock setup in eth_init_board() was not happy about that, so it broke
the sun7i GMAC.

Since Ethernet is of no use in the SPL anyway, just move the call into
board_init(), which is only run in U-Boot proper.

This fixes Ethernet operation for the A20 SoCs, which broke in
v2022.04-rc1, with the above mentioned commit.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Tested-by: Petr Štetiar <ynezz@true.cz> [a20-olinuxino-lime2]
2022-03-26 00:16:06 +00:00
Tom Rini
7f0826c169 Merge branch '2022-03-25-assorted-updates' into next
- Assorted PCI cleanups
- Allow building with -Og
- ast2600 pwm support
- PFUZE100 bootcount driver
2022-03-25 19:18:30 -04:00
Philip Oberfichtner
c537a36839 bootcount: Add pmic pfuze100 bootcount driver
Use the MEMA - MEMD registers on the PFUZE100 as bootcount
registers.

Based on work from Heiko Schocher <hs@denx.de>.
Signed-off-by: Philip Oberfichtner <pro@denx.de>
2022-03-25 16:42:40 -04:00
Philip Oberfichtner
a194d59eec power: pfuze100: Add MEMx register definitions
Add missing MEMA - MEMD register definitions for PFUZE100.

Based on work from Heiko Schocher <hs@denx.de>.
Signed-off-by: Philip Oberfichtner <pro@denx.de>
2022-03-25 16:42:40 -04:00
Simon Glass
88ca8e2695 disk: Add an option for partitions in SPL
In some cases we do not want to enable partition support in SPL. Add an
option to allow this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-25 16:42:40 -04:00
Billy Tsai
5b66ebb4e9 ARM: dts: ast2600: Add PWM to device tree
Add the PWM node and enable it for AST2600 EVB

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2022-03-25 13:35:50 -04:00
Billy Tsai
73ee1f261e pinctrl: Add the pinctrl setting for PWM.
This patchs add the signal description array for PWM pinctrl settings.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2022-03-25 13:35:50 -04:00
Billy Tsai
fae101d6e8 pwm: Add Aspeed ast2600 PWM support
This patch add the support of PWM controller which can be found at aspeed
ast2600 soc. The pwm supoorts up to 16 channels and it's part function
of multi-function device "pwm-tach controller".

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2022-03-25 13:35:50 -04:00
Pali Rohár
d158fa1b8b pci: Remove duplicate PCI_CLASS_CODE_* and PCI_CLASS_SUB_CODE_* macros
Macros PCI_CLASS_CODE_* and PCI_CLASS_SUB_CODE_* are unused and are
duplication of PCI_CLASS_* macros defined in pci_ids.h header file.
So remove them.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-25 13:35:50 -04:00
Pali Rohár
f02b396548 sandbox: video: Replace PCI_CLASS_* macros by one from pci_ids.h
Replace old macros PCI_CLASS_CODE_COMM and PCI_CLASS_SUB_CODE_COMM_SERIAL
by new macros defined in pci_ids.h. Old macros would be deleted in followup
commit.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-25 13:35:50 -04:00
Pali Rohár
d7b904092d pci: Add defines for normal and subtractive PCI bridges
Add following two new PCI class codes defines into pci_ids.h include file:

  PCI_CLASS_BRIDGE_PCI_NORMAL
  PCI_CLASS_BRIDGE_PCI_SUBTRACTIVE

And use these defines in all U-Boot code for describing PCI class codes for
normal and subtractive PCI bridges.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-25 13:35:50 -04:00
Sean Anderson
e976504374 Add option to use -Og
This adds support for using -Og when building U-Boot. According to the
gcc man page:

> -Og should be the optimization level of choice for the standard
> edit-compile-debug cycle, offering a reasonable level of optimization
> while maintaining fast compilation and a good debugging experience.

This optimization level is roughly -O1 minus a few additional
optimizations. It provides a noticably better debugging experience, with
many fewer variables <optimized out>.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-25 13:35:50 -04:00
Sean Anderson
f38cb2aca7 Split CONFIG_CC_OPTIMIZE_FOR_SIZE into two configs
This adds a separate CONFIG_CC_OPTIMIZE_FOR_SPEED option in a choice,
in preparation for adding another optimization option. Also convert SH's
makefile to use this new option.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-25 13:35:50 -04:00
Heinrich Schuchardt
cbc05bba8c doc: update doc/sphinx/requirements.txt
Pin all dependencies as reported by 'pip freeze'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-03-25 08:59:49 -04:00
Tom Rini
e47bbf7e0e CI: Pin pylint version to 2.12.2
For consistency in runs, we need to always use the same pylint version.
Pin to 2.12.2 as this is what we have been using so far.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 08:26:01 -04:00
Tom Rini
3b2d19c838 Merge branch '2022-03-25-Kconfig-migrations' into next
- Merge a number of Kconfig migration patches
2022-03-25 08:02:31 -04:00
Tom Rini
b40d2b2891 Convert CONFIG_BACKSIDE_L2_CACHE to Kconfig
This converts the following to Kconfig:
   CONFIG_BACKSIDE_L2_CACHE

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
2665853a5f vinco: Remove CONFIG_ATMEL_SPI0
This is not referenced anywhere, remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
61b9c42e8c lcd: Remove LCD_TEST_PATTERN code
This is a legacy driver and the value is set in board config headers
without a CONFIG prefix.  Remove the code.

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
3e2ea3278e Convert CONFIG_LCD_INFO et al to Kconfig
This converts the following to Kconfig:
   CONFIG_LCD_INFO
   CONFIG_LCD_LOGO
   CONFIG_LCD_INFO_BELOW_LOGO
   CONFIG_LCD_IN_PSRAM

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
286c4531ad Convert CONFIG_ATMEL_LCD et al to Kconfig
This converts the following to Kconfig:
   CONFIG_ATMEL_LCD
   CONFIG_ATMEL_LCD_BGR555
   CONFIG_ATMEL_LCD_RGB565
   CONFIG_GURNARD_SPLASH

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
cc386f161c Convert CONFIG_MII_INIT to Kconfig
This converts the following to Kconfig:
   CONFIG_MII_INIT

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
16199a8b96 Convert CONFIG_PHY_RESET_DELAY to Kconfig
This converts the following to Kconfig:
   CONFIG_PHY_RESET_DELAY

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
0b956e3987 Convert CONFIG_SYS_RX_ETH_BUFFER to Kconfig
This converts the following to Kconfig:
   CONFIG_SYS_RX_ETH_BUFFER

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
6329dda175 Convert CONFIG_LPC32XX_ETH to Kconfig
This converts the following to Kconfig:
   CONFIG_LPC32XX_ETH

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
5842c8107d Convert CONFIG_TFTP_PORT to Kconfig
This converts the following to Kconfig:
   CONFIG_TFTP_PORT

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
03d14ccdf6 Convert CONFIG_RMII to Kconfig
This converts the following to Kconfig:
   CONFIG_RMII

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
1d5686acfd Convert CONFIG_SYS_FAULT_ECHO_LINK_DOWN to Kconfig
This converts the following to Kconfig:
   CONFIG_SYS_FAULT_ECHO_LINK_DOWN

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
29cc2b542d Convert CONFIG_RESET_PHY_R to Kconfig
This converts the following to Kconfig:
   CONFIG_RESET_PHY_R

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
5a606a4c97 Convert CONFIG_AT91_WANTS_COMMON_PHY to Kconfig
This converts the following to Kconfig:
   CONFIG_AT91_WANTS_COMMON_PHY

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
210a4b46bd Convert CONFIG_AT91_LED to Kconfig
This converts the following to Kconfig:
   CONFIG_AT91_LED

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-25 12:01:15 +00:00
Tom Rini
b7f4413abb Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- a37xx: espressobin: Fix non-working SPI (Pali)
2022-03-24 16:21:33 -04:00
Pali Rohár
8285b928c5 arm: a37xx: espressobin: Fix non-working SPI
Commit 0934dddc64 ("arm: a37xx: Update DTS files to version from
upstream Linux kernel") ported Linux's device-tree files for Armada 3720
SOCs. This broke SPI support on some Espressobin boards and results in
following U-Boot error:

  Loading Environment from SPIFlash... jedec_spi_nor flash@0: unrecognized JEDEC id bytes: f7, 30, 0b
  *** Warning - spi_flash_probe_bus_cs() failed, using default environment

Before that commit DT node for SPI was called 'spi-flash@0' and after
that commit it is called 'flash@0'. Before that commit 'spi-max-frequency'
was set to 50000000 and after it is 104000000.

Rename DT node 'spi-flash@0 in armada-3720-espressobin-u-boot.dtsi to
'flash@0' and set custom U-Boot 'spi-max-frequency' back to 50000000.

With this change SPI is working on Espressobin again and it is detected
with JEDEC ids ef, 60, 16 on our tested unit.

  Loading Environment from SPIFlash... SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB
  OK

Note that it is unknown why spi-max-frequency with value 104000000 does not
work in U-Boot as it works fine with Linux kernel. Also note that in
defconfig file configs/mvebu_espressobin-88f3720_defconfig is set option
CONFIG_SF_DEFAULT_SPEED=40000000 which is different value than in DT.

Fixes: 0934dddc64 ("arm: a37xx: Update DTS files to version from upstream Linux kernel")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-24 08:09:30 +01:00
Tom Rini
5bc486286f Merge tag 'i2c-2022-04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-i2c
i2c changes for fixes-for-2022.04

- atsha204a-i2c.c
  DTS and I2C fixes for Atmel ATSHA204 from Adrian

- i2c: fix always-true condition in i2c_probe_chip()
  from Nikita

- eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled
  from Marek

- clarify bootcount documentation fix from Michael
2022-03-23 09:10:34 -04:00
Marek Behún
3789b6a92f arm: mvebu: dts: turris_mox: fix non-working USB port
Commit 0934dddc64 ("arm: a37xx: Update DTS files to version from
upstream Linux kernel") ported Linux's device-tree files for Armada 3720
SOCs. This broke USB port on Turris MOX, because in Linux' DTS the bus
voltage supply is described as a `phy-supply` property of connector
node, a mechanism that is not supported in U-Boot yet.

For now, fix this by adding `vbus-supply` to usb3 node.

Fixes: 0934dddc64 ("arm: a37xx: Update DTS files to version from upstream Linux kernel")
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-23 11:47:38 +00:00
Michael Opdenacker
fc1383ae2b bootcount: clarify documentation
- Grammar fixes
- Clarify explanations

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2022-03-23 07:27:38 +01:00
Marek Vasut
e3c2042ae7 cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled
With DM I2C, the EEPROM bus has been correctly configured in
eeprom_execute_command() already. Do not reconfigure it here
with hard-coded bus number again.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2022-03-23 07:27:37 +01:00
Nikita Yushchenko
6db539f983 i2c: fix always-true condition in i2c_probe_chip()
Per dm_i2c_ops.probe_chip documentation, i2c_probe_chip() shall fallback
to default probe method when .probe_chip() returns -ENOSYS.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2022-03-23 07:27:37 +01:00
Adrian Fiergolski
532a5b297c misc: atsha204a: fix i2c address readout from DTS
This patch replaces use fdtdec_get_addr with simpler dev_read_addr().
fdtdec_get_addr doesn't work properly on ZynqMP-based (64bit) system. Although
not confirmed, it could be related to the fact, that quoting the documentation,
"This variant hard-codes the number of cells used to represent the address and
size based on sizeof(fdt_addr_t) and sizeof(fdt_size_t)".

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
2022-03-23 07:27:37 +01:00
Adrian Fiergolski
e4662716fb misc: atsha204a: add delay after sending the message
Once request is sent, and before receiving a response, the delay is required.
This patch fixes missing delay for before first response try.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
2022-03-23 07:27:37 +01:00
Adrian Fiergolski
75967a24f9 misc: atsha204a: return timeout from wakeup function
If the maximum number of wake-up attempts is exceeded, return -ETIMEDOUT.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
2022-03-23 07:27:37 +01:00
Tom Rini
5f68470d69 Pull request for efi-2022-04-rc5
Documentation:
 
 * Fix documentation of FIP creation for Amlogic boards
 * Update Nokia RX-51 QEMU documentation
 * Add Raspberry Pi documentation
 
 UEFI:
 
 * Fix booting via short form device paths
 * Support short form device paths in 'efidebug boot add'
 * Fix ESP detection for capsule updates
 * Allow ACPI table usage even if device-tree exists - ignore DT
 * OP-TEE based GetVariable(): return attributes when buffer too small
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmI3UAIACgkQxIHbvCwF
 GsRopA/7BLiFUFayMnVL3qCLZKrceKSbz76zSs18zMab4U7FWEiWTLfqhV4PSgT+
 SfcpOCFsodRIGvNKwm/RpVSpwj7NPINUL29Hn70ojN0ckuJZNBj8ILflr7y6iuCX
 OI48rezhvnOMKk0F2JNFCQDzPYJVKm7Ej1M+CfVCuL+iQNEk4l9FI/pgnT8at5D/
 TcmUQIvqEj6wTv2XaT59AKm85R0r14NJHNRgNEEwgeReiZZ/cxK9I/jYTMFxWK0r
 uOEB1jrsRKnTMq3fgg9fOZRQvjavqoqe0evVtBfrkBpYP48AK9c9vXSBfCSUnygl
 lM+JS6keWaKeOH4605UHhxaFjAoW7VEH+a6jubbDoNNTUspRGpY6UViAc7O16DDK
 AjZN6uoUkeREFMokvHsgsh63cRj2WkKnildAIcnRyLhqQuHe+QS8ndiOSV4Q0peO
 ifT8BFF4loN2ttAViKNYeM6ydBabjmwJiuzuUG0tyxiYDXLS0/ErNp7aUwTgc/qP
 1E46PS+f6sZG2oiNk5L2MP689wEBgZpjSck4aH3ba+UrtGXSh/YC5ERaN1Zm7K5M
 GJ3UOL+G+o0Is4gYgp7tvizVfu+8FIC/ilOndmgtwdRoUYrUA2ePx7WPvArnHLc3
 rymR7IJ1yCD5RjVB3lA6eL76ORKNRBe3Gs7zGRK5jg55pw3MFSo=
 =Kn/h
 -----END PGP SIGNATURE-----

Merge tag 'efi-2022-04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2022-04-rc5

Documentation:

* Fix documentation of FIP creation for Amlogic boards
* Update Nokia RX-51 QEMU documentation
* Add Raspberry Pi documentation

UEFI:

* Fix booting via short form device paths
* Support short form device paths in 'efidebug boot add'
* Fix ESP detection for capsule updates
* Allow ACPI table usage even if device-tree exists - ignore DT
* OP-TEE based GetVariable(): return attributes when buffer too small
2022-03-20 15:14:59 -04:00
Heinrich Schuchardt
9c045a49a9 efi_loader: move dtbdump.c, initrddump.c to lib/efi_loader
The tools dtbdump.efi and initrddump.efi are useful for Python testing even
if CONFIG_EFI_SELFTEST=n.

Don't clear the screen as it is incompatible with Python testing.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-20 17:01:00 +01:00
Heinrich Schuchardt
b78631d54f efi_loader: remove efi_disk_is_system_part()
The block IO protocol may be installed on any handle. We should make
no assumption about the structure the handle points to.

efi_disk_is_system_part() makes an illegal widening cast from a handle
to a struct efi_disk_obj. Remove the function.

Fixes: Fixes: 41fd506842 ("efi_loader: disk: add efi_disk_is_system_part()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-20 11:03:06 +01:00
Heinrich Schuchardt
90dcd9b2d3 efi_loader: export efi_system_partition_guid
The efi_system_partition_guid is needed in multiple places. Export it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-20 11:03:06 +01:00