]> git.baikalelectronics.ru Git - uboot.git/log
uboot.git
22 months agoclk: versal: Return error in case if clock setup failed
Jay Buddhabhatti [Tue, 10 Jan 2023 07:23:44 +0000 (08:23 +0100)]
clk: versal: Return error in case if clock setup failed

Currently probe is getting success even if clock setup is failed
because of that u-boot is trying to access invalid clocks. So return
error if clock setup failed.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/fa78e71211e5f68f8dc1353b357f96e6283f65a8.1673335422.git.michal.simek@amd.com
22 months agoboard: presidio-asic: Remove CONFIG_TARGET_VENUS
Michal Simek [Mon, 19 Dec 2022 15:26:59 +0000 (16:26 +0100)]
board: presidio-asic: Remove CONFIG_TARGET_VENUS

Symbol is not defined anywhere that's why remove it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e34404488b2b46cbb2a10c1663e809ff34287a66.1671463617.git.michal.simek@amd.com
22 months agomakefile: add multi_dtb_fit dep
Neal Frager [Wed, 21 Dec 2022 07:54:46 +0000 (07:54 +0000)]
makefile: add multi_dtb_fit dep

With certain gcc compilers, the u-boot.itb is built immediately after dtb
generation.  If CONFIG_MULTI_DTB_FIT is used, it is possible that the
fit-dtb.blob is not finished in time.

This patch adds a necessary dependency to guarantee that the fit-dtb.blob
is built before attempting to build the u-boot.itb.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20221221075446.47141-1-neal.frager@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
22 months agoarm64: zynqmp: remove Avnet UltraZed-EV Starter Kit
Luca Ceresoli [Wed, 11 Jan 2023 08:25:54 +0000 (09:25 +0100)]
arm64: zynqmp: remove Avnet UltraZed-EV Starter Kit

Nobody seems interested and able to keep this board supported, and
xilinx_zynqmp_virt_defconfig is supposed to be enough for any zynqmp board.

See the discussion at: https://lore.kernel.org/u-boot/CAPnjgZ3hHbyiFf=_Lp-Wz_XOWBkV-3vK4Q3xp=7bcERw-spNpA@mail.gmail.com/T/#m76d726f1ab3f7074c8105c9a2af2110ac7d18708

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://lore.kernel.org/r/20230111082554.1930782-1-luca.ceresoli@bootlin.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
22 months agoxilinx: versal: enable gigadevice
Victor Lim [Mon, 9 Jan 2023 23:49:46 +0000 (15:49 -0800)]
xilinx: versal: enable gigadevice

enabling gigadevice in the related files

Signed-off-by: Victor Lim <vlim@gigadevice.com>
Link: https://lore.kernel.org/r/20230109234946.14540-5-vlim@gigadevice.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
22 months agoarm64: zynqmp: enable gigadevice
Victor Lim [Mon, 9 Jan 2023 23:49:45 +0000 (15:49 -0800)]
arm64: zynqmp: enable gigadevice

enabling gigadevice in the related files

Signed-off-by: Victor Lim <vlim@gigadevice.com>
Link: https://lore.kernel.org/r/20230109234946.14540-4-vlim@gigadevice.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
22 months agoconfigs: zynq: enable gigadevice
Victor Lim [Mon, 9 Jan 2023 23:49:44 +0000 (15:49 -0800)]
configs: zynq: enable gigadevice

enabling gigadevice in the related files

Signed-off-by: Victor Lim <vlim@gigadevice.com>
Link: https://lore.kernel.org/r/20230109234946.14540-3-vlim@gigadevice.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
22 months agomtd: spi-nor-ids: add gigadevice part #
Victor Lim [Mon, 9 Jan 2023 23:49:43 +0000 (15:49 -0800)]
mtd: spi-nor-ids: add gigadevice part #

adding gigadevice part numbers

Signed-off-by: Victor Lim <vlim@gigadevice.com>
Link: https://lore.kernel.org/r/20230109234946.14540-2-vlim@gigadevice.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
22 months agoarm64: zynqmp: Remove unused snps,refclk_fladj property
Michal Simek [Mon, 12 Dec 2022 14:27:40 +0000 (15:27 +0100)]
arm64: zynqmp: Remove unused snps,refclk_fladj property

The commit b1e92e81eccf ("usb: dwc3: Program GFLADJ") hopefully fixed
issues around fladj logic. This DT property was used in Xilinx stack only
that's why remove because it is not needed anymore.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/9bdbd1156b19e28cdebeca29149268b0579a8b6a.1670855257.git.michal.simek@amd.com
22 months agoarm64: zynqmp: Enable TI phy reset via GPIO
Harini Katakam [Mon, 12 Dec 2022 14:14:18 +0000 (15:14 +0100)]
arm64: zynqmp: Enable TI phy reset via GPIO

Add DT property to support reset of TI PHY connected to GEM.
This is present in RevA DT but needs to be extended RevB/1.0/1.1
versions which are built on top.

Fixes: e02782c75fc7 ("arm64: zynqmp: Wire GEM reset gpio")
Signed-off-by: Harini Katakam <harini.katakam@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/7b093616ddea269043cbbb1e3806644d5a4b23be.1670854455.git.michal.simek@amd.com
22 months agoarm64: zynqmp: Describe TI phy as ethernet phy ID on ZCU102 RevB & up
Harini Katakam [Mon, 12 Dec 2022 14:14:17 +0000 (15:14 +0100)]
arm64: zynqmp: Describe TI phy as ethernet phy ID on ZCU102 RevB & up

