Simon Glass [Wed, 20 Nov 2024 15:36:41 +0000 (08:36 -0700)]
common: Move autoprobe out to board init
Rather than doing autoprobe within the driver model code, move it out to
the board-init code. This makes it clear that it is a separate step from
binding devices.
For now this is always done twice, before and after relocation, but we
should discuss whether it might be possible to drop the post-relocation
probe.
For boards with SPL, the autoprobe is still done there as well.
Note that with this change, autoprobe happens after the
EVT_DM_POST_INIT_R/F events are sent, rather than before.
Neal Frager [Wed, 18 Dec 2024 13:01:29 +0000 (13:01 +0000)]
board: zynqmp: zynqmp-sm-k26-revA: release DP from reset
This releases the DP configuration from reset early on during the boot process
for K26 SOM. It will also avoid the boot hang situation should any attempt be
made to configure the DP registers while it is still in reset.
Fixes the same issue as described by the commit 8b81010a2fe3 ("video:
zynqmp: Add support for reset").
Michal Simek [Mon, 16 Dec 2024 07:52:34 +0000 (08:52 +0100)]
xilinx: Sort OF_LIST and add missing vpk120 and zcu670 platforms
Sort OF_LIST entries and also add missing vpk120 and zcu670 platforms.
Compilation is failing when these DTs are exported via DEVICE_TREE because
binman is not able to create a link for default configuration.
Michal Simek [Wed, 18 Dec 2024 11:40:44 +0000 (12:40 +0100)]
zynqmp: Remove usb init initialization for Kria
USB hub initialization is done by driver introduced by commit 09f557e106ef
("usb: onboard-hub: Add i2c initialization for usb5744 hub") that's why
there is no need to do initialization via variables.
Michal Simek [Thu, 12 Dec 2024 09:41:44 +0000 (10:41 +0100)]
arm64: zynqmp: Sync DTs with Linux v6.13-rc1
Sync zynqmp* DTS files with v6.13-rc1 Linux kernel including three patches
from Sean:
arm64: zynqmp: Enable AMS for all boards
arm64: zynqmp: Expose AMS to userspace as HWMON
arm64: zynqmp: Add thermal zones
Michal Simek [Mon, 6 Jan 2025 09:20:40 +0000 (10:20 +0100)]
arm64: versal: RO multi_boot register in non JTAG bootmode
The main reason for this change is that upstream QEMU has no multiboot
register implemented that's why access to it fails which ends up in CI
failure for our target.
That's why in JTAG bootmode returns 0 which is correct behaviour because
multiboot register is not used in this mode and value should be ignored and
as a side effect it is also fixing CI/Qemu issue.
Also move versal_get_bootmode() to avoid function declaration.
Michal Simek [Thu, 5 Dec 2024 10:38:16 +0000 (11:38 +0100)]
arm64: versal: Support operations around multiboot register
Read multiboot register and show it's value by default.
Also extend logic in dfu_alt_info string generation to support capsule
update for different offsets.
Replace magic numbers in buckval2votl() & buckvolt2val() with macros to
help with clarity and correlate what the numbers correspond to in the
TPS65219 datasheet.
Marek Vasut [Wed, 1 Jan 2025 19:19:05 +0000 (20:19 +0100)]
arm64: Add MIDR entries for Cortex-A57 and Cortex-A76
Add MIDR entries for Cortex-A57 and Cortex-A76 cores.
Those are used on R-Car Gen3 and Gen4 SoCs respectively.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Wed, 1 Jan 2025 19:19:04 +0000 (20:19 +0100)]
arm64: Convert core type check macros into inline functions
Turn the core type check macros into inline functions to perform
better type checking on them. The inline functions get optimized
out in case they are not used. Indent the MIDR_PARTNUM_CORTEX_An
macros in preparation for addition of future three-digit cores
and use MIDR_PARTNUM_SHIFT in MIDR_PARTNUM_MASK to be consistent.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
The commit 7cec3e701940 ("rockchip: rk3588-nanopc-t6: Add support for
NanoPC-T6 LTS") added support for the LTS variant of NanoPC T6. However,
a board specific -u-boot.dtsi file was never added.
Due to the missing -u-boot.dtsi file the LTS fdt included in the FIT is
never tagged with bootph props.
When ENV_IS_IN_SPI_FLASH is enabled, not enabled in defconfig, the env
can successfully load from SPI flash on the non-LTS variant, something
that does not work on the LTS variant due to missing bootph-some-ram
props in the LTS fdt.
Fix this by adding a LTS -u-boot.dtsi file that just include the non-LTS
-u-boot.dtsi file.
Reported-by: Ricardo Pardini <ricardo@pardini.net> Fixes: 7cec3e701940 ("rockchip: rk3588-nanopc-t6: Add support for NanoPC-T6 LTS") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 12 Dec 2024 23:57:19 +0000 (23:57 +0000)]
rockchip: rk3399: Drop unneeded bob and kevin board specific code
The IO-domain driver will configure io_vsel and always-on/boot-on
regulators will be enabled based on the board device tree now that
required nodes and Kconfig options is enabled for SPL.
Remove the bob and kevin board specific code from the common rk3399.c,
the IO-domain and regulator driver provide similar functionality.
Jonas Karlman [Thu, 12 Dec 2024 23:57:16 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Enable dcache and signature validation in SPL
With TPL being used to init DRAM, SPL being used to load FIT and the
adjusted FIT payload offset it is now possible to increase the size
limit of SPL to 256 KB and enable uses of dcache and FIT signature
validation.
Drop SPL_SYS_DCACHE_OFF=y to enable use of dcache in SPL.
Drop SPL_FIT_SIGNATURE=n to enable signature validation of FIT in SPL.
Change SPL_MAX_SIZE to 256 KB now that payload offset has moved in SPI
and TF-A may be loaded to 0x40000 in DRAM.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 12 Dec 2024 23:57:12 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Use TPL with common bss and stack addresses
Migrate to use TPL, common bss, stack and malloc heap size and addresses
to unify memory use in TPL, SPL and pre-reloc with other RK3399 boards.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
(Disable TPL_BLOBLIST) Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 12 Dec 2024 23:57:10 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
The BootROM on RK3399 only read the first 2 KB of each 4 KB page from
SPI flash. With current FIT payload offset of 0x40000 this limits the
supported TPL+SPL size to only 128 KB.
Change to use 0xE0000 as FIT payload offset, similar to other RK3399
boards, to allow a maximum size for TPL of 192 KB and SPL of 256 KB.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 12 Dec 2024 23:57:08 +0000 (23:57 +0000)]
rockchip: rk3399: Fix TPL build of bob and kevin
Building chromebook_bob/kevin with TPL=y ends with a linking error:
arch/arm/mach-rockchip/rk3399/rk3399.o: in function `board_debug_uart_init':
arch/arm/mach-rockchip/rk3399/rk3399.c:148:(.text.board_debug_uart_init+0x34):
undefined reference to `spl_gpio_output'
arch/arm/mach-rockchip/rk3399/rk3399.c:148:(.text.board_debug_uart_init+0x34):
relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `spl_gpio_output'
Daniel Semkowicz [Tue, 26 Nov 2024 08:27:15 +0000 (09:27 +0100)]
board: theobroma-systems: Update TF-A setup steps for RK3588 boards
ddrbin_tool interface has been changed. Additional chip_name argument
is now required to modify ddr binary file. Update documentation
to be consistent with the new interface.
Update BL31 and ROCKCHIP_TPL file paths to match current version
of binaries available in the rkbin repository.
Johan Jonker [Mon, 16 Dec 2024 12:44:32 +0000 (13:44 +0100)]
rockchip: use OF_UPSTREAM for rk3066a/rk3188
The device tree for rk3066a/rk3188 combined is now
available in the /dts/upstream directory.
Use imply OF_UPSTREAM to migrate all rk3066a/rk3188 boards.
Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
FUKAUMI Naoki [Sat, 4 Jan 2025 01:57:03 +0000 (01:57 +0000)]
arm64: dts: rockchip: add Radxa ROCK 5C
Radxa ROCK 5C is a 8K computer for everything[1] using the Rockchip
RK3588S2 chip:
- Rockchip RK3588S2
- Quad A76 and Quad A55 CPU
- 6 TOPS NPU
- up to 32GB LPDDR4x RAM
- eMMC / SPI flash connector
- Micro SD Card slot
- Gigabit ethernet port (supports PoE with add-on PoE HAT)
- WiFi6 / BT5.4
- 1x USB 3.0 Type-A HOST port
- 1x USB 3.0 Type-A OTG port
- 2x USB 2.0 Type-A HOST port
- 1x USB Type-C 5V power port
Sam Edwards [Sat, 4 Jan 2025 01:57:01 +0000 (01:57 +0000)]
arm64: dts: rockchip: Split up RK3588's PCIe pinctrls
These pinctrls manage the low-speed PCIe signals:
- CLKREQ#: An output on the RK3588 (both RC or EP modes), used to
request that external clock-generation circuitry provide a clock.
- PERST#: An input on the RK3588 in EP mode, used to detect a reset
signal from the RC. In RC mode, the hardware does not use this signal:
Linux itself generates it by putting the pin in GPIO mode.
- WAKE#: In EP mode, this is an output; in RC mode, this is an input.
Each of these signals serves a distinct purpose, and more importantly,
PERST# should not be muxed when the RK3588 is in the RC role. Bundling
them together in pinctrl groups prevents proper use: indeed, almost none
of the current board-specific .dts files make any use of them.
(Exception: Rock 5A recently had a patch land that misuses _pins; this
patch corrects that.)
However, on some RK3588 boards, the PCIe 3 controller will indefinitely
stall the boot if CLKREQ# is not muxed (details in the next patch).
This patch unbundles the signals to allow them to be used.
Tianling Shen [Thu, 26 Dec 2024 09:20:42 +0000 (17:20 +0800)]
arm64: dts: rockchip: reorder mmc aliases for NanoPi R3S
Typically any non-removable storage (emmc) is listed before removable
storage (sd-card) options. Also U-Boot will try to override and use
mmc0=sdhci and mmc1=sdmmc0 for all rk356x boards.
Jonas Karlman [Thu, 12 Dec 2024 22:09:44 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Change to use FIT
Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 12 Dec 2024 22:09:40 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Drop use of silent console and late boardinfo
Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.
A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 12 Dec 2024 22:09:39 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Include sdmmc regulator in SPL
Add bootph props and enable related Kconfig options to include the sdmmc
regulator in SPL. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is
handled correctly in SPL.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
The boot timing and reporting (bootstage) infrastructure is useful for
performance analysis and debug but adds overhead and console noise when
using the device normally. Remove it from the device config.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
rockchip: rk3399-rockpro64: Hook sysreset gpio to enable full reset
The reset mechanism used by Linux to reset the SoC is known to only
partially reset the logic. A mechanism is implemented in
rk3399_force_power_on_reset to use a GPIO connected to the PMIC's
over-temperature (OTP) reset pin, which fully resets all logic.
Hook the associated GPIO where the function expects it to enable this
reset mechanism and avoid any possible side-effect of partially-reset
units.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
rockchip: rk3399-roc-pc: Hook sysreset gpio to enable full reset
The reset mechanism used by Linux to reset the SoC is known to only
partially reset the logic. A mechanism is implemented in
rk3399_force_power_on_reset to use a GPIO connected to the PMIC's
over-temperature (OTP) reset pin, which fully resets all logic.
Hook the associated GPIO where the function expects it to enable this
reset mechanism and avoid any possible side-effect of partially-reset
units.
Without this patch, reading from the micro sd slot fails after a reset.
With this mechanism, U-Boot is able to boot from it reliably.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Jonas Karlman [Tue, 5 Nov 2024 21:51:47 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Change to use FIT
Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 21:51:43 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Drop use of silent console and late boardinfo
Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.
A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 21:51:42 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Include sdmmc regulator in SPL
Add bootph props and enable related Kconfig options to include the sdmmc
regulator in SPL. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is
handled correctly in SPL.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 16:00:36 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Change to use FIT
Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.
Checksum validation of FIT adds around 140 ms to boot time:
Jonas Karlman [Tue, 5 Nov 2024 16:00:32 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Drop use of silent console and late boardinfo
Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.
A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 16:00:29 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Set cpuid and serial env var
Enable MISC_INIT_R and ROCKCHIP_EFUSE to read cpuid from efuse and set
the cpuid# and serial# env vars.
Change to read mac address from eeprom in rockchip_early_misc_init_r()
to ensure the ethaddr env var is set before rockchip_setup_macaddr() try
to set ethaddr based on cpuid.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 16:00:27 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Drop unused vcc_sd regulator from SPL
The sdmmc power come from vcc33_sd pmic regulator and not from the
vcc_sd fixed regulator, as currently defined in the in-tree DT.
Drop vcc_sd and the related gpio7 and sdmmc_pwr nodes from being
included in SPL along with any related Kconfig option. Also enable
SPL_DM_SEQ_ALIAS to ensure aliases is handled correctly in SPL.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>