]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
16 months agotools: u_boot_pylib: Allow to append input directories to indir
Paul HENRYS [Mon, 25 Nov 2024 18:16:53 +0000 (19:16 +0100)] 
tools: u_boot_pylib: Allow to append input directories to indir

append_input_dirs() can be used to append a list of input directories to indir
global list.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agotools: binman: etype: Allow to replace 'NAME' in node names
Paul HENRYS [Mon, 25 Nov 2024 17:54:21 +0000 (18:54 +0100)] 
tools: binman: etype: Allow to replace 'NAME' in node names

This change allows to replace both 'SEQ' and 'NAME' keywords by respectively a
sequence number and the name of the FDT to provide more flexibility in the node
name for the device trees included in the FIT.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agotools: binman: Pass a list of input directory to EnsureCompiled()
Paul HENRYS [Mon, 25 Nov 2024 17:51:11 +0000 (18:51 +0100)] 
tools: binman: Pass a list of input directory to EnsureCompiled()

Input directories can be passed to binman using the '-I' option and those
input directories are now also passed to 'dtc' when run by binman.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agotools: dtoc: Allow passing optional input directories
Paul HENRYS [Mon, 25 Nov 2024 17:51:10 +0000 (18:51 +0100)] 
tools: dtoc: Allow passing optional input directories

An optional list of input directories can be passed to EnsureCompiled() which
allows to pass a list of directories where input files can be searched.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agotools: binman: Add tests for FIT with data encrypted by mkimage
Paul HENRYS [Mon, 25 Nov 2024 17:47:17 +0000 (18:47 +0100)] 
tools: binman: Add tests for FIT with data encrypted by mkimage

Test the property 'fit,encrypt' to encrypt FIT data.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
16 months agotools: binman: add 'fit, encrypt' property to pass keys directory to mkimage
Paul HENRYS [Mon, 25 Nov 2024 17:47:16 +0000 (18:47 +0100)] 
tools: binman: add 'fit, encrypt' property to pass keys directory to mkimage

mkimage can be used for both signing the FIT or encrypt its content and the
option '-k' can be used to pass a directory where both signing and encryption
keys can be retrieved. Adding 'fit,encrypt' property to the 'fit' node, leads to
try to find keys directory among binman include directories.
_get_priv_keys_dir() is renamed as _get_keys_dir() and adapted to support both
signing and encryption nodes in the FIT.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agoaes: Allow to store randomly generated IV in the FIT
Paul HENRYS [Mon, 25 Nov 2024 17:47:15 +0000 (18:47 +0100)] 
aes: Allow to store randomly generated IV in the FIT

When the initialisation vector is randomly generated, its value shall be
stored in the FIT together with the encrypted data. The changes allow to
store the IV in the FIT also in the case where the key is not stored in
the DTB but retrieved somewhere else at runtime.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agopowerpc: Support using upstream devicetrees
J. Neuschäfer [Thu, 5 Dec 2024 17:22:00 +0000 (18:22 +0100)] 
powerpc: Support using upstream devicetrees

For new PowerPC developments, it will be useful to borrow devicetrees
from Linux. This patch makes it possible.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
16 months agophy: don't spam console if phys property is absent in device node
Roger Quadros [Tue, 3 Dec 2024 20:57:36 +0000 (22:57 +0200)] 
phy: don't spam console if phys property is absent in device node

In generic_phy_get_bulk(), if 'phys' property is absent in
the device node then it is not an error condition.

Change print message verbosity to debug to avoid spamming
console in such cases.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
16 months agoverdin-am62: fix FASTBOOT_BUF_ADDR and FASTBOOT_BUF_SIZE
Hiago De Franco [Tue, 3 Dec 2024 12:33:02 +0000 (09:33 -0300)] 
verdin-am62: fix FASTBOOT_BUF_ADDR and FASTBOOT_BUF_SIZE

The current value of CONFIG_FASTBOOT_BUF_ADDR is incorrect for hardware
with 512MB and 1GB of RAM. The RAM address ranges for these devices are:

- 512MB:
  - Start: 0x80000000
  - End:   0xA0000000
- 1GB:
  - Start: 0x80000000
  - End:   0xC0000000

The current buffer address makes fastboot downloads work only on
hardware with 2GB of RAM.

To fix this issue:
1. Lower CONFIG_FASTBOOT_BUF_ADDR to 0x88200000. This makes the buffer
   to be equal ot CONFIG_SYS_LOAD_ADDR, which is a safe address to
   download files using fastboot.

2. Reduce the size of the download buffer to 128MB, avoiding overlaps
   with RAMDISK_ADDR_R. This is a good enough value for individual
   downloads.

These changes make fastboot downloads work with 512MB and 1GB devices.

Fixes: defe30a78b76 ("verdin-am62: add DFU, USB and UUU fastboot support")
Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
16 months agoarch: x86: lib: Add support of legacy 64-bit entry point at 0x200
Paul HENRYS [Wed, 20 Nov 2024 10:39:43 +0000 (11:39 +0100)] 
arch: x86: lib: Add support of legacy 64-bit entry point at 0x200

Support of legacy 64-bit entry point was already present when booting a bzimage
with 'zboot' but not supported with 'bootm' when the x86_64 Linux kernel is
embedded in a FIT image.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agoMerge patch series "sandbox: repair compile and run-time for OF_EMBED case"
Tom Rini [Wed, 18 Dec 2024 18:36:38 +0000 (12:36 -0600)] 
Merge patch series "sandbox: repair compile and run-time for OF_EMBED case"

Evgeny Bachinin <EABachinin@salutedevices.com> says:

This patch-set repairs ability to use sandbox with CONFIG_OF_EMBED=y.

For now, to use OF_EMBED, the following must be done
1) sandbox64_defconfig should have:
  ```
  -CONFIG_OF_LIVE=y
  +CONFIG_OF_EMBED=y
  ```

2) On sandbox when CONFIG_OF_EMBED=y, the u-boot process can't start
due to:
  ```
  Bloblist at b000 not found (err=-2)
  initcall failed at call 000000000011829c (err=-2: No such file or \
      directory)
  ### ERROR ### Please RESET the board ###
  ```
  So, it is natural desire to disable CONFIG_BLOBLIST just to test
sandbox with OF_EMBED=y (disable it one way or another):
  ```
    config SANDBOX
  - select BLOBLIST
  +     select BLOBLIST if SOME_NON_EXISTING_OPTION
  ```

3) As a result, having such changes (CONFIG_OF_EMBED=y &&
CONFIG_BLOBLIST=n) leads to the link & run-time errors, being fixed
by this patch series.

Link: https://lore.kernel.org/r/20241202-sandbox_repair_of_embed-v1-0-05aff4b0ccf7@salutedevices.com
[trini: The final patch is dropped as no longer relevant with Simon's
        rework to that function which is now applied.]

16 months agoMerge patch series "fdt: Correct condition for receiving bloblist"
Tom Rini [Wed, 18 Dec 2024 18:34:58 +0000 (12:34 -0600)] 
Merge patch series "fdt: Correct condition for receiving bloblist"

