This configure MPU region over OTP area like ID region.
OTP can be directly read and need to use flash HAL API for writing.
Signed-off-by: Gaétan Froissard <gaetan.froissard@marshmallow.kids>
Fixes this define leaking into all application source files when
the feature is not even enabled
Co-authored-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The extra_conf_files arg in testcase.yaml was being improperly
assigned to the CONF_FILE CMake arg, which caused
configuration_files.cmake to ignore soc and board Kconfig overlays.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
This patch updates the intel_adsp smoke tests to use the new host IPC
backend data model and APIs.
The host IPC smoke test now treats messages as a fixed two-word uint32_t
payload instead of using struct intel_adsp_ipc_msg and the
INTEL_ADSP_IPC_CB_* message types. The receive callback validates the
payload length and pointer, checks the header/payload values against the
expected RETURN_MSG_* constants, and sets msg_flag on receipt. The
test-specific intel_adsp_ipc_send_message() and
intel_adsp_ipc_send_message_sync() helpers are rewritten to send a
two-word payload via ipc_service_send(), and the synchronous helper
waits on the backend semaphore only when the send succeeds. A dedicated
done callback is registered via intel_adsp_ipc_set_done_handler() to
drive done_flag, and intel_adsp_ipc_complete() now completes RX by
calling ipc_service_release_rx_buffer() and asserting on failure.
Completion polling is aligned with the backend by using
ipc_service_get_tx_buffer_size().
The clock calibration smoke test is adapted in the same way. It now
includes the ipc_service and intel_adsp host IPC backend headers when
using the new interface, interprets incoming data as a two-word uint32_t
payload, validates the length and pointer, and stores the returned
timestamp from the extended payload word into the endpoint private data.
The rest of the test flow, including endpoint registration, timestamp
requests and clock rate checks, remains unchanged but runs on top of the
new IPC backend representation.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch refreshes the documentation in the Intel Audio DSP host IPC
service backend to match the current data model and backend API
contracts.
The updated comments clarify that ipc_ept_cfg::priv must point to
intel_adsp_ipc_ept_priv_data so that the backend can carry state between
the ISR and the application callbacks. They also describe that both the
send and receive paths operate on a fixed two-word uint32_t IPC payload
(header and extended payload) rather than a generic byte buffer, and
that len must always be sizeof(uint32_t) * 2.
The documentation for intel_adsp_ipc_send() is rewritten to explain the
expected payload format, the length and NULL checks performed by the
backend, and how the function programs the IPC registers while relying
on ipc_send_message() for BUSY and TX acknowledgment handling. The
parameter semantics and error returns are aligned with the generic
ipc_service send() hook contract to make the backend behaviour easier to
understand and reuse.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Rework the Intel Audio DSP host IPC service backend to use the generic
ipc_service data/len conventions and the new critical send and buffer
management APIs.
Replace the backend-specific intel_adsp_ipc_msg and related enums with a
simple two-word payload passed through the standard ipc_service_send()
and ipc_service_send_critical() interfaces, and adapt the ISR and
receive callback to operate on this representation.
Use ipc_service_get_tx_buffer_size() as a readiness check for the host
channel and provide hold_rx_buffer() / release_rx_buffer()
implementations so ipc_service_release_rx_buffer() can be used to signal
when the channel becomes available again.
Wire the emergency send path through send_critical() to route urgent
messages via the backend's emergency fast path while keeping the normal
IPC flow unchanged.
Move the synchronous IPC wait logic out of the Intel Audio DSP host IPC
backend and into the common intel_adsp_ipc helper used by tests.
Update intel_adsp_ipc_send_message_sync() to both send the IPC message
through ipc_service_send() and wait on the backend semaphore, and remove
the now redundant ipc_send_message_sync() helper from the host IPC
backend.
Document that intel_adsp_ipc_send_message_sync() is a test-only helper,
not used by SOF firmware, and that it is a candidate for future removal
or for replacement by an explicit synchronous send primitive in the
generic IPC service API or in application code.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Add ipc_service_send_critical() as a dedicated API for sending critical
high-priority messages over an IPC endpoint.
Introduce an optional send_critical() callback in struct
ipc_service_backend so backends can implement a special fast path that
bypasses normal state and busy checks for critical notifications such as
crash reports or fatal errors.
The ipc_service_send_critical() wrapper mirrors ipc_service_send() on
the service side and delegates the actual behavior to the
backend-specific send_critical() implementation.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The pointer to the clock device can be const, as it does never change at
runtime. This moves the const struct device *clock from data to config
struct and initializes it inside the init macro. The __uart_stm32_get_clock
function is no longer needed and removed.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
When initially introduced, the property was kept optional in an attempt
to not risk disrupting downstream users by introducing a required property
they wouldn't necessarily care about. In practice, this is causing
boards contributed upstream to sometimes miss this propery which is
important for boards to show up nicely in the boards catalog, and it is
therefore being made required.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
5 years ago LiteX switched to 32 bit csr data width,
while the option is still available in litex, it doesn't really
work there, even if it can be build, the bios f.e. won't boot.
already described in https://github.com/enjoy-digital/litex/issues/1062
So it is currently only here for designs, that are older than
5 years and for fpgas, where also the fpga bitstream can be updated
it is time to remove the support and require the users, when they wan't
to update zephyr, that they also have to update their fpga bitstream.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The sector erase tests previously asserted for a specific -EINVAL return
code when attempting to erase past the end of the disk. This is too strict
for drivers that report a generic I/O error (-EIO) in such situations,
e.g. the STM32 SDMMC driver, which maps HAL failures to -EIO without
inspecting the precise root cause.
We can also note that the same logic was used in test_sector_write() and
test_sector_read().
This change avoids spurious test failures with targets that legitimately
return non-zero errors other than -EINVAL.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
RTT need to use RAM which is not cacheable as RTT does not support
data cache. Using cpuapp TCM RAM memory section for RTT.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The dt binding file requires the reset pin to be configured
as `GPIO_ACTIVE_LOW`, but the driver uses the
logic of `GPIO_ACTIVE_HIGH`.
Therefore, modify the logic in the driver and add a
migration guide.
Signed-off-by: Yunjie Ye <yun_small@163.com>
Remove empty files from the Raspberry Pi 4 Model B board
directory. These files does not contain any configuration
or build logic.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
The error code returned when nrfx_pdm_start() fails is supposed to
be propagated to the caller.
This was broken by commit 16b9f60, which overwrote the original
error with the result of release_clock(), potentially returning
success even though the PDM start failed.
Restore the correct error propagation.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
After commit 02770ad963 ("debug: EXCEPTION_STACK_TRACE should depend
on arch Kconfigs"), the ARM64_EXCEPTION_STACK_TRACE isn't used any more,
remove it.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Add detailed documentation for the HL78xx auto-baudrate feature,
including:
- auto_baudrate_detailed_readme.md: full description, use cases,
configuration options, and troubleshooting
- auto_baudrate_quick_reference.md: concise reference for presets, Kconfig
options, and supported baud rates
Covers:
- Feature overview and implementation details
- Supported baud rates and Kconfig options
- State machine integration
- Troubleshooting guidance
- Performance and optimization tips
- Integration examples
This improves usability and provides a quick reference for developers
working with the HL78xx modem in Zephyr projects.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Enable HL78XX modem auto-baudrate detection and switching in the sample
application. Set 921600 bps as the target baudrate with fallback options
(9600, 115200, 57600, 38400, 19200). Also read and log the current baudrate
from the modem during startup.
This helps verify and debug communication speed mismatches between the
modem and the device UART.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
The sample previously always queried RSRP, which is not valid when the
HL78xx operates in GSM mode. Use RSSI when GSM RAT is active and RSRP
for other RATs. Update the log output and rename the variable for
clarity.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add support for handling AirVantage WDSI indications in the sample
application. FOTA update progress, download requests, and completion
events are processed and coordinated using a new semaphore. The sample
can restart its connection workflow after a successful firmware update.
Additional updates include:
- add serial number retrieval and logging
- add fota_complete_rerun semaphore and status tracking
- simplify debug logging in event listener and OK handler
- reorganize main loop to support FOTA-triggered reruns
This aligns the sample with the modem driver's expanded AirVantage and
WDSI support.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
The sample no longer requires the POSIX API layer, so the
CONFIG_POSIX_API option is removed from prj.conf. The code is updated to
use the native zsock_* APIs instead of the POSIX getaddrinfo(),
inet_ntop(), and freeaddrinfo() variants.
This aligns the sample with Zephyr’s preferred socket API and avoids
pulling in unnecessary POSIX compatibility layers.
No functional behavior is changed.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Reorganize the sample configuration files for clarity and easier
maintenance. This introduces grouped sections with descriptive comments
and improves consistency between prj.conf and the verbose-logging
overlay.
Main updates:
* Add structured headers for system, UART, networking, modem, RAT,
AirVantage, shell, and logging settings
* Expand verbose overlay with clearer purpose, build notes, and grouped
modem logging options
* Improve readability by aligning comments and collecting related
options
* No functional behavior is changed; this is a documentation and
structure improvement
These changes make the sample configuration easier to understand and
simplify future maintenance.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
This adds an optional auto-baudrate mechanism that improves robustness
when the modem boots with an unknown or changed UART speed.
Key additions:
* New Kconfig option MODEM_HL78XX_AUTO_BAUDRATE and related settings:
- selectable target baud rate
- detection baudrate list
- detection timeout and retry count
- option to persist AT+IPR updates
- option to start diagnostics or boot directly with auto-baud logic
* UART status tracking added to hl78xx_data, including current and target
baud rates
* New HL78XX_MODEM_INFO_CURRENT_BAUD_RATE info field
* New MODEM_HL78XX_STATE_SET_BAUDRATE state with detection and switching
logic
* Chat, init, and diagnostic handlers updated to route failures into the
auto-baudrate logic when enabled
* New helpers: hl78xx_get_uart_config(), hl78xx_try_baudrate(),
hl78xx_detect_current_baudrate(), hl78xx_switch_baudrate()
* Startup delay increased when auto-baudrate-at-boot is enabled
These changes allow the driver to recover from unexpected modem UART rate
changes and keep the UART configuration synchronized with the modem.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add MODEM_HL78XX_EVENT_AT_CMD_TIMEOUT event to distinguish chat scripts
timeouts from other script failures. The chat callback now maps
MODEM_CHAT_SCRIPT_RESULT_TIMEOUT to this new event.
Update state handlers so AT command timeouts trigger the init fail
diagnostic script during startup, and fall back to the power-on pulse in
the init-fail state, similar to existing timeout handling.
This improves error classification and enables more accurate recovery
logic for long-running or stalled AT command exchanges.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Extend modem_dynamic_cmd_send() with a response_timeout parameter to allow
callers to specify the overall script timeout per command. The previously
hardcoded 1000 ms timeout is removed (set to 0 in params) and the script
timeout is now driven by the passed-in value.
Update all internal call sites to provide MDM_CMD_TIMEOUT (in seconds) and
increase the default command timeout from 10 s to 40 s. Several chat
scripts and configuration paths are updated accordingly.
This improves reliability for long-running HL78xx operations and ensures
consistent timeout handling across sockets, RAT/band configuration, APN
setup, PDP activation, AirVantage DM session control, and TLS/TCP/UDP
socket management.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Extend socket-related chat match tables to handle generic "ERROR" responses
for both CONNECT and +KUDP_IND URCs, improving detection of failed socket
creation and connection attempts.
While updating match handling, unify all modem commands to use the standard
OK match set by adding hl78xx_get_ok_match_size(). All remaining users of
the former sockets-specific OK match are switched to the unified helpers.
Additionally, all dynamic command send paths now provide an explicit match
count and use MDM_CMD_TIMEOUT instead of the previous hard-coded `1` for
script timeout, improving consistency and reliability across:
* RAT configuration
* band configuration
* APN setup
* GSM PDP activation
* AirVantage DM session control
* socket send and TLS configuration paths
This brings all command execution onto the same match/timeout model and
ensures ERROR responses are handled correctly during socket operations.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Avoid overwriting cached input state while ISR-deferred work is pending.
Previously, port_get_raw() updated pins_state.input via
update_input_regs(), which could corrupt previous_state used for
transition detection.
Fix by reading input registers directly without updating the global cache.
Signed-off-by: Woobin Song <woobin.song@assaabloy.com>
Add Ethernet configuration for mac and mdio nodes in
stm32h78_dk-common.dtsi.
Disable mac node in .overlay files for tests/drivers/memc/ram
since ethernet drivers that get enabled by it consume sram1
node and thus fail the test.
Update the .yaml files to include Ethernet tag and
update documentation to explain Ethernet usage.
Signed-off-by: Benjamin Klaric <benjamin.klaric01@gmail.com>
Instead of performing a linear search to determine if a given
thread is running on another CPU, or if it is marked as being
preempted by a metaIRQ on any CPU do this in O(1) time.
On SMP systems, Zephyr already tracks the CPU on which a thread
executes (or lasted executed). This information is leveraged to
do the search in O(1) time.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>