]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agoarm: dts: k3-am642: Update main_bcdma and main_pktdma nodes
Siddharth Vadapalli [Sat, 28 Oct 2023 17:36:03 +0000 (20:36 +0300)] 
arm: dts: k3-am642: Update main_bcdma and main_pktdma nodes

Update main_bcdma and main_pktdma nodes for native configuration in the
absence of DM services.

Drop duplicate main_pktdma node in k3-am642-sk-u-boot.dtsi.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
2 years agoarm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA/Ethernet
Roger Quadros [Sat, 28 Oct 2023 17:36:02 +0000 (20:36 +0300)] 
arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA/Ethernet

Update main_bcdma and main_pktdma nodes for native configuration in the
absence of DM services. u-boot k3-udma driver expects these additional
register fields else probe will fail.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoarm: dts: k3-am625-sk-u-boot.dtsi: Update main_bcdma and main_pktdma nodes
Siddharth Vadapalli [Sat, 28 Oct 2023 17:36:01 +0000 (20:36 +0300)] 
arm: dts: k3-am625-sk-u-boot.dtsi: Update main_bcdma and main_pktdma nodes

Update main_bcdma and main_pktdma nodes for native configuration in the
absence of DM services.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
2 years agoMerge branch '2023-11-10-improve-semihosting-armv6' into next
Tom Rini [Fri, 10 Nov 2023 16:55:28 +0000 (11:55 -0500)] 
Merge branch '2023-11-10-improve-semihosting-armv6' into next

To quote the author:
This series has a few fixes for semihosting on ARMv6 and older CPUs. The
first two patches address problems regarding the stack pointer and link
register. U-Boot runs in supervisor mode, so taking a software interrupt
will clobber sp/lr. I think we really should run in system mode, since
it has separate sp/lr registers. To quote ARM DDI 0100I:

> The remaining mode is System mode, which is not entered by any
> exception and has exactly the same registers available as User mode.
> However, it is a privileged mode and is therefore not subject to the
> User mode restrictions. It is intended for use by operating system
> tasks that need access to system resources, but wish to avoid using
> the additional registers associated with the exception modes. Avoiding
> such use ensures that the task state is not corrupted by the
> occurrence of any exception.

However, the processor mode has been supervisor for such a long time
(since relocation got introduced) that I would rather not touch it.

2 years agoarm: semihosting: Support semihosting fallback on 32-bit ARM
Sean Anderson [Fri, 27 Oct 2023 20:40:15 +0000 (16:40 -0400)] 
arm: semihosting: Support semihosting fallback on 32-bit ARM

Add support for a semihosting fallback on 32-bit ARM. The assembly is
lightly adapted from the irq return code, except there is no offset
since lr already points to the correct instruction. The C side is mostly
like ARM64, except we have fewer cases to deal with.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoarm: semihosting: Fix returning from traps on ARMv6 and lower
Sean Anderson [Fri, 27 Oct 2023 20:40:14 +0000 (16:40 -0400)] 
arm: semihosting: Fix returning from traps on ARMv6 and lower

U-Boot runs in supervisor mode. On ARMv6 and lower, software interrupts
are taken in supervisor mode. When entering an interrupt, the link
register is set to the address of the next instruction. However, if we
are already in supervisor mode, this clobbers the link register. The
debugger can't help us, since by the time it notices we've taken a
software interrupt, the link register is already gone. Work around this
by moving the return address to another register.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoarm: Fix software interrupt handler
Sean Anderson [Fri, 27 Oct 2023 20:40:13 +0000 (16:40 -0400)] 
arm: Fix software interrupt handler

When we take a software interrupt, we are already in supervisor mode.
get_bad_stack assumes we are not in supervisor mode so it can clobber
the stack pointer. This causes us to have an invalid stack once that
macro finishes. Revert back to the get_bad_stack_swi macro which was
previously removed.

Fixes: 41623c91b09 ("arm: move exception handling out of start.S files")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoMerge tag 'u-boot-stm32-20231110' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Fri, 10 Nov 2023 14:43:01 +0000 (09:43 -0500)] 
Merge tag 'u-boot-stm32-20231110' of https://source.denx.de/u-boot/custodians/u-boot-stm

_ Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled
_ Fix issue following DT sync with kernel 6.3 for stm32mp15xx-ev1 and DHSOM SoM
_ Enable TCP, IPv6, wget on DH STM32MP15 DHSOM
_ Limit u-boot.itb size to 0x160000 bytes on DH STM32MP15 DHSOM
_ Read auth stats and boot_partition from tamp

2 years agoMerge branch '2023-11-10-assorted-fixes'
Tom Rini [Fri, 10 Nov 2023 13:44:18 +0000 (08:44 -0500)] 
Merge branch '2023-11-10-assorted-fixes'

- Fix some issues Coverity has reported, update MAINTAINERS file,
  another bootstd fix, typo fix in error message, gitignore fix and
  update TI's URL in many places.

2 years agotree-wide: Replace http:// link with https:// link for ti.com
Nishanth Menon [Wed, 1 Nov 2023 20:56:03 +0000 (15:56 -0500)] 
tree-wide: Replace http:// link with https:// link for ti.com

Replace instances of http://www.ti.com with https://www.ti.com

Signed-off-by: Nishanth Menon <nm@ti.com>
2 years agoboot: Fix syntax in fdt_overlay_apply_verbose() error message
Hugo Villeneuve [Thu, 26 Oct 2023 19:54:49 +0000 (15:54 -0400)] 
boot: Fix syntax in fdt_overlay_apply_verbose() error message

Remove superfluous "did".

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
2 years agotools: gitignore: Fix tools/generated path
Sam Protsenko [Thu, 26 Oct 2023 21:00:15 +0000 (16:00 -0500)] 
tools: gitignore: Fix tools/generated path

