Add standardized SCMI protocol common interface functions that can be
reused across different SCMI protocol implementations:
- scmi_protocol_get_version(): Query protocol version
- scmi_protocol_attributes_get(): Get protocol-specific attributes
- scmi_protocol_message_attributes_get(): Query message capabilities
- scmi_protocol_version_negotiate(): Negotiate protocol version support
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Instead of having one "make_thread" function per instance, called through
a function pointer in the instance configuration, save the thread stack
information instead and consume it from shared code in the driver pre-init
function. This makes the driver more readable (less code in the instance
creation macro) and should reduce its footprint impact (since the thread
creation code is no longer duplicated).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support for resetting the LPTIM peripheral to its default state
on initialization. This ensures that any previous configurations
do not interfere with the new settings.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add support for the Zephyr device power management framework to
enable runtime power control of the ADXL345 accelerometer.
This implementation adds a pm_device_action callback that handles
SUSPEND and RESUME actions. When suspended, the sensor enters
standby mode for low power operation. On resume, it returns to
measurement mode.
The implementation follows the standard pattern used by other
sensor drivers (lis2dh, bme280, vcnl4040) and integrates with
the PM_DEVICE_DT_INST_DEFINE macro for automatic PM setup.
Tested on nRF52832 with CONFIG_PM_DEVICE enabled.
Signed-off-by: Tobias Kässer <t.kaesser@gmail.com>
When uart_ns16550_irq_tx_enable() is called and the TX FIFO is already
empty, no new interrupt is generated, causing data transmission to stall
in some cases. This patch introduces a workaround to simulate an ISR
callback if the FIFO is empty when enabling the TX IRQ.
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
Increase the default number of software-limited CAN RX filters across the
drivers. Some of these were chosen quite conservative, requiring custom
configuration for even simple in-tree samples.
Users can reduce the number of available RX filters to reduce RAM footprint
as needed.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Rename Kconfig option CONFIG_CAN_RCAR_MAX_FILTER to
CONFIG_CAN_RCAR_MAX_FILTERS to match remaining CAN driver Kconfig option
naming.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN xmc4xxx Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_XMC4XXX_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the STM32 FDCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_STD_ID_FILTER to CONFIG_CAN_STM32_FDCAN_MAX_STD_ID_FILTERS
and CONFIG_CAN_MAX_EXT_ID_FILTER to
CONFIG_CAN_STM32_FDCAN_MAX_EXT_ID_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the STM32 bxCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_STD_ID_FILTER to CONFIG_CAN_STM32_BXCAN_MAX_STD_ID_FILTERS
and CONFIG_CAN_MAX_EXT_ID_FILTER to
CONFIG_CAN_STM32_BXCAN_MAX_EXT_ID_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the MCUX FlexCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCUX_FLEXCAN_MAX_FILTERS and
CONFIG_CAN_MAX_MB to CONFIG_CAN_MCUX_FLEXCAN_MAX_MB.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN mcp251xfd Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCP251XFD_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN max32 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MAX32_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN mcp2515 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCP2515_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN sja1000 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_SJA1000_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN native_linux driver Kconfig symbols,
renaming CONFIG_CAN_MAX_FILTER to CONFIG_CAN_NATIVE_LINUX_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN loopback driver Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_LOOPBACK_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When parsing AT command responses, empty string arguments were being
ignored if they occur it the end of the response.
This is not only iconsistent behavior, but also causes issues when
parsing responses where we need to know the number of arguments.
For example, the +CEREG response and unsolicited command response which
we need to know if it is response or unsolicited command response to
correctly parse the it, as the first argument will be different.
Example:
Response: +CEREG: 5,4,\"0A0B\",\"FFFFFFFF\",9,0,0,,
Notification: +CEREG: 4,\"0A0B\",\"FFFFFFFF\",9,0,0,,
Here we want to know that response has 8 arguments, not 7, or we will
confuse it with the notification.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Introduce CONFIG_MCUX_OS_TIMER_MIN_DELAY to allow the configuration
of the minimum delay cycles.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
This commit introduces helper functions to avoid having large
#if DT_HAS_COMPAT_STATUS_OKAY ... #else blocks,
improving readability.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
When an invalid GPIO configuration is provided for a wake-up pin on
STM32WBA series, display a series-specific message and return an error.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When an error occurs while attempting to configure a GPIO pin as wake-up
pin, return the error to the caller instead of merely printing a log
message which may not even be displayed.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use the pixelformat information provided by the DSI panel in order
to control the color coding of the DSI host.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
So far the LTDC driver has not be using the pixel-format property
defined in the lcd_controller bindings. This property describes the
format of the panel connected to the LTDC output. It is not to be
confused with the format of the LTDC layers (aka format of data stored
into the framebuffer). The LTDC accepts various input formats while in
most cases only RGB888 is supported for output. RGB666 is also supported
by enabling Dithering however it is not supported currently by the
driver.
Enforce verification of the pixel-format given to the LTDC device-tree
by checking that it matches with the platform supported formats.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The QDEC driver does not use any of the functions implemented in the TIM
LL full driver module (`stm32XXxx_ll_tim.c`), only those provided by the
LL header (`stm32XXxx_ll_tim.h`).
Disable compilation of the unnecessary full driver module.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The RTC driver does not use any of the functions implemented in the LL full
driver module (`stm32XXxx_ll_rtc.c`), only those provided by the LL header
(`stm32XXxx_ll_rtc.h`).
Disable compilation of the unnecessary full driver module.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
STM32H5 series now uses the dedicated `flash_stm32_xspi` driver instead.
Remove all quirks related to H5 in the STM32 OSPI driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When the number of input bits changes, the value in the `CR_DATASIZE`
register should be modified accordingly.
The CRC32_C algorithm does not require the result to be XOR
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
The buffer length check was not updated with the change to the H4 header
push location (changed in 6113230c). As the complete buffer is now
provided, a buffer of length `SPI_MAX_MSG_LEN` is now valid.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The reset gpio field was in the config structure but was not coded
into the initialization path. So, add the appropriate code to handle
the gpio setup when it is defined in the device tree.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Extend the lan9250 driver to support using a local administered
unicast random mac address during init. This follows the device tree
settings for zephyr_random_mac_address from other ethernet drivers
for the added support.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
The SCMI CPU protocol is in fact a vendor extension from NXP. The current
naming used for the CPU protocol definitions (i.e. functions, structures,
macros) follows that of the SCMI standard protocols, which might be
misleading.
Include "nxp" in the name of all of the CPU protocol definitions.
This change was performed mechanically using "git grep" and "sed -i"
with some manual intervention.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
When the firmware wrote data to KBC/AUX output buffer, the hardware
automatically generated IRQ1/12 to notify the host. After the host read
the data, the EC received an output buffer empty (OBE) interrupt to
indicate that the next byte could be written. However, on the NPCX9M7FB,
this mechanism may cause IRQ1/12 to be missed if the firmware write new
data immediately after detecting that the output buffer is empty,
resulting in incorrect behavior.
To avoid missing IRQ1/12, the flow is changed so that it first checks
VWIRE_AVAIL to ensure no pending VW events. If no VW event is pending,
the firmware writes data to the output buffer and explicitly asserts
IRQ1/12 to notify the host. After the host reads the data and the OBE
interrupt triggers, the firmware clears IRQ1/12.
This updated sequence prevents IRQ1/12 from being lost and ensure
correct notification behavior.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
The device_map() is not defined for SoCs with no MMU, add the
device_map() macro when !DEVICE_MMIO_IS_IN_RAM to support building for
SoCs with no MMU.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Allow passing some context to the shell bypass callback function by
providing a void pointer user data argument.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Improve the logic for detecting counter wrap-around events when exiting
low power mode.
Add idle_timer_alarm_ticks variable to track alarm configuration at LPM
entry. Implement comprehensive wrap detection that considers:
- Counter overflow (pre > post)
- Alarm pending with same pre/post values
- Alarm pending when pre + alarm_ticks would exceed counter top value
This ensures accurate time calculation across all counter wrap scenarios
during low power mode transitions.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
- Add new hardware info driver for Microchip G1 series.
- Update Kconfig and CMakeLists.txt to support the new driver.
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
Incorrect symbols were used for detecting nRF5340 Network-specific
reset reasons presence.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>