Commit graph

4341 commits

Author SHA1 Message Date
Chekhov Ma d1c6bb5cb4 imx8m: auto generate mmu_regions array from dt compatiable
Adopt the "MMU_REGION_DT_FLAT_ENTRY" macro to automatically generate
elements in "mmu_regions" according to devicetree "compatible" and
"status".

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2023-12-27 16:09:42 +00:00
Chekhov Ma 81c5a093f3 imx93: auto generate mmu_regions array from dt compatiable
Adopt the "MMU_REGION_DT_FLAT_ENTRY" macro to automatically generate
elements in "mmu_regions" according to devicetree "compatible" and
"status".

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2023-12-27 16:09:42 +00:00
Anisetti Avinash Krishna b7609ff5a8 soc: x86: raptor_lake: soc_gpio : Modified to support RPL-P
Added Modifications to support RPL-P platform.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-12-27 16:06:19 +00:00
Daniel Leung debb9f6352 xtensa: dc233c: force invalidating TLBs during page table swap
QEMU MMU tracing showed that there might be something wrong with
its Xtensa MMU implementation, which result in access violation
when running samples/userspace/hello_world_user.

Here is the MMU trace from QEMU from failed runs:

  get_pte: autorefill(00109020): PTE va = 20000424, pa = 0010c424
  get_physical_addr_mmu: autorefill(00109020): 00109000 -> 00109006
  xtensa_cpu_tlb_fill(00109020, 1, 0) -> 00109020, ret = 0
  xtensa_cpu_tlb_fill(00109028, 1, 0) -> 00109028, ret = 0
  xtensa_cpu_tlb_fill(00109014, 0, 2) -> 00103050, ret = 26

The place where it fails is during reading from 0x109014.
From the trace above, the auto-refill maps 0x109000 correctly
with ring 0 and RW access with WB cache (which should be correct
the first time under kernel mode). The page 0x109000 is the libc
partition which needs to be accessible from user thread.
However, when accessing that page, the returned physical address
became 0x103050 (and resulting in load/store access violation).
We always identity map memory pages so it should never return
a different physical address.

After forcing TLB invalidation during page table swaps, the MMU
trace is:

  get_pte: autorefill(00109020): PTE va = 20000424, pa = 0010c424
  get_physical_addr_mmu: autorefill(00109020): 00109000 -> 00109006
  xtensa_cpu_tlb_fill(00109020, 1, 0) -> 00109020, ret = 0
  get_pte: autorefill(00109028): PTE va = 21000424, pa = 0010e424
  get_physical_addr_mmu: autorefill(00109028): 00109000 -> 00109022
  xtensa_cpu_tlb_fill(00109028, 1, 0) -> 00109028, ret = 0
  get_pte: autorefill(00109014): PTE va = 21000424, pa = 0010e424
  get_physical_addr_mmu: autorefill(00109014): 00109000 -> 00109022
  xtensa_cpu_tlb_fill(00109014, 0, 2) -> 00109014, ret = 0
  xtensa_cpu_tlb_fill(00109020, 0, 0) -> 00109020, ret = 0

Here, when the same page is accessed, it got the correct PTE
entry, which is ring 2 with RW access mode (but no cache).
Actually accessing the variable via virtual address returns
the correct physical address: 0x109014.

So workaround that by forcing TLB invalidation during page swap.

Fixes #66029

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-27 15:59:05 +00:00
Lucas Tamborrino ff62faac07 soc: xtensa: esp32s2/s3: remove HEAP_MEM_POOL_ADD_SIZE_SOC
There is no need for this config here and it is messing
with total sys heap calculation.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-12-27 10:08:47 +02:00
Daniel DeGrasse beb43bdf20 soc: arm: nxp: add MK22F12 definition
Add SOC definition for MK22F12 series, larger LQFP-144 K22 series
parts that feature additional peripheral instances.

Additionally, these parts differ from the standard MK22 in the following
ways:
- SYSMPU peripheral is present, so an MPU definition is required
- No external oscillator divider is present

This commit also updates the NXP HAL to include pin control files for
these SOCs.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-12-23 10:00:36 +00:00
Erwan Gouriou 79599a15d4 soc: stm32: stmw32wba: Get stop mode compatible with BLE
Supporting Stop1 mode while BLE RF is enabled requires some specific
adaptation and usage of STM32WBA Cube BLE controller scm API.

scm (Secure clock manager) is in charge of switching clock depending
on RF status and should be informed of PM stop modes scheduling.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-22 09:53:33 +01:00
Erwan Gouriou 2908458554 soc: stm32wba: hci_if: Implement HW_RNG_EnableClock API
STM32WBA controller uses a PKA driver to perform cyphering operations
on keys. Since PKA hardware block requires RNG clock to be enabled, a
synchronization with zephyr RNG driver is needed.

Use RNG enable status to check if RNG could be switched off or needs to
be switched on.
Similarly in entropy driver, don't cut RNG clock if PKA is enabled.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-21 09:18:53 +01:00
Ren Chen 5762d022dc drivers: usb: usb_dc_it82xx2: optimize the basic/extend endpoints control
This commit refactors the basic and extended endpoint control functions to
enhance readability.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Ren Chen e23ae3b678 drivers: usb: usb_dc_it82xx2: refactor usb driver with macros
Refactor the code using macros to enhance readability.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2023-12-20 11:15:38 +01:00
Andrei-Edward Popa ea1cafbee7 drivers: clock_control: Added clock driver for Raspberry Pi Pico
Added clock driver for Raspberry Pi Pico platform

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
Johan Hedberg ec23622b07 soc: xtensa: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Johan Hedberg 95b1d586b9 soc: arm: Use HEAP_MEM_POOL_ADD_SIZE KConfig options
Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
Andrej Butok abcfd0cbd8 soc: lpc55xxx: Fix TFM
TFM is using flash, so sys. clock must be decreased.
Fixes #65957

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-12-19 08:51:45 +01:00
Erwan Gouriou 6f6410061d soc: stm32wba: Implement BLE controller lib APIs over Zephyr
In order to enable BLE support on STM32WBA, following APIs are implemented:
- HostStack_: BLE Controller scheduling
- ll_sys_: Link layer API required for scheduling
- UTIL_TIMER_: BLE Controller timer utility
- LINKLAYER_PLAT_: BLE controller utilities

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-18 17:31:08 +00:00
Daniel Leung d59e7be1ec soc: xtensa/dc233c: turn on i-cache and d-cache
The DC233C core has support for both i-cache and d-cache.
So mark it as such so we can test caching of Xtensa in QEMU.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-18 12:25:04 +01:00
Daniel Mangum 987eb10faf soc: posix: fix kconfig description
Fixes a small typo in kconfig description for the posix port.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2023-12-18 10:11:18 +01:00
Tom Chang 4dc7c89f40 drivers: espi: npcx: introduce espi taf driver
This CL implements espi taf read/write/erase function for NPCX.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2023-12-18 09:30:01 +01:00
Fabiola Kwasowiec 28d5d23a23 intel_adsp: lnl: add missing definition for lnl
Definition of ADSP_FORCE_DECOUPLED_HDMA_L1_EXIT_BIT,
which is used in the intel_adsp_force_dmi_l0_state function,
is missing.

Signed-off-by: Fabiola Kwasowiec <fabiola.kwasowiec@intel.com>
2023-12-14 22:22:22 +09:00
Zoltan Havas e7039bc37f zephyr: Kconfig: SOC_GECKO_CUSTOM_RADIO_PHY option for RAIL for proprietary
Currently on zephyr, RAIL library is used only by Bluetooth applications,
with this update, it will be able to be used for sample applications
for custom radio phys.
All files were copied from Silicon Labs GSDK v4.2.4.

