Update hal_wch.
As the hal upstream changed name, there is now a name conflict.
Rename ch32fun.h to hal_ch32fun.h to fix this conflict.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Add support for 16-channel ADC to cc23x0 SoC. The driver supports the
following conversion modes:
- Single channel | Single conversion,
- Sequence of channels (up to 4) | Single conversion.
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Some RTC clock code introduced is specific to SOC_SERIES_MCXN, and
causes build failures on other SOCs.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
Siwx91x support a specific mode slightly better than the old legacy PS
mode.
This mode has to be set on the NWP boot, so it is not easy to configure
it during the runtime. Hence, this patch only provide a compile time
option to enable it.
Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
We can now implement the get_power_save_config() callback.
Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Added power-save mode support to optimize station wake-up timing
and reduce power consumption. The device currently supports
only legacy power-save mode.
This feature can be tested using the Wifi shell:
- ps: Enable the PS. By default, the device operates in fast
PSP mode.
- ps_exit_strategy: Updates mode if enabled; otherwise, follows
the configured exit strategy when power-save is enabled.
- ps_wakeup_mode: Configures the wake-up behavior.
- ps_timeout: Defines the timeout duration for power-save mode.
Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The default format for ov7670 is currently VGA YUYV and it counts on the
smartdma to reset the format to RGB565 QVGA when get_format() is called.
Recently, set_format() is decoupled from get_format() so this assumption
is nolonger correct.
Set the default format to RGB565 QVGA instead.
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Commit 0e41b07309 ("drivers : flash:
update way to get flash size") changed the way to get flash size from
the LL_FLASH_GetSize() HAL function to the current DT_REG_SIZE() macro.
However, they are not equivalent:
- With LL_FLASH_GetSize(), REAL_FLASH_SIZE_KB returned the *total* size
of the Flash memory, reading it from a ROM register of the CPU. For
example, it was 2048 (2MB) for a STM32H747xI.
- The current DT_REG_SIZE() applies to a flash *bank*, therefore it only
returns half of the total Flash size on dual bank devices.
This mismatch causes issues with the DISCONTINUOUS_BANKS logic below,
incorrectly matching partitions close to the end of the first bank as
appearing to span both and triggering the "range overlaps discontinuity"
check later.
Fix it by doubling the size when appropriate, in the same way it is
already done for the M4 core.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
- Use DEVICE_MMIO_* macros for getting the registers.
- These macros automatically used the proper RAM/ROM address.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Fix regression introduced by dormant state, where the
carrier does not get closed when Cellular Modem driver
is suspended.
Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
Add the device name to the error logs so we can differentiate which
device caused the error and not just which port.
Signed-off-by: Yuval Peress <peress@google.com>
Add support for the Sony IMX335 CSI sensor.
This sensor supports resolution of 2592x1944 in RGGB bayer format
either 10 or 12 bits and using 2 or 4 CSI lanes.
For the time being only 10 bits on 2 CSI lanes is supported via
this commit.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Adds the simplest possible I2Cv1 controller driver for STM32 with the RTIO
interface. Currently only interrupt driven transfers are supported.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Adds the simplest possible I2Cv2 controller driver for STM32 with the RTIO
interface. Currently only interrupt driven transfers are supported.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Co-authored-by: Tom Burdick <thomas.burdick@intel.com>
In preparation of the introduction of the STM32 I2Cv2 RTIO driver, move
some functions that are used in both drivers into a common file.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Rename all functions and macros starting by stm32_i2c_* to i2c_stm32_* to
harmonize the driver.
Reformat some indents for better alignment.
Remove i2c_stm32_get_config function declaration from header since it is
not used.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add an IPC service API for triggering updates of the Nordic IRONside SE
firmware using the IRONside call module.
Co-authored-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Add an IPC service API for booting local domain cores.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Use LL_GPIO_SetOutputPin and LL_GPIO_ResetOutputPin for the STM32
optimized DP functions. This yelds a speedup of the bit-banged interface
from about 585kHz to 640kHz on an STM32C0.
Suggested-by: Mathieu Choplain <mathieu.choplain@st.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Convert the enable, pwm, and retention `gpios` properties away from the
GPIO specifier space to an integer array.
While this is a less specific type than the GPIO property, it has the
advantage of not requiring the PMIC gpios node to be both present and
enabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add support for using native sockets with the connectivity API. This
allows libraries that use the connectivity API to be tested in an
application with real connectivity, without external hardware.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When calculating accel and gyro period for 12.5Hz, the frequency value is
incorrect. Updated to correct value.
Signed-off-by: Yau-ming Leung <ymleung314@gmail.com>
PIN9 of an ICM42688 can be configured as an interrupt output, external
clock input or frame sync output. Pin function can now be set via a sensor
attribute.
Signed-off-by: Yau-ming Leung <ymleung314@gmail.com>
The current procedure to initialize the GPIO is:
If the GPIO is configured as GPIO_OUTPUT and also has the
GPIO_OUTPUT_INIT_HIGH flag, set it to output high; otherwise, set it to
output low.
This may fail if the GPIO is simply configured as GPIO_OUTPUT without
specifying either INIT_HIGH or INIT_LOW, which means it is intended to
preserve the previous status. But in this case, we are currently setting it
to output low.
Fix this by explicitly initializing the GPIO to high or low according to
the configuration:
If the GPIO is configured as GPIO_OUTPUT and also with the
GPIO_OUTPUT_INIT_HIGH flag, set it to output high.
If the GPIO is configured as GPIO_OUTPUT and also with the
GPIO_OUTPUT_INIT_LOW flag, set it to output low.
If the GPIO is configured as GPIO_OUTPUT only,
do not set the output value.
Signed-off-by: Benson Huang <benson7633769@gmail.com>
The AXP2101 chip is a multi functional power chip offering a regulator,
charge controller and a fuel gauge (battery percentage and voltage).
Hereby, the fuel gauge provides much more reliable data compared to using
an ADC.
We implement minimal support for this chip (connected state, voltage and
gauge) and bind it to the fuel gauge subsystem.
Closes: #89158
Signed-off-by: Felix Moessbauer <felix.moessbauer@gmail.com>
led_context.h contains a single struct with max and min period, current
drivers that use it have hardcoded values and they set it at init.
This data is not used anywhere, and it makes very little sense to use
some SRAM for it.
Hardcode the limit for each driver and drop the struct and file.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add threshold attribute handling to set low and high
temperature at runtime and validation for runtime changes
Signed-off-by: Tobias Meyer <tobiuhg@gmail.com>
Sort alphabetically the header added in the previous few commits
as well as the original implementation.
Signed-off-by: Josuah Demangeon <me@josuah.net>
When the FPS value stored in data->frame_rate is zero, a division by zero
occurs. Fix it by clamping the frame rate between min and max values.
Signed-off-by: Josuah Demangeon <me@josuah.net>
The documentation of k_work_cancel_delayable_sync() states that the input
k_work_sync parameter needs to be valid until the function call returns,
so there is no need to preserve the state across successive calls.
Now that there is a single work-related field in the struct, rename it
to simply "work".
Signed-off-by: Josuah Demangeon <me@josuah.net>
This complements the 32-bit RGB (XRGB32) test pattern with an equivalent
24-bit RGB (RGB24) implementation.
Signed-off-by: Josuah Demangeon <me@josuah.net>