]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
3 years agospi: cadence-quadspi: Use STIG mode for all ops with small payload
Apurva Nandan [Wed, 12 Apr 2023 10:58:55 +0000 (16:28 +0530)] 
spi: cadence-quadspi: Use STIG mode for all ops with small payload

OSPI controller supports all types of op variants in STIG mode,
only limitation being that the data payload should be less than
8 bytes when not using memory banks.

STIG mode is more stable for operations that send small data
payload and is more efficient than using DMA for few bytes of
memory accesses. It overcomes the limitation of minimum 4 bytes
read from flash into RAM seen in DAC mode.

Use STIG mode for all read and write operations that require
data input/output of less than 8 bytes from the flash, and thereby
support all four phases, cmd/address/dummy/data, through OSPI STIG.

Also, remove the reorder address chunk in apb_command_write since we now
setup ADDR BIT field that does the same job in a cleaner way.

Signed-off-by: Apurva Nandan <a-nandan@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agospi: cadence-quadspi: Fix check condition for DTR ops
Apurva Nandan [Wed, 12 Apr 2023 10:58:54 +0000 (16:28 +0530)] 
spi: cadence-quadspi: Fix check condition for DTR ops

buswidth and dtr fields in spi_mem_op are only valid when the
corresponding spi_mem_op phase has a non-zero length. For example,
SPI NAND core doesn't set buswidth when using SPI_MEM_OP_NO_ADDR
phase.

Fix the dtr checks in set_protocol() to ignore empty spi_mem_op
phases, as checking for dtr field in empty phase will result in
false negatives.

Signed-off-by: Apurva Nandan <a-nandan@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agomtd: spi-nor-core: Add fixups for s25fs512s
Takahiro Kuwano [Sat, 22 Apr 2023 23:55:49 +0000 (01:55 +0200)] 
mtd: spi-nor-core: Add fixups for s25fs512s

This patch adds fixups for s25fs512s to address the following issues
from reading SFDP:

  - Non-uniform sectors by factory default. The setting needs to be
    checked and assign erase hook as needed.
  - Page size is wrongly advertised in SFDP.
  - READ_1_1_2 (3Bh/3Ch), READ_1_1_4 (6Bh/6Ch), and PP_1_1_4 (32h/34h)
    are not supported.
  - Bank Address Register (BAR) is not supported.

In addition, volatile version of Quad Enable is used for safety.

Based on patch by Takahiro Kuwano with s25fs_s_post_bfpt_fixup() updated
to use 4-byte address commands instead of extended address mode and the
page_size is fixed to 256

For future use, manufacturer code should be moved out from framework
code as same as in Linux.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Cong Dang <cong.dang.xn@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agovideo: panel: add generic endeavoru panel
Svyatoslav Ryhel [Tue, 25 Apr 2023 07:51:47 +0000 (10:51 +0300)] 
video: panel: add generic endeavoru panel

Family of panels used by HTC in One X. Though were used variants
at least from 3 vendors, this driver provides generic support for
all of them.

Tested-by: Ion Agorria <ion@agorria.com> # HTC One X T30 Sony
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # HTC One X T30 Sharp
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovideo: tegra: add DC based PWM backlight driver
Svyatoslav Ryhel [Tue, 25 Apr 2023 07:51:46 +0000 (10:51 +0300)] 
video: tegra: add DC based PWM backlight driver

DC based PWM backlight is found on some T20 and T30 devices
(HTC One X). This backlight is controlled by Tegra DC and
is adjustable by the DC PM0 or PM1 signal.

Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # HTC One X T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # HTC One X T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovideo: panel: add Renesas R69328 MIPI DSI panel driver
Svyatoslav Ryhel [Tue, 25 Apr 2023 07:51:45 +0000 (10:51 +0300)] 
video: panel: add Renesas R69328 MIPI DSI panel driver

Driver adds support for panels with Renesas R69328 IC

Currently supported compatible is:
- jdi,dx12d100vm0eaa

Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # LG P880 T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovideo: panel: add Renesas R61307 MIPI DSI panel driver
Svyatoslav Ryhel [Tue, 25 Apr 2023 07:51:44 +0000 (10:51 +0300)] 
video: panel: add Renesas R61307 MIPI DSI panel driver

R61307 is liquid crystal driver for high-definition
amorphous silicon (a-Si) panels and is ideal for
tablets and smartphones.

Supported compatibles are:
- koe,tx13d100vm0eaa
- hitachi,tx13d100vm0eaa

Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # LG P880 T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovideo: bridge: add Solomon SSD2825 DSI/LVDS driver
Svyatoslav Ryhel [Tue, 25 Apr 2023 07:51:43 +0000 (10:51 +0300)] 
video: bridge: add Solomon SSD2825 DSI/LVDS driver

SSD2825 is an innovative and cost-effective MIPI Bridge Chip solution
targeting high resolution smartphones. It can convert 24bit RGB
interface into 4-lane MIPI-DSI interface to drive extremely high
resolution display modules of up to 800 x 1366, while supporting AMOLED,
a-si LCD or LTPS advanced panel technologies for smartphone applications.

Bridge is wrapped in panel uClass model for wider compatibility.

Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # LG P880 T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
3 years agovideo: add lm3533 backlight driver
Svyatoslav Ryhel [Tue, 25 Apr 2023 07:51:42 +0000 (10:51 +0300)] 
video: add lm3533 backlight driver

This is basic lm3533 driver only with bank A and backlight cell
support.

Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # LG P880 T30
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agogpio-uclass: fix off-by-one in gpio_request_list_by_name_nodev()
Rasmus Villemoes [Wed, 19 Apr 2023 10:10:13 +0000 (12:10 +0200)] 
gpio-uclass: fix off-by-one in gpio_request_list_by_name_nodev()

