This is the initial commit to support PINCTRL driver for Renesas RZ/T2L
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
- It seems that the mask variants of GPIO functions are not present in
the latest sdk, so replace those with direct register access.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Introduces the Z_IS_TIMEOUT_RELATIVE() macro to help ensure that
checking for relative/absolute timeouts is consistent. Using this
macro also helps ensure that we get the correct behavior when using
32-bit timeouts (CONFIG_TIMEOUT_64BIT=n).
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Removed nested spinlock acquisition in i2c_xilinx_axi_write to prevent
ztest failures due to invalid spinlock usage.
Ensured spinlocks are not consecutively acquired without unlocking,
preventing potential deadlocks.
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
This driver had some issues with interrupt-driven operation, which
manifested by the console breaking when enabling the Zephyr shell on the
kv260_r5 target for example. Fixed the following:
-Ensure device is fully hardware reset during initialization
-Changed poll_out to be more consistent with other drivers, i.e. only
wait for the UART to accept the character, not for it to be fully
transmitted.
-Added implementation for err_check function, as otherwise there was no
way to detect or clear the error interrupts enabled by irq_err_enable.
-Fixed logic for enabling/disabling interrupts. This should only be done
by explicit enable/disable calls, not as part of fifo_fill etc.
-This hardware does not produce interrupts for TX FIFO empty or RX FIFO
threshold when enabling them if the TX FIFO is already empty or RX FIFO
already contains data. When enabling interrupts in these cases, use a
timer to trigger a user callback to match the normal UART API usage,
similar to the xlnx_uartlite driver.
-Other minor cleanups to interrupt-driven functions.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reset the watchdog back to the initial state before enabling the
expiry interrupt. This prevents the watchdog expiring immediately if
there is a long gap between `wdt_install_timeout` and `wdt_setup`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
- The current code will cause stall if some other subsystem (like subg)
also needs to manage pm states.
- So add a check to only re-enable suspend if it was disabled by PWM.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Guard the neorv32_uart_config_get() function to avoid compilation warning
with CONFIG_UART_USE_RUNTIME_CONFIGURE=n.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
There is a bug here clearly which is that if there is some error in the
transceive function, it returns without releasing the context.
This should be fixed by properly handling the errors with a context release
before returning.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
For multi-byte word, there is clearly a bug in that the same byte is
written to each spot in the word instead of writing all the bytes
properly.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add calibration via a known gas concentration. This is the recommended way
of calibrating the sensor according to the datasheet.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Some SDMA scripts (e.g multi-fifo) updates the buffer descriptor
count field after a transfer is complete.
Re-initialize the buffer descriptor to point to the correct
transfer size for the next transfer.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
With PDM device NXP HAL uses multi-fifo script. In order
for this script to properly work we need to initialize
multi fifo and SW done configuration.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Fix the ASYNC DMA API on the lpspi driver and actually make the entire
driver go through that path. Rather than having an orthogonal
internally synchronous path we can just have both APIs go through the
same asynchronous path and just use wait_for_completion from spi context
to implement either sync or async.
Also make DMA driver default y if dependency (an lpspi having dmas
property) is met.
And lpspi_wait_tx_fifo_empty can be shared between drivers.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Fixes a regression caused by: 88830a3b
The ns16550 driver should handle possibility of
clock_control_on being a stub (i.e. returning ENOSYS)
Signed-off-by: Dominik Lau <dlau@antmicro.com>
- add driver for Vishay VEML6031 High Accuracy Ambient Light Sensor.
- add new compatible "vishay,veml6031".
- read and write consecutive 8 bit registers as bulk operation.
- add driver to build all test of sensors.
- support fetch and get.
- triggered mode and interrupt is not yet supported.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Implement the '.clear' interface in the SDL driver
to allow the upper layers to use the display_clear
function.
Signed-off-by: James Roy <rruuaanng@outlook.com>
Adding a stepper driver implementation for allegro a4979
microstepping programmable stepper motor driver.
The implemenation was tested using the drv8424/api testsuite.
Signed-off-by: Verena Schweinstetter <verena.schweinstetter@zeiss.com>
Add interrupt controller driver support for RZ/N2L
Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Add serial driver support for RZ/N2L
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
This is the initial commit to support pinctrl driver for Renesas RZ/N2L
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
The i2c_transfer() API allows multiple msgs objects to be carried in a
transaction. After handling the current msgs object in the interrupt
context, the driver notifies the calling thread to buffer the next
msgs object and generate the Re-Start if required.
However, if the calling thread is preempted by higher priority threads,
the I2C transaction time may become non-deterministic (depending on the
execution time of higher-priority threads). This commits modifies the
driver to handle msgs objects entirely in the interrupt context to
improve the I2C transfer efficiency..
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
- Added definitions for LAN8742 PHY registers and bit masks
to support auto-negotiation.
- The function `eth_init_api_v2` requires the Ethernet interface
to be properly initialized. In auto-negotiation mode,
it reads the speed and duplex settings to configure
the driver accordingly.
- Implemented functions to get link state and configure speed
and duplex mode based on auto-negotiation results.
- Ensured proper initialization of semaphores and MAC configuration
for both auto-negotiation enabled and disabled scenarios.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Add DMA driver support for Renesas RZ/G3S
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
If the bus is only used I2C we can skip I3C bus initialization which
will send a number of unnecessary CCC transactions.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
The current value of 1s is much too long, default to 100ms instead
which is enough for even a large 4kB FM I2C transfer to finish in
time let alone a typical I3C transfer. Make this configurable in
case projects want to tune this.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
The maximum number of attached devices is limited by the maximum
number of entries in the device address table. For I3C devices
these have to by allocated permanently when devices are attached
but for I2C devices we can dynamically allocate an entry in the
table on a I2C transfer and free it after the transfer is completed.
This allows the maximum number of I2C + I3C devices on a bus to be
larger than the address table size as long as the number of I3C
devices is maxdevs - 1.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
Adds pinctrl support on init and on PM actions. General PM support is added
to the driver to enable the later.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
Working through either Motion detection or through Data-Ready.
Data-ready has a back-up timer to trigger worst case, if no motion
occurs within 10X data-rate.
On every streaming event, the driver checks for the sensor health, and
attempts recoverying its state if it detects issues.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
- Add bus support for SPI (based on RTIO).
- Support read/decode API for one-shot reads on the following channels:
- SENSOR_CHAN_POS_DX.
- SENSOR_CHAN_POS_DY.
- SENSOR_CHAN_POS_DXYZ.
Signed-off-by: Luis Ubieda <luisf@croxel.com>