This might be just a cosmetic change, but caused me to study logs
a bit longer to understand.
When in the AWAIT_POWER_ON state, we do open an UART, but we
immediately attach the chat module into the UART, so we don't see the
log message "event bus opened".
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add Atmel SAM USBHS driver for SAM E70/S70/V70/V71 family. The driver
was tested using CDC-ACM and testusb samples.
Fixes: #74663
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Update the @param documentation for qspi_npcx_fiu_uma_block to match the
actual function signature, changing lock to lock_en.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
The simulated flash driver incorrectly applied the no_explicit_erase
capability. It was overriding Kconfig settings with a missing Devicetree
property, which caused RAM-like configurations to wrongly report needing
explicit erases before writes.
This commit fixes the initialization macro to correctly check the DT
instance property no-explicit-erase, while properly falling back to the
global CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE Kconfig.
A new runtime test is also added to properly verify this capability.
Fixes#100352Fixes#100400
Signed-off-by: Seyoung Jeong <seyoungjeong@gmail.com>
We modified the Microchip XEC/MEC version 2 I2C byte mode driver
to work on v3.8 I2C hardware in MEC174x/5x/165x SoCs. The changes
are as follows:
1. Add a local header file containing register and bit field definitions
2. Use Zephyr inline register access functions (sys_read/write)
instead of CMSIS register structures.
3. Change DT bindings to require GPIO references for the SCL and SDA
pins. MEC172x will use GPIO driver to get line states. MEC174x/5x
have v3.8 I2C hardware with read-only live values of SCL/SDA pin
states in the bit-bang control register. The MEC172x SoC code to
read I2C GPIO's is no longer needed and is removed in a later
commit in this series.
4. Use WAIT_FOR macro in place of custom spin loops.
5. SonarQube code check recommendations except WAIT_FOR macro which is
based on a GNU compiler extension.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
The check for the layout size, when CONFIG_SPI_NOR_SFDP_DEVICETREE
is enabled, is already done with build asserts during build
(inside PAGE_LAYOUT_GEN). We don't need to check a second
time.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add a loop to triggerchannel start for each remaining major loop iteration
to ensure complete data transfer.
Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
For SMP kernel, the secondary Core is booted up in post kernel stage,
the secondary core need to initialize its, for example map collection
table to target redistributor, we could not use sleep delay functions
at this time because the scheduler is not ready for secondary Core,
so this patch is to always use busy wait in post its command process.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
In case of SMP kernel, multiple CPU Core could post its command by
using the same command port, so add lock to make sure its command
is posted one by another.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
The parsing of the number of bytes to read in the read command was being
done in hexadecimal, causing unexpected behavior.
Now the number can be interpreted in decimal or hexadecimal if prefixed
with 0x.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch avoids the use of the default device on destructive
operations like erase and write. Allowing it might have catastrophic
results like erasing parts or the whole of the application itself.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This fixes the range check condition. Without it, the last page cannot
be mapped.
This is a follow-up to 70961e2; the same fix is applied to the neighboring
function. Both functions with the problem were introduced by 01d3575.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
The main problem I want to fix here is that the DT binding's file name
doesn't match its compatible, which is a violation of our upstream
bindings rules.
The "dsi" suffix here is not a good practice, DT-wise. The compatible
string represents the programming model for the device in vnd,device
format. We don't put the "-spi" at the end of compatibles for SPI
devices, and we don't put "-pcie" on the compatibles for PCIe devices.
The bus has no place in the DT compatible. So in this case, the
file name seems fine, but the compatible itself is off.
(The other option would have been to change the suffix to "mipi-dsi"
(or "mipi_dsi") as necessary to match the relevant "on-bus:" value in
the binding -- but let's simplify and better align with DT best
practices here.)
Signed-off-by: Martí Bolívar <marti.bolivar@oss.qualcomm.com>
This fixes a regression introduced with commit fc2b1b2f3e.
This ensures that when the UAOL driver is disabled, the DAI UAOL
driver is also disabled.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Don't allow the LPTIM system clock driver to be enabled if the required
nodelabel `stm32_lp_tick_source` does not exist. This prevents incorrect
usage which could result in non-trivial build failures.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support for hardware-generated periodic compare events using
the GRTC interval feature. Once configured, the hardware generates
compare events at a fixed interval without CPU intervention.
The feature is available only on channels defined as
"extended-channels" in the devicetree.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Add a new DMA driver for the Infineon DMAC (Direct Memory Access
Controller) specifically for PSoC4 Series.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
PSA provides a random generator that requires an entropy source.
Just deprecate it for further remotion.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
Change ctr_drb random implementation to use PSA Crypto API.
Since name convention is very different and PSA abstracts the
algorithm used to generate CSPRNG, file and Kconfig options were
changed. Current symbols were deprecated and just select the new
one.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
Adjust GLCDC panel timing parameters for
rtklcdpar1s00001be display shield and add missing config for lvgl when
used with DAVE2D
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Add support for the Chipsemi CHSC6540 touch controller and refactor
the driver to support multiple compatible variants.
- Introduce a function pointer (read_data) in driver config to abstract
controller-specific data parsing.
- Implement chsc6x_read_data() and chsc6540_read_data() with
variant-specific register layouts.
- Switch to DT_FOREACH_STATUS_OKAY() for per-compatible device
instantiation.
- Replace instance-based macros with node-based DEVICE_DT_DEFINE().
This change allows the driver to support both chipsemi,chsc6x and
chipsemi,chsc6540 via devicetree without duplicating core logic.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Pass &mdata.mdm_rssi instead of casting the integer value directly
to a pointer, fixing a -Wint-to-pointer-cast compiler warning.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
hwinfo_get_device_id needs to access FMC/RMC and can change its open
state. This will break other code which also accesses the FMC/RMC. To
fix the corrupt, hwinfo_get_device_id will do save & restore of FMC/RMC
open state and the related protected register lock state.
Fix: 104848
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Introduce a new Wakeup Controller (WUC) driver API to manage wakeup
sources in low-power scenarios. The WUC API provides a standardized
interface for enabling, disabling, checking, recording and clearing
wakeup sources that can bring a device out of low-power states.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Add Atmel SAM USBC driver for SAM4L family. The driver was tested using
CDC-ACM and testusb samples.
Fixes: #74665
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add hardware crypto drivers for the Bouffalo Lab SEC Engine:
- AES: ECB, CBC, CTR modes with 128/192/256-bit keys
- SHA: SHA-224 and SHA-256 (SHA-384/512 not supported in HW)
- GMAC: Galois MAC (GF(2^128) multiply)
Each sub-block is a separate driver with its own Kconfig and
DT compatible. All drivers recover SEC_ENG_BASE from the DT
sub-block address to work with HAL register offsets.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Added some application services APIs to handle the GNSS, WIFI scan
and to retrieve the RSSI on the st87mxx modem driver.
Signed-off-by: Isabelle OGER <isabelle.oger@st.com>
Ensure the modem is awake before sending socket data when low-power
mode is enabled. Add a PSM-aware wake path and a handshake to gate
offload I/O until the modem is ready.
Changes:
- hl78xx_sockets.c:
- Add HL78XX_PSM_WAKEUP_TIMEOUT_SECONDS (default 60 s).
- Add psm_cntrl_sem to socket data and initialize it at startup.
- Implement hl78xx_release_socket_comms() to release the semaphore
when the modem is ready for data after wake/registration.
- Implement hl78xx_send_wakeup_signal() to dispatch RESUME to the
modem state machine.
- Add hl78xx_ensure_modem_awake():
* If registered, return immediately.
* If in PSM/power-down, send wake, wait on psm_cntrl_sem up to the
timeout; on timeout set errno=EAGAIN and fail.
- Call hl78xx_ensure_modem_awake() from offload_sendto() and fail
early if the modem cannot be woken.
- Wrap a verbose post-process LOG_DBG() behind
CONFIG_MODEM_HL78XX_LOG_CONTEXT_VERBOSE_DEBUG.
Why:
- In low-power (PSM/eDRX) the modem may be asleep when the app tries to
send data. This change wakes the modem and blocks until it is ready,
preventing spurious send failures and lost payloads.
Impact:
- Behavior change for offload_sendto() under PSM:
* Returns -1 with errno=EAGAIN if wake times out.
- hl78xx_release_socket_comms() must be called by the core after wake
(done in driver on +CEREG/+KCELLMEAS paths).
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add a configurable GNSS processing mode for low-power operation and
teach the GNSS/LTE state machine to run GNSS without unnecessary CFUN
toggling when the RF path is already free in PSM. Improves energy
usage and reduces wake latency.
Kconfig:
- New choice HL78XX_GNSS_REQUEST_PROCESSING_MODE (depends on PSM):
* HL78XX_GNSS_PROCESS_POST_PSM (default).
* HL78XX_GNSS_PROCESS_PRE_PSM.
- Document PRE vs POST behavior and constraints.
Core (hl78xx.c):
- When GNSS is requested in low-power mode, defer to PSM-aware flow:
* PRE‑PSM: start GNSS on PSM entry.
* POST‑PSM: start GNSS after user wake.
- Avoid CFUN=4 when the RF path is already free due to PSM.
- Log intent and return early to skip legacy airplane path.
GNSS TU (hl78xx_gnss.c/.h):
- If PSM is active or just exited, skip CFUN=4 and start GNSS
immediately (RF path free).
- Start GNSS on timeout when RF is free (airplane or PSM), otherwise
queue until free.
- Cancel scheduled power‑down when GNSS actually starts.
- Handle LTE REGISTERED and DEVICE_AWAKE while GNSS is active:
* If LTE reclaims RF, modem auto‑stops GNSS; return to LTE flow.
* If GNSS exit occurs while CFUN=1 (PSM path), auto‑resume LTE
registration; in airplane mode, user restores CFUN=1.
- Clarify state doc: waiting for “RF free (airplane or PSM)” instead of
only airplane.
- Emit HL78XX_GNSS_EVENT_MODE_EXITED with status=false when auto‑stopped
by LTE.
Public API docs (hl78xx_apis.h):
- Document low‑power GNSS paths:
* ENTER: queued, start pre‑ or post‑PSM depending on Kconfig.
* EXIT: auto‑resume LTE in PSM path; airplane path still user‑driven.
Why:
- GNSS can operate while LTE hibernates in PSM; avoiding CFUN toggles
saves energy and time.
- PRE‑PSM maximizes GNSS acquisition window; POST‑PSM delivers fixes at
wake before LTE work.
- Clearer eventing for auto‑stop cases simplifies app logic.
Impact / migration:
- Behavior change for queued GNSS in PSM: CFUN=4 is no longer forced if
PSM already frees the RF path.
- Apps that assumed CFUN=4 during GNSS should rely on events instead.
- Consumers of MODE_EXITED should handle status=false (auto‑stop).
- New Kconfig choice requires MODEM_HL78XX_PSM=y to be effective.
Testing notes:
- Verified PRE‑PSM starts GNSS on PSM entry and cancels power‑down.
- Verified POST‑PSM defers GNSS until wake, then runs before LTE regs.
- Confirmed LTE REGISTERED during GNSS causes clean abort and return to
LTE path.
- Confirmed no CFUN changes when PSM already frees the RF path.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Introduce a low-power framework for HL78xx: new states, events, Kconfig
options, URC handlers, GPIO control, and an optional power-down timer.
Includes DTS pins for WAKE/GPIO6/VGPIO and a public wake API.
Board/DTS:
- swir_hl78xx_ev_kit.overlay:
- Add mdm-vgpio, mdm-gpio6, and mdm-wake GPIOs.
Kconfig:
- Add MODEM_HL78XX_POWER_DOWN when eDRX/PSM are both disabled.
- Add choice for power-down policy:
- MODEM_HL78XX_USE_DELAY_BASED_POWER_DOWN (+ delay seconds).
- MODEM_HL78XX_USE_ACTIVE_TIME_BASED_POWER_DOWN (+ active time).
- Tune eDRX defaults and add PTW value knob.
- Adjust PSM defaults (e.g., TAU default 15 minutes).
- Gate legacy sleep-delay settings when power-down is disabled.
Driver core (hl78xx.c/.h):
- New states:
- RUN_PMC_CONFIG_SCRIPT (apply PSM/eDRX/power-down).
- SLEEP (bus closed, UART suspended, wake via RESUME).
- New events (when low-power enabled):
- DEVICE_ASLEEP, DEVICE_AWAKE, LTE_PSMEV_UPDATE.
- +CEREG handler:
- Feed power timers, handle GNSS interplay, release socket comms
after register when low-power is active.
- +PSMEV handler:
- Track ENTER/EXIT, toggle WAKE pin, dispatch sleep/awake events.
- +KCELLMEAS handler:
- Update RSRP, mark registered on valid signal, release comms.
- Carrier-on / await-registered:
- Distinguish PSM entry vs coverage loss, route to SLEEP or retry.
- Avoid iface status run during initial PSM edge cases.
- Sleep state handlers:
- On enter: WAKE=0, release chat, close pipe, suspend UART, give sem.
- On bus closed: decide GNSS pre/post-PSM behavior.
- On resume: WAKE=1, resume UART, reopen pipe, proceed to GNSS or LTE.
- State-table safety:
- Use MODEM_HL78XX_STATE_COUNT for bounds checks.
- Log improvements and explicit state transition trace.
APIs (hl78xx_apis.c / include):
- Add hl78xx_wakeup_modem() to resume from SLEEP (PSM).
Chat/URC (hl78xx_chat.c/.h):
- Enable +KPSMEV URC and +KCELLMEAS URC when low-power is on.
- Provide disable-PMC script when low-power is off.
Config helpers (hl78xx_cfg.c/.h):
- Add PMC enabling and settings application:
- hl78xx_enable_pmc(), hl78xx_psm_settings(), hl78xx_edrx_settings().
- Power-down timer (when enabled):
- Init/cancel/query and feed functions via k_work_delayable.
- Feed timer on dynamic TX path to extend on activity.
- Add hl78xx_is_rsrp_valid() helper.
- Respect CONFIG_MODEM_LOG_LEVEL in cfg TU logging.
Misc:
- Expose hl78xx_release_socket_comms() for post-register gating.
- Guard init-fail path to require WAKE pin when low-power is on.
- Add RUN_PMC_CONFIG_SCRIPT transitions after RAT config.
Why:
- Reduce energy by using PSM/eDRX and a clean SLEEP state with bus and
UART suspended. Optionally power down the modem when DRX features are
disabled. Provide explicit wake and robust PSM detection.
Impact / migration:
- DTS must define WAKE/GPIO6/VGPIO if low-power is enabled.
- New state/event enums added; state table now uses *_STATE_COUNT.
- +KCELLMEAS URC is enabled unless GNSS blocks it (see comments).
- External users can call hl78xx_wakeup_modem() to resume from PSM.
- Power-down policy and delays are configurable via Kconfig.
Testing notes:
- Verified PSMENTER drives WAKE low and transitions to SLEEP.
- Verified RESUME re-opens UART, waits settle time, then proceeds.
- Confirmed GNSS pre/post-PSM flows per config.
- Checked power-down timer feeds on data activity and triggers OFF.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add a GPIO driver for the Infineon CYW43439 WiFi chip that exposes
WL_GPIO0-2 as standard Zephyr GPIO pins. Pin 0 is the onboard LED
on Raspberry Pi Pico W and Pico 2 W boards.
The GPIO node is a child of the AIROC WiFi device node in the
devicetree. GPIO control is performed via the WHD gpioout iovar,
serialized with a mutex. A shadow register tracks pin state since
the CYW43439 does not support GPIO readback.
Signed-off-by: John Lin <mcjelcom@gmail.com>
Clearing the status register in adxl367_thread_cb() introduces
a one-sample latency since any trigger handler invoking
adxl367_get_accel_data() has to wait until the next sample sets the
DATA_READY bit again. To fix this, identify trigger source by
reading status_copy register in adxl367_thread_cb(). This preserves
the status register contents for verification prior to fetching data.
Signed-off-by: Shiril Tichkule <Shiril.Tichkule@analog.com>
Regression when original D8C PLL changes were added results
in an unused variable. This fixes that warning.
Signed-off-by: James Bennion-Pedley <james@bojit.org>
This commit is to add DTC transfer feature for both SPI controller mode
and peripheral mode on board RSK-RX130-512KB
Signed-off-by: Minh Tang <minh.tang.ue@bp.renesas.com>
Compress the `struct ina2xx_channels` to only the channels that are
supported. This has the added benefit that trying to access an
unsupported channel (in the driver) is now a compile-time error.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Use `#ifdef`, `#else`, `#endif` to block out implementations, instead
of putting the checks inside an `if`, which results in all the
implementations being indented.
It also makes it much clearer to any user with syntax highlighting
configured, since the unsupported channels are greyed out.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix calling `sensor_channel_get` on a channel that is not supported by
the hardware from faulting with a NULL de-reference.
This fixes the following pattern (used by `fuel_guage/composite`):
```
sensor_sample_fetch(dev);
if (sensor_channel_get(dev, chan, val) == -EINVAL) {
printk("Not supported\n");
}
````
Signed-off-by: Jordan Yates <jordan@embeint.com>
This reverts commit ae44e1e7b7.
The only consequence of removing NULL checks is enabling NULL
dereference exceptions. The sensor API is a generic API, a generic
library built on top of that API does not always know which channels a
device supports.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This reverts commit 8340e8c264.
The only consequence of removing NULL checks is enabling NULL
dereference exceptions. The sensor API is a generic API, a generic
library built on top of that API does not always know which channels a
device supports.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Remove instance specific Kconfigs (CONFIG_NRFX_GPIOTEx) as they are no
longer used. Cleanup in all places.
Add prompt to CONFIG_NRFX_GPIOTE to allow enabling the driver.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>