Signed-off-by: Zoltan Havas <zoltan.havas@silabs.com>
2023-12-14 14:21:21 +01:00
Marc Desvaux 4dc0bd1800 drivers: ethernet: remove sections.ld for SOC_SERIES_STM32H5X
remove section(".eth_stm32_desc") and
section(".eth_stm32_desc") for SOC_SERIES_STM32H5X


Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-12-14 09:32:35 +01:00
Anas Nashif 28445d62c6 soc: intel_adsp: share adsp_imr_layout.h across SoC generations
This header is shared across all ace intel_adsp platforms, so move it to
a common place.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-14 09:30:13 +01:00
Evan Perry Grove a54a52b085 dts: arm: Add support for STM32F722 SoC
The STM32F722 is similar to the STM32F723, but lacks the latter's
more advanced USB PHY. Otherwise, they are virtually identical.

Signed-off-by: Evan Perry Grove <evan@4grove.com>
2023-12-13 13:57:55 +01:00
Fabiola Kwasowiec 431da79dfa hda: separation of l1 settings to new function
Separating two new functions force and allow l1
to have the current state with separated functions
in the ipc file so that SOF can call these
functions via IPC DMI_FORCE_L1_EXIT. Change related
to the addition of a new parameter to force
DMI L1 exit on IPC request.

Signed-off-by: Fabiola Kwasowiec <fabiola.kwasowiec@intel.com>
2023-12-13 10:39:17 +01:00
Daniel Leung a819bfb2d5 xtensa: rename z_xtensa to simply xtensa
Rename the remaining z_xtensa stuff as these are (mostly)
under arch/xtensa.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 6d5e0c25a6 xtensa: rename z_xtensa_irq to simple xtensa_irq
This gets rid of the z_ prefix.

Note that z_xt_*() are being used by the HAL so they cannot be
renamed.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 8bf20ee975 xtensa: mmu: rename prefix z_xtensa to xtensa_mmu
This follows the idea to remove any z_ prefix. Since MMU has
a large number of these, separate out these changes into one
commit to ease review effort.

Since these are no longer have z_, these need proper doxygen
doc. So add them too.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 86b7210dc7 soc: xtensa: dc233c: no need to include xtensa_mmu_priv.h
It does not use anything inside xtensa_mmu_priv.h so remove
the include.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 43b0b48de7 xtensa: move files under core/include/ into include/
Header files under arch/xtensa/include are considered internal
to architecture. There is really no need for two places to
house architecture internal header files.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 106061b307 xtensa: rename files with hyphens to underscores
Simply to provide some consistencies on file naming under
arch/xtensa.

These are all internally used files and are not public.
So there is no need to provide a deprecation path for
them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Sebastian Schlupp 0462cc060d soc: same51 and same54: added DFLL48 frequency information
Specified the value 48000000 for the DFLL48 clock source

Signed-off-by: Sebastian Schlupp <sebastian.schlupp@gmail.com>
2023-12-12 16:25:46 +01:00
Flavio Ceolin ebf50eee42 soc: stm32f4: Fix PM dependency
COUNTER_RTC_STM32_SUBSECONDS depends on DT_HAS_ST_STM32_RTC_ENABLED.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-12-12 10:57:34 +01:00
Tomasz Leman 3732aae0e0 intel_adsp: power: clock gating in idle
This patch enables DSP clock gating for ACE platforms. By default, clock
gating is blocked by the firmware in the hardware configuration. If
CONFIG_ADSP_IDLE_CLOCK_GATING is enabled, this prevent is not active and
clock can be gated when core is in idle state. WIth this option disabled
clock gating will only be enabled in hardware during power gating.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-12-12 10:57:07 +01:00
Andreas Sandberg 5767c8d78c dts: stm32g4: Add ITM support
The STM32 G4 series has a built-in Arm Instrumentation Trace
Macrocell. Set CONFIG_HAS_SWO to enable this.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-12-12 10:56:44 +01:00
Francois Ramu 5bacc2eaac soc: arm: stm32 SYS_CLOCK_TICKS_PER_SEC config with STM32_LPTIM_TIMER
Configure the SYS_CLOCK_TICKS_PER_SEC directly from the
DTS st-prescaler property of the lptim node
aka stm32_lp_tick_source

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-12-12 09:52:30 +00:00
Luca Burelli 11d4f8e5e5 soc: stm32: unify cache conditionals for F7 and H7 targets
The instruction cache in the STM32F7 and H7 was enabled regardless
of the value assigned via Kconfig to the CONFIG_ICACHE parameter.
This commit adds the missing conditional checks; note that this does
not affect the compiled behavior unless CONFIG_ICACHE is explicitly
disabled by the user.

Remove a redundant low-level check on DCache being already enabled,
since it is also performed inside the SCB_EnableDCache function.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2023-12-12 09:51:11 +00:00
Anas Nashif 699880a430 arch: arm: cortex_m: rename expection header
Rename exception header and use the same name as all architecture ports.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-11 18:22:40 -05:00
Andrzej Głąbek 23e15c480a soc: nrf53: Add implementation of workaround for anomaly 168
Use the already available in the tree mechanism of adding assembly
instructions right after WFI/WFE to implement the workaround for
nRF5340 anomaly 168 (replace the 4 NOP solution used on the network
core as it turned out to be insufficient) and provide two related
Kconfig options so that users are able to adjust the workaround to
their actual needs (disable it entirely or use it in the extended
version).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-12-11 14:31:41 +01:00
Maximilian Deubel 84f4ffce7c soc: arm: nordic_nrf: nrf91: add nRF9151 LACA
This patch adds definitions for the nRF9151,
which is software-compatible with nRF9161.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2023-12-11 10:24:50 +01:00
Anas Nashif 0ebeca2eb7 intel_adsp: ace: add firmware loading tool
Add python script for loading intel_adsp ACE FW into hardware.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-11 09:58:18 +01:00
Joakim Andersson 08413e1fb8 soc: nordic_nrf: Enable the TF-M NS storage partition for nordic boards
Enable the TF-M NS storage partition for nordic boards.
This partition is otherwise not used, and configured as secure.

Fixes: #59376

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Declan Snyder 17a99367d2 soc: rt11xx: support nxp_enet in soc
Support NXP ENET on RT11xx soc

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Declan Snyder e66876126e soc: k6x: Support NXP ENET Driver
NXP ENET driver support from soc.c for k6x series

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-12-11 09:50:58 +01:00
Manuel Argüelles 0ee6632967 soc: arm: nxp_s32: s32k1: use HAL to init code cache
Use the HAL cache driver to initialize the Code Cache.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-08 10:22:12 +00:00
Manuel Argüelles 6aa242cdfb soc: arm: nxp_s32: s32k1: fix code cache init
Currently Code Cache cannot be enabled because its initialization is
guarded by Kconfig options which depend on CPU core cache support,
but S32K14x devices has a SoC specific L1 cache controller. Hence,
introduce a SoC-specific symbol to enable Code Cache.

Note that the cache controller is not available for S32K11x devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-08 10:22:12 +00:00
Alberto Escolar Piedras 8add7cb62f soc/posix posix_native_task: Replace native_posix in description
Replace native_posix in the NATIVE_TASK description.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-12-07 10:39:31 +00:00
Manuel Argüelles 18202d0db3 soc: nxp: s32k146: add LPSPI support
Add LPSPI nodes to S32K1xx devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-06 20:57:42 -06:00
Manuel Argüelles 3b354bfc57 soc: nxp: s32k146: add LPI2C support
Add LPI2C nodes to S32K1xx devices. S32K146 has a single
LPI2C instance.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-06 20:57:42 -06:00
Keith Short 8fb92ba9cd espi: npcx: Fix driver Kconfig
Update the Kconfig for the npcx eSPI driver so it's automatically
enabled if the devicetree node is enabled.

