Patrick Delaunay [Fri, 15 Apr 2022 09:46:50 +0000 (11:46 +0200)]
board: st: common: fix the error messages in stboard command
Add missing \n at the end of the error trace
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Yannick Fertre [Wed, 6 Apr 2022 08:41:35 +0000 (10:41 +0200)]
video: stm32: stm32_ltdc: support several hardware versions
Register mapping & pixel formats depend on version of ltdc
display controller.
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Yannick FERTRE [Wed, 6 Apr 2022 08:37:42 +0000 (10:37 +0200)]
video: stm32: stm32_ltdc: fix data enable polarity
Wrong DISPLAY_FLAGS used to set the data enable polarity.
Signed-off-by: Yannick FERTRE <yannick.fertre@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrick Delaunay [Mon, 28 Mar 2022 17:25:33 +0000 (19:25 +0200)]
stm32mp: stm32prog: handle flashlayout without STM32 image header
Accept flashlayout without header in alternate 0, to simplify
the support of stm32prog command with dfu-util.
By default the flashlayout file size is the size of the received binary,
provided with the offset in the DFU alternate.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrick Delaunay [Mon, 28 Mar 2022 17:25:32 +0000 (19:25 +0200)]
stm32mp: stm32prog: handle U-Boot script in flashlayout alternate
Update the stm32prog command to allow the reception of U-Boot script in
the FlashLayout alternate during the first USB enumeration.
This patch is aligned with the last TF-A behavior: the Flashlayout
is now loaded by U-Boot; it is no more present at STM32_DDR_BASE when
the stm32prog is launched after a serial boot, on UART or on USB.
The received script must be a U-Boot legacy image, no more need to add
a stm32image header.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrick Delaunay [Mon, 28 Mar 2022 17:25:31 +0000 (19:25 +0200)]
stm32mp: stm32prog: handle interruption during the first enumeration
When an interruption is received during the first USB enumeration
used to received the FlashLayout, with handle ctrl-c, the second
enumeration is not needed and the result for stm32prog_usb_loop
is false (reset is not needed).
This patch avoids the need of a second ctrl to interrupt the command
stm32prog.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrick Delaunay [Mon, 28 Mar 2022 17:25:30 +0000 (19:25 +0200)]
stm32mp: stm32prog: add support of UUID for FIP partition
Add support of UUID for FIP parttion, required by Firmware update
support in TF-A:
- UUID TYPE for FIP partition:
19d5df83-11b0-457b-be2c-
7559c13142a5
- "fip-a" partition UUID:
4fd84c93-54ef-463f-a7ef-
ae25ff887087
- "fip-b" partition UUID:
09c54952-d5bf-45af-acee-
335303766fb3
This check is done with a new partition type "FIP" associated
at the FIP UUID.
The A/B partition UUID is detected by the partition name:
"fip-a", "fip-b".
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrick Delaunay [Mon, 28 Mar 2022 17:25:29 +0000 (19:25 +0200)]
stm32mp: stm32prog: add support of STM32IMAGE version 2
Add support of new header for the STM32IMAGE version V2
in command stm32prog command for STM32MP13x family.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrick Delaunay [Mon, 28 Mar 2022 17:25:28 +0000 (19:25 +0200)]
stm32mp: stm32prog: add TEE support in stm32prog command
When OP-TEE is used, the SMC for BSEC management are not
available and the PTA provisioning for OTP must be used.
U-Boot opens the session to this PTA and use it for OTP
access.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrick Delaunay [Mon, 28 Mar 2022 17:25:27 +0000 (19:25 +0200)]
stm32mp: stm32prog: add CONFIG_CMD_STM32PROG_OTP
Add a configuration flag CONFIG_CMD_STM32PROG_OTP to enable the support of
OTP update in stm32prog command.
This new configuration allows to deactivate this feature for security reason
and it is a preliminary step for support of OPT update with the OP-TEE
provisioning TA.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrick Delaunay [Mon, 28 Mar 2022 17:25:26 +0000 (19:25 +0200)]
stm32mp: stm32prog: fix comment
Fix "partition" in comment.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tom Rini [Mon, 9 May 2022 16:49:31 +0000 (12:49 -0400)]
Prepare v2022.07-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sun, 8 May 2022 15:31:48 +0000 (11:31 -0400)]
Merge tag 'efi-2022-07-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-07-rc3-2
UEFI:
* Fix build errors due to
- using sed with non-standard extension for regular expression
- target architecture not recognized for CROSS_COMPILE=armv7a-*
- CONFIG_EVENT not selected
* add sha384/512 on certificate revocation
Others:
* factor out the user input handling in bootmenu command
Tom Rini [Sun, 8 May 2022 15:29:50 +0000 (11:29 -0400)]
Merge branch '2022-05-06-assorted-updates'
- Drop "linux,phandle" setting code, it's very long obsolete.
- Add ability to fix broken GPT via backup GPT.
Ilias Apalodimas [Fri, 6 May 2022 12:36:01 +0000 (15:36 +0300)]
test/py: Add more test cases for rejecting an EFI image
The previous patch adds support for rejecting images when the sha384/512
of an x.509 certificate is present in dbx. Update the sandbox selftests
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Fri, 6 May 2022 12:36:00 +0000 (15:36 +0300)]
efi_loader: add sha384/512 on certificate revocation
Currently we don't support sha384/512 for the X.509 certificate
in dbx. Moreover if we come across such a hash we skip the check
and approve the image, although the image might needs to be rejected.
Rework the code a bit and fix it by adding an array of structs with the
supported GUIDs, len and literal used in the U-Boot crypto APIs instead
of hardcoding the GUID types.
It's worth noting here that efi_hash_regions() can now be reused from
efi_signature_lookup_digest() and add sha348/512 support there as well
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Masahisa Kojima [Thu, 28 Apr 2022 08:09:45 +0000 (17:09 +0900)]
bootmenu: factor out the user input handling
This commit moves the user input handling from cmd/bootmenu.c
to common/menu.c to reuse it from other modules.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Jan Kiszka [Wed, 27 Apr 2022 05:47:15 +0000 (07:47 +0200)]
efi_loader: Select EVENT as well
Fixes
WARNING: unmet direct dependencies detected for EVENT_DYNAMIC
Depends on [n]: EVENT [=n]
Selected by [y]:
- EFI_LOADER [=y] && OF_LIBFDT [=y] && ...
and the succeeding build breakage.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 6 May 2022 11:28:52 +0000 (13:28 +0200)]
tools: mkimage: set OPENSSL_API_COMPAT
Building with OpenSSL 3.0 produces warnings like:
../tools/sunxi_toc0.c:846:17: warning: ‘RSA_get0_d’ is deprecated:
Since OpenSSL 3.0 [-Wdeprecated-declarations]
846 | if (root_key && RSA_get0_d(root_key)) {
| ^~
As OpenSSL 3.0 is not available in elder Linux distributions
just silence the warning.
Add missing #include <openssl/bn.h>.
Fixes:
e9e87ec47c75 ("tools: mkimage: Add Allwinner TOC0 support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Sean Anderson [Fri, 8 Apr 2022 20:08:39 +0000 (16:08 -0400)]
mkimage: Document misc options
Over the years, several options have not made it into the help message.
Document them. Do the same for the man page.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Heinrich Schuchardt [Sat, 7 May 2022 20:58:39 +0000 (22:58 +0200)]
Makefile: support CROSS_COMPILE=armv7a-*
Gentoo uses armv7a-hardfloat-linux-gnueabi- as cross compiler prefix.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mark Kettenis [Thu, 5 May 2022 14:42:23 +0000 (16:42 +0200)]
Makefile: Avoid non-portable GNU sed extension
Use [:space:] instead of \s and \S in regular expression that
determines the sandbox target architecture. Fixes the build
failure on OpenBSD introduced with commit
4e65ca00f3a3
("efi_loader: bootmgr: add booting from removable media").
Fixes:
f7691a6d736b ("sandbox: allow cross-compiling sandbox")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
John Keeping [Wed, 20 Apr 2022 10:31:11 +0000 (11:31 +0100)]
fdt: don't set linux,phandle
This has been deprecated for over 10 years and everything now uses the
plain "phandle" property in preference. There's no need to set
linux,phandle when creating phandles for nodes that do not have one.
dtc changed the default to creating just phandle in version 1.4.5
released in September 2017 with the justification that the new style had
already been supported for 7 years by that point (see dtc commit 0016f8c
("dtc: change default phandles to ePAPR style instead of both")).
Signed-off-by: John Keeping <john@metanate.com>
Philippe Reynes [Fri, 22 Apr 2022 15:46:50 +0000 (17:46 +0200)]
test: py: tests: test_gpt.py: add a simple test for the command gpt repair
Adds a simple test for the command gpt repair.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Fri, 22 Apr 2022 15:46:49 +0000 (17:46 +0200)]
cmd: gpt: add subcommand repair
Adds a sub-command repair to the command gpt
that allow to repair a corrupted gpt table. If
the both gpt table (primary and backup) are
valid, then the command does nothing.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Fri, 22 Apr 2022 15:46:48 +0000 (17:46 +0200)]
disk: part_efi: add support to repair gpt table
If a gpt table is corrupted (after a power cut
for example), then the gpt table should repaired.
The function gpt_repair_headers check if at least
one gpt table is valid, and then only write the
corrupted gpt table.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Tom Rini [Fri, 6 May 2022 12:57:15 +0000 (08:57 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Fri, 6 May 2022 12:57:03 +0000 (08:57 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog
- Add MAX6370 watchdog timer driver (Pali)
Patrice Chotard [Fri, 6 May 2022 06:22:35 +0000 (08:22 +0200)]
usb: host: ehci-generic: Remove DM_REGULATOR flag
Since commit
16cc5ad0b439 ("power: regulator: add dummy helper")
regulator dummy helper are always available even if DM_REGULATOR
is not set.
DM_REGULATOR flag is no more needed to protect no DM core,
remove it.
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Patrice Chotard [Fri, 6 May 2022 06:22:34 +0000 (08:22 +0200)]
usb: host: ehci-generic: Make usage of clock/reset bulk() API
Make usage of clock and reset bulk API in order to simplify the code
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Pali Rohár [Mon, 2 May 2022 16:41:07 +0000 (18:41 +0200)]
watchdog: Add MAX6370 watchdog timer driver
MAX6370 watchdog is available e.g. on Freescale P1/P2 RDB-PC boards.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tom Rini [Thu, 5 May 2022 23:37:22 +0000 (19:37 -0400)]
Merge branch '2022-05-05-assorted-cleanups-and-fixes'
- Assorted minor code cleanups.
- Clean-up the reset uclass code slightly and fix some issues with a
lack of handlers for a case in the driver.
- Y2038 RTC fix
Pali Rohár [Fri, 29 Apr 2022 14:36:23 +0000 (16:36 +0200)]
misc: fs_loader: Fix compile warnings when CONFIG_CMD_UBIFS is enabled
drivers/misc/fs_loader.c: In function ‘mount_ubifs’:
drivers/misc/fs_loader.c:46:12: warning: implicit declaration of function ‘ubi_part’ [-Wimplicit-function-declaration]
int ret = ubi_part(mtdpart, NULL);
^~~~~~~~
drivers/misc/fs_loader.c:53:9: warning: implicit declaration of function ‘cmd_ubifs_mount’ [-Wimplicit-function-declaration]
return cmd_ubifs_mount(ubivol);
^~~~~~~~~~~~~~~
drivers/misc/fs_loader.c: In function ‘umount_ubifs’:
drivers/misc/fs_loader.c:58:9: warning: implicit declaration of function ‘cmd_ubifs_umount’ [-Wimplicit-function-declaration]
return cmd_ubifs_umount();
^~~~~~~~~~~~~~~~
Signed-off-by: Pali Rohár <pali@kernel.org>
Marek Vasut [Tue, 26 Apr 2022 21:43:30 +0000 (23:43 +0200)]
reset: Return 0 if ops unimplemented and remove empty functions
In case the ops is not implemented, return 0 in the core right away.
This is better than having multiple copies of functions which just
return 0 in each reset driver. Drop all those empty functions.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Tue, 26 Apr 2022 21:26:31 +0000 (23:26 +0200)]
clk: scmi: fix scmi_clk_get_attibute()
Local variable out.name lives on the stack and therefore cannot
be returned directly. Move the strdup() call into the function.
(Coverity 352460)
Fixes:
7c33f78983c3 ("clk: scmi: register scmi clocks with CCF")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Mark Kettenis [Tue, 26 Apr 2022 17:24:38 +0000 (19:24 +0200)]
tools: mkimage: Avoid ENODATA in host tools
ENODATA isn't part of POSIX. Use EINVAL instead.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Oliver Graute [Tue, 26 Apr 2022 07:26:12 +0000 (09:26 +0200)]
rtc: rv8803: fix off-by-one in month counting
tm_mon has a range from 0..11, but the RTC expects 1..12. So we adapt
the month accordingly. This was determined when comparing the driver
with the corresponding linux kernel driver.
Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Reviewed-by: Heiko Schocher <hs@denx.de>
Heinrich Schuchardt [Mon, 25 Apr 2022 21:11:06 +0000 (23:11 +0200)]
cmd: mmc: don't assign unused values
Don't assign a value to variable speedmode which is never used.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Mon, 25 Apr 2022 21:01:44 +0000 (23:01 +0200)]
cmd: onenand: fix printf codes
For printing size_t use %zu or %zx.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Mon, 25 Apr 2022 20:26:45 +0000 (22:26 +0200)]
cmd: simplify do_adc_single()
If argc is not < 3, it must be >= 3.
If argc >= 3, argv[2] cannot be NULL.
Fixes:
9de612ae4ded ("cmd: adc: Add support for storing ADC result in env variable")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Mon, 25 Apr 2022 16:35:05 +0000 (18:35 +0200)]
cmd: fix long text for fdt command
We don't have an option -cq but two distinct options -c and -q.
Fixes:
e9496ec37440 ("fdt: Add -q option to fdt addr for distro_bootcmd")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Jan Kiszka [Sun, 24 Apr 2022 09:34:56 +0000 (11:34 +0200)]
lib/date: Make rtc_mktime and mktime64 Y2038-ready
We currently overflow due to wrong types used internally in rtc_mktime,
on all platforms, and we return a too small type on 32-bit.
One consumer that directly benefits from this is mktime64. Many others
may still store the result in a wrong type.
While at it, drop the redundant cast of mon in rtc_mktime (obsoleted by
714209832db1).
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Sean Anderson [Fri, 22 Apr 2022 18:50:23 +0000 (14:50 -0400)]
serial: smh: Check return value of strndup
strndup can fail. Check for it.
Fixes:
4855b39be ("serial: smh: Implement puts for DM")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Nicolas Heemeryck [Wed, 20 Apr 2022 21:58:39 +0000 (23:58 +0200)]
tools/imagetool: Fix segfault when tparams->verify_header is NULL
On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.
Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.
Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>
Tom Rini [Thu, 5 May 2022 18:47:31 +0000 (14:47 -0400)]
configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 5 May 2022 18:42:02 +0000 (14:42 -0400)]
Merge branch '2022-05-05-platform-updates'
- Nuvoton NPCM750 board support and some related drivers
- MediaTek pinctrl updates
- Bugfixes for sandbox, ls10xxx, and 64bit TI platforms
Stanley Chu [Fri, 25 Feb 2022 02:14:50 +0000 (10:14 +0800)]
gpio: npcm: Add support for Nuvoton NPCM SoCs
Add Nuvoton BMC NPCM7xx/NPCM8xx gpio driver
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Aswath Govindraju [Tue, 19 Apr 2022 15:26:02 +0000 (20:56 +0530)]
include: configs: am**x/j721e/j721s2_evm.h: Move the stack pointer init address in arm64
Currently, in case of arm64 bootloader and U-Boot the stack pointer is
initialized at an offset of NON_SECURE_MSRAM_SIZE from arm64 SPL's text
base address. After jumping to arm64, execution is done out of DDR.
Therefore, having an offset corresponding to the size of MSRAM does not
have any significance.
Instead, initialize the stack pointer after an offset of 4MB from the SPL
text base address. This helps in allocating larger memory for stack.
┌────────────────────┐0x80080000
│ │
│ arm64 SPL │
├────────────────────┤
│ ▲ │
│ │ │
│ STACK │
├────────────────────┤0x80480000
│ Memory for Load │
│ Buffer Allocation │
├────────────────────┤0x80800000
│ │
│ U-Boot Image │
│ │
└────────────────────┘
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Sam Shih [Thu, 21 Apr 2022 06:23:53 +0000 (14:23 +0800)]
pinctrl: mediatek: add support for different types of IO pins
There are many pins in an SoC, and register usage may vary by pins.
This patch introduces a concept of "io type" and "io type group"
to mediatek pinctrl drivers. This can provide different pinconf
handlers implementation (eg: "bias-pull-up/down", "driving" and
"input-enable") for IO pins that belong to different types.
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Sam Shih [Thu, 21 Apr 2022 06:23:52 +0000 (14:23 +0800)]
pinctrl: mediatek: introduce multiple memory bases support
Pinctrl design of some mediatek SoC need to access registers that
distribute in multiple memory base address. this patch introduce new
mechanism in mediatek pinctrl driver to support the chips which have
the new design.
This patch add a member 'base_calc' in pinctrl private data, and changed
original 'base' private data to an array of *iomem.
When 'base_calc' attribute is set, it will requests multiplue regs base
from the DT, if 'base_calc' attribute is not set, it only use legacy way
to request single reg resource from the DT.
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Sam Shih [Thu, 21 Apr 2022 06:23:51 +0000 (14:23 +0800)]
pinctrl: mediatek: rewrite mtk_pinconf_set and related functions
There are many pins in a SoCs, and different pin may belong
to different "io_type", For example: some pins of MT7622 belongs
to "io_type A", the other belongs to "io_type B", and pinctrl "V0"
means handle pinconf via "io_type A" or "io_type B", so SoCs that
contain "io_type A" and "io_type B" pins, use "V0" in pinctrl driver.
This patch separates the implementation of register operations
(e.g: "bias-pull-up/down", "driving" and "input-enable") into
different functions, and lets the original V0/V1
ops to call the new functions.
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Simon Glass [Wed, 27 Apr 2022 19:47:57 +0000 (13:47 -0600)]
sandbox: Avoid binman error when run without device tree
With sandbox, U-Boot can be run without a device tree (i.e. no -d or -T
parameter). In this case an empty device tree is created for convenience.
With a recent change this causes an error due to the missing '/binman'
node.
Add this node to avoid the problem, as well as a test that U-Boot can
be run without a device tree.
Fixes:
059df5624b ("arch: Kconfig: imply BINMAN for SANDBOX")
Fixes: https://source.denx.de/u-boot/u-boot/-/issues/11
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 27 Apr 2022 19:47:56 +0000 (13:47 -0600)]
test/py: Add a way to start sandbox without a device tree
This is useful sometimes when running a specific test. Add support for it
in the existing restart_uboot_with_flags() function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Masami Hiramatsu [Thu, 28 Apr 2022 09:13:04 +0000 (18:13 +0900)]
board: synquacer: developerbox: Remove Masami from MAINTAINERS
Remove Masami Hiramatsu from MAINTAINERS since he will leave
Linaro and his email will be not available anymore.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Sean Anderson [Thu, 28 Apr 2022 16:39:49 +0000 (12:39 -0400)]
ls10xxx: Use a sane SPL_SYS_MALLOC_F_LEN default
SPL_SYS_MALLOC_F_LEN defaults to SYS_MALLOC_F_LEN. 0x10000 is 64 KiB, or
around half of the total OCRAM size. Revert to the default of 0x2000. This
fixes SPL boot.
Fixes:
545eceb520 ("imx8/ls10xx: Use a sane SYS_MALLOC_F_LEN default")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Jim Liu [Tue, 19 Apr 2022 05:32:22 +0000 (13:32 +0800)]
timer: npcm: Add NPCM timer support
Add Nuvoton BMC NPCM7xx/NPCM8xx timer driver.
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Jim Liu [Tue, 19 Apr 2022 05:32:21 +0000 (13:32 +0800)]
serial: npcm: Add support for Nuvoton NPCM SoCs
Add Nuvoton BMC NPCM7xx/NPCM8xx uart driver
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Jim Liu [Tue, 19 Apr 2022 05:32:20 +0000 (13:32 +0800)]
clk: nuvoton: Add support for NPCM750
Add clock controller driver for NPCM750
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Jim Liu [Tue, 19 Apr 2022 05:32:19 +0000 (13:32 +0800)]
arm: nuvoton: Add support for Nuvoton NPCM750 BMC
Add basic support for the Nuvoton NPCM750 EVB (Poleg).
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Tom Rini [Wed, 4 May 2022 16:08:40 +0000 (12:08 -0400)]
Merge tag 'efi-2022-07-rc2-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-07-rc2-2
* Test
Unit test for 'bootmenu' command
* UEFI
Preparatory patches for implementing a UEFI boot options based menu
Tom Rini [Wed, 4 May 2022 13:05:03 +0000 (09:05 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- mips: octeon: Add ethernet support (Aaron & Stefan)
- Misc mvneta changes, cleanups, fixes (Marek)
Tom Rini [Wed, 4 May 2022 13:04:43 +0000 (09:04 -0400)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-spi
- NPCM7xx FIU SPI driver (Jim Liu)
- AT45DB641E dataflash (Luca Ellero)
Marek Behún [Wed, 27 Apr 2022 10:42:02 +0000 (12:42 +0200)]
net: mvneta: Drop unneeded macro
Macro MVNETA_GMAC_FORCE_LINK_UP can be dropped from value assignment in
fixed link case, since it's value is written into the register later in
the function for link-down-to-link-up case. The value is written as
MVNETA_GMAC_FORCE_LINK_DOWN | MVNETA_GMAC_FORCE_LINK_PASS, and so the
macro definition can also be dropped.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:42:01 +0000 (12:42 +0200)]
net: mvneta: Disable fixed PHY code if PHY_FIXED is not compiled in
Guard the code handling the fixed PHY case by
CONFIG_IS_ENABLED(PHY_FIXED).
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:42:00 +0000 (12:42 +0200)]
net: mvneta: Drop fixed_link member from private struct
Since this member is checked only at two places drop it and inline it's
usage.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:59 +0000 (12:41 +0200)]
net: mvneta: Write PHY address just before enabling HW polling
Write PHY address just before enabling HW polling of the PHY.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:58 +0000 (12:41 +0200)]
net: mvneta: Convert to use PHY_FIXED for fixed-link
Stop parsing fixed-link in the MAC driver. Instead support only PHY mode
and let the fixed PHY driver handle the fixed-link case.
Enable CONFIG_PHY_FIXED for mvneta boards that need it: Turris Omnia and
ESPRESSObin.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:57 +0000 (12:41 +0200)]
net: mvneta: Rename CONFIG_NR_CPUS to MVNETA_NR_CPUS
The CONFIG_* macros are reserved for Kconfig. This was probably done
when this driver was being imported from Linux. Rename the macro.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:56 +0000 (12:41 +0200)]
net: mvneta: Don't check for CONFIG_PHYLIB
Drop checking for CONFIG_PHYLIB in mvneta, this is already done in
Kconfig.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:55 +0000 (12:41 +0200)]
net: mvneta: Drop unnecessary space
Drop unnecessary space in mvneta_adjust_link().
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:54 +0000 (12:41 +0200)]
net: mvneta: Use bool instead of int for boolean variable
Use the bool type instead of int for status_change variable.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:53 +0000 (12:41 +0200)]
net: mvneta: Drop one indentation level in mvneta_adjust_link()
Drop one indentation level in the mvneta_adjust_link() function.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:52 +0000 (12:41 +0200)]
net: mvneta: Fix unused variable warning if DM_GPIO is disabled
The `ret` variable in mvneta_probe() is unused if DM_GPIO is disabled.
Since the variable is used only once after assigning value, we can
inline the usage and drop the variable.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:51 +0000 (12:41 +0200)]
net: mvneta: Don't register MDIO bus
This MDIO bus is now handled by a proper mvmdio DM driver. Remove it
from mvneta.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:50 +0000 (12:41 +0200)]
arm: mvebu: turris_mox: Use DM registered MDIO
In order to be able to get rid of the non-DM MDIO bus registered in
mvneta driver, start using the DM registered one in Turris MOX board
code.
This also allows us to drop the hack introduced in MOX' -u-boot.dtsi
file.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:49 +0000 (12:41 +0200)]
net: mdio-uclass: add dm_phy_find_by_ofnode() helper
Add helper to resolve PHY node from it's ofnode via DM MDIO subsystem.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:48 +0000 (12:41 +0200)]
arm: mvebu: Espressobin: Use DM registered MDIO to configure switch
In order to be able to get rid of the non-DM MDIO bus registered in
mvneta driver, we need to stop using board_network_enable() and instead
use the DM registered MDIO device to configure switch in
last_stage_init().
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:47 +0000 (12:41 +0200)]
net: mvneta: Remember fixed link instead of PHY address in priv data
We don't need to remember PHY address anymore, because since using DM
MDIO for connecting PHY, the address is parsed by mdio-uclass from
the ofnode.
But the driver uses a special value of the address to signal fixed link
usage.
Drop phyaddr add fixed_link in driver private structure. This simplifies
code a little.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:46 +0000 (12:41 +0200)]
net: mvneta: Use DM MDIO API for connecting PHY
Use the modern DM MDIO API for connecting PHY in the mvneta driver.
This requires enabling MVMDIO driver in several config files.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:45 +0000 (12:41 +0200)]
net: mvneta: Fix 10Mbps speed
In mvneta_adjust_link() we need to set MII_SPEED bit only if PHY reports
the speed at 100Mbps.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Wed, 27 Apr 2022 10:41:44 +0000 (12:41 +0200)]
net: mvneta: Get rid of platdata
Drop .of_to_plat() from the mvneta driver and parse the two properties
in .probe().
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:54 +0000 (09:11 +0200)]
mips: octeon: nic23: Enable ethernet support
This patch enables the Kconfig symbols needed for full ethernet support
on the NIC23. Additionally board specific setup is done, mostly GPIOs
related to SFP / GPIO configuration. With this, ethernet can be used on
this board. Here an example of a tftp load:
=> tftp
ffffffff81000000 big
Using ethernet-mac-nexus@
11800e2000000 device
TFTP from server 192.168.1.5; our IP address is 192.168.1.247
Filename 'big'.
Load address: 0xffffffff81000000
Loading: ################################################## 10 MiB
9.7 MiB/s
done
Bytes transferred =
10485760 (a00000 hex)
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:53 +0000 (09:11 +0200)]
mips: octeon: ebb7304: Enable ethernet support
This patch enables the Kconfig symbols needed for full ethernet support
on the EBB7304. Also the PHY autonegotiation timeout is increased, as
the default 5 seconds are sometime a bit short. With this, ethernet can
be used on this board. Here an example of a tftp load:
=> tftp
ffffffff81000000 big
ethernet-mac-nexus@
11800e0000000 Waiting for PHY auto negotiation to complete....... done
Using ethernet-mac-nexus@
11800e0000000 device
TFTP from server 192.168.1.5; our IP address is 192.168.1.243
Filename 'big'.
Load address: 0xffffffff81000000
Loading: ################################################## 10 MiB
13.2 MiB/s
done
Bytes transferred =
10485760 (a00000 hex)
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:52 +0000 (09:11 +0200)]
net: Add ethernet support for MIPS Octeon
This patchs adds the ethernet & MDIO driver for the MIPS Octeon II / III
SoC platform. Please note that these drivers are based on the 2013
U-Boot version from Marvell and make use of the platform supported
helper functions for the ethernet functionality, including stuff like
SFP handling.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Stefan Roese [Thu, 7 Apr 2022 07:11:51 +0000 (09:11 +0200)]
mips: octeon: mrvl, octeon-nic23.dts: Add ethernet DT support
Add the Octeon ethernet (BGX) and SFP DT nodes to the NIC23 dts file to
enable ethernet support on this board.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:50 +0000 (09:11 +0200)]
mips: octeon: mrvl, octeon-ebb7304.dts: Add ethernet DT support
Add the Octeon ethernet (BGX), SMI and PHY DT nodes to the EBB7304 dts
file to enable ethernet support on this board.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:49 +0000 (09:11 +0200)]
mips: octeon: mrvl, cn73xx.dtsi: Add ethernet (BGX) and SMI DT nodes
Add the Octeon ethernet (BGX) and SMI DT node to the dtsi file.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:48 +0000 (09:11 +0200)]
mips: octeon: octeon_common.h: Move init SP because of increased image size
This patch moves CONFIG_SYS_INIT_SP_OFFSET to a higher address so that
it does not interfere with larger U-Boot images. This was noticed, while
adding network support to the EBB7304 board.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:47 +0000 (09:11 +0200)]
mips: octeon: cpu.c: Implement configure_lmtdma_window()
Import configure_lmtdma_window from Marvell 2013 U-Boot as it's needed
for network functionality.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:46 +0000 (09:11 +0200)]
mips: octeon: cpu.c: Move bootmem init to arch_early_init_r()
Call octeon_bootmem_init() earlier in the boot process, so that this
bootmemory infrastructure is already initialized when e.g. the
networking support gets probed.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:45 +0000 (09:11 +0200)]
mips: octeon: Makefile: Enable building of the newly added C files
This patch adds the newly added C files to the Makefile to enable
compilation. This is done in a separate step, to not introduce build
breakage while adding the single files with potentially missing
externals.
Signed-off-by: Stefan Roese <sr@denx.de>
Stefan Roese [Thu, 7 Apr 2022 07:11:44 +0000 (09:11 +0200)]
mips: octeon: Misc changes to existing C files for upcoming eth support
This patch includes misc changes to already present Octeon MIPS C files
files, which are necessary for the upcoming ethernet support.
The changes are mostly:
- DM GPIO & I2C infrastructure
- Coding style cleanup while reworking of the code
Signed-off-by: Stefan Roese <sr@denx.de>
Aaron Williams [Thu, 6 May 2021 07:40:43 +0000 (09:40 +0200)]
mips: octeon: Add cvmx-range.c
Import cvmx-range.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Aaron Williams [Thu, 7 Apr 2022 07:11:42 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-qlm-tables.c
Import cvmx-qlm-tables.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Aaron Williams [Thu, 7 Apr 2022 07:11:41 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko-internal-ports-range.c
Import cvmx-pko-internal-ports-range.c from 2013 U-Boot. It will be used
by the later added drivers to support networking on the MIPS Octeon II / III
platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Aaron Williams [Thu, 7 Apr 2022 07:11:40 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko3-resources.c
Import cvmx-pko3-resources.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Aaron Williams [Thu, 7 Apr 2022 07:11:39 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko3-compat.c
Import cvmx-pko3-compat.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Aaron Williams [Thu, 6 May 2021 10:26:07 +0000 (12:26 +0200)]
mips: octeon: Add cvmx-pko3-queue.c
Import cvmx-pko3-queue.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Aaron Williams [Thu, 7 Apr 2022 07:11:37 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko3.c
Import cvmx-pko3.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Aaron Williams [Thu, 7 Apr 2022 07:11:36 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko.c
Import cvmx-pko.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>