99951 Commits

Author SHA1 Message Date
Udit Kumar
1c26f91a22 firmware: ti_sci: Add Initialization of dev_info head node
On K3 devices two drivers ti_sci and ti_sci_dm are supporting firmware
functions. At run time one of driver is used.

Driver ti_sci already initializing head for dev_list in its probe
function, but it was missed in ti_sci_dm driver.

So add head list init support for ti_sci_dm driver.
While at this, move init of list before usages in both functions.

Fixes: 5d5a699855a7("firmware: ti_sci: Add support for Resoure Management at R5 SPL stage")
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2025-05-05 14:18:59 -06:00
Daniel Schultz
1750ba44d5 configs: phycore_am62x_a53_defconfig: Remove CONFIG_SYS_BOOTM_LEN
This config was defined with the default value of 8 MiB. However,
the default value is different when CONFIG_ARM64 is enabled and
should be 64 MiB.

Remove this config from the A53 defconfig and use the correct
default config.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-05-05 14:18:56 -06:00
Jerome Forissier
0352eab7d3 cmd: spawn: reject 0 as an invalid job ID
Job IDs are positive integers greater than 1. 0 is not a valid job ID,
therefore fix the comparison in do_wait().

Fixes Coverity defects:

*** CID 550296:  Control flow issues  (NO_EFFECT)
/cmd/spawn.c: 172 in do_wait()
166                     for (i = 0; i < CONFIG_CMD_SPAWN_NUM_JOBS; i++)
167                             if (job[i])
168                                     ret = wait_job(i);
169             } else {
170                     for (i = 1; i < argc; i++) {
171                             id = dectoul(argv[i], NULL);
>>>     CID 550296:  Control flow issues  (NO_EFFECT)
>>>     This less-than-zero comparison of an unsigned value is never true.
"id < 0UL".
172                             if (id < 0 || id >
CONFIG_CMD_SPAWN_NUM_JOBS)
173                                     return CMD_RET_USAGE;
174                             idx = (int)id - 1;
175                             ret = wait_job(idx);
176                     }
177             }

*** CID 550297:  Integer handling issues  (INTEGER_OVERFLOW)
/cmd/spawn.c: 174 in do_wait()
168                                     ret = wait_job(i);
169             } else {
170                     for (i = 1; i < argc; i++) {
171                             id = dectoul(argv[i], NULL);
172                             if (id < 0 || id >
CONFIG_CMD_SPAWN_NUM_JOBS)
173                                     return CMD_RET_USAGE;
>>>     CID 550297:  Integer handling issues  (INTEGER_OVERFLOW)
>>>     Expression "idx", where "(int)id - 1" is known to be equal to -1,
overflows the type of "idx", which is type "unsigned int".
174                             idx = (int)id - 1;
175                             ret = wait_job(idx);
176                     }
177             }

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
CC: Tom Rini <trini@konsulko.com>
2025-05-05 14:18:53 -06:00
Yao Zi
252cd20530 Makefile: Strip leading spaces when preprocessing generated_defconfig
Clang's preprocessor may emit extra spaces for lines starting with '#'.
Lines with these extra characters cannot be handled by Kconfig and will
be ignored with warnings like,

        unexpected data:  # CONFIG_OF_BOARD_FIXUP is not set

Those options that is expected to be assigned explicitly with N will be
set to the default value, messing up board configurations.

Let's sed these spaces away to ensure board configurations could be
correctly generated with Clang.

Link: https://github.com/llvm/llvm-project/issues/78778
Fixes: 2027e99e61a ("Makefile: Run defconfig files through the C preprocessor")
Reported-by: Nathaniel Hourt <I@nathaniel.land>
Signed-off-by: Yao Zi <ziyao@disroot.org>
2025-05-05 14:17:23 -06:00
Christian Marangi
03fb08d4ae env: Introduce support for MTD
Introduce support for env in generic MTD. Currently we only support SPI
flash based on the lagacy sf cmd that assume SPI flash are always NOR.
This is not the case as to SPI controller also NAND can be attached.