Signed-off-by: Keith Short <keithshort@google.com>
2023-12-06 21:35:29 -05:00
Conor Paxton dc5cf9cb1c soc: mpfs: describe the correct amount of irqs available.
Microchip's PolarFire SoC (MPFS) has 186 available interrupts.
Fix the Kconfig symbols.

While we're at at: remove commented out code

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2023-12-06 17:54:29 +00:00
Attie Grande 9f76adbfa8 soc: atmel_sam0: Setup clocks for USB on SAML21 parts
GCLK Gen 2 was dedicated to USB, but never setup... this patch
configures it for 48 MHz, derrived from DFLL.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2023-12-05 16:27:00 -06:00
Erwan Gouriou 7c96ebc2a8 soc: stm32: Make POWER_SUPPLY_CHOICE available for SOC_STM32WBA55XX
POWER_SUPPLY_CHOICE is available for SOC_STM32WBA55XX, with two
possible options: LDO or SMPS.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-05 14:53:39 +00:00
Erwan Gouriou 31b493128f soc: stm32wba: Introduce STM32WBA55 SoC variant
STM32WBA55 is a new STM32WBA SoC variant featuring SMPS.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-05 14:53:39 +00:00
Manuel Argüelles 673f38f3d1 soc: arm: nxp_s32: s32k1: unselect CPU_HAS_xCACHE
Following changes in #64978, align CPU_HAS_xCACHE symbols with
the CMSIS feature definitions in the device headers so that
both have the same value.

Fixes #66147

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-05 13:18:23 +01:00
Wilfried Chauveau af3a19106a soc: arm: fix missing configs & defines
Some SoC have missing feature selections in their Kconfig.
Some others are missing includes of CMSIS-Core headers.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-12-05 10:19:15 +00:00
Wilfried Chauveau 29ffaaa0b6 arch: arm: cortex_m: Remove CPU_HAS_*CACHE from CPU_CORTEX_M7
Caches are optional on cortex-m7, having CPU_HAS_*CACHE in CPU_CORTEX_M7
definition renders them mandatory.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-12-05 10:19:15 +00:00
Wilfried Chauveau 7226f985fc soc: arm: nxp_kinetis: remove unecessary includes
This changes remove extraneous includes causing issues with cycles in
includes subsequently having code requiring definitions from CMSIS
while it’s configuration hasn’t completed yet.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-12-05 10:19:15 +00:00
Wilfried Chauveau 8d91ba200f modules: cmsis: Move cortex_m default configuration to its own file
Kconfig parameters, header’s default & silicon vendor’s SDK configuration
for CMSIS Core, must be consistent. Depending on the inclusion order of
the headers, this is currently not always the case.

This change introduces consistency checks & enusers defaults match their
Kconfig settings.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-12-05 10:19:15 +00:00
Wilfried Chauveau a00aa3bcfa arch: arm: cortex_m: add config for PMU
This adds kconfig entries for Performance Monitoring Unit (PMU).

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-12-05 10:19:15 +00:00
Zhang Peng 9dd10c2f3c soc: xtensa: adsp: add support for NXP ADSP for i.MX8ULP
Add support for i.MX8ULP target.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2023-12-04 16:41:00 +00:00
Manuel Argüelles 91293187d8 soc: nxp_s32: introduce support for S32K1 devices
Introduce support for NXP S32K1 family of 32-bit MCUs, and
particularly for S32K146 devices. S32K1 share a fair amount of
similarities with Kinetis family, so most of the peripheral drivers
can be reused.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-30 11:21:59 -05:00
Jamie McCrae 93f537552d soc: arm: nordic_nrf: Remove deprecated GPREGRET Kconfig option
Removes the Kconfig NRF_STORE_REBOOT_TYPE_GPREGRET which was
deprecated in zephyr 3.4

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-29 13:38:29 +01:00
Adam Wojasinski 38739368dd modules: hal_nordic: watchdog: Add Kconfig symbols for new WDT instances
This commit is a part of introduction of new WTD instances.
It adds new Kconfig symbols that can be used in WDT shim and
nrfx driver.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-11-29 13:12:42 +01:00
Declan Snyder c8375659fb soc: nxp: rt10xx: Increase workqueue size for enet
Increase the size of the system workqueue stack if using
nxp ethernet driver

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-28 14:34:02 -06:00
Declan Snyder 0e935ea180 soc: rt10xx: enable phy clock with new driver
when using either old or new driver for nxp enet,
enable the phy clock

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-28 14:34:02 -06:00
Chen Xingyu 3f7e73416d soc: riscv: privileged: efinix-sapphire: Enable CONFIG_RISCV_HAS_CPU_IDLE
In an earlier commit, the riscv-privileged level implementation of
`arch_cpu_idle()` is not included unless `CONFIG_RISCV_HAS_CPU_IDLE` is
enabled.

This commit ensures the option is enabled on all the existing CPUs, thereby
maintaining the existing behavior.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2023-11-28 15:34:06 +01:00
Chen Xingyu 34d2c4d6b2 soc: riscv: privileged: Conditionally override arch_cpu_idle()
The current configuration comes with a common implementation of
`arch_cpu_idle()` for the whole riscv-privileged family, utilizing the
`WFI` instruction to place the CPU into a light sleep state, with the
assumption that it will be awakened later by interrupts such as SYSTICK.
However, this approach is not always effective, particularly in scenarios
where the SYSTICK is not a valid wake source.

This commit uses `CONFIG_RISCV_HAS_CPU_IDLE` as the build condition of the
family-level `idle.c`, allowing CPUs that do not enable this option to
fallback to a generic arch-level implementation in
`arch/riscv/core/cpu_idle.c`.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2023-11-28 15:34:06 +01:00
Marek Pieta 00d8263a93 soc: arm: nrf52: Configurable EGU instance for anomaly 109 workaround
Change makes EGU instance used for anomaly 109 workaround configurable.
The default EGU instance (5) may be used for other purpose.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2023-11-28 14:23:49 +00:00
Jun Lin 91fdef0783 soc: npcx: add support for npcx9mfp
Add new SoC npcx9mfp support for npcx9 series.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-11-28 09:13:23 +00:00
Sylvio Alves ca346ba216 soc: esp32: call reset cause reason init
Reset cause reason was not initalized properly, making
hwinfo feature not to work as expected.

Fixes #65634

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-11-27 19:59:45 +01:00
Dat Nguyen Duy 513ba04168 soc: nxp_s32: cmsis rtos v2 adaptation
There are symbols are both defined by the NXP S32 HAL and
the CMSIS RTOS V2 wrapper, to avoid interference between
them, redefine the symbols under an enum.

Also this is may a common issue for all NXP S32 platforms,
move to common place to be reused

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-11-27 19:58:57 +01:00
Anas Nashif aed0c451f8 arch: introduce DSP_SHARING and CPU_HAS_DSP configs
introduce global DSP_SHARING and CPU_HAS_DSP to be used by all
architectures and change existing usage in ARC to use those global
configs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-27 09:05:54 +00:00
Aymeric Aillet f2061a073a soc: arm: reneas: Add r8a779f0 support
r8a779f0 SoC is part of the Renesas R-Car Gen4 SoC series.

This SoC has a dual core lockstep Cortex-R52 CPU.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Aymeric Aillet 6033db5360 drivers: pinctrl: rcar: Add r8a779f0 support
Enable PFC controller for r8a779f0 SoC.
Declare pin list for r8a779f0 SoC.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Aymeric Aillet 1738543c5d drivers: pinctrl: Add R-Car Gen4 support
Renesas R-Car Gen4 is different from Gen3 regarding pinmux.

While Gen3 had only one base address to manage all pins,
Gen4 has one set of pinmux registers per GPIO banks.

