struct i3c_ccc_address is intended to match the output where the address
is left shifted by 1 for SETDASA and SETNEWDA. Require the operations
calling it to shift the data.
add an additional parameter for the setdasa function which will allow for
the da to be configured rather than being hard coded.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Use the quirk to keep only the necessary clocks running when the core is
hibernated. The quirk is necessary to bring the USB suspend current
below the USB 2.0 suspend current limit.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Make it possible to have vendor quirks after hibernation entry sequence
and before hibernation exit sequence.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Initialize PHY as part of controller init sequence.
Disable 2M and coded PHYs for now, as they cause issues on devices
that don't support them. This should be made configurable in the future.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Fix the chip select when using the synchronous API with DMA path.
Note need to use TxDataRequest flag instead of ModuleBusy flag now
because module busy flag will not deassert until PCS deasserts.
This does not fix CS for the non-DMA path, because that would require a
large driver rework.
Do not skip configuration when calling transceive with the same spi_cfg
because we need to write a new command word.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Update the GPIO driver to use PDL API instead of HAL API to fix the
issue with configuring interrupts on both edges
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Remove Kconfig option that no longer has any use after pinctrl
driver is introduced.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This is a leftover from pre-pinctrl era and no longer makes sense.
Driver always manages gpio through pinctrl.
Support removed from uart and uarte shims.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The suspended flag is checked during SOF and RESUME interrupts, and it
is modified within a delayable work item. To prevent race conditions,
this update ensures that interrupts are disabled (locking IRQs) before
modifying the suspended flag. Additionally, the RESUME interrupt is
enabled only when the USB is suspended.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
According to USB 2.0 Specification the remote wakeup device must hold
the resume signaling for at least 1 ms but for no more than 15 ms. The
DWC2 otg controller requires the software to drive the remote wakeup
signalling for appropriate duration (when LPM is disabled, which is
currently always the case in udc_dwc2). Arbitrarily choose to drive the
resume signalling for 2 ms to have sufficient margin in both directions.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The PMU is not reset by core reset and therefore it is necessary to exit
hibernation on DWC2 disable to prevent endless PMU interrupt loop when
the driver is enabled again.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Enter hibernation in thread context with the lock held to make sure to
not queue any transfers when the core is hibernated.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
UDC API handlers and DWC2 driver thread share not only software
constructs, but also the underlying hardware. Ensure that any UDC API
call is not preempted by DWC2 driver thread (and vice versa) by
acquiring the lock in thread handler.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
When the queue is full, all messages posted inside interrupt handlers
are simply dropped. This problem can be remedied by having the message
queue large enough, but determining the maximum number of messages that
can ever be posted in the system is really complex task.
Hopefully in DWC2 driver there is finite number of events that have to
be processed inside thread handler. Therefore it is unnecessary to
determine the maximum queue size for the events if the events are posted
to k_event object instead of send to k_msgq object.
Use combination of three k_event structures to handle all possible event
sources. This not only guarantees by design that no event will be lost,
but also slightly reduces the memory usage.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The code path for error handling and timestamping in tx path
was meant to be identical in function to old eth_mcux driver,
but there is actually a discrepancy causing no error handling
for timestamped frames, fix it.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Make sure to stop timer counter before interrupt is cleared,
otherwise it might re-trigger it due to default interrupt level mode.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
There is a lot of repeated code for parsing arguments. Add a function
to do the same in every place.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add i3c_bus_for_each_i3cdev and i3c_bus_for_each_i2cdev to more easily
iterate through each i3c or i2c device on the bus.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Some comments were not updated following the change in how uncached
memory regions are defined in devicetree.
Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
The `LOG_ERR` will spam the log if the window is low e.g. 1 ms.
Also the PWM capture callback will be called with an error, which allows
handling and logging the error if desired.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
The STM32 DMA driver can provide interrupts for transfers not yet complete.
However, the current implementation will clear the busy flag for all
interrupts when CONFIG_DMAMUX_STM32 is not enabled. The previous fix for
when CONFIG_DMAMUX_STM32 is enabled should also apply when not enabled.
Also if CONFIG_DMAMUX_STM32 is enabled busy flag will not be cleared when
error interrupts occur.
With this change, the busy flag is only cleared when completion interrupts
in non-cyclic mode or error interrupts occur. These are the cases where
transfer will not continue.
Signed-off-by: Carson Green <cgreen@tuta.com>
The clocking code present inside the NXP I3C is SoC specific.
This has been moved to the SoC folder which makes this driver
more flexible to clock architecture variations between SoC's
and SDK driver clock API variations.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Add Data Memory Barrier during the extended calibration of STM32U5, as it
is done in STM32Cube HAL, to avoid sporadic errors during calibration that
may result in measures that are offset from real values.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Renamed soc from ace30_ptl to ace30.
We were previously using the wrong soc name.
The correct name is ace30.
There is only one ptl platform, but there can be several ace30 platforms.
Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
This commit enables the user to choose whether to
allocate the video buffer from the video heap pool
or use a memory region with specific extra capabilities,
such as being cacheable/non-cacheable or using external
memory.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Common pwm driver for MAX32xxx MCUs
Co-authored-by: Mert Ekren <mert.ekren@analog.com>
Co-authored-by: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Separating declarations of variables not referenced with #ifdef
when CONFIG_IIS328DQ_THRESHOLD is disabled.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
The CONFIG_PINCTRL setting is removed from the board
_defconfig files. And "select PINCTRL" is added to
the appropriate driver files.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
The buffered and internal options were not assigned in the channel_cfg,
so they would end up at a random state.
The cfg struct is now properly zero-initialized and both options can
be set using optional parameters -b and -i.
Fixes#75884
Signed-off-by: Martin Jäger <martin@libre.solar>
The driver enables the clock of a gpio-port if any of the
pins use the port. This is done by calling pm_device_runtime_get
when a pin is used and pm_device_runtime_put when the pin is not
used anymore.
These calls needs to be balanced. But if a single pin was configured
as GPIO_DISCONNECTED multiple times, every time pm_device_runtime_put
was called.
This caused the clock of the port to be stopped and therefore also
other pins on the same port stopped working.
This commit fixes this by keeping track of which pin on a port
has requested the clock and only call pm_device_runtime_get or
pm_device_runtime_put when the clock-request for the specific pin
changes.
Fixes#77698
Signed-off-by: Jeroen Broersen <jbroersen@interact.nl>
The I2C transfer API has been recently changed to always automatically
set a STOP on the last message, which was well documented but
implemented only by few drivers.
Unfortunately, while documented, this is a change in the current
behavior and it turns out that some applications depended on it for some
complex operations.
Add a flag to temporarily restore the old behavior, buying time to fix
the application code depending on this.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add bool value that stores the CC change information received in
the interrupt of TCPC alert line. In sink role when in disconnected
state, polling the CC lines causes the chip to be awaken from sleep
mode increasing the power usage. When partner is connected, or any
other CC lines change happens, the chip informs about it with alert.
It can be cached and used instead of asking the chip directly.
Signed-off-by: Michał Barnaś <barnas@google.com>
Add support for VBUS measuring part of the TCPCI compliant device.
This device should be used as a child-node for the more specific
TCPC driver and referenced by the vbus property in the usb-c
connector node.
Signed-off-by: Michał Barnaś <barnas@google.com>
Add generic functions that will be common to all TCPCI compliant
drivers like registers reading, writing and updating.
Signed-off-by: Michał Barnaś <barnas@google.com>
Only ADC_REF_INTERNAL reference option is allowed in
adc_mcux_adc16 driver, but the reference is not used
for driver configuration. Internal, external or VDD
can be used in reality depending on SoC type and
its configuration.
Remove the reference option check to allow any reference
option from Devicetree.
Signed-off-by: Michal Smola <michal.smola@nxp.com>