To support also these flash scenario, add support for storing and
reading ENV from generic MTD device by adding an env driver that
base entirely on the MTD api.

Introduce a new kconfig CONFIG_ENV_IS_IN_MTD and
CONFIG_ENV_MTD_DEV to define the name of the MTD device as exposed
by mtd list.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-05-05 14:16:59 -06:00
Aristo Chen
f717d798be bootm: improve error message when gzip decompression buffer is too small
Currently, when decompressing a gzip-compressed image during bootm, a
generic error such as "inflate() returned -5" is shown when the buffer is
too small. However, it is not immediately clear that this is caused by
CONFIG_SYS_BOOTM_LEN being too small.

This patch improves error handling by:
- Detecting Z_BUF_ERROR (-5) returned from the inflate() call
- Suggesting the user to increase CONFIG_SYS_BOOTM_LEN when applicable
- Preserving the original return code from zunzip() instead of overwriting
  it with -1

By providing clearer hints when decompression fails due to insufficient
buffer size, this change helps users diagnose and fix boot failures more
easily.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-05-05 14:16:57 -06:00
Ben Wolsieffer
03f5101ff5 Add HOST_ARCH detection for armv5tel and armv6l
Since 7506c15, HOST_ARCH is now used by the EFI loader even when
CONFIG_SANDBOX is disabled. When cross-compiling, the Makefile defines
HOST_ARCH based on the cross-compiler prefix, but this definition fails
to cover some common compiler prefixes. When cross-compiling U-Boot in
nixpkgs, we use CROSS_COMPILE=armv6l-unknown-linux-gnueabihf-, which
results in HOST_ARCH being undefined and causes a build failure.

Fix this by adding armv6l to the match for ARM. Also add armv5tel,
as this is another possible ARM compiler prefix.

Signed-off-by: ZHANG Yuntian <yt@radxa.com>
Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
2025-05-05 14:16:54 -06:00
ZhiJie.zhang
81191427a4 eth: Support E1000E I225-V
1. Add pcie device id 0x15f3
2. Add IIC phy id 0x67C9DC00

Signed-off-by: ZhiJie.Zhang <zhangzhijie@bosc.ac.cn>
2025-05-05 14:16:50 -06:00
Tom Rini
9cf090e887 - STM32 MCUs:
- Fix console cmdline
    - Add support NT35510 panel controller on stm32f769i-disco board
 - Fix dfu alt buffer clearing
 - Enable scan and start for AB schema on STM32MP15 DHSOM
 - Add stm32mp2 support for dwc_eth_qos
 -----BEGIN PGP SIGNATURE-----
 
 iQJQBAABCgA6FiEEXyrViUccKBz9c35Jysd4L3sz/6YFAmgYxBEcHHBhdHJpY2Uu
 Y2hvdGFyZEBmb3NzLnN0LmNvbQAKCRDKx3gvezP/phIoEACDrR3CBpUTbYSZpm0U
 43Ftpg4wJwV1mfNhfs7mNyNE4d+okWnkjnvMgsPuDjDz2UMrjuh3liCELG34M3yM
 rkuTuzh73XbnsqQbk0OB/gXGH2E1Gpjvptv345JZSTLIwXu9UgEZvqT4EIZy897U
 AWGe6Mrs4QeNy0ZcUnotjKUp7gNrqKYIa+s+8WW4LUUXDV5tGgN1IlbZ36S4trMY
 hmunXAnHUO1zPETdyFzFG/Dh3ck8vUntdM/krpHLSDFFyUBGlSAWEsH3x8CKKrCw
 c1ElKvzluBnA2725qT1/QYCWEpd/xhkHbzi2nTkwOVFIQSvumsEabDlBjvH/Vdaq
 kufECALli3foQIIsdVVibMOJmc29aXtLUWb/s9fpoYkd1G565kRTt9yyCF54oxid
 3VhC5XrmEUcmMkJQFFHToA0VN0RdFXCoPgO+LxIUI174wqodN+ZEeaTqQuuy2KIo
 ZoAkMOQNqtrXq20Ga4OVtSw8prr47PlVqKpMmSJnsjJEzrYLIdm2UR1AX3Oivhi+
 wnfCNbtgiyi5KvtIQ0XuQhiuxeL7Qi9595mNl6aUhAcwj/cEEE7mYOlMK/wQ5jzu
 iwI4eR5RLOE4R94Tl8qEG7oA1zNWtokhVgAT1SRg6Okl5ojCGSXQn9a4pqbC9RNV
 wKNFQpQ+F70hn3T9VtBGi83Wdg==
 =may1
 -----END PGP SIGNATURE-----

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

- CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/26081
- STM32 MCUs:
   - Fix console cmdline
   - Add support NT35510 panel controller on stm32f769i-disco board
- Fix dfu alt buffer clearing
- Enable scan and start for AB schema on STM32MP15 DHSOM
- Add stm32mp2 support for dwc_eth_qos
2025-05-05 10:14:37 -06:00
Tom Rini
3f519d93c1 Merge tag 'ubifixes-for-2025.07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-ubi
ubi fixes for v2025.07-rc2

- fix bug: Put MTD device after it is not used
  drop MTD device reference after it is not longer used!
  port from upstream Linux commit: b95f83ab762dd6211351b9140f99f43644076ca8
  from Alexander Vickberg
2025-05-05 07:54:30 -06:00
Patrice Chotard
9b74f86b68 configs: stm32746-eval: Fix console cmdline
The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-05-05 15:51:47 +02:00
Patrice Chotard
4664943f0e configs: stm32746-eval_spl: Fix console cmdline
The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-05-05 15:51:47 +02:00
Patrice Chotard
7a880cb4ec configs: stm32f729-discovery: Fix console cmdline
The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-05-05 15:51:47 +02:00
Patrice Chotard
72246de5db configs: stm32f769-disco: Fix console cmdline
The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-05-05 15:51:47 +02:00
Patrice Chotard
d2ed0c17d7 configs: stm32f746-disco_spl: Fix console cmdline
The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-05-05 15:51:47 +02:00
Patrice Chotard
20e24fb8e5 configs: stm32f769-disco_spl: Fix console cmdline
The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-05-05 15:51:47 +02:00
Christophe Roullier
20afca89ed net: dwc_eth_qos: add support of stm32mp2 platform
Add compatible "st,stm32mp25-dwmac" to manage STM32MP2 boards

Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-05-05 15:51:47 +02:00
Vincent Stehlé
1fa9718047 board: st: common: fix dfu alt buffer clearing
The set_dfu_alt_info() function calls the ALLOC_CACHE_ALIGN_BUFFER()
macro to declare a `buf' variable pointer into an array allocated on the
stack. It then calls the memset() function to clear the useable portion
of the array using the idiomatic expression `sizeof(buf)'.