We could expose one pinmux register per GPIO controllers,
but that would break potential compatibility with Linux
Device tree.

Instead create a reg_base array to parse all reg base from
device tree and identify proper base address based on the pin
definition.

This imply to add a pfc_base parameter to most of the pfc_rcar
function.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-11-25 08:50:47 -05:00
Jun Lin 3f9d24e4c0 mgmt: ec_host_cmd: shi_npcx: support the enhanced mode
The original SHI module only has one output FIFO buffer. It costs a lot
when the driver has to send/change the protocol control code because it
must fill out all 128 bytes of output FIFO. In npcx4, we introduce
another output buffer in 1-byte depth. These two buffers can switch back
and forth during the transaction. We can use the single-byte buffer
to send the control code and the 128-byte FIFO to send the data payload.
It helps improve the SHI driver's efficiency.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-11-24 11:45:13 +01:00
Jun Lin 74f07b04ff soc: npcx: shi: add new registers for npcx4
Add the SHI enhanced buffer mode register definition for npcx4.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-11-24 11:45:13 +01:00
Martin Gritzan 86cf5829a4 dts: arm: stm32: add stm32f303xb bindings
The STM32F303xB is very similar to the xC, the only difference being the
RAM and flash sizes.

Signed-off-by: Martin Gritzan <martin.gritzan@gmail.com>
2023-11-24 09:24:14 +01:00
Marek Matej d34f725df8 soc: xtensa: esp32s3: Update SOC variant list
Add missing combinations of the ESP32-S3 Wroom module.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-11-22 21:56:39 +01:00
Rander Wang efc3208189 soc: intel_adsp: cavs: mask idc interrupt before halting cpu
Secondary dsp is idle and waiting for interrupt before it is totally
halted. The other active cores can trigger idc interrupt to this core,
this can wake it up and result to fw panic. Mask idc interrupt as timer
interrupt to prevent this case.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-22 14:57:07 +00:00
Peter van der Perk 5edb7cbe41 soc: arm: nxp_imx: rt11xx: add support for CONFIG_ETH_MCUX_RMII_EXT_CLK
ENET_REF_CLK as an input during rt11xx clock initialization.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2023-11-22 14:56:38 +00:00
Alberto Escolar Piedras ab896ad6ef arch posix: annotate posix_exit and nsi_exit as noreturn
Annotate posix_exit() and nsi_exit() as noreturn
mainly to ease the life of static analysis tools.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:52:52 +01:00
Flavio Ceolin c47880af0d arch/xtensa: Add new MMU layer
Andy Ross re-implementation of MMU layer with some subtle changes,
like re-using existent macros, fix page table cache property when
direct mapping it in TLB.

From Andy's original commit message:

This is a reworked MMU layer, sitting cleanly below the page table
handling in the OS.  Notable differences from the original work:

+ Significantly smaller code and simpler API (just three functions to
  be called from the OS/userspace/ptable layer).

+ Big README-MMU document containing my learnings over the process, so
  hopefully fewer people need to go through this in the future.

+ No TLB flushing needed.  Clean separation of ASIDs, just requires
  that the upper levels match the ASID to the L1 page table page
  consistently.

+ Vector mapping is done with a 4k page and not a 4M page, leading to
  much more flexibility with hardware memory layout.  The original
  scheme required that the 4M region containing vecbase be mapped
  virtually to a location other than the hardware address, which makes
  confusing linkage with call0 and difficult initialization
  constraints where the exception vectors run at different addresses
  before and after MMU setup (effectively forcing them to be PIC
  code).

+ More provably correct initialization, all MMU changes happen in a
  single asm block with no memory accesses which would generate a
  refill.

Signed-off-by: Andy Ross <andyross@google.com>
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-11-21 15:49:48 +01:00
Flavio Ceolin 8dd84bc181 arch: xtensa: Rename xtensa_mmu.c to ptables.c
Initial work to split page table manipulation from
mmu hardware interaction.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-11-21 15:49:48 +01:00
Daniel Leung a36e39c2a6 xtensa: dc233c: enable userspace support
This massages kconfig and linker script to enable userspace
support on dc233c core.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-21 15:49:48 +01:00
Dawid Niedzwiecki 43ef398614 pm: add power management for stm32f4x
Add soc power management for the STM32F4x chips.

One low power state is added supported by all chips from the family -
the Stop mode with voltage regulator in low-power mode.

The Stop mode for STM32F chips has to work with the IDLE timer -
CORTEX_M_SYSTICK_IDLE_TIMER, because PLL and HSI are disabled in the
Stop mode (Systick is not clocked). The only possible wakeup source is
RTC, which works as a IDLE timer for the Systick.

The exit latency may need to be adjusted per system, depending on the
system tick frequency and other variables.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2023-11-21 08:46:17 +00:00
Abderrahmane Jarmouni f8a9d95549 soc: arm: st_stm32: stm32u5: Add STM32U5A9 support
Add support for STM32U5A9XX SoC series

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2023-11-21 08:44:34 +00:00
Franciszek Zdobylak 6f91fd858c dts: arm: silabs: Configure hfxo in dtsi
This commit moves configuration of hfxo from headers defined on board level
to device trees of SoCs.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-11-20 13:01:39 +01:00
Rander Wang 954901296c arch/xtensa: clean up arch_cpu_idle function
Some workarounds were introduced for intel cavs2.5 platform bring up.
It is not general so move them to platform code.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-20 11:14:41 +01:00
Rander Wang 0c27d772f6 soc: intel_adsp/cavs: add arch_cpu_idle support
Cavs platforms starts from Apllolake to Raptorlake. Some of them need some
workaround for arch_cpu_idle so create a bespoken one. Each workaround is
configured by kconfig setting.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-20 11:14:41 +01:00
Iuliana Prodan 9af6825874 nxp_adsp: linker: Add snippets to linker script
The xtensa/nxp_adsp_imx8m linker script is missing
the necessary include statements for linker snippets.
So we need to add them.

This fixes compile warnings like: orphan section `.unstable_id'
from `modules/chre/lib..__modules__lib__chre__platform__zephyr.a
(version.cc.obj)' being placed in section `.unstable_id'.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-11-20 11:13:44 +01:00
Iuliana Prodan 9cac089f8c nxp_adsp: linker: Fix _heap_sentry reference
Add _heap_sentry value to fix build errors for
newlib, like: "undefined reference to `_heap_sentry'"

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-11-20 11:13:44 +01:00
Iuliana Prodan 23c49e554a nxp_adsp: linker: Update linker scripts for C++ build
When linking, in crtbegin.o for C++ exception support, we pull in
the .tm_clone_table section.
Update the linker scripts to handle this, otherwise we get a
"warning: orphan section `.tm_clone_table'".

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-11-20 11:13:44 +01:00
Iuliana Prodan 24f2d2e136 nxp_adsp: linker: Rename text area variables
Use Zephyr's convention for text region start and end.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-11-20 11:13:44 +01:00
Iuliana Prodan edc0b7f352 board: xtensa: imx8m: Remove unnecessary configs
Remove unnecessary configs.
Some were moved to Kconfig.series from soc/.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-11-20 11:13:44 +01:00
Iuliana Prodan afc3606116 soc: xtensa: imx8m: Remove unused definitions
Remove unused macro definitions.