By the time we jump to the err label, count represents the number of
gpios we've successfully requested. So by subtracting one, we fail to
free the most recently requested.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoxen: Limit execution to EL1 only
Michal Simek [Tue, 18 Apr 2023 12:51:56 +0000 (14:51 +0200)] 
xen: Limit execution to EL1 only

Xen core_init() is calling HVC which should be called from EL1 level that's
why do Xen initialization only when U-Boot runs in EL1.

Signed-off-by: Michal Simek <michal.simek@amd.com>
3 years agoxen: Add dependency on armv8
Michal Simek [Tue, 18 Apr 2023 12:51:55 +0000 (14:51 +0200)] 
xen: Add dependency on armv8

U-Boot currently implements hypervisor calls only for ARM64 that's why add
dependency on ARM64. The hardware functionality is also available on
ARMv7a, but currently not supported by U-Boot, hence it is not added to the
list of dependencies here.

Signed-off-by: Michal Simek <michal.simek@amd.com>
3 years agoarm: omap3: Directly use SMC #1 in lowlevel_init.S
Pali Rohár [Thu, 13 Apr 2023 20:34:43 +0000 (22:34 +0200)] 
arm: omap3: Directly use SMC #1 in lowlevel_init.S

Since commit de39dc71625d ("arm: armv7-a: Compile and tune for armv7-a
instead of armv5") is used -march=armv7-a option for Omap3 platforms.

With directive ".arch_extension sec" it is possible for -march=armv7-a to
directly use ARM SMC instruction.

So enable ".arch_extension sec" in Omap3 lowlevel_init.S and replace hand
assembled ".word 0xe1600071" by "SMC #1".

Since commit 51d063865064 ("arm: omap-common: add secure smc entry") same
pattern is already used in arch/arm/cpu/armv7/omap-common/lowlevel_init.S.

Signed-off-by: Pali Rohár <pali@kernel.org>
3 years agotools: env: update lock path in README
John Keeping [Wed, 12 Apr 2023 11:24:26 +0000 (12:24 +0100)] 
tools: env: update lock path in README

Commit aeb40f1166e0 ("tools: env: use /run to store lockfile") updated the
path to the lockfile but did not update the documentation to match.

Use the new path in the documentation.

Fixes: aeb40f1166 ("tools: env: use /run to store lockfile")
Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoata: pci: enable bus mastering
Christian Gmeiner [Tue, 11 Apr 2023 15:07:02 +0000 (17:07 +0200)] 
ata: pci: enable bus mastering

The non DM code path already would enable pci bus mastering. Do the
same for the DM code path.

Fixes AHCI problems I am seeing on an Intel Apollolake device.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[trini: Use ahci_dev not dev in the calls]
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agompc8379erdb: Convert to using DM_SERIAL
Sinan Akman [Fri, 7 Apr 2023 22:03:44 +0000 (18:03 -0400)] 
mpc8379erdb: Convert to using DM_SERIAL

  Convert to DM_SERIAL for mpc8379erdb.

Signed-off-by: Sinan Akman <sinan@writeme.com>
3 years agoqemu: dfu: Correct memset call in set_dfu_alt_info
Tom Rini [Thu, 6 Apr 2023 13:58:40 +0000 (09:58 -0400)] 
qemu: dfu: Correct memset call in set_dfu_alt_info

When building with clang, we see:
board/emulation/common/qemu_dfu.c:51:24: warning: 'memset' call operates on objects of type 'char' while the size is based on a different type 'char *' [-Wsizeof-pointer-memaccess]

As we're calling memset with the length set to the size of the pointer
and not the size of the buffer. Correct this with a call of the size of
the buffer itself.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
3 years agoapi: Rework menu, and make it depend on CC_IS_GCC
Tom Rini [Thu, 6 Apr 2023 13:48:58 +0000 (09:48 -0400)] 
api: Rework menu, and make it depend on CC_IS_GCC

We can only use the old U-Boot API for standalone applications when
building U-Boot with GCC as it relies upon the "gd is a register" trick
that only GCC supports. Further, rework the rest of the options so that
they are in the API menu and only visible if API support is enabled.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosysreset: psci: add psci_sysreset_get_status
Peng Fan [Thu, 6 Apr 2023 10:23:19 +0000 (18:23 +0800)] 
sysreset: psci: add psci_sysreset_get_status

Add weak function psci_sysreset_get_status for platform to define
their own reset status with CONFIG_SYSRESET enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agosysreset: psci: enable DM_FLAG_PRE_RELOC
Peng Fan [Thu, 6 Apr 2023 10:23:18 +0000 (18:23 +0800)] 
sysreset: psci: enable DM_FLAG_PRE_RELOC

It is possible that cpu core may reset before relocation with PSCI reset

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agofirmware: psci: enable DM_FLAG_PRE_RELOC
Peng Fan [Thu, 6 Apr 2023 10:23:17 +0000 (18:23 +0800)] 
firmware: psci: enable DM_FLAG_PRE_RELOC

It is possible that cpu core may reset before relocation with PSCI reset

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoxen: Fix Kconfig dependencies
Michal Simek [Thu, 6 Apr 2023 08:04:15 +0000 (10:04 +0200)] 
xen: Fix Kconfig dependencies

XEN config can be enabled by other platforms (even it doesn't need to make
sense) that's why fix dependencies. XEN (xenbus.c) requires sscanf (also
pvblock needs it). And PVBLOCK is inside drivers/xen folder which requires
XEN to be enabled.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agopytest: Use --lazy with umount
Tom Rini [Thu, 6 Apr 2023 02:19:39 +0000 (22:19 -0400)] 
pytest: Use --lazy with umount

Sometimes when doing tests on real hardware we sometimes run in to the
case where some of these mounts haven't been fully flushed.  Using the
--lazy option with umount will allow us to continue while letting the OS
handle flushing the data out still.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agousb: gadget: f_mass_storage: Rework do_request_sense slightly
Tom Rini [Wed, 5 Apr 2023 23:48:57 +0000 (19:48 -0400)] 
usb: gadget: f_mass_storage: Rework do_request_sense slightly

