Commit graph

83149 commits

Author SHA1 Message Date
Heinrich Schuchardt
ea58b9a404 cmd: allow sound command to play multiple sounds
Currently the sound command accepts only one value each for duration and
frequency. Allowing more duration and frequency arguments enables playing a
tune.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-20 16:06:48 +01:00
Etienne Carriere
33ba80303e tpm2: ftpm: open session with privileged ree login
Opens the fTPM session with TEE_LOGIN_REE_KERNEL as fTPM may restrict
access to that login when Linux based OS is running as applications are
expected to got through the Linux TPMv2 driver.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-20 09:37:36 +02:00
Tom Rini
2243922edc Prepare v2023.01-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-19 08:45:26 -05:00
Tom Rini
daa531cc5c Merge tag 'u-boot-rockchip-20221219' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
- Only call binman when TPL available;
- rk3128 DTS fix;
- Fix GPT table corruption for rk3399 puma ;
- Fix i2c for rk3399 Pinebookpro;
- Enable UEFI capsule update for RockPi4;
2022-12-19 08:33:24 -05:00
Sughosh Ganu
bdd3a47e02 rockpi4: capsule: Enable UEFI capsule update on RockPi4 boards
Enable the UEFI capsule update functionality on the RockPi4B and
RockPi4C boards. Support is being enabled for updating the idbloader
and u-boot firmware images residing on GPT partitioned uSD card
storage device.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Sughosh Ganu
e86c789ca3 rockpi4: board: Add firmware image information for capsule updates
Add information that will be needed for enabling the UEFI capsule
update feature on the RockPi4 boards. With the feature enabled, it
would be possible to update the idbloader and u-boot.itb images on the
RockPi4B and RockPi4C variants.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Sughosh Ganu
bea9267d7e rockchip: capsule: Add functions for supporting capsule updates
Add functions needed to support the UEFI capsule update feature on
rockchip boards. Currently, the feature is being enabled on the
RockPi4 boards with firmware images residing on GPT partitioned
storage media.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
John Keeping
b5194c2258 phy: rockchip: handle clock without enable function
If a clock doesn't supply the enable hook, clk_enable() will return
-ENOSYS.  In this case the clock is always enabled so there is no error
and the phy initialisation should continue.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Michal Suchanek
216928c772 rockchip: Pinebook Pro: Do not initialize i2c before relocation
The i2c locks up when initialized before relocation, and it stays broken
in Linux as well breaking the ability to boot Linux.

The i2c bus and pmic was not actually used in pre-reloc before
commit ad607512f5 ("power: pmic: rk8xx: Support sysreset shutdown method")

The cause is not known.

This is board-specific, other boards that do not add the option to
include the i2c bus in pre-reloc DT are not affected.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Quentin Schulz
c74f6e748b rockchip: puma: fix GPT table corruption when saving U-Boot environment
The GPT table is taking the first 34 sectors, which amounts to 0x4400
bytes. Saving the environment below this address in storage will corrupt
the GPT table.

While technically the table ends at 0x4400, some tools (e.g. bmaptool)
are rounding everything to the logical block size (0x1000), so it is
safer to make it point to 0x5000 so that the environment could still
persist when flashing a sparse image with bmaptool or similar tools.

Obviously, the default 0x4000 environment size does not work anymore, so
let's set it to 0x3000 so it does fill the gap between the GPT table
(rounded to 0x1000) and the start of the idbloader.img.

Fixes: 56f580d3eb ("rockchip: dts: rk3399-puma: put environment (in MMC/SD configurations) before SPL")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
FUKAUMI Naoki
75a364eb05 arm: dts: rockchip: enable ums/rockusb command for ROCK Pi 4
this patch add USB mass storage function and Rockusb function for
Radxa ROCK Pi 4 series.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Manoj Sai
22e443c76d configs:rockchip:roc-rk3399-pc:Enable more configs
This patch enables the following:

1) use preboot configuration to enable usb devices.

