Commit graph

4495 commits

Author SHA1 Message Date
Gerard Marull-Paretas 0cb51de315 soc: nordic_nrf: add support for EGU020
Add support for EGU020.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-27 12:36:54 +01:00
Gerard Marull-Paretas f77b30fa17 soc: nordic_nrf: add support for RTC130-131
Add new Kconfig options for RTC130-131 so that the new instances can be
used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-27 12:36:54 +01:00
Gerard Marull-Paretas 07d961c112 soc: nordic_nrf: add support for TIMER020-022|120-121|130-137
Add new Kconfig options so that new TIMER instances can be used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-27 12:36:54 +01:00
Dino Li 6b0b63b3a7 ITE: drivers/i2c target mode: Fix racing condition
The finish interrupt after the previous transaction is completed may
occur in the next transaction. To do hardware reset at this time could
potentially lead to the failure of the transaction.
Therefore, removing the hardware reset upon completing the transaction
helps to avoid a race condition.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-02-26 11:54:13 +00:00
Daniel DeGrasse 9a96a0c50d soc: arm: nxp_imx: fix flexspi frequency setting for iMXRT11xx SOC
Commit a10fee2d5e (drivers: clock_control: ccm_rev2: add support for
reclocking FlexSPI) introduced the ability to set the FlexSPI
clock frequency at runtime on RT11xx series SOCs. However, this
implementation resulted in the clock frequency being rounded up, not
down. This can result in flash clock frequency violations on some
flash parts, causing the system to crash when running in XIP mode.

Fixes #69088

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-17 14:18:43 +01:00
Gerard Marull-Paretas f0fe6b8833 soc: riscv: nrf54h: fix VPR core dependencies
The actual RISC-V core needs to select RISCV, and specific SoC CPU
depend on it.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-13 15:15:45 +01:00
Kai Vehmanen a8af622f68 soc: xtensa: intel_adsp: restore bootctl with per-core state
When exiting PM_STATE_SOFT_OFF, the primary core state is always
used to restore bootctl register and the clock and power gating
settings.

This can lead to problems if non-primary core is powered up and down
many times before primary core 0 is powered down the first time.
The saved state in core_desc[0].bctl will be null, and as a result-
power gating and clock gating is not disabled correctly for
non-primary cores.

Link: https://github.com/thesofproject/sof/issues/8642
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-02-13 11:13:05 +01:00
Flavio Ceolin 5b9f7b7b32 intel_adsp: ace: Remove dead code
ace/boot.c is ace specific file and RESET_MEMORY_HOLE symbol is never
defined for this target.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-02-06 12:59:42 +01:00
Gerson Fernando Budke 5903c7a669 drivers: watchdog: sam0: initialize GCLK2 in wdt_sam0_init
Initialize GCLK2 to output 1.024kHz required by watchdog timer.

Co-authored-by: Vlad Laba7 <vlad@laba7.com>
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-02-05 13:27:54 +01:00
Anas Nashif d7678f1694 xtensa: move to use system cache API support for coherency
Remove custom implementation and use system cache interface instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-02-03 13:42:33 -05:00
Grant Ramsay 211ddf1c7e soc: arm: xilinx_zynqmp: Add "Execute Never" MPU flag to non-code RAM
Executing from RAM sections other than rom/code should cause a fault.
This is tested as part of the kernel mem_protect tests.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-02-02 17:05:01 -06:00
Gerard Marull-Paretas 426bbf5649 soc: riscv: nordic_nrf: nrf54h: introduce PPR support
Add support for the nRF54H PPR (Peripheral Processor), based on the VPR
RISC-V core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas ba16e3dd13 soc: riscv: nordic_nrf: add initial support for VPR core
Add initial support for the VPR RISC-V core found in the new nRF54 SoCs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas 1a6b88608e soc: arm: nordic_nrf: move Kconfig.peripherals to common folder
Because RISC-V cores also need to include this file, so it is no longer
ARM specific.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Gerard Marull-Paretas d7dc942382 soc: common: nordic_nrf: move pinctrl_soc.h to a common dir
Because both, RISC-V and ARM cores share the same pinctrl driver. The
top level common folder will disappear with the introduction of HWMv2,
where multi-arch SoCs will be well supported.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 976de4edbe drivers: serial: nrfx: Allow new UARTE instances to be used
Extend Kconfig definitions and nrfx_config translations so that UARTE
instances that are available in nRF54H20 can be used.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Grzegorz Swiderski be8b2663c6 modules: hal_nordic: Integrate nrf-regtool
nrf-regtool is a Python utility from Nordic Semiconductor, which is used
for generating binary files with register values for given peripherals.
It sources the descriptions of peripheral registers from CMSIS-SVD files
(typically ones bundled with nRF MDK).

For some peripherals, such as UICR, nrf-regtool supports parsing values
from devicetree as well, based on the bindings already found in Zephyr.

Currently, this tool is not submitted as a script to Zephyr, but it can
be installed from PyPI.

Having nrf-regtool installed is recommended when working with nRF54H20.
Booting the Application or Radiocore CPU requires flashing not only its
firmware, but also its respective UICR instance. On this SoC, the UICR
is used to assign ownership of global hardware resources, including
memory and peripherals, to individual cores. The Zephyr build system can
call nrf-regtool to generate the UICR based on devicetree, to reflect
the boot-time hardware configuration required for a given application.
The generated `uicr.hex` is then merged with `zephyr.hex`, so that they
can be flashed together using west.

