Commit graph

25773 commits

Author SHA1 Message Date
Dmitry Malkin
60878e753c rpi5: Use devicetree as alternative way to read IO base addresses
MBOX and Watchdog on RPi5/bcm2712 have a different base IO offsets.
Find them via devicetree blob passed by bootloader.

Signed-off-by: Dmitry Malkin <dmitry@bedrocksystems.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Tested-by: Jens Maus <mail@jens-maus.de>
Tested-by: Darko Alavanja <darko.alavanja@konsulko.com>
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2024-01-30 17:39:39 +01:00
Dmitry Malkin
a5a27eafc4 rpi5: add initial memory map for bcm2712
This includes:
* 1GB of RAM (from 4GB or 8GB total)
* AXI ranges (main peripherals)

When HDMI cable is plugged in at boot time firmware will
insert "simple-framebuffer" device into devicetree and will
shrink first memory region to 0x3f800000UL. Board setup then
will properly reserve framebuffer region.

When no HDMI cable is plugged in the size of the region will
be 0x3fc00000UL.

Signed-off-by: Dmitry Malkin <dmitry@bedrocksystems.com>
Tested-by: Jens Maus <mail@jens-maus.de>
Tested-by: Darko Alavanja <darko.alavanja@konsulko.com>
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2024-01-30 17:39:31 +01:00
Neil Armstrong
076529725f ARM: meson: stop printing board model after sysinfo update
After the sysinfo update, Model is printed twice, remove
the now duplicate Model print from mach-meson/board-info.

Link: https://lore.kernel.org/r/20240124-u-boot-model-print-fix-v1-1-484960069623@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-01-30 09:35:51 +01:00
Sean Anderson
c9309f40a6 treewide: Remove clk_free
This function is a no-op. Remove it.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231216193843.2463779-3-seanga2@gmail.com
2024-01-29 22:35:02 -05:00
Sean Anderson
82719d3f40 clk: Remove rfree
Nothing uses this function. Remove it. Since clk_free no longer does
anything, just stub it out.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231216193843.2463779-2-seanga2@gmail.com
2024-01-29 22:35:02 -05:00
Tom Rini
d5c0c990c3 Pull request efi-2024-04-rc1-4
Documentation:
 
 * uefi: remove ".py" suffix for pytest.py command
 * correct date in migration plan for CONFIG_DM
 
 UEFI:
 
 * fix conflicting SPDX license in RISC-V EFI linker scripts
 * page align EFI binary section in RISC-V EFI binaries
 * separate .data and .text sections of RISC-V EFI binaries
 * use common function to get EFI configuration table
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmW4FP0ACgkQhO4vgnE3
 U0ubIQ//b8nZf1lBTesAWjeLeiTrnRkr/yfSlikppDQBaq4kogcU8j5OM4xetVMa
 qtmTZLLVRbJuTVAZSWYm8oPN4+EfSRYzdcQuFTIHS9ZHeVovJ0zwtEp6TG0csPcF
 p1KgWFZuACM4OhYjQvNqUms9oCQbRGsn/GJd1pLacy4oX9cKojM8n9SBJc4x5FSH
 LiN8Fu/Jw10yGwyEL6lkuQUCHysItFRkcc5wVrcQm8oOt+RoT41SgmYmzWZJEoaP
 zGYErYGKNVXmFPFEn3gSzoSisPhuPLf/oYU03kYYmzlhnzUVeHf/V7XC034CCNoI
 V3YB9uHihgGzju9JfLsC5qdZ7QvtE+Pz6/OgJnY4DZMvGZHiziDJZucf/gb8Ms5o
 YXE4oKvEx68qO5rVc4aMtOdeaC4vV9D+ngt6zO70tXnXj108gQ7t74ln9NSwEOpM
 v3M4p9Q4j+md/uRarYjCnF9nXqtlL6G63E1lnIRLnqM8GEVS38RYvfB72hyrr+bb
 fnPGK85ga/z64EET8E2SdwrRkq/M8dr2jqsdUhCWzPBscEaR/8xipvelNpPzHwaC
 M7M8wZIA195FqEpxEXlvmWD2yjav3xIXfUfhttwwe+s/abNzkfi5bOvY67ZbhqE4
 ckRccC44Idh2HdCd+gXr/wFVqqU8wtlf0YpokwgoZHzgauJF7P8=
 =ZGn5
 -----END PGP SIGNATURE-----

Merge tag 'efi-2024-04-rc1-4' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-04-rc1-4

Documentation:

* uefi: remove ".py" suffix for pytest.py command
* correct date in migration plan for CONFIG_DM

UEFI:

* fix conflicting SPDX license in RISC-V EFI linker scripts
* page align EFI binary section in RISC-V EFI binaries
* separate .data and .text sections of RISC-V EFI binaries
* use common function to get EFI configuration table
2024-01-29 16:19:10 -05:00
Tom Rini
073f4f10b9 Merge patch series "Move framebuffer reservation for SPL to RAM end"
Devarsh Thakkar <devarsht@ti.com> says:

Move video memory reservation for SPL at end of RAM so that it does
not interefere with reservations for next stage so that the next stage
need not have holes in between for passed regions and instead it can
maintain continuity in reservations.

Also catch the bloblist before starting reservations to avoid the same
problem.

While at it, also fill missing fields in video handoff struct before
passing it to next stage.

This is as per discussions at :
For moving SPL framebuffer reservation at end of RAM:

https://lore.kernel.org/all/CAPnjgZ3xSoe_G3yrqwuAvoiVjUfZ+YQgkOR0ZTVXGT9VK8TwJg@mail.gmail.com/

For filling missing video handoff fields :
https://lore.kernel.org/all/CAPnjgZ1Hs0rNf0JDirp6YPsOQ5=QqQSP9g9qRwLoOASUV8a4cw@mail.gmail.com/
2024-01-29 14:49:25 -05:00
Devarsh Thakkar
ba20b2443c arm: mach-k3: common: Reserve video memory from end of the RAM
Setup video memory before page table reservation using
"spl_reserve_video_from_ram_top" which ensures framebuffer memory gets
reserved from the end of RAM.

This is done to enable the next stage to directly skip the
pre-reserved area from previous stage right from the end of RAM without
having to make any gaps/holes to accommodate those regions which was the
case before as previous stage reserved region not from the end of RAM.

Use gd->ram_top instead of local ram_top and update gd->reloc_addr after
each reservation to ensure further regions are reserved properly.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
2024-01-29 14:49:17 -05:00
Samuel Holland
4a8592eeab sunxi: binman: Support FIT generation for 32-bit SoCs
Some 32-bit SoCs can use SCP firmware to implement additional PSCI
functionality, such as system suspend. In order to load this firmware
from SPL, we need to generate and use a FIT instead of a legacy image.

Adjust the binman FIT definition so it does not rely on TF-A BL31, as
this is not used on 32-bit SoCs. Instead, after loading the firmware,
U-Boot proper is executed directly. This requires to provide an
entry point property for the U-Boot image node, which confuses some
loaders like sunxi-fel, so protect that to only be used if we have no
BL31.

Signed-off-by: Samuel Holland <samuel@sholland.org>
[Andre: filter U-Boot entry point property]
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-29 14:31:00 +00:00
Samuel Holland
53c0ad5d27 sunxi: binman: Move BL31 and SCP firmware addresses to Kconfig
This is easier to read than the #ifdef staircase, provides better
visibility into the memory map (alongside the other Kconfig
definitions), and allows these addresses to be reused from code.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2024-01-29 14:30:59 +00:00
Nick Alilovic
1cca1011cb sunxi: add Transpeed 8K618-T board support
This is a Chinese TV box based on Allwinner H618 SoC.

The DRAM parameters were derived from the values found in a firmware update.

Signed-off-by: Nick Alilovic <nickalilovic@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2024-01-29 14:30:59 +00:00
Andre Przywara
60bb9aa51c sunxi: dts: update devicetree files from Linux-v6.8-rc1
Sync the devicetree files from the official Linux kernel tree, v6.8-rc1.
This time only small changes in the existing files, but five new boards
got added, which opens the door for their respective defconfig files.