TI phy requires a reset before PHY address detection to make sure
correct strapping via MIO is detected. Facilitate the same using
ethernet-phy-id compatible string. GPIO reset entry will be added in
a separate commit.
This support is present in RevA but needs to be extended to RevB/1.0/1.1
versions which are built on top.

Fixes: f47020140d6c ("arm64: zynqmp: Describe TI phy as ethernet-phy-id")
Signed-off-by: Harini Katakam <harini.katakam@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/6d500a83a787316353d4b26c75d1b51d29e3730e.1670854455.git.michal.simek@amd.com
22 months agoarm64: zynqmp: Remove unused USB DT properties
Michal Simek [Mon, 12 Dec 2022 14:06:13 +0000 (15:06 +0100)]
arm64: zynqmp: Remove unused USB DT properties

xlnx,usb-polarity, xlnx,usb-reset-mode and snps,mask_phy_reset are not
documented in dt binding and also there is no code associated with them
that's why remove them.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/369139fafa1745252ef687e31aebf6bcc2080a32.1670853972.git.michal.simek@amd.com
22 months agonet: zynq_gem: Add support for new compatible str with xlnx prefix
Michal Simek [Fri, 9 Dec 2022 15:19:29 +0000 (16:19 +0100)]
net: zynq_gem: Add support for new compatible str with xlnx prefix

cdns prefix was deprecated and replaced by xlnx one.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/7d1312d741349451b36558baa3e9132247303992.1670599167.git.michal.simek@amd.com
22 months agoarm64: zynqmp: Remove id from usb node name
Michal Simek [Fri, 9 Dec 2022 12:56:41 +0000 (13:56 +0100)]
arm64: zynqmp: Remove id from usb node name

There is no reason to have number in usb node name. This is also sync up
patch with upstream kernel.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/7b13db34031af88a5738d2ec2e05d2498ea8c869.1670590595.git.michal.simek@amd.com
22 months agoarm64: zynqmp: Align gpio-key node names with dtschema
Michal Simek [Fri, 9 Dec 2022 12:56:40 +0000 (13:56 +0100)]
arm64: zynqmp: Align gpio-key node names with dtschema

The node names should be generic and DT schema expects certain pattern
(e.g. with key/button/switch).
It is based on kernel commit (228e8a88b1915a2b467c83d8d0976605f1272fae).

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/ae23999097553acb21dfca9288a913bb8b24587a.1670590595.git.michal.simek@amd.com
22 months agoarm64: zynqmp: Fix AMS device tree node
Michal Simek [Fri, 9 Dec 2022 12:56:39 +0000 (13:56 +0100)]
arm64: zynqmp: Fix AMS device tree node

Aligned node description with the Linux kernel. Node has been added by
kernel commit (271c1fa01c2307cf74f4656390d6299991119c3e).

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/74188b64cf615100345d058e026cb0d2de0e089b.1670590595.git.michal.simek@amd.com
22 months agoarm64: zynqmp: Added GEM reset definitions
Michal Simek [Fri, 9 Dec 2022 12:56:38 +0000 (13:56 +0100)]
arm64: zynqmp: Added GEM reset definitions

The Cadence GEM/MACB driver now utilizes the platform-level reset on the
ZynqMP platform. Add reset definitions to the ZynqMP platform device
tree to allow this to be used.
Linux upstream commit (e461bd6f43f4e568f7436a8b6bc21c4ce6914c36).

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/14e3637735dbc626659e96d142f04a63398362f8.1670590595.git.michal.simek@amd.com
22 months agoarm64: zynqmp: Sync #dma-cells property location
Michal Simek [Fri, 9 Dec 2022 12:56:37 +0000 (13:56 +0100)]
arm64: zynqmp: Sync #dma-cells property location

Sync property location with Linux kernel done by Linux commit
(1ff2d58e60c8093e9be935b1f191341c0cda957a).

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e09ad90ea610a81528ef5ecbc931bc9791b1c653.1670590595.git.michal.simek@amd.com
22 months agons16650: Correct CONFIG_SYS_NS16550_MEM32 platforms
Tom Rini [Fri, 6 Jan 2023 03:47:44 +0000 (22:47 -0500)]
ns16650: Correct CONFIG_SYS_NS16550_MEM32 platforms

There are currently no platform that are both CONFIG_SYS_NS16550_MEM32
and not (per how the logic was prior to being broken in c91b3b3e07ad
("kbuild: Remove uncmd_spl logic")) enabled in CONFIG_DM_SERIAL. We drop
this line out now so that platforms which do use
CONFIG_SYS_NS16550_MEM32 and depending on stage may or may not have
DM_SERIAL set.

Fixes: c91b3b3e07ad ("kbuild: Remove uncmd_spl logic")
Reported-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> #on Ringneck PX30, Puma RK3399
22 months agoMerge branch 'next'
Tom Rini [Mon, 9 Jan 2023 16:30:08 +0000 (11:30 -0500)]
Merge branch 'next'

Signed-off-by: Tom Rini <trini@konsulko.com>
22 months agoPrepare v2023.01
Tom Rini [Mon, 9 Jan 2023 16:07:33 +0000 (11:07 -0500)]
Prepare v2023.01

Signed-off-by: Tom Rini <trini@konsulko.com>
22 months agoboard: rockchip: Fix binman_init failure on EVB-RK3568
Jagan Teki [Sun, 8 Jan 2023 16:17:34 +0000 (21:47 +0530)]
board: rockchip: Fix binman_init failure on EVB-RK3568

For some newer SoCs like RK3568, the Rockchip has not released
any DDR drivers yet so idbloader needs to create manually using
DDR binaries offered by rkbin. This indeed no requirement to
enable TPL in the U-Boot source code.