When building with clang, it notes that sdinfo may be unused
uninitialized in some cases. This appears to be true from reading the
code, and we can simply set the variable to zero to start with and be as
correct as before.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marex@denx.de>
3 years agoboot/image-board.c: Silence warning in select_ramdisk
Tom Rini [Wed, 5 Apr 2023 23:48:56 +0000 (19:48 -0400)] 
boot/image-board.c: Silence warning in select_ramdisk

When building with clang we get a warning that rdaddr could be
uninitialized in one case. While this cannot functionally happen, we can
easily silence the warning.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoarmv7: Use isb/dsb directly in start.S
Tom Rini [Wed, 5 Apr 2023 23:48:55 +0000 (19:48 -0400)] 
armv7: Use isb/dsb directly in start.S

Toolchains which do not directly support using "isb" and "dsb" directly
are no longer functionally supported in U-Boot. Furthermore, clang has
for a long time warned about using the alternate form that we were.
Update the code.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoarm: Centralize fixed register logic
Tom Rini [Wed, 5 Apr 2023 23:48:54 +0000 (19:48 -0400)] 
arm: Centralize fixed register logic

When building for ARM64, we need to pass -ffixed-x18 and otherwise pass
-ffixed-r9. Rather than having this logic in two places, we can do this
once in arch/arm/config.mk. Further, while gcc will ignore being passed
both -ffixed-r9 and -ffixed-x18 and simply use -ffixed-x18, clang will
note that -ffixed-r9 is not used. Remove this duplication to also remove
the warning.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoclang: Don't look for libgcc
Tom Rini [Wed, 5 Apr 2023 23:48:53 +0000 (19:48 -0400)] 
clang: Don't look for libgcc

In the case of using clang to build, and having not already enabled the
private libgcc, do not look for it, as it will not be found nor
required.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoclang: Add $(CLANG_TARGET) to LDPPFLAGS
Tom Rini [Wed, 5 Apr 2023 23:48:52 +0000 (19:48 -0400)] 
clang: Add $(CLANG_TARGET) to LDPPFLAGS

When we invoke $(CPP) to make u-boot.lds we have LDPPFLAGS available to
set other required flags here. As this file is for the target and not
the host, we must ensure that CPP knows what the target architecture is.
For this, pass in $(CLANG_TARGET).

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoarm: Only support ARM64_CRC32 when using GCC
Tom Rini [Wed, 5 Apr 2023 23:48:51 +0000 (19:48 -0400)] 
arm: Only support ARM64_CRC32 when using GCC

Today, only gcc has __builtin_aarch64_crc32b (clang-16 does not, for
example). Make this option depend on CC_IS_GCC.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agofs: yaffs2: Make yaffsfs_deviceList static
Bin Meng [Wed, 5 Apr 2023 14:40:22 +0000 (22:40 +0800)] 
fs: yaffs2: Make yaffsfs_deviceList static

yaffsfs_deviceList is only referenced in yaffsfs.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
3 years agotest: move unit tests into a sub-menu
Heinrich Schuchardt [Mon, 3 Apr 2023 18:27:43 +0000 (20:27 +0200)] 
test: move unit tests into a sub-menu

The main configuration menu should not contain detail settings.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agotest: improve configuration for Kconfig test options
Heinrich Schuchardt [Mon, 3 Apr 2023 10:04:39 +0000 (12:04 +0200)] 
test: improve configuration for Kconfig test options

* Fix dependencies
* Provide labels that are easier to grasp.
* Fix typo %s/whgch/which/
* Fix type %s/Is/is/

Fixes: 29784d62eded ("test: Add some tests for kconfig.h")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoarm64: interrupts: print FAR_ELx on sync exceptions
Pavel Skripkin [Sun, 2 Apr 2023 16:27:34 +0000 (19:27 +0300)] 
arm64: interrupts: print FAR_ELx on sync exceptions

Default synchronous exceptions handler prints only esr and register
dump. Sometimes it requiers to see an address which caused exceptions
to understand what's going on

ARM ARM in section D13.2.41 states that FAR_EL2 will contain meanfull
value in case of ESR.EC holds 0x20, 0x21, 0x24, 0x25, 0x22, 0x34 or
0x35. Same applies for EL1.

This patch adds function whivh determine current EL, gets correct FAR
register and prints it on panic.

Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
3 years agoconfigs: Create minimal vexpress_fvp_defconfig
Peter Hoyes [Fri, 31 Mar 2023 08:58:13 +0000 (09:58 +0100)] 
configs: Create minimal vexpress_fvp_defconfig

The vexpress64 board family now relies on OF_CONTROL and
OF_HAS_PRIOR_STAGE, so platform-specific configuration requirements
are minimal.

The vexpress_aemv8a_semi_defconfig file defines many flags that are not
needed for a minimal boot, such as flash memory configuration.

Therefore create vexpress_fvp_defconfig which contains the minimum
configuration required to boot on an Arm v8a FVP.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
3 years agovexpress64: Enable VIRTIO_MMIO and RTC_PL031 in the base model
Peter Hoyes [Fri, 31 Mar 2023 08:58:12 +0000 (09:58 +0100)] 
vexpress64: Enable VIRTIO_MMIO and RTC_PL031 in the base model

The Arm EBBR (Embedded Base Boot Requirements) require that the time
and basic networking EFI interfaces are available and working, so long
as the hardware has an RTC and network interface.