As before, this omits the non-backwards compatible changes to the R_INTC
controller, to remain compatible with older kernels.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-01-29 14:30:59 +00:00
Heinrich Schuchardt
3e911b7419 riscv: separate .data and .text sections of EFI binaries
EFI binaries should not contain sections that are both writable and
executable. Separate the RX .text section from the RW .data section

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-01-29 11:30:10 +01:00
Heinrich Schuchardt
a5c3c1ba8a riscv: page align EFI binary section
Change the alignment of the relocation code in EFI binaries to match page
boundaries.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-01-29 11:29:52 +01:00
Heinrich Schuchardt
396daa7497 riscv: conflicting SPDX license linker scripts
Fix conflicting SPDX license information in linker scripts introduced by
commit 7215787c4e ("SPDX: Convert single license tags to Linux Kernel
style").

Fixes: 7215787c4e ("SPDX: Convert single license tags to Linux Kernel style")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-01-29 11:29:52 +01:00
Andre Przywara
5375fb1d50 sunxi: simplify U-Boot proper only builds
At the moment every Allwinner board builds and requires an SPL, even
though we select this individually in each _defconfig file.
For experiments and for early bringup of new SoCs it would be beneficial
to only build U-Boot proper, for instance to postpone a tedious SPL port
(including DRAM support) in the initial phase.

Protect some SPL related symbols that we unconditionally select at the
moment with "if SPL", to avoid Kconfig conflicts when CONFIG_SPL is
disabled.

This alone does not cleanly build U-Boot proper only yet, but gets it
far enough so that the binary can be harvested.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-01-29 01:18:52 +00:00
Andre Przywara
d785a06a5a sunxi: remove common.h inclusion
The usage of the common.h include file is deprecated, and has already
been removed from several files.

Get rid of all inclusions in the arch/arm/mach-sunxi directory. Most
files actually don't need the header at all, for the few others just
include the headers that we actually require.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-01-29 01:18:52 +00:00
Andre Przywara
5862eb8b85 sunxi: sun9i: remove unneeded base addresses from header
The cpu_sun9i.h header file defined the base addresses for quite some
peripherals of the Allwinner A80 CPU, even though we now only use a
fraction of that.
Most of the addresses are now either read from the DT, or were never
used in U-Boot in the first place.

Removed the ones that are not used in the whole of the U-Boot source.
to make it clear that this file only contains addresses that are needed
for the SPL operation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-01-29 01:18:52 +00:00
Andre Przywara
2f2cb03b6f sunxi: sun4i: remove unneeded base addresses from header
The cpu_sun4i.h header file defined the base addresses for quite some
peripherals of earlier Allwinner CPUs, even though we now only use a
fraction of that.
Most of the addresses are now either read from the DT, or were never
used in U-Boot in the first place.

Removed the ones that are not used in the whole of the U-Boot source.
to make it clear that this file only contains addresses that are needed
for the SPL operation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-01-29 01:18:52 +00:00
Andre Przywara
4c5f03ef3f sunxi: sun50i-h6: remove unneeded base addresses from header
The cpu_sun50i_h6.h header file defined the base addresses for quite some
peripherals of the Allwinner H6 and related CPUs, even though we now only
use a fraction of that.
Most of the addresses are now either read from the DT, or were never used
in U-Boot in the first place.

Removed the ones that are not used in the whole of the U-Boot source.
to make it clear that this file only contains addresses that are needed
for the SPL operation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-01-29 01:18:52 +00:00
Max Krummenacher
00812e2257 arm: mach-k3: am62: provide more soc feature info accessors
Add two functions, one which returns the SoC speed grade and one
which returns the SoC operating temperature range.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2024-01-24 11:12:11 -05:00
Max Krummenacher
9c68b0427c arm: mach-k3: am62: move device identification accessor functions to header
mach-k3/am625_fdt.c does fdt fixup depending on fields in the device
identification register. Move the accessors to the device identification
register as inline functions into the am62_hardware.h header, so that
they can be used for other functionality.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2024-01-24 11:12:11 -05:00
Sam Protsenko
3d80ec5265 board: samsung: Add support for E850-96 board
Add support for WinLink E850-96 board [1]. It's based on Exynos850 SoC
and follows 96boards specification, so it's compatible with 96boards
mezzanine boards [2]. This patch enables next features:

  * Serial console
  * USI
  * PMU (muxing AP UART path)
  * Pinctrl
  * Clocks
  * Timer (ARMv8 architected)
  * Reset control

It's quite a minimal enablement. Features like MMC, USB and Ethernet
will be enabled later.

The rationale for config values is as follows:

  * TEXT_BASE = 0xf8800000

    That's where BL2 loads the U-Boot payload, so TEXT_BASE must be
    exactly this value. Overall the memory map is designed in a way to
    keep the bootloader in the upper 128 MiB area of RAM, which is
    0xf8000000..0xffffffff. That includes bootloader's code, stack,
    data, heap, MMU tables, etc. All the memory below that 128 MiB chunk
    can be used for storing boot images (0x80000000..0xf8000000).

  * CUSTOM_SYS_INIT_SP_ADDR = 0xf8c00000

    Just 4 MiB above the TEXT_BASE address, to leave enough space for
    U-Boot code and stack itself (grows downwards).

  * SYS_LOAD_ADDR = 0x80000000

    The beginning of RAM. That's where Linux kernel image must be
    loaded.

  * SYS_MALLOC_LEN = 0x81f000

    8 MiB for malloc() + ENV_SIZE (128 KiB)

  * SYS_MALLOC_F_LEN = 0x4000

    Increase malloc() pool size available before relocation from 8 KiB
    (default) to 16 KiB. Otherwise "alloc space exhausted" message
    appears in U-Boot log during board_init_f() stage. There are next
    reasons for doing so:

      1. Having "bootph-all" flags in some dts nodes leads to binding
         those during pre-relocation stage, and binding (DM) uses
         dynamic memory allocation
      2. clk-exynos850 driver uses CCF clocks, which in turn use dynamic
         memory allocation

Device tree file was imported from Linux kernel. All nodes and boot
phase flags added in exynos850-e850-96-u-boot.dtsi are only needed to
enable serial console:

  * oscclk -> cmu_top -> cmu_peri: generate UART/USI clocks
  * pinctrl_alive and uart1_pins: needed to mux UART pins
  * pmu_system_controller: configures AP UART path to uart1_pins
  * usi_uart: configures USI block to operate as a UART protocol
  * serial_0: enables serial console (UART)

[1] https://www.96boards.org/product/e850-96b/
[2] https://www.96boards.org/products/mezzanine/

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-24 11:23:20 +09:00
Sam Protsenko
e6e300d5ef arm: exynos: Add Exynos850 SoC support
Samsung Exynos850 is ARMv8-based mobile-oriented SoC. It features
Cortex-A55 CPU (8 cores) and it's built using 8nm process.

Add Exynos850 support by enabling next features:

  * Import Exynos850 SoC dtsi files from Linux kernel
  * Add Exynos850 MMU memory map
  * Introduce ARCH_EXYNOS9 platform config option

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-24 11:23:20 +09:00
Tom Rini
db04ff42c7 mtd: Make CONFIG_MTD be the gate symbol for the menu
The help for CONFIG_MTD explains that it needs to be enabled for various
things like NAND, etc to be available. It however then doesn't enforce
this dependency and so if you have none of these systems present you
still need to disable a number of options. Fix this by making places
that select/imply one type of flash, but did not do the same, also do
this for "MTD". Make boards which hadn't been enabling MTD already but
need it now, do so. In a few places, disable CONFIG_CMD_MTDPARTS as it
wasn't previously enabled but was now being implied.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-22 14:18:54 -05:00
Tom Rini
fee9e48c89 omap3: Make SPL_OMAP3_ID_NAND depend on NAND_OMAP_GPMC
This specific bit logic is used to determine what NAND chip is present
on a board in order to then know what revision of the board we have and
so what DDR chips are present. We can only do this if we have a NAND
chip, and so we will have NAND_OMAP_GPMC enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-22 14:17:35 -05:00
Tom Rini
d64e05fc5b Merge tag 'u-boot-imx-master-20240122' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
- Allow i.MX8M Plus DHCOM to operate in overdrive mode.
- Allow i.MX8M Plus eDM SBC to operate in overdrive mode.
- Enable the 'kaslrseed' command on DH i.MX8M Plus DHCOM.
- Select LTO by default on i.MX8M.
- Convert pico-dwarf/hobbit-imx6ul to CONFIG_DM_SERIAL.
- Fix 'reset' command on wandboard.
2024-01-22 09:47:52 -05:00
Fabio Estevam
b06bfd65b6 wandboard: Convert to watchdog driver model
Commit 68dcbdd594 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2024-01-22 08:39:27 -03:00
Fabio Estevam
f8cebb4f78 imx8m: Enable LTO by default
In an attempt to select ARMV8_SPL_EXCEPTION_VECTORS, the SPL size
could not fit into the internal SRAM of some imx8m targets:

   aarch64:  +   imx8mm_phg
+aarch64-linux-ld.bfd: u-boot-spl section `__u_boot_list' will not fit in region `.sram'
+aarch64-linux-ld.bfd: region `.sram' overflowed by 1824 bytes

Select LTO to prevent that.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
2024-01-22 08:38:32 -03:00
Dinesh Maniyam
3c9bb8fbdc arm: dts: agilex: Increase reserved memory size to 32MB
The reserved space is extended to 32MB in Linux kernel because
additional space is needed for authorization execution of JIC/RBF file.
U-Boot required to align with Linux.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2024-01-22 16:51:29 +08:00
Dinesh Maniyam
158d648d9f arm: socfpga: stratix10: SPI clock support
This patch is to add SPI clock support for stratix10. Get clock rate
function always returning 0 because the DW-SPI driver get the rate
from clock node in dts but Stratix10 does not support device tree
clock node.To overcome this spi will get the clock_rate directly
from spi clock controller override the weaker function.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@intel.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2024-01-22 16:50:55 +08:00
Alexander Dahl
23308cd150 ARM: dts: at91: sama5d2: Align more node names with Linux
Port from Linux v6.7-rc4.  Should not hurt U-Boot but makes diffing
easier and allows referencing node names in board dts.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
2024-01-22 06:05:26 +02:00
Alexander Dahl
e81a0159a8 ARM: dts: at91: sama5d2: Port ebi/nand nodes from linux
Required for using the new DM based atmel nand driver.
Ported from Linux v6.7-rc4.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
2024-01-22 06:05:26 +02:00
Alexander Dahl
42c4dcbbce ARM: dts: at91: sama5d2: Move sfr node
Nodes are ordered by register offset.

Fixes: 56246d1e87 ("ARM: dts: at91: sama5: Add the sfr node")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
2024-01-22 06:05:25 +02:00
Tom Rini
3c04fcf313 Merge patch series "k3-j721e: beagleboneai: Fix USB"
Roger Quadros <rogerq@kernel.org> says:

Hi,

This series fixes USB operation on k3-j721e based boards.
2024-01-20 11:39:13 -05:00
Roger Quadros
17d3cb7610 arm: dts: k3-j721e-beagleboneai64: Fix USB operation
Without correct SERDES MUX and Lane control settings
USB0 will be broken. Set the MUX and Lane control devices
to be auto probed so they are configured correctly.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2024-01-20 11:38:18 -05:00
Roger Quadros
7d5a12018e arm: dts: k3-j721e: Fix USB0 operation
Without correct SERDES MUX and Lane control settings
USB0 will be broken. Set the MUX and Lane control devices
to be auto probed so they are configured correctly.

Fixes: 69b19ca67b ("arm: dts: k3-j721e: Sync with v6.6-rc1")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
2024-01-20 11:38:18 -05:00
Tom Rini
83a8424722 Add CMDLINE dependecy for CMD_STM32KEY
STM32MP1:
 ---------
 Set stdio to serial on DH STM32MP15xx DHSOM
 Fix reset for usart1 in scmi configuration
 
 STM32MP2:
 ---------
 Add BSEC and OTP support for STM32MP25
 Fix CONFIG_STM32MP25X flag usage
 -----BEGIN PGP SIGNATURE-----
 
 iQJQBAABCgA6FiEEXyrViUccKBz9c35Jysd4L3sz/6YFAmWqp5scHHBhdHJpY2Uu
 Y2hvdGFyZEBmb3NzLnN0LmNvbQAKCRDKx3gvezP/ptOaD/0bq6crJ4mND+Ye9zqQ
 h4kg/bwPvYQmkYR0OFEmQOSXxuTctlYWvvIdRngSHgGfAEAW6BWt1zvnrKPmzyrI
 A4DO4DCTnPkUnFu+yOQ82swsOlQurly+jJy6/bEwwPhHxQFdaVk9epJRsBEFALBE
 qU2MCzx0SHZbyPAgCHRly8iXUL413I/YFqi5aMdcUCbFd/K7D7SuH7m35omVdHQx
 0ED8wsQOD9dTDvKVQde6wMoo+stB63GjFfM9wZHBKnDsynPk/wyLjozC2JjUB/zS
 mAMZXw7OSXpbhmtPdC1hAmAjAQhLI9MF2Tvs5NSDtoLsOBFLsdjGEwfra4/AkyzX
 fbOaa+2MP8JlM1vfXxAwhVWhE+hByu9ED5mU7cqICaxXKndu/TUsznXGxNA4+irZ
 +ATDhkE8ZAGswJbF80XPJ3+PyxWmy16d3/g0NY4wgHDSP45BCwcStvYhmC2Y2Pdv
 O1S4WPzKwgzR7cJ5u6kidHveCc9RVXLhU7nEhjYXZvjBstFDuUhJh/54cDJVcXI5
 6Flg1jBh2gdP8p4Odq9CWlJW8TWMEmHn/j7krVApiXtBhhTwaAo+eBSvKk6qpMbs
 IgYErA1lIUbkFvDroaptKISavtrRXLvDIG+ladQ6QJ/ki6DYPE2zxsedqd4g2VDh
 DZeCtd4nH4/hNFAvdiWxd6woxA==
 =BoSU
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20240119' of https://source.denx.de/u-boot/custodians/u-boot-stm

Add CMDLINE dependecy for CMD_STM32KEY

STM32MP1:
---------
Set stdio to serial on DH STM32MP15xx DHSOM
Fix reset for usart1 in scmi configuration

STM32MP2:
---------
Add BSEC and OTP support for STM32MP25
Fix CONFIG_STM32MP25X flag usage
2024-01-19 11:59:28 -05:00
Patrice Chotard
8a4d098bb0 stm32mp2: Fix CONFIG_STM32MP25X flag usage
"#if" was used instead of "#ifdef"

Fixes: 01a701994b ("stm32mp2: initial support")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-01-19 15:49:20 +01:00
Patrick Delaunay
c2c2977227 stm32mp: Add dependencies on CMDLINE for command stm32key
We cannot use stm32key commands without CONFIG_CMDLINE so add the
required condition.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2024-01-19 15:10:06 +01:00
Tom Rini
f4d5486506 Merge branch '2024-01-18-assorted-fixes'
- A number of OS boot related cleanups, a number of TI platform
  fixes/cleanups, SMBIOS fixes, tweak get_maintainers.pl to report me
  for more places, fix the "clean the build" pytest and add a bootstage
  pytest, fix PKCS11 URI being omitted in some valid cases, make an iommu
  problem easier to debug on new platforms, nvme and pci improvements,
  refactor image-host code a bit, fix a typo in env setting, add a missing
  dependency for CMD_LICENSE, and correct how we call getchar() in some
  places.
2024-01-19 08:46:47 -05:00
Patrick Delaunay
9f1dc110cc arm: Rename STM32MP15x
CONFIG options must not use lower-case letter. Convert this and related
ones to upper case.

Signed-off-by: Simon Glass <sjg@chromium.org
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2024-01-19 14:38:59 +01:00
Patrick Delaunay
49de864a25 arm: Rename STM32MP13x
CONFIG options must not use lower-case letter. Convert this and related
ones to upper case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2024-01-19 14:38:59 +01:00
Patrick Delaunay
ebf32b2548 stm32mp: activate the command stboard for stm32mp25 boards
Activate the command stboard for stm32mp25 STMicroelectronics boards,
add the default used OTP identifier and the associated board identifier:
- stm32mp25xx-ev1 = MB1936
- stm32mp25xx-dk = MB1605

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2024-01-19 14:38:59 +01:00
Patrick Delaunay
4d58bb32d1 stm32mp: stm32prog: add support of stm32mp25
Change OTP number to 364 for STM32MP25 as it is done in bsec driver.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2024-01-19 14:38:12 +01:00
Patrick Delaunay
8eb535e3b0 smt32mp: add setup_mac_address for stm32mp25
Add a function setup_mac_address() to update the MAC address from the
default location in OTP for stm32mp2 platform.

The max number of OTP for MAC address is increased to 8 for STM32MP25,
defined with get_eth_nb() and checked in setup_mac_address.

The MAC address FF:FF:FF:FF:FF:FF, the broadcast ethaddr, is a invalid
value used for unused MAC address slot in OTP, for example for board
with STM32MP25x part number allows up to 5 ethernet ports but it is not
supported by the hardware, without switch; the associated variable
"enetaddr%d" is not created.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-01-19 14:38:01 +01:00
Patrice Chotard
9c2f5b8ad6 stm32mp: add setup_serial_number for stm32mp25
Add support of serial number for stm32mp25, gets from OTP with BSEC driver.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2024-01-19 14:37:50 +01:00
Patrick Delaunay
1af148da84 stm32mp: add soc.c file
Add a new file soc.c for common functions between stm32mp1 and stm32mp2
family and move print_cpuinfo() in this new file.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2024-01-19 14:37:10 +01:00
Patrick Delaunay
e508b597f0 stm32mp: bsec: add support of stm32mp25
Add support of BSEC for STM32MP25x family to access OTP.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-01-19 14:19:42 +01:00
Patrick Delaunay
0d0266c46c stm32mp: bsec: add driver data
Add driver data in  BSEC driver to test presence of OP-TEE TA,
mandatory for STM32MP13 family and prepare the support of new device
with more OTP than 95.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-01-19 14:19:42 +01:00
Yann Gautier
5c76937659 arm: stm32mp: add Rev.B support for STM32MP25
Add chip revision B support for STM32MP25, for displaying it in trace.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-01-19 14:19:42 +01:00
Patrick Delaunay
792122baa7 arm64: dts: st: add bsec support to stm32mp25
Add BSEC support to STM32MP25 SoC family with SoC information:
- RPN = Device part number (BSEC_OTP_DATA9)
- PKG = package data register (Bits 2:0 of BSEC_OTP_DATA122)

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2024-01-19 14:19:42 +01:00
Patrice Chotard
ea5a4d69d8 ARM: dts: stm32: Fix reset for usart1 in scmi configuration
In SCMI configuration, usart1 is secure, so all its resources are secured
(clock and reset) and can't be set/unset by non-secure world but by OP-TEE.

Fixes: 6cccc8d396 ("ARM: dts: stm32: add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)")

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-01-19 14:03:28 +01:00
Quentin Schulz
c16c7ac2fe rockchip: rk3128: remove noop file
arch_cpu_init is already returning 0 in its weak definition in
common/board_f.c so let's just remove the file entirely since nothing
else is done in it.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-19 10:57:36 +08:00
Quentin Schulz
f66d9dd81f rockchip: remove unused global data ptr
Remove leftover import and global data ptr from files since they aren't
used anymore.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-19 10:57:36 +08:00
Quentin Schulz
d57e16c7e7 rockchip: find U-boot proper boot device by inverting the logic that sets it
BOOT_DEVICE_* is set by spl_node_to_boot_device() depending on the block
device number associated with the MMC device the SPL used to load U-Boot
proper from. It is NOT related to the mmc alias in the Device Tree.

For SPI flashes, all SPI flashes will return BOOT_DEVICE_SPI so there's
currently no way to know from which one the SPL loaded U-Boot proper
from. Therefore, let's just find the first valid candidate in
/chosen/u-boot,spl-boot-order that is a SPI flash and return that path.
This is a best effort.

While the original implementation may have worked, using the exact same
mechanism but in inverted fashion makes it less likely to have
surprising corner-cases or side-effects.

A nice side-effect is that all existing and future Rockchip SoCs now
automatically have their /chosen/u-boot,spl-boot-device set.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-19 10:57:36 +08:00
Quentin Schulz
948b315e41 rockchip: factor out spl_perform_fixups into common spl-boot-order
All SoCs are susceptible to wanting to know which storage medium was
used to load U-Boot SPL. So instead of reimplementing the same functions
in SoCs over and over again (here just rk3399 and px30 but rk3588 is
coming), let's just put all this in common into spl-boot-order.c
allowing to support a new SoC just by defining the spl_boot_devices
array in the appropriate SoC file.

Note that spl_perform_fixups() now calls spl_image_fdt_addr() to get the
address of the fdt instead of directly reading the
spl_image_info->fdt_addr member, because that member is not guaranteed
to be present (guarded with compile flags). This is essential because we
move the logic away from px30 and rk3399 which had those compile flags
enabled to code run for all Rockchip SoCs.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-19 10:57:36 +08:00
Quentin Schulz
a5843cfce8 rockchip: px30: simplify logic for getting SPL boot medium DT node
In preparation of moving spl_perform_fixups to spl-boot-order.c, let's
simplify the logic around mapping the BOOT_DEVICE_x enum index to a DT
node by using an instantiated array of chars instead of creating a new
data structure on the fly.
This will make it easier to factor out the code handling the SPL boot
medium detection by having spl_decode_boot_device common to all SoCs.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-19 10:57:36 +08:00
Quentin Schulz
543f24dffc rockchip: rk3399: simplify logic for getting SPL boot medium DT node
In preparation of moving spl_perform_fixups to spl-boot-order.c, let's
simplify the logic around mapping the BOOT_DEVICE_x enum index to a DT
node by using an instantiated array of chars instead of creating a new
data structure on the fly.

This will make it easier to factor out the code handling the SPL boot
medium detection by having spl_decode_boot_device common to all SoCs.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-19 10:57:36 +08:00
Chris Morgan
d2048bafae rockchip: board: Add board_rng_seed() for all Rockchip devices
Allow all rockchip devices to use the hardware RNG to seed Linux
RNG.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-19 10:57:36 +08:00
Jonas Karlman
5708e8eeae rockchip: rk3328: Set efuse auto mode and timing control
Reading from efuse return zero when mainline TF-A is used.

  => dump_efuse
  00000000: 00 00 00 00  ....
  00000004: 00 00 00 00  ....
  00000008: 00 00 00 00  ....
  0000000c: 00 00 00 00  ....
  00000010: 00 00 00 00  ....
  00000014: 00 00 00 00  ....
  00000018: 00 00 00 00  ....
  0000001c: 00 00 00 00  ....

However, when vendor TF-A blobs is used reading from efuse works.

Change to use auto mode, enable finish and auto access err interrupts
and set timing control using same values that vendor TF-A blob use to
fix this.

With this efuse can be read when either of mainline TF-A or vendor blob
is used.

  => dump_efuse
  00000000: 52 4b 33 82  RK3.
  00000004: 00 fe 21 55  ..!U
  00000008: 52 4b 57 34  RKW4
  0000000c: 35 30 32 39  5029
  00000010: 00 00 00 00  ....
  00000014: 08 25 0c 0f  .%..
  00000018: 02 0d 08 00  ....
  0000001c: 00 00 f0 00  ....

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-19 10:57:36 +08:00
Joshua Riek
153ac950a5 board: rockchip: Add the Turing RK1 SoM
The Turing RK1 is a Rockchip RK3588 based SoM from Turing Machines.

Specifications:

    Rockchip RK3588 SoC
    4x ARM Cortex-A76, 4x ARM Cortex-A55
    8/16/32GB memory LPDDR4x
    Mali G610MC4 GPU
    32GB eMMC HS400
    2x USB 2.0, 2x USB 3.0
    2x MIPI CSI 4x lanes
    1x MIPI-DSI DPHY 2x lanes
    PCIe 2.0 x1, PCIe 3.0 x4
    1x HDMI 2.1 output, 1x DP 1.4 output
    Gigabit Ethernet
    Size: 69.6mm x 45mm (260-pin SO-DIMM connector)

Kernel commit:
2806a69f3fef ("arm64: dts: rockchip: Add Turing RK1 SoM support")

Signed-off-by: Joshua Riek <jjriek@verizon.net>
Tested-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-19 10:57:36 +08:00
Jonas Karlman
0d5104cdb7 rockchip: rk3588: Fix boot from SPI flash
The commit fd6e425be2 ("rockchip: rk3588-rock-5b: Enable boot from SPI
NOR flash") added a new BROM_BOOTSOURCE_SPINOR_RK3588 with value 6.

At the time the reason for this new bootsource id value 6 was unknown.

We now know that the BootRom on RK3588 use different bootsource id
values depending on the iomux used by the flash spi controller, and not
by the type of spi nor or spi nand flash used.

Add the following enum values and use them for RK3588 boot_devices.

- BROM_BOOTSOURCE_FSPI_M0 = 3
- BROM_BOOTSOURCE_FSPI_M1 = 4
- BROM_BOOTSOURCE_FSPI_M2 = 6

Fixes: fd6e425be2 ("rockchip: rk3588-rock-5b: Enable boot from SPI NOR flash")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Slawomir Stepien <sst@poczta.fm>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-19 10:57:36 +08:00
Tianling Shen
0bc16c6a87 board: rockchip: Add support for FriendlyARM NanoPi R2C Plus
The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board
eMMC flash (8G) included.

The device tree is taken from the kernel v6.5.

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-19 10:57:36 +08:00
Johan Jonker
b5db04c63a arm: dts: rockchip: rk3288: move to 64 bit reg size
To make automatic Rockchip DT syncing possible from Linux to U-boot prepare
rk3288.dtsi by moving to 64 bit reg size.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-19 10:57:36 +08:00
Jonas Karlman
bcbd9a6f5c rockchip: board: Remove dwc3 usb init and gadget handler functions
Remove board_usb_init() and dm_usb_gadget_handle_interrupts() functions
related to dwc3, they use e.g. a hard-coded reg address for RK3399 and
are obsolete with use of DM_USB_GADGET.

Use of DM_USB_GADGET, USB_DWC3_GENERIC and USB_DWC3_GADGET have replaced
same feature provided by the removed functions on RK3399 boards.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-19 10:57:36 +08:00
Sekhar Nori
22d238f25d arch: mach-k3: Fix incorrect mapping of higher DDR addresses as device memory
Entry for physical address 0x500000000 in memory map table for MMU
configuration is spilling over and inadvertently making DDR available at
higher address (above 4GB address space) get mapped as device memory
(nGnRnE).

Fix this by adjusting entry size. Tested on AM62A SK. Before this patch:

=> time crc32 0x881000000 0x20000000
crc32 for 881000000 ... 8a0ffffff ==> 7f34d7ca

time: 1 minutes, 14.716 seconds

After patch:

=> time crc32 0x881000000 0x20000000
crc32 for 881000000 ... 8a0ffffff ==> 7f34d7ca

time: 2.710 seconds

Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-18 20:24:12 -05:00
Tom Rini
002764d739 Xilinx changes for v2024.04-rc1-v2
xilinx:
 - Enable NFS, WGET, DNS and BLKMAP by default
 
 zynqmp:
 - Support new power-management node
 - Remove multiple blank lines from DTSes
 - Wire multiboot with DFU infrastructure
 - Fix i2c-gpio pinctrl group name
 - SOM DT changes (phy on kd240, kv260 cleanups
 - Cleanup i2c bus on zcu1285
 - DT cleanup (fix node names not to use _)
 - Fix USB interrupts
 - Cleanup zcu100 DT
 - Add support for kaslr-seed
 
 zynqmp_r5:
 - Fix W=1 issue with missing dir
 
 tools:
 - Improve zynqmpimage mkimage support
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCZae/pAAKCRDKSWXLKUoM
 IadKAJ9p4nP4Fy3DKfRJjpVoFE+7OR9ZUQCfYtWhN5eNKayfxcw9wnvuv/SggFU=
 =95oH
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2024.04-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2024.04-rc1-v2

xilinx:
- Enable NFS, WGET, DNS and BLKMAP by default

zynqmp:
- Support new power-management node
- Remove multiple blank lines from DTSes
- Wire multiboot with DFU infrastructure
- Fix i2c-gpio pinctrl group name
- SOM DT changes (phy on kd240, kv260 cleanups
- Cleanup i2c bus on zcu1285
- DT cleanup (fix node names not to use _)
- Fix USB interrupts
- Cleanup zcu100 DT
- Add support for kaslr-seed

zynqmp_r5:
- Fix W=1 issue with missing dir

tools:
- Improve zynqmpimage mkimage support
2024-01-17 09:27:43 -05:00
TracyMg_Li
e6a8c6f5c0 ARM add initial support for the Phytium Pe2201 Board.
Add pe2201 platform code and the device tree of pe2201 platform board.
The initial support comprises the UART and PCIe.

Signed-off-by: TracyMg_Li <TracyMg_Li@outlook.com>
Changes since v1:
        fix space corrupt.
Changes since v2:
        switch to bootstd and text environment.
Changes since v3:
        add environment variables.
2024-01-16 17:05:29 -05:00
Heinrich Schuchardt
1c5aab803c smbios: copy QEMU tables
QEMU provides SMBIOS tables with detailed information. We should not try to
replicate them in U-Boot.

If we want to inform about U-Boot, we can add a Firmware Inventory
Information (type 45) table in future.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-16 17:05:29 -05:00
Neha Malcom Francis
481ffca485 arm: dts: k3-j721e-binman: Add support for HS-SE 2.0
Add support for J721E HS-SE 2.0 device. Make use of the existing
templates and override the phandles for sysfw.itb so that builds do not
fail.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2024-01-16 12:01:16 -05:00
Wadim Egorov
085cd6459d board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM
Add basic support for PHYTEC phyCORE-AM62x SoM.

Supported features:
  - 2GB DDR4 RAM
  - eMMC Flash
  - OSPI NOR Flash
  - external uSD
  - Ethernet
  - debug UART

Product page SoM: https://www.phytec.com/product/phycore-am62x

Device trees were taken from Linux v6.7-rc3.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
2024-01-16 12:00:05 -05:00
Tom Rini
043ca8c8a9 Merge tag 'qcom-2024.04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-snapdragon
Qualcomm architecture changes:

* Move clock and pinctrl drivers out of mach-snapdragon
* Various clock driver improvements
* Convert PMIC power/reset key driver to use the button API
* Preparetory work for migrating to upstream DT
2024-01-16 09:51:16 -05:00
Tom Rini
6ca9349b67 Merge tag 'u-boot-imx-20240115' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx 2024-01-16 09:49:48 -05:00
Caleb Connolly
4d6d25be5f
test: spmi: fix tests
With the recent changes to the Qualcomm PMIC GPIO driver the sandbox
tests for it no longer pass, update the DTS and tests to work with the
changes.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:54 +00:00
Caleb Connolly
92fe08921c
spmi: msm: fix register range names
The core and chnl register ranges were swapped on SDM845. Fix it, and
fetch the register ranges by name instead of by index.

Drop the cosmetic "version" variable and clean up the debug logging.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:54 +00:00
Caleb Connolly
a712ececbd
dts: qcom: adjust pmic gpio to use upstream bindings
Use the upstream gpio-ranges property instead of gpio-count, and drop
the bank-name property for Qualcomm boards.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:53 +00:00
Caleb Connolly
b7f189541e
mach-snapdragon: switch to PMIC button driver
The PMIC button driver is a much better representation of the hardware
here, adjust the boards to use upstream DT and the PMIC button driver
instead of exposing the buttons as GPIOs and relying on the GPIO-button
driver.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:53 +00:00
Caleb Connolly
2c2cc3e9c0
pinctrl: qcom: make compatible with linux DTs
The pinctrl and GPIO drivers are currently heavily incompatible with
upstream. Most Qualcomm pinctrl blocks feature "tiles" of pins, each at
it's own address. Introduce support for these by allowing the soc driver
to specify per-pin register offsets similarly to the Linux driver.

Adjust the GPIO driver to handle these too, and finally enable support
for all pins with the same numbering as used in Linux.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:52 +00:00
Caleb Connolly
24d2908e98
pinctrl: qcom: move ipq4019 driver from mach-ipq40xx
Drop the duplicated pinctrl-snapdragon driver from mach-ipq40xx and add
it to drivers/pinctrl/qcom.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:49 +00:00
Caleb Connolly
53b2c7af69
pinctrl: qcom: move out of mach-snapdragon
Move the Qualcomm pinctrl drivers out of mach-snapdragon and over to the
rest of the pinctrl drivers, adjust the drivers so that support for each
platform can be enabled/disabled individually and introduce platform
specific configuration options.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:24 +00:00
Caleb Connolly
37ea1343ac
clk/qcom: use function pointers for enable and set_rate
Currently, it isn't possible to build clock drivers for more than one
platform due to how the msm_enable() and msm_set_rate() callbacks are
implemented.

Extend qcom_clk_data to include function pointers for these and convert
all platforms to use them.

Previously, clock drivers relied on include/configs/<board.h> to include the
board specific sysmap header, however as most of the header contents are clock
driver related, import the contents directly into each clock driver and
remove the header. The only exception here is the dragonboard820c board file
which includes some pinctrl macros, those are also inlined.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
[caleb: remove additional sysmap-sdm845.h mention]
2024-01-16 12:26:24 +00:00
Konrad Dybcio
3ead661633
clk/qcom: handle resets and clocks in one device
Qualcomm's clock controller blocks actually do much more than it
says on the tin.. They provide clocks, resets and power domains.
Currently, U-Boot requires one to spawn 2 separate devices for
controlling clocks and resets, both spanning the same register space.
Refactor the code to make it work with just a single DT node, making
it compatible with upstream Linux bindings and dropping the dedicated
reset driver in favour of including it in the clock driver.

Heavily inspired by Renesas code for a similar hw block.

[caleb: moved drivers to clk/qcom, added reset driver and adjusted bind
logic. Imported qcom,gcc-ipq4019.h from Linux]

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Caleb Connolly
fac2121a47
clk/qcom: move ipq4019 driver from mach-ipq40xx
This driver is just a stub, but it's necessary to support the upcoming
reset driver changes.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Caleb Connolly
a623c14f43
clk/qcom: move from mach-snapdragon
Clock drivers don't belong here, move them to the right place and
declutter mach-snapdragon a bit.

To de-couple these drivers from specific "target" platforms, add
additional config options to enable each clock driver gated behind a
common CLK_QCOM option and enable them by default for the respective
targets. This will make future work easier as we move towards a generic
Qualcomm target.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Roger Quadros
4dfa08af79 arm: mach-k3: am642: Define NAND boot device
AM642 SoC supports booting from GPMC NAND device.
Define boot device for it.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://www.mail-archive.com/u-boot@lists.denx.de/msg499180.html
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-01-15 08:58:24 +01:00
Marek Vasut
73595fd4c0 ARM: dts: renesas: Synchronize R-Car R8A779F0 S4 DTs with Linux 6.6.3
Synchronize R-Car R8A779F0 S4 DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
5a9eea75dd ARM: dts: renesas: Synchronize R-Car R8A77990 E3 DTs with Linux 6.6.3
Synchronize R-Car R8A77990 E3 DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
33713261bf ARM: dts: renesas: Synchronize R-Car R8A77970 V3M DTs with Linux 6.6.3
Synchronize R-Car R8A77970 V3M DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
61d32fb92c ARM: dts: renesas: Synchronize R-Car R8A7792 V2H DTs with Linux 6.6.3
Synchronize R-Car R8A7792 V2H DTs with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Primoz Fiser
3233349fa6 imx: imx9: fixup thermal trips from fuses
Read i.MX9 CPU temp grade from fuses and fixup thermal trips in Linux
device-tree accordingly.

Based on commit 0543a1ed27 ("imx8m: fixup thermal trips")

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
2024-01-12 15:01:55 -03:00
Yannic Moog
b64af30a9d Add support for phyGATE-Tauri-L-iMX8MM
phyGATE-Tauri-L-iMX8MM is a Gateway based on the phycore-imx8mm SoM.
As a result, all the board code of the phycore-imx8mm is used.
Device tree synced with kernel v6.7.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
2024-01-12 13:09:56 -03:00
Fabio Estevam
53b03a5c9e imx8m: Select BINMAN at SoC level
All i.MX8M targets rely on using binman to generate the U-Boot
binary.

Select it at the SoC level instead of per board.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2024-01-12 13:09:56 -03:00
Fabio Estevam
dffbf45110 imx9: Select BINMAN at SoC level
All i.MX93 targets rely on using binman to generate the U-Boot
binary.

Select it at the SoC level instead of per board.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2024-01-12 13:09:56 -03:00
Venkatesh Yadav Abbarapu
4536da00e5 xilinx: r5: Include the sys_r5_proto.h header for future use
Currently when using "W=1" with xilinx_zynqmp_r5_defconfig, getting
below warnings.
cc1.real: warning: ./arch/arm/mach-zynqmp-r5/include:
		No such file or directory [-Wmissing-include-dirs]
Fix W=1 missing-include-dirs warnings by including the headers and
sys_r5_proto.h file which can be used.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240111030029.2565827-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-01-12 09:29:17 +01:00
Alexander Dahl
b646a1053f tools: kwbimage: Allow disabling build on non-mvebu platforms
Some users want to build with CONFIG_TOOLS_LIBCRYPTO disabled, which in
general is possible for at least some boards.  32-bit mvebu however
requires kwbimage for building SPL, and kwbimage has a hard dependency
to host OpenSSL.

The new symbol CONFIG_TOOLS_KWBIMAGE allows disabling kwbimage build on
non-mvebu platforms, and thus building without host libcrypto from
OpenSSL.

Based on previous work and discussions, see links below.

Link: https://lore.kernel.org/u-boot/20211021093304.25399-1-pali@kernel.org/
Link: https://lore.kernel.org/u-boot/20220111153120.1276641-1-marex@denx.de/
Link: https://lore.kernel.org/u-boot/20230121154743.667253-2-paulerwan.rio@gmail.com/
Cc: Marek Vasut <marex@denx.de>
Cc: Paul-Erwan Rio <paulerwan.rio@gmail.com>
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11 22:09:11 -05:00
Csókás Bence
29f390bbd5 arm: spl: Use separate fault handlers instead of a single common one
It may be necessary to set breakpoints etc. on a specific fault handler in SPL.
Add a Kconfig option to separate the different handlers into their own individual infinite loops.

Signed-off-by: Csókás Bence <csokas.bence@prolan.hu>
2024-01-11 21:19:25 -05:00
Tom Rini
2ee7a8ec6f Merge patch series "net fixes prior lwip"
Maxim Uvarov <maxim.uvarov@linaro.org> says:

Add small net fixes prior lwip patches.
2024-01-11 11:25:07 -05:00
Maxim Uvarov
6c84e71258 omap3: use device specific naming for mem_init
Use device specific naming for functions so as to not overlap
with common function names.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-01-11 11:24:58 -05:00
Maxim Uvarov
9c77cffabd mach-socfpga: do not overlap defines with lwip
Fix compilation issue with overlapping lwip and march defines.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11 11:24:58 -05:00
Maxim Uvarov
f3384d7fbb sandbox: eth-raw-os: successful return code is 0
all network drivers return 0 on the successful
transmission.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11 11:24:58 -05:00
Michal Simek
64a31fe710 arm64: zynqmp: Remove ltc2954 node
Remove already disabled node. GPIO connections are handled by pmufw that's
why there is no reason to have it described for non secure firmware.
If someone wants to handle it from OS revert this patch and also update
PMUFW configuration and pinctrl setting for these GPIO pins.

Link: https://lore.kernel.org/r/f26b1a780ec44444d62e2dd696a05e2a37fa0993.1704890056.git.michal.simek@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-01-11 14:16:34 +01:00
Robert Marko
46471e6c1d arm: mvebu: eDPU: support new board revision
There is a new eDPU revision that uses Marvell 88E6361 switch onboard.
We can rely on detecting the switch to enable and fixup the Linux DTS
so a single DTS can be used.

There is currently no support for the 88E6361 switch and thus no working
networking in U-Boot, so we disable both ports.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
2024-01-10 09:38:55 +01:00
Chris Packham
cb71a30857 arm: mvebu: AC5: Use finer grained memory map
The ATF implementation for AC5/AC5X ends up with bl31 living in some
internal SRAM. This is in the middle of the large MMIO region that we
were using. Adjust this to be finer grained blocks based on the address
map from the AC5X Family Control and Management Subsystem Functional
Datasheet.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2024-01-10 09:38:55 +01:00
Michal Simek
b121dc80c3 arm64: zynqmp: Rename zynqmp-power node to power-management
Rename zynqmp-power node name to power-management which is more aligned
with generic node name recommendation.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a2f7fe30e3630c262c2773a595b7a0c8918573a0.1704359569.git.michal.simek@amd.com
2024-01-10 09:18:09 +01:00
Michal Simek
cedc03dd62 arm64: zynqmp: Match dwc3 interrupts description with values
Correct IRQ values don't match IRQ line description.
There is one more IRQ (hiber) but it is not described in DT binding spec
that's why value is not described. Just for completeness dwc3_0 has hiber
IRQ at 75 and dwc3_1 at 76.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/578d758ce2af7e307e38ac8b7fa28ba9efba16d4.1704364111.git.michal.simek@amd.com
2024-01-10 09:17:45 +01:00
Michal Simek
e5d9df9571 arm64: zynqmp: Replace '-' by '_' in fixed clock nodes
Using '_' in node name is not recommended that's why convert them to use
'-' instead.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/3979167636f0a5970a9ab642a4e0ea6a46b3f8d7.1704705872.git.michal.simek@amd.com
2024-01-10 09:17:41 +01:00
Michal Simek
4626039c94 arm64: xilinx: Remove multiple blank lines from DTSes
There is no reason to have multiple blank lines in DTS files that's why
remove them.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/6aaa9fa91c88ca3d3e5645d66a795ec09b8cec61.1704708642.git.michal.simek@amd.com
2024-01-10 09:17:41 +01:00
Michal Simek
a46c43cc0e arm64: zynqmp: Add missing description for efuse aeskey/pufuser
Add missing description for efuse aeskey/pufuser offsets.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/9975c501c92d8e9d6e307dfd3f4146e08a2fc68e.1704799551.git.michal.simek@amd.com
2024-01-10 09:17:41 +01:00
Michal Simek
5bf527b1b3 arm64: zynqmp: Describe interrupt by using macro (OCM)
OCM controller interrupt description hasn't been converted by using macros
that's why fix it now.

Fixes: 6b049190c9 ("arm64: zynqmp: Describe interrupts by using macros")
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/6a51f47d239002679db03a787057fdc58610515d.1704709554.git.michal.simek@amd.com
2024-01-10 09:17:41 +01:00
Shubhrajyoti Datta
3c65670cb6 arm64: zynqmp: Update the i2c0 node for zcu1285
The pca mux is not added to the i2c0 bus so remove it from the bus.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/3dfe8b41142de2e8c25c56702450ae1a6b1becc0.1704725223.git.michal.simek@amd.com
2024-01-10 09:17:41 +01:00
Michal Simek
8026aa6149 arm64: zynqmp: Rename i2c?-gpio to i2c?-gpio-grp
Anything ending with gpio/gpios is taken as gpio phande/description which
is reported as the issue coming from gpio-consumer.yaml schema.
That's why rename the gpio suffix to gpio-grp to avoid name collision.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/407b0b67ba019be5a2073d09d578b381c639cbc6.1703002605.git.michal.simek@amd.com
2024-01-09 14:51:04 +01:00
Michal Simek
b0462416d8 arm64: zynqmp: Remove mt25qu512a compatible string from SOM
mt25qu512a is not documented in DT binding that's why remove it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/517672560a472de33c8e5c4ffc729d8e288da43c.1703002605.git.michal.simek@amd.com
2024-01-09 14:51:04 +01:00
Michal Simek
34ee661d69 arm64: zynqmp: Fix clock node name in kv260 cards
node name shouldn't use '_' that's why convert it to '-'.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/8f392c7ff13bdf2322798818ddeda06446b6d7b8.1703002605.git.michal.simek@amd.com
2024-01-09 14:51:04 +01:00
Michal Simek
2223731360 arm64: zynqmp: Move fixed clock to / for kv260
fixed clock nodes can't be on the bus because they are missing reg
property. That's why move them to root.
And because it is root it is good to have it as the first node in a file.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/9a6c17fa754add356b3b03356e41d15e4a18648b.1703002605.git.michal.simek@amd.com
2024-01-09 14:51:04 +01:00
Michal Simek
df68c2c9aa arm64: zynqmp: Describe ethernet phy on kd240
Describe ADIN phy present on KD240 via ethernet-phy-id compatible string.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/61f89dc055f191fd4138b80bb7e3217d814502f5.1702904236.git.michal.simek@amd.com
2024-01-09 14:51:04 +01:00
Tom Rini
c5e461fbf7 Merge tag 'u-boot-imx-master-20240108' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
- Removed fdt_addr from verdin-imx8mm to fix booting via bootefi.
- Support Ethernet PHY autodection on Data Modul i.MX8M Mini/Plus eDM
  SBC
- Add i.MX93 binman support
- Add support for imx93-var-som
2024-01-08 13:39:43 -05:00
Mathieu Othacehe
54e1aa236f Add imx93-var-som support
Add support for the Variscite VAR-SOM-IMX93 evaluation kit. The SoM
consists of an NXP iMX93 dual A55 CPU. The SoM is mounted on a Variscite
Symphony SBC.

Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com>
2024-01-08 14:37:57 -03:00
Mathieu Othacehe
bfbef0e8e7 imx9: imx93_evk: Add binman support.
Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com>
2024-01-08 14:37:55 -03:00
Mathieu Othacehe
f637dfe8c4 mach-imx: Add i.MX93 binman support.
Add dedicated Makefile targets for the i.MX93 and a new imx93-u-boot.dtsi
device-tree to create binman images.

Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com>
2024-01-08 14:37:53 -03:00
Marek Vasut
32a41b7c37 ARM: imx: Auto-detect PHY on Data Modul i.MX8M Mini/Plus eDM SBC
Implement fdtdec_board_setup() auto-detection of ethernet PHY.
This uses properties of the hardware and pull resistor placement.

If GPIO1_16 RGMII_MDC is HIGH, then R530 (MX8MM eDM SBC) or
R390 (MX8MP eDM SBC) is populated. R530 or R390 is populated
only on boards with AR8031 PHY.

If GPIO1_16 RGMII_MDC is LOW, then the in-SoM pull down is the
dominant pull resistor. This is the case on boards with BCM54213PE
PHY.

In case AR8031 PHY is populated, the PHY MDIO address is 0, in
case BCM54213PE PHY is populated, the PHY MDIO address is 1, the
fdtdec_board_setup() is used to patch the correct address into
the U-Boot control DT.

Enable broadcom PHY support to support both PHYs.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2024-01-08 14:34:16 -03:00
Tom Rini
93d91e9485 Merge branch 'next' 2024-01-08 12:00:18 -05:00
Heinrich Schuchardt
b17e280bb2 riscv: allow usage of ACPI
Select CONFIG_SUPPORT_ACPI to allow usage of ACPI tables with RISC-V.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-07 13:49:15 -07:00
Heinrich Schuchardt
b7d029bb8a riscv: add ACPI fields to global data
Add fields for the location of ACPI tables to the global data.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2024-01-07 13:49:15 -07:00
Heinrich Schuchardt
22fcd1da55 arm: add ACPI fields to global data
Add fields for the location of ACPI tables to the global data.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-07 13:49:15 -07:00
Heinrich Schuchardt
a083ae71e0 acpi: use 64-bit addresses in FADT table
Fields X_FIRMWAE_CTRL and X_DSDT must be 64bit wide. Convert pointers to
to uintptr_t to fill these.

If field X_FIRMWARE_CTRL is filled, field FIRMWARE must be ignored. If
field X_DSDT is filled, field DSDT must be ignored. We should not fill
unused fields.

See the field definitions in chapter "5.2.9 Fixed ACPI Description Table
(FADT)" of the ACPI Specification 6.5.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-07 13:45:07 -07:00
Simon Glass
a8efebe719 acpi: Write pointers to tables instead of addresses
Sandbox uses an API to map between addresses and pointers. This allows
it to have (emulated) memory at zero and avoid arch-specific addressing
details. It also allows memory-mapped peripherals to work.

As an example, on many machines sandbox maps address 100 to pointer
value 10000000.

However this is not correct for ACPI, if sandbox starts another program
(e.g EFI app) and passes it the tables. That app has no knowledge of
sandbox's address mapping. So to make this work we want to store
10000000 as the value in the table.

Add two new 'nomap' functions which clearly make this exeption to how
sandbox works.

This should allow EFI apps to access ACPI tables with sandbox, e.g. for
testing purposes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-01-07 13:45:07 -07:00
Tom Rini
c2c598e87c Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next
Documentation updates for endeavoru, lg_x3, grouper and transformers,
addition of MIPI calibration clock name for T114 (inline with T124+),
conversion of TEGRA_SUPPORT_NON_SECURE into Kconfig and endeavoru
stability improvements.
2024-01-06 09:57:56 -05:00
Jan Kiszka
82750ce442 arm: dts: iot2050: Fix by syncing from Linux
This restores support for IOT2050 by widely synchronizing its DT files
with the Linux kernel. We additionally need to add the alias restoration
that is still waiting for its upstream merge and the not-yet-upstreamed
bits needed for watchdog reboot detection.

Fixes: 4dbdc84754 ("arm: dts: k3-am654: pull in dtb update from Linux")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2024-01-06 09:18:44 -05:00
Tom Rini
0d53be75c7 Merge patch series "ATF and OP-TEE Firewalling for K3 devices."
Manorit Chawdhry <m-chawdhry@ti.com> says:

K3 devices have firewalls that are used to prevent illegal accesses to
memory regions that are deemed secure. The series prevents the illegal
accesses to ATF and OP-TEE regions that are present in different K3
devices.

AM62X, AM62AX and AM64X are currently in hold due to some firewall
configurations that our System Controller (TIFS) needs to handle.
The devices that are not configured with the firewalling nodes will not
be affected and can continue to work fine until the firewall nodes are
added so will be a non-blocking merge.

Test Logs: https://gist.github.com/manorit2001/4cead2fb3a19eb5d19005b3f54682627
CICD Run: https://github.com/u-boot/u-boot/pull/442
2024-01-04 16:53:49 -05:00
Manorit Chawdhry
8ae586e08c arm: dts: k3-j7200-binman: Add firewall configurations
The following commits adds the configuration of firewalls required to
protect ATF and OP-TEE memory region from non-secure reads and
writes using master and slave firewalls present in our K3 SOCs.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Tested-by: Thomas Richard <thomas.richard@bootlin.com>
2024-01-04 16:48:00 -05:00
Manorit Chawdhry
b8dea0c85e arm: dts: k3-j721s2-binman: Add firewall configurations
The following commits adds the configuration of firewalls required to
protect ATF and OP-TEE memory region from non-secure reads and
writes using master and slave firewalls present in our K3 SOCs.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04 16:48:00 -05:00
Manorit Chawdhry
c485567ee6 arm: dts: k3-j721e-binman: Add firewall configurations
The following commits adds the configuration of firewalls required to
protect ATF and OP-TEE memory region from non-secure reads and
writes using master and slave firewalls present in our K3 SOCs.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-01-04 16:48:00 -05:00
Manorit Chawdhry
89caf6d6c5 arm: dts: k3-binman: Add k3-security.h and include it in k3-binman.dtsi
For readability during configuring firewalls, adding k3-security.h file
and including it in k3-binman.dtsi to be accessible across K3 SoCs

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
2024-01-04 16:48:00 -05:00
Svyatoslav Ryhel
5c39fbfa13 ARM: tegra114: support nonsecure state detection
Principle is exactly the same as on T124, testing of register
which behaves differently in secure and non-secure states.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-03 20:20:12 +02:00
Svyatoslav Ryhel
e692aded5e ARM: tegra114: expand MC register map
This expansion is required for nonsecure detection to work correctly.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-03 20:18:38 +02:00
Svyatoslav Ryhel
27e69fe99a ARM: tegra124: convert TEGRA_SUPPORT_NON_SECURE into Kconfig
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-01-03 20:18:24 +02:00
Tom Rini
93a0138acb Prepare v2024.01-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmWVa0gACgkQFHw5/5Y0
 tyyxaAv/XwG8mzltTwMHc65IHmeupJLhBPBJgrZyZPlHRWNThSKBcbtTKnJIxN/j
 ZAakyMFykkZCs+xfpckjzyY9CA2B5pkZ1RMKj5AgiWOH3+vbCPN92/wzs+NVpN78
 ek1Ht2McIM51pdLYe50hYuqIU/Y8rWsptpK9/t2rdGSa79G70uo3DTGNYVyGcLNF
 b63B42FLnu11+MkyfN7z2Q3y0OlKpT/oZHb6R4rWNWNQqDbpficpEvoJdA1LzeAg
 GouCZ7Ib1qffoydbj1wruYT7Pkg9AsPs1tNa2eENJldfthlx9PFrW4be1t8bRput
 WnpbSbxRBw1sS8dukjCi0st+lhUNyuapT2J7hmtuXSMVprxK0UzQMbdGo9suxSlT
 DwTuTsNvwGzIk5E4SRZZI+xSUqpeCKnnVC7OLcqGKSAsoZIv5s5Fq/VgIIQ7gzNY
 LA+kdSjVeiKfsPzXCXCvILMqffwS8J9zIYdoxmq4o9XsmksabDCDUZpEy9IQ3gbB
 6MPxZgnj
 =Sqkn
 -----END PGP SIGNATURE-----

Merge tag 'v2024.01-rc6' into next

Prepare v2024.01-rc6
2024-01-03 09:22:47 -05:00
Nishanth Menon
e703bfcb38 arm: dts: k3-am62a*: Sync with kernel v6.7-rc1
Sync with kernel v6.7-rc1 and sync up the u-boot dts files accordingly.

Signed-off-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:52:19 -05:00
Nishanth Menon
244c9fd1a5 arm: mach-k3: am62a: Add main_timer0 id to the dev list
main_timer0 is used by u-boot as the tick-timer. Add it to the soc
devices list so it an be enabled via the k3 power controller.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-01-03 08:52:19 -05:00
Bryan Brattlof
37a1a4074b arm: dts: k3-am654: convert bootph-pre-ram to bootph-all
Many nodes are reused between WKUP SPL, MAIN SPL, and U-Boot. Using
bootph-pre-ram is causing these nodes to be present in SPL builds but
pruned away during the U-Boot build. Convert these nodes to bootph-all
so they will remain no matter which dtb build is happening.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
4aea536754 arm: dts: k3-am654: remove duplicate mcu secure proxy node
With the Linux and U-Boot board dtb files unified, we now have a
duplicate mcu secure proxy node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
e055622bd7 arm: dts: k3-am654: move dummy_clock to root node
The dummy_clock node is used to help the drivers probe the IO needed to
setup consoles and boot media to load firmware into the SoC.

This dummy_clock isn't a device that exists nor does it exist in the
mcu domain. So move it from cbass_mcu to the root node to avoid any
confusion.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
5baad5521d arm: dts: k3-am654: remove un-needed aliases
These aliases are not needed in U-Boot. Remove them

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
dabf30a2bf arm: dts: k3-am654: remove duplicate root properties
With the Linux and U-Boot board dtb files unified, we have duplicate
properties in the root node. Remove them

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
d23582d052 arm: dts: k3-am654: remove duplicate vtt pinmux
With the Linux and U-Boot board dtb files unified, we now have a
duplicate vtt_pinmux node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
c7b075074f arm: dts: k3-am654: remove duplicate mdio
With the Linux and U-Boot board dtb files unified, we now have a
duplicate mdio node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
9a6fab6d82 arm: dts: k3-am654: remove usb0
The pinmux for usb0 is missing from the Linux board dtb file. Remove it
until we can introduce it in Linux

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
755db5fc7c arm: dts: k3-am654: remove duplicate ospi0 node
With the Linux and U-Boot board dtb files unified, we now have a
duplicate ospi0 node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00
Bryan Brattlof
41ae2c6fb7 arm: dts: k3-am654: remove duplicate wkup_i2c0
With the Linux and U-Boot board dtb files unified, we now have a
duplicate wkup_i2c0 node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2024-01-03 08:36:37 -05:00