2) Enable USB configs so keyboards and other USB devices work,
   update the number of ports of the usb root hub.

   - with this addition the updated USB device Tree:

	1  Hub (12 Mb/s, 0mA)
	U-Boot Root Hub
	1  Hub (12 Mb/s, 0mA)
	|   U-Boot Root Hub
	|
	+-2  Hub (12 Mb/s, 100mA)
	USB 2.0 Hub [MTT]

	1  Hub (5 Gb/s, 0mA)
	U-Boot XHCI Host Controller

3) enable crypto RNG support.

4) Change SPI speed and frequency:
    - increase the maximum SPI slave device speed,
      SPI flash max frequency for the environment from 10Mhz to 30MHz.

    - performance stats for speed update from 10MHz to 30MHz:

    	with 10Mhz speed update:
    	 => sf update 0x300000 0x800000 0x400000
    	    4194304 bytes written, 0 bytes skipped in 36.819s, speed 119837 B/s

        with 30Mhz speed update:
    	 => sf update 0x300000 0x800000 0x400000
    	    4194304 bytes written, 0 bytes skipped in 20.319s, speed 220752 B/s

Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Signed-off-by: Da Xue <da.xue@libretech.co>
Signed-off-by: dsx724 <da@lessconfused.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Johan Jonker
58eb6675da arm: dts: rockchip: rk3128: fix clocks, compatible and phys
Fix rk3128 clocks, compatible and phys, so that they match the bindings.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2022-12-19 10:56:12 +08:00
Johan Jonker
565d77b4c0 arm: dts: rockchip: rk3128: fix DT node names
The rk3128 DT node names should be generic.
Rename them to the pattern defined in the DT bindings.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
2022-12-19 10:56:12 +08:00
Johan Jonker
b919d43af5 arm: dts: rockchip: move all rk3128 u-boot specific properties in separate dtsi files
Move all rk3128 u-boot specific properties in separate dtsi files.
Sort emmc node.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Johan Jonker
c643468849 arm: dts: rockchip: rk3128: bulk convert gpios to their constant counterparts
Bulk convert rk3128 DT gpios to their constant counterparts.

sed -i -f script.sed rk3128.dtsi
sed -i -f script.sed rk3128-evb.dts

================================

