Commit Graph

101349 Commits

Author SHA1 Message Date
Leo Yu-Chi Liang
18d0cee4e0 common: spl: fix compilation warning
Explicitly specify the type by replacing macro with variable
to fix the possible compilation warning.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-08-21 10:02:45 -06:00
Maxim Kochetkov
e4507f4a0a serial-uclass: set GD_FLG_SERIAL_READY only when cur_serial_dev is assigned
serial_find_console_or_panic() may left cur_serial_dev unassigned if
REQUIRE_SERIAL_CONSOLE is not set. Setting GD_FLG_SERIAL_READY in
this situation confuses serial console code. It tries to use
unassigned driver instead of debug port and stops printing.
So check cur_serial_dev before setting GD_FLG_SERIAL_READY to allow
console to keep printing via debug port.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
2025-08-21 10:02:43 -06:00
Andrew Goodbody
2b751d42c3 sound: maxim_codec: Fix coding mistake
In maxim_i2c_read the code mistakenly just returned the return value
from dm_i2c_read leaving the following code unreachable. Instead assign
ret to be the return value from dm_i2c_read so that the following code
can operate as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-08-21 10:02:40 -06:00
Tom Rini
b436af0641 Merge patch series "env: fat: Add support for NVME"
This series from Fabio Estevam <festevam@gmail.com> adds support for
having the environment be found on an NVMe device that contains a FAT
filesystem.

Link: https://lore.kernel.org/r/20250812174612.1159634-1-festevam@gmail.com
2025-08-20 15:05:31 -06:00
Fabio Estevam
82444e3ecd env: fat: Standardize the interface type check
Make the interface type check consistent among the other interface types
by checking it agains the ifname string.

The ifname string contains the string returned by env_fat_get_intf(), which
returns the CONFIG_ENV_FAT_INTERFACE value.

No functional change.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2025-08-20 15:05:31 -06:00
Fabio Estevam
7b21bf0860 env: ext4: Add support for NVME
Add support for retrieving the EXT4 environment from an NVME device, the
same way it can be retrieved from MMC, SCSI, or VIRTIO.

To use the EXT4 environment from an NVME device, pass
CONFIG_ENV_EXT4_INTERFACE="nvme" in the defconfig.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2025-08-20 15:05:31 -06:00
Fabio Estevam
afbed1ba2f env: fat: Add support for NVME
Add support for retrieving the FAT environment from an NVME device, the
same way it can be retrieved from MMC, SCSI, or VIRTIO.

To use the FAT environment from an NVME device, pass
CONFIG_ENV_FAT_INTERFACE="nvme" in the defconfig.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2025-08-20 15:05:31 -06:00
Tom Rini
0572f7cad1 Merge patch series "Add support for Ethernet boot"
Chintan Vankar <c-vankar@ti.com> says:

This series adds bind method for CPSW to avoid explicit probing, removes
explicit probing of CPSW, adds support for Ethernet boot on SK-AM68,
SK-AM62P-LP, J722S, SK-AM69.

Link: https://lore.kernel.org/r/20250731075956.605474-1-c-vankar@ti.com
2025-08-20 11:37:59 -06:00
Chintan Vankar
841d3d06ce configs: am69_sk_a72_ethboot: Add configs to enable Ethernet boot
Add configs required to enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
02b2a32771 configs: am69_sk_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Add configs required to enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
721d5c30f5 arm: mach-k3: j784s4_spl: Alias Ethernet boot to CPGMAC
This is required to enable spl_net boot on SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
8eecd9edb5 arm: mach-k3: j784s4: Update SoC auto-gen data to enable Ethernet boot
Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
9def2b0fc1 configs: j722s_evm_a53_ethboot: Enable configs required for Ethernet boot
Enable configs required to support Ethernet boot for J722S.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
d449db6cd7 configs: j722s_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Add configs to enable Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
80b529d877 board: ti: j722s: evm: Enable cache for J722s
Enable cache for J722s to optimize performance of CPU to access data from
memory.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
a02009f3a8 arm: mach-k3: j722s: Update SoC autogenerated data to enable Ethernet boot
Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
c1f1d28c44 configs: am62px_evm_a53_ethboot: Enable configs required for Ethboot
Enable config options needed to support Ethernet boot on SK-AM62P-LP.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Andreas Dannenberg
c8c2da2ab8 configs: am62px_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Add configs for enabling Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Andreas Dannenberg
3bab8f17fb board: ti: am62px: evm: Enable cache for AM62p
Enable cache for AM62p to optimize performance of CPU to access data from
memory.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Andreas Dannenberg
6fc2a6a971 arm: mach-k3: am62p: Update SoC auto-gen data to enable Ethernet boot
Update dev-data and clk-data to enable Ethernet boot using CPSW on
SK-AM62P-LP.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
3325b13d53 configs: am68_sk_a72_ethboot: Enable configs required for Ethernet boot
Enable config options needed to support Ethernet boot on AM68-SK.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
07774020f7 configs: am68_sk_r5_ethboot: Add configs for enabling Ethernet boot in R5SPL
Add configs for enabling Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:19 -06:00
Chintan Vankar
333b50d32d net: ti: Kconfig: Enable SPL_SYSCON config for CPSW
TI's Ethernet switch needs system controllers enabled in R5SPL stage while
booting via Ethernet. Enable SPL_SYSCON config for
CONFIG_TI_AM65_CPSW_NUSS.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:18 -06:00
Chintan Vankar
e85b090165 arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC
This is required to enable spl_net boot on SK-AM68.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:18 -06:00
Chintan Vankar
0b092a2aa8 arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot
Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot.

