The flash latency needs to be configured before switching to the high
speed clock. Set the latency based on the CH32V003 and CH32V00x
reference manual.
Signed-off-by: Michael Hope <michaelh@juju.nz>
Expand the current systick compatibility to include the CH32V00x
series. Change the HAL compatibility to include all of the CH32V
family.
Signed-off-by: Michael Hope <michaelh@juju.nz>
The CH32V006 and others in the CH32V00x series are an evolution of the
CH32V003 and use different remap offsets for the various peripherals.
In the same way as the CH32V20x, fork the CH32V003 driver and add
CH32V00x support.
Signed-off-by: Michael Hope <michaelh@juju.nz>
This commit adds a padding of 0x10 bytes at the beginning of the
`gpio_davinci_regs` structure to correctly align the register
definitions with the actual register layout.
Previously, the DTS had to manually offset the base address by
0x10, introducing a special case in Zephyr's Davinci GPIO driver.
This change eliminates the need for that workaround
Adding the paddingi also help to maintain a similarly with also
to the linux counterpart.
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
1. rework IOM cmdq buffer instantiation
2. rework spi and i2c cache handling as it is incorrect.
3. buffers need to be aligned with DCACHE on
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The previous implementation already reported a key-press event after
reading an ADC value close to the threshold for the first time.
This may lead to false events if the ADC takes a reading just during
the transition from one button state to another (especially if a
somewhat large capacitor is used to avoid noise).
A key-press state must be same for at least two samples in order to
avoid such issues, which is what this commit implements.
Signed-off-by: Martin Jäger <martin@libre.solar>
The Microchip CAP12xx series has a configurable sensitivity and
can drive an optional guard signal to reduce noise sensitivity.
Signed-off-by: Jeremy Dick <jdick@pivotint.com>
To improve code clarity, use `shell_print` in place of `shell_fprintf`
with `SHELL_NORMAL` where appropriate.
For partial-line outputs, use `shell_fprintf_normal` to preserve output
formatting.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Make `sensor_channel_name` and `sensor_attribute_name arrays` to use
`const char *const`. This ensures full immutability of the tables,
placing them entirely in the `.rodata` section and reducing usage
of the `.data` segment.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Aligned the `struct shell *` argument name from `shell_ptr` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Aligned the `struct shell *` argument name from `shell_ptr` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The PWDWN_CTLx have been adjusted to support for NPCK chips. This
commit updates powe-down control initialization for NPCXN and NPCKN chips.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Add support for using the diag0 pin as an interrupt source. This
allows event detection via diag0 interrupts instead of polling rampstat.
The driver now:
- Configures diag0 when the GPIO is available
- Sets up GPIO interrupt handling for rising edge transitions for
rampstat reading
- Falls back to polling only when diag0 is not available
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
Simplified by removing redundant options and
enabled automatic fallback to ramp status polling when
diag0 pin is unavailable for event detection.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
This fixes several ways to hang the driver, such as:
- typing too fast
- going over the read buffer capacity
- pasting anything
- using arrow keys (sending 2 chars at once)
etc
Signed-off-by: Camille BAUD <mail@massdriver.space>
Change the base address of GPIO and pinctrl voltage selection
The new base address enables more pins to support voltage selection.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
The commit `1f73ca3` clarified that a scan time of 0 should be used to
apply the default scan timeout, as opposed to using
SL_WIFI_DEFAULT_ACTIVE_CHANNEL_SCAN_TIME, which incorrectly results in
a 65-second timeout.
However, this fix was unintentionally omitted in commit `bf22b61`
when the `sl_si91x_configure_timeout()` function was relocated.
This commit restores the behavior.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Implemented logic to detect changes in key Wi-Fi parameters (SSID, PSK,
security, channel) and disable the interface accordingly. For STA mode,
the driver disconnects before reconnecting with updated parameters. For
AP mode, it disables and re-enables the AP if changes are detected.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Relocate the functions siwx91x_status(), siwx91x_disconnect(), and
siwx91x_ap_disable() to improve code structure and accessibility. This
reorganization prepares the codebase for upcoming integration of
connection and AP enable logic that handles parameter differences.
No functional changes are introduced in this commit.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Fixes trivial typo
Co-authored-by: Harry Martin <48959255+Harry-Martin@users.noreply.github.com>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add the MSPI controller support for apollo5x.
Add the MSPI controller to mspi API test.
Updated west.yml for hal updates.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
1. Moved ambiq specific macro to mspi_ambiq header.
2. Always fill rx&tx dummy settings regardless of transfer direction.
3. Add the CONFIG_MSPI_* macro for optional features.
4. Fixed the ID read process and add k_sleep during busy_wait in
atxp032 driver.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The display_blanking_on description states that if available,
backlight should also be disabled / enabled on driver blanking on / off.
Moreover, upon driver initialization, the display blanking (hence
backlight state as well) should be same as if display_blanking_on
had been called.
If nothing can be done by the LTDC driver (no backlight and no
panel blanking) then -ENOSYS is returned.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add an implementation for the Ethernet API's set_config
hook. Supported features:
- change MAC address at run-time
- enable/disable promiscuous mode if enabled at system level
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
This driver was setting all GPIO lines to input and the data register to
zero on initialization. This does not appear to be common practice among
other GPIO drivers, and in fact caused a serious problem on the ZynqMP
platform, where between 1 and 4 of the top-most GPIO lines are
frequently used by platform firmware and Vivado as reset lines for the
programmable logic. Since these resets are active low, and their
input/output state is ignored due to how they are connected to the EMIO
GPIO outputs from the PS, this caused the PL reset to be asserted when
the GPIO driver initialized, preventing any logic using that reset from
functioning properly.
There may also be other cases where GPIO line states have already been
set by the boot loader or firmware and clearing them may result in
improper behavior or glitches on the lines during initialization.
Update the driver to disable GPIO interrupts but leave the pin
modes/states unchanged until/unless they are explicitly reconfigured.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Theoretically (if either `height` or `width` in `config` is set to 0),
the `ret` variable might be returned from `st7567_clear()` without
being initialized.
Add initialization of this variable to avoid compiler warnings.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Use the new modem command send_data_nolock function where it was
previously just written directly to the interface.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Add helper function to send data on modem command handler interface.
This makes sure that when verbose logging is enabled all data is
actually logged.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Fix possible race condition, reset the response semaphore before we send
any data. In case we don't get scheduled back before the response is
processed.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Use the LL_GetFlashSize to retrieve the size of the flash, reading the
system flash OTP of the stm32h5 serie. This operation requires
Icache disable/re-enable to access the 0x08FF F80C memory area
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Implement the get_size flash device API function for the various stm32
This is just CONFIG_FLASH_SIZE expressed in Bytes or the FLASH_SIZE
given by the LL driver
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Move the flash_stm32_write_protection and
flash_stm32_option_bytes_lock functions to a common
file for stm32 devices including stm32h7
Signed-off-by: Francois Ramu <francois.ramu@st.com>
When using 20-bit FIFO packets, invalid data is indicated by the value
-524288. Currently, no check is done against this and invalid data is
decoded. Fixed by adding a simple check. Also, the wrong bit is used to
check if HIRES is enabled. Fixed by using the correct mask.
Signed-off-by: Yau-ming Leung <ymleung314@gmail.com>
Replace the assert on the value of the prescaler by a standard check and
an error value return (similar to the STM32 XSPI PSRAM driver).
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>