Change return value of dwmac_platform_init to int and return error code
in case of failure. This allows to report errors from platform init and
fail the driver probe if platform init fails.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Infineon PSOC4 parts share many ports with a single IRQ line. Using the
SHARED_INTERRUPT handler feature of Zephyr results in a very large IRQ
vector table. Instead structure in DT the idea that the ports are
sharing an interrupt with a sort of pseudo interrupt controller.
This also rectifies the need to ifdef on CAT1C/M0+. I added a note
making it clear that in those cases we likely need to rework the way
interrupts are done anyways as there's secondary interrupt
muxes/controllers involved.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Use IF_ENABLED when possible to keep code indents looking nicer rather
than ifdef's. Rename everything to be ifx (drop the cat1 naming). Drops
the unused intc_prio config member.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Set `Python3_EXECUTABLE` to the Zephyr-wide Python executable when invoking
the TF-M `tests_reg` test build to ensure that the same Python installation
used by the Zephyr build system is used by the TF-M test build process.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Set `Python3_EXECUTABLE` to the Zephyr-wide Python executable when invoking
the TF-M `tests_psa_arch` test build to ensure that the same Python
installation used by the Zephyr build system is used by the TF-M test build
process.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Use doxygen driver_ops commands to properly document the opamp driver
operations and other symbols useful to driver implementers
(e.g. opamp_functional_mode).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Updated the MAX31790 header file to improve documentation for custom
sensor channels and attributes.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Updated the MAX30210 header file to improve documentation for custom
sensor channels and attributes.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Removed the SENSOR_ATTR_MAX30210_UPPER_THRESH attribute as it's likely
a leftover and driver code actually uses SENSOR_ATTR_UPPER_THRESH.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Updated the MCP9600 header file to improve documentation for custom
sensor channels and attributes.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add an early check whether FAT fs is already mounted similar to
littlefs mount command. This fixes a null pointer access if the mount
command is used twice.
Fixes#104777
Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
display_check is sharing same code as sample driver display.
Avoid duplicating the code and directly reuse the sample code for
the test.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Per MIPI I3C spec Table 38, RSTACT defining bytes >= 0x80 are only
valid for get operations (Format 3). Reject attempts to use them with
set (Format 2) early with -EINVAL rather than sending an invalid CCC
on the bus.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The reattach command takes <device> <target> [<old_dyn_addr>], so the
optional old dynamic address is argv[3], not argv[2]. The check also
used argc > 2 which is always true since the minimum argc is 3.
This caused the target device name string to be parsed as a hex
address via strtol, resulting in incorrect old_dyn_addr values.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
i3c_read_to_buffer printed the controller device name (s_dev_name)
instead of the target device name (s_tdev_name) when the target
device lookup failed.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
cmd_i3c_ibi_hj_response used device_get_binding() while every other
function in the file uses shell_device_get_binding(). Use the correct
shell variant for consistent device lookup semantics.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The cancel-and-wait loop uses `while (retry_count--)` with a post-loop
check of `retry_count == 0`. This is broken in two ways:
1. When all retries are exhausted, the final post-decrement wraps the
uint32_t from 0 to UINT32_MAX, so the timeout check never fires and
the error is silently ignored.
2. When the controller goes idle on the last retry, retry_count is
legitimately 0 after the break, causing a false timeout report.
Replace with a simple for-loop and a bool flag to correctly distinguish
between the idle and timeout cases.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
CONF_STATUS1_IBI_DEPTH extracts bits [12:10] from the CONF_STATUS1
register, but cfg0 (CONF_STATUS0) was being passed instead of cfg1.
This resulted in reading the wrong bits and computing an incorrect
IBI FIFO depth.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The IBIR depth field occupies bits [7:6], a 2-bit field, but was
right-shifted by 7 instead of 6. This lost the lower bit of the
field, causing incorrect IBIR FIFO depth calculation for half of
the possible hardware configurations.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The DDR preamble macros were missing parentheses around the shift
expressions. Without them, using these in bitwise OR expressions
produces wrong results due to C operator precedence, since | binds
tighter than <<.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
CMD1_FIFO_DB masked bits [15:8] then shifted left by 8, which always
produced zero when the input is a byte value (0-255) since bits [15:8]
are zero for a uint8_t. The defining byte field is at bits [15:8] of
the command word.
Use FIELD_PREP with the correct field mask to place the defining byte
in the right position.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The #endif comments for CONFIG_I3C_CONTROLLER and
CONFIG_I3C_TARGET were swapped, and the outermost #endif
was missing its CONFIG_I3C_USE_IBI comment.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add missing parentheses around macro parameter `m` in
REV_ID_VERSION to prevent operator precedence issues when
a complex expression is passed.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add device tree nodes for the two Quadrature Decoder (QDC) peripherals
available on NXP MCXNx4x SoCs:
- QDC0 at 0xcf000 with interrupts 124-127
- QDC1 at 0xd1000 with interrupts 128-131
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add the MCUX QDC (Quadrature Decoder) driver component to the
drivers.cmake build configuration. This enables the QDC HAL driver
to be included when CONFIG_QDC_MCUX is enabled.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add driver support for NXP MCUX Quadrature Decoder (QDC) sensor.
The driver provides:
- Position tracking via SENSOR_CHAN_ROTATION channel
- Configurable counts per revolution
- Single phase and normal decoder work modes
- Input filtering with configurable count and sample period
- INPUTMUX integration for flexible signal routing
- Modulo count mode support
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add DAC pinctrl definitions and update the board metadata
to list DAC as a supported feature on the pic32cx_sg61_cult board.
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
Add DAC pinctrl definitions and update the board metadata
to list DAC as a supported feature on the pic32cx_sg41_cult board.
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
Add support for upgrading TF-M applications built from Zephyr v4.0 to
v4.2 to version v4.3 and beyond.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Update the Fixed Virtual Platforms reference URL to point to the
Arm Architecture FVPs download page instead of the general product
overview page.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
There are many lm75 variants differing in temperature resolution.
Typical values are 9, 10, 11, and 12 bit. They all use the same
format (16 bit signed integer with LSB at 1/256 degree C).
Depending on the on the actual variant some of the LSB are not
defined. The new calculation scheme uses all 16 bits independent
on the actual sensor resolution. In the worst this leads to
some pseudo-resolution in case the undefined bits are not
reported as 0 by the sensor.
Signed-off-by: Lutz Dittrich <dittrich@netwake.com>
PR #103203 introduced a regression for mcxw70 builds by incorrectly
moving `HAS_PM` from MCXW72 to MCXW70.
This fix restores the correct configuration.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Move MCUX_FLEXSPI_CLK and MCUX_FLEXSPI2_CLK definitions
to use correct clock ID 0x24 instead of 0x0A, which
conflicts with MCUX_DMIC_CLK. This ensures each
peripheral has a unique clock identifier.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The parameter page is not ECC protected, but can return ECC errors under
some conditions. These errors should be ignored so drivers can
initialize.
Signed-off-by: Atilla Filiz <atilla@fi-tech.be>
The UART async callback was incorrectly using the base buffer address
without considering the offset provided by the UART event data.
This resulted in data corruption or missed bytes during
high-throughput transfers.
Additionally, replaced SYS_FOREVER_MS with a 100ms RX timeout. This
allows the driver to trigger the UART_RX_RDY event for packets smaller
than the total buffer size, preventing data from being stalled in the
hardware FIFO until the buffer fills.
Signed-off-by: Michele Sardo <msmttchr@gmail.com>