Arm FVPs typically have a memory-mapped PL031 RTC and a VIRTIO_NET
device defined in the device tree, so "imply" these in the Kconfig for
the FVP base model to simplify creating EBBR-compliant firmware.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
3 years agovexpress64: Use OF_HAS_PRIOR_STAGE for BASE_FVP variant
Peter Hoyes [Fri, 31 Mar 2023 08:58:11 +0000 (09:58 +0100)] 
vexpress64: Use OF_HAS_PRIOR_STAGE for BASE_FVP variant

BASE_FVP now typically uses a devicetree provided by a prior boot stage
(typically Arm TF-A), so imply this option by default when
TARGET_VEXPRESS64_BASE_FVP is selected.

OF_HAS_PRIOR_STAGE selects OF_BOARD so this change is minor, but aligns
TARGET_VEXPRESS64_BASE_FVP with TARGET_VEXPRESS64_BASER_FVP.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
3 years agoinclude: configs: am64x_evm: Change to using .env
Nikhil M Jain [Thu, 30 Mar 2023 08:54:09 +0000 (14:24 +0530)] 
include: configs: am64x_evm: Change to using .env

Move to using .env file for setting up environment variables for am64x.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
3 years agoarch: mach-k3: j721s2_init: Disable the firewalls
Jayesh Choudhary [Tue, 28 Mar 2023 13:02:01 +0000 (18:32 +0530)] 
arch: mach-k3: j721s2_init: Disable the firewalls

Some firewalls enabled by ROM are still left on. So some
address space is inaccessible to the bootloader. For example,
in OSPI boot mode we get an exception and the system hangs.
Therefore, disable all the firewalls left on by the ROM.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agosoc: soc_ti_k3: fix revision array bounds checks
Rasmus Villemoes [Fri, 24 Mar 2023 07:44:29 +0000 (08:44 +0100)] 
soc: soc_ti_k3: fix revision array bounds checks

If rev is equal to the array size, we'll access the array
one-past-the-end.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Bryan Brattlof <bb@ti.com>
3 years agoarmv8: enable HAFDBS for other ELx when FEAT_HAFDBS is present
meitao [Fri, 17 Mar 2023 16:22:53 +0000 (00:22 +0800)] 
armv8: enable HAFDBS for other ELx when FEAT_HAFDBS is present

u-boot could be run at EL1/EL2/EL3. so we set it as same as EL1 does.
otherwise it will hang when enable mmu, that is what we encounter
in our SOC.

Signed-off-by: meitao <meitaogao@asrmicro.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/3bf38943aeab4700c2319bff2a1477d99c6afd2f
3 years agoarm64: Use level-2 for largest block mappings when FEAT_HAFDBS is present
Marc Zyngier [Fri, 17 Mar 2023 16:22:52 +0000 (00:22 +0800)] 
arm64: Use level-2 for largest block mappings when FEAT_HAFDBS is present

In order to make invalidation by VA more efficient, set the largest
block mapping to 2MB, mapping it onto level-2. This has no material
impact on u-boot's runtime performance, and allows a huge speedup
when cleaning the cache.

Signed-off-by: Marc Zyngier <maz@kernel.org>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/417a73581a72ff6d6ee4b0938117b8a23e32f7e8
3 years agoarm64: Use FEAT_HAFDBS to track dirty pages when available
Marc Zyngier [Fri, 17 Mar 2023 16:22:51 +0000 (00:22 +0800)] 
arm64: Use FEAT_HAFDBS to track dirty pages when available

Some recent arm64 cores have a facility that allows the page
table walker to track the dirty state of a page. This makes it
really efficient to perform CMOs by VA as we only need to look
at dirty pages.

Signed-off-by: Marc Zyngier <maz@kernel.org>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/3c433724e6f830a6b2edd5ec3d4a504794887263
3 years agoMerge branch '2023-04-25-use-bounce-buffers-for-VIRTIO_F_IOMMU_PLATFORM'
Tom Rini [Tue, 25 Apr 2023 18:22:40 +0000 (14:22 -0400)] 
Merge branch '2023-04-25-use-bounce-buffers-for-VIRTIO_F_IOMMU_PLATFORM'

To quote the author:
These patches will use bounce buffers when VIRTIO_F_IOMMU_PLATFORM
feature is in a virtio device.

This feature can be tested with qemu with -device virtio-iommu-pci.  So
that when a -device virtio-blk-pci with iommu_platform=true, it will
uses the bounce buffer instead.

3 years agospi: synquacer: Silence uninitialized variable warnings
Ilias Apalodimas [Fri, 7 Apr 2023 09:13:00 +0000 (12:13 +0300)] 
spi: synquacer: Silence uninitialized variable warnings

When building with clang, the compiler compains with

drivers/spi/spi-synquacer.c:212:11: warning: variable 'bus_width' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        else if (priv->mode & SPI_TX_OCTAL)
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-synquacer.c:276:11: note: uninitialized use occurs here
        val |= ((bus_width >> 1) << BUS_WIDTH);
                 ^~~~~~~~~
drivers/spi/spi-synquacer.c:212:7: note: remove the 'if' if its condition is always true
        else if (priv->mode & SPI_TX_OCTAL)
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-synquacer.c:189:25: note: initialize the variable 'bus_width' to silence this warning

So initialize bus_width to 1 and add a warning if none of the configured
modes matches

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agomtd: spi-nor: missing fallthrough in set_4byte()
Heinrich Schuchardt [Sat, 1 Apr 2023 07:34:08 +0000 (09:34 +0200)] 
mtd: spi-nor: missing fallthrough in set_4byte()

Add a missing fallthrough macro to avoid a -Wimplicit-fallthrough warning.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agospi: npcm-fiu: add regulator feature and remove set clock
Jim Liu [Tue, 7 Mar 2023 08:10:35 +0000 (16:10 +0800)] 
spi: npcm-fiu: add regulator feature and remove set clock