/rockchip,pins *=/bcheck
b # to end of script
:append-next-line
N
:check
/^[^;]*$/bappend-next-line
s/<RK_GPIO\([0-9]\) /<\1 /g
s/<\([^ ][^ ]*  *\)0 /<\1RK_PA0 /g
s/<\([^ ][^ ]*  *\)1 /<\1RK_PA1 /g
s/<\([^ ][^ ]*  *\)2 /<\1RK_PA2 /g
s/<\([^ ][^ ]*  *\)3 /<\1RK_PA3 /g
s/<\([^ ][^ ]*  *\)4 /<\1RK_PA4 /g
s/<\([^ ][^ ]*  *\)5 /<\1RK_PA5 /g
s/<\([^ ][^ ]*  *\)6 /<\1RK_PA6 /g
s/<\([^ ][^ ]*  *\)7 /<\1RK_PA7 /g
s/<\([^ ][^ ]*  *\)8 /<\1RK_PB0 /g
s/<\([^ ][^ ]*  *\)9 /<\1RK_PB1 /g
s/<\([^ ][^ ]*  *\)10 /<\1RK_PB2 /g
s/<\([^ ][^ ]*  *\)11 /<\1RK_PB3 /g
s/<\([^ ][^ ]*  *\)12 /<\1RK_PB4 /g
s/<\([^ ][^ ]*  *\)13 /<\1RK_PB5 /g
s/<\([^ ][^ ]*  *\)14 /<\1RK_PB6 /g
s/<\([^ ][^ ]*  *\)15 /<\1RK_PB7 /g
s/<\([^ ][^ ]*  *\)16 /<\1RK_PC0 /g
s/<\([^ ][^ ]*  *\)17 /<\1RK_PC1 /g
s/<\([^ ][^ ]*  *\)18 /<\1RK_PC2 /g
s/<\([^ ][^ ]*  *\)19 /<\1RK_PC3 /g
s/<\([^ ][^ ]*  *\)20 /<\1RK_PC4 /g
s/<\([^ ][^ ]*  *\)21 /<\1RK_PC5 /g
s/<\([^ ][^ ]*  *\)22 /<\1RK_PC6 /g
s/<\([^ ][^ ]*  *\)23 /<\1RK_PC7 /g
s/<\([^ ][^ ]*  *\)24 /<\1RK_PD0 /g
s/<\([^ ][^ ]*  *\)25 /<\1RK_PD1 /g
s/<\([^ ][^ ]*  *\)26 /<\1RK_PD2 /g
s/<\([^ ][^ ]*  *\)27 /<\1RK_PD3 /g
s/<\([^ ][^ ]*  *\)28 /<\1RK_PD4 /g
s/<\([^ ][^ ]*  *\)29 /<\1RK_PD5 /g
s/<\([^ ][^ ]*  *\)30 /<\1RK_PD6 /g
s/<\([^ ][^ ]*  *\)31 /<\1RK_PD7 /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)0 /<\1RK_FUNC_GPIO /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)RK_FUNC_\([1-9]\) /<\1\2 /g

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Johan Jonker
4d89330b8a rockchip: rk3128-cru: sync the clock dt-binding header from Linux
In order to update the DT for rk3128
sync the clock dt-binding header.
This is the state as of v6.0 in Linux.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
FUKAUMI Naoki
96d926cac3 rockchip: enable fdt overlays for ROCK Pi 4 series
add CONFIG_OF_LIBFDT_OVERLAY=y to support fdt overlays.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2022-12-19 10:56:12 +08:00
Kever Yang
f5315dd629 rockchip: Only call binman when TPL available
Rockchip platform use TPL to do the DRAM initialize for all the SoCs,
if TPL is not available, means no available DRAM init program, and the
u-boot-rockchip.bin is not functionable.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I2299f1eddce5aa7d5fb1a3fb4d8aeaa995b397fa
2022-12-19 10:55:58 +08:00
Tom Rini
93685d0dcb Makefile: With BINMAN_ALLOW_MISSING=1 don't error on missing
When the user builds with BINMAN_ALLOW_MISSING=1 they're explicitly
setting the flag to allow for additional binaries to be missing and so
have acknowledged the output might not work. In this case we want to
default to not passing a non-zero exit code.

Cc: Simon Glass <sjg@chromium.org>
Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-18 20:50:40 -05:00
Tom Rini
255cebbfa3 Pull request for efi-2023-01-rc4
Documentation:
 
 * Fix htmldoc build dependency
 
 UEFI:
 
 * Adjust EBBR version for compatibility table
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmOd384ACgkQxIHbvCwF
 GsQ6zw/+OQlDLlPACDYA/ecSROHv3vuBLPpzwoQP1e2OEyB0IrfHUAmEmYw5Uss7
 ItwwxIQ/wXj41gNBlyk7Xb8llvvKkFUawtcHMf35kNEF3K/6X8WvSs0dGcutMaF/
 C0ptuZYFmKyJZRludEDoWYZHHI9d/MuIDstGyvmTcajKsdWMPPKrOU0hHBfxgRII
 z++iJFq8w0182fBdd84WvZuoM8JP6Ob9TnlBQG7MPK4eSC42GdoqSV6P6AXFj0I9
 BWS+aFCSCwK33QgFe+xRh56BSxh9QF7k80vtBdmwU/NvjeMNuW9rNIHbnIJig12O
 ldk+MecxJn/HCgShgrx92q+rT9hWi0BcCheozkqqCBah32bTum/qiq/KsE8lEflp
 k9KH9NcvSFE2mufglQNBgM1/9bAs8AT0S9bhJk/ivwdz+VahvQDKN+7u0tlca0P1
 DJv22qE9qTEL62dTe1EO14i5QYkok3fPrLXX4joqB7VvoNX0zYaEX6BBSDTzXw9b
 8A3SnMKg9DfZ513vSe1wn3KIbZgnPmx0tfh2QnBs2iquARn1aRuRJff/X9SFfKFc
 oBIbN34IogzadIcPTtiSk1WhirzVx5Lupgf/xSJ5cQmPGc9kzP5BPUX15IZXOvlY
 ia7TP3Q6EjpVepiB267gmTV8DyUkA/5zZ7a4doMJHD7GrCY3BNg=
 =LS6d
 -----END PGP SIGNATURE-----

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