Reviewed-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:18 -06:00
Chintan Vankar
b4a0702c92 Revert "arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS"
This reverts commit 35bddf8896.

Bind method of "am65_cpsw_nuss" driver will ensure binding of it's child
driver "am65_cpsw_nuss_ports", and there is no need to probe CPSW driver
explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:18 -06:00
Chintan Vankar
3967d64740 Revert "mach-k3: am642_init: Probe AM65 CPSW NUSS for R5/A53 SPL"
This reverts commit 93c43a8365.

Bind method of "am65_cpsw_nuss" driver will ensure binding of it's child
driver "am65_cpsw_nuss_ports", and there is no need to probe CPSW driver
explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:18 -06:00
Chintan Vankar
50ededad32 arch: mach-k3: common: Remove explicit probing of CPSW driver
This reverts commit e58d928485.

Bind method of am65_cpsw_nuss driver will ensure binding of it's child
driver am65_cpsw_nuss_ports, and there is no need to call CPSW driver
explicitly. Remove explicit probing of CPSW driver for AM62x.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:18 -06:00
Chintan Vankar
3943531a54 net: ti: am65-cpsw-nuss: Define bind method for CPSW driver
CPSW driver is defined as UCLASS_MISC driver which needs to be probed
explicitly. Define bind method for CPSW driver to scan and bind
ethernet-ports with UCLASS_ETH driver which will eventually probe CPSW
driver and avoid probing CPSW driver explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
2025-08-20 11:06:18 -06:00
Tom Rini
1ad89bfe1a Merge patch series "ram: k3-ddrss: Support partial inline ECC"
Neha Malcom Francis <n-francis@ti.com> says:

Currently, the inline ECC implementation enables inline ECC across the
entire DDR space. However this is not always required and a more common
ask is to have only a portion of the DDR protected as enabling ECC
impacts read/write performance metrics.

This series aims to modify the logic to firstly support partial inline
ECC in its' most basic form which works for single controllers. Then it
introduces an algorithm to support multi DDR controllers where
interleaving plays a role. Since interleaving is handled by the MSMC, it
only makes sense to have the MSMC decide the inline ECC ranges for each
DDR.

This series also introduces support for multiple partial regions of inline
ECC however due to complexity only support for single DDR is present now.

WIP: A commandline test case patch for verifying the correct behaviour
of inline ECC including partial case. Was targeted for v2 however a little
tricky to make it a general test case especially for multi-DDR cases, so
have not combined it in this series for now.

Testing:
- Memtester runs for J721S2 and J784S4 platforms with and without ECC
  enablement runs fine.
- Along with patches that add support for the commandline test (see WIP
  note above) J784S4 shows expected behavior for three sets of partial
  inline ECC regions (non-overlapping, and after modifying J784S4 to
  have single DDR instead of multi-DDR):
  https://gist.github.com/nehamalcom/bde7e14e96485e4a188c3af3af6d75d6

Link: https://lore.kernel.org/r/20250812124324.124306-1-n-francis@ti.com
2025-08-19 11:26:39 -06:00
Neha Malcom Francis
0824703fb2 ram: k3-ddrss: Support multiple ECC regions for a single controller
K3 Inline ECC mechanism can support up to 3 regions of inline ECC, add
this support for single controller.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:20 -06:00
Neha Malcom Francis
d1efbc8d65 ram: k3-ddrss: Add support for partial inline ECC in multi-DDR systems
The existing approach does not account for interleaving in the DDRs when
setting up regions. There is support for MSMC to calculate the regions
for each DDR, so modify k3_ddrss_probe to set the regions accordingly
for multi-DDR systems.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:20 -06:00
Neha Malcom Francis
c32ac5b3b9 ram: k3-ddrss: Add support for MSMC calculation of DDR inline ECC regions
Add support for calculation of the protected regions for each DDR in
multi-DDR systems. Since MSMC is the parent node of the individual DDRs
as well as responsible for their interleaving, it only makes sense for
MSMC to contain the logic for dividing the regions.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:20 -06:00
Neha Malcom Francis
2310aac8ae ram: k3-ddrss: Add support for number of controllers under MSMC
In K3 multi-DDR systems, the MSMC is responsible for the interleave
mechanism across all the DDR controllers. Add support for MSMC to obtain
the number of controllers it's responsible for using the DT.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:20 -06:00
Neha Malcom Francis
3a0793fe9b ram: k3-ddrss: Add CONFIG_K3_MULTI_DDR
As we increase the functionalities that the K3 DDRSS sub-system support,
it is becoming more evident that the same logic cannot apply to both
single as well as multiple DDR controller devices. Add
CONFIG_K3_MULTI_DDR to be used to differentiate between the two.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:20 -06:00
Neha Malcom Francis
f43f710122 ram: k3-ddrss: Add support for a partial inline ECC region
Instead of defaulting to choosing the entire DDR region when enabling
inline ECC, allow picking of a range within the DDR space using DT to
enable.

