The remainder of this driver functions when pin control is disabled,
so make the include conditional as well to fully support this case.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
Supply empty vendor specific macros for cases where vendor specific
functions are not needed by driver.
Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
The CRC32 table only needs to be generated once, so prevent it from
regenerating every time as it only required once.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
This enables applications to call timing configuration functions,
which enables more applications to work on native_sim.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Reorganize and update soc folder files for SDK-independance
Reorganize and update hal_bouffalolab files for SDK-independance
Reorganize and update soc dts files for SDK-independance
Update serial and pinctrl driver files for SDK-independance
Update ai_wb2_12f, bl604e_iot_dvk, and dt_bl10_dvk
to new bl60x support
and fixup openocd config of ai_wb2_12f
Signed-off-by: Camille BAUD <mail@massdriver.space>
Add check for supp->current being NULL before accessing num_params in
error log.
Prevent potential NULL pointer dereference and crash when invalid
parameter count
Improve error messages for better debugging in cases with no current
request or wrong param count.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Update the TX data API to support distinguishing if this packet is from
net stack or from internal packet forwarding case.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
XIP may indicate that the program is executed either in local memory
or flash. However, the SPI node is only used as a flash controller
when the program is executed in flash.
Therefore, optimize the related checks to ensure that when XIP is
enabled but the program is executed in local memory, the SPI node
can still be used.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
1. Due to the hardware limitations of the ATCSPI200 IP, the transmission
and reception counts must be consistent. If there is a mismatch in
length, dummy data needs to be transmitted or received.
Under this limitation, using the spi_context_xx related APIs to
determine whether the transmission is complete may cause issues in
certain situations.
Therefore, additional variables are set to record the exact number of
bytes need to be transmitted or received.
2. Also, fix some inaccuracies in configuring DMA transfers.
Signed-off-by: Kevin Wang <kevinwang821020@google.com>
Query the configured data sources for capacity and soc information
before falling back to the composite fuel gauge configuration. This
means the battery properties are no longer required.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Choose whether the data sources should be queried by the generic sensor
channels (`SENSOR_CHAN_VOLTAGE`, etc), or the fuel guage specific
channels (`SENSOR_CHAN_GAUGE_*`).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Instead of explicitly specifying the source for the voltage and current
channels, specify primary and secondary data sources. If the requested
sensor channel does not exist on the primary source, the secondary
source will be tried.
Signed-off-by: Jordan Yates <jordan@embeint.com>
To ensure that data is consistent across multiple sequential calls to
`fuel_gauge_get_prop`, sensor_fetch is only called if a certain time
period has passed since the previous sampling. This emulates the
tick-based sampling of most dedicated fuel-gauge devices.
Signed-off-by: Jordan Yates <jordan@embeint.com>
tick
Create Kconfig variable NXP_INPUTMUX, which selects the fsl_inputmux
driver. Imply the MCUX component symbol from it. Imply that variable
from the NXP PINT, SmartDMA and LPC DMA drivers and from the mimxrt685s
SoC.
This needed to be done for the mimxrt700_evk/mimxrt798s/hifi4 domain, as
the INPUTMUX peripheral handles IRQ assginments and its driver
(fsl_inputmux) is used directly by the domain's soc.c. Instantiating the
currently dependent drivers (for PINT and SmartDMA) isn's possible nor
reasonable on the said target.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Remove cache invalidation after flash write,
cpu should automatically invalidate cache but
for HW erase invalidation needed due to erase
from different bus.
Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
Adjusted drivers to include sources into a single library
to allow for the use of zephyr_library_amend when extending
with out of tree drivers in workspace projects inline with other
driver groups structure
Signed-off-by: Matt Wood <matt.wood@corintech.com>
This adds frontend of arm ethos-u core driver for nuvoton numaker m55m1x.
Special notes include:
1. Leaving application overriding dcache flush/invalidate weak functions
for cacheable NPU buffer
2. Configuring macs_per_cc to 256 in arm ethos-u core driver to match
m55m1x ethos-u RTL config
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
This option allows board configurations to specify how to set the SDIO
pull ups when the SPI bus goes to sleep, using the Infineon WHD.
This is a board specific value.
Signed-off-by: Magpie Embedded <magpieembedded@gmail.com>
For TCP socket, this fixes AT+CIPSEND command with too short timeout.
ESP modem replies SEND OK/SEND FAIL dependent on network traffic
condition, so this timeout config changes as Kconfig option for being
configurable by user.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Allows to configure the alert or therm mode for triggers
based on the low/high temperature treshholds
Also adding simple PM
Signed-off-by: Tobias Meyer <tobiuhg@gmail.com>
Depending on clock config init, some devices might be initialized
with RC_FAST clock enabled but not calibrated. Logic to detect if
clock is calibrated was fixed for this reason. Also, logic to set
RC_FAST and REF_TICK for devices with timer specific clocks (ESP32
and ESP32-S2) was also fixed.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
In Single IO mode, where the clock stretching feature is not available,
the RX FIFO could get overflowed if the TX FIFO was filled with more
dummy bytes than the RX FIFO could receive data items at a given moment.
Such problem could be quite easy hit on nRF54H20, for example for longer
RX transfers (like 8 kB) at 8 MHz.
This commit limits accordingly the number of dummy bytes that can be
enqueued in the TX FIFO.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Fixed build fail since 4c93fcd35b.
Fixed test run fail on Ambiq platforms.
Added Ambiq section in the test.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
Issue: the alarm 1 do not generate interrupt
There are three compare registers in a SAM TC channel:
RA --> alarm 0
RB --> alarm 1
RC --> top_value
By default the RB/TOIB was configured as an input and no longer
generates interrupt.
Set the direction of TIOB to output for alarm 1 interrupt.
Fixeszephyrproject-rtos/zephyr#85018
Signed-off-by: CHEN Xing <xing.chen@microchip.com>
- Add lux conversion to APDS-9306 driver
- Change settings of gain, resolution and
frequency to index-based settings
- Add Device Tree overlay sample for APDS-9306
- Fix wrong board name in light_polling README
- Add value checks for the attribute set API call
- Remove the reading of the sensor attributes
from the sensor and use buffered values instead
- Rename `frequency` property to `measurement period`
Closes#91104
Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
This commit introduces support for the SDHC driver on STM32, enabling
functionality APIs for SDHC host controllers.
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
Even though it's not listed in the options of
icm45686_get_shift(), for completeness sake,
do not leave an unhandled range.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Make the common SPI CS delay property configurable from devicetree. This
can be required for using a nRF54L as a Bluetooth controller, since it
has an additional delay after waking up from the CS assertion until it
is ready to accept and transmit data (see OPS t_START_HFINT).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Although the value currently hard-coded in the driver (10 ms) is quite
high, it may turn out to be insufficient when there is a need to use
some very low SCK frequency, like 250 kHz.
Make the timeout value configurable per-instance, via devicetree.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Configure KSZ8081 phy drivers to set strapping mode override
for RMII mode without setting reference clock to 50MHz when
"RMII 25MHz" operation is selected in device tree node.
Signed-off-by: Daniel Coffey <danielcoffey@carallon.com>
Supplicant sends keepalive on timer expiry but due to driver + nRF70
delays it is delayed to the AP, meanwhile some APs disconnect due to
lack of keepalive.
Set the processing delay to 700ms (based on tests) to fix.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In eth_cyclonev_send(), add a guard to detect if the net_pkt has no data
buffer (i.e., pkt->buffer is NULL) before starting the TX descriptor loop.
This prevents a potential null pointer dereference on frag->data in the
first iteration of the do-while loop.
The previous in-loop check for frag was redundant and misleading: it still
allowed access to frag->data even when frag could be NULL, making the code
both unnecessary and potentially unsafe.
The new check ensures frag is valid before entering the loop, covering the
rare case where net_pkt has no associated buffer.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
If reading the status register fails, the register
`sts` will contain meaningless data.
In such cases, the function should return an error
and not attempt to clear any pending interrupts
with invalid data.
Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
Before this commit size of rx and tx queues was set to 1, which is out of
spec. This commit adds queue logic, ability to set their size and exposes
configuration options w.r.t rx queue interrupts
Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Add support the host I/O over eSPI peripheral channel for private
channel.
The default port number of ESPI_PERIPHERAL_HOST_IO_PVT_PORT_NUM
for ITE SoC is 0x68.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Transition nrf54h away from the soc specific gpd
(global power domain) driver which mixed power domains, pinctrl
and gpio pin retention into a non scalable solution, forcing soc
specific logic to bleed into nrf drivers.
The new solution uses zephyrs PM_DEVICE based power domains to
properly model the hardware layout of device and pin power domains,
and moves pin retention logic out of drivers into pinctrl and
gpio, which are the components which manage pins (pads).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce the NRF GPIO Pad Group device driver and binding. The
pad group device represents the GPIO pads (pins), contrary to a
GPIO controller, which is one of the many devices which can be
muxed to pads in the pad group.
The pad group belong to a power domain, which is not neccesarily the
same power domain as devices being muxed to the pads, like GPIO or
UART. If no ACTIVE device is using any of the pads in the pad
group, the pad groups power domain may be SUSPENDED. Before the pad
groups power domain is SUSPENDED, pad config retention must be
enabled to prevent the pads from loosing their state. That's what
this device driver manages. Once retained, the pad configs and
outputs are locked, even when their power domain is SUSPENDED.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Incomplete iso IN/OUT is just informative and its occurrence does not
prevent the endpoint from actually transmitting/receiving data. Such
"late" isochronous transfers, which are perfectly fine according to USB
specification, were observed on Windows host with nRF54H20 running
explicit feedback sample operating at High-Speed.
The incorrect handling manifested itself with "ISO RX buffer too small"
error message. The faulty scenario was:
* incompISOIN handler does not find any matching endpoint
* incompISOOUT handler disables endpoint, discards buffer and sets
rearm flag
* next DWC2 interrupt handler iteration after reading GINTSTS
* XferCompl interrupt on iso IN endpoint
* XferCompl interrupt on iso OUT endpoint
- transfer was actually happening to the buffer discarded in
incompISOOUT handler
- XferCompl handler modified the next buffer
* GOUTNakEff interrupt, iso OUT endpoint EPDIS bit is set
* EPDisbld interrupt, rearm flag set
- the buffer modified by XferCompl is used and fails because it is
not large enough
Modify the sequence so it accounts for host actions and the above faulty
scenario no longer causes any problems.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Rearm isochronous endpoints when handling incomplete iso out interrupt
to make it possible to rearm the endpoint in time (before SOF),
especially when operating at High-Speed.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Remove build warning when building the posix_arch_console driver with
CONFIG_PRINTK=n and CONFIG_STDOUT_CONSOLE=n.
Fixes: #93790
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>