'git status' shows 'tools/generated/' after running the build, which is
wrong. The corresponding .gitignore rule was already added in commit
c623642d29be ("Adjust gitignore for tools/generated/"), but because of
superfluous 'tools/' part it wasn't in effect. Remove incorrect 'tools/'
part to fix it.

While at it, remove tools/ path incorrectly added to the top-level
.gitignore in commit 801c482207c7 (".gitignore: ignore misc include,
simple-bin, and tools/generated build artifacts"), as it's required in
the comment on the top of .gitignore:

    # NOTE! Don't add files that are generated in specific
    # subdirectories here. Add them in the ".gitignore" file
    # in that subdirectory instead.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Fixes: c623642d29be ("Adjust gitignore for tools/generated/")
Fixes: 801c482207c7 (".gitignore: ignore misc include, simple-bin, and tools/generated build artifacts")
2 years agobootstd: Skip over bad device during bootflows scanning
Tony Dinh [Thu, 2 Nov 2023 18:51:15 +0000 (11:51 -0700)] 
bootstd: Skip over bad device during bootflows scanning

During bootstd scanning for bootdevs, if bootdev_hunt_drv() encounters
a device not found error (e.g. ENOENT), let it return a successful status
so that bootstd will continue scanning the next devices, not stopping
prematurely.

Background:

During scanning for bootflows, it's possible for bootstd to encounter a
faulty device controller. Also when the same u-boot is used for another
variant of the same board, some device controller such as SATA might
not exist.

I've found this issue while converting the Marvell Sheevaplug board to
use bootstd. This board has 2 variants, the original Sheevaplug has MMC and
USB only, but the later variant comes with USB, MMC, and eSATA ports. We
have been using the same u-boot (starting with CONFIG_IDE and later with DM
CONFIG_SATA) for both variants. This worked well with the old
envs-scripting booting scheme.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotest: cmd: mbr: Remove unreachable code
Alexander Gendin [Wed, 8 Nov 2023 03:05:19 +0000 (03:05 +0000)] 
test: cmd: mbr: Remove unreachable code

Fix an issue reported by Coverity scan, and fix code indentation.

Addresses-Coverity-ID: 467404 ("Control flow issues (DEADCODE)")
Signed-off-by: Alexander Gendin <agendin@matrox.com>
2 years agofirmware: scmi: correct a validity check against power domain id
AKASHI Takahiro [Tue, 7 Nov 2023 00:05:47 +0000 (09:05 +0900)] 
firmware: scmi: correct a validity check against power domain id

A power domain id on sandbox should be in the range from zero to
ARRAY_SIZE(scmi_pwdom) - 1. Correct the validity check logic.

Addresses-Coverity-ID: 467401 ("Out-of-bounds write")
Addresses-Coverity-ID: 467405 ("Out-of-bounds read")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2 years agoscsi: Have scsi_init_dev_desc_priv() use memset
Tom Rini [Wed, 8 Nov 2023 19:28:11 +0000 (14:28 -0500)] 
scsi: Have scsi_init_dev_desc_priv() use memset

When we do not have CONFIG_BOUNCE_BUFFER enabled, inside of
scsi_init_dev_desc_priv we never set the 'bb' field to false, we only
initialize it to true when CONFIG_BOUNCE_BUFFER is set. Given that we
have a number of other fields here we had been explicitly setting to
zero, change to first calling memset to clear the struct and then
initialize only the fields that need non-zero default values.

Addresses-Coverity-ID: 467407 ("Uninitialized variables (UNINIT)")
Fixes: 81bd22e935dc ("rockchip: block: blk-uclass: add bounce buffer flag to blk_desc")
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge tag 'u-boot-rockchip-20231110' of https://source.denx.de/u-boot/custodians...
Tom Rini [Fri, 10 Nov 2023 12:54:52 +0000 (07:54 -0500)] 
Merge tag 'u-boot-rockchip-20231110' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Add Board: rk3588 Pine64 QuartzPro64;
- Fix rk3066 enter download mode;
- Fix for ringneck-px30 board;

2 years agorockchip: include: asm: fix entering download mode rk3066
Johan Jonker [Fri, 27 Oct 2023 18:35:37 +0000 (20:35 +0200)] 
rockchip: include: asm: fix entering download mode rk3066

Keep track of the re-entries with help of the lr register.
This binary can be re-used and called from various BROM functions.
Only when it's called from the part that handles SPI, NAND or EMMC
hardware it needs to early return to BROM ones.
In download mode when it handles data on USB OTG and UART0
this section must be skipped.

Unlike newer Rockchip SoC models the rk3066 BROM code does not have built-in
support to enter download mode on return to BROM. This binary must check
the boot mode register for the BOOT_BROM_DOWNLOAD flag and reset if it's set.
It then returns to BROM to the end of the function that reads boot blocks.
From there the BROM code goes into a download mode and waits for data
on USB OTG and UART0.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: ringneck-px30: enable SPL_BOARD_INIT
Quentin Schulz [Fri, 3 Nov 2023 09:28:13 +0000 (10:28 +0100)] 
rockchip: ringneck-px30: enable SPL_BOARD_INIT

Now that Ringneck requires some board-specific code (namely resetting
the MCU companion controller) to be run during SPL stage, let's enable
SPL_BOARD_INIT.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: ringneck-px30: always reset STM32 companion controller on boot
Quentin Schulz [Fri, 3 Nov 2023 09:28:12 +0000 (10:28 +0100)] 
rockchip: ringneck-px30: always reset STM32 companion controller on boot

It's happened that glitches on the STM32_RST and STM32_BOOT lines have
put the STM32 companion microcontroller into DFU mode making it not boot
its FW, rendering it useless for the user.

Considering that the STM32 companion microcontroller is always reset on
a reboot or power cycle, resetting it once again in U-Boot SPL isn't
going to hurt it any more.

For ATtiny companion microcontroller, the situation is a bit different
because a reboot or power cycle doesn't reset it. Additionally, since it
can only be reset with a UPDI reset on the STM32_RST line, and that is
virtually impossible to mistakenly trigger, the ATtiny is unlikely to be
in unwanted reset or enter reset because U-Boot toggles STM32_RST line.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: rv1126: Read cpuid from otp and set ethaddr
Tim Lunn [Tue, 31 Oct 2023 02:07:15 +0000 (13:07 +1100)] 
rockchip: rv1126: Read cpuid from otp and set ethaddr

Provide configuration to read cpuid and generate a persistent
MAC address in ethaddr

Signed-off-by: Tim Lunn <tim@feathertop.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: otp: Add support for RV1126
Tim Lunn [Tue, 31 Oct 2023 02:07:14 +0000 (13:07 +1100)] 
rockchip: otp: Add support for RV1126

Extend the otp driver to read rv1126 otp. This driver code was
adapted from the Rockchip BSP stack.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: dts: fix bootph tags for rv1126
Tim Lunn [Mon, 30 Oct 2023 13:12:41 +0000 (00:12 +1100)] 
rockchip: dts: fix bootph tags for rv1126

RV1126 fails to boot on 2024.01-rc1.

Commit 9e644284ab81 ("dm: core: Report bootph-pre-ram/sram node as
pre-reloc after relocation") changed the behaviour of bootph-pre-ram, to
limit nodes to spl phase. This caused rv1126 boards to fail to boot with
the current dts.

This patch updates the pmu/grf nodes to bootph-all tags as they are
needed in all phases. This fixes the boot issue on rv1126 boards.

Signed-off-by: Tim Lunn <tim@feathertop.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoMAINTAINERS: Fix Sam Protsenko mail
Sam Protsenko [Tue, 7 Nov 2023 20:45:04 +0000 (14:45 -0600)] 
MAINTAINERS: Fix Sam Protsenko mail

Sam works for Linaro again. Use his work e-mail address for ANDROID AB
subsystem.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2 years agostm32mp1: read auth stats and boot_partition from tamp
Igor Opaniuk [Mon, 6 Nov 2023 10:41:52 +0000 (11:41 +0100)] 
stm32mp1: read auth stats and boot_partition from tamp

Obtain from TAMP backup register information about image authorization
status and partition id used for booting. Store this info in
environmental variables ("boot_auth" and "boot_part" correspondingly).

Image authorization supported values:
0x0 - No authentication done
0x1 - Authentication done and failed
0x2 - Authentication done and succeeded

These values are stored to TAMP backup register by Trusted Firmware-A [1].

Testing:
STM32MP> print boot_part
boot_part=1
STM32MP> print boot_auth
boot_auth=2

[1] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?h=refs/heads/integration&id=ab2b325c1ab895e626d4e11a9f26b9e7c968f8d8

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32: Limit u-boot.itb size to 0x160000 bytes on DH STM32MP15 DHSOM
Marek Vasut [Sat, 4 Nov 2023 16:31:57 +0000 (17:31 +0100)] 
arm: stm32: Limit u-boot.itb size to 0x160000 bytes on DH STM32MP15 DHSOM

The maximum size of u-boot.itb in SPI NOR on DH STM32MP15 DHSOM is
0x160000 . Define this size in U-Boot config to prevent misconfigured
builds from emitting larger u-boot.itb than the one which fits the
SPI NOR area reserved for the blob.

The SPI NOR layout is as follows:
0x00_0000..0x03_ffff ... SPL 1
0x04_0000..0x07_ffff ... SPL 2
0x08_0000..0x1d_ffff ... U-Boot
0x1e_0000..0x1e_ffff ... Environment 1
0x1f_0000..0x1f_ffff ... Environment 2

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32: Enable TCP, IPv6, wget on DH STM32MP15 DHSOM
Marek Vasut [Sat, 4 Nov 2023 16:31:56 +0000 (17:31 +0100)] 
arm: stm32: Enable TCP, IPv6, wget on DH STM32MP15 DHSOM

Enable support for TCP protocol, wget, and IPv6 on this platform.
The former two allow users download payload into the U-Boot from
a web server, which may be more convenient or easier to set up
than TFTP server. The later is enabled to future proof the IP
stack on this platform.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: dts: stm32mp: Repair damage from alignment with v6.3
Marek Vasut [Mon, 9 Oct 2023 23:15:51 +0000 (01:15 +0200)] 
ARM: dts: stm32mp: Repair damage from alignment with v6.3

The patch fixed by this commit renders ST STM32MP15xx EV1 board and
all DHSOM SoM based boards unbootable from SPI NOR. Fix the damage
by updating -u-boot.dtsi to match the stm32mp15-pinctrl.dtsi update.

Fixes: 08002ffd083d ("ARM: dts: stm32mp: alignment with v6.3")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32mp: Really fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS...
Bhupesh Sharma [Tue, 22 Aug 2023 07:51:11 +0000 (13:21 +0530)] 
arm: stm32mp: Really fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled

While 23e20b2fa6 ("arm: stm32mp: Fix compilation issue when
SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled") tried fixing
this issue, fix it really by adding #if checks for SYS_ICACHE_OFF
and SYS_DCACHE_OFF.

Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agorockchip: ringneck-px30: enable i2c command
Quentin Schulz [Wed, 25 Oct 2023 11:17:12 +0000 (13:17 +0200)] 
rockchip: ringneck-px30: enable i2c command

This is a useful tool to check the presence of a device on a specific
i2c bus, so let's enable it.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoboard: rockchip: add Pine64 QuartzPro64 RK3588 board
Tom Fitzhenry [Mon, 23 Oct 2023 14:22:22 +0000 (01:22 +1100)] 
board: rockchip: add Pine64 QuartzPro64 RK3588 board

QuartzPro64 is a Rockchip RK3588 based SBC by Pine64.

UART and boot over SD/eMMC/RJ45 are tested to work.

Linux commits from next-20231013:
8152d3d070a9 ("arm64: dts: rockchip: Add QuartzPro64 SBC device tree")

Signed-off-by: Tom Fitzhenry <tom@tom-fitzhenry.me.uk>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Cc: Eugen Hristev <eugen.hristev@collabora.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Ondrej Jirman <megi@xff.cz>
2 years agoscsi: Forceably finish migration to DM_SCSI
Tom Rini [Sat, 28 Oct 2023 00:59:51 +0000 (20:59 -0400)] 
scsi: Forceably finish migration to DM_SCSI

The migration deadline for moving to DM_SCSI was v2023.04. A further
reminder was sent out in August 2023 to the remaining platforms that had
not migrated already, and that a few more over the line (or configs
deleted).

With this commit we:
- Rename CONFIG_DM_SCSI to CONFIG_SCSI.
- Remove all of the non-DM SCSI code. This includes removing other
  legacy symbols and code and removes some legacy non-DM AHCI code.
- Some platforms that had previously been DM_SCSI=y && SCSI=n are now
  fully migrated to DM_SCSI as a few corner cases in the code assumed
  DM_SCSI=y meant SCSI=y.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2023-11-07-assorted-big-cleanups' into next
Tom Rini [Tue, 7 Nov 2023 23:33:09 +0000 (18:33 -0500)] 
Merge branch '2023-11-07-assorted-big-cleanups' into next

- Merge in changes such that CONFIG_CMDLINE can be disabled and merge
  in a series that starts to remove <common.h> usage.

2 years agox86: Drop <common.h> from remaining header files
Tom Rini [Wed, 1 Nov 2023 16:28:24 +0000 (12:28 -0400)] 
x86: Drop <common.h> from remaining header files

None of these header files need to include <common.h> so we can just
drop that entirely.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Drop <common.h> from remaining header files
Tom Rini [Wed, 1 Nov 2023 16:28:23 +0000 (12:28 -0400)] 
arm: Drop <common.h> from remaining header files

None of these header files need to include <common.h> so we can just
drop that entirely.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agosandbox: Drop <common.h>
Tom Rini [Wed, 1 Nov 2023 16:28:22 +0000 (12:28 -0400)] 
sandbox: Drop <common.h>

None of these headers need <common.h> to be included, drop it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoti: k3: Drop <common.h> usage
Tom Rini [Wed, 1 Nov 2023 16:28:21 +0000 (12:28 -0400)] 
ti: k3: Drop <common.h> usage

None of these files need <common.h> to be included, drop it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoinclude: Drop <common.h> from include lists
Tom Rini [Wed, 1 Nov 2023 16:28:20 +0000 (12:28 -0400)] 
include: Drop <common.h> from include lists

At this point, we don't need to have <common.h> be included because of
properties in the header itself, it only includes other common header
files. We've also audited the code enough at this point that we can drop
<common.h> from being included in headers and rely on code to have the
correct inclusions themselves, or at least <common.h>.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoinclude/linux/mii.h: Add <linux/types.h>
Tom Rini [Wed, 1 Nov 2023 16:28:19 +0000 (12:28 -0400)] 
include/linux/mii.h: Add <linux/types.h>

As this file uses u8/u16 we need to bring in <linux/types.h> here.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agofsl-mc: Add prototype for bd_info
Tom Rini [Wed, 1 Nov 2023 16:28:18 +0000 (12:28 -0400)] 
fsl-mc: Add prototype for bd_info

As the functions fsl_mc_ldpaa_init/fsl_mc_ldpaa_exit take a bd_info as
an argument, add a struct bd_info to this header file rather than add
<asm/u-boot.h> to the overall chain.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agols2080aqds: Add missing headers to eth_ls1088aqds.c
Tom Rini [Wed, 1 Nov 2023 16:28:17 +0000 (12:28 -0400)] 
ls2080aqds: Add missing headers to eth_ls1088aqds.c

As we call sprintf in this file we need to include vsprintf.h in order
to get the function prototype and we need linux/string.h for strcmp.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agols1088a: Add missing headers to eth_ls1088aqds.c
Tom Rini [Wed, 1 Nov 2023 16:28:16 +0000 (12:28 -0400)] 
ls1088a: Add missing headers to eth_ls1088aqds.c

As we call sprintf in this file we need to include vsprintf.h in order
to get the function prototype and we need linux/string.h for strcmp.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agopg-wcom-ls102xa: Include <config.h> in the board file
Tom Rini [Wed, 1 Nov 2023 16:28:15 +0000 (12:28 -0400)] 
pg-wcom-ls102xa: Include <config.h> in the board file

Given that this file references CFG_* defines, we need to be explicit in
our inclusion of config.h, so that these will be defined.

Reviewed-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@hitacienergy.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agopowerpc: Rework <asm/fsl_lbc.h> includes
Tom Rini [Wed, 1 Nov 2023 16:28:14 +0000 (12:28 -0400)] 
powerpc: Rework <asm/fsl_lbc.h> includes

This file should not include <config.h> nor should it include <common.h>
so remove both.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoqe: Add <asm/ppc.h> on PowerPC
Tom Rini [Wed, 1 Nov 2023 16:28:13 +0000 (12:28 -0400)] 
qe: Add <asm/ppc.h> on PowerPC

This driver needs <asm/ppc.h> when building on PowerPC, add it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agompc85xx: Add missing include in mpc85xx_sleep.c
Tom Rini [Wed, 1 Nov 2023 16:28:12 +0000 (12:28 -0400)] 
mpc85xx: Add missing include in mpc85xx_sleep.c

This file needs the include file that provides the prototypes for
flush_dcache() and others.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agopowerpc: mpc83xx: Rework includes slightly
Tom Rini [Wed, 1 Nov 2023 16:28:11 +0000 (12:28 -0400)] 
powerpc: mpc83xx: Rework includes slightly

In order to not rely on common.h providing a number of common includes,
cleanup what we include directly in order to be able to drop common.h
later.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agospi: Add <errno.h> to spi-mem-nodm.c
Tom Rini [Wed, 1 Nov 2023 16:28:10 +0000 (12:28 -0400)] 
spi: Add <errno.h> to spi-mem-nodm.c

This file uses errno return values in functions, so include <errno.h>
here rather than rely on indirect inclusion.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoomap3: Add <asm/arch/omap3.h> to <asm/arch/cpu.h>
Tom Rini [Wed, 1 Nov 2023 16:28:09 +0000 (12:28 -0400)] 
omap3: Add <asm/arch/omap3.h> to <asm/arch/cpu.h>

The include <asm/arch/cpu.h> references values in <asm/arch/omap3.h> and
so include it directly here rather than rely on indirect inclusion.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agofsl_qe: Drop common.h
Tom Rini [Wed, 1 Nov 2023 16:28:08 +0000 (12:28 -0400)] 
fsl_qe: Drop common.h

In both include/fsl_qe.h and then also remove common.h from the files
which had included fsl_qe.h

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodisplay_options.h: Correct includes
Tom Rini [Wed, 1 Nov 2023 16:28:07 +0000 (12:28 -0400)] 
display_options.h: Correct includes

First, a header should never include itself so remove that. Second, this
header needs <linux/types.h> to be included as the function prototypes
use types that we get via that header.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agopowerpc: Switch <asm/global_data.h> to <linux/types.h>
Tom Rini [Wed, 1 Nov 2023 16:28:06 +0000 (12:28 -0400)] 
powerpc: Switch <asm/global_data.h> to <linux/types.h>

In matching other architectures that have their global_data.h need to
bring in a types.h header, switch to <linux/types.h> on PowerPC.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agom68k: Remove CONFIG_FSLDMAFEC
Tom Rini [Wed, 1 Nov 2023 16:28:05 +0000 (12:28 -0400)] 
m68k: Remove CONFIG_FSLDMAFEC

There are no platforms which enable this feature, so remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoCI, pytest: Add a test for sandbox without LTO
Tom Rini [Thu, 26 Oct 2023 18:31:38 +0000 (14:31 -0400)] 
CI, pytest: Add a test for sandbox without LTO

The primary motivation for having a sandbox without LTO build in CI is
to ensure that we don't have that option break. We now have the ability
to run tests of specific options being enabled/disabled, so drop the
parts of CI that build and test that configuration specifically and add
a build test instead. We still test that "NO_LTO=1" rather than editing
the config file works via the ftrace tests.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agosandbox: Add a test for disabling CONFIG_CMDLINE
Simon Glass [Thu, 26 Oct 2023 18:31:37 +0000 (14:31 -0400)] 
sandbox: Add a test for disabling CONFIG_CMDLINE

Now that everything is working, add a test to make sure that this
builds correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoclk_k210.c: Clean up how we handle nop
Tom Rini [Thu, 26 Oct 2023 18:31:36 +0000 (14:31 -0400)] 
clk_k210.c: Clean up how we handle nop

Now that sandbox has <asm/barrier.h> and defines nop() there we should
include that in our driver for clarity and then remove our local nop()
from <k210/pll.h>.

Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agosandbox: Add <asm/barrier.h>
Tom Rini [Thu, 26 Oct 2023 18:31:35 +0000 (14:31 -0400)] 
sandbox: Add <asm/barrier.h>

Add a mostly empty asm/barrier.h file for sandbox where we define nop() to
be an empty function.

Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agosandbox: Avoid requiring CMDLINE
Simon Glass [Thu, 26 Oct 2023 18:31:34 +0000 (14:31 -0400)] 
sandbox: Avoid requiring CMDLINE

Add some dependencies on features that we had been selecting so that we
can still disable CMDLINE.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agosandbox: Disable CONFIG_DISTRO_DEFAULTS
Simon Glass [Thu, 26 Oct 2023 18:31:33 +0000 (14:31 -0400)] 
sandbox: Disable CONFIG_DISTRO_DEFAULTS

This is not used for sandbox, so drop it. Enable the things that it
controls to avoid dstrastic changes in the config settings for
sandbox builds.

The end result is that these are enabled:

   BOOTMETH_DISTRO
   BOOTSTD_DEFAULTS

and these are disabled:

   USE_BOOTCOMMAND
   BOOTCOMMAND (was "run distro_bootcmd")
   DISTRO_DEFAULTS

Note that the tools-only build has already disabled DISTRO_DEFAULTS
and BOOTSTD_FULL

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoblock: rkmtd: select CONFIG_RANDOM_UUID explicitly
AKASHI Takahiro [Thu, 26 Oct 2023 18:31:32 +0000 (14:31 -0400)] 
block: rkmtd: select CONFIG_RANDOM_UUID explicitly

This option is necessary to compile any way.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2 years agolib: uuid: move CONFIG_RANDOM_UUID
AKASHI Takahiro [Thu, 26 Oct 2023 18:31:31 +0000 (14:31 -0400)] 
lib: uuid: move CONFIG_RANDOM_UUID

This option is independent from any commands and should be managed
under lib. For instance, drivers/block/rkmtd.c is a user.

It would be better to remove this configuration.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agofastboot: Depend on CMDLINE
Tom Rini [Thu, 26 Oct 2023 18:31:30 +0000 (14:31 -0400)] 
fastboot: Depend on CMDLINE

Much of the functionality of fastboot relies on being able to run
commands as defined in the environment. This means it does depend on
CMDLINE being enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agocmd: Make most commands depend on CMDLINE
Simon Glass [Thu, 26 Oct 2023 18:31:29 +0000 (14:31 -0400)] 
cmd: Make most commands depend on CMDLINE

If we disable CMDLINE then we should not ask about enabling the hush
parser nor any of the commands that would be run on the command line as
it is no longer available. Convert the CMDLINE option into a menuconfig
and make every command referenced under cmd/Kconfig depend on it.

This leaves as future work moving the commands that are not under the
cmd/ hierarchy as future work.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoboot: Make preboot and bootcmd require CMDLINE
Tom Rini [Thu, 26 Oct 2023 18:31:28 +0000 (14:31 -0400)] 
boot: Make preboot and bootcmd require CMDLINE

In order for a predefined "preboot" or "bootcmd" to be executed by the
running system we must have a command line.  Add CMDLINE as a
dependency.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agobootmeth_script: Depend on CMDLINE
Tom Rini [Thu, 26 Oct 2023 18:31:27 +0000 (14:31 -0400)] 
bootmeth_script: Depend on CMDLINE

As this particular bootmeth requires the command line and assorted
commands to function, make sure we have CMDLINE enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agobootmeth_cros: Require bootm.o and bootm_os.o
Tom Rini [Thu, 26 Oct 2023 18:31:26 +0000 (14:31 -0400)] 
bootmeth_cros: Require bootm.o and bootm_os.o

In order to use bootmeth_cros, at least on non-X86, we need to be able
to start any type of kernel that the "bootm" code paths can handle.  Add
these objects to the required list for this option.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoboot: Move SYS_BOOTM_LEN to be by LEGACY_IMAGE_FORMAT
Tom Rini [Thu, 26 Oct 2023 18:31:25 +0000 (14:31 -0400)] 
boot: Move SYS_BOOTM_LEN to be by LEGACY_IMAGE_FORMAT

This particular option is required for booting all image types,
regardless of if we are starting an OS via command line or something
else.  Move the question for SYS_BOOTM_LEN to be by the question for
LEGACY_IMAGE_FORMAT, as that's where our generic OS questions start.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoboot: Rework BOOT_DEFAULTS to allow for CMDLINE to be disabled
Tom Rini [Thu, 26 Oct 2023 18:31:24 +0000 (14:31 -0400)] 
boot: Rework BOOT_DEFAULTS to allow for CMDLINE to be disabled

We split BOOT_DEFAULTS to have BOOT_DEFAULTS_FEATURES and
BOOT_DEFAULTS_CMDS that in turn list general features or commands that
we want enabled when BOOT_DEFAULTS is selected.  We only select
BOOT_DEFAULTS_CMDS if CMDLINE is set.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoboot: Make DISTRO_DEFAULTS select CMDLINE
Tom Rini [Thu, 26 Oct 2023 18:31:23 +0000 (14:31 -0400)] 
boot: Make DISTRO_DEFAULTS select CMDLINE

The implementation of DISTRO_DEFAULTS is done in environment scripts and
requires the command line in order to work. Because of this, select
CMDLINE here.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoautoboot: Correct dependencies on CMDLINE
Simon Glass [Thu, 26 Oct 2023 18:31:22 +0000 (14:31 -0400)] 
autoboot: Correct dependencies on CMDLINE

Make AUTOBOOT depend on CMDLINE since it is mostly meaningless without it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agobootmeth: Make BOOTMETH_EFILOADER depend on CMD_BOOTEFI
Tom Rini [Thu, 26 Oct 2023 18:31:21 +0000 (14:31 -0400)] 
bootmeth: Make BOOTMETH_EFILOADER depend on CMD_BOOTEFI

Today, the bootmeth for using the EFI loader via bootefi depends on
calling the bootefi command directly, so make this in turn depend on
CMD_BOOTEFI.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoefi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR
Simon Glass [Thu, 26 Oct 2023 18:31:20 +0000 (14:31 -0400)] 
efi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR

The command should not be used to enable library functionality. Add a
new BOOTEFI_BOOTMGR Kconfig for that. Adjust the conditions so that the
same code is built.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2 years agocli_simple: Rework this support slightly
Tom Rini [Thu, 26 Oct 2023 18:31:19 +0000 (14:31 -0400)] 
cli_simple: Rework this support slightly

The interactive portion of our non-HUSH 'simple' parser is guarded by
CONFIG_CMDLINE already.  Much of the code behind this simple parser is
also used as "input" parser, such as from menu interfaces and so forth
and not strictly command line input.  To support this, always build the
assorted cli object files, but guard the interactive portions of
cli_simple.c with a CMDLINE check.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agovideo: Don't require the font command
Simon Glass [Thu, 26 Oct 2023 18:31:18 +0000 (14:31 -0400)] 
video: Don't require the font command

While it is nice to have the font command, using 'select' makes it
impossible to build the console code without it. Stop using 'select' and
make it default if CONSOLE_TRUETYPE is enabled when asking the command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agotest: Make UNIT_TEST depend on CMDLINE
Simon Glass [Thu, 26 Oct 2023 18:31:17 +0000 (14:31 -0400)] 
test: Make UNIT_TEST depend on CMDLINE

Many tests make some use of the command line, so require it for all test
code.

This could be teased apart, perhaps with a test flag indicating that it
uses the command line. Leave that for later.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoenv: Move env_set() out of cmd/nvedit.c and in to env/common.c
Tom Rini [Thu, 26 Oct 2023 18:31:16 +0000 (14:31 -0400)] 
env: Move env_set() out of cmd/nvedit.c and in to env/common.c

Inside of env/common.c we already have our helper env_set_xxx functions,
and even have a comment that explains why env_set() itself wasn't moved.
We now handle that move. This requires that we rename the previous
_do_env_set() to env_do_env_set() and note it as an internal env
function. Add comments about this function to explain why we do this
when we add the prototype. Add a new function, env_inc_id() to allow for
the counter to be updated by both commands and callers, and document
this as well by the prototype.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoKconfig: Move CONFIG_SYS_[CP]BSIZE to common/Kconfig
Tom Rini [Thu, 26 Oct 2023 18:31:15 +0000 (14:31 -0400)] 
Kconfig: Move CONFIG_SYS_[CP]BSIZE to common/Kconfig

Move CONFIG_SYS_CBSIZE (console buffer size) and CONFIG_SYS_PBSIZE
(console print buffer size) out of cmd/Kconfig and in to common/Kconfig.
Create help entries for both which explain their usage and why they are
both not entirely command centric.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoqemu: Correct CMD_QFW dependencies in Kconfig
Tom Rini [Thu, 26 Oct 2023 18:31:14 +0000 (14:31 -0400)] 
qemu: Correct CMD_QFW dependencies in Kconfig

Rather than selecting CMD_QFW, we should make the option itself by
enabled by default on these platforms.  Then in the board-specific
Kconfig we should select the appropriate back-end as needed if the
command is enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoversion: Separate our version string from the version command
Tom Rini [Thu, 26 Oct 2023 18:31:13 +0000 (14:31 -0400)] 
version: Separate our version string from the version command

In order to be able to disable all commands we need to construct our
version string in a common file, and have the version command reference
that string, like the other users of it do.  Create common/version.c
with just the strings.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodfu: Make DFU_TFTP depend on NETDEVICES
Tom Rini [Thu, 26 Oct 2023 18:31:12 +0000 (14:31 -0400)] 
dfu: Make DFU_TFTP depend on NETDEVICES

In order to do a DFU update over TFTP we need to have some network
device available, so make this depend on NETDEVICES

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agovirtio: Make VIRTIO_NET depend on NETDEVICES
Tom Rini [Thu, 26 Oct 2023 18:31:11 +0000 (14:31 -0400)] 
virtio: Make VIRTIO_NET depend on NETDEVICES

As VIRTIO_NET is the symbol for enabling network devices, make this
depend on NETDEVICES

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agobuildman: Use oldconfig when adjusting the config
Simon Glass [Thu, 26 Oct 2023 18:31:10 +0000 (14:31 -0400)] 
buildman: Use oldconfig when adjusting the config

We cannot be sure that the new config is consistent, particularly when
changing a major item like CONFIG_CMDLINE. Use 'make oldconfig' to
check that and avoid any such problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoMerge tag 'xilinx-for-v2024.01-rc3' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 7 Nov 2023 15:36:23 +0000 (10:36 -0500)] 
Merge tag 'xilinx-for-v2024.01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2024.01-rc3

xilinx:
- Disable lock in mini spi configurations

zynq:
- DTS syncups
- Kconfig updates

zynqmp:
- DTS syncups
- Kconfig fixups

versal:
- Make 30MHz as default freq for spi

versal net:
- Enable ADMA for mmc

serial:
- Read baudrate from DT

spi:
- Put spi lock under one Kconfig
- Support 64bit addresses in cadance_ospi
- zynqmp_gqspi - change logging support

firmware:
- Handle errors in zynqmp_pm_feature()

include:
- Sync vsc8531 dt binding with kernel

2 years agoMAINTAINERS: fastboot: add Mattijs
Mattijs Korpershoek [Thu, 5 Oct 2023 13:04:26 +0000 (15:04 +0200)] 
MAINTAINERS: fastboot: add Mattijs

Fastboot has been marked as orphaned since 2021.
Since I'm interested in maintaining this, assign myself.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Lukasz Majewski <lukma@denx.de>
2 years agoMAINTAINERS: usb gadget: add Mattijs
Mattijs Korpershoek [Thu, 5 Oct 2023 13:04:25 +0000 (15:04 +0200)] 
MAINTAINERS: usb gadget: add Mattijs

It seems that Lukasz and Marek could get some help in maintaining the
usb gadget drivers.

Assign myself as maintainer.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Lukasz Majewski <lukma@denx.de>
2 years agodt-bindings: Remove VSC8531 specific RGMII delay definitions
Michal Simek [Wed, 1 Nov 2023 15:05:16 +0000 (16:05 +0100)] 
dt-bindings: Remove VSC8531 specific RGMII delay definitions

Based on Linux upstream discussion value enumeration shouldn't be used.
Instead of it delay in pS should be used that's why remove it from the
header.

Link: https://lore.kernel.org/all/YNsm%2F0dmpBgO8mqr@lunn.ch/
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/bbd343474856a67252f3b31d22b3b5a80ad04043.1698851109.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Add description for nvmem efuse layout
Michal Simek [Wed, 1 Nov 2023 12:06:15 +0000 (13:06 +0100)] 
arm64: zynqmp: Add description for nvmem efuse layout

Based on discussion with DT folks at link below there is not going to be
any name restrictions for child names. That's why add description for
current nvmem layout.

Link: https://lore.kernel.org/lkml/20231013101450.573-3-praveen.teja.kundanala@amd.com/
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/af81299cafc2bd13ed30dcd69bdf6efb5fbb7f68.1698840373.git.michal.simek@amd.com
2 years agoARM: zynq: Add partition description
Michal Simek [Wed, 1 Nov 2023 11:22:14 +0000 (12:22 +0100)] 
ARM: zynq: Add partition description

Xilinx is using standard mtd partition layout for quite a long time. It is
used for testing purpose on evaluation boards.
Also #address/size-cells shouldn't be present without nodes which should
use them that's why move them from zynq-7000.dtsi to nand/nor nodes
directly.

The patch was tested on zc706 and zedboard(with also increasing max
frequency and rx bus width).

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/4c3348981bba32d3892194420d78fe8621c47534.1698837725.git.michal.simek@amd.com
2 years agoxilinx: Enable SPI_FLASH_MTD by default
Michal Simek [Wed, 1 Nov 2023 11:22:13 +0000 (12:22 +0100)] 
xilinx: Enable SPI_FLASH_MTD by default

Provide access to qspi flash layout via mtd command.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/b3c4a3eddb71aab9535b034380d0dbae770828d4.1698837725.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Comment all smmu entries
Michal Simek [Wed, 1 Nov 2023 08:01:03 +0000 (09:01 +0100)] 
arm64: zynqmp: Comment all smmu entries

SMMU is disabled by default and not all masters can be enabled at the same
time because of limited number of entries. That's why comment all iommu
properties but keep them for reference in DT. In XEN case they should be
added back and Xen should have SMMU enabled by default.
Also add IDs for DP and DPDMA.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e868c27c52ded5d8ef25f75ba394b1ab3b31b80a.1698825657.git.michal.simek@amd.com
2 years agoarm64: versal-net: Add DTSes for mini qspi/ospi configuration
Michal Simek [Thu, 26 Oct 2023 14:04:52 +0000 (16:04 +0200)] 
arm64: versal-net: Add DTSes for mini qspi/ospi configuration

Mini U-Boot is running out of OCM and it's only purpose is to program non
volatile memories. There are different configurations which ospi/qspi can
be that's why describe them via DT.
DT binding is already approved that's why there is no reason not to add it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a99a8d72201a782fc811715942dea97fb5ab583b.1698329087.git.michal.simek@amd.com
2 years agoarm64: versal: Add DTSes for mini qspi/ospi configuration
Michal Simek [Thu, 26 Oct 2023 14:04:51 +0000 (16:04 +0200)] 
arm64: versal: Add DTSes for mini qspi/ospi configuration

Mini U-Boot is running out of OCM and it's only purpose is to program non
volatile memories. There are different configurations which ospi/qspi can
be that's why describe them via DT.
DT binding is already approved that's why there is no reason not to add it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/9518ab1c4299a45e800b8611172edd78c9243132.1698329087.git.michal.simek@amd.com
2 years agoARM: zynq: Add DTSes for mini qspi configurations
Michal Simek [Thu, 26 Oct 2023 14:04:50 +0000 (16:04 +0200)] 
ARM: zynq: Add DTSes for mini qspi configurations

Mini U-Boot is running out of OCM and it's only purpose is to program non
volatile memories. There are different configurations which qspi can be
that's why describe them via DT.
DT binding is already approved that's why there is no reason not to add it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e7d31a9d9c4a76e171eefc619f31fabd0831a614.1698329087.git.michal.simek@amd.com
2 years agoARM: zynq: Add DTSes for mini qspi configurations
Michal Simek [Thu, 26 Oct 2023 14:04:49 +0000 (16:04 +0200)] 
ARM: zynq: Add DTSes for mini qspi configurations

Mini U-Boot is running out of OCM and it's only purpose is to program non
volatile memories. There are different configurations which qspi can be
that's why describe them via DT.
DT binding is already approved that's why there is no reason not to add it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/28b3cdd7e91b2b4c3c36d0bf65aa5bac042f248c.1698329087.git.michal.simek@amd.com
2 years agoxilinx: versal: Setup 30MHz as default spi frequency
Michal Simek [Tue, 31 Oct 2023 10:50:54 +0000 (11:50 +0100)] 
xilinx: versal: Setup 30MHz as default spi frequency

Align default SPI configuration with ZynqMP/Versal NET.
There is no reason to run on lower frequencies.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c1d6ebd659f3002649b1200c926f8b9ed3132085.1698749448.git.michal.simek@amd.com
2 years agoarm64: versal-net: enable CONFIG_MMC_SDHCI_ADMA
Venkatesh Yadav Abbarapu [Fri, 27 Oct 2023 03:04:46 +0000 (08:34 +0530)] 
arm64: versal-net: enable CONFIG_MMC_SDHCI_ADMA

The Standard Host Controller Interface (SDHCI) specification version
3.00 adds support for Advanced DMA (ADMA) for both 64 and 32 bit
widths of DMA. This significantly improves read and write throughput.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20231027030446.4009-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoarm64: zynqmp: Fix Kconfig entry indentation
Michal Simek [Thu, 26 Oct 2023 06:34:31 +0000 (08:34 +0200)] 
arm64: zynqmp: Fix Kconfig entry indentation

Use tabs instead of space for entry indentation which is standard coding
style.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/ff28e719de82258c066f1fedae87f88597f367b5.1698302068.git.michal.simek@amd.com
2 years agoarm: xilinx: Add missing dual parallel flash description
Michal Simek [Mon, 23 Oct 2023 07:21:53 +0000 (09:21 +0200)] 
arm: xilinx: Add missing dual parallel flash description

Describe flash memories based on the latest DT binding.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/cddf2909d0445eba08b998d42ffc31c1fa3132b9.1698045694.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Disable Tri-state for MIO38 Pin
Tejas Bhumkar [Fri, 20 Oct 2023 05:06:22 +0000 (10:36 +0530)] 
arm64: zynqmp: Disable Tri-state for MIO38 Pin

gpio38 is used in SOM's kv260 to reset the Ethernet PHY.
At present, HW reset is not working properly as Tri-stateĀ 
is enabled for MIO38, causing inappropriate PHY register reads.

Disabled Tri-state for MIO38 to make HW reset work.

Tri-state disable :
ZynqMP> md 0xFF180208 2
ff18020800bfe7a3 00000540

Tri-state enable :
ZynqMP> md 0xFF180208 2
ff18020800bfe7e3 00000540

Signed-off-by: Tejas Bhumkar <tejas.arvind.bhumkar@amd.com>
Link: https://lore.kernel.org/r/20231020050622.972750-1-tejas.arvind.bhumkar@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agozynqmp: migrate gqspi debug to logging
Ibai Erkiaga [Fri, 13 Oct 2023 12:37:27 +0000 (13:37 +0100)] 
zynqmp: migrate gqspi debug to logging

The following patch migrates the usage of debug and printf functions
to the relevant logging function as per U-Boot DM guidelines.

Additionally some of the debugging statements have been rearanged for
a more meaningfull debug experience.

aarch64-linux-gnu-size reports 229 bytes less when debug is enabled at
file level, while is just 5bytes more when disabled.

Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com>
Link: https://lore.kernel.org/r/20231013123739.2757979-1-ibai.erkiaga-elorza@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>