If we mark TPL disabled and mark BINMAN enabled by default then
there would be an issue of binman_init failure during board
relocation. This is true as binman failed to find the top-level
node like u-boot-tpl here.

Here is the boot issue observed in Radxa-CM3 RK3566 board,

 U-Boot 2023.01-rc4-00057-gac2505d463-dirty (Jan 04 2023 - 23:44:18 +0530)

 Model: Radxa Compute Module 3(CM3) IO Board
 DRAM:  2 GiB
 binman_init failed:-2
 initcall sequence 000000007ffd2008 failed at call 0000000000a18cac (err=-2)
 ### ERROR ### Please RESET the board ###

This might be fixed via binman node in rockchip-u-boot.dtsi however
disable BINMAN_FDT for evb-rk3568 defconfig for now as we are at the
end of the release cycle.

Fixes: d0791c664f56 ("rockchip: generate u-boot-rockchip.bin with binman
for ARM64 boards")
Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
22 months agoMerge tag 'u-boot-nand-20230108' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sun, 8 Jan 2023 18:12:42 +0000 (13:12 -0500)]
Merge tag 'u-boot-nand-20230108' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash into next

Pull request for u-boot-nand-20230108

- rawnand: omap_gpmc: driver model support

22 months agodistro_bootcmd: Fix copy-paste error
Marek Vasut [Thu, 5 Jan 2023 01:26:03 +0000 (02:26 +0100)]
distro_bootcmd: Fix copy-paste error

The "SCRIPT FAILED" string is copied from scan_dev_for_scripts script,
update it so it prints "EXTLINUX FAILED" instead in scan_dev_for_extlinux
script.

Signed-off-by: Marek Vasut <marex@denx.de>
22 months agomtd: rawnand: omap_elm: u-boot driver model support
Roger Quadros [Tue, 20 Dec 2022 10:22:03 +0000 (12:22 +0200)]
mtd: rawnand: omap_elm: u-boot driver model support

Support u-boot driver model. We still retain
support legacy way of doing things if ELM_BASE
is defined in <asm/arch/hardware.h>

We could completely get rid of that if all
platforms defining ELM_BASE get rid of that definition
and enable CONFIG_SYS_NAND_SELF_INIT and are verified
to work.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Link: https://lore.kernel.org/all/20221220102203.52398-9-rogerq@kernel.org
Link: https://lore.kernel.org/all/CABGWkvrvKiVA_yaDnHJcHEKwc+pEuLdz=i6HQEY0oJQvohCUsw@mail.gmail.com
22 months agodt-bindings: mtd: Add ti, elm DT binding documentation
Roger Quadros [Tue, 20 Dec 2022 10:22:02 +0000 (12:22 +0200)]
dt-bindings: mtd: Add ti, elm DT binding documentation

Adds DT binding documentation for the TI Error Location Module.
This is picked up from the Linux Kernel.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221220102203.52398-8-rogerq@kernel.org
22 months agomtd: rawnand: omap_gpmc: Enable SYS_NAND_PAGE_COUNT for OMAP_GPMC
Roger Quadros [Tue, 20 Dec 2022 10:22:01 +0000 (12:22 +0200)]
mtd: rawnand: omap_gpmc: Enable SYS_NAND_PAGE_COUNT for OMAP_GPMC

The symbol is required for NAND support in SPL when using
OMAP_GPMC driver.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221220102203.52398-7-rogerq@kernel.org
22 months agomtd: rawnand: omap_gpmc: Add SPL NAND support
Roger Quadros [Tue, 20 Dec 2022 10:22:00 +0000 (12:22 +0200)]
mtd: rawnand: omap_gpmc: Add SPL NAND support

Enables SPL NAND support for ARCH_K3 by enabling
SPL_NAND_INIT and SPL_SYS_NAND_SELF_INIT.

Legacy OMAP2plus platforms still rely on SPL_NAND_AM33XX_BCH
instead.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221220102203.52398-6-rogerq@kernel.org
22 months agomtd: rawnand: omap_gpmc: support u-boot driver model
Roger Quadros [Tue, 20 Dec 2022 10:21:59 +0000 (12:21 +0200)]
mtd: rawnand: omap_gpmc: support u-boot driver model

Adds driver model support.

We need to be able to self initialize the NAND controller/chip
at probe and so enable CONFIG_SYS_NAND_SELF_INIT.

Doing so requires nand_register() API which is provided by nand.c
and needs to be enabled during SPL build via CONFIG_SPL_NAND_INIT.
But nand.c also provides nand_init() so we need to get rid of nand_init()
in omap_gpmc driver if CONFIG_SPL_NAND_INIT is set.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221220102203.52398-5-rogerq@kernel.org
22 months agodt-bindings: mtd: Add ti, gpmc-nand DT binding documentation
Roger Quadros [Tue, 20 Dec 2022 10:21:58 +0000 (12:21 +0200)]
dt-bindings: mtd: Add ti, gpmc-nand DT binding documentation

Add DT binding documentation for the TI GPMC NAND controller.
This is picked up from the Linux Kernel.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221220102203.52398-4-rogerq@kernel.org
22 months agomtd: rawnand: nand_base: Allow base driver to be used in SPL without nand_bbt
Roger Quadros [Tue, 20 Dec 2022 10:21:57 +0000 (12:21 +0200)]
mtd: rawnand: nand_base: Allow base driver to be used in SPL without nand_bbt

nand_bbt.c is not being built with the nand_base driver during SPL
build. This results in build failures if we try to access any nand_bbt
related functions.