NPCM7xx/NPCM8xx default is boot from flash.
removed set clock feature due to reliability and security.
the clock will set by bootblock or tip.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agospi: f-ospi: Add missing spi_mem_default_supports_op() helper
Kunihiko Hayashi [Mon, 27 Mar 2023 05:34:51 +0000 (14:34 +0900)] 
spi: f-ospi: Add missing spi_mem_default_supports_op() helper

The .supports_op() callback function returns true by default after
performing driver-specific checks. Therefore the driver cannot apply
the buswidth in devicetree.

Call spi_mem_default_supports_op() helper to handle the buswidth
in devicetree.

Fixes: 358f803ae21c ("spi: Add Socionext F_OSPI SPI flash controller driver")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agospi: spi-mem: perform odd len check only while writing data
Dhruva Gole [Wed, 1 Mar 2023 07:43:46 +0000 (13:13 +0530)] 
spi: spi-mem: perform odd len check only while writing data

in spi_mem_dtr_supports_op we have a check for allowing only even number
of bytes to be r/w. Odd bytes writing can be a concern while writing
data to a flash for example because 8 DTR mode doesn't support it.
However, reading ODD Bytes even  though may not be physically possible
we can still allow for it because it will not have serious implications
on any critical registers being overwritten since they are just reads.

Cc: Vaishnav Achath <vaishnav.a@ti.com>
Cc: Pratyush Yadav <pratyush@kernel.org>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Tested-by: Nikhil M Jain <n-jain1@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agospi: spi-mem: s/dummy/data buswidth check in dtr_supports_op()
Dhruva Gole [Wed, 1 Mar 2023 07:43:45 +0000 (13:13 +0530)] 
spi: spi-mem: s/dummy/data buswidth check in dtr_supports_op()

This should have been op->data.buswidth instead as we check for octal
bus width for the data related ops
Also add explanation for why there is checks for 8D even data bytes

Cc: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Pratyush Yadav <ptyadav@amazon.de>
Tested-by: Nikhil M Jain <n-jain1@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agomtd: spi-nor: Add CHIP_ERASE optimization
Marek Vasut [Thu, 2 Mar 2023 01:46:32 +0000 (02:46 +0100)] 
mtd: spi-nor: Add CHIP_ERASE optimization

Add support for CHIP_ERASE opcode 0xc7 . This is useful in case the
entire SPI NOR is supposed to be erase at once, as is it considerably
faster than 4k sector erase and even slightly faster than 64k block
erase. The spi_nor_erase_chip() implementation is adapted from Linux
6.1.y as of commit 7d54cb2c26dad ("Linux 6.1.14") . The chip erase is
only used in case the entire MTD device is being erased, and the chip
does support this functionality.

Timing figures from W25Q128JW:
16 MiB erase using 4kiB sector erase opcode 0x20 ... 107.5s
16 MiB erase using 64kiB block erase opcode 0xd8 ... 39.1s
16 MiB erase using chip erase opcode 0xc7 .......... 38.7s

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agovirtio: Use bounce buffers when VIRTIO_F_IOMMU_PLATFORM is set
Will Deacon [Wed, 29 Mar 2023 14:25:00 +0000 (22:25 +0800)] 
virtio: Use bounce buffers when VIRTIO_F_IOMMU_PLATFORM is set

Devices advertising the VIRTIO_F_IOMMU_PLATFORM feature require
platform-specific handling to configure their DMA transactions.

When handling virtio descriptors for such a device, use bounce
buffers to ensure that the underlying buffers are always aligned
to and padded to PAGE_SIZE in preparation for platform specific
handling at page granularity.

Signed-off-by: Will Deacon <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/1eff171e613ee67dca71dbe97be7282e2db17011
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovirtio: Allocate bounce buffers for devices with VIRTIO_F_IOMMU_PLATFORM
Will Deacon [Wed, 29 Mar 2023 14:24:59 +0000 (22:24 +0800)] 
virtio: Allocate bounce buffers for devices with VIRTIO_F_IOMMU_PLATFORM

In preparation for bouncing virtio data for devices advertising the
VIRTIO_F_IOMMU_PLATFORM feature, allocate an array of bounce buffer
structures in the vring, one per descriptor.

Signed-off-by: Will Deacon <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/3e052749e7c50c4c1a6014e645ae3b9be3710c07
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovirtio: Add helper functions to attach/detach vring descriptors
Will Deacon [Wed, 29 Mar 2023 14:24:58 +0000 (22:24 +0800)] 
virtio: Add helper functions to attach/detach vring descriptors

Move the attach and detach logic for manipulating vring descriptors
out into their own functions so that we can later extend these to
bounce the data for devices with VIRTIO_F_IOMMU_PLATFORM set.

Signed-off-by: Will Deacon <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/f73258a4bfe968c5f935db45f2ec5cc0104ee796
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovirtio: Allocate virtqueue in page-size units
Will Deacon [Wed, 29 Mar 2023 14:24:57 +0000 (22:24 +0800)] 
virtio: Allocate virtqueue in page-size units

In preparation for explicit bouncing of virtqueue pages for devices
advertising the VIRTIO_F_IOMMU_PLATFORM feature, introduce a couple
of wrappers around virtqueue allocation and freeing operations,
ensuring that buffers are handled in terms of page-size units.

Signed-off-by: Will Deacon <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/b4bb5227d4cf4fdfcd8b4e1ff2692d3a54d1482a
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovirtio: pci: Tear down VQs in virtio_pci_reset()
Will Deacon [Wed, 29 Mar 2023 14:24:56 +0000 (22:24 +0800)] 
virtio: pci: Tear down VQs in virtio_pci_reset()

The pages backing the virtqueues for virtio PCI devices are not freed
on reset, despite the virtqueue structure being freed as part of the
driver '->priv_auto' destruction at ->remove() time.

Call virtio_pci_del_vqs() from virtio_pci_reset() to free the virtqueue
pages before freeing the virtqueue structure itself.