While here, use Zephyr's convention for
include guard.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-11-20 11:13:44 +01:00
Iuliana Prodan 85a1124d5d soc: xtensa: imx8m: Remove unused file
Remove platform.h since is no longer used for SOF.
Move memory.h to include folder and modify the linker
to reflect this.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-11-20 11:13:44 +01:00
Adam Wojasinski 4f1823c616 soc: arm: nordic_nrf: Add Kconfig symbol for new I2S instance
Add I2S 20 instance

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-11-20 09:24:05 +01:00
Natalia Pluta d7d11ef09f soc: arm: nordic_nrf: Add Kconfig symbols for QDEC instances
Add QDEC instances 20, 21, 130, 131

Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
2023-11-20 09:19:45 +01:00
Manuel Argüelles 2c9255fbba soc: nxp_s32: include soc.h instead of individual headers
The SoC header already includes the necessary device headers for
all SoC variants supported.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-16 17:53:43 +01:00
Manuel Argüelles 927445325c soc: nxp_s32: s32ze: include device headers in soc.h
To simplify the inclusion of device headers in common code for
NXP S32 devices, make sure all SoCs are including their respective
device headers. This PR adds the missing headers for S32Z/E.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-16 17:53:43 +01:00
Cong Nguyen Huu 8dcd61e36e soc: nxp_s32: pinctrl: update to RTD 1.0.0
Add alias "FEATURE_SIUL2_MAX_NUMBER_OF_INPUT"
for compatibility with with previous RTD versions.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-11-16 09:28:16 +01:00
Mulin Chao 76b0aab6cc soc: arm: npcx: fix clock reference of APB4/FIU1 buses
This CL fixes the clock reference of APB4/FIU1 buses by introducing new
Kconfig options.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-11-16 06:50:57 +00:00
Manuel Argüelles 1a05cfc03a soc: nxp_s32: consolidate part number options
Currently, the NXP S32 SoCs have three redundant Kconfig hidden
options to define the part number. To streamline this, we will
retain `CONFIG_SOC_PART_NUMBER` to store the part number as a
string and `CONFIG_SOC_PART_NUMBER_<part>` that can be selected
by the boards.

Furthermore, for drivers requiring conditional code compilation
based on the target SoC, they should utilize the series or SoC
config option as applicable, instead of the part number config.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-15 10:25:43 -06:00
Manuel Argüelles 8ca4f5b4a1 soc: nxp_s32: s32k3: drop M7 suffix from options
The existing S32K3 Kconfig options employ the `M7` suffix, which is
redundant given that all cores in this series utilize an Arm Cortex-M7
core. Therefore, we should remove it.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-15 10:25:43 -06:00
Manuel Argüelles 589f3f435b soc: nxp_s32: rename s32k to s32k3 for series alignment
To accommodate support for S32K1 devices, it is necessary to rename
the existing `s32k` directory, which currently houses support for
the S32K3 series, to align with the respective series names. This
adjustment is necessary given the distinct differences in core
architecture, MPU, peripherals, and other key aspects between
the two series.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-15 10:25:43 -06:00
Sebastian Bøe 6348a973c3 soc: arm: Remove CPU_HAS_NRF_IDAU's dependencies
CPU_HAS_NRF_IDAU is depending on SOC_SERIES_NRF91X and
SOC_NRF5340_CPUAPP.

This makes it more difficult to have an out-of-tree nrf SOC.

It is also an unnecessary dependency. There is no prompt for
CPU_HAS_NRF_IDAU, so it will not show up in menuconfig and it won't be
possible to enable it from a users Kconfig fragment.

The only way to enable it is to select it, and those that select this
option can themselves make sure that they only do so when appropriate.

Also, move NRF_SPU options out to SOC Kconfig files to also make
out-of-tree SoCs possible. With the added benefit of not polluting the
common soc/arm/Kconfig.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2023-11-15 12:15:49 +01:00
Jiafei Pan 8fe2c95807 soc: arm64: mimx8m & 9: define SOC name followed by Core name
In hal driver, MCUX_DEVICE is defined from CONFIG_SOC, so unify
MCUX_DEVICE definition with mcux-sdk.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2023-11-15 11:42:06 +01:00
Wojciech Sipak 9e44f59e9a drivers: pinctrl: add RZT2M driver
This adds a new driver for Renesas RZ/T2M.
The driver allows configuration of pin direction,
pull up/down resistors, drive strength and slew rate,
and selection of function for a pin.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-11-15 11:41:35 +01:00
Wojciech Sipak b1c83c0335 soc: Add support for RZ/T2M
This adds a new SoC: SOC_RENESAS_RZT2M
and a new board: rzt2m_startek_kit

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
Co-authored-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-11-15 11:41:35 +01:00
Jamie McCrae b4ce96d161 soc: arm: nordic_nrf: Imply XIP instead of select
This allows XIP to be disabled for applications that execute in
RAM, which do not need XIP support from flash

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-15 10:03:24 +01:00
Charles Dias 63ceeb3bba soc: arm: st_stm32: add support for stm32h7b0xx and stm32h7b0xxQ
Add Kconfig SoC configurations.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2023-11-15 10:02:06 +01:00
Chekhov Ma 2c13e53081 imx93: add lpuart1
imx93: add dts node and mmu region for lpuart1

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2023-11-14 07:10:59 -06:00
Daniel DeGrasse 5854821b65 drivers: mipi_dsi: add support for mipi_dsi_detach to dsi_mcux_2l
Add support for mipi_dsi_detach API to dsi_mcux_2l driver, and
update RT5xx SOC interface to enable halting clocks for the MIPI DPHY.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-14 09:22:59 +01:00
Manuel Argüelles 434a40470c drivers: mbox: nxp_s32: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.

Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-13 12:18:34 -05:00
Chekhov Ma 4e99da8599 imx93: change ccm driver to "imx-ccm-rev2"
i.MX93 share similiar register layout with i.MX RT11xx. Change ccm driver
to align with i.MX RT11xx, and make it easier to enable other drivers.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2023-11-13 10:51:12 -06:00
Manuel Argüelles b3f950c648 drivers: mdio: nxp_s32_netc: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.

Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-13 09:49:26 +01:00
Declan Snyder 2d1fdb5586 soc: nxp: rt1xxx: Enable NXP FlexRAM
Enable NXP FlexRAM in DTS and SOC code.

Do not configure flexram at runtime if the code is in the RAM.

Fix RT1060 DT to be more accurate.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-13 09:42:28 +01:00
Daniel Schultz a2f971795f soc: arm: ti_k3: am62x_m4: Lower Initialization level for init
Other drivers like the pinctrl_ti_k3 rely on a fully initialized system.
Move the am62x_init to an earlier stage than PRE_KERNEL_1 to keep both
PRE_KERNEL_{1,2} free for drivers.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2023-11-13 09:42:11 +01:00
Jason Kridner 26f30db8ad soc: arm: ti_simplelink: cc13x2x7_cc26x2x7: add caparray delta config
- Make caparray delta a Kconfig variable
- Set caparray delta for beagle_bcf at beagleconnect_freedom_defconfig

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
2023-11-11 18:49:25 -05:00
Declan Snyder fef0018cca soc: lpc55xxx: Support, enable, test NXP MRT
Support NXP MRT on LPC55XXX SOC series, enable on
lpcxpresso55s69_cpu0, add test overlay to counter basic api test

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-10 10:40:54 +01:00
Declan Snyder 93c59793c2 soc: rt6xx: Add NXP MRT
Add NXP MRT to RT6xx DT definition and add peripheral reset to soc.c

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-10 10:40:54 +01:00
Declan Snyder ff83745c9a soc: rt5xx: Enable NXP MRT
Enable NXP MRT on RT5xx soc and MIMXRT595_EVK board

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-10 10:40:54 +01:00
Manuel Argüelles 595a9c11c8 counter: nxp_s32_sys_timer: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.

Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 18:21:19 +01:00
Laurentiu Mihalcea 707759bd12 soc: xtensa: imx8: Add pinctrl support
This commit introduces support for pinctrl-related operations
on i.MX8QM/QXP.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea eb12bae048 soc: xtensa: imx8: Configuration cleanup
As the name suggests, this commit attempts to cleanup some
of the configurations for the i.MX8 series. This cleanup
consists of either relocating the configuration or removing
unnecessary configurations.

