arm: dts: k3-binman: Make optee optional as requirement
Allow boards that use ti_spl_template to not use optee part in
configuration.
Vendor can have module with 256 Mb of memory and they try to optimize
the available memory just using the essential components.
This change allow to remove tee from configuration without binman
fail.
Romain Naour [Mon, 22 Jan 2024 10:30:44 +0000 (11:30 +0100)]
arch/arm/mach-omap2/omap5/fdt.c: ft_fixup_clocks: use clock-output-names property as fallback (kernel 5.19+)
Clock names has been updated in kernel 5.19+ with the removal of
non-standard node names [1]. Due to this change, ft_opp_clock_fixups()
doesn't work anymore since ft_fixup_clocks() is looking to the clock
name and ft_opp_clock_fixups() error out with the following message:
ft_fixup_clocks failed for DSP voltage domain: <valid offset/length>
We can't use the new clock name since several clock are using the same
generic name "clock". ft_opp_clock_fixups() is looking at the clocks
node in cm_core_aon@0:
When fdt_subnode_offset() fail, we can look at clock-output-names
property as fallback since it contain the previous clock name.
libfdt doesn't provide any support to replace fdt_subnode_offset() by
a new function looking for clock-output-names property instead of the
node name. So we have to implement it in arch/arm/mach-omap2/omap5/fdt.c
for now.
Dmitry Baryshkov [Mon, 12 Feb 2024 07:37:08 +0000 (09:37 +0200)]
virtio: fix get_config / set_config for legacy VirtIO targets
The functions virtio_pci_get_config() and virtio_pci_set_config() don't
take the offset into account when reading the config space. For example
this manifests when U-Boot tries to read the MAC address of the VirtIO
networking device. It reads 6 equa bytes instead of the proper addess.
Fix those functions by taking the offset in the config space into
account.
Fixes: 4135e10732a0 ("virtio: Add virtio over pci transport driver") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tom Rini [Tue, 5 Mar 2024 13:08:31 +0000 (08:08 -0500)]
Merge patch series "Fix driver for misc/atsha204a"
Michał Barnaś <barnas@google.com> says:
Fix the driver to behave like the chip datasheet requires.
Improve wake up function to send low signal on SDA line for at least
60us as chip requires to wake up. Fix sleep function to move the chip
into sleep mode, not into idle mode. Remove unnecessary for loop,
which would never run for more than one iteration.
Michał Barnaś [Mon, 19 Feb 2024 16:32:04 +0000 (16:32 +0000)]
misc: atsha204a: fix wakeup function
The ATSHA204A chip requires SDA line to go low for at least 60us to
wake up the chip. Previous implementation did not meet this requirement
due to the NAK received on bus and not sending the zeroes.
The function to ignore the NAK and send bytes regardless is not
supported in the u-boot making it impossible to wake up the chip
this way.
Instead, the bus speed, if needed, is set to lowest value and the
message is sent to the address 0x0. This way, the address of zero
makes the SDA line go low for about 80us, meeting the required time
to wake up the chip. The zero length packet is not sent by the i2c,
so the one byte is sent to the transfer function, but only the address
is sent anyway.
After sending the zero address, the bus speed is restored to the
previous value if it was slowed down to wake up the chip.
Michał Barnaś [Mon, 19 Feb 2024 16:32:02 +0000 (16:32 +0000)]
misc: atsha204a: remove broken for loop
Some previous commit changed the continue statement to return,
making the for loop used to retry waking up the chip to always
return after one iteration. This commit removes the loop, cleaning
the code a little.
Tom Rini [Mon, 4 Mar 2024 17:02:49 +0000 (12:02 -0500)]
Merge patch series "Introduce initial TI's J784S4 and AM69 support"
Apurva Nandan <a-nandan@ti.com> says:
Hello Everyone!
This series will introduce basic support (SD and UART) support for Texas
Instruments J784S4 EVM.
The J784S4 SoC device tree patches are taken from kernel patch submissions
and will be updated as they are accepted and merged to the kernel tree.
All other patches are specific to SPL and u-boot and do not have
dependency on other trees. Appreciate a review for acceptance to u-boot
tree.
Here are some of the salient features of the J784S4 automotive grade
application processor:
The J784S4 SoC belongs to the K3 Multicore SoC architecture
platform, providing advanced system integration in automotive,
ADAS and industrial applications requiring AI at the network edge.
This SoC extends the K3 Jacinto 7 family of SoCs with focus on
raising performance and integration while providing interfaces,
memory architecture and compute performance for multi-sensor, high
concurrency applications.
Some highlights of this SoC are:
* Up to 8 Cortex-A72s, four clusters of lockstep capable dual Cortex-R5F MCUs,
4 C7x floating point vector DSPs with Matrix Multiply Accelerator(MMA) for
deep learning and CNN.
* 3D GPU: Automotive grade IMG BXS-4-64 MC1
* Vision Processing Accelerator (VPAC) with image signal processor and Depth
and Motion Processing Accelerator (DMPAC)
* Three CSI2.0 4L RX plus two CSI2.0 4L TX, two DSI Tx, one eDP/DP and one
DPI interface.
* Integrated gigabit ethernet switch, up to 8 ports (TDA4VH), two ports
support 10Gb USXGMII; Two 4 lane PCIe-GEN3 controllers, USB3.0 Dual-role
device subsystems, Up to 20 MCANs, among other peripherals.
See J784S4 Technical Reference Manual (SPRUJ52 - JUNE 2022)
for further details: http://www.ti.com/lit/zip/spruj52
In addtion, the J784S4 EVM board is designed for TI J784S4 SoC. It
supports the following interfaces:
* 32 GB DDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode
* x1 Input Audio Jack, x1 Output Audio Jack
* x1 USB2.0 Hub with two Type A host and x1 USB 3.1 Type-C Port
* x2 4L PCIe connector
* x1 UHS-1 capable micro-SD card slot
* 512 Mbit OSPI flash, 1 Gbit Octal NAND flash, 512 Mbit QSPI flash,
UFS flash.
* x6 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin User Expansion Connector
* x2 ENET Expansion Connector, x1 GESI expander, x2 Display connector
* x1 15-pin CSI header
* x6 MCAN instances
Udit Kumar [Wed, 21 Feb 2024 14:23:44 +0000 (19:53 +0530)]
dma: ti: k3-udma: Fix ring_idx to pair k3 nav rings
ring_idx was not correctly assigned in case of tflow_id is zero.
Which leads to wrong pairing of DMA for drivers like OSPI.
Fixes: 4312a1dfca26 ("dma: ti: k3-udma: Use ring_idx to pair k3 nav rings") Reviewed-by: Jai Luthra <j-luthra@ti.com> Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Dasnavis Sabiya [Fri, 23 Feb 2024 20:21:52 +0000 (01:51 +0530)]
configs: am69_sk: Add defconfig for AM69 SK board
Add defconfig for AM69 SK A72 and R5 configuration.
This inlcudes and modifies the J784S4 EVM defconfigs:
j784s4_evm_a72_defconfig -> am69_sk_a72_defconfig
j784s4_evm_r5_defconfig -> am69_sk_r5_defconfig
Signed-off-by: Dasnavis Sabiya <sabiya.d@ti.com> Signed-off-by: Apurva Nandan <a-nandan@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # AM69-SK
dma: ti: k3-udma: Fix error handling for setup_resources() in udma_probe()
In udma_probe() the return value of setup_resources() is stored in the
u32 "ch_count" member of "struct udma_dev", due to which any negative
return value which indicates an error is masked.
Fix this by storing the return value of setup_resources() in the already
declared integer variable "ret", followed by assigning it to the "ch_count"
member of "struct udma_dev" in case of no error.
While at it, change the "return ret" at the end of udma_probe() to a
"return 0", to explicitly indicate that probe was successful.
Fixes: a8837cf43839 ("dma: ti: k3-udma: Query DMA channels allocated from Resource Manager") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
arm: mach-k3: am62: Fixup thermal zone critical points
Read the max temperature for the SoC temperature grade from the hardware
and change the critical trip nodes on each thermal zone of FDT at
runtime so they are correct with the hardware value for its grade.
Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Tom Rini [Mon, 4 Mar 2024 16:50:26 +0000 (11:50 -0500)]
Merge patch series "board: beagle: Enable 32k and debounce configuration and fixups"
Nishanth Menon <nm@ti.com> says:
Hi,
Rev 2 of the series.
This is a follow up from [1] - Without the 32k crystal configuration,
wlan doesn't work. Debounce is needed for HDMI Hot plug detect(hpd)
gpio interrupt not storming.
At least the 32k configuration has been done for toradex and phytec
boards, follow similar model of programming.
Changes from V2:
- Removed depedency on [2] - depending on which way
the merge sequence goes, one of the series will need a rebase.
- Added a patch for a bug that Jan noticed
- Fixup for the fat finger missing 0x in 0x4080 :(
Nishanth Menon [Tue, 20 Feb 2024 18:39:52 +0000 (12:39 -0600)]
board: beagle: beagleplay: env: Drop usb and pxe as boot targets
We had enabled USB and network pxe boot with the hope to get it all
merged on time. However, it has not panned out. Drop usb and pxe boot
else bootflow scan -l throws in:
a) Unknown uclass 'usb' in label
b) Crashes when attempting pxe - cpsw/mdio driver apparently has missing
error handling of what ever form. This is the one that Jan noticed in
his log.
We can enable these on a later date once things are working.
Cc: Roger Quadros <rogerq@kernel.org> Reported-by: Jan Kiszka <jan.kiszka@siemens.com> Closes: https://lore.kernel.org/all/782ea2c0-eef5-478d-a122-cc6e2d066762@siemens.com/ Signed-off-by: Nishanth Menon <nm@ti.com>
Nishanth Menon [Tue, 20 Feb 2024 18:39:48 +0000 (12:39 -0600)]
board: beagle: beagleplay: Enable 32k crystal
Enable the external 32k crystal similar to that found on other
production AM62X board. The trim settings for the crystal is board
dependent, so the sequences tend to be board specific. Since this is
a configuration that needs to be done prior to DM managing the system
and all other muxes get set, do the same from R5 context.
Tested-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Nishanth Menon <nm@ti.com>
Tom Rini [Mon, 4 Mar 2024 15:13:01 +0000 (10:13 -0500)]
Merge branch '2024-03-02-assorted-updates' into next
- Assorted MediaTek, ASPEED, xenguest, s5p4418 and qemu-arm fixes
- Assorted test fixes/updates/additions.
- A few bootstd/related fixes.
- Remove common.h from some files
- Drop reiserfs
- A few other assorted fixes throughout the tree.
Masahisa Kojima [Fri, 1 Mar 2024 04:38:39 +0000 (13:38 +0900)]
board: synquacer: developerbox: add myself as maintainer
Add myself as maintainer for SynQuacer Developerbox,
as I'm currently working on it.
This commit also removes Jassi from maintainer since he
no longer has a Developerbox.
Ivan Orlov [Fri, 23 Feb 2024 17:14:20 +0000 (17:14 +0000)]
cmd: eeprom: Fix config dependency
We should have CONFIG_DM_I2C or CONFIG_SYS_I2C_LEGACY enabled in
order for `cmd/eeprom.c` to compile as it depends on the i2c functions
which are not compiled otherwise. Update the Kconfig entry for the
'eeprom' command correspondingly.
Signed-off-by: Ivan Orlov <ivan.orlov@codethink.co.uk> Reviewed-by: Tom Rini <trini@konsulko.com>
Without the '-undef' option, the 'linux' string in .env files is
replaced with the string '1 '.
For example, in the board/armadeus/opos6uldev/opos6uldev.env file,
kernelimg=opos6ul-linux.bin
becomes
kernelimg=opos6ul-1 .bin
in the include/generated/env.in file.
That's because 'linux' is a System-specific Predefined Macros. [1]
Nam Cao [Wed, 21 Feb 2024 12:41:44 +0000 (13:41 +0100)]
bootstd: support scanning a single partition
The "bootflow" command currently doesn't support scanning a single
partition. This is inconvenient in setups with multiple bootable
partitions within a single disk, but only one is desired.
Support scanning a single disk partition. Specifically, support the
syntax:
bootflow scan mmc1:4
which scans only mmc device 1, partition 4.
Dan Carpenter [Wed, 21 Feb 2024 06:26:21 +0000 (09:26 +0300)]
bootstd: fix build error when CONFIG_MMC is disabled
This code assumes that CONFIG_MMC and it causes a build error when
the config is disabled.
aarch64-linux-gnu-ld.bfd: test/boot/bootstd_common.o: in function `bootstd_test_check_mmc_hunter':
test/boot/bootstd_common.c:83:(.text.bootstd_test_check_mmc_hunter+0x70):
undefined reference to `_u_boot_list_2_bootdev_hunter_2_mmc_bootdev_hunter'
Fixes: 66e3dce78750 ("bootstd: Allow hunting for a bootdev by label") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Dan Carpenter [Wed, 21 Feb 2024 06:26:09 +0000 (09:26 +0300)]
bootflow: Fix build error when BOOTMETH_CROS is disabled
The bootflow testing assumes that BOOTMETH_CROS is enabled but it
might not be which leads to a build error.
aarch64-linux-gnu-ld.bfd: test/boot/bootflow.o: in function `prep_mmc_bootdev':
test/boot/bootflow.c:549:(.text.prep_mmc_bootdev+0x1c8):
undefined reference to `_u_boot_list_2_driver_2_bootmeth_cros'
Fixes: d08db02d2d3d ("bootstd: Add a test for bootmeth_cros") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
While fat_exists() reports directories and files as existing
ext4fs_exists() only recognizes files. This lead to errors
when using systemd-boot with an ext4 file-system.
Change ext4fs_exists() to find any type of inode:
files, directories, symbolic links.
Fixes: a1596438a689 ("ext4fs ls load support") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Peter Robinson [Sun, 18 Feb 2024 23:59:35 +0000 (23:59 +0000)]
fs: drop reiserfs
It was only included by a single board which doesn't appear to have
ever used it for any default use cases so drop the filesystem now
that isn't used by any in-tree configurations.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Peter Robinson [Sun, 18 Feb 2024 23:59:34 +0000 (23:59 +0000)]
configs: ethernut5: Drop reiserfs
This is the only board that enables it, and looking generally I don't
believe it's used. All use cases I could fine for the board rub by
default off jffs on the nand and it doesn't enable USB storage.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Cc: egnite GmbH <info@egnite.de>
Jonas Karlman [Sat, 17 Feb 2024 13:19:41 +0000 (13:19 +0000)]
dm: core: Fix address translation in devfdt_get_addr_index()
During address translation #address/size-cells props are expected to
apply to child nodes. However, devfdt_get_addr_index() incorrectly use
the parent offset of the udevice parent instead of getting the offset of
the node parent. This will work in most cases when there is only one
udevice tied to a node.
On e.g. an Orange Pi R1 Plus TLS board the dwc3-generic (parent) and
dwc3-generic-host (child) udevice is tied to the same node.
In that case both the offset and parent values end up being the same.
As a result, the #address/size-cells props intended for child nodes
incorrectly gets applied to the node itself resulting in wrong addr
being returned, 0x0 instead of 0xff600000.
The following can be seen on console:
dwc3-generic-host usb@ff600000: this is not a DesignWare USB3 DRD Core
dwc3-generic-host usb@ff600000: failed to initialize core
Fix this by using the offset of the parent node and not the offset to
the node the parent udevice is tied to.
Jonas Karlman [Sat, 17 Feb 2024 12:08:40 +0000 (12:08 +0000)]
pinctrl: Check pinconfig nodes pre-reloc status recursively
Pinconfig nodes normally bind recursively with PINCTRL_FULL and
PINCONF_RECURSIVE enabled. However, during U-Boot proper pre-relocation
any node marked with e.g. bootph-all will not bind unless its parent is
also marked for pre-reloc.
group1 {
pinconf1 {
bootph-all;
};
};
This cause the following warning message to be shown during U-Boot
proper pre-reloc stage on Rockchip devices, e.g on RK3568:
Check pinconfig nodes pre-reloc status recursively to fix this and to
make pinconfig_post_bind work same at both U-Boot proper pre-reloc and
at TPL/SPL stage.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Bryan Brattlof [Mon, 4 Mar 2024 12:12:57 +0000 (17:42 +0530)]
Makefile: remove hardcoded device tree source directory
Some boards that choose to utilize the OF_UPSTREAM directory for their
device tree files will need to specify that directory instead of the
traditional arch/$(ARCH)/dts/* path.
Include the correct path to the board's dtbs depending on if OF_UPSTREAM
is selected or not.
Sean Anderson [Thu, 15 Feb 2024 17:12:18 +0000 (12:12 -0500)]
boot: Only define checksum algos when the hashes are enabled
Don't define checksum algos when the underlying hashes are not enabled.
This allows disabling these hashes in SPL (or U-Boot).
Fixes: d16b38f4270 ("Add support for SHA384 and SHA512") Fixes: 646257d1f40 ("rsa: add sha256-rsa2048 algorithm") Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Thomas Weißschuh [Tue, 13 Feb 2024 17:13:28 +0000 (18:13 +0100)]
log: fixup log_head after relocating global data
When `gd` is relocated during `spl_relocate_stack_gd()` the
doubly-linked circular list in the `log_head` member is broken.
The last element of the list should point back to the initial
`list_head`, but as the initial `list_head` is moved the pointer becomes
stale. As a result the loop in `log_dispatch` would never finish.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
cmd: setexpr: fix no matching string in gsub return empty value
In gsub, when the destination string is empty, the string 't' is
provided and the regular expression doesn't match, then the final result
is an empty string.
Example:
=> echo ${foo}
=> setenv foo
=> setexpr foo gsub e a bar
=> echo ${foo}
=>
The variable ${foo} should contain "bar" and the lack of match shouldn't
be considered an error.
This patch fixes the erroneous behavior by removing the return
statement and breaking out of the loop in case of lack of match.
Masahisa Kojima [Thu, 8 Feb 2024 02:33:44 +0000 (11:33 +0900)]
FWU: developerbox: read boot index from NOR flash
The FWU Multi Bank Update feature allows the platform to boot the
firmware images from one of the partitions(banks).
On the Developerbox, SCP-firmware running on the SCB(Cortex-M3)
passes the value of the boot index on the NOR flash.
Add a function to read the boot index value from the NOR flash.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Alexander Gendin <agendin@matrox.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Igor Opaniuk [Thu, 1 Feb 2024 12:40:54 +0000 (13:40 +0100)]
qemu-arm: round down memory to multiple of 2MB for LPAE
QEMU's -m option can take fractional megabyte values,
and lowest granularity seems to be 0x2000.
For example, run qemu with amount of memory set to 100005k (0x61A9400):
When LPAE is enabled, 1:1 mapping is created using 2 MB blocks.
In case amount of memory provided to QEMU is not multiple
of 2 MB, hang occurs during MMU initialization.
Stefan Bosch [Fri, 26 Jan 2024 12:50:56 +0000 (12:50 +0000)]
arm: s5p4418: fix relocation of vectors
The header (NSIH) used for the s5p4418-SoC is not loaded into RAM by the
2nd-bootloader, see boot0.h. Therefore, use an adapted version of
relocate_vectors which relocates the vectors after the header (at _start)
instead of the 'dummy'-vectors at the start of the header (at
__image_copy_start).
Signed-off-by: Stefan Bosch <stefan_b@posteo.net> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Stefan Bosch [Fri, 26 Jan 2024 12:50:55 +0000 (12:50 +0000)]
common: board_f: change calculation of gd->mon_len to fix s5p4418 reloc
ARCH_NEXELL: Change calculation of monitor length (gd->mon_len) to fix
relocation at boards with s5p4418-SoC (ARCH_NEXELL). At s5p4418, _start
is after the header (NSIH). Therefore the monitor length has to be
calculated using __image_copy_start instead of _start in order the
whole monitor code is relocated.
Peng Fan [Fri, 26 Jan 2024 10:29:38 +0000 (18:29 +0800)]
xen: xenguest_arm64: map all VIRTIO MMIO region
When run `virtio scan` on i.MX95, there is abort when accessing virtio
mmio region. The issue is the mmio region is not mapped. So let's map
all virtio mmio regions.
Svyatoslav Ryhel [Thu, 25 Jan 2024 20:16:54 +0000 (22:16 +0200)]
boot: pxe_utils: skip fdt setup in case legacy kernel is booted
Currently, if boot with extlinux.conf and do not set the fdt
U-Boot will provide its own device tree. This behavior is
beneficial if the U-Boot device tree is in sync with Linux,
but it totally halts the booting of pre-dtb kernels (3.4 for
example) since it uses ATAGs. To fix this, pass `-` in the
fdt extlinux field as a signal that no tree should be used.
Tom Rini [Fri, 1 Mar 2024 18:54:49 +0000 (13:54 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-snapdragon into next
- Reworks Qualcomm support to be more generic, dropping board specific
build targets and relying on DT as the only source of truth
- Switches all Qualcomm devices to use upstream devicetree
Caleb Connolly [Fri, 1 Mar 2024 15:00:24 +0000 (15:00 +0000)]
clk/qcom: apq8016: allow apq8016_clk_init_uart() to be called externally
When U-Boot as running as the first stage bootloader on MSM8916 devices,
early debug UART requires turning on the clocks (for some reason the
pre-loader turns them off?!).
To simplify developing for this platform, allow the
apq8016_clk_init_uart() function to be called externally. Developers can
call this from the serial_msm debug uart driver to configure the clocks
before the driver model is available.
As it is only possible to enable early debug UART in custom builds of
U-Boot, this solution at least gives developers the option.
Caleb Connolly [Mon, 26 Feb 2024 17:26:40 +0000 (17:26 +0000)]
dts: msm8996: replace with upstream DTS
Drop the U-Boot specific dragonboard820c.dts file in favour of the
upstream apq8096-db820c.dts and an additional -u-boot.dtsi with the
U-Boot specific additions.
Caleb Connolly [Mon, 26 Feb 2024 17:26:36 +0000 (17:26 +0000)]
dts: msm8916: replace with upstream DTS
Drop the U-Boot specific dragonboard410c.dts in favour of the upstream
msm8916-sbc.dts. No additional changes are needed to this DTS for U-Boot
support.
Caleb Connolly [Mon, 26 Feb 2024 17:26:30 +0000 (17:26 +0000)]
doc: board/qualcomm: link to APQ8016 TRM
The MSM8916/APQ8016 Technical Reference Manual is publicly available and
contains a lot of useful register maps for many core parts of the SoC.
Include an archive.org link to it in the dragonboard410c documentation.
Caleb Connolly [Mon, 26 Feb 2024 17:26:29 +0000 (17:26 +0000)]
doc: board/qualcomm: document generic targets
Replace the board specific docs with a generic board.rst file which
documents the build/boot process for the sdm845 and qcs404 boards now
that the only differences are the DTB in use.
At the same time, create a debugging page to document some useful
snippets and tips for working with Qualcomm platforms.