Pull request for efi-2023-01-rc4

Documentation:

* Fix htmldoc build dependency

UEFI:

* Adjust EBBR version for compatibility table
2022-12-18 08:10:09 -05:00
Tom Rini
55e374f508 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
This cleans up each board's defconfig, and fixes the serial console on
some Olimex board. Also we lose another legacy config variable.
The rest are minor cleanups, that actually shouldn't change anything
in the build.

Passed the gitlab CI, plus briefly tested on Pine64-LTS, LicheePi Nano,
and BananaPi M1.
2022-12-18 08:08:55 -05:00
Heinrich Schuchardt
5b5f6e0d61 doc: update Sphinx requirements for certifi
Upgrade to version 2022.12.7.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-17 15:25:52 +00:00
Vincent Stehlé
63db1561f1 efi: adjust ebbr to v2.1 in conformance profile
The EFI Conformance Profile Table entry for EBBR appears in v2.1.0 of the
EBBR specification[1]. Update naming accordingly.

While at it, update the EBBR version referenced in the documentation.

[1]: https://github.com/ARM-software/ebbr/releases/tag/v2.1.0

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-17 13:37:33 +00:00
Maxim Cournoyer
e7d962bc3c doc: fix typos
Fix a few typos spot during a first read of the contribution process.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-12-17 13:37:33 +00:00
Tom Rini
9bd3d354a1 Merge https://source.denx.de/u-boot/custodians/u-boot-x86
- Adjust CONFIG_TEXT_BASE for BayTrail based platforms
- 2 cosmetic issue fixes
2022-12-15 13:06:00 -05:00
Andre Przywara
64531496f9 sunxi: board: annotate #endif lines
The legacy Allwinner code is cluttered with #ifdef's, some of them even
nested, which makes the code hard to read and error prone.
Eventually we will get rid of most of them, but for now let's at least
annotate the #endif lines with the corresponding symbol the bracket
started with.

Reviewed-by: Samuel Holland <samuel@sholland.org>
Tested-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-12-14 22:31:33 +00:00
Andre Przywara
eeaca6ac27 sunxi: remove bogus mmc_pinmux_setup() prototype
Since all callers of mmc_pinmux_setup() are located after the definition
of that function, there is no need for a forward declaration (anymore?).

Remove the prototype along with its #ifdef guards.

Reviewed-by: Samuel Holland <samuel@sholland.org>
Tested-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-12-14 22:31:25 +00:00
Andre Przywara
ed82586c40 sunxi: remove unused CONFIG_MMC_SUNXI_SLOT
There is a CONFIG_MMC_SUNXI_SLOT definition in our sunxi_common.h config
header, which was used to note the first MMC controller to initialise.
The definition in that header was always set to 0, with no easy way of
overriding this, and certainly none of the existing boards made any use
of that (non-)feature.
Remove that definition and replace it with a constant 0 in the only
user, in board.c. It turns out that this is safe, as this is only used
in the SPL, and the BROM also unconditionally initialises MMC0.
This also removes the last legacy config symbol with SUN*I in it from
the whitelist.