This series is from Simon Glass <sjg@chromium.org>.

It first corrects the test for checking if a bloblist could have come
from TPL and so we check for a device tree, and then changes the
argument order for board_fdt_blob_setup() to be more inline with our
usual argument ordering.

Link: https://lore.kernel.org/r/20241102174944.412088-1-sjg@chromium.org
16 months agotest: sandbox: fix link error with do_ut_bootm if BLOBLIST=n
Evgeny Bachinin [Mon, 2 Dec 2024 13:45:25 +0000 (16:45 +0300)] 
test: sandbox: fix link error with do_ut_bootm if BLOBLIST=n

Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link
error:
```
ld: /tmp/ccwtRVty.ltrans28.ltrans.o:(.data.rel+0x4e8): undefined \
                                            reference to `do_ut_bootm'
```

Fixes: fe158657a5b ("test: inconsistent bootm tests")
Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
16 months agotest: sandbox: fix link error with do_ut_bloblist if BLOBLIST=n
Evgeny Bachinin [Mon, 2 Dec 2024 13:45:24 +0000 (16:45 +0300)] 
test: sandbox: fix link error with do_ut_bloblist if BLOBLIST=n

Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link
error:
```
ld: /tmp/ccwtRVty.ltrans28.ltrans.o:(.data.rel+0x4b0): undefined \
                                         reference to `do_ut_bloblist'
```

Fixes: 6ea5df39e8d ("test: Only enable bloblist test when supported")
Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agotest: sandbox: fix invalid_use_of_IF_ENABLED_INT if BLOBLIST=n
Evgeny Bachinin [Mon, 2 Dec 2024 13:45:23 +0000 (16:45 +0300)] 
test: sandbox: fix invalid_use_of_IF_ENABLED_INT if BLOBLIST=n

Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link
error:
```
ld: /tmp/ccRVty.ltrans40.ltrans.o: in function `lib_test_is_enabled':
test/lib/kconfig.c:24: undefined reference to \
                                       `invalid_use_of_IF_ENABLED_INT'
ld: test/lib/kconfig.c:26: undefined reference to \
                                `invalid_use_of_CONFIG_IF_ENABLED_INT'