It expects such a node within the memory node, in the absence of which
we resort to enabling inline ECC for the entire DDR region:

inline_ecc: protected@9e780000 {
        device_type = "ecc";
        reg = <0x9e780000 0x0080000>;
        bootph-all;
};

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:19 -06:00
Neha Malcom Francis
1c70e33b0a ram: k3-ddrss: Add comment about ecc_reserved_space
The reserved space needed for storing the parity remains the same no
matter the size of the region that is being protected. Add this as a
comment for better code understanding.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:19 -06:00
Neha Malcom Francis
e511c651f6 ram: k3-ddrss: s/K3_DDRSS_MAX_ECC_REGIONS/K3_DDRSS_MAX_ECC_REG
To prevent checkpatch warning once we start using this macro more
frequently, shorten the length of it. While at it, also move the
structure k3_ddrss_ecc_region above k3_msmc so that future patches can
have it as a member of k3_msmc.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:19 -06:00
Neha Malcom Francis
520d9c2521 ram: k3-ddrss: Use DDR address instead of system address for ecc_regions
Let ecc_regions[x].start reflect the start of the ECC region in terms of
DDR addressing rather than system addressing. This will make it easier
to extend the usage of the same ecc_regions structure for multi-DDR
systems as well.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2025-08-19 11:26:19 -06:00
Tom Rini
5b2c3a3ea1 Merge patch series "soc: ti: k3-navss-ringacc: Fix Smatch reported issues"
Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch reported issues including a derference of a pointer before its
NULL check and the use of an uninitialised variable.

Link: https://lore.kernel.org/r/20250812-k3-navss-v1-0-a88f7db58998@linaro.org
2025-08-19 11:26:16 -06:00
Andrew Goodbody
13ca68b104 soc: ti: k3-navss-ringacc: Do not use uninitialised variable
In k3_nav_ringacc_probe_dt there can be no error code returned from
dev_read_u32_default so ret is not assigned to and should not be used.
Remove the use of ret from the dev_err call as it is unitialised.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-08-19 11:26:07 -06:00
Andrew Goodbody
b90927bd0d soc: ti: k3-navss-ringacc: NULL check before dereference
Move the first dereference of ring to after the NULL check has occurred.
This will prevent any possible dereference of NULL.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-08-19 11:26:07 -06:00
Tom Rini
cf11b98f13 Merge patch series "remoteproc: k3: Fix two Smatch issue reports"
Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch reported two issues, firstly attempting to compare a u8 to a 16
bit macro and secondly a potentially uninitialised variable.

Link: https://lore.kernel.org/r/20250808-remoteproc_tik3-v1-0-f7dae0b177b2@linaro.org
2025-08-19 11:26:03 -06:00
Andrew Goodbody
c9cd480b5c remoteproc: k3-r5: Ensure ret is initialised
In k3_r5f_split_reset and k3_r5f_unprepare ret may not have been
assigned to before the code reaches the return ret at the function exit.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-08-19 11:25:56 -06:00
Andrew Goodbody
f780ad4be9 remoteproc: ti_k3_arm64: Cannot set or compare u8 to 16bits
In the struct ti_sci_proc the fields proc_id and host_id are declared as
u8 so cannot be set to nor compared with a macro defined with a value
using 16 bits. Change the macro to only use 8 bits to make the code work
as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-08-19 11:25:56 -06:00
Tom Rini
66ff673a8e sandbox: Add generic asm/atomic.h
In order to compile code that uses <asm/atomic.h> on sandbox, we must
provide this header. RISC-V shows us today how to do so with the generic
header implementation, so copy that.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-08-19 11:25:28 -06:00
Tom Rini
58998fed9e sandbox: Improve dummy local_irq_save implementation
Normally, local_save_flags is used as part of the local_irq_* macros, so
remove that as it's unused. Make local_irq_save do something to the
passed variable so that it won't trigger unused variable warnings later.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-08-19 11:25:28 -06:00
Andrew Goodbody
da938a4254 sound: rt5677: Cannot test unsigned for being negative
In rt5677_bic_or the call to rt5677_i2c_read returns an int so old
should also be an int to receive that value and then be able to test it
for being negative which would indicate an error.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-08-19 11:25:25 -06:00
Ilias Apalodimas
544bf0aa59 tools: aisimage: Make aisimage_check_params() static
We are trying to enable -Wmissing-prototypes and this functiion is only
used locally. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-08-19 11:25:23 -06:00
Ilias Apalodimas
6139d5f252 tools: fit_info: Make usage() static
The function is only used locally so declare it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-08-19 11:25:20 -06:00