Reviewed-by: Samuel Holland <samuel@sholland.org>
Tested-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-12-14 22:31:06 +00:00
Bin Meng
58e2a35f2e x86: cosmetic: Fix a typo in the reserve_arch() comments
It should be fsp_continue().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-14 12:04:51 +08:00
Bin Meng
e23cae3080 x86: som-db5800-som-6867: Adjust CONFIG_TEXT_BASE
At present U-Boot no longer builds as a complete rom for som-db5800-som-6867.

    BINMAN  .binman_stamp
  Wrote map file './rom.map' to show errors
  binman: Section '/binman/rom': contents size 0x80302c (8400940) exceeds section size 0x800000 (8388608)

Checking rom.map we see 'intel-vga' section is overlapped with
other sections:

  <none>     fff00000  0009f7c8  u-boot-with-ucode-ptr
  <none>     fff90000  00010000  intel-vga
  <none>     fff9f7c8  00001aae  u-boot-dtb-with-ucode

Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2022-12-14 12:04:51 +08:00
Bin Meng
5d1c8342ae x86: dfi-bt700: Adjust CONFIG_TEXT_BASE
At present U-Boot no longer builds as a complete rom for all the
configs of dfi-bt700.

    BINMAN  .binman_stamp
  Wrote map file './rom.map' to show errors
  binman: Section '/binman/rom': contents size 0x80e836 (8448054) exceeds section size 0x800000 (8388608)

Checking rom.map we see 'intel-vga' section is overlapped with
other sections:

  <none>     fff00000  000aac90  u-boot-with-ucode-ptr
  <none>     fffa0000  00010000  intel-vga
  <none>     fffaac90  00001df0  u-boot-dtb-with-ucode
  <none>     fffaca80  00019800  u-boot-ucode

Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-12-14 12:04:51 +08:00
Bin Meng
388f93f963 x86: conga-qeval20-qa3-e3845: Adjust CONFIG_TEXT_BASE
At present U-Boot no longer builds as a complete rom for all the
configs of conga-qeval20-qa3-e3845.

    BINMAN  .binman_stamp
  Wrote map file './rom.map' to show errors
  binman: Section '/binman/rom': contents size 0x80b680 (8435328) exceeds section size 0x800000 (8388608)

Checking rom.map we see 'intel-vga' section is overlapped with
other sections:

  <none>     fff00000  000a7cb0  u-boot-with-ucode-ptr
  <none>     fffa0000  00010000  intel-vga
  <none>     fffa7cb0  00001c1a  u-boot-dtb-with-ucode
  <none>     fffa98d0  00019800  u-boot-ucode

Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2022-12-14 12:04:51 +08:00
Bin Meng
66e2c665f3 x86: minnowmax: Adjust CONFIG_TEXT_BASE
At present U-Boot no longer builds as a complete rom for minnowmax.

    BINMAN  .binman_stamp
  Wrote map file './rom.map' to show errors
  binman: Section '/binman/rom': contents size 0x803146 (8401222) exceeds section size 0x800000 (8388608)

Checking rom.map we see 'fdtmap' section is overlapped with
'intel-vga' section:

  <none>     fffa1390  00019800  u-boot-ucode
  <none>     fffb0000  00010000  intel-vga
  <none>     fffbab90  00000539  fdtmap

Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-14 12:04:51 +08:00
Bin Meng
f38be30868 x86: bayleybay: Adjust CONFIG_TEXT_BASE
At present U-Boot no longer builds as a complete rom for bayleybay.

    BINMAN  .binman_stamp
  Wrote map file './rom.map' to show errors
  binman: Section '/binman/rom': contents size 0x814706 (8472326) exceeds section size 0x800000 (8388608)

Checking rom.map we see 'fdtmap' section is overlapped with
'intel-vga' and 'intel-fsp' sections:

  <none>     fffa2150  0002a000  u-boot-ucode
  <none>     fffb0000  00010000  intel-vga
  <none>     fffc0000  00038000  intel-fsp
  <none>     fffcc150  00000539  fdtmap

Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2022-12-14 12:04:51 +08:00
Alistair Delva
767df6a27d x86: Fix i8259 ifdef include guard
When building U-Boot with clang, it notices that the i8259.h include
guard does not work correctly due to a typo. Fix it.