As a rule of thumb, SoC-specific configurations have been moved
to Kconfig.series. If the configuration is by default 'y' and
needs to be set to 'n' or it has a numeric value then it has
been moved to Kconfig.defconfig.series. Configurations that
are default 'n' and were also explicitly set to 'n' have been
removed. Also, enabling logging has been moved to the board
level to avoid having to force all boards based on the same
SoC to enable logging.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea ad7e858938 soc: xtensa: imx8: memory.h: Cleanup
This commit attempts to clean the memory.h header by doing
the following changes:
	1) Change the include guard to the standard
	ZEPHYR_....
	2) Remove unused macro definitions.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea f29d6edece soc: xtensa: imx8: Remove include/soc directory
Since platform.h is a SOF-specific header that's no
longer used there's no point in keeping the include/soc directory.
As such, move memory.h to include/ and modify the linker script
to reflect this location change.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Laurentiu Mihalcea a0ecc05cdf soc: xtensa: imx8: Split generic i.MX8 SoC into i.MX8QXP and i.MX8QM
This commit attempts to split the generic i.MX8 SoC into its
QXP and QM variants. As things are now, the i.MX8 SoC doesn't
have any NXP HAL files to back it up. As a consequence, the
native Zephyr drivers cannot be used.

To solve this issue, the generic i.MX8 has been split into
i.MX8QXP and i.MX8QM, each of them having different NXP HAL
files.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-09 18:21:05 +01:00
Yong Cong Sin e538b0e5a6 drivers: plic: support multiple instances for multi-level
Most of the public APIs in `riscv_plic.h`
(except `riscv_plic_get_irq` & `riscv_plic_get_dev`) expect the
`irq` argument to be in Zephyr-encoded format, instead of the
previously `irq_from_level_2`-stripped version. The first level
IRQ is needed by `intc_plic` to differentiate between the
parent interrupt controllers, so that correct ISR offset can be
obtained using the LUT in `sw_isr_common`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 18:20:43 +01:00
Declan Snyder 345f079e49 dts: bindings: Fix NXP USB bindings
NXP USB bindings were combined into one binding and using
a property corresponding to HAL enums which is improper use
of devicetree.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-09 15:34:39 +01:00
Mulin Chao f9a4a3597b soc: arm: npcx: move soc-specific register definitions to soc.h
This CL is to minimize `CONFIG_SOC_SERIES_XXXX` definitions when we
introduce a new chip series. Most of them are relevant to register
layouts in different npcx soc series. It moves soc-specific register
definitions from `reg_def.h` to its own soc.h file.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-11-09 10:20:39 +00:00
Manuel Argüelles 6744d6084d watchdog: nxp_s32: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.

Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 10:20:27 +00:00
Tim Lin f1dc11174c ITE: drivers/i2c: Add a property for I2C located channel
Add a property for I2C channel switch selection. This property will
write to the SMBxxCHS register according to the I2C node you selected,
which can make channel swapping.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-11-08 10:08:28 +01:00
Manuel Argüelles bda3b101d3 serial: nxp_s32: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics and defining the driver's ISR within the shim
driver itself.

Note that for some peripheral instances is needed to redefine the
HAL macros of the peripheral base address, since the naming is not
uniform for all instances.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-08 10:06:46 +01:00
Dmitrii Golovanov 82ec6394a1 soc: arm: Fix cmake linker.ld warning for arduino_uno_r4_minima
Fix cmake depreciation warning on pre-defined linker.id
(soc/arm/renesas_ra/ra4m1/linker.ld) used for arduino_uno_r4_minima.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-11-07 09:53:57 +01:00
Daniel DeGrasse 883f604f12 soc: arm: nxp_imx: rt11xx: allow user to disable CONFIG_ADJUST_DCDC
Allow user to disable CONFIG_ADJUST_DCDC for their board, rather than
selecting it at the SOC level. The symbol still defaults to enabled,
preserving existing behavior unless a user explicitly chooses to disable
it.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-07 09:48:35 +01:00
Manuel Argüelles 237ec65ad3 intc: nxp_s32: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of
devicetree instance-based macros because the NXP S32 HAL relies on an
index-based approach, requiring knowledge of the peripheral instance
index during both compilation and runtime, and this index might not
align with the devicetree instance index.

The proposed solution in this patch eliminates this limitation by
determining the peripheral instance index during compilation
through macrobatics.

Note that for some peripheral instances is needed to define the
HAL macros of the peripheral base address because there are gaps
in the instances or there are SoCs with a single instance.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-06 19:02:56 -05:00
Torsten Rasmussen ba7e6fa69f cmake: cleanup and simplify the standard include logic in Zephyr
Several paths are checked for existence before added as global Zephyr
include path.

The existence check was needed because some tooling emit warnings on
non-existing paths.

Only few SoCs are using those pre-defined paths, yet this code runs
for all SoCs. The principle originates back from Kbuild days, and with
CMake it's more common and generally more visible to let the CMake code
defining libraries to specify include paths.

Furthermore it appears that several SoC implementation following the
<soc-path>/include was unaware that the path would be automatically
added as include path, cause they contain lines like:
    zephyr_library_include_directories(include)

Remove pre-defineds path except the `<SOC_PATH>` path, which is
guaranteed to exists.
This simplifies the CMake logic in the top-level Zephyr CMakeLists.txt
file.

This cleanup further prepares for future work where SoCs need not to
be organised under architectures which is important for multi-arch SoCs.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-06 18:57:30 -05:00
Huifeng Zhang abde709b5e arch: arm: cortex_a_r: introduce USE_SWITCH
This commit introduce 'USE_SWITCH' feature into cortex-A/R(aarch32)
architecture

For introducing USE_SWITCH, the exception entry and exit are unified via
`z_arm_cortex_ar_enter_exc` and `z_arm_cortex_ar_exit_exc`. All
exceptions including ISR are using this way to enter and exit exception
handler.

Differentiate exception depth and interrupt depth. Allow doing
context switch when exception depth greater than 1 but not allow doing
this when interrupt depth greater than 1.

Currently, USE_SWITCH doesn't support FPU_SHARING and USERSPACE.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-11-06 15:32:01 -06:00
Charlie Xiong 8fe6e0130e boards: arm64: provide support for ROC-RK3568-PC
This is support for AArch64 development board.
The board uses 4-core Cortex-A55, which are based on
the ARMv8.2 architecture.
In addition,we support smp support and
it can use 4-cores to run basic samples.

Signed-off-by: Charlie Xiong <1981639884@qq.com>
2023-11-06 10:14:20 +01:00
Gerson Fernando Budke 3ed1c990dc soc: st: l010xb: Fix the number of IRQs
Change the NUM_IRQS value from 32 to 30 following the rm0451.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-11-06 10:14:10 +01:00
Gerson Fernando Budke 6e3bae727b soc: st: Add all missing stm32l010 SoCs
Add minimal SoC entries to enable the whole stm32l010 family.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-11-06 10:14:10 +01:00
Caspar Friedrich 8242ef0a37 soc: arm: st_stm32: stm32l0: Add support for STM32L081
Add support for the STM32L081xx soc series.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-11-06 10:11:40 +01:00
Declan Snyder 4d654250a5 soc: lpc55xxx: Fix system hw clock cycle rate
Commit c6e3bac4f changed the core clock frequency of LPC55XXX series.
That clock is used by the cortex-m systick timer, which is the
default timer used for system time in zephyr on this series.
The bug is that the config SYS_CLOCK_HW_CYCLES_PER_SEC default was not
updated on the affected platforms to account for this change, so system
time is currently recorded as 150% of reality. Fix this by changing the
kconfig to be set automatically at SOC level and remove board defaults.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-06 10:11:25 +01:00
Grzegorz Swiderski e4448ed498 soc: mimx8mm6_m4: Restore linker script
For this SoC, an additional section is conditionally included on top of
the default linker script for Cortex-M. Set `SOC_LINKER_SCRIPT` to the
local `linker.ld`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-11-06 10:10:55 +01:00
Daniel DeGrasse 29ab2b13f6 drivers: ipm: Remove CONFIG_IPM_IMX_REV2
Remove CONFIG_IPM_IMX_REV2, as this Kconfig is no longer needed. The
driver can now be enabled with CONFIG_IPM_IMX.

