Resolved an issue where repeated flash/debug cycles
would fail, requiring the board to be placed in ISP
mode before it could be programmed again.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
The check for the layout size, when CONFIG_SPI_NOR_SFDP_DEVICETREE
is enabled, is already done with build asserts during build
(inside PAGE_LAYOUT_GEN). We don't need to check a second
time.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add overlay and config files for frdm_mcxa153 (MCXA153, EDMA V4,
no DMAMUX) to chan_blen_transfer, chan_link_transfer and
loop_transfer test suites.
Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
Add a loop to triggerchannel start for each remaining major loop iteration
to ensure complete data transfer.
Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
The loop counter is a signed int but was formatted using %u, which
expects an unsigned int.
Use %d instead to match the variable type.
No functional changes.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Extend test_negative_flash_erase_unaligned to also verify that
flash_erase() returns an error when the erase size is not aligned to
the page size.
Previously, the test only validated unaligned offsets.
This change adds coverage for unaligned erase lengths to ensure
drivers properly reject misaligned erase requests.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Split grouped negative flash API tests into smaller, independent
test cases.
This improves failure diagnostics and aligns with the
one-behavior-per-test practice used across Zephyr tests.
No functional changes intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add missing negative test cases to verify that flash_write()
correctly return an error when called with an unaligned size.
This improves coverage of invalid parameter handling in flash
drivers.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
For SMP kernel, the secondary Core is booted up in post kernel stage,
the secondary core need to initialize its, for example map collection
table to target redistributor, we could not use sleep delay functions
at this time because the scheduler is not ready for secondary Core,
so this patch is to always use busy wait in post its command process.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
In case of SMP kernel, multiple CPU Core could post its command by
using the same command port, so add lock to make sure its command
is posted one by another.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
We will make use of the .exc_return member during walk_stackframe() to
know whether we have extended stack or standard stack.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
The parsing of the number of bytes to read in the read command was being
done in hexadecimal, causing unexpected behavior.
Now the number can be interpreted in decimal or hexadecimal if prefixed
with 0x.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch avoids the use of the default device on destructive
operations like erase and write. Allowing it might have catastrophic
results like erasing parts or the whole of the application itself.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This fixes the range check condition. Without it, the last page cannot
be mapped.
This is a follow-up to 70961e2; the same fix is applied to the neighboring
function. Both functions with the problem were introduced by 01d3575.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Refactor the Retransmission Disable (R) bit handling in L2CAP BR/EDR
to reuse the existing L2CAP_FLAG_REMOTE_BUSY flag instead of
maintaining separate R-bit tracking flags.
The previous implementation used dedicated flags (
`L2CAP_FLAG_RECV_FRAME_R` and `L2CAP_FLAG_RECV_FRAME_R_CHANGED`) to
track the R-bit state, which duplicated the functionality of
L2CAP_FLAG_REMOTE_BUSY and added unnecessary complexity.
Key changes:
- Remove `L2CAP_FLAG_RECV_FRAME_R` and
`L2CAP_FLAG_RECV_FRAME_R_CHANGED` flags
- Update `bt_l2cap_br_update_r()` to directly use
`L2CAP_FLAG_REMOTE_BUSY` for tracking remote busy state
- Trigger I-frame retransmission when R-bit transitions from 1 to 0
- Update I-frame and S-frame header packing to set R-bit based on
local busy state in retransmission mode
- Simplify I-frame sending logic by consolidating remote busy checks
- Remove redundant R-bit checks in data pull path
- Add RET mode specific handling in S-frame reception for RR and REJ
frames
- Enhance `bt_l2cap_br_chan_recv_complete()` to support both RET and
ERET modes with proper local busy state management
- Set S-frame type to REJ when local busy and in RET mode
These changes eliminate code duplication and make the remote busy
state management more consistent across the L2CAP implementation.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Fix the retransmit timer start logic to account for remote busy state
in L2CAP BR/EDR flow control.
The previous implementation would start the retransmit timer when there
are outstanding unacknowledged I-frames, but it didn't check if the
remote side is in a busy state (RNR received). Starting the timer while
the remote is busy is incorrect since the remote cannot process I-frames
until it sends an RR to clear the busy condition.
Add a check for L2CAP_FLAG_REMOTE_BUSY before starting the retransmit
timer to ensure the timer is only started when the remote side is ready
to receive I-frames.
This prevents unnecessary timer expirations and retransmissions when the
remote peer has signaled it cannot accept additional I-frames.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Refactor the I-frame retransmission mechanism to improve clarity and
correctness in L2CAP BR/EDR flow control.
The previous implementation used multiple flags (L2CAP_FLAG_PDU_RETRANS
and L2CAP_FLAG_REQ_SEQ_UPDATED) to track retransmission state, which
made the logic complex and error-prone. This change introduces a
per-window retransmit flag and dedicated helper functions to manage
retransmission of all unacknowledged I-frames.
Key changes:
- Replace L2CAP_FLAG_PDU_RETRANS with L2CAP_FLAG_RET_I_FRAME for
timeout-triggered retransmission of the first unacked I-frame
- Replace L2CAP_FLAG_REQ_SEQ_UPDATED with L2CAP_FLAG_RET_I_FRAMES for
retransmission of all unacked I-frames
- Add `retransmit` flag to `bt_l2cap_br_window` structure to track
which I-frames need retransmission
- Add `l2cap_br_retransmit_i_frames()` to mark all outstanding I-frames
for retransmission
- Add `l2cap_br_stop_retransmit_i_frames()` to clear retransmission
state
- Add `l2cap_br_get_ret_win()` to retrieve the next I-frame marked
for retransmission
- Update `l2cap_br_ret_fc_data_pull()` to handle both single I-frame
timeout retransmission and bulk retransmission separately
- Fix window memory management to only free newly allocated windows on
error, not retransmitted ones
- Update S-frame handlers (RR, REJ, RNR) to use new retransmission
helpers instead of setting flags directly
- Update comment for L2CAP_FLAG_RET_I_FRAME to clarify it handles
timeout retransmission
These changes make the retransmission logic more explicit and easier
to maintain while ensuring proper flow control behavior.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There is a corner case that the S-frame (RR) needs to be sent. And
there is an I-frame (and only one I-frame) is in pending. But the
I-frame is pending for waiting for ack instead of sending. In this
case, the S-frame (RR) will not be preformed.
The previous implementation incorrectly checked for pending data
before sending S-frames, which could prevent timely acknowledgments.
Fix the S-frame sending logic to ensure proper flow control in L2CAP
BR/EDR channels.
Simplify the S-frame sending mechanism by removing the dedicated
S-frame buffer allocation and transmission path. Instead, rely on
the existing data ready mechanism to trigger S-frame transmission
when needed.
Key changes:
- Remove S-frame specific macros and flags for identifying S-frames
- Change `l2cap_br_send_s_frame()` to only set the pending flag
instead of allocating and sending buffers directly
- Remove error handling paths that would disconnect on S-frame send
failures since S-frames are now queued through the normal path
- Simplify `l2cap_br_get_next_sdu()` and `l2cap_br_ret_fc_data_pull()`
by removing S-frame specific handling
- Update `bt_l2cap_br_chan_recv_complete()` to always return 0
These changes ensure S-frames are sent promptly for flow control
regardless of pending I-frames in the transmission queue.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
For m2m video device, the get_caps() API give the supported caps of
either input or output side. However, there is currently no guaranteed
way to know the relationship between input and output caps.
Introduce a new video_transform_caps() API that help to transform a video
format cap from one end to the other end of a m2m device.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Return an errno instead of _ASSERT because in some cases, the propram
needs to be continued even if a function failed. For example,
video_get_caps() could be failed if it is called in an init function
where the HW is not yet assigned.
Furthermore, _ASSERT will be dissappeared in production build.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Allow providing an unlock configuration for unlocking the padcfg region as
part of the ti,control-module node.
Map the child pinctrl node using the `ranges` property to the base address
space.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Allow providing an unlock configuration for unlocking the padcfg region as
part of the ti,control-module node.
Map the child pinctrl node using the `ranges` property to the base address
space.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Allow unlocking partitions as part of early_init_hook if the device tree
contains an unlock configuration as part of ti,control-module.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Currently we maintain addresses and values as static configurations using
static configurations and macros in ctrl_partitions.c. Instead use the
new ti,control-module binding to get these values from the device tree and
unlock the partitions during early init.
Only compile and call `k3_unlock_all_ctrl_partitions` if at least one node
with status okay and compatible "ti,control-module" is present.
Also make sure to map and unmap the regions in case MMU is present.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
This binding is for TI devices that use control modules for configuring
registers and information related to control MMRs, power, reset and
clocking.
These control modules consist of regions that require writing specific
values to specific kick registers to unlock that region. This is provided
as ti,unlock-offsets property.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Define alias to adc and set status to okay on adc node
at the nrf54lm20 board defition level.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add a compliance check to make sure that the rules in
doc/build/dts/bindings-upstream.rst (section "File names") are
followed from now on.
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
This 'base' file is just an include file, it doesn't actually refer to
a concrete binding. There's a specific binding for the 4050 in another
file that has the right name.
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
We have:
- sifive-common.yaml that wants to be a generic include
file for CPUs by that vendor
- riscv.yaml that is *both* a generic include file for CPUs of that
architecture *and* a specific binding with compatible "riscv"
This is a problem for multiple reasons:
1. It means that both sifive-common.yaml and riscv.yaml are different
YAML files with the same "compatible", i.e. "riscv".
This should be a hard error. The only reason this isn't causing build
errors seems to be because of an edtlib optimization (see the
"dt_compats_search" in edtlib.py for details)
2. It means that sifive-common.yaml is a valid binding whose file
name doesn't match its compatible, which is a violation of the
rules for upstream bindings.
Fix both of these problems by factoring out the common properties into
a new "riscv-common.yaml" that doesn't have any "compatible: " set.
That lets sifive-common.yaml just include riscv-common.yaml, allowing
it to be "just" an include file, without breaking any of the common
property definitions expected by CPU bindings for that vendor.
Note that there does appear to be one file
in-tree (dts/riscv/raspberrypi/hazard3.dtsi) that actually uses
"riscv" as a bare compatible. I'm going to take that as a hint that
out-of-tree users are probably doing the same, making it important to
continue to allow riscv.yaml to be a "real" binding and not "just" an
include file.
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
The main problem I want to fix here is that the DT binding's file name
doesn't match its compatible, which is a violation of our upstream
bindings rules.
The "dsi" suffix here is not a good practice, DT-wise. The compatible
string represents the programming model for the device in vnd,device
format. We don't put the "-spi" at the end of compatibles for SPI
devices, and we don't put "-pcie" on the compatibles for PCIe devices.
The bus has no place in the DT compatible. So in this case, the
file name seems fine, but the compatible itself is off.
(The other option would have been to change the suffix to "mipi-dsi"
(or "mipi_dsi") as necessary to match the relevant "on-bus:" value in
the binding -- but let's simplify and better align with DT best
practices here.)
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
A YAML file with a "compatible:" set is able to be interpreted by the
bindings system as a "real" binding and should have enough information
to feed a driver. YAML files without "compatible:" are meant to be
used with the "include:" feature.
Delete some stray "compatible:" lines that are in YAML files seemingly
meant only to be used as include files.
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>