Signed-off-by: Alistair Delva <adelva@google.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2022-12-14 12:04:51 +08:00
Mark Kettenis
705209a095 sunxi: Fix serial console for A10s-OLinuXino-MICRO
On this board CONFIG_CONS_INDEX needs to be 1 unlike other sun5i
boards.  Since this is the default, remove to bogus setting.

Fixes: 7095f86418 ("sunxi: Convert CONS_INDEX to Kconfig")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-12-14 01:37:04 +00:00
Samuel Holland
6cad8bea4f pinctrl: sunxi: Add P2WI and RSB pinmuxes
P2WI and RSB are used to communicate with a PMIC. Most SoCs have only
one possible pinmux. F1C100s has two possibilities, with different mux
values, so omit it until some board needs one of them.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-12-13 20:33:37 +00:00
Andre Przywara
b072aefbbe sunxi: define SYS_MONITOR_LEN in Kconfig, not _defconfig
Commit 08574ed339 ("Convert CONFIG_SYS_MONITOR_LEN to Kconfig") moved
the definition of said config variable from the common sunxi header to
*every board's* defconfig.
This is a platform choice, not board specific, so remove the variable
from there, instead set the one value for all Allwinner boards in
Kconfig.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2022-12-13 20:33:31 +00:00
Tom Rini
ed6251187a Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot"
With the change here, all extlinux.conf files with only "KERNEL
/fitImage" don't work anymore. One common example of this would be those
files generated by thee Poky/OE WIC bootimg-partition bootloader
partition generator.

This reverts commit d5ba6188df.

Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Reported-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-13 09:26:25 -05:00
Tom Rini
c917865c7f Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- mvebu: Espressobin: Fix default env variables (Derek)
2022-12-12 09:00:58 -05:00
Tom Rini
b560f2c61f phy: usbphyc: use regulator_set_enable_if_allowed for disabling vbus supply
dm: pmic: ignore disabled node in pmic_bind_children
 -----BEGIN PGP SIGNATURE-----
 
 iQJQBAABCgA6FiEEXyrViUccKBz9c35Jysd4L3sz/6YFAmOXBYEcHHBhdHJpY2Uu
 Y2hvdGFyZEBmb3NzLnN0LmNvbQAKCRDKx3gvezP/po9ZD/9gTAvGNsveYWAIiIHv
 n3BwIMeGizik85zu2H3QcUtyNmnsUNKFAnpUkAH87dKdF4/BHkak2HZVP9DUENYN
 PIrpt+D3Yo44PjrlAczsy9accmr6O1pQTwadPEMsXou8/0Ep/clL/dsJnFJWIvnp
 1Xvp6Yd1rwbPCs+cJgpbhY/VgoT4YEZf7vcDzqPjWbJVyINhTZ+aF/VO3M5/6dbr
 s9CHZs+x/GYV2C6PEXN7dJrhlTS5NRGdNjKWu1YJNVcomX+HDRdgnk9Ce2JdlXJ+
 bD15aQ5jm5MSbp0zZGXXYt6dxDgkrNa486sCu50gdTSW7PuTGWOjs1LW8FcezKji
 JpSUKALXcUKD4QSBRnYUuvZirUUgQQ/6QNOLg9as+0BrJcJ8FauEpsm0SzA8mgv/
 PjUwT/jkPdzsh4uYJy2DXsLgfDSGayUkRsKKlXi85K7j1+qAQ/p0k7ODGGdV+UG8
 3WYTtZgoy5fIYb3I7wXeStEecsthqebzC90h02lEZ+vLIszSL7gfPWVNmr5QwP8O
 NgwsO9oxyK2TVLMPx5fATgUGMy0U7gxB7cTtrSPgg9vg80MLi4wAIBgZVdexRGgN
 ShaDmvgGUEPkry3wfXjKHD/AL2mVLzpV560kxO7Klu3jmEpSXLwBPdjScQTF9zKq
 sdBWogxjmFSChS6FWPISci0ycQ==
 =8PpT
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20221212' of https://source.denx.de/u-boot/custodians/u-boot-stm