The build system integration takes the form of a CMake package, which
includes a version check and reusable components; over time, some of
these components can be reused by sysbuild. This package is located in
the `hal_nordic` module, because it depends on the `SOC_SVD_FILE` CMake
variable, which is defined there as well.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek abb0934def soc: nordic: Add initial support for nRF54H20 EngA
Add nrfx and Kconfig related infrastructure plus SoC initialization
code to allow building for nRF54H20 targets (Application and Radio
cores).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 2efd34bda3 modules: hal_nordic: nrfx_glue: Include cmsis_core_m_defaults.h
... to cover missing __ICACHE_PRESENT and __DCACHE_PRESENT symbols that
should be defined in MDK files.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Manuel Argüelles 1b302f51ea soc: arm: nxp_s32: s32k1: add support for RTC
Add support for the Real Time Clock (RTC) counter.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-02-02 12:43:00 +01:00
Martin Åberg f033f31728 soc/gr716a: Enable SPIMCTRL support on LEON GR716A
GR716A has two SPIMCTRL SPI controllers.

This adds the SPIMCTRL description to the DTS and makes the SPI
option available in the kernel configuration.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-02-01 14:06:38 +01:00
Daniel DeGrasse a10fee2d5e drivers: clock_control: ccm_rev2: add support for reclocking FlexSPI
Add support for reclocking flexspi in ccm_rev2 driver. Clock update
functions are provided for the RT11xx.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-01 10:57:35 +01:00
Daniel DeGrasse f81113e948 drivers: clock_control: add support for FlexSPI reclock on NXP iMX RT10XX
Add support for reclocking the FlexSPI on NXP iMX RT10XX. This
functionality requires an SOC specific clock function to set
the clock rate, since the FlexSPI must be reset directly
before applying the new clock frequency.

Note that all clock constants are defined in this commit, since the
memc flexspi driver now depends on a clock node being present.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-01 10:57:35 +01:00
Dino Li a059da947c soc/it8xxx2: add support for raising EC bus to 24MHz
This change was made to reduce read/write EC registers latency.
Without enabling CONFIG_SOC_IT8XXX2_EC_BUS_24MHZ:
- Read EC register 64 times takes 80us latency.
- Write EC register 64 times takes 60us latency.
With enabling CONFIG_SOC_IT8XXX2_EC_BUS_24MHZ:
- Read EC register 64 times takes 40us latency.
- Write EC register 64 times takes 30us latency.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-01-31 16:43:46 +00:00
Andrzej Głąbek eb78b71914 soc: arm: nordic_nrf: Clean up and unify a bit cmake code
Consistently use `zephyr_library*` cmake functions for all nRF Series
and set the Cortex-M linker script in a common place for all of them.
Remove no longer needed include directories.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-01-31 09:40:48 -06:00
Magdalena Pastula e4aebf9cea soc: arm: nordic_nrf: align soc_secure.h to nRF54L
In nRF54L15 FICR can be accessed also from non-secure code,
so it does not have NRF_FICR_S defined.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Witold Lukasik 1d9f702260 soc: arm: nordic_nrf: add support for Nordic nrf54l family
Add soc files for new Nordic family.

Signed-off-by: Witold Lukasik <witold.lukasik@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Witold Lukasik a5eeb6d6db soc: arm: nordic_nrf: add source code for validating rram partitions
RRAM is a part of nRF54L15 SOC.

Signed-off-by: Witold Lukasik <witold.lukasik@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Magdalena Pastula a6bd4dbc33 soc: arm: nordic_nrf: add nRF54L15 peripherals instances
Add support for nRF54L15 instances of UARTE, TIMER and WTD.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Magdalena Pastula 70b21845b2 soc: arm: nordic_nrf: add support for nRF54L15 GRTC instance
Add GRTC as possible clock source.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Witold Lukasik daa888c37b soc: arm: nordic_nrf: move NRF_RTC_TIMER not to be selected as default
NRF_RTC_TIMER will not be a default timer in the next
version of Nordic timer. It should be soc selection specific.

Signed-off-by: Witold Lukasik <witold.lukasik@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Ian Morris b1a15718aa dts-bindings: pinctrl: renesas_ra: enabled config of i/o ports 4-7
The RA_PINCFG macro is used to generate a value that can be written
directly to the pin function select register. In addition to the pin
function this value also contains port and pin number information,
located in bit fields that are unused by the register. The bit field
used to store the port information consists of 3-bits. However, a typo in
the mask definition limited the field to two bits meaning only ports 0-3
could be configured. This patch resolves the issue, allowing ports 0-7 to
be configured. If the port is greater than 7 another field (port4) is used
to store an additional bit (allowing an additional 8 ports to be
supported). However, use of this field has not yet been implemented.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-01-30 15:38:51 -05:00
Andriy Gelman c7dab3df08 drivers: can: Add xmc4xxx CAN support
Adds CAN drivers for XMC4xxx SoCs.

XMC4xxx has multiple CAN nodes. The nodes share a common clock and
a message object pool.

The CAN nodes do not have a loopback mode. Instead there is an
internal bus which can be used to exchange messages between
nodes on the SoC. For this reason tests/samples which rely on the
loopback feature have been disabled.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-01-30 19:06:06 +01:00
Navinkumar Balabakthan 05c38cb2f5 soc: arm64: intel_socfpga: changes in system_manager
SOCFPGA_SYSMGR_REG_BASE base address now read from Device tree

This commit changes the way the SOCFPGA_SYSMGR_REG_BASE base address is
determined. Previously, the address was hard-coded in the system_manager
source file. This commit changes the code to read the address from the
Device tree. This makes the code more flexible and allows the base
address to be different for different boards.