Don't use any nand_bbt functions for SPL build.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221220102203.52398-3-rogerq@kernel.org
22 months agomtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction
Roger Quadros [Tue, 20 Dec 2022 10:21:56 +0000 (12:21 +0200)]
mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction

The BCH detection hardware can generate ECC bytes for multiple
sectors in one go. Use that feature.

correct() only corrects one sector at a time so we need to call it
repeatedly for each sector.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221220102203.52398-2-rogerq@kernel.org
22 months agopylibfdt: Allow version normalization to fail
Tom Rini [Sat, 7 Jan 2023 23:02:26 +0000 (18:02 -0500)]
pylibfdt: Allow version normalization to fail

In some cases, we might not have the sic portion of setuputils
available. Make our import and use of this be done in try/except blocks
as this is done to suppress a run-time warning that is otherwise
non-fatal.

Reported-by: Pali Rohár <pali@kernel.org>
Fixes: 8acf182b2b81 ("pylibfdt: Fix disable version normalization")
Signed-off-by: Tom Rini <trini@konsulko.com>
22 months agocommon/memsize.c: Check for overflow in get_effective_memsize() only for mpc85xx
Pali Rohár [Sat, 7 Jan 2023 21:55:26 +0000 (22:55 +0100)]
common/memsize.c: Check for overflow in get_effective_memsize() only for mpc85xx

This reverts commit 9306ac3ce44b ("common/memsize.c: Fix
get_effective_memsize() to check for overflow") for non-mpc85xx platforms.

The changes to this generic function, which is intended to help with
32bit platforms with large amounts of memory has unintended side effects
(which in turn lead to boot failures) on other platforms which were
previously functional.

For now do overflow check only for powerpc mpc85xx platform. It is needed
to prevent crashing of P1/P2 boards with 4GB DDR module in 32-bit mode.

Fixes: 9306ac3ce44b ("common/memsize.c: Fix get_effective_memsize() to check for overflow")
Signed-off-by: Pali Rohár <pali@kernel.org>
22 months agoMerge tag 'efi-2023-01-rc5-4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 7 Jan 2023 17:32:42 +0000 (12:32 -0500)]
Merge tag 'efi-2023-01-rc5-4' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2023-01-rc5-4

UEFI:

* correct the vexpress loaddr which collides with memory used by EFI
* consider the EFI memory map for LMB memory reservation
* avoid RWX section warnings for .data section of *_efi.so files

22 months agoefi_loader: make .data section of *_efi.so files RW
Heinrich Schuchardt [Wed, 4 Jan 2023 22:43:08 +0000 (23:43 +0100)]
efi_loader: make .data section of *_efi.so files RW

When building with binutils 2.39 warnings

    *_efi.so has a LOAD segment with RWX permissions

occur.

Use SHF_WRITE | SHF_ALLOC as section flags for the .data section.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
22 months agolmb: consider EFI memory map
Heinrich Schuchardt [Wed, 4 Jan 2023 00:36:14 +0000 (01:36 +0100)]
lmb: consider EFI memory map

Add reservations for all EFI memory areas that are not
EFI_CONVENTIONAL_MEMORY.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
22 months agoefi_loader: carve out efi_get_memory_map_alloc()
Heinrich Schuchardt [Thu, 5 Jan 2023 17:26:01 +0000 (18:26 +0100)]
efi_loader: carve out efi_get_memory_map_alloc()

Carve out code from efidebug command used to read the memory map.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
22 months agovexpress: adjust loadaddr
Heinrich Schuchardt [Wed, 4 Jan 2023 02:17:15 +0000 (03:17 +0100)]
vexpress: adjust loadaddr

On the vexpress_ca9x4 $loadaddr points to a memory area used by the EFI
sub-system. Use the same value as $kernel_addr_r which is safe.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
22 months agoMerge tag 'u-boot-at91-2023.04-a' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Fri, 6 Jan 2023 16:53:26 +0000 (11:53 -0500)]
Merge tag 'u-boot-at91-2023.04-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

First set of u-boot-at91 features for the 2023.04 cycle:

This feature set includes the new DM-based NAND flash driver (old non-DM
driver is still kept for backwards compatibility), and the move to DM
NAND flash driver for sam9x60ek board. Feature set also includes
devicetree alignment for sama7g5 with Linux, devicetree alignment on USB
with Linux for all boards (sama5, sam9x60), chip id for sama7g5, minor
configs and tweaks.

