102686 Commits

Author SHA1 Message Date
Frank Li
53d98faad7 Add serial# for SPL SDP download
After update this, uuu(>1.6) can use below command to filter out devices
when multi boards connected.

uuu -ms <serial#> ...
[sudo] uuu -lsusb can list known devices with serial# informaiton.

Serial number is retrieved via get_board_serial() and passed to
g_dnl_set_serialnumber(). This part is conditionally compiled for i.MX94
only now.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2025-11-04 12:39:46 -03:00
Alice Guo
28a38ab542 imx943_evk: Enable USB 2.0 controller host mode
This patch enables the USB 2.0 controller to operate in host mode on the
i.MX943 EVK board. It updates the device tree files to configure the USB
2.0 controller appropriately and modifies the defconfig to include
necessary support.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-11-04 12:39:46 -03:00
Alice Guo
af942ae3a4 arm: arch-imx9: Add USB2.0 and USB3.0 base address definitions
Add USB1_BASE_ADDR and USB2_BASE_ADDR for i.MX9 platform, and define
USB_BASE_ADDR as an alias to USB2_BASE_ADDR.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-11-04 12:39:45 -03:00
Alice Guo
9a5f0724ea usb: ehci-mx6: Extend support to i.MX91, i.MX93, i.MX94, and i.MX95
Since the EHCI USB driver is shared across i.MX91, i.MX93, i.MX94, and
i.MX95, the condition check is updated to use IMX9.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
2025-11-04 12:39:45 -03:00
Tom Rini
e5b9d92d40 Merge branch 'master' of git://source.denx.de/u-boot-usb 2025-11-04 07:54:00 -06:00
Tom Rini
b4c3869292 Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra 2025-11-04 07:50:35 -06:00
Yegor Yefremov
f0f23e0618 usb: musb-new: fix typos
Typos found via codespell utility.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
2025-11-04 12:42:10 +01:00
Yegor Yefremov
c9838ec545 usb: musb-new: fix ti-musb dependencies
If OF_CONTROL is on, ti-musb.c registers a "ti-musb-wrapper" driver
that requires UCLASS_MISC. Hence, select MISC if both OF_CONTROL
and USB_MUSB_TI are selected.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2025-11-04 12:42:09 +01:00
Tom Rini
c9fdb9ac4d Merge patch series "Allow falcon boot from A-core SPL on K3 devices"
Anshul Dalal <anshuld@ti.com> says:

With the addition of secure falcon mode since commit 7674ac9c820f ("Merge patch
series "Add support for secure falcon mode: disable args file""), this series now
adds support for the same to TI's K3 devices and documents the feature taking
AM62x EVM as an example.

With secure falcon mode from A-Core SPL, the boot flow changes as follows:

Existing:
  R5 SPL -> TFA -> OP-TEE -> A-Core SPL -> *U-Boot* -> Linux Kernel

Modified:
  R5 SPL -> TFA -> OP-TEE -> A-Core SPL -> Linux Kernel

Link: https://lore.kernel.org/r/20251024081408.1610102-1-anshuld@ti.com
2025-11-03 13:18:26 -06:00
Tom Rini
28b81c07be Merge patch series "Remove usage of CMD_BOOTx from SPL code"
Anshul Dalal <anshuld@ti.com> says:

Hi all,

We currently make use of CMD_BOOTI and CMD_BOOTZ in the SPL boot flow in
falcon mode, this isn't correct since all CMD_* configs are only meant
for U-Boot proper and not the SPL.

Therefore this patch set adds new LIB_BOOT[IMZ] configs that allow for
more granular selection of their respective compilation targets.

Additionally, this also allows us to more easily disable support for
raw images from secure falcon mode (SPL_OS_BOOT_SECURE) by doing the
following:

  config LIB_SPL_BOOTI
    ...
    depends on SPL_OS_BOOT && !SPL_OS_BOOT_SECURE
    ...

Link: https://lore.kernel.org/r/20251027-fix_cmd_bootx-v10-0-10487e907710@ti.com
2025-11-03 13:18:22 -06:00
Anshul Dalal
20fe0f5dad doc: develop: add docs for secure falcon mode
This patch documents the newly added SPL_OS_BOOT_SECURE option that
enables authenticated boot in falcon mode.

The document provides steps for using secure falcon mode on ARM64 taking
TI's AM62x EVM as an example.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2025-11-03 11:52:29 -06:00
Anshul Dalal
f5119b38ff arm: mach-k3: enable support for falcon mode
With CONFIG_SPL_OS_BOOT enabled, U-Boot checks for the return value of
spl_start_uboot to select between falcon or the regular boot flow. Where
a return value of 0 means 'boot to linux'.

This patch overrides the weak definition form common/spl/spl.c to allow
K3 devices to use falcon mode with SPL_OS_BOOT_SECURE enabled for the
A-Core SPL.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2025-11-03 11:52:29 -06:00
Anshul Dalal
d99688d26e board: ti: common: Kconfig: add CMD_SPL
Add CMD_SPL to list of configs implied by TI_COMMON_CMD_OPTIONS. This
allows the use of 'spl export'[1] command for preparing a device-tree
for falcon boot.

[1]:
https://docs.u-boot.org/en/v2025.10/develop/falcon.html#using-spl-command

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2025-11-03 11:52:29 -06:00
Anshul Dalal
16f4126790 spl: Kconfig: allow falcon mode for TI secure devices
Falcon mode was disabled for TI_SECURE_DEVICE at commit e95b9b4437bc
("ti_armv7_common: Disable Falcon Mode on HS devices") for older 32-bit
HS devices and but can now be enabled with the addition of
OS_BOOT_SECURE.

For secure boot, the kernel with x509 headers can be packaged in a fit
container (fitImage) signed with TIFS keys for authentication.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2025-11-03 11:52:29 -06:00
Tom Rini
2c16b803b8 Merge patch series "Remove usage of CMD_BOOTx from SPL code"
Anshul Dalal <anshuld@ti.com> says:

Hi all,

We currently make use of CMD_BOOTI and CMD_BOOTZ in the SPL boot flow in
falcon mode, this isn't correct since all CMD_* configs are only meant
for U-Boot proper and not the SPL.

Therefore this patch set adds new LIB_BOOT[IMZ] configs that allow for
more granular selection of their respective compilation targets.

Additionally, this also allows us to more easily disable support for
raw images from secure falcon mode (SPL_OS_BOOT_SECURE) by doing the
following:

  config LIB_SPL_BOOTI
    ...
    depends on SPL_OS_BOOT && !SPL_OS_BOOT_SECURE
    ...

Link: https://lore.kernel.org/r/20251027-fix_cmd_bootx-v10-0-10487e907710@ti.com
2025-11-03 11:52:09 -06:00
Anshul Dalal
1dde581e1a configs: disable SPL_BOOTZ to preserve spl size
In the existing behaviour, CMD_BOOTZ is not enabled by default which
means zimage.o is not compiled in the SPL in falcon mode unless
explicitly enabled. This changes now as SPL_BOOTZ is default y for
falcon users which leads to larger SPL size with zimage.o being present.

This patch modifies the defconfigs that used falcon mode but don't
require zimage support.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2025-11-03 11:52:05 -06:00
Anshul Dalal
823e453987 spl: remove usage of CMD_BOOTx from image parsing
Using CMD_* configs from spl doesn't make logical sense. Therefore
this patch replaces the checks for CMD_BOOTx with newly added library
symbols LIB_BOOT[IMZ] and SPL_LIB_BOOT[IMZ] which are enabled by their
respective CMD_* or SPL_* counterparts.

On platforms with non-secure falcon mode, SPL_BOOTZ is enabled by
default for 32-bit ARM systems and SPL_BOOTI is enabled by default for
64-bit ARM and RISCV.

The respective C files (image.c/zimage.c) are compiled based on library
symbols $(PHASE_)LIB_BOOTx instead which are in turn selected by both
CMD_BOOTx and SPL_BOOTx as required.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-11-03 11:52:05 -06:00
Tom Rini
9ccda31f54 Merge patch series "Convert extension support to UCLASS and adds its support to boot flows"
Kory Maincent (TI.com) <kory.maincent@bootlin.com> says:

This series converts the extension board framework to use UCLASS as
requested by Simon Glass, then adds extension support to pxe_utils
and bootmeth_efi (not tested) to enable extension boards devicetree load
in the standard boot process.

I can't test the imx8 extension scan enabled by the
imx8mm-cl-iot-gate_defconfig as I don't have this board.
I also can't test the efi bootmeth change as I don't have such board.

Link: https://lore.kernel.org/r/20251030-feature_sysboot_extension_board-v5-0-cfb77672fc68@bootlin.com
2025-11-03 10:12:05 -06:00
Kory Maincent (TI.com)
e9dc6c1295 boot: bootmeth_efi: Add extension board devicetree overlay support
Add support for scanning and applying extension board devicetree
overlays during EFI boot. After loading the main board devicetree,
the system now scans for available extension boards and applies their
overlays automatically.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
d3008a08d8 boot: bootmeth_efi: Refactor distro_efi_try_bootflow_files return logic
Simplify the return path in distro_efi_try_bootflow_files() to prepare
for adding extension board support in a subsequent commit.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
935109cd9e boot: pxe_utils: Add extension board devicetree overlay support
Add support for scanning and applying extension board devicetree
overlays during PXE boot. After loading the main board devicetree,
the system now scans for available extension boards and applies their
overlays automatically.

This enables dynamic hardware configuration for systems with extension
boards during boot scenarios which are using pxe_utils.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
f9b139342c boot: extension: Move overlay apply custom logic to command level
The extension_overlay_cmd environment variable approach is specific to
the U-Boot extension_board command, while other boot flows (pxe_utils,
bootstd) handle overlay loading differently.

Move the extension_overlay_cmd execution out of the core extension
framework to the command level. This decouples the framework from
command-specific behavior and prepares for future extension support
in other boot flows.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
2d12958ee7 boot: Remove legacy extension board support
Remove the legacy extension board implementation now that all boards
have been converted to use the new UCLASS-based framework. This
eliminates lines of legacy code while preserving functionality
through the modern driver model approach.

Update the bootstd tests, due to the removal of extension hunter.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
6f5b839d5e board: compulab: Convert imx8mm-cl-iot-gate to UCLASS extension framework
Migrate CompuLab imx8mm-cl-iot-gate board extension detection from legacy
implementation to the new UCLASS-based extension board framework.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
0487fbec7b board: sandbox: Convert extension support to UCLASS framework
Migrate sandbox extension board detection from legacy implementation to
the new UCLASS-based extension board framework.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
37c6cdb053 board: sandbox: Improve extension board scan implementation
Enhance the extension board scanning code in sandbox with better error
handling and code organization.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
53e14e9c0c board: sunxi: Convert extension support to UCLASS framework
Migrate sunxi board extension detection from legacy implementation to
the new UCLASS-based extension board framework.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
56cbcb1cc9 board: sunxi: Refactor CHIP board extension code
Clean up and improve code structure in the sunxi CHIP board extension
detection implementation.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
58a36be4ac board: ti: Convert cape detection to use UCLASS framework
Migrate TI board cape detection from legacy extension support to the
new UCLASS-based extension board framework.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
b2e7b1df3b board: ti: Refactor cape detection code for readability
Clean up and reorganize cape detection code structure for improved
maintainability and readability.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
78a06090f4 boot: Add UCLASS support for extension boards
Introduce UCLASS-based extension board support to enable more
standardized and automatic loading of extension board device tree
overlays in preparation for integration with bootstd and pxe_utils.

Several #if CONFIG_IS_ENABLED are used in cmd/extension_board.c to ease the
development but don't worry they are removed later in the series.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
b7edeac950 boot: Move extension board support from cmd/ to boot/
Relocate extension board support from cmd/ to boot/ directory in
preparation for converting the extension framework to use UCLASS.
Also improve code style by applying reverse xmas tree ordering.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
79cd6e78ff include: extension_board: Document the extension structure
Add documentation to describe the extension structure.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
06199ca751 board: compulab: Exclude compulab extension board detection from XPL builds
Disable compulab extension board detection functionality in XPL (eXtended
Program Loader) images to reduce size and complexity in the early boot
stage.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:39 -06:00
Kory Maincent (TI.com)
9279a00c3c board: sunxi: Exclude DIP detection from XPL builds
Disable DIP detection functionality in XPL (eXtended Program Loader)
images to reduce size and complexity in the early boot stage.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:38 -06:00
Kory Maincent (TI.com)
5b68f58a08 board: ti: Fix CAPE_EEPROM_BUS_NUM Kconfig dependency
The CAPE_EEPROM_BUS_NUM configuration option was incorrectly depending
on CMD_EXTENSION, which represents the extension board command. However,
the cape scan functionality can be built and used independently of the
command interface through the SUPPORT_EXTENSION_SCAN option.

Change the dependency from CMD_EXTENSION to SUPPORT_EXTENSION_SCAN to
properly reflect that the I2C bus configuration is needed for the cape
scan function itself, not specifically for the command.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:38 -06:00
Kory Maincent (TI.com)
4c9d907eef board: ti: Exclude cape detection from xPL builds
Disable cape detection functionality in xPL images to reduce size and
complexity in the early boot stage.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-03 10:02:38 -06:00
Kory Maincent (TI.com)
d7d05f86fc MAINTAINERS: Add maintainer for extension board support
Add myself as maintainer for the extension board support that was
originally added to track ongoing development and maintenance.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-11-03 10:02:38 -06:00
Tom Rini
c2637036b8 Merge tag 'u-boot-rockchip-20251101' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/28119
- New Boards support:
    rk3588: MNT Reform2
    rk3528: Radxa ROCK 2A/2F
    rk3576: ArmSoM Sige1, Luckfox Omni3576, FriendlyElec NanoPi M5,
            Radxa ROCK 4D
    rk3568: Lunzn FastRhino R66S
- Other board level updates.
2025-11-02 12:15:23 -06:00
Jonas Karlman
52ac122356 mmc: rockchip_sdhci: Set xx_TAP_VALUE for RK3528
eMMC erase and write support on RK3528 is somewhat unreliable, sometime
e.g. mmc erase and write commands will fail with an error.

Use the delay line lock value for half card clock cycle, DLL_LOCK_VALUE,
to set a manual xx_TAP_VALUE to fix the unreliable eMMC support.

This is only enabled for RK3528, remaining SoCs still use the automatic
tap value, (DLL_LOCK_VALUE * 2) % 256, same value we configure manually
for RK3528.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00
Jonas Karlman
3a01be0cd5 rockchip: Ensure env in SPI Flash can work correctly
Ensure that the spi/sfc node for SPI flash is aviliable during pre-reloc
phase so that env can successfully be loaded from SPI Flash.

No boards with these SoCs seem to be affected as there is no default use
of ENV_IS_IN_SPI_FLASH=y.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00
Jonas Karlman
c6bba31dbd rockchip: spl-boot-order: Defer probe of boot device
Boot devices are being probed when SPL boot order is determined. This
may delay boot slightly and can prevent booting from SPI Flash on boards
that use same pins for SPI Flash and eMMC due to pinctrl being applied
prior to booting.

Instead defer probe of the boot device until SPL try to load image from
the boot device by using uclass_find_device_by_of_offset() instead of
the get variant.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2025-11-02 12:15:23 -06:00
Peter Robinson
a1ab4578b2 board: rockchip: Add support for rk3588 MNT Reform2
Add support for MNT Reform2, it works as a carrier board
with a Firefly iCore-3588Q SoM.

Specification:
- Rockchip RK3588
- LPDDR5X 16/32 GB
- eMMC 128/256 GB
- HDMI Type A out x 1
- USB 3.0 Host x 1
- USB-C 3.0 with DisplayPort AltMode
- PCIE M.2 E Key for Wireless connection
- PCIE M.2 M Key for NVME connection
- DSI to eDP panel
- 1Gb Ethernet w/ Microchip KSZ9310 PHY

Tested using Fedora boot on USB stick and eMMC.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00
Tianling Shen
eda5e7b671 board: rockchip: add Lunzn FastRhino R66S
Lunzn Fastrhino R66S is a high-performance mini router.

Specification:
- Rockchip RK3568
- 1/2GB LPDDR4 RAM
- SD card slot
- 2x USB 3.0 Port
- 2x 2500 Base-T (PCIe, r8125b)
- 12v DC Jack

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00
David Barbion
60d8819d2f board: rockchip: Fix RG353M model renaming
Anbernic RG353M is hardware compatible with RG353P. Only the form-factor
differs. So only one DTS is created for both machines with
"Anbernic RG353P" as default model. If a RG353M is detected, the model
should be overwritten with the correct name.
Actually, it's overwritten with "Anbernic" only making the process of
machine detection a little harder.
However, to determine the size of the string "Anbernic RG353M", it is
sizeof() which is used resulting in obtaining the size of the pointer
(which is 8 bytes on ARM64) not the size of the pointed string.
strlen() should be used instead.

Signed-off-by: David Barbion <davidb@230ruedubac.fr>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00
Quentin Schulz
eb92fd0831 rockchip: imply most symbols for ARCH_ROCKCHIP
Forcing all those symbols on means we cannot make the binary smaller or
with unnecessary features or drivers disabled. This is especially useful
for security, auditing and certification where less code built means
less to look at (and less surface attack) and less to patch, but also
for making binary images smaller which typically means faster boot.

It is possible to have boards without MMC, NAND or SPI flashes, without
anything on SPI or I2C buses, nothing to control over PWM or GPIO or for
which we have no interest in regulator control or serial output so make
it possible to remove all that if desired.

No intended change in default selected symbols.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-02 12:15:23 -06:00
Quentin Schulz
07436b5778 binman: btool: mkimage: fix Bintoolmkimage.run() method docstring
Commit 65e2c14d5a5a ("binman: btool: mkimage: use Bintool.version")
removed the version argument from the run method but forgot to remove it
from the method docstring, so let's fix this oversight.

Fixes: 65e2c14d5a5a ("binman: btool: mkimage: use Bintool.version")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00
Quentin Schulz
b9e2f67e35 rockchip: spl_common: fix TIMER_FMODE constant
The free running mode is 0 at bit offset 1. User mode is 1 at bit offset
1. Currently, free running mode is 1 at offset 0, which is already the
case thanks to TIME_EN.

So, this essentially does not change the actual value written to the
register as it is TIME_EN | TIMER_FMODE which currently is 0x1 | BIT(0)
= 0b1, and will become 0x1 | (0 << 1) = 0b1.

I checked PX30, RK3128, RK3188, RK3228, RK3288, RK3308, RK3328, RK3368
RK3506, RK3562 and RK3568 TRMs.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00
Quentin Schulz
165e4634c3 rockchip: rk3399: fix TIMER_FMODE constant
The free running mode is 0 at bit offset 1. User mode is 1 at bit offset
1. Currently, free running mode is 1 at offset 0, which is already the
case thanks to TIME_EN.

So, this essentially does not change the actual value written to the
register as it is TIME_EN | TIMER_FMODE which currently is 0x1 | BIT(0)
= 0b1, and will become 0x1 | (0 << 1) = 0b1.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00
Quentin Schulz
0d457380a0 rockchip: rk3036: use rockchip_stimer_init from spl_common.o
The only difference with the implementation in spl_common.c is that we
check whether the timer has already been enabled. Considering this is
running in SPL, the first stage on RK3036, I feel like it's guaranteed
to not be enabled by default. No public TRM though and I don't have
access to an RK3036 device so take this as a guess.

Size of SPL binary increases by 8B for evb-rk3036.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-02 12:15:23 -06:00