Signed-off-by: Will Deacon <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/5ed54ccd83cbffd0d8719ce650604b4e44b5b0d8
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agovirtio: Expose VIRTIO_F_IOMMU_PLATFORM in device features
Will Deacon [Wed, 29 Mar 2023 14:24:55 +0000 (22:24 +0800)] 
virtio: Expose VIRTIO_F_IOMMU_PLATFORM in device features

If we detect the VIRTIO_F_IOMMU_PLATFORM transport feature for a device,
then expose it in the device features.

Signed-off-by: Will Deacon <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/9693bd26bfcfe77d6a1295a561420e08c5daf019
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoMerge branch '2023-04-24-TI-platform-updates'
Tom Rini [Mon, 24 Apr 2023 22:09:22 +0000 (18:09 -0400)] 
Merge branch '2023-04-24-TI-platform-updates'

- Merge in assorted K3 updates, and re-sync all of the device trees for
  TI platforms with v6.3-rc6

3 years agocommon: Replace #ifdef and #if with if's
Nikhil M Jain [Thu, 20 Apr 2023 12:11:12 +0000 (17:41 +0530)] 
common: Replace #ifdef and #if with if's

Avoid using preprocessor compilation directives and instead use simple
logical expressions for better readability since compiler will anyway
optimize out the respective code block if condition is not satisfied.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
3 years agoboard: ti: am62x: evm: OSPI support for splash screen
Nikhil M Jain [Thu, 20 Apr 2023 12:11:11 +0000 (17:41 +0530)] 
board: ti: am62x: evm: OSPI support for splash screen

Add ospi boot media support to load splash image from OSPI memory,
add offset to read image from ospi and necessary flags defininig type
of storage and storage device.

Use CONFIG_IS_ENBALED to use the splash locations at SPL and u-boot
proper.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
3 years agoinclude: Enable video related global data variable and splash at SPL
Nikhil M Jain [Thu, 20 Apr 2023 12:11:10 +0000 (17:41 +0530)] 
include: Enable video related global data variable and splash at SPL

To include video related global data variables and splash functions at
SPL and u-boot proper, use CONFIG_IS_ENABLED.

Replace CONFIG_CMD_BMP with CONFIG_BMP to enable splash_display function
at u-boot proper and SPL.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agocommon: Enable splash functions at SPL
Nikhil M Jain [Thu, 20 Apr 2023 12:11:09 +0000 (17:41 +0530)] 
common: Enable splash functions at SPL

To support splash screen at both u-boot proper and SPL use
CONFIG_IS_ENABLED and CONFIG_VAL to check for video related Kconfigs at
respective stages.

Replace CONFIG_CMD_BMP with CONFIG_BMP to enable splash_display function
at u-boot proper and SPL.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodrivers: video: Enable necessary video functions at SPL
Nikhil M Jain [Thu, 20 Apr 2023 12:11:08 +0000 (17:41 +0530)] 
drivers: video: Enable necessary video functions at SPL

To support video driver at SPL use CONFIG_IS_ENABLED and CONFIG_VAL,
which checks for stage specific configs and thus enables video support
at respective stage.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
3 years agocommon: Makefile: Rule to compile bmp.c
Nikhil M Jain [Thu, 20 Apr 2023 12:11:07 +0000 (17:41 +0530)] 
common: Makefile: Rule to compile bmp.c

Add rule to compile bmp.c at SPL and u-boot proper when CONFIG_SPL_BMP
and CONFIG_BMP are defined.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
3 years agocmd: bmp: Split bmp commands and functions
Nikhil M Jain [Thu, 20 Apr 2023 12:11:06 +0000 (17:41 +0530)] 
cmd: bmp: Split bmp commands and functions

To enable splash screen at SPL, need to compile cmd/bmp.c which also
includes bmp commands, since SPL doesn't use commands split bmp.c into
common/bmp.c which includes all bmp functions and cmd/bmp.c which only
contains bmp commands.

Add function delclaration for bmp_info in video.h.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agocommon: Kconfig: Add BMP configs
Nikhil M Jain [Thu, 20 Apr 2023 12:11:05 +0000 (17:41 +0530)] 
common: Kconfig: Add BMP configs

Add CONFIG_BMP and CONFIG_SPL_BMP which enable displaying bmp images at
u-boot proper and SPL.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
3 years agocommon: Makefile: Add rule to compile splash and splash_source at SPL
Nikhil M Jain [Thu, 20 Apr 2023 12:11:04 +0000 (17:41 +0530)] 
common: Makefile: Add rule to compile splash and splash_source at SPL

To enable splash screen and loading bmp from boot media, add rules to
compile splash.c and splash_source.c at SPL stage only when
CONFIG_SPL_SPLASH_SCREEN and CONFIG_SPL_SPLASH_SOURCE are defined.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodrivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL
Nikhil M Jain [Thu, 20 Apr 2023 12:11:03 +0000 (17:41 +0530)] 
drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL

To enable TIDSS driver only at SPL stage add rule to compile the TIDSS
video driver.

CONFIG_$(SPL_)VIDEO_TIDSS will compile tidss_drv, at SPL only if
CONFIG_SPL_VIDEO_TIDSS is defined and at u-boot proper if
CONFIG_VIDEO_TIDSS is defined.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodrivers: video: Makefile: Rule to compile necessary video driver files
Nikhil M Jain [Thu, 20 Apr 2023 12:11:02 +0000 (17:41 +0530)] 
drivers: video: Makefile: Rule to compile necessary video driver files

To enable video driver at SPL, need to compile video-uclass,
vidconsole-uclass, backlight-uclass, panel-uclass, simple-panel, add
rules to compile them at SPL and u-boot proper. To support
splash_display at SPL, need to compile video-bmp, add rule to compile at
SPL and u-boot proper.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
3 years agodrivers: Makefile: Add rule to compile video driver
Nikhil M Jain [Thu, 20 Apr 2023 12:11:01 +0000 (17:41 +0530)] 
drivers: Makefile: Add rule to compile video driver

