Apply PINCTRL_STATE_SLEEP on suspend and PINCTRL_STATE_DEFAULT
on resume. If a sleep pinctrl state is defined in the board DTS,
pins will be reconfigured on suspend. If not defined, the call
is a no-op.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Apply PINCTRL_STATE_SLEEP on suspend and PINCTRL_STATE_DEFAULT
on resume. If a sleep pinctrl state is defined in the board DTS,
pins will be reconfigured on suspend. If not defined, the call
is a no-op.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Apply PINCTRL_STATE_SLEEP on suspend and PINCTRL_STATE_DEFAULT on resume
so that pins are in low-power configuration if defined in the dts
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Apply PINCTRL_STATE_SLEEP on suspend and PINCTRL_STATE_DEFAULT on resume
to ensure pins take on the DTS defined sleep state if one is defined.
TURN_ON already applies PINCTRL_STATE_DEFAULT (could be removed
potentially). RESUME handles the case where the device suspends without
full power-off.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Apply PINCTRL_STATE_SLEEP on suspend and PINCTRL_STATE_DEFAULT on resume
so that pin configuration is updated for low power modes.
Previously the suspend and resume actions were empty, leaving pins in
their active configuration during sleep. On SoCs like RW6xx where pad
control registers survive low power modes, this allos boards to define
sleep pinctrl states with appropriate pull or drive setting s to minimize
leakage.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Fix broken FS26 watchdog field extraction and refresh checks.
Correct the device status macro, simple watchdog write error
handling, related register field helper macros, and use integer
duty-cycle values when selecting the watchdog window.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
implement configure_ramp api
drop set_max_velocity and set_max_acceleration from
stepper_tmcm3216.h
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Function for calculating acceleration in the timebase of
the motion controller using clock_frequency and input
acceleration in Hz/s
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Make usage of the macro VIDEO_FMT_IS_YUV/RGB/BAYER in order to
check the colorspace of a format.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add categories of pixel formats along with macros to detect
whether a pixel format is part of that category.
This can be used to detect multiple properties in a
maintainable way.
Signed-off-by: Josuah Demangeon <me@josuah.net>
When writing a full-screen with a single buffer, stm32_ltdc_write() calls
stm32_ltdc_sync_frame() which resets the semaphore, sets the given buffer
to pend_buf, enables LTDC line interrupt and waits for the semaphore to be
given. However, the semaphore is never given by stm32_ltdc_global_isr()
because it skips given it when front_buf != pend_buf which is the case
because they are the same because there is just a single buffer and
front_buf == pend_buf.
The solution is not to call stm32_ltdc_sync_frame() when the same buffer is
used.
Signed-off-by: Ilia Kharin <akscram@gmail.com>
When stm32_ltdc_sync_frame() is called, it resets a semaphore, enables LTDC
line interrupt and waits until the semaphore is given. When the interrupt
occurs, stm32_ltdc_global_isr() is invoked and it gives the semaphore only
when front_buf != pend_buf. That is, if stm32_ltdc_sync_frame() is called
with pend_buf equal to front_buf, it would wait forever for the semaphore
to be given. Hence, a deadlock occurs. In order to catch such situation,
an assert is added in stm32_ltdc_sync_frame() when it's called with
pend_buf which is equal to front_buf.
Signed-off-by: Ilia Kharin <akscram@gmail.com>
1.The color_coding in mipi_dbi_config shall not be extracting it from
the bus_type field and shall have dedicated color_coding field.
2.Update device tree binding to include pinctrl support and
declare mipi-dbi bus compatibility.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Removed the driver knowing anything about what color each channel is.
When you output to an LED with a buffer it simply writes the
channels out with buffer.
Also removed the assumptions that the leds are either
a) RGB or b) 3 channels and instead use them the way they are defined.
That is for example if we have 4 channels, we could define an LED
with just one color in it and we could define another with three.
The user can define 4 leds each with color yellow.
For each LED it counts how many buffers were used by previous LEDs and
starts there and outputs N channels.
Decided it looked cleaner to use helper function write channels, so
implemented it and added it to the call table.
Updated sample:
It manually computes which channel maps to red, green and blue and then
uses those indexes to map the table of colors to the right channels.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
more refactoring, don't use the 94 registers everywhere.
Introduce structure, with registers and fixed values, and use it.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
In preparation to allow this driver to support more than
one IS31FL319x object such as ...97, rename the
source file and the functions to make them more
generic.
I also changed the enumeration/creation of object
to generate the right names for the current 94 objects
Renamed the Kconfig file. Updated CMakeLists.txt to
check for different condition to build source file
The samples driver is31fl3194 was also renamed to
is31fl319x. All of the references to use 9x instead
of 94. The updated sample required an update to the
doc script redirect.py to reflect the new name.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Allow STM32 RTC driver to call LL_RCC_EnableRTC() for STM32WB0x series
now that the function is defined in WB0x HAL v1.3.0
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add input drive TSI (Touch Sensing Input) peripheral.
The driver uses a delayed work queue to periodically scan enabled
channels and reports touch/release events through the input API.
Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
Add explicit clock configuration and enable calls during driver
initialization.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Add display driver for NXP i.MX LCDIFV2 controller.
The driver supports:
- RGB565, RGB888, and ARGB8888 pixel formats
- Configurable framebuffer allocation (0-2 buffers)
- Partial display updates when driver framebuffers are enabled
- Display blanking control
- Backlight GPIO control
- Pinctrl integration
- Cache coherency support via MCUX cache API
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
The i2c_rts5912_recover_bus kicks in after an i2c transfer error to
recover the bus and uses the i2c pins in gpio mode. This MCU allows
using pins in a 3.3V domain at 1.8V by setting compatible input
thresholds, the problem though is that then if the pin is set to
push-pull output it's going to drive back up to 3.3V.
Avoid that by setting the pin as open drain before setting it as output.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Replaces usage of these deprecated macros with ones that support
fixed and mapped partition compatibles. Also includes an update to
hal_espressif which also (rightly or wrongly) has zephyr specific
code in it
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
For Cortex-A Core, Zephyr runs on non-secure world, the bit in PCNS
or ICNS for corresponding GPIO pin is 1, no need to clear it and
Cortex-A Core could access the corresponding pin's regitsters, so
disable this feature for Cortex-A Core.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Defining `__soc_handle_irq` (part of the code path run on every
interrupt) as a jump to `get_irq` introduces unnecessary latency to
interrupt handling and inflates code size. Since `get_irq` is not
otherwise called, rename it to `__soc_handle_irq` and delete the old
trampoline.
The signature of the function is changed to match the declaration of
`__soc_handle_irq`, which is possible since commit
495a3281d4679c19703810afbac9607d16ac6788 corrected its declaration.
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Replace the single-instance assumption with a zephyr,system-timer chosen
node approach. The timer driver reads its hardware instance directly from
DT_CHOSEN(zephyr_system_timer) instead of assuming instance 0. The
counter driver skips whichever instance is designated as the system timer,
allowing both drivers to coexist on SoCs with multiple LPTMR instances.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
These macros are private to the net subsystem, let's not use them in
drivers
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These macros are private to the net subsystem, let's not use them in
drivers
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These macros are private to the net subsystem, let's not use them in
drivers.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a retry mechanism for the RPMC OP2 command in the eSPI TAF NPCX
driver. If the OP2 command returns a status indicating that the device
is busy, the driver will retry the command up to 3 times.
Signed-off-by: Aditya Bhutada <aditya.bhutada@intel.com>
Use the common touchscreen configuration and replace manual ABS
reporting with input_touchscreen_report_pos() to align with the
Zephyr input subsystem helpers.
Add the touchscreen-common devicetree properties screen-width and
screen-height to in-tree nodes using this controller.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
The internal I2C helper functions max98091_read_reg,
max98091_write_reg, and max98091_update_reg were ignoring the
return values of the underlying I2C driver calls. In the event
of a bus error or NACK, this led to silent failures where
hardware configuration would appear successful despite failure.
This commit evaluates and logs the return codes for all three
helpers to improve driver serviceability and resolve static
analysis warnings.
Fixes#92594
Signed-off-by: David J. Leach, Jr. <tasmar@gmail.com>
Set DMA_TCD_QUEUE_SIZE default to 4 when I2S_MCUX_SAI is enabled.
The MCUX SAI driver preloads 3 RX DMA blocks and requires the TCD
queue size to be greater than 3 to satisfy its BUILD_ASSERT and avoid
build failures in MCUX SAI I2S configurations.
Fixes#103997
Signed-off-by: Hake Huang <hake.huang@nxp.com>
Add a Kconfig option to configure the RX refill thread priority.
The default is set to 0, which is the same as the previous hardcoded
value. This allows users to set a different priority if needed.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Thread priority was passed to options argument of k_thread_create,
instead of the priority argument.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Using different, more appropriate, error code in
case of timeout, to differentiate from regular EIO.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
The driver was using a packet count value read directly from the
hardware to control a loop bound and a register read size. If the
hardware reported a value exceeding the internal buffer size, it
could lead to a buffer overflow or an untrusted loop bound.
Add a check to cap the packet_count based on the actual size of
the driver's FIFO data buffer.
Fixes#90512
Signed-off-by: David J. Leach, Jr. <tasmar@gmail.com>
H5 series SoCs have a similar Ethernet MAC to the H7 series,
but with some differences with respect to configuration of phy
interface type. As they use a Cortex-M33 core, they have no cache,
so that dma descriptors are always in non-cached memory.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
H7RS series SoCs have a similar Ethernet MAC to the H7 series,
but with some differences with respect to configuration of phy
interface type.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Configure phy connection type to value specified in device tree.
Utilize definitions from STM32 Low-Level APIs instead of open coding
values.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The IS_ACCEL macro checks if a channel is within the accelerometer
range. Because SENSOR_CHAN_ACCEL_X currently evaluates to 0 and
the channel type is unsigned, Coverity flags this as a redundant
comparison.
Added a coverity[unsigned_compare] annotation to silence the warning.
This preserves the macro's logic, ensuring the check remains valid
even if the underlying enum order is modified in the future.
Fixes#100002
Signed-off-by: David J. Leach, Jr. <tasmar@gmail.com>