```

Fixes: 29784d62ede ("test: Add some tests for kconfig.h")
Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agosandbox: fix bloblist_finish() linker error if BLOBLIST=n
Evgeny Bachinin [Mon, 2 Dec 2024 13:45:22 +0000 (16:45 +0300)] 
sandbox: fix bloblist_finish() linker error if BLOBLIST=n

Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link
error:
```
ld: /tmp/ccwtRVty.ltrans0.ltrans.o: in function `state_uninit':
arch/sandbox/cpu/state.c:508: undefined reference to `bloblist_finish'
```

Fixes: 1c52fcca72b ("sandbox: Write out bloblist when exiting")
Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
16 months agofdt: Swap the signature for board_fdt_blob_setup()
Simon Glass [Sat, 2 Nov 2024 17:49:42 +0000 (11:49 -0600)] 
fdt: Swap the signature for board_fdt_blob_setup()

This returns a devicetree and updates a parameter with an error code.
Swap it, since this fits better with the way U-Boot normally works. It
also (more easily) allows leaving the existing pointer unchanged.

No yaks were harmed in this change, but there is a very small code-size
reduction.

For sifive, the OF_BOARD option must be set for the function to be
called, so there is no point in checking it again. Also OF_SEPARATE is
defined always.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
[trini: Update total_compute]
Signed-off-by: Tom Rini <trini@konsulko.com>
16 months agofdt: Correct condition for receiving bloblist
Simon Glass [Sat, 2 Nov 2024 17:49:41 +0000 (11:49 -0600)] 
fdt: Correct condition for receiving bloblist

The condition for receiving a bloblist from TPL is reversed. This was
only noticed are the other fixes landed. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
16 months agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into...
Tom Rini [Wed, 18 Dec 2024 14:01:48 +0000 (08:01 -0600)] 
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into next

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/23926

- Board: Support LicheeRV Nano
- Board: Support bananapi-f3
- Board: Switch to OF_UPSTREAM for StarFive JH7110
- Board: Add sdhci driver for TH1520 SoC

16 months agoMerge tag 'u-boot-stm32-20241218' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 18 Dec 2024 14:01:17 +0000 (08:01 -0600)] 
Merge tag 'u-boot-stm32-20241218' of https://source.denx.de/u-boot/custodians/u-boot-stm

CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/23931

- Restore SPL boot from sdcard for STM32MP1 platforms
- Fix STACK_SIZE for STM32 MCU's board

16 months agoboot: android: rework bootargs concatenation
Nicolas Belin [Tue, 17 Dec 2024 13:29:10 +0000 (14:29 +0100)] 
boot: android: rework bootargs concatenation

Rework the bootargs concatenation allocating more accurately
the length that is needed.
Do not forget an extra byte for the null termination byte as,
in some cases, the allocation was 1 byte short.

Fixes: 86f4695b ("image: Fix Android boot image support")
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20241217-fix-bootargs-concatenation-v2-3-b2fd7cf4e130@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
16 months agoboot: android: free newbootargs when done
Nicolas Belin [Tue, 17 Dec 2024 13:29:09 +0000 (14:29 +0100)] 
boot: android: free newbootargs when done

Free newbootargs when the concatenation is done and bootargs env
is set.

Fixes: 86f4695b ("image: Fix Android boot image support")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
Link: https://lore.kernel.org/r/20241217-fix-bootargs-concatenation-v2-2-b2fd7cf4e130@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
16 months agoboot: android: fix extra command line support
Nicolas Belin [Tue, 17 Dec 2024 13:29:08 +0000 (14:29 +0100)] 
boot: android: fix extra command line support

Check that the value at the address kcmdline_extra is not 0
instead of checking the address value itself keeping it
consistent with what is done for kcmdline.

Fixes: b36b227b ("android: boot: support extra command line")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
Link: https://lore.kernel.org/r/20241217-fix-bootargs-concatenation-v2-1-b2fd7cf4e130@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
16 months agoconfigs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0
Patrice Chotard [Mon, 16 Dec 2024 10:22:19 +0000 (11:22 +0100)] 
configs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0

Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
16 months agoconfigs: stm32mp1: Restore boot SPL from sdcard for Engicam MicroGEA STM32MP1 MicroDe...
Patrice Chotard [Mon, 16 Dec 2024 10:22:18 +0000 (11:22 +0100)] 
configs: stm32mp1: Restore boot SPL from sdcard for Engicam MicroGEA STM32MP1 MicroDev 2.0 7" OF

Restore boot SPL from sdcard for Engicam MicroGEA STM32MP1 MicroDev 2.0 7" OF

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
16 months agoconfigs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 EDIMM2.2
Patrice Chotard [Mon, 16 Dec 2024 10:22:17 +0000 (11:22 +0100)] 
configs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 EDIMM2.2

Restore boot SPL from sdcard for Engicam i.Core STM32MP1 EDIMM2.2.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
16 months agoconfigs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0
Patrice Chotard [Mon, 16 Dec 2024 10:22:16 +0000 (11:22 +0100)] 
configs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0

Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
16 months agoconfigs: stm32mp1: Restore boot SPL from sdcard for stm32mp15
Patrice Chotard [Mon, 16 Dec 2024 10:22:15 +0000 (11:22 +0100)] 
configs: stm32mp1: Restore boot SPL from sdcard for stm32mp15

Restore boot SPL from sdcard for STM32MP1 platforms.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
16 months agoARM: dts: stm32: Deduplicate CONFIG_OF_SPL_REMOVE_PROPS on DH STM32MP15xx DHSOM
Marek Vasut [Sun, 15 Dec 2024 23:29:15 +0000 (00:29 +0100)] 
ARM: dts: stm32: Deduplicate CONFIG_OF_SPL_REMOVE_PROPS on DH STM32MP15xx DHSOM

The content of CONFIG_OF_SPL_REMOVE_PROPS is the same in both
STM32MP15xx DHCOM and DHCOR defconfigs, deduplicate the content
into stm32mp15_dhsom.config .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
16 months agoARM: dts: stm32: Drop access-controllers from SPL DT on DH STM32MP15xx DHSOM
Marek Vasut [Sun, 15 Dec 2024 23:29:14 +0000 (00:29 +0100)] 
ARM: dts: stm32: Drop access-controllers from SPL DT on DH STM32MP15xx DHSOM

The access-controllers DT property is not useful in STM32MP15xx SPL,
remove it to reduce SPL control DT size. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
16 months agoARM: dts: stm32: Reinstate SPL_SYS_MMCSD_RAW_MODE on DH STM32MP15xx DHSOM
Marek Vasut [Sun, 15 Dec 2024 23:29:13 +0000 (00:29 +0100)] 
ARM: dts: stm32: Reinstate SPL_SYS_MMCSD_RAW_MODE on DH STM32MP15xx DHSOM

Commit 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
broke booting from SD card on STM32MP15xx , reinstate raw mode SD
boot configuration options and select the correct raw mode partition
for STM32MP15xx to fix SD boot on STM32MP15xx DHSOM.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Reported-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
16 months agoARM: dts: stm32: Reinstate missing root oscillators on DH STM32MP15xx DHCOR
Marek Vasut [Sun, 15 Dec 2024 23:29:12 +0000 (00:29 +0100)] 
ARM: dts: stm32: Reinstate missing root oscillators on DH STM32MP15xx DHCOR

The root oscillators reference used to be in rcc node since
3d15245502c4 ("ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver")
however this is not part of upstream stm32mp151.dtsi . The
RCC driver does need this reference, reinstate it locally.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
16 months agoARM: dts: stm32: Reinstate missing root oscillators on STM32MP15xx
Marek Vasut [Sun, 15 Dec 2024 23:31:38 +0000 (00:31 +0100)] 
ARM: dts: stm32: Reinstate missing root oscillators on STM32MP15xx

The root oscillators reference used to be in rcc node since
3d15245502c4 ("ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver")
however this is not part of upstream stm32mp151.dtsi . The
RCC driver does need this reference, reinstate it globally.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
16 months agoKconfig: Set STACK_SIZE to 16KB for STM32 MCUs
Patrice Chotard [Wed, 18 Dec 2024 07:58:33 +0000 (08:58 +0100)] 
Kconfig: Set STACK_SIZE to 16KB for STM32 MCUs

Since commit 6534d26ee9a5 ("lmb: do away with arch_lmb_reserve()"),
STM32F746-disco hangs when loading device tree just before starting
kernel:

Retrieving file: /stm32f746-disco.dtb
Kernel image @ 0xc0008000 [ 0x000000 - 0x19ae00 ]
Flattened Device Tree blob at c0408000
   Booting using the fdt blob at 0xc0408000
Working FDT set to c0408000
   Loading Device Tree to c05f8000, end c05ff71c ...

Adjust STACK_SIZE to 16KB for STM32 MCUs (F4/F7 and H7) boards
to fix kernel boot process as some of these boards embeds a limited
amount of memory.

Fixes: 6534d26ee9a5 ("lmb: do away with arch_lmb_reserve()")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
16 months agoriscv: spl: add FIT name for RISC-V Falcon mode
Randolph [Fri, 13 Dec 2024 06:51:16 +0000 (14:51 +0800)] 
riscv: spl: add FIT name for RISC-V Falcon mode

The FIT name in RISC-V Falcon mode should be different from that in
normal boot mode; it is called linux.itb. If the setting is missing
in common/spl, the normal boot file name will be used.

Signed-off-by: Randolph <randolph@andestech.com>
16 months agodoc: spacemit: bananapi_f3: document Banana Pi F3 board
Kongyang Liu [Sun, 15 Dec 2024 05:02:42 +0000 (13:02 +0800)] 
doc: spacemit: bananapi_f3: document Banana Pi F3 board

Add document for Banana Pi F3 board which based on SpacemiT's K1 SoC.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Signed-off-by: Huan Zhou <pericycle.cc@gmail.com>
Tested-by: Marcel Ziswiler <marcel@ziswiler.com>
Reviewed-by: Yixun Lan <dlan@gentoo.org>
16 months agoriscv: spacemit: bananapi_f3: initial support added
Kongyang Liu [Sun, 15 Dec 2024 05:02:41 +0000 (13:02 +0800)] 
riscv: spacemit: bananapi_f3: initial support added

Add basic support for SpacemiT's Banana Pi F3 board.
Update the k1.dtsi align with mainline.
Note that the device tree files follow the mainline Linux source[1].

Links: https://patches.linaro.org/project/linux-serial/patch/20240730-k1-01-basic-dt-v5-8-98263aae83be@gentoo.org/ [1]

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Signed-off-by: Huan Zhou <pericycle.cc@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Yixun Lan <dlan@gentoo.org>
Tested-by: Marcel Ziswiler <marcel@ziswiler.com>
16 months agoconfigs: th1520_lpi4a: enable mmc controller support
Maksim Kiselev [Wed, 11 Dec 2024 20:11:01 +0000 (23:11 +0300)] 
configs: th1520_lpi4a: enable mmc controller support

Enable driver for DesignWare MSHC. TH1520 supports all
speed modes up to HS400ES and UHS SDR105.

Also enable ADMA and mmc command.

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
16 months agoriscv: dts: t-head: Add sdhci and emmc nodes
Maksim Kiselev [Wed, 11 Dec 2024 20:11:00 +0000 (23:11 +0300)] 
riscv: dts: t-head: Add sdhci and emmc nodes

Add SDHCI and EMMC controlles nodes on TH-1520 SoC. And enable them for
Lichee module 4A.

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
16 months agommc: snps_sdhci: Add sdhci driver support for TH1520 SoC
Maksim Kiselev [Wed, 11 Dec 2024 20:10:59 +0000 (23:10 +0300)] 
mmc: snps_sdhci: Add sdhci driver support for TH1520 SoC

Add support for DesignWare SDHCI host controller on Alibaba TH1520 SoC

Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
16 months agoriscv: cpu: jh7110: Sort the list of imply statements
Hal Feng [Sun, 8 Dec 2024 09:19:42 +0000 (17:19 +0800)] 
riscv: cpu: jh7110: Sort the list of imply statements

The imply statements should be sorted in the sequence
of appearance in .config.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoboard: starfive: spl: Support multiple DTBs for JH7110 based boards
Hal Feng [Sun, 8 Dec 2024 09:19:41 +0000 (17:19 +0800)] 
board: starfive: spl: Support multiple DTBs for JH7110 based boards

Get product ID and the other information from EEPROM, use them to select
the correct DTB.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoboard: starfive: spl: Fix the wrong use of CONFIG_IS_ENABLED()
Hal Feng [Sun, 8 Dec 2024 09:19:40 +0000 (17:19 +0800)] 
board: starfive: spl: Fix the wrong use of CONFIG_IS_ENABLED()

The prefix "SPL_" is not needed when using CONFIG_IS_ENABLED().

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Fixes: 5ecf9b0b8a75 ("board: starfive: add StarFive VisionFive v2 board support")
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoriscv: dts: jh7110: Support multiple DTBs in a Fit image
Hal Feng [Sun, 8 Dec 2024 09:19:39 +0000 (17:19 +0800)] 
riscv: dts: jh7110: Support multiple DTBs in a Fit image

Support multiple DTBs for JH7110 based boards, so they can
select the correct DT at runtime.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Reviewed-by: E Shattow <lucent@gmail.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoconfigs: visionfive2: Enable MULTI_DTB_FIT for JH7110 based board DT
Hal Feng [Sun, 8 Dec 2024 09:19:38 +0000 (17:19 +0800)] 
configs: visionfive2: Enable MULTI_DTB_FIT for JH7110 based board DT

So JH7110 based boards can select their own DT at runtime.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Reviewed-by: E Shattow <lucent@gmail.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoboard: starfive: spl: Drop the unneeded DT modification code
Hal Feng [Sun, 8 Dec 2024 09:19:37 +0000 (17:19 +0800)] 
board: starfive: spl: Drop the unneeded DT modification code

As OF_UPSTREAM is implemented, these code are redundant.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoriscv: dts: jh7110: Add u-boot device tree for JH7110 based boards
Hal Feng [Sun, 8 Dec 2024 09:19:36 +0000 (17:19 +0800)] 
riscv: dts: jh7110: Add u-boot device tree for JH7110 based boards

To support the other JH7110 based boards, add u-boot
device tree for them.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Reviewed-by: E Shattow <lucent@gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: H Bell <dmoo_dv@protonmail.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoriscv: dts: jh7110: Move common code to the new jh7110-common-u-boot.dtsi
Hal Feng [Sun, 8 Dec 2024 09:19:35 +0000 (17:19 +0800)] 
riscv: dts: jh7110: Move common code to the new jh7110-common-u-boot.dtsi

To support JH7110 based boards besides v1.3B,
add a common dtsi and add common code to it.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Reviewed-by: E Shattow <lucent@gmail.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agopcie: starfive: Make the driver compatible with upstream DT
Hal Feng [Sun, 8 Dec 2024 09:19:34 +0000 (17:19 +0800)] 
pcie: starfive: Make the driver compatible with upstream DT

There are difference between upstream DT and the old DT
in terms of reg base, reset gpio and syscon. Make the driver
compatible with upstream DT.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agommc: dw_mmc: Add "starfive, jh7110-mmc" compatible to match upstream DT
Hal Feng [Sun, 8 Dec 2024 09:19:33 +0000 (17:19 +0800)] 
mmc: dw_mmc: Add "starfive, jh7110-mmc" compatible to match upstream DT

Make the U-Boot JH7110 MMC driver compatible with upstream DT.

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoriscv: dts: jh7110: Make u-boot device trees adapting to upstream DT
Hal Feng [Sun, 8 Dec 2024 09:19:32 +0000 (17:19 +0800)] 
riscv: dts: jh7110: Make u-boot device trees adapting to upstream DT

Add u-boot features to the U-Boot device tree.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Reviewed-by: E Shattow <lucent@gmail.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agodts: starfive: Switch to using upstream DT
Hal Feng [Sun, 8 Dec 2024 09:19:31 +0000 (17:19 +0800)] 
dts: starfive: Switch to using upstream DT

Enable OF_UPSTREAM to use upstream DT and add starfive/ prefix to
the DEFAULT_DEVICE_TREE. Rename jh7110-starfive-visionfive-2-u-boot.dtsi
to jh7110-starfive-visionfive-2-v1.3b-u-boot.dtsi and set the v1.3b
device tree as the default device tree.

Drop redundant DT files from arch/riscv/dts/ and redundant clock and
reset definitions from include/dt-bindings/.

Since the old clock definitions is a little different from those in
upstream Linux, update the clock definitions in clock drivers
accordingly.

Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: E Shattow <lucent@gmail.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
16 months agoboard: add support for LicheeRV Nano
Thomas Bonnefille [Tue, 12 Nov 2024 14:57:38 +0000 (15:57 +0100)] 
board: add support for LicheeRV Nano

The LicheeRV Nano is a small SBC using the Sophgo SG2002 RISCV SoC.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
16 months agoriscv: dts: sophgo: add device tree for LicheeRV Nano
Thomas Bonnefille [Tue, 12 Nov 2024 14:57:37 +0000 (15:57 +0100)] 
riscv: dts: sophgo: add device tree for LicheeRV Nano

Import a slightly modified version of the LicheeRV Nano and SG2002
device trees from the Linux Kernel. The current supported IPs are UART,
MMC, Timer, PLIC and CLINT.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
16 months agodoc: add LicheeRV Nano and SG2002 SoC
Thomas Bonnefille [Tue, 12 Nov 2024 14:57:36 +0000 (15:57 +0100)] 
doc: add LicheeRV Nano and SG2002 SoC

Provide a page describing the usage of U-Boot on the LicheeRV Nano and a
description of the board.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
16 months agoMerge branch 'u-boot-nand-20241212' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 17 Dec 2024 19:16:37 +0000 (13:16 -0600)] 
Merge branch 'u-boot-nand-20241212' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash into next

CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/23837

Small addition to uboot-nand. Nothing relevant for now. Anyway
a nice new command coming from Miquel Raynal and small changes.

16 months agonand: Add a watch command
Michael Trimarchi [Thu, 12 Dec 2024 18:28:07 +0000 (19:28 +0100)] 
nand: Add a watch command

This is a debug command to monitor the retention state of the data on
the array. The command needs a duplication of the mtd_read_oob()
function to actually return the maximum number of bitflips encountered
while reading the page. We could write a specific implementation for the
Sunxi driver but this is probably enough.

    nand watch <off> <size> - check an area for bitflips
    nand watch.part <part> - check a partition for bitflips
    nand watch.chip - check the whole device for bitflips

The output may be a bit verbose and could look like:

    => nand watch.chip
    device 0 whole chip
    size adjusted to 0xff60000 (5 bad blocks)

    NAND watch for bitflips in area 0x0-0xff60000:
    Page       0 (0x00000000) -> error -74
    Page       1 (0x00000800) -> error -74
    Page       2 (0x00001000) -> error -74
    Page       3 (0x00001800) -> error -74
    Page       4 (0x00002000) -> error -74
    Page       5 (0x00002800) -> error -74
    Page       6 (0x00003000) -> error -74
    Page       7 (0x00003800) -> error -74
    Page       8 (0x00004000) -> error -74
    Page       9 (0x00004800) -> error -74
    Page      10 (0x00005000) -> error -74
    Page      11 (0x00005800) -> error -74
    Page      12 (0x00006000) -> error -74
    Page      13 (0x00006800) -> error -74
    Page      14 (0x00007000) -> error -74
    Page      15 (0x00007800) -> error -74
    Page      16 (0x00008000) -> error -74
    Page      17 (0x00008800) -> error -74
    Page      18 (0x00009000) -> error -74
    Page      19 (0x00009800) -> error -74
    Page      20 (0x0000a000) -> error -74
    Page      21 (0x0000a800) -> error -74
    Page      22 (0x0000b000) -> error -74
    Page      23 (0x0000b800) -> error -74
    Page    1110 (0x0022b000) -> up to  1 bf/chunk
    Page    1122 (0x00231000) -> up to  1 bf/chunk
    Page    1132 (0x00236000) -> up to  1 bf/chunk
    Page    1362 (0x002a9000) -> up to  1 bf/chunk
    Page    4990 (0x009bf000) -> up to  1 bf/chunk
    Page    5728 (0x00b30000) -> up to  1 bf/chunk
    Page    7116 (0x00de6000) -> up to  1 bf/chunk
    Page    7160 (0x00dfc000) -> up to  1 bf/chunk
    Page    7494 (0x00ea3000) -> up to  1 bf/chunk
    Page   10842 (0x0152d000) -> up to  1 bf/chunk
    Page   11614 (0x016af000) -> up to  1 bf/chunk
    Page   11970 (0x01761000) -> up to  1 bf/chunk
    Page   12536 (0x0187c000) -> up to  1 bf/chunk
    Page   12687 (0x018c7800) -> up to  1 bf/chunk
    Page   14298 (0x01bed000) -> up to  1 bf/chunk
    Page   18268 (0x023ae000) -> up to  1 bf/chunk
    Page   18760 (0x024a4000) -> up to  1 bf/chunk
    Page   21440 (0x029e0000) -> up to  1 bf/chunk
    Page   22336 (0x02ba0000) -> up to  1 bf/chunk
    Page   22592 (0x02c20000) -> up to  1 bf/chunk
    Page   23872 (0x02ea0000) -> up to  1 bf/chunk
    Page   27584 (0x035e0000) -> up to  1 bf/chunk
    Page   35008 (0x04460000) -> up to  1 bf/chunk
    Page   37184 (0x048a0000) -> up to  1 bf/chunk
    Page   41728 (0x05180000) -> up to  1 bf/chunk
    Page   42176 (0x05260000) -> up to  1 bf/chunk
    Page   43200 (0x05460000) -> up to  1 bf/chunk
    Page   43328 (0x054a0000) -> up to  1 bf/chunk
    Page   45376 (0x058a0000) -> up to  1 bf/chunk
    Page   47040 (0x05be0000) -> up to  1 bf/chunk
    Page   47552 (0x05ce0000) -> up to  1 bf/chunk
    Page   49344 (0x06060000) -> up to  1 bf/chunk
    Page   49856 (0x06160000) -> up to  1 bf/chunk
    Page   62784 (0x07aa0000) -> up to  1 bf/chunk
    Page   65153 (0x07f40800) -> up to  1 bf/chunk
    Page   65228 (0x07f66000) -> up to  1 bf/chunk
    Page   65382 (0x07fb3000) -> up to  1 bf/chunk
    Page   98624 (0x0c0a0000) -> up to  1 bf/chunk
    Page  101952 (0x0c720000) -> up to  1 bf/chunk
    Page  107584 (0x0d220000) -> up to  1 bf/chunk
    Page  118208 (0x0e6e0000) -> up to  1 bf/chunk
    Page  126656 (0x0f760000) -> up to  1 bf/chunk
    Page  127680 (0x0f960000) -> up to  1 bf/chunk
    Page  129920 (0x0fdc0000) -> up to  1 bf/chunk
    Maximum number of bitflips: 1
    Pages with bitflips: 44/130752

It is also possible to reduce the output with the .quiet suffix in order
to just show the summary.

    => nand watch.chip
    device 0 whole chip
    size adjusted to 0xff60000 (5 bad blocks)

    NAND watch for bitflips in area 0x0-0xff60000:
    Maximum number of bitflips: 1
    Pages with bitflips: 44/130752

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
16 months agomtd: nand: raw: atmel: remove unnecessary return value
Marcus Folkesson [Fri, 9 Aug 2024 12:15:43 +0000 (14:15 +0200)] 
mtd: nand: raw: atmel: remove unnecessary return value

The condition 'ret' is always true as it is never set to other than
-EIO.

Remove 'ret' and the condition for copy.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Michael Trimarchi <micheal@amarulasolutions.com>
16 months agocmd: mtd: simplify mtd_show_device()
Heinrich Schuchardt [Mon, 9 Sep 2024 23:23:34 +0000 (01:23 +0200)] 
cmd: mtd: simplify mtd_show_device()

CONFIG_DM=y is always true.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
16 months agoMerge tag 'u-boot-imx-next-20241217' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 17 Dec 2024 19:15:58 +0000 (13:15 -0600)] 
Merge tag 'u-boot-imx-next-20241217' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/23877

- Add support for Apalis iMX8 1300MHz version.
- Don't advertise Gbit on (R)MII on the FEC controller.
- Fix srktool -c usage by removing spaces.

16 months agoARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top
Patrice Chotard [Fri, 13 Dec 2024 13:26:55 +0000 (14:26 +0100)] 
ARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top

Previously, all LMB marked with LMB_NOMAP (above and below ram_top)
are considered as invalid entry in TLB.

Since commit 1a48b0be93d4 ("lmb: prohibit allocations above ram_top
 even from same bank") all LMB located above ram_top are now marked
LMB_NOOVERWRITE and no more LMB_MAP.

This area above ram_top is reserved for OPTEE and must not be cacheable,
otherwise this leads to a Panic on some boards (Issue on STM32MP135F-DK).

Restore previous behavior by marking invalid entry all TLB above ram_top.

Fixes: 1a48b0be93d4 ("lmb: prohibit allocations above ram_top even from same bank")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
cc: Sughosh Ganu <sughosh.ganu@linaro.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
16 months agogitlab: Add an rpi to the sjg lab
Simon Glass [Fri, 13 Dec 2024 00:59:03 +0000 (17:59 -0700)] 
gitlab: Add an rpi to the sjg lab

I have an original rpi installed now, loaded with OS Lite (32-bit)
Add an entry for it so that it can be used for testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
16 months agoboot: Use correct PHASE_ variable for expo
Simon Glass [Sat, 7 Dec 2024 14:52:27 +0000 (07:52 -0700)] 
boot: Use correct PHASE_ variable for expo

This patch was written before the XPL change-over. Update the Makefile
condition to the new way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: ae3b5928d61 ("x86: coreboot: Allow building an expo for...")
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
16 months agotest/py: Always use the current dir as the source tree
Simon Glass [Wed, 11 Dec 2024 13:18:58 +0000 (06:18 -0700)] 
test/py: Always use the current dir as the source tree

The logic in get_details() retrieves the default source directory from
the Labgrid settings. This is convenient for interactive use, since it
allows pytests to be run from any directory and still find the source
tree.

However, it is not actually correct.

Gitlab sets the current directory to the source tree and expects that to
be used. At present it is ignored. The result is that Gitlab builds
whatever happens to be in the default source directory, ignoring the
tree it is supposed to be building.

Fix this by using the directory of the source tree, always. This is
obtained by looking at the grandparent of the conftest.py file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
Fixes: bf89a8f1fc2 ("test: Introduce the concept of a role")
Tested-by: Tom Rini <trini@konsulko.com>
16 months agoMerge patch series "Tegra: fix clock init"
Tom Rini [Mon, 16 Dec 2024 23:07:42 +0000 (17:07 -0600)] 
Merge patch series "Tegra: fix clock init"

Svyatoslav Ryhel <clamor95@gmail.com> says:

This should fix:
https://lore.kernel.org/all/20241201164810.GT3600562@bill-the-cat/T/#m2b62b471fd37e4c9725c98547e2a919cf11db5e5

Link: https://lore.kernel.org/r/20241213145319.10956-1-clamor95@gmail.com
16 months agodriver: clk: tegra: init basic clocks on probe
Svyatoslav Ryhel [Fri, 13 Dec 2024 14:53:19 +0000 (16:53 +0200)] 
driver: clk: tegra: init basic clocks on probe

In case DM drivers probe earlier than board clock setup is done
init of basic clocks should be done in CAR driver probe as well.
Add it to avoid possible clock related problems.

Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
16 months agodriver: clk: tegra: partially support PLL clocks
Svyatoslav Ryhel [Fri, 13 Dec 2024 14:53:18 +0000 (16:53 +0200)] 
driver: clk: tegra: partially support PLL clocks

Return PLL id into struct clk if PLL is parsed from device
tree instead of throwing an error. Allow requesting PLL
clock rate via get_rate op.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
16 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Mon, 16 Dec 2024 22:17:13 +0000 (16:17 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-mmc

CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/23871

- Fix potential timer value truncation

16 months agoimx: hab: fix srktool -c usage by removing spaces
Christoph Fritz [Mon, 16 Dec 2024 14:59:00 +0000 (15:59 +0100)] 
imx: hab: fix srktool -c usage by removing spaces

The srktool option -c does not allow spaces between certificate
filenames. Only commas (',') should separate the filenames. If spaces
are incorrectly included, srktool will not display an error or warning
message but will only process the first certificate in the list.

So adapt documentation accordingly.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
16 months agommc: Fix potential timer value truncation
Ronald Wahl [Wed, 11 Dec 2024 20:52:00 +0000 (21:52 +0100)] 
mmc: Fix potential timer value truncation

On 64bit systems the timer value might be truncated to a 32bit value
causing malfunctions. For example on ARM the timer might start from 0
again only after a cold reset. The 32bit overflow occurs after a bit
more than 49 days (1000 Hz counter) so booting after that time may lead
to a surprise because the board might become stuck requiring a cold
reset.

Signed-off-by: Ronald Wahl <ronald.wahl@legrand.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
16 months agosmbios: address build warning
Peng Fan [Tue, 3 Dec 2024 13:42:57 +0000 (21:42 +0800)] 
smbios: address build warning

include display_options.h to address build warning:
lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function ‘print_buffer’
[-Wimplicit-function-declaration]
         print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
         ^~~~~~~~~~~~

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
16 months agoarm: mach-k3: fix typo in devstat macro name
Prasanth Babu Mantena [Wed, 27 Nov 2024 06:13:34 +0000 (11:43 +0530)] 
arm: mach-k3: fix typo in devstat macro name

Fix spelling mistake in the board init files of j721e and j721s2.

s/WKUP_DEVSTAT_MCU_OMLY_MASK/WKUP_DEVSTAT_MCU_ONLY_MASK

Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
16 months agobios_emulator: fix incorrect printing of address in "jump near immediate"
Yuri Zaporozhets [Sun, 1 Dec 2024 22:28:49 +0000 (23:28 +0100)] 
bios_emulator: fix incorrect printing of address in "jump near immediate"

In the x86emuOp_jump_call_near_IMM() function the target address is
printed incorrectly when jumping backwards. For example instead of
"jmp 0xe8bc" the string "jmp ffffe8bc" is printed. That's because
of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
16 months agobios_emulator: fix incorrect printing of address in "call near immediate"
Yuri Zaporozhets [Sat, 30 Nov 2024 20:56:25 +0000 (21:56 +0100)] 
bios_emulator: fix incorrect printing of address in "call near immediate"

In the x86emuOp_call_near_IMM() function the address of CALL is
printed incorrectly when jumping backwards. For example, the correct
disassemble of the bytes below would be:

0000E8DE  E8DBFF            call 0xe8bc

(verified by ndisasm). But instead the address is printed as "ffffe8bc".
That's because of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
16 months agobios_emulator: fix garbled printing of disassembled SET* instructions
Yuri Zaporozhets [Tue, 26 Nov 2024 23:29:53 +0000 (00:29 +0100)] 
bios_emulator: fix garbled printing of disassembled SET* instructions

When DEBUG_DECODE_F is enabled in bios_emulator, the printing of
SET{O,NO,B,NB,Z,NZ,BE,NBE,S,NS,P,TP,L,NL,LE,NLE} instructions
is not followed by newline and is, therefore, immediately followed
by the printed address of a new instruction. This garbles the output
and makes it very difficult to read.

This patch adds missing DECODE_PRINTF("\n") calls to print newlines.

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
16 months agobios_emulator: fix garbled printing of disassembled BSF instruction
Yuri Zaporozhets [Tue, 26 Nov 2024 21:59:37 +0000 (22:59 +0100)] 
bios_emulator: fix garbled printing of disassembled BSF instruction

When DEBUG_DECODE_F is enabled in bios_emulator, the printing of BSF
instructions is garbled because the '\n' symbol is used instead of
the correct '\t'. Fix that.

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
16 months agonet: fec: phy: Don't advertise Gbit on (R)MII
Alexander Sverdlin [Thu, 12 Dec 2024 17:25:24 +0000 (18:25 +0100)] 
net: fec: phy: Don't advertise Gbit on (R)MII

Currently if a gigabit-capable PHY is connected to FEC via RMII or MII, it
will advertise 1000FULL and 1000HALF to a link partner.

Different problems may arise here:
- usually with (R)MII between MAC and PHY the PHY's connection to magnetics
would have only 2 pairs routed as well, otherwise a PHY can negotiate 1000
speed and there will be no traffic possible;
- but even if there is no way to negotiate 1000 speed in HW (only 2 signal
pairs routed), it may take a lot of time for PHY to figure this out; in
case of AD1300 it takes 17-20 seconds, which is waay longer than default
4s PHY_ANEG_TIMEOUT.

Use phy_set_supported() in such cases to disable gigabit advertised
options.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
16 months agoimx: mach: imx8: fdt: set correct frequencies for the industrial SoC
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:55 +0000 (13:18 +0100)] 
imx: mach: imx8: fdt: set correct frequencies for the industrial SoC

Set correct CPU and GPU frequencies for the industrial i.MX8 SoC
variant.

Ensure that the CPU and GPU frequencies are properly configured for the
industrial variant of the SoC. According to the "i.MX 8QuadMax
Industrial Applications Processors" datasheet, the frequency limits for
this variant are as follows:
- Cortex-A72: 1.296 GHz
- Cortex-A53: 1.104 GHz
- GPU core: 625 MHz
- GPU shader: 625 MHz

The CPU clock is enforced by the System Controller Firmware (SCFW), but
the cpufreq driver is unaware of this enforcement. By removing
unsupported frequencies from the operating points, we ensure that the
cpufreq driver aligns correctly with the SCFW's settings.

The GPU frequency, on the other hand, is not enforced by the SCFW. As a
result, the GPU could potentially be overclocked. To prevent this, we
set the correct clock frequency and update the operating points
accordingly, ensuring compliance with the datasheet specifications.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
16 months agotoradex: apalis-imx8: simplify module version handling
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:54 +0000 (13:18 +0100)] 
toradex: apalis-imx8: simplify module version handling

Simplify module version handling by removing the special case for the
Apalis iMX8QM.

The Apalis iMX8QM has been treated as a special case in module version
handling, but was always the default. By removing this special handling,
the code is simplified and easier to maintain.

We will not print the message "Unknown Apalis iMX8 module" anymore.
However, we still handle this because if the config block is missing we
show "MISSING TORADEX CONFIG BLOCK" and if the serial number is unknown
we show "Model: Toradex 0000 UNKNOWN MODULE V1.1A". Therefore, it is
still possible to detect such issues.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
16 months agotoradex: tdx-cfg-block: add new apalis imx8 pids
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:53 +0000 (13:18 +0100)] 
toradex: tdx-cfg-block: add new apalis imx8 pids

Add new PIDs for the Apalis iMX8 modules featuring the industrial
variant of the SoC, which supports a maximum CPU frequency of 1300 MHz.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
16 months agotoradex: tdx-cfg-block: increase indentation for longer defines
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:52 +0000 (13:18 +0100)] 
toradex: tdx-cfg-block: increase indentation for longer defines

This preparation step ensures that the first column has sufficient space
to handle longer defines. This is necessary for the new Apalis iMX8
defines.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
16 months agotoradex: tdx-cfg-block: set apalis imx8dxp to always disabled
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:51 +0000 (13:18 +0100)] 
toradex: tdx-cfg-block: set apalis imx8dxp to always disabled

Apalis iMX8DXP 1GB is currently set to enable when compiling for Apalis
iMX8. This is a mistake the Apalis iMX8DXP 1GB was never released and is
not compatible to the Apalis iMX8 series.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
16 months agoMerge tag 'fsl-qoriq-2024-12-15' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sun, 15 Dec 2024 14:02:46 +0000 (08:02 -0600)] 
Merge tag 'fsl-qoriq-2024-12-15' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq

CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/23856

- Use strcat to replace sprintf for t208xqds
- Fix bootefi for board ls1028a
- Various fixes to sl28 board

16 months agoMerge tag 'doc-2025-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 15 Dec 2024 14:02:22 +0000 (08:02 -0600)] 
Merge tag 'doc-2025-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2025-01-rc5

Documentation:

* sending_patches: Fix spelling of "its"
* environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN
* remove redundant Rockchip bindings
* fwu_updates: Fix formatting
* coolpi: Fix document style
* board: theobroma-systems: fix feature list in introductions

Fix typos in code comments:

* clk: mpc83xx: Fix typo in "Coherent System Bus"
* efi_loader: Fix typos in enum efi_allocate_type

16 months agoboard: freescale: Replace invalid usage of sprintf by strcat
Francois Berder [Wed, 10 Jul 2024 21:37:35 +0000 (23:37 +0200)] 
board: freescale: Replace invalid usage of sprintf by strcat

buf was used as destination and as parameter to sprintf
which triggers an undefined behaviour.
This commit removes this usage of sprintf and uses strcat
to append strings to buf variable.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
16 months agoconfigs: ls1028a: Fix bootefi issue on Layerscape ls1028ardb platform
Wei Ming Chen [Sun, 13 Oct 2024 07:24:35 +0000 (15:24 +0800)] 
configs: ls1028a: Fix bootefi issue on Layerscape ls1028ardb platform

Without this patch, there will be error indicating that
"Cannot use 64 bit addresses with SDMA", and the booting
process will stuck.

please see full boot log below

U-Boot 2022.04-g18185931 (Sep 11 2024 - 13:15:30 +0800)

SoC:  LS1028AE Rev1.0 (0x870b0010)
Clock Configuration:
       CPU0(A72):1500 MHz  CPU1(A72):1500 MHz
       Bus:      400  MHz  DDR:      1600 MT/s
Reset Configuration Word (RCW):
       000000003c004010 00000030 00000000 00000000
       0000001000000000 018f0000 0030c000 00000000
       00000020020031a0 00002580 00000000 00003296
       0000003000000000 00000010 00000000 00000000
       0000004000000000 00000000 00000000 00000000
       0000005000000000 00000000 00000000 00000000
       0000006000000000 00000000 200e705a 00000000
       00000070bb580000 00000000
Model: LS1028A RDB Board
Board: LS1028AE Rev1.0-RDB, Version: C, boot from SD
FPGA: v8 (RDB)
SERDES1 Reference : Clock1 = 100.00MHz Clock2 = 100.00MHz
DRAM:  3.9 GiB
DDR    3.9 GiB (DDR4, 32-bit, CL=11, ECC on)
Using SERDES1 Protocol: 47960 (0xbb58)
PCIe1: pcie@3400000 Root Complex: no link
PCIe2: pcie@3500000 Root Complex: x1 gen2
Core:  45 devices, 22 uclasses, devicetree: separate
WDT:   Started watchdog@c000000 with servicing (60s timeout)
WDT:   Started watchdog@c010000 with servicing (60s timeout)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

EEPROM: Invalid ID (ff ff ff ff)
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Net:
Warning: enetc-0 (eth0) using random MAC address - d2:9b:a5:37:7b:b5
eth0: enetc-0
Warning: enetc-2 (eth1) using random MAC address - ca:57:11:de:de:cb
, eth1: enetc-2, eth2: swp0, eth3: swp1, eth4: swp2, eth5: swp3
Hit any key to stop autoboot:  0
Trying load HDP firmware from SD..
switch to partitions #0, OK
mmc0 is current device
Device: FSL_SDHC
Manufacturer ID: 9f
OEM: 5449
Name: SD32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 28.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

MMC read: dev # 0, block # 18944, count 512 ... 512 blocks read: OK
Loading hdp firmware from 0x00000000a0000000 offset 0x0000000000002000
Loading hdp firmware Complete
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@2140000.blk...
Scanning disk mmc@2150000.blk...
Found 7 disks
ERROR: invalid device tree
Found EFI removable media binary efi/boot/bootaa64.efi
981992 bytes read in 44 ms (21.3 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
WARNING could not find node vivante,gc: FDT_ERR_NOTFOUND.
Booting /efi\boot\bootaa64.efi
Cannot use 64 bit addresses with SDMA
Error reading cluster
** Unable to read file /efi/boot/grubaa64.efi **
Unexpected return from initial read: Device Error, buffersize 29D790
Failed to load image ぀¬ : Device Error
start_image() returned Device Error
EFI LOAD FAILED: continuing...
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
BootOrder not defined
EFI boot manager: Cannot load any image
Scanning mmc 1:2...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
BootOrder not defined
EFI boot manager: Cannot load any image
starting USB...
Bus usb@3100000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3110000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@3100000 for devices... 1 USB Device(s) found
scanning bus usb@3110000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Trying load from SD ...
switch to partitions #0, OK
mmc0 is current device
Device: FSL_SDHC
Manufacturer ID: 9f
OEM: 5449
Name: SD32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 28.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

MMC read: dev # 0, block # 32768, count 81920 ... 81920 blocks read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
16 months agodoc: cosmetic: fwu_updates: Fix formatting
Leonard Anderweit [Fri, 13 Dec 2024 10:20:24 +0000 (11:20 +0100)] 
doc: cosmetic: fwu_updates: Fix formatting

Remove one of the double colon so ..code-block is used for formatting.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
16 months agodoc: environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN
Jerome Forissier [Tue, 3 Dec 2024 13:50:51 +0000 (14:50 +0100)] 
doc: environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN

Document environment variables set by the dhcp command when the network
stack is lwIP.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
16 months agodoc: board: theobroma-systems: fix feature list in introductions
Quentin Schulz [Mon, 2 Dec 2024 13:01:26 +0000 (14:01 +0100)] 
doc: board: theobroma-systems: fix feature list in introductions

Board introductions have a feature list which isn't formatted properly
according to rST and is thus rendered incorrectly.

Fix this by adding the missing newlines in the appropriate places.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
16 months agoefi_loader: Fix typos in enum efi_allocate_type
Simon Glass [Sun, 1 Dec 2024 15:24:21 +0000 (08:24 -0700)] 
efi_loader: Fix typos in enum efi_allocate_type

Fix 'indicatged' and 'adress' typos.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
16 months agodoc: coolpi: Fix document style
Andy Yan [Mon, 2 Dec 2024 12:03:53 +0000 (20:03 +0800)] 
doc: coolpi: Fix document style

Add a blank line after title "Specification:" to
make it render correctly html.

And also remove the useless > in bash code block.

Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
16 months agodoc: remove redundant Rockchip bindings
Johan Jonker [Sat, 30 Nov 2024 21:18:57 +0000 (22:18 +0100)] 
doc: remove redundant Rockchip bindings

Most Rockchip device tree related bindings are converted to YAML
and available in the U-boot /dts/upstream/Bindings/ directory.
Remove all redundant U-boot entries.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
16 months agodoc: sending_patches: Fix spelling of "its"
J. Neuschäfer [Fri, 29 Nov 2024 19:42:29 +0000 (20:42 +0100)] 
doc: sending_patches: Fix spelling of "its"

Although it has historically been different, the current standard
spelling of the neutral singular possessive pronoun is "its".

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
16 months agoclk: mpc83xx: Fix typo in "Coherent System Bus"
J. Neuschäfer [Fri, 29 Nov 2024 19:42:28 +0000 (20:42 +0100)] 
clk: mpc83xx: Fix typo in "Coherent System Bus"

Cosmetic change.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
16 months agoboard: sl28: fix USB0
Michael Walle [Fri, 13 Dec 2024 10:23:21 +0000 (11:23 +0100)] 
board: sl28: fix USB0

Since commit 61ff13283c3b ("board: sl28: move to OF_UPSTREAM") USB0 is
broken because the former u-boot soc dtsi was setting dr_mode to "host"
but the linux device tree isn't. That is because linux fully supports
OTG but u-boot doesn't. Therefore, u-boot only ever enabled host mode
and never OTG mode. Add it to our board "-u-boot.dtsi" to fix it.

Fixes: 61ff13283c3b ("board: sl28: move to OF_UPSTREAM")
Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Michael Walle <mwalle@kernel.org>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
16 months agodoc: board: sl28: fix table
Michael Walle [Fri, 13 Dec 2024 10:23:20 +0000 (11:23 +0100)] 
doc: board: sl28: fix table

Convert the table to a correct reST table syntax.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
16 months agoboard: sl28: fix network on variant 3
Michael Walle [Fri, 13 Dec 2024 10:23:19 +0000 (11:23 +0100)] 
board: sl28: fix network on variant 3

Network is broken on variant 3 boards since commit 61ff13283c3b ("board:
sl28: move to OF_UPSTREAM") because it was removing the variant 3
handling. That is because at that time the var3 device tree was not
upstream. FWIW variant 3 is actually the same as the base variant, but
I've missed that the -u-boot.dtsi is not inlcuded in this case which
will set the ethernet alias.  Now that the var3 device tree is upstream,
just re-add it to the SPL handling again.

Fixes: 61ff13283c3b ("board: sl28: move to OF_UPSTREAM")
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
16 months agoboard: sl28: increase SPL_SYS_MALLOC_SIZE
Michael Walle [Fri, 13 Dec 2024 10:23:18 +0000 (11:23 +0100)] 
board: sl28: increase SPL_SYS_MALLOC_SIZE

Increase the malloc size to 2MiB because our FIT image exceeds the 1MiB
limit either if BL31 mode is enabled or if another device tree is added
to the image.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
16 months agoboard: sl28: fix linking with disabled watchdog
Michael Walle [Fri, 13 Dec 2024 10:23:17 +0000 (11:23 +0100)] 
board: sl28: fix linking with disabled watchdog

We don't have a reference to the driver used by
uclass_get_device_by_driver() in stop_recovery_watchdog(). Fix it by not
calling that function if the watchdog driver isn't enabled.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>