Update NXP HAL to remove this Kconfig as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-06 10:09:59 +01:00
Daniel DeGrasse 8d5322b8ff drivers: ipm: remove nxp,imx-mu-rev2 compatible
Remove nxp,imx-mu-rev2 compatible. This IP block is the same as the
nxp,imx-mu device, and should be handled by the same compatible

Instead, use CONFIG_HAS_MCUX to determine which HAL APIs should be used
to interact with the messaging unit IP.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-06 10:09:59 +01:00
Torsten Rasmussen e57f0a4f7e cmake: x86: update x86 SoC to use SOC_LINKER_SCRIPT variable
This commit updates all x86 SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Torsten Rasmussen 4b02bbc329 cmake: xtensa: update xtensa SoC to use SOC_LINKER_SCRIPT variable
This commit updates all xtensa SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Torsten Rasmussen 2d96b31129 cmake: sparc: update sparc SoC to use SOC_LINKER_SCRIPT variable
This commit updates all sparc SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Torsten Rasmussen 10fea41f5c cmake: riscv: update riscv SoC to use SOC_LINKER_SCRIPT variable
This commit updates all riscv SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Torsten Rasmussen 59bcef3692 cmake: posix: update posix SoC to use SOC_LINKER_SCRIPT variable
This commit updates all posix SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Torsten Rasmussen 5130a69987 cmake: mips: update mips SoC to use SOC_LINKER_SCRIPT variable
This commit updates all mips SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Torsten Rasmussen 84e4f62e5b cmake: arm64: update arm64 SoC to use SOC_LINKER_SCRIPT variable
This commit updates all arm64 SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Torsten Rasmussen 4812884f84 cmake: arm: update arm SoC to use SOC_LINKER_SCRIPT variable
This commit updates all arm SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Torsten Rasmussen b2de93cff6 cmake: arc: update arc SoC to use SOC_LINKER_SCRIPT variable
This commit updates all arc SoCs to set SOC_LINKER_SCRIPT CMake
variable to point to active linker script directly.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-03 11:01:23 +01:00
Rander Wang a4b9692155 soc: intel_adsp/cavs: add secondary dsp context save support
Save secondary dsp context when it is powered off in idle thread
and restore it when the secondary dsp is powered up. The algorithm
is aligned with ace platform.

Tested on a tgl platform.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-02 07:29:38 -04:00
Torsten Rasmussen b31afe1d27 sparc: add SPARC dependency to SPARC_CASA
Settings which defaults to `y` but is architecture related should have
a arch dependency for safety reasons.

Thefore add `if SPARC` to the SPARC_CASA Kconfig to ensure this setting
is only enabled on the sparc arch.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-02 09:48:16 +01:00
Rander Wang 0891448ac9 soc: intel_adsp: don't enable interrupt before k_cpu_idle
Fix a bug on cavs platform that secondary core is not powered off
by SET_DX ipc message sometimes. Secondary core is set into idle
state when switching to SOF_OFF state and then halted by primary
core. The interrupt is enabled before entring idle state, so the
secondary core may be woken up by interrupt and soc_cpus_active
is set to true before it is halted by hardware power gating. This
result to error when SOF check soc_cpus_active after the secondary
is halted.

This patch doesn't enable interrupt before idle entry to avoid above issue.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-02 09:45:55 +01:00
Torsten Rasmussen 3e82eb976e soc: move arm cortex_m common mpu code to arch/arm/core/mpu
Locate common mpu code together with other arm / nxp mpu code in the
arch folder where it logically belongs.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-11-02 09:45:18 +01:00
Ederson de Souza 928e22c302 soc/riscv/riscv-ite/it8xxx2: Support DEVNULL_REGION
it8xxx2 uses a custom linker script, which was not updated on
dfb3674c4c. This patch naively updates it
to support DEVNULL_REGION.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2023-11-01 18:48:24 -04:00
Mike J. Chen 385ceb7145 soc: xtensa: nxp_adsp: rt595: move .noinit
Mark .noinit section as NOLOAD and move it
next to the other NOLOAD sections. This way
it is removed from a generated image that is
embedded in the rt595 app image.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-11-01 11:19:02 +00:00
TOKITA Hiroshi a9e49918cf drivers: interrupt_controller: Add icu driver for Renesas RA series
To avoid complicating the initial code for supporting the SoC,
I have implemented only the bare minimum for now.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
TOKITA Hiroshi 04b723e900 drivers: pinctrl: Add pinctrl driver for Renesas RA series
To avoid complicating the initial code for supporting the SoC,
I have implemented only the bare minimum for now.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
TOKITA Hiroshi 1741b3a356 drivers: clock_control: Add clock driver for Renesas RA series
Add initial support for Renesas RA clock generation circuit.

It returns a fixed value to simplify the first commit to get the UART
working now.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
TOKITA Hiroshi 5ccc0eb319 soc: arm: add support for Renesas RA4M1 series SoC
Add essential support for RA4M1 Series.
It only defines `r7fa4m1ab3cfm` currently.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-11-01 10:56:46 +00:00
Yong Cong Sin d7302f417e irq: relocate multi-level irq out of irq.h
Relocate multi-level interrupts APIs out of `irq.h` into
a new file named `irq_multilevel.h` to provide cleaner
separation between typical irq & multilevel ones.

Added preprocessor versions of `irq_to_level_x` as `IRQ_TO_Lx`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-30 11:43:39 -04:00
Andriy Gelman d0961756a6 drivers: watchdog: Add xmc4xxx support
Adds watchdog support for Infineon xmc4xxx MCUs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-27 12:58:07 -05:00
Mike J. Chen ca19b40733 soc: arm: nxp_imx: rt5xx: make some clock init functions weak
Allows a board to provide their own functions if
they wish to init clocks differently.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-10-27 10:51:28 +02:00
Flavio Ceolin 76cb2a54f5 intel_adsp: Do not include device_runtime header
Device runtime header is not needed in intel_adsp_ipc header.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-27 10:51:14 +02:00
Daniel Leung 1fac5ed2a6 soc: xtensa/nxp_adsp: put guard in Kconfig.defconfig
This adds a if CONFIG_SOC_FAMILY_NXP_ADSP guard in
Kconfig.defconfig for nxp_adsp. Or else all of its default
get applied everywhere. For example, qemu_xtensa fails
kernel.logging.message_capture tests because
CONFIG_TEST_LOGGING_DEFAULTS is disabled in
nxp_adsp/Kconfig.defconfig which should not have applied
to qemu_xtensa at all. So put a guard in there.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-26 19:16:53 -04:00
Anas Nashif 51f6c4269b soc: microchip_mec: do not enable PM in soc
PM should not be enabled by default at the soc level. This is an
application decision and not a platform decision whether to enable or
disable PM features.

Enabling PM by default will result in descripencies and test scope and
failures in tests that do not account for PM being enabled.

Fixes #60359

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-26 12:28:18 -05:00
Erwan Gouriou 54fa6f30b8 soc: stm32: Enable Debug in stop mode when ZTEST is used
Force STM32_ENABLE_DEBUG_SLEEP_STOP option when running tests.
This option enables Debug in Sleep/stop states and disables it when
disabled (default state).