Signed-off-by: Navinkumar Balabakthan <navinkumar.balabakthan@intel.com>
2024-01-30 18:01:31 +01:00
Guillaume Gautier 6b681bcbcc soc: arm: stm32wba: add support for standby mode with ram retention
Add support for STM32WBA Standby low-power mode with RAM retention.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-01-30 18:01:00 +01:00
Flavio Ceolin 3e5a593de9 intel_adsp/cavs: power: Fix INTLEVEL value
In pm_state_set we can't just call k_cpu_idle() because
this will clear out PS.INTLEVEL. Use k_cpu_atomic_idle instead
since Zephyr's expect interruptions to be locked after pm_state_set.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-01-30 10:28:57 -06:00
Flavio Ceolin ff43667497 intel_adsp/ace: power: Restore PS after power gate
We are arbitrarily setting a value to PS after power gates and
losing valid information like OWB, CALLINC and INTLEVEL.

We need to properly save/restore them to avoid possible wrong behavior.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-01-30 10:28:57 -06:00
Sharad Patil 296c1e4768 soc: Added Support for Silabs EFR32MG12P432F1024GL125
Added support in board directory for EFR32 MG12 BRD4161A board

Signed-off-by: Sharad Patil <p.sharad@capgemini.com>
2024-01-30 08:46:25 +01:00
Declan Snyder a37bd8e7ba soc: rt5xx: Restore ISP pins state in soc init
ROM configures the ISP boot pins as gpio to determine what boot mode to
be in. But some ROM revisions have a bug where they do not restore the
reset state of these pins before booting application. This can cause
power leakage on these pins and is not an intended configuration from
Zephyr user/board point of view, so restore the reset state as part of
early SOC init (disable the pins). Configuration of pins should be
left up to app/board devicetree.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-01-29 17:15:01 +00:00
Mahesh Mahadevan b8bdc60427 soc: nxp: rt5xx: Remove deepsleep pin changes
SOC level code should not be dynamically changing pin configurations.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-01-29 17:15:01 +00:00
Tyler Ng 432f4a0b9a soc/riscv/opentitan: Kconfig.defconfig.series: Set NUM_IRQS to 256
The OpenTitan PLIC has support for up to 255 interrupt vectors, so
set it to that. Previously was set to number of IRQs used.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2024-01-26 19:34:09 -06:00
Ren Chen 9dfd368165 it82xx2/usb: disable 15K-ohm default pull-down if device isn't enabled
There is default 15K-ohm pull-down for USB controller.
To disable the default pull-down to avoid signal contention in GPIO mode.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-01-26 22:26:55 +00:00
Erwan Gouriou 3d0c391ff2 soc: stm32: PM: Disable jtag port pins if no debug
At chip startup, jtag pins are configured by default to enable
debug.
This configuration adds consumption and when using PM profile,
we can save ~40uA by resetting this configuration and setting pins
to analog mode.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-01-26 15:52:38 +00:00
Jan Bylicki 6400e3f437 drivers: pinctrl: Add ZynqMP / Mercury XU pinctrl support
Add a pinctrl driver for the ZynqMP SoC and the
Mercury XU board powered by it.

Signed-off-by: Jan Bylicki <jbylicki@antmicro.com>
2024-01-26 12:47:11 +01:00
Daniel Leung cc25637126 soc: intel_adsp/ace: fix assert for uncached pointer
Only when CONFIG_MP_MAX_NUM_CPUS > 1, then .bss is put in
uncached region. Otherwise, .bss is in cached region.
So the assertion that g_key_read_holder must be in uncached
region must take into account how many CPUs are enabled on
build.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-25 20:12:28 +01:00
Manuel Argüelles f38b01c7ac soc: arm: nxp_s32: s32k1: enable watchdog driver
Enable on-chip watchdog driver support for S32K1 devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-25 18:26:25 +00:00
Kai Vehmanen f6995feae9 soc: xtensa: intel_adsp: cavs: fix XCC build
Commit 3b99fb1b4a ("xtensa: do not imply atomic ops kconfig") removed
ATOMIC_OPERATIONS_ARCH at xtensa arch level. This triggers a bug in
intel_adsp cavs builds with XCC compiler as
CONFIG_ATOMIC_OPERATIONS_BUILTIN is not defined but neither is
CONFIG_ATOMIC_OPERATIONS_ARCH anymore, resulting in failed builds.

Fix the XCC build by defining CONFIG_ATOMIC_OPERATIONS_ARCH at
soc level.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-01-25 17:54:26 +01:00
Adrien MARTIN c1ae6e5b4e soc: stm32g0: add fdcan2
The STM32G0 soc has 2 CAN controllers. The 2nd on was not working
with zephyr yet as both controllers shares the same IRQ. Recently, the
shared irq system was integrated on now, both can controllers can work
on this chip. Shared interrupts must be enabled only if both can
controllers are enabled.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2024-01-25 16:01:40 +00:00
Greter Raffael 33ffe001f8 linker: Generate snippets files for dtcm and itcm
This allows to link code and data blocks, e.g. the vector table, into
tightly coupled memory using `zephyr_linker_sources`.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-01-24 22:10:11 -06:00
Tim Lin 8317f9ea4f ITE: drivers/gpio: Add keyboard-controller property
When set, this GPIO controller has pins associated with the
keyboard controller. In this case the reg_gpcr property is
overloaded and used to write the keyboard GCTRL register

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-01-24 21:48:12 +01:00
Sateesh Kotapati a03c1ace6b gecko: service files updated | Update to GSDK 4.4.0
Updated the files present in device_init, hfxo_manager, power_manager
and sleeptimer folder as per latest version of gecko_sdk.
Added SL_DEVICE_INIT_HFXO_PRECISION in sl_device_init_hfxo_config.