22 months agoMerge tag 'u-boot-stm32-20230106' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Fri, 6 Jan 2023 13:16:15 +0000 (08:16 -0500)]
Merge tag 'u-boot-stm32-20230106' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- stm32mp: Fix board_get_usable_ram_top(): workaround to avoid issue after the
  commit 9306ac3ce44 ("common/memsize.c: Fix get_effective_memsize() to check
  for overflow") because the effective DDR effective size is reduce by 4KiB
  and sometime the board hang on boot

22 months agoMerge branch '2023-01-06-further-regression-fixes'
Tom Rini [Fri, 6 Jan 2023 13:14:28 +0000 (08:14 -0500)]
Merge branch '2023-01-06-further-regression-fixes'

- Bring in a number of important regression fixes for among others,
  uniphier, PXE booting, socrates, imx7d-pico, rockchip video and
  rzg2_beacon as well as making the python version warning fix more
  portable.

22 months agoarm: rmobile: rzg2_beacon: Enable alternative Ethernet PHY
Adam Ford [Wed, 4 Jan 2023 18:05:43 +0000 (12:05 -0600)]
arm: rmobile: rzg2_beacon: Enable alternative Ethernet PHY

Due to the part shortage, the AR8031 PHY was replaced with a
Micrel KSZ9131. Enabling both config options keeps backward
compatibility with either platform, and both appear to be
auto-detected.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>
22 months agoarm: dts: rz-g2-beacon-u-boot: Fix QSPI Regression
Adam Ford [Wed, 4 Jan 2023 15:53:09 +0000 (09:53 -0600)]
arm: dts: rz-g2-beacon-u-boot: Fix QSPI Regression

The QSPI is accessed via the RPC-IF, but the compatible flags
previously used a different name.  This compatibel name was changed
which broke the ability to access the QSPI.  Fix this by removing
the custom naming reference.

Fixes: 5535c1254a5f ("renesas: Fix RPC-IF compatible values")
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>
22 months agopylibfdt: Fix disable version normalization
Philippe Schenker [Wed, 4 Jan 2023 14:43:33 +0000 (15:43 +0100)]
pylibfdt: Fix disable version normalization

On Arch Linux based systems python setuptools does not contain
"setuptools.extern" hence it is failing with the following
error-message:
"
ModuleNotFoundError: No module named 'setuptools.extern'
"

According to a eschwartz `setuptools.extern` is not a public API and
shall not be assumed to be present in the setuptools package. He
mentions that the setuptools project anyway wants to drop this. [1]

Use the correct solution introduced by python setuptools developers to
disable normalization. [2]

[1] https://bbs.archlinux.org/viewtopic.php?id=259608
[2] https://github.com/pypa/setuptools/pull/2026
Fixes: ee6f85eda678 ("pylibfdt: Fix version normalization warning")
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agocmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage
Marek Vasut [Wed, 14 Dec 2022 06:45:18 +0000 (07:45 +0100)]
cmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage

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

Fixes: 656da1c3c59 ("cmd: pxe_utils: Check fdtcontroladdr in label_boot")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Tested-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peter Hoyes <peter.hoyes@arm.com>
Tested-by: Peter Hoyes <peter.hoyes@arm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
22 months agoRevert "Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot""
Marek Vasut [Sat, 17 Dec 2022 17:41:13 +0000 (18:41 +0100)]
Revert "Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot""

This reverts commit 3375c7c0ab446031d6bf13417f4643967114ed7c.

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

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
22 months agorockchip: Fix the broken Video out for rk3288 boards
Jagan Teki [Mon, 2 Jan 2023 18:23:45 +0000 (23:53 +0530)]
rockchip: Fix the broken Video out for rk3288 boards

Video out on RK3288 boards has been broken since from few
releases due to the adding of reset support on vop but
missed enabling DM_RESET on associated boards.

This patch fixes those RK3288 boards.

Cc: Simon Glass <sjg@chromium.org>
Cc: Lin Huang <hl@rock-chips.com>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Fixes: <cd3a29622ee6> ("rockchip: video: vop: Add reset support")
Reported-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agoi2c: uniphier-f: correct error recovery
Dai Okamura [Fri, 9 Dec 2022 11:38:27 +0000 (20:38 +0900)]
i2c: uniphier-f: correct error recovery

The uniphier i2c block can recognize some handshake errors.
But driver handles all error detections as no error if no timeout.
So this makes unrecoverable state.

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

Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
Acked-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
22 months agoimx7d-pico: Fix the name of the u-boot.dtsi file
Fabio Estevam [Sat, 31 Dec 2022 16:25:14 +0000 (13:25 -0300)]
imx7d-pico: Fix the name of the u-boot.dtsi file

Since commit f8d612ac6dd4 ("imx7s/d: synchronise device trees with linux")
the imx7d-pico board no longer boots.

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

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

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

Signed-off-by: Fabio Estevam <festevam@denx.de>
22 months agopowerpc/mpc85xx: socrates: Re-enable building u-boot-socrates.bin
Pali Rohár [Wed, 28 Dec 2022 18:18:39 +0000 (19:18 +0100)]
powerpc/mpc85xx: socrates: Re-enable building u-boot-socrates.bin

U-Boot build system builds final U-Boot binary for socrates board in custom
file u-boot-socrates.bin (instead of standard u-boot.bin). Output target
file u-boot-socrates.bin is generated by binman as defined in board binman
config file arch/powerpc/dts/socrates-u-boot.dtsi.

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

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

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

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

Fixes: 85c6fde4742d ("Makefile: Reduce usage of custom mpc85xx u-boot.bin target")
Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Heiko Schocher <hs@denx.de>
22 months agoarm: stm32mp: Fix board_get_usable_ram_top() again
Marek Vasut [Thu, 5 Jan 2023 01:22:22 +0000 (02:22 +0100)]
arm: stm32mp: Fix board_get_usable_ram_top() again

Do not access gd->ram_size and assume this is actual valid RAM size. Since commit
9306ac3ce44 ("common/memsize.c: Fix get_effective_memsize() to check for overflow")
the RAM size may be less than gd->ram_size , call get_effective_memsize() to get
the limited value instead.

The aforementioned commit makes STM32MP15xx boards with 1 GiB of DRAM
at 0xc0000000 hang on boot, which is a grave defect.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
22 months agoMerge tag 'dm-next-5jan23' of https://source.denx.de/u-boot/custodians/u-boot-dm...
Tom Rini [Fri, 6 Jan 2023 03:54:26 +0000 (22:54 -0500)]
Merge tag 'dm-next-5jan23' of https://source.denx.de/u-boot/custodians/u-boot-dm into next

patman enhancements and fixes

22 months agopatman: add '--get-maintainer-script' argument
Maxim Cournoyer [Tue, 20 Dec 2022 05:28:46 +0000 (00:28 -0500)]
patman: add '--get-maintainer-script' argument

This makes it possible to configure a project to use some other
location or script than the default scripts/get_maintainer.pl one used
in the U-Boot and Linux projects. It can be configured via a .patman
configuration file and accepts arguments, as documented.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
22 months agopatman: additionally honor a local .patman config file
Maxim Cournoyer [Tue, 20 Dec 2022 05:38:41 +0000 (00:38 -0500)]
patman: additionally honor a local .patman config file

This enables versioning a project specific patman configuration file.
It also makes it possible to declare the project name, which is not a
useful thing to do in $HOME/.patman.  A new test is added, along
updated documentation.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: fail early in Setup when provided config file does not exist
Maxim Cournoyer [Tue, 20 Dec 2022 05:38:40 +0000 (00:38 -0500)]
patman: fail early in Setup when provided config file does not exist

Rationale: if the user explicitly provide this argument, they probably
intend for it to be used.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: set the default config_fname argument value to None
Maxim Cournoyer [Tue, 20 Dec 2022 05:38:39 +0000 (00:38 -0500)]
patman: set the default config_fname argument value to None

This better matches Python conventions, allowing to easily test
whether the optional argument is provided.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: import gitutil module where it is needed
Maxim Cournoyer [Tue, 20 Dec 2022 05:38:38 +0000 (00:38 -0500)]
patman: import gitutil module where it is needed

Instead of propagating it from the module entry point (main script).

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: replace deprecated SafeConfigParser with ConfigParser
Maxim Cournoyer [Tue, 20 Dec 2022 05:38:37 +0000 (00:38 -0500)]
patman: replace deprecated SafeConfigParser with ConfigParser

The SafeConfigParser class has been renamed in Python 3.2 to
ConfigParser, and the old alias has been deprecated since.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: fix pep8 warnings in settings module
Maxim Cournoyer [Tue, 20 Dec 2022 05:38:36 +0000 (00:38 -0500)]
patman: fix pep8 warnings in settings module

Remove extraneous imports, variables and comply to PEP 8 maximum line
width, among other PEP 8 changes suggested by Pyflake.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: document default 'send' command
Maxim Cournoyer [Mon, 19 Dec 2022 22:32:45 +0000 (17:32 -0500)]
patman: document default 'send' command

Document that this command is the default and what it's intended for.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
22 months agopatman: document how to run test suite via pytest
Maxim Cournoyer [Mon, 19 Dec 2022 22:32:44 +0000 (17:32 -0500)]
patman: document how to run test suite via pytest

Pytest offers useful features such as selecting tests by means of a
regular expression, or running the pdb debugger upon encountering a
test failure.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
22 months agopatman: hide the 'test' command unless test data is available
Maxim Cournoyer [Mon, 19 Dec 2022 22:32:43 +0000 (17:32 -0500)]
patman: hide the 'test' command unless test data is available

Some tests would fail when the test data is not available, so it
doesn't make much sense to expose the action when patman is running
outside of the u-boot git checkout.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
22 months agopatman: add pytest configuration file
Maxim Cournoyer [Mon, 19 Dec 2022 22:32:42 +0000 (17:32 -0500)]
patman: add pytest configuration file

With this change, a user can run the patman test suite using Pytest
the same as when using 'patman test':

    $ cd tools/patman && pytest
    [...]
    44 passed, 8 warnings in 8.87s

    $ ./patman test
    Ran 44 tests in 8.460s

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
22 months agopatman: rename main script to __main__.py
Maxim Cournoyer [Mon, 19 Dec 2022 22:32:41 +0000 (17:32 -0500)]
patman: rename main script to __main__.py

This allows running the package as a Python module, like e.g.:

    $ python -m patman

It also prevents Pytest from attempting to parse main.py, which
would cause errors.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Fix up main.py in __init__.py:
Signed-off-by: Simon Glass <sjg@chromium.org>
22 months agopatman: invoke the checkpatch.pl script with '--u-boot' and '--strict'
Maxim Cournoyer [Mon, 19 Dec 2022 22:32:40 +0000 (17:32 -0500)]
patman: invoke the checkpatch.pl script with '--u-boot' and '--strict'

This resolves 10 out of 11 test failures seen when running './patman
test' from the 'tools/patman' subdirectory. This was caused by the
.checkpatch.conf configuration file at the root of the project not
being picked up. Make the test suite of patman independent from it by
always invoking the checkpatch.pl script with the minimally required
arguments for the test suite to pass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
22 months agopatman: locate test data files via __file__ and pathlib
Maxim Cournoyer [Mon, 19 Dec 2022 22:32:39 +0000 (17:32 -0500)]
patman: locate test data files via __file__ and pathlib

Previously it would rely on the executing script location, which could
break for example when running the tests via 'pytest'.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
22 months agopatman: cosmetic: Fix PEP 8 warnings for the gitutil module.
Maxim Cournoyer [Mon, 19 Dec 2022 22:32:38 +0000 (17:32 -0500)]
patman: cosmetic: Fix PEP 8 warnings for the gitutil module.

This patch fixes all the PEP 8 warnings reported by Pyflake for the
gitutil module.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
22 months agopatman: locate README.rst via importlib
Maxim Cournoyer [Sat, 17 Dec 2022 01:45:29 +0000 (20:45 -0500)]
patman: locate README.rst via importlib

Rationale: this is more robust than assumptions about the file
hierarchy layout of the installation of patman, for example on non
file-hierarchy standard (FHS) systems such as Guix System or Nix OS.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: fix installation of README.rst data file
Maxim Cournoyer [Sat, 17 Dec 2022 01:45:28 +0000 (20:45 -0500)]
patman: fix installation of README.rst data file

This fixes a regression introduced in commit c812638448ad ("buildman:
Convert documentation to rST").

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: remove extraneous imports
Maxim Cournoyer [Sat, 17 Dec 2022 01:45:27 +0000 (20:45 -0500)]
patman: remove extraneous imports

* tools/patman/main.py: Remove extraneous imports and fix indentation.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agotest:dm:fix typo
Yuepeng Xing [Fri, 2 Dec 2022 06:23:07 +0000 (14:23 +0800)]
test:dm:fix typo

Fix typos in the 'test/dm' directory.

Signed-off-by: Yuepeng Xing <xingyuepeng@eswincomputing.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agopatman: Switch to setuptools
Sean Anderson [Sun, 27 Nov 2022 21:55:02 +0000 (16:55 -0500)]
patman: Switch to setuptools

distutils is about to meet its demise [1]. Switch to setuptools.

[1] https://peps.python.org/pep-0632/

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agoreset: at91: Add reset driver for basic assert/deassert operations
Sergiu Moga [Wed, 4 Jan 2023 14:03:18 +0000 (16:03 +0200)]
reset: at91: Add reset driver for basic assert/deassert operations

Add support for at91 reset controller's basic assert/deassert
operations. Since this driver conflicts with the
SYSRESET driver because they both bind to the same RSTC node,
implement a custom bind hook that would manually bind the
sysreset driver, if enabled, to the same RSTC DT node.
Furthermore, delete the no longer needed compatibles from the
SYSRESET driver and rename it to make sure than any possible
conflicts are avoided.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Tested-by: Mihai Sain <mihai.sain@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
22 months agoARM: at91: add sama7 SFR definitions
Cristian Birsan [Wed, 4 Jan 2023 14:03:17 +0000 (16:03 +0200)]
ARM: at91: add sama7 SFR definitions

Special Function Registers(SFR) definitions for SAMA7 product family.

Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
22 months agoARM: dts: sama5d27_wlsom1_ek: Add pinctrl nodes for USB DT nodes
Sergiu Moga [Wed, 4 Jan 2023 14:04:18 +0000 (16:04 +0200)]
ARM: dts: sama5d27_wlsom1_ek: Add pinctrl nodes for USB DT nodes

Add the pinctrl nodes required by the USB related DT nodes.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
22 months agoARM: dts: sama5d2_icp: Add pinctrl nodes for USB related DT nodes
Sergiu Moga [Wed, 4 Jan 2023 14:04:17 +0000 (16:04 +0200)]
ARM: dts: sama5d2_icp: Add pinctrl nodes for USB related DT nodes

Add the pinctrl subnodes required by the USB related DT nodes.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
22 months agoARM: dts: sama7g5ek: Add pinctrl, gpio and phy properties for USB
Sergiu Moga [Wed, 4 Jan 2023 14:04:16 +0000 (16:04 +0200)]
ARM: dts: sama7g5ek: Add pinctrl, gpio and phy properties for USB

Add the required pinctrl, gpio and phy properties required by the
USB DT nodes of the sama7g5ek boards. Since these have not yet been
defined in upstream Linux, place them in the U-Boot specific DT file.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
22 months agoARM: dts: sama7g5: Add USB and UTMI DT nodes
Sergiu Moga [Wed, 4 Jan 2023 14:04:15 +0000 (16:04 +0200)]
ARM: dts: sama7g5: Add USB and UTMI DT nodes

Define the USB and UTMI DT nodes for the sama7g5 SoC's. Since these have
not yet been defined in upstream Linux, place them in the U-Boot specific
DT file.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Marek Vasut <marex@denx.de>
22 months agodt-bindings: clk: at91: Define additional UTMI related clocks
Sergiu Moga [Wed, 4 Jan 2023 14:04:14 +0000 (16:04 +0200)]
dt-bindings: clk: at91: Define additional UTMI related clocks

Add definitions for an additional main UTMI clock as well as its
respective subclocks.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
22 months agodt-bindings: reset: add sama7g5 definitions
Sergiu Moga [Wed, 4 Jan 2023 14:04:13 +0000 (16:04 +0200)]
dt-bindings: reset: add sama7g5 definitions

Upstream linux commit 5994f58977e0.

Add reset bindings for SAMA7G5. At the moment only USB PHYs are
included.

The three reset USB phy's have their ID's mapped from 4 to 6. There are
no USB phy's with ID's numbered from 0 to 3.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
22 months agoARM: dts: sam9x60ek: Add pinctrl and gpio properties for USB
Sergiu Moga [Wed, 4 Jan 2023 14:04:12 +0000 (16:04 +0200)]
ARM: dts: sam9x60ek: Add pinctrl and gpio properties for USB

Add the required pinctrl and gpio properties required by the USB DT
nodes of the sam9x60ek boards.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
22 months agoARM: dts: sam9x60_curiosity: Add pinctrl and gpio properties for USB
Sergiu Moga [Wed, 4 Jan 2023 14:04:11 +0000 (16:04 +0200)]
ARM: dts: sam9x60_curiosity: Add pinctrl and gpio properties for USB

Add the required pinctrl and gpio properties needed by the USB DT nodes
of the sam9x60_curiosity boards.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
22 months agoARM: dts: sam9x60: Add OHCI and EHCI DT nodes
Sergiu Moga [Wed, 4 Jan 2023 14:04:10 +0000 (16:04 +0200)]
ARM: dts: sam9x60: Add OHCI and EHCI DT nodes

Add the OHCI and EHCI DT nodes for the sam9x60 SoC's.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Marek Vasut <marex@denx.de>
22 months agoMerge tag 'efi-2023-01-rc5-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 4 Jan 2023 13:50:24 +0000 (08:50 -0500)]
Merge tag 'efi-2023-01-rc5-3' of https://source.denx.de/u-boot/custodians/u-boot-efi

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

Documentation:

* Describe building documentation

UEFI:

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

Other:

* Fix description of eth_env_[gs]et_enetaddr() return value
* Avoid endless loop in sound play command

22 months agoefi_loader: populate console handles in system table
Heinrich Schuchardt [Wed, 4 Jan 2023 04:56:09 +0000 (05:56 +0100)]
efi_loader: populate console handles in system table

The fields ConsoleInHandle, ConsoleOutHandle, ConsoleErrHandle must point
to the handles with the respective console protocols. Failure to do so
leads to an error in the EFI Shell:

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

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
22 months agoefi_loader: adjust sorting of capsules
Heinrich Schuchardt [Thu, 29 Dec 2022 13:44:05 +0000 (14:44 +0100)]
efi_loader: adjust sorting of capsules

Up to now we only compared the first letter of the capsule name to sort
them alphabetically. Properly sort by the Unicode alphabet.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
22 months agotest: unit test for u16_strcasecmp()
Heinrich Schuchardt [Thu, 29 Dec 2022 13:44:04 +0000 (14:44 +0100)]
test: unit test for u16_strcasecmp()

Provide a unit test for u16_strcasecmp().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
22 months agolib: add function u16_strcasecmp()
Heinrich Schuchardt [Thu, 29 Dec 2022 13:44:03 +0000 (14:44 +0100)]
lib: add function u16_strcasecmp()

Provide a function for comparing UTF-16 strings in a case insensitive
manner.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
22 months agoefi_loader: fix building aarch64 EFI binaries
Heinrich Schuchardt [Sat, 31 Dec 2022 10:58:54 +0000 (11:58 +0100)]
efi_loader: fix building aarch64 EFI binaries

While our EFI binaries execute without problems on EDK II they crash on
a Lenovo X13s. Let our binaries look more like what EDK II produces:

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

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
22 months agoefi_loader: defines for PE-COFF section flags
Heinrich Schuchardt [Wed, 4 Jan 2023 11:18:54 +0000 (12:18 +0100)]
efi_loader: defines for PE-COFF section flags

Provide constants for the section flags used by binaries.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
22 months agodoc: Fix eth_env_[gs]et_enetaddr() return value
Marek Vasut [Sun, 18 Dec 2022 07:05:02 +0000 (08:05 +0100)]
doc: Fix eth_env_[gs]et_enetaddr() return value

Per env/common.c, eth_env_get_enetaddr() returns the same return
values as is_valid_ethaddr(), i.e. true if valid, false otherwise.
Per env/common.c, eth_env_set_enetaddr() may return -EEXIST is the
ethaddr is already set. Fix both.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
22 months agodoc: building documentation
Heinrich Schuchardt [Fri, 30 Dec 2022 04:05:31 +0000 (05:05 +0100)]
doc: building documentation

Provide a man-page describing how to build the U-Boot documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
22 months agocmd: avoid endless loop in sound play command
Heinrich Schuchardt [Fri, 30 Dec 2022 23:49:10 +0000 (00:49 +0100)]
cmd: avoid endless loop in sound play command

A parameter starting with a hyphen leads to an endless loop in the sound
play command.

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

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
22 months agoconfigs: sam9x60: add mmc config for sdmmc1
Mihai Sain [Fri, 23 Dec 2022 06:43:53 +0000 (08:43 +0200)]
configs: sam9x60: add mmc config for sdmmc1

Add new config for storing environment from SDMMC1.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
22 months agoboard: at91: sam9x60: set blue led on at boot time
Mihai Sain [Fri, 23 Dec 2022 06:39:36 +0000 (08:39 +0200)]
board: at91: sam9x60: set blue led on at boot time

Set blue led on at boot time in order to highlight that u-boot is loaded.
This is done for all sam9x60 based boards which contain an RGB led.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
22 months agoARM: dts: at91: sam9x60: add sdhci1 node and pinctrl
Mihai Sain [Fri, 23 Dec 2022 06:47:17 +0000 (08:47 +0200)]
ARM: dts: at91: sam9x60: add sdhci1 node and pinctrl

Add node for sdhci1 controller and its pinctrl.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
22 months agoMerge branch '2023-01-02-platform-updates' into next
Tom Rini [Mon, 2 Jan 2023 23:07:41 +0000 (18:07 -0500)]
Merge branch '2023-01-02-platform-updates' into next

- Synquacer updates / fixes, PowerPC keymile platform dts fix, assorted
  TI platform updates, ht1380 RTC driver, serial driver cleanups,
  pg_wcom defconfig updates, s5p4418 DM_SERIAL (and legacy code removal).

22 months agoarm: s5p4418: dm_serial: remove old code / add DEBUG_UART
Stefan Bosch [Sun, 18 Dec 2022 12:26:47 +0000 (12:26 +0000)]
arm: s5p4418: dm_serial: remove old code / add DEBUG_UART

Remove init of UART-clock and UART-reset in arch_cpu_init(). Add DEBUG_UART
to s5p4418_nanopi2_defconfig.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
22 months agoarm: s5p4418: dm_serial: switch to DM_SERIAL
Stefan Bosch [Sun, 18 Dec 2022 12:25:33 +0000 (12:25 +0000)]
arm: s5p4418: dm_serial: switch to DM_SERIAL

Switch the S5P4418-SOC and therefore the s5p4418_nanopi2 board to
DM_SERIAL.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>