Compile video driver at SPL using CONFIG_SPL_VIDEO.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
3 years agodrivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL
Nikhil M Jain [Thu, 20 Apr 2023 12:11:00 +0000 (17:41 +0530)] 
drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL

To enable tidss display driver only at SPL stage, add necessary config,
CONFIG_SPL_VIDEO_TIDSS.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
3 years agodrivers: video: Kconfig: Add configs for enabling video at SPL
Nikhil M Jain [Thu, 20 Apr 2023 12:10:59 +0000 (17:40 +0530)] 
drivers: video: Kconfig: Add configs for enabling video at SPL

Add Kconfigs which enable the video driver and splash screen at SPL
stage only and not at u-boot proper. The existing Kconfigs from u-boot
proper were not used to make SPL splash screen independent to them.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
3 years agoarm: mach-k3: am642: move do_dt_magic() after sysfw loading
Christian Gmeiner [Tue, 28 Mar 2023 14:13:14 +0000 (16:13 +0200)] 
arm: mach-k3: am642: move do_dt_magic() after sysfw loading

Makes it possible to use e.g mcu_spi0 for custom board detection.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
3 years agoinclude: configs: j721e_evm: Fix name_fdt for J7200
Neha Malcom Francis [Fri, 14 Apr 2023 11:03:52 +0000 (16:33 +0530)] 
include: configs: j721e_evm: Fix name_fdt for J7200

Currently, name_fdt is not set for J7200, fix this so right DTB is
picked during boot.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
3 years agoarm: mach-k3: common: re-locate authentication for atf/optee
Manorit Chawdhry [Fri, 14 Apr 2023 04:18:01 +0000 (09:48 +0530)] 
arm: mach-k3: common: re-locate authentication for atf/optee

For setting up the master firewalls present in the K3 SoCs, the arm64
clusters need to be powered on.

Re-locates the code for atf/optee authentication.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoremoteproc: ti_k3_arm64: Change the startup of arm64 core
Manorit Chawdhry [Fri, 14 Apr 2023 04:18:00 +0000 (09:48 +0530)] 
remoteproc: ti_k3_arm64: Change the startup of arm64 core

Configuring master firewalls require the power of the cluster to be
enabled before configuring them, change the load of rproc to configure
the gtc clocks and start the cluster along with configuring the boot
vector.

The start of rproc will only start the core.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: dts: k3-am625-r5-sk: add a53 cluster power
Manorit Chawdhry [Fri, 14 Apr 2023 04:17:59 +0000 (09:47 +0530)] 
arm: dts: k3-am625-r5-sk: add a53 cluster power

adds a53 cluster to control from the rproc driver

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: dts: k3-am62a7-r5-sk: add a53 cluster power domain node
Manorit Chawdhry [Fri, 14 Apr 2023 04:17:58 +0000 (09:47 +0530)] 
arm: dts: k3-am62a7-r5-sk: add a53 cluster power domain node

adds a53 cluster to control from the rproc driver

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: dts: k3-am642-r5: add a53 cluster power domain node
Manorit Chawdhry [Fri, 14 Apr 2023 04:17:57 +0000 (09:47 +0530)] 
arm: dts: k3-am642-r5: add a53 cluster power domain node

adds a53 cluster to control from the rproc driver

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: dts: k3-am642-r5-sk: add a53 cluster power domain node
Manorit Chawdhry [Fri, 14 Apr 2023 04:17:56 +0000 (09:47 +0530)] 
arm: dts: k3-am642-r5-sk: add a53 cluster power domain node

adds a53 cluster to control from the rproc driver

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: dts: k3-j7200-r5: add a72 cluster power domain node
Manorit Chawdhry [Fri, 14 Apr 2023 04:17:55 +0000 (09:47 +0530)] 
arm: dts: k3-j7200-r5: add a72 cluster power domain node

adds a72 cluster to control from the rproc driver

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: dts: k3-j721e-r5: add a72 cluster power domain node
Manorit Chawdhry [Fri, 14 Apr 2023 04:17:54 +0000 (09:47 +0530)] 
arm: dts: k3-j721e-r5: add a72 cluster power domain node

adds a72 cluster to control from the rproc driver

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: dts: k3-j721e-r5-sk: add a72 cluster power domain node
Manorit Chawdhry [Fri, 14 Apr 2023 04:17:53 +0000 (09:47 +0530)] 
arm: dts: k3-j721e-r5-sk: add a72 cluster power domain node

adds a72 cluster to control from the rproc driver

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: dts: k3-j721s2-r5: add a72 cluster power domain node
Manorit Chawdhry [Fri, 14 Apr 2023 04:17:52 +0000 (09:47 +0530)] 
arm: dts: k3-j721s2-r5: add a72 cluster power domain node

adds a72 cluster to control from the rproc driver

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
3 years agoarm: mach-k3: Remove empty sys_proto.h include
Andrew Davis [Thu, 6 Apr 2023 16:38:21 +0000 (11:38 -0500)] 
arm: mach-k3: Remove empty sys_proto.h include

This header file is now empty, remove it.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoarm: mach-k3: Move J721s2 SPL init functions to mach-k3
Andrew Davis [Thu, 6 Apr 2023 16:38:20 +0000 (11:38 -0500)] 
arm: mach-k3: Move J721s2 SPL init functions to mach-k3

This matches AM64 and J721e and removes the need to forward
declare k3_spl_init(), k3_mem_init(), and check_rom_loaded_sysfw()
in sys_proto.h.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoarm: mach-k3: Move sdelay() and wait_on_value() declaration
Andrew Davis [Thu, 6 Apr 2023 16:38:19 +0000 (11:38 -0500)] 
arm: mach-k3: Move sdelay() and wait_on_value() declaration

