Added Kconfig that allows enabling nRF91 anomaly 36
workaround. Added translation to MDK-based symbol
in mdk_config.h.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Add stm32mp215f SoC variants that are close to stm32mp25x with
less features but with optimized power consumption:
- rework SOC management to handle both stm32mp25x and stm32mp21x
- Fix NUM_IRQS where last usable IRQ is 311
- Factorize Kconfig
Signed-off-by: Christophe Guibout <christophe.guibout@st.com>
Add CONFIG_SOC_ATMEL_SAM_MCK_PRESCALLER to allow configure the
Master Clock (MCK) prescaler. This is needed for SAM4E which
requires a prescaler of 2 to achieve the correct clock frequency.
Changes:
- Add SOC_ATMEL_SAM_MCK_PRESCALLER Kconfig option with default of 2 for
SAM4E and 1 for other SAM series
- Fix SOC_ATMEL_SAM_PLLA_MULA default for SAM4E from 9 to 19 to achieve
120MHz: 12MHz * 20 / 2 = 120MHz
- Use CONFIG_SOC_ATMEL_SAM_MCK_PRESCALLER in SoC init for
SAM4E, SAM4S, SAMX7X
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Replace direct comparison of the DT `name` cell against kCLOCK_* SDK
enum values with KINETIS_SIM_CLOCK_DECODE_NAME(), which extracts the
clock_name field from the encoded id cell produced by KINETIS_SIM_CLOCK().
A local DT_CLOCK_NAME() helper wraps the decode for readability.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
When SHA is activated in the DT, configure it's register region with
strong ordered, read and write access.
Signed-off-by: Tony Han <tony.han@microchip.com>
The `gpio_stm32_configure()` function is used by both the GPIO and PINCTRL
drivers to configure I/O pins. Move it to the GPIO port manager module's
code so it can be shared properly and update both drivers accordingly.
With this change, the GPIO and PINCTRL drivers are completely decoupled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
On STM32 hardware, the GPIO port's MMIO interface is used for two purposes
which have their own separate Zephyr API: controlling the state of digital
I/O pins directly (GPIO API) and configuring I/O pins for a specific usage
(PINCTRL API). Historically, this was handled by having the PINCTRL driver
call inside the GPIO driver which works but creates a dependency loop.
Introduce a new `GPIO port manager` module in SoC-specific common code that
takes over various from the existing GPIO/PINCTRL drivers: GPIO port device
instantiation and `GPIO port index -> device` mapping respectively.
Modify the GPIO and PINCTRL drivers to make use of this GPIO port manager
module - a first step in decoupling both drivers from each other.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move the helper function which computes the LL pin value from a pin number
to the <stm32_gpio_shared.h> header as this function can be useful for
modules other than the GPIO driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move the ports list from the GPIO driver to a shared SoC-specific header.
This will allow reuse from other drivers such as pinctrl.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The STM32 pinctrl dt-bindings headers were full of definitions used by the
SoC-specific pinctrl header (<pinctrl_soc.h>) rather than from Devicetree.
Move these definitions to the appropriate header. While at it, include the
<pinctrl_soc.h> header from GPIO driver instead of series-specific pinctrl
header since it uses these definitions.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use PSCI CPU suspend to implement CPU idle for Cortex-A55 Core on i.MX 93.
Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Adapt all Espressif SoC and driver code to the updated
hal_espressif module synced with IDF master branch.
Main changes:
- clock control: delegate peripheral clock gating to HAL
layer using new clock/reset APIs
- SPI/GDMA: adapt to restructured DMA HAL with new channel
allocation and configuration interfaces
- ethernet: add RMII clock configuration and PHY management
- GPIO: simplify using direct HAL function calls
- flash: adapt to updated SPI flash HAL interfaces
- linker scripts: update IRAM/DRAM mappings for new HAL
object files
- DTS: fix ESP32-S2 PSRAM dcache1 address to match actual
MMU mapping region (0x3f800000 DRAM1 instead of 0x3f500000
DPORT which lacks 8-bit access capability)
- west.yml: update hal_espressif revision
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The RT1180 platform requires periodic communication with the EdgeLock
Enclave (ELE) to prevent system reset. According to RT1180 SRM section
3.11 "ELE active timer", the ELE must be pinged at least once every
24 hours.
This commit implements ELE ping functionality using Zephyr's software
timer API (k_timer). The timer is configured to ping the ELE every
23 hours (instead of 24) to account for potential clock inaccuracies.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
We will standardize how the I2C driver supporting MEC172x/4x/5x
and onwards gets the states of the SCL and SDA lines. For MEC172x we
use the Zephyr GPIO driver to get the pin states. For MEC174x/5x and
future parts based on v3.8 I2C hardware we can use a new feature
of the bit-bang control register allowing live reading of the pin
states without switching the internal MUX. The SoC common code
for MEC172x to read GPIO's using direct register access is
removed by this commit.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Resolved an issue where repeated flash/debug cycles
would fail, requiring the board to be placed in ISP
mode before it could be programmed again.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Allow unlocking partitions as part of early_init_hook if the device tree
contains an unlock configuration as part of ti,control-module.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Currently we maintain addresses and values as static configurations using
static configurations and macros in ctrl_partitions.c. Instead use the
new ti,control-module binding to get these values from the device tree and
unlock the partitions during early init.
Only compile and call `k3_unlock_all_ctrl_partitions` if at least one node
with status okay and compatible "ti,control-module" is present.
Also make sure to map and unmap the regions in case MMU is present.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Adjust the backup SRAM initialization to PRE_KERNEL_1 to ensure it's
initialized before any retained_mem instances placed into that area.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Add support for the Ensemble E1C series and the AE1C1F4051920PH0
SoC within this series. The E1C (E1 Compact) series contains a
single Cortex-M55 core configured as RTSS-HE (High Efficiency
Real Time Subsystem) with a maximum frequency of 160 MHz.
The E1C series uses SOC_FAMILY_ENSEMBLE_RTSS helper symbol
introduced earlier to share the CPU architecture configuration
with the E4, E6, and E8 series.
Link: https://alifsemi.com/ensemble-e1c-series/
Signed-off-by: Silesh C V <silesh@alifsemi.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>
For !TRACING, most arch_cpu_idle and arch_cpu_atomic_idle implementation
relies on the fact that there's weak stub implementations in
subsys/tracing/tracing_none.c, this works, but the arch_cpu_idle sits in
hot code path, so we'd better to make it as efficient as possible.
Take the riscv implementation for example,
Before the patch:
80000a66 <arch_cpu_idle>:
80000a66: 1141 addi sp,sp,-16
80000a68: c606 sw ra,12(sp)
80000a6a: 37c5 jal 80000a4a <sys_trace_idle>
80000a6c: 10500073 wfi
80000a70: 3ff1 jal 80000a4c <sys_trace_idle_exit>
80000a72: 47a1 li a5,8
80000a74: 3007a073 csrs mstatus,a5
80000a78: 40b2 lw ra,12(sp)
80000a7a: 0141 addi sp,sp,16
80000a7c: 8082 ret
NOTE: the sys_trace_idle and sys_trace_idle_exit are just stubs when
!TRACING
after the patch:
80000a62 <arch_cpu_idle>:
80000a62: 10500073 wfi
80000a66: 47a1 li a5,8
80000a68: 3007a073 csrs mstatus,a5
80000a6c: 8082 ret
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
When __soc_handle_irq is called inside _isr_wrapper, it actually expects
the function to return an IRQ number but the declaration of
__soc_handle_irq in the header has it returning `void` instead. Fix the
declaration to reflect that it actually returns an XLEN-length integer.
All existing implementations of __soc_handle_irq already follow this
behavior by either not modifying the a0 register or setting it to the
correct IRQ number, and follow the calling convention in all other
respects:
* soc/ite/ec/common/soc_irq.S: trampoline to
`uint8_t get_irq(void* unused)`
* soc/adi/max32/soc_irq_rv32.S: internally calls
`uint32_t max32_rv32_intc_get_next_source(void)` and doesn't modify
a0 afterwards
* soc/openisa/rv32m1/soc_irq.S: does not modify a0, and obliquely
refers to this issue in a comment explaining why the function isn't
implemented in C
* soc/common/riscv-privileged/soc_irq.S: does not modify a0
* all others: stub (just `ret`), which is a valid implementation of the
integer identity function
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
For adding metadata and verifying images on Infineon Edge devices
switch to using the mcuboot tool imgtool rather than depending on
the Infineon specific edgeprotecttools. For the purposes required
in the Zephyr environment this is more than enough.
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
Infineon PSOC4 parts share many ports with a single IRQ line. Using the
SHARED_INTERRUPT handler feature of Zephyr results in a very large IRQ
vector table. Instead structure in DT the idea that the ports are
sharing an interrupt with a sort of pseudo interrupt controller.
This also rectifies the need to ifdef on CAT1C/M0+. I added a note
making it clear that in those cases we likely need to rework the way
interrupts are done anyways as there's secondary interrupt
muxes/controllers involved.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
PR #103203 introduced a regression for mcxw70 builds by incorrectly
moving `HAS_PM` from MCXW72 to MCXW70.
This fix restores the correct configuration.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Add support for dynamic allocation and freeing of DPPI connections
on nrf54h20. It is not longer required to use devicetree to allocate
specific channels that will be used by the application. nrfx_gppi on
nrf54h20 cpuapp behaves in almost the same way as on other targets.
The main difference is that allocating PPI connection requires
communication with Ironside through IPC.
It means that:
- allocation and freeing can only be done from the thread context
- allocation and freeing is slower
Currently, there is no support for controlling PPI connections in
global domain on other cores. It is expected that cpuapp will
setup PPI for VPR (ppr, flpr) as such approach reduces the need for
nrfx_gppi driver being present on ppr/flpr and those cores are
memory constrained.
Regarding cpurad, it is expected that PPI connections are static so
they can be setup manually, using DT and HAL. During initialization
nrfx_gppi on cpuapp gets the information about all PPI resources that
are statically allocated (using the devicetree) and they are excluded
from the pool of available channels.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add support for handling connections within the radio domain
using the new GPPI helper.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add initial support for Renesas R-Car V4H SoC.
Support Zephyr RTOS on Cortex R52, 1.4GHz core.
For more information and documentation, please visit the product page:
https://www.renesas.com/en/products/r-car-v4h
Signed-off-by: Duy Dang <duy.dang.yw@renesas.com>
For STM32H5 series, only the cell compensation can be configured,
as the HSLV configuration is controlled on a per pin basis and
not on a per domain basis as for other STM32 series.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add missing Kconfig selection to enable the Data Watch and Trace unit for
the PSOC6 family of devices using a Cortex-M4 core.
Signed-off-by: Alexander Roodt <alexander.roodt@deepgate.ai>
Fix implementation so that sleep start routine is called at
pm_state_set() (entry) instead of pm_state_exit_post_ops().
Add RTC timer wakeup management, as well as code for deep
sleep.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
When AES is activated in the DT, configure it's register region with
strong ordered, read and write access.
Signed-off-by: Tony Han <tony.han@microchip.com>