While this would indeed work fine for an array, in the present case we
end up clearing only the size of a pointer.
Fix this by specifying the explicit size `DFU_ALT_BUF_LEN' instead.

Fixes: ec2933e543df ("board: stm32mp1: move set_dfu_alt_info in st common directory")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-05-05 15:51:47 +02:00
Dario Binacchi
8eb84278c6 configs: stm32f769-disco: support FRD400B25025-A-CTK display
Support FRIDA FRD400B25025-A-CTK display on stm32f769-disco board.

As reported in the section 8.3 (i. e. Board revision history) of document
UM2033 (i. e. Discovery kit with STM32F769NI MCU) these are the changes
related to the board revision addressed by the patch:
- Board MB1166 revision A-09:
- LCD FRIDA FRD397B25009-D-CTK replaced by FRIDA FRD400B25025-A-CTK

This means that the MB1166-A09 is using an NT35510 panel controller,
unlike the previous versions which use an OTM8009A controller.
Therefore, let's add support for NT35510 panel handling to the
stm32f769-disco board configurations.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-05-05 15:51:46 +02:00
Dario Binacchi
a755a1e0eb video: support FRIDA FRD400B25025-A-CTK
[backport from Linux commits 9b26d5c044d6a29ebfb1845408e0f2a7c5f89818
 and 219a1f49094f50bf9c382830d06149e677f76bed]

The patch adds the FRIDA FRD400B25025-A-CTK panel, which belongs to the
Novatek NT35510-based panel family.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-05-05 15:51:46 +02:00
Dario Binacchi
653c9537e7 ARM: dts: add stm32f769-disco-mb1166-reva09
[backport from Linux commit db4fc2c79c533986795a7750e9a12caf9d620b48]

As reported in the section 8.3 (i. e. Board revision history) of document
UM2033 (i. e. Discovery kit with STM32F769NI MCU) these are the changes
related to the board revision addressed by the patch:
- Board MB1166 revision A-09:
  - LCD FRIDA FRD397B25009-D-CTK replaced by FRIDA FRD400B25025-A-CTK

The patch adds the DTS support for the new display which belongs to the
the Novatek NT35510-based panel family.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-05-05 15:51:46 +02:00
Dario Binacchi
ff99c90942 ARM: dts: stm32: add bootph-all for dsi node in stm32f769-disco-u-boot
Add bootph-all for dsi node in stm32f769-disco-u-boot.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-05-05 15:51:46 +02:00
Pascal Zimmermann
d0d0b6a25c ARM: stm32: env: Enable scan and start for AB schema on STM32MP15 DHSOM
For the STM32MP15 DHSOM, change the default environment so an AB schema
on a device can be detected.

For this the define "SCAN_DEV_FOR_BOOT_PARTS" is overwritten and
appended.

The detection works by looking for the partitions with specific lables.
The name of those partitions are in the variables and its defaults:
* dh_ab_partname_primary=rootfs-a
* dh_ab_partname_secondary=rootfs-b

To prevent being hanging at bootcmd, enable "CONFIG_BOOT_RETRY" and
"CONFIG_RESET_TO_RETRY", but the timer will only be activated, if the AB
partitions are detected.

Signed-off-by: Pascal Zimmermann <pzimmermann@dh-electronics.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-05-05 15:51:46 +02:00
Pascal Zimmermann
fd3202153a config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd
Make it possible to substitute the 'part list' command inside
'scan_dev_for_boot_part' with a custom board specific implementation.

For this the new define 'SCAN_DEV_FOR_BOOT_PARTS' is introduced.

Signed-off-by: Pascal Zimmermann <pzimmermann@dh-electronics.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-05-05 15:51:46 +02:00
Alexander Vickberg
c81d8efb51 mtd: ubi: Put MTD device after it is not used
The MTD device reference is dropped via put_mtd_device, however its
field ->index is read and passed to ubi_msg. To fix this, the patch
moves the reference dropping after calling ubi_msg.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Richard Weinberger <richard@nod.at>

Upstream Linux commit: b95f83ab762dd6211351b9140f99f43644076ca8

Signed-off-by: Alexander Vickberg <wickbergster@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2025-05-05 10:15:43 +02:00
Tom Rini
9dbe8d8895 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
- Improvements to the Renesas Ethernet AVB MAC driver
2025-05-04 13:44:01 -06:00
Paul Barker
ee58ed41e6 renesas_rzg2l_smarc_defconfig: Enable networking support
For Ethernet to work on the RZ/G2L board, we need to enable support for
the ksz9131 PHY and enable random MAC address generation (as no MAC
address is programmed into the board).

We also enable the `dhcp`, `mii` and `ping` commands so that Ethernet
functionality can be tested and used to boot Linux.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-05-04 20:25:03 +02:00
Paul Barker
2fc48febcd net: ravb: Add RZ/G2L Support
The Renesas R9A07G044L (RZ/G2L) SoC includes two Gigabit Ethernet
interfaces which can be supported using the ravb driver. Some RZ/G2L
specific steps need to be taken during initialization due to differences
between this SoC and previously supported SoCs. We also need to ensure
that the module reset is de-asserted after the module clock is enabled
but before any Ethernet register reads/writes take place.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-05-04 20:25:03 +02:00
Paul Barker
46706c3427 net: ravb: Add optional reset deassertion
In order to add support for the Renesas RZ/G2L Ethernet IP in a
subsequent patch, we introduce optional de-assertion and re-assertion of
a reset signal in ravb_probe() and ravb_remove().

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-05-04 20:25:03 +02:00
Paul Barker
ba2d1d7666 net: ravb: Refactor out R-Car specific code
In order to add support for the Renesas RZ/G2L Ethernet IP in a
subsequent patch, we move all R-Car specific code into new functions and
introduce a device_ops function pointer table.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-05-04 20:25:03 +02:00
Marek Vasut
6fae565f54 net: ravb: Fix RX error handling
Correctly handle RX errors in ravb_recv() by returning 0 instead
of -EAGAIN on RX error.

In case the RAVB driver detects an RX error in ravb_recv(), it must
not return the -EAGAIN, but instead must return 0. Both error codes
are handled in eth-uclass.c eth_rx() and -EAGAIN is rewritten to 0
at the end of eth_rx(), but negative return code from the .recv()
callback does not trigger .free_pkt() callback, which would clean
up and re-enqueue the descriptor which holds the currently received
corrupted packet. The .free_pkt() must be called for this descriptor,
otherwise the follow up received data become corrupted too, even if
those packets are correctly received. Returning 0 from the .recv()
callback assures the corrupted packet is not processed by the network
stack, but is skipped instead.

For TFTP loading, an RX error produces the timeout "T" output and
resumes the TFTP loading operation shortly afterward, without any
data corruption.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-05-04 20:23:31 +02:00
Tom Rini
dcea465e5e Merge tag 'u-boot-imx-master-20250503' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/26064

- Add i.MX95 support.
- Enable BOOTAUX on the i.MX8M Beacon boards.
2025-05-04 08:51:43 -06:00
Adam Ford
fbe176c39c arm64: imx: imx8mp-beacon: Enable BOOTAUX
In order to run binaries targeting the Cortex-M7, BOOTAUX is
required.

Signed-off-by: Adam Ford <aford173@gmail.com>
2025-05-03 22:22:58 -03:00
Adam Ford
cfbc44f535 arm64: imx: imx8mn-beacon: Enable BOOTAUX
In order to run binaries targeting the Cortex-M7,
BOOTAUX is required.

Signed-off-by: Adam Ford <aford173@gmail.com>
2025-05-03 22:22:58 -03:00
Adam Ford
cacfa0bea4 arm64: imx: imx8mm-beacon: Enable BOOTAUX
In order to run binaries targeting the Cortex-M4,
BOOTAUX is required.

Signed-off-by: Adam Ford <aford173@gmail.com>
2025-05-03 22:22:58 -03:00
Alice Guo
8ebbf29926 Makefile: add some files to CLEAN_FILES
When building the flash.bin of i.MX95 with binman,
mkimage.imx-boot.spl, mkimage.imx-boot.u-boot,
mkimage-out.imx-boot.spl and mkimage-out.imx-boot.u-boot are created.
Add these files to CLEAN_FILES so that they can be removed when running
"make clean".

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Ye Li
0cbd26bee4 imx95_evk: add i.MX95 19x19 EVK board basic support
This patch adds i.MX95 19x19 EVK board basic support.

Messaging unit for EdgeLock Secure Enclave, messaging unit for System
Manager, uSDHC for SD Card, gpio, lpuart are supported now.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-05-03 16:55:32 -03:00
Alice Guo
fe8ab3b0c0 doc: imx: add document for i.MX95 Image Container Format
This patch add a document for i.MX95 Image Container Format.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Ye Li
86932bf014 imx: container: add V2X container support for i.MX95
This patch adds V2X container support for i.MX95. Since V2X container
may not be included in ahab-container.img of i.MX95, check if V2X
container exists in order to get the correct image end.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-05-03 16:55:32 -03:00
Alice Guo
5f28a6599f tools: imx8image: add i.MX95 support
i.MX95 uses binman to invoke mkimage to create image container. 2 image
containers are needed currently. The first one is composed of
ahab-container.img, LPDDR firmware images, OEI images, System Manager
image and u-boot-spl.bin. The second one is consisted of ARM Trusted
firmware and u-boot.bin.

Because DDR OEI image and LPDDR firmware images have to be packaged
together and named as m33-oei-ddrfw.bin by binman, so imx9_image.sh does
not check if m33-oei-ddrfw.bin exists.

When using "make imx95_19x19_evk_defconfig; make", imx9_image.sh will
delete the line for u-boot.bin in container.cfg. In fact, binman is
always called after the u-boot.bin is built, so imx9_image.sh does not
check if u-boot.bin exists.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Alice Guo
0318c26c2f binman: add a new entry type for packing DDR PHY firmware images
i.MX95 needs to combine DDR PHY firmware images and their byte counts
together, so add a new entry type nxp-header-ddrfw for this requirement.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Alice Guo
d292f30d52 imx: Kconfig: IMX8_ROMAPI is not configured for i.MX95
i.MX95 only supports low power boot, which means A55 is kicked by M33.
There is no ROM runs on A55 in such case so that deselect IMX8_ROMAPI
for i.MX95.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Ye Li
def09add19 imx9: add i.MX95 Kconfig and Makefile
This patch adds i.MX95 Kconfig and Makefile. i.MX95 uses SCMI.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-05-03 16:55:32 -03:00
Ye Li
2f8b24d5cc spl: imx: use trampoline buffer to load images to secure region
When SPL loading image to secure region, for example, ATF and tee to
DDR secure region. Because the USDHC controller is non-secure master,
it can't access this region and will cause loading issue.

So use a trampoline buffer in non-secure region, then use CPU to copy the
image from trampoline buffer to destination secure region.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-05-03 16:55:32 -03:00
Alice Guo
92f724736c cpu: imx95: add i.MX95 support
This patch is used to add the imx type string of i.MX95 ao that the
i.MX95 CPU info can be printed.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Peng Fan
0bd99a1dd2 imx9: scmi: add i.MX95 SoC and clock related code
This patch adds i.MX95 SoC and clock related code. Because they are
based on SCMI, put them in the scmi subfolder.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
2025-05-03 16:55:32 -03:00
Ye Li
a881951c63 scmi_protocols: update struct scmi_base_discover_list_protocols_out
@protocols is an array of protocol identifiers that are implemented,
excluding the Base protocol. Four protocol identifiers are packed into
each array element. The number of elements of @protocols is specified by
callee-side.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Alice Guo
ced74d88b2 sandbox: add SCMI clock control permissions to sandbox
This patch is used to add SCMI clock control permissions to sandbox for
testing.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Alice Guo
15fdfef664 clk: scmi: check the clock state/parent/rate control permissions
Clock driver based on SCMI clock management protocol in Linux checks
clock state, parent and rate control permissions. To be consistent with
the kernel driver, add this check here. CLOCK_GET_PERMISSIONS is from
ARM System Control and Management Interface Platform Design Document 3.2.

When using common clock framework (CCF), use the clock signal ID to get
the clock registered by clk_register() in scmi_clk_probe(), and then
obatin the struct clk_scmi variable with container_of().

Signed-off-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-05-03 16:55:32 -03:00
Peng Fan
af2a671f78 clk: scmi: add the command CLOCK_PARENT_SET
This patch adds the command CLOCK_PARENT_SET that can be used to set the
parent of a clock. ARM SCMI Version 3.2 supports to change the parent of
a clock device.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2025-05-03 16:55:32 -03:00