These probably should be in some system wide header given their use.
Until then move them out of K3 sys_proto.h so we can finish cleaning
that header out.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoarm: mach-k3: Remove unused fdt_disable_node()
Andrew Davis [Thu, 6 Apr 2023 16:38:18 +0000 (11:38 -0500)] 
arm: mach-k3: Remove unused fdt_disable_node()

This function is not used currently; remove it.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoarm: mach-k3: Add weak do_board_detect() to common file
Andrew Davis [Thu, 6 Apr 2023 16:38:17 +0000 (11:38 -0500)] 
arm: mach-k3: Add weak do_board_detect() to common file

This matches how it was done for pre-K3 TI platforms and it allows
us to move the forward declaration out of sys_proto.h.

It also removes the need for K3_BOARD_DETECT as one is free to simply
override the weak function in their board files as needed.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoarm: mach-k3: Move sysfw-loader.h out of mach includes
Andrew Davis [Thu, 6 Apr 2023 16:38:16 +0000 (11:38 -0500)] 
arm: mach-k3: Move sysfw-loader.h out of mach includes

This header is only used locally by K3 init files, no need to have it
up with the global mach includes. Move into local includes.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoarm: mach-k3: Make release_resources_for_core_shutdown() common
Andrew Davis [Thu, 6 Apr 2023 16:38:15 +0000 (11:38 -0500)] 
arm: mach-k3: Make release_resources_for_core_shutdown() common

This function is the same for each device when it needs to shutdown
the R5 core. Move this to the common section and move the remaining
device specific ID list to the device hardware include.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoconfigs: j721s2_evm.h: Remove refrences to J7200 EVM
Andrew Davis [Thu, 6 Apr 2023 16:38:14 +0000 (11:38 -0500)] 
configs: j721s2_evm.h: Remove refrences to J7200 EVM

The J7200 EVM will not include this file, this J7200 checks look
to be a copy/paste errora from j721e_evm.h, which J7200 *can* include.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoconfigs: j721x_evm: Remove unneeded check for SYS_K3_SPL_ATF
Andrew Davis [Thu, 6 Apr 2023 16:38:13 +0000 (11:38 -0500)] 
configs: j721x_evm: Remove unneeded check for SYS_K3_SPL_ATF

The TARGET_x_R5_EVM check is already enough to limit these defines to
only the correct builds. Remove the extra outer check.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agosoc: soc_ti_k3: Use hardware.h to remove definition duplication
Andrew Davis [Thu, 6 Apr 2023 16:38:12 +0000 (11:38 -0500)] 
soc: soc_ti_k3: Use hardware.h to remove definition duplication

The K3 JTAG and SoC ID information is already stored in the K3 arch
hardware file, include that and use its definitions here.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoarm: mach-k3: Move J721e SoC detection out of common section
Andrew Davis [Thu, 6 Apr 2023 16:38:11 +0000 (11:38 -0500)] 
arm: mach-k3: Move J721e SoC detection out of common section

This belongs in the J721e specific file as it is the only place
this is used. Any board level users should use the SOC driver.

While here, move the J721e and J7200 SoC IDs out of sys_proto.h
and into hardware.h. Use a macro borrowed from Rockchip and add
the rest of the SoC IDs for completeness and later use.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoarm: mach-k3: Move MSMC fixup to SoC level
Andrew Davis [Thu, 6 Apr 2023 16:38:10 +0000 (11:38 -0500)] 
arm: mach-k3: Move MSMC fixup to SoC level

The MSMC fixup is something we do based on SoC, not based on the board.
So this fixup does not belong in the board files. Move this to the
mach-k3 common file so that it does not have to be done in each board
that uses these SoCs.

We use ft_system_setup() here instead of ft_board_setup() since it is no
longer board level. Enable OF_SYSTEM_SETUP in the configurations that use
this to keep functionality the same.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
3 years agoRevert "arm: dts: dra7*/am57xx-idk-evm-u-boot: Add ipu early boot DT changes"
Andrew Davis [Tue, 11 Apr 2023 18:25:10 +0000 (13:25 -0500)] 
Revert "arm: dts: dra7*/am57xx-idk-evm-u-boot: Add ipu early boot DT changes"

This reverts commit 5717294230bc3578959960003be8984bbbb33642. This
does not exist in upstream kernel.org and breaks boot on DRA7-EVMs.
Drop the same.

Signed-off-by: Andrew Davis <afd@ti.com>
3 years agoarm: dts: keystone: Non-functional changes sync with v6.3-rc6
Andrew Davis [Tue, 11 Apr 2023 18:25:09 +0000 (13:25 -0500)] 
arm: dts: keystone: Non-functional changes sync with v6.3-rc6

This is a collection of all the whitespace, renames, comment, and other
changes that should not change the DT functionality from Linux v6.3-rc6.

Signed-off-by: Andrew Davis <afd@ti.com>
3 years agoarm: dts: omap: Non-functional changes sync with v6.3-rc6
Andrew Davis [Tue, 11 Apr 2023 18:25:08 +0000 (13:25 -0500)] 
arm: dts: omap: Non-functional changes sync with v6.3-rc6

This is a collection of all the whitespace, renames, comment, and other
changes that should not change the DT functionality from Linux v6.3-rc6.

Signed-off-by: Andrew Davis <afd@ti.com>
3 years agoarm: dts: dm8x: Non-functional changes sync with v6.3-rc6
Andrew Davis [Tue, 11 Apr 2023 18:25:07 +0000 (13:25 -0500)] 
arm: dts: dm8x: Non-functional changes sync with v6.3-rc6

This is a collection of all the whitespace, renames, comment, and other
changes that should not change the DT functionality from Linux v6.3-rc6.

Signed-off-by: Andrew Davis <afd@ti.com>