phy: usbphyc: use regulator_set_enable_if_allowed for disabling vbus supply
dm: pmic: ignore disabled node in pmic_bind_children
2022-12-12 08:59:13 -05:00
Patrick Delaunay
30257f4699 dm: pmic: ignore disabled node in pmic_bind_children
Ignore the disabled children node in pmic_bind_children() so the
disabled regulators in device tree are not registered.

This patch is based on the dm_scan_fdt_node() code - only the
activated nodes are bound -  and it solves possible issue when a
deactivated regulator is bound, error for duplicated regulator name
for example.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-12 11:25:28 +01:00
Patrick Delaunay
91dae6d0a1 phy: usbphyc: use regulator_set_enable_if_allowed for disabling vbus supply
Use regulator_set_enable_if_allowed() api instead of regulator_set_enable()
while disabling vbus supply. This way the driver doesn't see an error
when it disable an always-on regulator for VBUS.

This patch is needed for STM32MP157C-DK2 board when the regulator
v3v3: buck4 used as the phy vbus supply in kernel device tree
is always on with the next hack for low power use-case:

&usbphyc_port0 {
        ...
	/*
	 * Hack to keep hub active until all connected devices are suspended
	 * otherwise the hub will be powered off as soon as the v3v3 is disabled
	 * and it can disturb connected devices.
	 */
	connector {
		compatible = "usb-a-connector";
		vbus-supply = <&v3v3>;
	};
};

Without this patch and the previous update in DT the command
"usb stop" failed and the next command "usb start" cause a crash.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2022-12-12 11:25:19 +01:00
Derek LaHousse
3a68fda33f arm: mvebu: Espressobin: Fix default env variables
Default env variables on Espressobin boards are broken since commit c4df0f6f31
("arm: mvebu: Espressobin: Set default value for $fdtfile env variable") as well
as the 'env default -a' command.

The algorithm to find free space in the default_environment[] array returns
after the first env variable instead of the correct position of the last
variable, where there is allocated free space.

This causes that U-Boot board_late_init() function to overwrite a portion of the
default environment with $ethXaddr and $fdtfile variables immediately after the
first env variable and so it is overwriting other variables.

This patch also adds an additional null byte to terminate the environment array.

But U-Boot board_late_init() function do not fill this nul byte explicitly. And
because of that, U-Boot is later trying to interpret remaining buffer as a
continuation of variable list. Normally buffer should be empty but due to the
above issue, it contains garbage from remaining env variables.

For example 'env default -a' command results in damaging variable names. It was
observed that scritaddr variable name was changed to criptaddr (without leading
's').

This bug was reported and discussed on the Armbian forum:
https://forum.armbian.com/topic/19564-making-espressobin-v7-work-in-2022/?do=findComment&comment=138136

Fix these issues in two steps:

1) Change code which finds free space for dynamic env variables in
default_environment[] array by jumping to the end of the variable list instead
of jumping after the first defined variable. [By Derek]

2) Add code which appends terminating nul byte as indication of the end of the
env list, after the last nul term env string. [By Pali]