When disabled, it may be impossible to flash the device with runner
such as openocd. It's generally working using cubeprogrammer, but it might
fail as well with fault configuration.

Instead of fixing each test or breaking CI each time a new test is created
with CONFIG_PM=y, force this option to be enabled when ZTEST=y (as it was
already the case when DEBUG=y).

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-26 09:49:42 +02:00
Manuel Argüelles a7bda08960 nxp: s32ze: take exceptions in Arm mode
Cortex-R52 supports both Arm and Thumb-2 mode, but Zephyr's ASM
code for Armv-8 Aarch32 is written for Arm mode only. This Soc
has a general purpose register that can set the core TEINIT signal
to change the mode exceptions are taken before booting up the core.
The debugger startup scripts or firmware booting up the core may
configure this bit to Thumb mode, as is the case of the NXP S32 debug
probe startup scripts for S32ZE.

Due to above reason, clear SCTLR.TE bit at reset so that TEINIT value
is ignored and exceptions are always taken into Arm mode, compatible
with current Zephyr ASM code. At least until taking execeptions in Thumb
mode is supported in Zephyr.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-10-25 18:14:51 -07:00
Michael Arnold 973e226bfd arch: Enable ramfunc feature on RISC-V PRIVILEGE SOC family
Allow to place functions in ram.

Signed-off-by: Michael Arnold <marnold@baumer.com>
2023-10-25 17:35:07 +02:00
Dmitry Lukyantsev 357d6cec45 boards: Add support for the NXP MIMXRT595 DSP core
Add board and soc files for the NXP MIMXRT595 DSP core.

Signed-off-by: Dmitry Lukyantsev <dmitrylu@google.com>
2023-10-25 09:55:10 -04:00
Dmitry Lukyantsev 0ae68a3857 soc: nxp_adsp: Refactor imx8/imx8m Kconfig
In preparation for RT500 ADSP enablement, consolidate common Xtensa
configuration parameters in top level Kconfig.defconfig.

Signed-off-by: Dmitry Lukyantsev <dmitrylu@google.com>
2023-10-25 09:55:10 -04:00
Sylvio Alves 3f5ea785f2 linker: esp32: fix linker to enable proper MMU usage
ESP32 flash_mmap() function requires `_rodata_reserved_start` address
to be at the beginning of RODATA. This allows adding memory-mapped flash
areas.

Fixes #52764

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-10-25 09:57:48 +02:00
Bjarki Arge Andreasen 9b21d4d366 soc: sam: Add poweroff implementation
This commit adds an implementation of poweroff, which first
uses SUPC to enable all defined wakeup sources (except for
sam4l), followed by entering backup mode.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-24 11:35:43 +02:00
Bjarki Arge Andreasen 312c8b1930 soc: sam: Add SUPC driver and dts model
This commit adds a driver and dts model for the ATMEL SAM
SUPC component.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-24 11:35:43 +02:00
Nikodem Kastelik a4cbe9e9c6 soc: arm: nordic_nrf: align nrf_power calls to new scheme
Now the API to manage GPREGRET register is unified for all devices
having one or more GPREGRET entries.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2023-10-24 11:13:53 +02:00
Nikodem Kastelik f3f2c113d1 soc: arm: nordic_nrf: nrf53: align nrf_regulators calls to new scheme
Now more generic regulators API is available.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2023-10-24 11:13:53 +02:00
Joakim Andersson 17fd1f8fba boards: Enable TF-M by default for nordic SoC NS boards
Enable TF-M by default for nordic nRF5340 and nrf9160 SoC boards.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-10-24 09:40:16 +02:00
Joakim Andersson 33a44d0ed8 tfm: nordic_nrf: Add generic SoC support for nordic SoCs
Add generic SoC support for the supported nordic SoCs:
- nrf5340
- nrf9160
- nrf9120

Add generic SoC support by taking board specific configurations from
zephyr devicetree and kconfig.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-10-24 09:40:16 +02:00
Alberto Escolar Piedras 9834fabe2d nrf53: Correct sync_rtc kconfig dependencies for simulation
Let's make the sync_rtc kconfig depend on the SOC_COMPATIBLE
options which are set both by the real and simulated targets,
so this code works in the same way for both.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:20:09 +02:00
Alberto Escolar Piedras 32d0c8d8e5 nrf53: Refactor sync RTC options to their own file
So they can be reused by the simulated board

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:20:09 +02:00
Tomasz Leman adf6d0e3d8 soc: intel_adsp: lpsram enable retention mode
This patch enables memory retention mode on lpsram.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-10-20 15:12:53 +02:00
Tomasz Leman eeb4f2f76d soc: intel_adsp: hpsram enable retention mode
This patch enables memory retention mode on hpsram.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-10-20 15:12:53 +02:00
Tomasz Leman 16f729214b soc: intel_adsp: lpsram init refactor
This patch contains small refactor of lpsram init function (defines
registers and adds new macro).

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-10-20 15:12:53 +02:00
Tomasz Leman 112611378f soc: intel_adsp: hpsram init refactor
This patch reuse existing macro for better readability.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-10-20 15:12:53 +02:00
Jun Lin e5e599c100 soc: npcx: add HAS_PM to npcx4
The Kconfig option HAS_PM, which must be needed for SoCs providing PM
hooks, is missing in npcx4.
This commit adds it to soc/arm/nuvoton_npcx/npcx4/Kconfig.series.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-10-20 15:11:14 +02:00
Tim Lin 35e3dfed2d ITE: soc: Add the variant of it82002aw
This variant uses the same die as IT82202/IT82302 series and has
a pinout compatible with IT513xx series packages.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-10-20 15:07:28 +02:00
Adam Wojasinski 5685af0923 modules: hal_nordic: Add support for new TWIM instances
Add Kconfig and symbols for twim: 20-22, 30, 121, 130-137 instances

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:04:10 +02:00
Adam Wojasinski 5c1daef5ab drivers: spi: nrfx: Add SPIM Kconfig symbols for new instances
Add support for upcomming SPIM instances.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:03:17 +02:00
Daniel Leung 7a7aeb21e2 boards: qemu_xtensa: use dc233c core
This changes qemu_xtensa to use dc233c core instead of
sample_controller. The sample_controller uses a very
basic configuration which lacks features usually needed
in real world applications. Instead, use the dc233c core
as the base for qemu_xtensa so we can use QEMU to cover
more of our code path.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-20 15:00:14 +02:00
Niek Ilmer 9e6b1d5ba6 SOC: Smartbond: Add DA14695
This commits adds the DA14695 variant.
The main difference with the DA14699 is a smaller package with less
GPIO.

Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2023-10-20 14:51:49 +02:00
Sylvio Alves 4b5331ba45 linker: esp32: move snippets-section within rom boundary
This will guarantee that application snippets will be placed
into ROM section properly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-10-13 13:10:22 +03:00
Peter Ujfalusi 8dfa116750 drivers: dma: intel-adsp-hda: Correct DGCS:SCS bit for 32bit sample size
If the channel was used for 16bit in the once, subsequent 32bit sample size
audio will be broken since the SCS bit remains set.

Example sequence with SOF:
normal audio playback with 16bit
ChainDMA audio playback with 16bit
normal audio playback with 16bit

The last playback results garbled audio.

Introduce intel_adsp_hda_set_sample_container_size() helper function
to handle the SCS bit and use it in the driver.


Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-10-12 17:31:23 +03:00
Nazar Palamar 4d76e26f17 drivers: pinctrl: Update Infineon CAT1 pinctrl driver
- if we have input enable use CY_GPIO_DM_xxxx else
CY_GPIO_DM_xxx_IN_OFF;

- added bias_high_impedance option

- Updated HIGHZ drive mode, now it sets if:
--- we have bias_high_impedance
--- or if input_enable and no addition bias mode

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-10-12 15:17:35 +03:00