Signed-off-by: Sateesh Kotapati <sateesh.kotapati@silabs.com>
2024-01-24 13:23:00 +01:00
Laurentiu Mihalcea 033d87d53f soc: mimx9: Remove SAI and EDMA static mappings
With the introduction of the SAI and EDMA drivers, there's
no longer a need to map the MMIOs using the mmu_regions.c
method since this is taken care of by the drivers via
device_map(). As such, remove entries for EDMA and SAI from
mmu_regions.c.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-24 10:43:19 +01:00
Gerard Marull-Paretas 68799d507d arch: riscv: make __soc_is_irq optional
It looks like all SoCs in tree check if an exception comes from an IRQ
the same way, so let's provide a common logic by default, still
customizable if the SoC selects RISCV_SOC_ISR_CHECK.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Gerard Marull-Paretas 49e2bc69a2 arch: riscv: add RISCV_HAS_(C|P)LIC from soc/riscv
Because these are general RISC-V options, not soc specific.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Gerard Marull-Paretas 2dcbb0ee3f soc: riscv: make RISCV_HAS_(C|P)LIC promptless
These options are meant to be selected by SoC series supporting
(C|P)LIC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Anas Nashif 6df6935b67 intel_adsp: ace: do not use external kconfigs in code
use CONFIG_SOC_INTEL_ACE15_MTPM instead of CONFIG_ACE_VERSION_1_5.

CONFIG_ACE_VERSION_1_5 leaked from SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-22 17:02:47 -05:00
Pieter De Gendt 1c190045b3 soc: arm: atmel_sam: samv71: Rework clock_init
Update clock_init for the Atmel SAMV71 SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt 23edb87cab soc: arm: atmel_sam: same70: Rework clock_init
Update clock_init for the Atmel SAME70 SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt 5bba8dd101 soc: arm: atmel_sam: sam4e: Rework clock_init
Update clock_init for the Atmel SAM4E SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt 89f23f7947 soc: arm: atmel_sam: sam3x: Rework clock_init
Update clock_init for the Atmel SAM3X SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt a69d611de8 soc: arm: atmel_sam: sam4s: Rework clock_init
Update clock_init for the Atmel SAM4S SoC using the new PMC API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Pieter De Gendt 20f1f44120 soc: arm: atmel_sam: common: Add PMC API for clock management
Add functions to Atmel SAM SoC PMC API. This is an effort to hide
most of the internal registers used in different SAM families.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-01-22 09:47:21 +00:00
Gerson Fernando Budke e9b26b5eb6 soc: sam0: samd: Fix switching between clocks
The clock z_arm_platform_init hangs switching between clocks when using
MCUboot. This fixes the issue using the 8MHz internal clock as gclk_main
source when configuring PLL/DFLL.

Fixes: #67220

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-01-20 14:36:30 +01:00
Ryan McClelland 2ee2b6ac08 drivers: spi: dw: remove HAS_SPI_DW Kconfig
The HAS_SPI_DW Kconfig is rather unncessary. If the synopsys designware
spi is to be included. It should come from the devicetree.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-01-20 13:11:42 +01:00
Gerard Marull-Paretas 48dbcf5479 soc: riscv: remove empty soc.h files
Because they're just not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 788fda525a soc: riscv: virt: reduce the scope of SIFIVE_SYSCON_TEST
It was used nowhere else, there's no need to expose it publicly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 874513439b soc: riscv: sifive_freedom: move PRCI base address to prci.h
Instead of soc.h. This likely needs to be DT-ized at some point.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas cce467034f soc: riscv: opentitan: reduce the scope of some definitions
Some definitions were only used in soc.c, there's no need to expose them
in a public header like soc.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 95c573f02e soc: riscv: openisa_rv32m1: add missing includes
<soc.h> is needed to pull some APIs defined in soc.h.
<fsl_device_registers.h> is needed to access EVENT0/1 addresses.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 0c5a2b1fe4 soc: riscv: microchip_miv: miv: move MIV_UART_0_LINECFG to driver
Instead of soc.h, since it's not used by anything else.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas c5699fac7f soc: riscv: ite_ec: add missing soc_common.h include
File uses some API declared in soc_common.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 3765b90c77 soc: riscv: ite_ec: it8xxx2: reduce the scope of some definitions
Do not expose them in soc.h, just move them to the module making use of
them.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 68a0f0a377 soc: riscv: andes_v5: ae350: remove redundant include
<soc.h> is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 13e02a00f0 soc: riscv: andes_v5: include soc_v5.h
Instead of catch-all soc.h (which was now just being a proxy for
soc_v5.h).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 7e3b3dd258 drivers: pinctrl: sifive: use DT ngpios property
Instead of hardcoded definitions from soc.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas a5ded8aa9f arch: riscv: smp: define MSIP_BASE
Instead of relying on definitions included indirectly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Tomasz Lissowski 042cb6ac4e soc: intel_adsp: enable DfTTS-based time stamping on ACE platforms
This patch enables time stamping controlled by DSP Timers / Time Stamping
logic on ACE1.5 / ACE2.0 platforms.

Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
2024-01-19 12:59:00 +01:00
Laurentiu Mihalcea f14c3e06f4 xtensa: nxp_adsp: common: Remove soc.c
The soc.c interrupt-related definitions are supposed to
provide support for multi-level interrupts. At the moment,
the way the functions work is they only process the LEVEL 1
interrupt from the encoded INTID and treats the provided INTID
as if it were simply a LEVEL 1 interrupt, which is wrong. Another
issue with soc.c is the fact that the definitions from it clash
with the ones provided by the IRQSTEER driver. To fix this, remove
the soc.c file altogether and change the corresponding CMakeLists.txt
to only contain the necessary statements.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-01-18 20:12:13 +01:00
Ben Wolsieffer 37352d3d29 soc: nrf53: fix building anomaly 168 workaround
With GCC 12.3 and binutils 2.40, the build fails with:

<...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S: Assembler messages:
<...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S:51: Error: junk at end of line, first unrecognized character is `n'
<...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S:133:   Info: macro invoked from here

Because the SOC_ON_EXIT_CPU_IDLE macro puts all the statements on a
single line, there must be a semicolon after .rept

Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
2024-01-18 12:53:12 +01:00
Krzysztof Chruściński a0382bd0f3 soc: arm: nordic_nrf: Disable UART runtime configuration
Since it takes 400 bytes of code and it is rarely used disable
by default this feature.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-18 11:12:55 +01:00
Greter Raffael 899ee686d8 riscv: irq: Adjust initialization of mtvec in non-legacy CLIC
If CONFIG_LEGACY_CLIC is disabled, i.e. we adhere to the current CLIC
spec, the mode bits of mtvec have to be 0x3. Everything else is
reserved. Therefore if CONFIG_RISCV_VECTORED_MODE is enabled, the
current implementation is correct. If CONFIG_RISCV_VECTORED_MODE is
disabled, the mode bits have to be set, too.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-01-18 10:53:27 +01:00
Mykola Kvach 72758f96d1 drivers: pinctrl: pfc_rcar: add support of voltage control to pfc driver
Add support of voltage control to Renesas PFC driver. Voltage register
mappings have been added to r8a77951 and r8a77961 SoCs.

Allow 'power-source' property for 'renesas,rcar-pfc' node. This property
will be used for configuring IO voltage on appropriate pin. For now it
is possible to have only two voltages: 1.8 and 3.3.

Note: it is possible to change voltage only for SD/MMC pins on r8a77951
      and r8a77961 SoCs.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2024-01-18 10:53:17 +01:00
Dino Li b09cd03085 soc: it8xxx2: Disable EGAD pin output of external gpio control
Setting IT8XXX2_EGPIO_EEPODD bit will disable EGAD pin output driving
to avoid leakage when GPIO E1/E2 on it82002 are set to alternate
function.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-01-18 10:51:19 +01:00
Rander Wang 6a0b1da158 soc: intel_adsp: call framework callback function for restore
When exiting power gated state, call the CPU start function
passed to arch_start_cpu().

Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Markus Swarowsky 11175c3ad3 tf-m: Change NS include path for TF-M 2.0.0
The place where TF-M places its non-secure api header files has changed
Therefore changing it for for all applications that use it.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Daniel DeGrasse 6d562f1750 soc: arm: nxp_imx: rt5xx: clock DMIC0
Clock DMIC0 from the audio PLL when DMIC driver class is enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Co-authored-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-17 14:43:52 +01:00
Guennadi Liakhovetski e7217925c9 ace: use a 'switch' statement in pm_state_set()
Use 'switch' to emphasise that we're handling different values of
'state' in pm_state_set().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-17 09:55:48 +01:00
Guennadi Liakhovetski c99a604bbf ace: remove superfluous variable initialisation
'ret' in pm_state_set() is always set before it's used, no need to
initialise it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-17 09:55:48 +01:00
Anas Nashif a0ac2faf9b intel_adsp: ace: enable power domain
Enable power domain drivers for this soc series as it is now needed in
the boot process.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-16 21:12:40 -08:00
Chekhov Ma e1d495be81 driver: add new gpio driver "gpio_mcux_rgpio"
Add RGPIO gpio driver. This driver is used for i.MX93 and i.MX8ULP.
GPIO pinctrl, read/write and interrupt is supported. Runtime mmio
configuration is enabled, so no need for region definition in
mimx9/mmu_region.c

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-01-16 20:50:11 -05:00
Guennadi Liakhovetski 4204ca9bcb ace: fix DSP panic during startup
pm_device_runtime_get() must be called after pd_intel_adsp_init() is
called for each device, because the latter calls
pm_device_runtime_enable(), which sets the device runtime PM use
count to 0. The current wrong calling order causes a DSP panic
because of an unbalanced pm_device_runtime_put(). Fix this by
delaying pm_device_runtime_get() until the POST_KERNEL initialisation
step.

Fixes commit c3a6274bf5 ("intel_adsp: ace: power: Prevent HST
domain power gating")

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-16 07:31:24 -05:00
Erwan Gouriou 7a2e74604f soc: stm32: common: Define STM32_LPTIM_CLOCK from device tree inputs
Now that:
1 - LS Clocks sources values are identical accross series
2 - We're able to extract this value from device tree

define STM32_LPTIM_CLOCK choice symbol from device tree

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-01-16 10:07:02 +00:00
Greter Raffael 87916d7af3 soc: gd32vf103: Correct vector table alignment
For a CLIC the vector table has to be aligned by 512 bytes, if there are
between 65 and 128 interrupts, which is the case for the gd32vf103.

`isr_wrapper` has to be aligned to 64 bytes, s.t. the lower 6 bits of
mtvec are 0.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-01-16 10:00:36 +01:00
Greter Raffael 8460ed093e soc: gd32vf103: Link soc-specific before common code
For a proper initialisation,  the soc-specific `__nuclei_start` has to
be executed before the common `__start`. To ensure that `__nuclei_start`
is linked first, I added the linker section init.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-01-16 10:00:36 +01:00
Greter Raffael 43490289ff soc: gd32vf103: Remove redundant code from entry.S
A lot of the entry.S is again implemented in common/vector.S.
I removed everything redundant and changed the jump to the common
symbol __start at the end.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-01-16 10:00:36 +01:00
Guennadi Liakhovetski ca12fd13c6 xtensa: intel_adsp: fix a cache handling error
.bss and .data are uncached in Zephyr builds for intel_adsp. No need
to try to manipulate cache of objects in those sections.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-15 09:59:07 +01:00
Gerard Marull-Paretas 6876f9eea1 soc: riscv: riscv-privileged: drop soc_common.h
The header file is no longer needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas 0addc80d10 arch: riscv: define local soc_interrupt_init prototypes
Instead of relying on messy soc.h files which are included via a fragile
chain of includes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas c725c91d95 arch: riscv: define RISC_IRQ_MSOFT/MEXT
Instead of relying on spread definitions within SoC files.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas 452a2f67cd arch: riscv: use CONFIG_RISCV_MCAUSE_EXCEPTION_MASK
Instead of custom SOC_MCAUSE_EXP_MASK definition. Note that SoCs
selecting RISCV_PRIVILEGED already used such config indirectly (see
changes in soc_common.h).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas ee60977958 arch: riscv: remove SOC from RISCV_SOC_MCAUSE_EXCEPTION_MASK
Just to stay consistent with other RISC-V related settings.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas 6edb0624d8 soc: riscv: gd32vf103: simplify MCAUSE exception mask handling
The exception mask needs to cover MCAUSE bits 11:0, there's no need to
overengineer this setting using DT properties.

Ref. https://doc.nucleisys.com/nuclei_spec/isa/core_csr.html#mcause

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas a364420b30 soc: riscv: cleanup usage/definition of MCAUSE IRQ flag
The MCAUSE register has the "Interrupt" flag defined defined at XLEN-1
position (31 for 32-bit, 63 for 64-bit). This is not an SoC specific
option, and there's no need to expose it publicly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas fcbfe74df1 arch: riscv: define some RISC-V exception codes
As defined in Table 3.6 of "The RISC-V Instruction Set Manual, Volume
II: Privileged Architecture". Delete all spread definitions of the same,
weirdly prefixed with "SOC".

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Lucas Tamborrino 11fc182315 soc: esp32: refactor esp32_net
SOC_ESP32_NET is now SOC_ESP32_APPCPU, following espressif's
naming convention in the same manner as ESP32S3 app cpu.

SOC_ESP32_APPCU is now a subset of SOC_SERIES_ESP32.

This commit also changes the necessary files, samples and tests
for bisect purposes.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-13 00:22:24 +00:00
Manuel Argüelles 6d53c2aed2 soc: arm: nxp_s32: s32k3: select CONFIG_CACHE_MANAGEMENT
Commit 447a492 switched to `sys_cache*` to enable caches at SoC init. To
preserve the old behavior of enabling caches at init, is missing to
select `CONFIG_CACHE_MANAGEMENT`.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-12 09:21:58 -06:00
Derek Snell 11d52f71e5 soc: arm: nxp: increase NUM_IRQS for RT5xx series
This enables the PVT Sensor IRQ.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-01-12 10:00:00 +01:00
Gerard Marull-Paretas f885763b50 arch: riscv: drop RISCV_HAS_CPU_IDLE
Because it was exclusively used by the "common" RISC-V privileged code
to build CPU idle routines that are now handled by arch level code.
Also, all platforms defaulted to "y", making it pointless in practice.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-12 09:58:31 +01:00
Gerard Marull-Paretas 7631e0ddfa soc: riscv: riscv-privileged: remove redundant idle implementation
Default RISC-V arch level implementation is equivalent.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-12 09:58:31 +01:00
Gerard Marull-Paretas 1dbcef9d3c soc: riscv: espressif_esp32: use arch idle
It is equivalent to the provided custom implementation.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-12 09:58:31 +01:00
Daniel DeGrasse 55fe95a5f6 soc: arm: nxp_imx: enable CONFIG_CACHE_MANAGEMENT for RT1xxx M7 cores
Since d992683db5 (soc: arm: replace redundant config option for
caches for nxp_imx), RT1xxx series will not have cache enabled at boot
unless CONFIG_CACHE_MANAGEMENT=y. Since this will improve performance,
enable CONFIG_CACHE_MANAGEMENT by default.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-11 16:17:03 +00:00
Tomasz Leman 1c0c900cbb intel_adsp: ace15: Enhance HST domain power-down sequence
This patch enhances the power-down sequence for the HOST (HST) domain
within the Intel ADSP ACE 1.5 architecture. It introduces a check to
ensure that a specific condition, represented by a magic key value, is
met before disabling the HST domain. This additional verification step
ensures that the HST domain is only powered down when it is safe to do
so, thereby maintaining the stability and reliability of the system.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-01-11 10:05:12 +01:00
Tomasz Leman c3a6274bf5 intel_adsp: ace: power: Prevent HST domain power gating
This patch introduces power management for the HOST (HST) domain within
the Intel ADSP ACE IP. It adds macros to access the node identifier and
device pointer for the HST power domain and integrates power management
calls into the system initialization and power state transition
functions.

The patch ensures that power gating of the HST domain is prevented when
the primary core of the audio DSP is active. Preventing power gating is
crucial for maintaining the functionality of the HST domain while the
primary DSP core is performing critical tasks.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-01-11 10:05:12 +01:00
Jun Lin a897b8a09c drivers: spi: npcx: add driver for the SPI peripheral
This commit adds the driver support for the NPCX SPI peripheral.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-01-11 10:04:21 +01:00
Gerard Marull-Paretas b3d8fc5e82 soc: arm: gigadevice: s/gigadevice/gd_gd32
Gigadevice was inconsistent with the convention established by other SoC
families, that is, use <vnd_prefix>_<family>. For example, ST STM32 uses
st_stm32. Note that GD32VF103, under soc/riscv, has already been
adjusted.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-10 20:59:21 -05:00
Benedikt Schmidt 10c0b86f83 soc: arm: use sys_cache* to enable caches for stm32f7 and stm32h7
Use sys_cache* functions to enable the caches for stm32f7 and
stm32h7. This ensures that CONFIG_CACHE_MANAGEMENT is
considered correctly.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-01-10 09:59:58 +01:00
Benedikt Schmidt 8b4516226b soc: arm: use sys_cache* for enabling the caches on same70 and samv71
Use the sys_cache* functions to enable the caches on same70 and
samv71. This will ensure that CONFIG_CACHE_MANAGEMENT is
considered correctly.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-01-10 09:59:58 +01:00
Benedikt Schmidt 1f1b430d88 soc: arm: remove redundant cache config options for kv5x
Remove the redundant cache config options for kv5x and use
the sys_cache* functions to enable the caches. This will automatically
consider CONFIG_CACHE_MANAGEMENT.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-01-10 09:59:58 +01:00
Benedikt Schmidt d992683db5 soc: arm: replace redundant config option for caches for nxp_imx
Replace the redundant cache config options for the nxp_imx and
use sys_cache* functions to enable the caches. These will automatically
consider CONFIG_CACHE_MANAGEMENT.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-01-10 09:59:58 +01:00
Benedikt Schmidt 49d3244798 soc: arm: use sys_cache* for enabling the caches in nxp_s32
Use sys_cache* for enabling the caches in nxp_s32. This automatically
considers CONFIG_CACHE_MANAGEMENT and will activate the
cases only if this is active.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-01-10 09:59:58 +01:00
Andriy Gelman d540407fc8 drivers: mdio: Add xmc4xxx mdio drivers
Add mdio drivers for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-01-09 10:00:47 +01:00
Gerard Marull-Paretas 14ff171411 soc: riscv: drop RISCV_PRIVILEGED_STANDALONE
This option is no longer needed, all SoCs have been moved out from
soc/riscv/riscv-privileged folder.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 724a967c1a soc: riscv: renove_virt: reorganize SoC folder
Move out from riscv-privileged, and convert to a standalone SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 8729a782f9 soc: riscv: niosv: reorganize SoC folder
Move out of riscv-privileged, create new family for it.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas b5fb00bdc8 soc: riscv: opentitan: reorganize SoC folder
Remove from riscv-privileged, and create a standalone SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 38a44e683e soc: riscv: sifive-freedom: reorganize SoC folder
Reorganized as follows:

- Created a new SiFive Freedom family
- Created 3 new series: E300/E500/E700
- Created Socs within each series (e.g. E340)

Also moved out of riscv-privileged folder.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas b2b86556a7 soc: riscv: miv/mpfs: reorganize SoC folder
Merge both series into a new family: microchip_miv [1], moving them out
of riscv-privileged. Updated naming to stay closer to what vendor
announces on their website.

[1]: https://www.microchip.com/en-us/products/fpgas-and-plds/
     fpga-and-soc-design-tools/mi-v

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 4c4beabecc soc: riscv: efinix-sapphire: reorganize SoC folder
Move things out from riscv-privileged, and convert to single SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 7da6342dff soc: riscv: virt: reorganize SoC folder
Move out of riscv-privileged, and convert to single SoC (no
family/series).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas b7b19b8b05 soc: riscv: neorv32: reorganize SoC folder
Move out of riscv-privileged and convert to a standalone SoC. Note
that the family/series structure has been dropped in favor of a single
SoC (what NEORV32 seems to be).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 7a44806a53 soc: riscv: s/litex-vexriscv/litex_vexriscv
To be consistent with other SoCs in the same folder.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 4a0d880350 soc: riscv: ite: reorganize SoC folder
Follow the vendor structure [1]:

- Family: ITE Embedded Controller SoCs
- Series: IT8XXX2
- SoCs: IT81202BX, IT81202CX, etc.

[1]: https://www.ite.com.tw/en/product/category?cid=1

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 8027689392 soc: riscv: andes_v5: reorganize SoC folder
Split out from riscv-privileged folder, and create a new family.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 87f3b07292 soc: riscv: starfive_jh71xx: reorganize SoC folder
Move it out from RISC-V privileged folder, and create a standalone
family.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 5a98d87335 soc: riscv: gd32vf103: reorganize SoC folder
Move things out from riscv-privileged, and create the new RISC-V GD32
family. New family folder follows the <vnd>_<family> naming convention.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 72e52a06aa soc: riscv: telink_b91: reorganize SoC folder
Reorganize following the hierarchy found in the vendor website [1]:

- SoC Family: Telink TLSR
- SoC series: TLSR951X
- SoC: TLSR9518

Also split out from riscv-privileged folder. Note that B91 was the name
of a starter kit [2].

[1]: http://wiki.telink-semi.cn/wiki/chip-series/TLSR951x-Series/
[2]: https://wiki.telink-semi.cn/wiki/Hardware/
     B91_Generic_Starter_Kit_Hardware_Guide/

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas d8c0cc2e35 soc: riscv: introduce temporary RISCV_PRIVILEGED_STANDALONE
So that SoCs can be ported outside of riscv-privileged folder, setting
their own family name. This will be removed once all SoCs are ported.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 0106e8d14c arch: riscv: introduce RISCV_PRIVILEGED
Introduce a new arch level Kconfig option to signal the implementation
of the RISCV Privileged ISA spec. This replaces
SOC_FAMILY_RISCV_PRIVILEGED, because this is not a SoC specific
property, nor a SoC family.

Note that the SoC family naming scheme will be fixed in upcoming
commits.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 9a35ad858c soc: riscv: gd32vf103: move nuclei CSR header
The header is common to all Nuclei based cores (not strictly related to
RISCV privileged spec). Since only GD32VF103 uses a Nuclei core, move
the file to its SoC folder.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Gerard Marull-Paretas 6443c50bd0 soc: riscv: move privileged code to common folder
Add a new riscv/common directory where to store common code between
SoCs, e.g. those implementing the privileged spec.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Manuel Argüelles 58f5720eb4 dts: arm: nxp: add FlexCAN support for S32K1xx
S32K1xx devices have a maximum of 3 FlexCAN peripherals. Each part may
define a different maximum number of instances and message buffers,
hence the interrupt lines are defined in the part specific dts.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-08 08:30:49 -06:00
Sylvio Alves b19c164e7b soc: espressif: add common linker tls entry
Adds common thread-local-storage.ld provided
by Zephyr. This also fixes a wrong xtensa_core entry
that should be riscv_core.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-01-08 15:09:48 +01:00
Yong Cong Sin c328a38a94 soc: riscv: add support for Renode Virt RISCV32 SoC
Add a beef-ed up version of Renode's `riscv_virt` SoC

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-08 12:35:10 +01:00
Bjarki Arge Andreasen 95c5f9b6f3 soc: arm: stm32f4 increase IDLE stack in case of PM
When Power Management is enabled (CONFIG_PM=y),
the CONFIG_IDLE_STACK_SIZE of 320 is not enough :
Increase its size to 512.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-08 12:34:30 +01:00
Bjarki Arge Andreasen 01e94e0766 soc: arm: stm32: Fix invalid Kconfig PM entry in defconfig file
The defconfig.series file for the stm32f4 incorrectly redefines
the PM Kconfig in order to select two dependencies, COUNTER and
COUNTER_RTC_STM32_SUBSECONDS, instead of setting a default for
them if PM is included.

This commit fixes the error described above.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-08 12:34:30 +01:00
Jakub Zymelka dfbcc8911a dts: arm: add new gpiote instances definition
Added GPIOTE0, GPIOTE1 instances for legacy devices,
GPIOTE20, GPIOTE30 for Moonlight and GPIOTE130,
GPIOTE131 instances for Haltium.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-01-08 11:19:37 +01:00
Jamie McCrae 6f226eb153 various: Remove BOOTLOADER_SRAM_SIZE overrides
Removes settings this Kconfig to 0, because the default already
is 0

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-08 10:06:24 +01:00
Tomasz Leman d7af6f3710 intel_adsp: ipc: pm action in busy state
Currently SOF has disabled CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE option and
use pm_suspend_devices() to suspend and resume IPC device during D3
power flow. The pm_suspend_devices() function skips suspending devices
that are busy. In very rare cases, the IPC device is busy during the
power state transition, which results in the device not being restored
during reboot. This happens when FW sends a message to the HOST and
waits for ACK, and the HOST simultaneously sends a SET_DX message to the
DSP. This suspend/resume logic in IPC driver does not work well when the
system enters the D3 state because it is not a suspend state, but rather
a power-off. IPC does not require suspending, only reinitialization when
exiting D3. We cannot avoid this one missing ACK and it cannot block the
DSP from turning off.

When FW receives a SET_DX message it checks whether it can enter the D3
state and then returns an error (via IPC) or calls the pm_state_force
function. Success response is sent directly from power_down assembly and
not via ipc driver. This is because after receiving the response, the
HOST will turn off the DSP.

In order for the transition to D3 to take place, only the primary core
can be active, all pipes must be stopped (and therefore all modules in
FW). The only active thread at this time is the Idle thread. Driver on
the host will not send another ipc because is still waiting for
response. FW can try to send only two notification:

- FW exception: from this place there is no return to continue the power
  transition,
- log buffer status: skipped, they remain in the queue without being
  sent.

I'm moving pm_device_busy_clear(dev) from IRQ handler to
intel_adsp_ipc_send_message function so the pending ACK does not block
power transition.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-01-06 14:17:15 +01:00
Manuel Argüelles aeebe484f2 soc: arm: nxp_s32: s32k1: add FlexTimer support
Add support for FlexTimer (FTM) module on S32K1xx devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-05 09:03:00 +01:00
Derek Snell 44885cbca5 boards: mimxrt595: add CONFIG_MIPI_DPHY_CLK_SRC
Give option in soc.c to initialize the MIPI DPHY clock from the default
AUX1_PLL, or from the FRO using CONFIG_MIPI_DPHY_CLK_SRC_FRO.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-01-05 09:02:25 +01:00
Derek Snell 3f2ded3455 soc: arm: nxp_imx: r5xx: add Kconfig to clock FC0 from FRO
Flexcomm0 has option to clock from FRO.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-01-05 09:02:25 +01:00
Aaron Ye c3e8b731ef soc: arm: ambiq: Remove the redundant configurations.
These non-cached SRAM size and base address configurations
are not needed now.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-01-04 11:06:37 +00:00
Tomasz Lissowski 61cb7d4358 adsp: hda: accept 16 byte alignment for HDA buffer size
HDA DMA driver uses an excessive value of 128 bytes as required alignment
for DMA buffer size. This may result in the correct buffer size (e.g.
32-byte aligned, which is DT-compliant) being silently truncated before
writing it into DGBS register. This patch changes the requirement to the
value implied by DGBS register format (effectively reduces to 16 bytes).

Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
2024-01-03 18:59:55 +00:00
Jaro Van Landschoot be6cf5c268 soc: arm: atmel_sam: Sys_arch_reboot using RSTC
The previous implementation of the sys_arch_reboot function
for the Atmel SAM series was using NVIC_SystemReset.
This caused a reboot time of around 20 seconds on a SAM4SA16CA,
which is now reduced by directly writing to the
reset controller control register (RSTC_CR).

Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-12-28 12:05:53 +00:00
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