Fixes: c4df0f6f31 ("arm: mvebu: Espressobin: Set default value for $fdtfile env variable")
Signed-off-by: Derek LaHousse <derek@seaofdirac.org>
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2022-12-12 07:36:04 +01:00
Tom Rini
7a7b0856ca Merge tag 'u-boot-nand-20221211' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash
- cmd: nand: Extend nand info to print ecc information
 - rawnand: omap_gpmc: driver model support (the first patches of the series)
 - mtd: nand: make Samsung SLC NAND usable again
 - cmd: mtd: check if a block has to be skipped or erased
 - spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLY
 -----BEGIN PGP SIGNATURE-----
 
 iQJYBAABCgBCFiEE6GOTDNYiFygVXvMmQBtB6IWRjvEFAmOVqHYkHGRhcmlvLmJp
 bmFjY2hpQGFtYXJ1bGFzb2x1dGlvbnMuY29tAAoJEEAbQeiFkY7x8kIQAKpksSrJ
 vv+TS9nL5Xcn4pHMsZ+OAkCBeUGHEYAsYW6akSvFqcN3UCgFpyz2xGMNNlurHVjy
 YL1e/qSXrBZ3U+kem8xjT5ceU8ZBBNZrRN9pR+2VwCxGEjeA4YgaRN8CIwXUf1QD
 hSJs4jr3MvIm5Mioabsk1Y9AoRMDH4IHkNvg6ATV6fIwTMrcjj6ztiSSalSx8iyK
 p1s8r+0Y+q8mU/XQCEG3RwaAkTASXsDSAQMZSKHk+hqji3sooprfqj+x6fifue2L
 zPA0YOUWHyBdcDJeVuETNBhGjN/vtI06qkrvdtrFtjWhTC2mmKcesrH4q85m8O9Z
 XdsYNdr6pWVZslO28We57h2gIC7uolPEQ6+QMc3E0ks9O4CDnucX52ZBPkHXqFfW
 SZOzwgB1CqDrCVHPM2RVAIUNSIKyBil9/30op+CYoxT9kBFuKNOwWJtqQzzIzUtE
 k9N/VkL/mGHjGT8n0mKTRRnIpQx6yruDIAY1gaOLUDlMDLwTy6AiCaT87wlNxgCS
 LypU+qd6VwUcRTMIk8amQSrT8uSzV9K4A7AWZAWAels6So9hrVvviPpO0RMp9kJT
 sn8IDL3HL1xGv28I1EiYv2+R/U8NW89KvttmMeB7ANGXBSkS+8NuIiMFTeKCgwAW
 V0FSmdeqVBE0CMJQiJotOgFQ4uP7cd6wjQU7
 =73Md
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-nand-20221211' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash

Merge tag 'u-boot-nand-20221211' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash

- cmd: nand: Extend nand info to print ecc information
- rawnand: omap_gpmc: driver model support (the first patches of the series)
- mtd: nand: make Samsung SLC NAND usable again
- cmd: mtd: check if a block has to be skipped or erased
- spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLY
2022-12-11 09:40:25 -05:00
Dai Okamura
fda2253d12 spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLY
This fixes the header offset calculation.

This issue was found on uniphier v7 SoCs with SPL.

Fixes: 06377c5a1f ("spl: spl_legacy: Fix NAND boot on OMAP3 BeagleBoard")
Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221209114021.3074978-1-okamura.dai@socionext.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10 14:35:55 +01:00
Dario Binacchi
17c2ccde22 mtd: nand: mxs_nand_spl: don't read useless pages
The patch prevents pages beyond the last from being unnecessarily read.
This occurs when the last page to be read is not the last page of the
last block. Before this change we would have read all the pages up to
the end of the last block.

Suggested-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221120095705.3019295-1-dario.binacchi@amarulasolutions.com
2022-12-10 14:35:55 +01:00
Dario Binacchi
670789f5ba mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()
This function is only used within this module, so it is no longer
necessary to use EXPORT_SYMBOL_GPL().

This patch parallels the work done in the following patch:
https://lore.kernel.org/linux-mtd/20221018170205.1733958-1-dario.binacchi@amarulasolutions.com

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221108090719.3631621-1-dario.binacchi@amarulasolutions.com
2022-12-10 14:35:55 +01:00
Dario Binacchi
d09807ad14 cmd: mtd: check if a block has to be skipped or erased
As reported by patch [1], the `mtd erase' command should not erase bad
blocks.
To force bad block erasing you have to use the `mtd erase.dontskipbad'
command.

This patch tries to fix the same issue without modifying code taken
from the linux kernel, in order to make further upgrades easier.

[1] https://lore.kernel.org/all/20221006031501.110290-2-mikhail.kshevetskiy@iopsys.eu/
Suggested-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-developed-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Tested-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10 14:35:55 +01:00