Since I expect that the drivers will need to read this version ID maybe
multiple times, instead of repeatedly doing so over the peripheral bus,
it is probably worth it to store a byte in RAM representing this
version. The behavior of the LPSPI is fairly significantly different
between versions. Not enough to warrant separate drivers but enough to
need a few workarounds or different code branches depending on this.
Also, the interrupt based driver is currently using a wrong macro to
read this, and that is a bug.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Clarify at the top of the common lpspi file what is the purpose of the
file to be clear to future developers that this file is not supposed to
make any assumption about a particular implementation of the zephyr API
using the LPSPI, because I imagine it could be very likely that more
lpspi implementation will be done in the future to make different
tradeoffs than the current two. Also the current two are different
enough that we should avoid making assumptions even if they currently
hold for both because they might not always, as things change.
We should disable interrupt events while configuring the LPSPI
regardless of implementation. The specific implementation should enable
the interrupts it needs on its own transceive implementation.
Also clarify and simplify some code in the configure function. Namely,
we no longer need to check if we are already configured to write to
registers because a recent commit made it so that we clock the
peripheral from the zephyr driver init instead of upon the MasterInit
call on the SDK. There is also a redundant CR write which I have removed.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The sleep-output property is no longer used. This results in the sleep
bit to be always cleared. Delete this code so we can retain any sleep
mode configuration done.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Implement the HDLC over SPI adapter driver to support the Openthread RCP
with SPI communication.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Registers driver with pm_device_driver_init(); implements TURN_ON,
SUSPEND and RESUME. Sets ODR = 0 on suspend per datasheet
Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Use the HWINFO API for getting the unique mac address, and use the
pre-existing hardcoded macros as fallbacks if hwinfo is not implemented
properly.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The DHT driver incorrectly assumes all sensor instances are the same
type as the first instance (dht@0). The data parsing logic uses a
hardcoded check of the devicetree property for instance 0, which
causes incorrect readings when different sensor models (e.g., DHT11
and DHT22) are used together.
This change stores the model type in each per-instance config struct
during initialization. The data parsing logic is updated to use this
per-instance flag, ensuring each sensor is handled correctly
according to its specific model.
Signed-off-by: John Shelton <moosery@gmail.com>
Fix radio IRQ priorities. With the Controller update from SiSDK,
its behavior changed so that it overwrites the IRQ priorities.
Reconfigure the priorities after the Controller is initialized.
Source interrupt numbers and priorities from devicetree.
Also set the SYNTH IRQ priority on all HW, and set either the
RDMAILBOX or HOSTMAILBOX IRQ depending on which one exists.
Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Refactor the controller init to use the new init routines the
controller now provides. Instead of using a hardcoded set of
features, the features are now initialized based on Kconfig
values that the application selects.
Add config files under modules/hal_silabs, used by the controller
init routines in the external module hal_silabs to determine which
features to enable based on Kconfig options. This brings the
controller feature configurability to roughly parity with the
Simplicity SDK.
Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add a missing break statement in the pm_action function to ensure that
PM_DEVICE_ACTION_RESUME is not treated as an error.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
To reduce low power current value, added host sleep handshake
enhancement. If CPU3 is wokenup by WLAN, do host sleep handshake with
CPU1 as before. For other wakeup sources, skip host sleep handshake.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
The fractional part of the qdec sensor readout is set to zero (val2 =
0).
Changed the format of the run time data to Q26.6 and adjusted the
assignment of val1 and val2 accordingly.
Signed-off-by: Juraj Lieskovský <lieskovsky.juraj@gmail.com>
SHIM Nordic modification for the ADC driver controlling the SAADC
peripheral. Replaced HAL based implementation in favor of nrfx driver.
As a next step, it is planned to implement a feature that will allow
the peripheral SAADC timer to be used for sampling, and for this it is
necessary to use the nrfx driver in this SHIM.
This will allow more accurate and faster sampling than the kernel
mechanism currently provides.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
New control transfer is started prematurely from device perspective when
host timeout occurs. Any data transfer from previous control transfer
have to be cancelled prior to handling SETUP data. Unconditionally
disable control IN endpoint to prevent race for enqueued buffer between
udc_buf_get_all() called in dwc2_handle_evt_setup() and udc_buf_peek()
called in dwc2_handle_in_xfercompl().
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Texas Instruments MSPM0 series supports device id fields with
various part information and also resgister to hold reset reason.
Reset cause register will defaults to 0 after first read.
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
The EDAC shell code previously contained a number of references to the
Intel IBECC driver. Make the shell code more generic to the defined EDAC
API, and make IBECC-specific code dependent on its config option.
Also make NMI control dependent on X86 as it is specific to that
platform.
Rather than looking for a node labeled "ibecc", the EDAC shell code
now simply requires that a chosen entry for "zephyr,edac" be present to
point to the desired device. The Intel Elkhart Lake DTS has been updated
to add this alias.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Add an EDAC driver for the Synopsys DDR memory controller, used in the
Xilinx MPSoC (ZynqMP) devices, to allow monitoring for ECC errors.
Note that currently only the compatible string used for the ZynqMP
(shared with Linux) is currently supported. Support for other Synopsys
core implementations can be added in the future.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
When reconfiguring the SSP, some changes do not immediately take effect
in particular changes to the clock polarity are not applied. Disabling
and re-enabling the SSP forces the new configuration to take effect
immediately.
Signed-off-by: George Norton <george_norton_uk@hotmail.com>
Corrected the timeout condition in the ti_adc_sequencer_start function
to ensure proper timeout handling during ADC sequencer operations.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Ensure proper release of memory slab when dmm_buffer_in_release fails in
the event_handler function.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
For a long time (since version 3.3.0) nrfx contained an incorrectly
defined symbol NRF_SAADC_8BIT_SAMPLE_WIDTH that was set to 8 for nRF54L
and nRF54H Series SoCs, which was probably only true for very early
engineering revisions of those. Based on this, the adc_nrfx_saadc driver
was incorrectly writing consecutive 8-bit samples in supplied buffers,
cutting off the highest 8 bits of the results. And for sequences with
multiple channels, it was even causing that the results written as
16-bit words by hardware were partially overwritten in next iteration.
In nrfx 3.12.0 (see commit f46798fa55)
this was finally corrected - the symbol is now deprecated and it is
always set to 16. This commit is a follow-up to the above and removes
parts of adc_nrfx_saadc that now became dead code to prevent further
confusion regarding 8-bit sampling.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
When set 'wifi reg_domain' CMD, need to create and download countryinfo
to sync driver and FW for embedded supplicant case
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Instead of using 32 bit enum values for event numbers, convert
the code to use 64 bit long bit fields. This means that the
user API is changed to use 64 bit event values instead of 32
bit event values.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This change will allow the VIRTIO-MMIO register definitions
to be shared.
Additionally, the register names from Ver1 were being used,
even though the implementation was based on the Ver2 specification.
Also, I addressed this issue.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
The `end` variable should be calculated based on the device's register
size, not the address. Probably never caught before as user typically
provides a buffer of reasonable size...
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
While it would likely not directly cause issues with the current
implementation, the logic of turning off the sensor should be to
actually reset the flags, not to toggle them.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Updated the CONF_STATUS0_DEV_ROLE macro to ensure proper bitwise
operation by adding parentheses around the bitmask operation.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>