Add the dt_compat_all_has_prop
kconfig preprocessor function, simillar to
dt_compat_any_has_prop.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add support for arrays and string-arrays to
dt_compat_any_has_prop
kconfig preprocessor function.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add the `DEVICE_API` wrapper to the remaining `gpio_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Add the `DEVICE_API` wrapper to the remaining `flash_driver_api`
instances, ensuring that each driver API is placed in its respective
linker section.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The documentation incorrectly pointed to a single file
(libc-hooks.c) for the Picolibc API hook implementations.
These hooks are implemented across the lib/libc/picolibc/ directory,
not in a single file.
Update the documentation to reference the directory instead to avoid
confusion.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Coverity found a REVERSE_INULL defect (CID 551615).
The 'hasher' pointer was used before it was checked
for NULL in crypto_query_hwcaps().
This patch reorders the logic to check the pointer
immediately after device_get_binding().
Fixes CID 551615
Signed-off-by: Shreya Kulkarni <kulkarnishreya2421@gmail.com>
The PSA setup functions would return -141
(`PSA_ERROR_INSUFFICIENT_MEMORY`).
Increasing the heap size makes the test run successfully.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add power domain for irqsteer in display mix.
Must power on the display mix before accessing
registers of display irqsteer.
When disp_irqsteer node is enabled, please
enable option CONFIG_PM_DEVICE.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Update kernel level and priority(same with scmi clock control)
On i.MX95, there is an irqsteer instance in display mix.
when the irqsteer is enabled, must power on display mix before
accessing registers of the irqsteer(call irqsteer_hw_init).
the irqsteer drivers's kernel level is PRE_KERNEL_1 and it's
priority is 40. So update kernel level to PRE_KERNEL_1 and update
priority to 30 to ensure that the arm scmi power domain driver
is initialized before initializing irqsteer driver.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
The driver config struct was declaring `int_pin` while the code was
using `int_gpio`. Another issue was the variable name used for
`dev->config`, changed it to `config` instead of `dev_config` as used
in the code.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
MD5 is a weak hash algorithm that is not supported by all PSA Crypto
implementations.
Remove its usage for compatibility.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add shell commands to test the BR/EDR connection request callback
functionality introduced in the previous commit.
Add a `br_conn_req_cb()` callback function that demonstrates how
applications can handle incoming connection requests. The callback
supports:
- Accepting connections with a specified role (central/peripheral)
- Rejecting connections when auto-reject is enabled
Update the `pscan` (connectable) command to accept an optional
"central/peripheral" parameter. When provided, the connection request
callback is registered and configured to accept incoming connections
as the central/peripheral role. Without the parameter, the default
behavior is used.
Add `auto_reject_conn` shell command to enable/disable automatic
rejection of incoming connection requests for testing purposes.
This setting only takes effect if the `connectable` command has the
optional parameter `central/peripheral` set.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a callback mechanism to allow applications to handle incoming
BR/EDR connection requests and decide whether to accept or reject
them, as well as specify the desired role (central/peripheral).
Update bt_br_set_connectable() to accept an optional callback function
parameter. When provided, callback is invoked on incoming connection
requests, allowing the application to inspect the remote device address
and Class of Device before accepting or rejecting the connection.
If no callback is provided, the connection request is accepted
internally with the default behavior based on the
`CONFIG_BT_ACCEPT_CONN_AS_CENTRAL` configuration option.
The accept_conn() function is updated to:
- Call the registered callback if available
- Pass the remote device address and Class of Device to the callback
- Accept the connection if the callback returns BT_BR_CONN_REQ_ACCEPT_*
- If the returned value is BT_BR_CONN_REQ_ACCEPT_CENTRAL, the role
switch will be requested.
- Reject the connection if the callback returns BT_BR_CONN_REQ_REJECT_*
- Add error handling and logging for failed connection acceptance
Update all existing callers of bt_br_set_connectable() to pass NULL
for the callback parameter to maintain backward compatibility.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a new test case for the Bluetooth shell to verify the
BT_ACCEPT_CONN_AS_CENTRAL configuration option.
The test uses the BR/EDR configuration and enables the option to
accept incoming ACL connections as central role.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a new Kconfig option BT_ACCEPT_CONN_AS_CENTRAL to allow accepting
incoming ACL connection requests as the central role instead of the
default peripheral role.
When enabled, the accept_conn() function sets the role to central in
the HCI accept connection request command when handling the connection
request event.
The actual role will be updated in Role Change event.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Verify that requested data can fit into the transmit buffer on send to
avoid out-of-bound memory writes.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Move the kStatus_FLEXCAN_UnHandled case from before the
kStatus_FLEXCAN_ErrorStatus case to just before the default case.
This prevents unnecessary execution of the CAN bus error handler
during message buffer interrupt processing. The issue occurred
because when CAN bus errors occur without any mailbox generating
an interrupt, FLEXCAN_MbHandleIRQ returns kStatus_FLEXCAN_UnHandled.
With the previous code structure, the fallthrough from
kStatus_FLEXCAN_UnHandled would cause the kStatus_FLEXCAN_ErrorStatus
handler to execute unnecessarily.
By separating these two cases, kStatus_FLEXCAN_UnHandled (which
represents unhandled status during Message Buffer processing)
now falls through only to the default case for logging, while
kStatus_FLEXCAN_ErrorStatus is handled independently only when
actual CAN bus error status needs processing.
Signed-off-by: William Tang <william.tang@nxp.com>
Replace FLEXCAN_TransferHandleIRQ() with separate calls to
FLEXCAN_BusoffErrorHandleIRQ() and FLEXCAN_MbHandleIRQ() to handle
FlexCAN interrupts.
The original FLEXCAN_TransferHandleIRQ() API accesses registers for
features that may not be used, including Enhanced RX FIFO. This can
cause issues when different FlexCAN instances have different hardware
features, as it may attempt to access non-existent registers.
By using the more targeted FLEXCAN_BusoffErrorHandleIRQ() and
FLEXCAN_MbHandleIRQ() functions, we only access the registers that
are actually needed for the enabled features. This approach:
- Prevents accessing non-existent registers on instances lacking
certain features
- Provides a more lightweight interrupt handling path
- Slightly improves code efficiency by avoiding unnecessary register
operations
The config structure is now used in the ISR to pass the number of
message buffers to FLEXCAN_MbHandleIRQ().
Signed-off-by: William Tang <william.tang@nxp.com>
Implement more co-processor commands in the FT8xx display driver.
The list of the new implemented commands consists of:
* CMD_FGCOLOR
* CMD_BGCOLOR
* CMD_SLIDER
* CMD_TOGGLE
* CMD_TRACK
Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
The float_disable test was missing proper ARM64 support in its
preprocessor conditionals:
1. ARM64 was not included in K_FP_OPTS definition, causing build errors
2. ARM64 was incorrectly grouped with ARM (Cortex-M/R) which expects
k_float_disable() to return -EINVAL for non-current threads
3. K_FLOAT_DISABLE_SYSCALL_RETVAL was not defined for ARM64
ARM64 has different FPU management semantics than ARM (Cortex-M/R):
- ARM restricts k_float_disable() to current thread only
- ARM64 allows disabling FPU for any thread because SMP configurations
require flush_owned_fpu() to manage FPU state across multiple CPUs
Fix the preprocessor conditionals to:
- Include CONFIG_ARM64 in K_FP_OPTS definition
- Separate ARM64 from ARM in test_k_float_disable_common() so ARM64
expects success (0) instead of -EINVAL
- Include ARM64 in K_FLOAT_DISABLE_SYSCALL_RETVAL definition
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
The arch_float_disable() function was not clearing the K_FP_REGS flag
from thread->base.user_options after disabling FPU access. This caused
the float_disable test to fail as it verifies the flag is properly
cleared after FPU disable.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Introduce a generic board configuration for the APU on the Versal Gen 2
SoC, which is based on the ARM Cortex-A78 processor.
This board setup provides a baseline environment for enabling and testing
Cortex-A78 features and peripheral integration on the APU subsystem.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Add initial support for the Versal Gen 2 SoC APU, which is based on
the Arm Cortex-A78 processor. It includes basic wiring for memory
regions, UART, interrupt controller, and timer.
The versal2_apu.dtsi file defines peripherals shared across the SoC,
while versal2_a78.dtsi captures peripherals private to the Cortex-A78
processor. These device trees lay the groundwork for further APU-based
development on the Versal Gen 2 platform.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Add CTRL-AP based mass-erase recovery support for nRF54L15 to help
recover AP-locked devices.
The script adds a user-facing `nrf54l_mass_erase` helper and triggers it
automatically on `examine-fail` when AP lock is detected.
Signed-off-by: Jingxing Lai <starsphere@foxmail.com>
The return value variable was initialized but immediately
overwritten before.
Remove the redundant initialization and limit the variable scope to
where it is actually used.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Some of the BAP broadcast functions was missing a check for
allocated.
Adding the checks exposed a bug in the CAP commands where
the broadcasts were never actually allocated. Since there
is not a command for that in CAP, a workaround has been
implemented to use the first command (setup_stream) to
allocate a BAP broadcast with a dummy broadcast ID.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add the `DEVICE_API` wrapper to the remaining `i2c_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This add a new script and hooks it up into the existing doc workflow so
that we can make documentation build fail if new API is added without
proper documentation coverage for it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
In order to get reproducible coverage reports, run Doxygen in
single-threaded mode for the doxygen-coverage target.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit adds the Sparkfun RP2040 mikroBUS Development Board under
the same assignees as other of the Raspberry Pi Pico based boards.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Adds basic support for the "Sparkfun RP2040 mikroBUS Development
Board" that comes with 16MB on-board QSPI Flash, a blue user LED
on GP25, UART0 as console, I2C1 and SPI0 as default serial busses,
free access to ADC0 - ADC3, and the following add-ons:
- support for the digital on-board RGB LED at GP8 over PIO0
- support for the on-board battery fuel gauge sensor over I2C1
that monitors the single cell battery charging circuit
- support for the on-board microSD card as SDHC over SPI1 at 12MHz
- support for the on-board Qwiic or STEMMA QT connector
- support for the on-board mikroBUS socket
- support for the Thing Plus or Feather pin header
Signed-off-by: Stephan Linz <linz@li-pro.net>
Implement cyw20829 SoC specific flash power down before
entering deep sleep and power up on wake. This reduces
the overall power consumption during deep sleep
Signed-off-by: Merin George <merin.george@infineon.com>
Enable low power mode support in the bluetooth HCI driver for
cyw20829 so that the controller can enter sleep states when idle
Signed-off-by: Merin George <merin.george@infineon.com>