Commit graph

4487 commits

Author SHA1 Message Date
Grzegorz Swiderski f16b33e902 soc: nordic: Fix undefined z_arm_platform_init
Fixes #71511
Follow-up to #70977

Update the approach by moving the `PROVIDE` directive to a separate
linker script added using `zephyr_linker_sources()`. This makes the
change more likely to propagate to existing samples which are using
CONFIG_CUSTOM_LINKER_SCRIPT.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-04-19 16:55:13 +00:00
Marek Matej 8c373b9bae soc: espressif: Fix the cache size set calls
Move the cache size set calls from soc.c do common loader.c
for all related SOCs. Remove unnecessary includes.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-19 10:07:15 +02:00
Nikodem Kastelik a7a6119bf9 soc: nordic: nrf54h: make soc.h available to non-ARM CPUs
This file contains generic macros needed on non-ARM Nordic CPUs.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-19 02:23:16 +01:00
Nikodem Kastelik 03cb84ffda soc: nordic: add nRF54 TWIS HAS_HW symbols
Add HAS_HW symbols for TWIS instances
found on nRF54H20 and nRF54L15 devices.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-19 02:23:16 +01:00
Sylvio Alves 9153f70da1 soc: esp32: spiram: add ECC config
Adds ECC feature to be enabled for esp32s3 SoC.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-18 08:05:22 -07:00
Declan Snyder 9ac2ee91f2 drivers: nxp_enet: Correct PTP clock dependencies
The dependencies should be in a 'depends on' clause.
Also, 'depends on PTP_CLOCK' is redundant because this is
within 'if PTP_CLOCK' already.

Additionally, conditionally include the PTP header in the mac driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-18 11:18:31 +02:00
Ruibin Chang 72895507af soc: it8xxx2: kconfig: define CONFIG for variant chip
Variant chip has different USBPD HW PHY, so FW needs
to apply different downstream CONFIG settings based on
the PHY version.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2024-04-18 11:13:38 +02:00
Jakub Zymelka c386c66483 soc: add nRF54L15 FLPR core support
Add support for nRF54L15 FLPR core.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-04-16 18:36:58 +01:00
Jun Lin 011b730b4c driver: reset: npcx: add driver support for reset controller
Nuvoton NPCX chips have reset registers which allow to reset the
peripheral hardware modules. This commit adds the support by
implementing the reset driver. Note that only the reset_line_toggle API
is supported because of the nature of the reset controller's design.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-04-16 09:09:13 +02:00
Wilfried Chauveau 4760aad353 arch: arm: cortex_m: Convert cpu_idle from ASM to C
Asm is notoriously harder to maintain than C and requires core specific
adaptation which impairs even more the readability of the code.

This change reduces the need for core specific conditional compilation and
unifies irq locking code.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>

# Conflicts:
#	soc/arm/nordic_nrf/nrf53/soc_cpu_idle.h
2024-04-15 09:09:28 -07:00
Kai Vehmanen 7fd0a7a5eb soc: intel_adsp: replace icache ISR workaround with custom idle solution
A workaround to avoid icache corruption was added in commit be881d4cf2
("arch: xtensa: add isync to interrupt vector").

This patch implements a different workaround by adding custom logic to
idle entry on affected Intel ADSP platforms. To safely enter "waiti"
when clock gating is enabled, we need to ensure icache is both unlocked
and invalidated upon entry.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-15 16:26:39 +02:00
Marek Matej 213bad1de0 soc: espressif: add missing linker symbols
Provide missing symbols to the default linker scripts.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-15 16:26:20 +02:00
Jędrzej Ciupis ec3c3f153b soc: nordic: nrf53: network CPU Force-OFF management
This commit introduces a common API for managing nRF53 SoC network CPU
Force-OFF state.

From the application CPU point of view, the network CPU is a shared
resource used by multiple users. The current solution where every user
controls the network core state directly leads to dependencies between
users and does not scale well.

To address this problem there should be a single entity responsible for
controlling the network CPU Force-OFF signal. This commit introduces
such module.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-04-12 11:31:47 +02:00
Gwen Weinholt 58d204acf9 soc: st: stm32: stm32l4x: enable ART flash cache accelerator
Enable instruction cache, data cache and prefetching.

Signed-off-by: Gwen Weinholt <git@weinholt.net>
2024-04-12 09:18:15 +02:00
Tim Lin ca66e7d5e1 ITE: soc: chip_chipregs: Cleanup it8xxx2 chip registers
1. Distinguish the registers of V1 and V2.
2. Remove unused chip variant configuration.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-04-12 09:18:08 +02:00
Daniel DeGrasse 46bed8896e soc: nxp: rw: add support for USBOTG controller
Add code to clock and release reset signal for USBOTG controller on
RW6xx SOC when USB is enabled, and add KConfig selection to indicate to
build system which USB controller this SOC uses.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-11 09:09:00 +02:00
Flavio Ceolin 8a63a0a563 intel_adsp: ipc: Fix policy state lock usage
IPC has inverted the usage of the state lock API.
In this API semantics, the get method disallow the policy of
using the given state, while the put() release this constraint.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-11 09:07:13 +02:00
Kai Vehmanen 7fee1bdd39 soc: intel_adsp: cavs: fix power_down documentation
Fix the inline documentation to match implementation. As IPFL is used,
the correct matching function is xthal_icache_region_lock().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-10 15:55:21 +02:00
Kai Vehmanen 03057f33d4 soc: intel_adsp: ace: fix power_down documentation
Fix the inline documentation to match implementation. As IPFL is used,
the correct matching function is xthal_icache_region_lock().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-10 15:55:21 +02:00
Grzegorz Swiderski 7d45f3c92a soc: nordic: Provide z_arm_platform_init at link time
Nordic SoCs use this hook to execute `SystemInit` as early as possible
after ARM core reset. Previously, `z_arm_platform_init` was defined as
assembly code, which would simply jump to the other function.

However, this extra code can be avoided by using `SystemInit` directly
in place of the `z_arm_platform_init` symbol (whenever it's undefined).
This is now done with a linker script containing a `PROVIDE` directive.

This saves 4 bytes of ROM (0-16 depending on alignment) and also makes
it possible to override `z_arm_platform_init` out of tree, if needed.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-04-10 07:45:42 -04:00
Daniel Baluta a8fa742b18 soc: nxp: imx8: Fix Kconfig.defconfig.* filenames
We need to use correct SOC name when naming the Kconfig.defconfig*
files.

So we need the following changes:
	- mimx8mp -> mimx8ml8
	- mimx8mm -> imx8mm6
	- mimx8mn -> mimx8mn6
	- mimx8mq -> mimx8mq6

Then we also need to take care of qualifiers name. Standard notation
uses "_" instead of "."

e.g : Kconfig.defconfig.mimx8mp.a53 -> Kconfig.defconfig.mimx8ml8_a53

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-04-10 10:00:40 +02:00
Flavio Ceolin e85226fd1a soc/intel_adsp: ipc: Remove fragile device state check
Checking if the device state is locked is not correct, device runtime
put / get is no longer checking for it and the only place that was
locking device's state was the pm action callback and if the idea
was to protect some concurrent call, using it is not enough.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-09 20:11:48 +02:00
Flavio Ceolin 741bbaca6d soc/intel_adsp: ipc: Remove unnecessary device state lock
There is no needed to lock/unlock a device state in its pm action
callback. The power management subsystem should take care of
serialize these calls.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-09 20:11:48 +02:00
Tomasz Leman d5897a48aa ipc: intel_adsp: Ensure IPC completion before runtime idle
Prevent the system from entering runtime idle state during IPC
transactions until the HOST acknowledgment is received.

This patch modifies the IPC mechanism to:
- Lock the runtime idle state immediately after sending an IPC message
  to the HOST, preventing the system from entering a low-power state.
- Unlock the runtime idle state once the IPC transaction is acknowledged
  by the HOST, allowing the system to enter low-power states if
  conditions permit.

The changes ensure that the DSP does not enter a power state that could
interrupt the IPC communication process, maintaining the integrity of
the IPC state machine.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-04-09 16:58:24 +02:00
Daniel Maslowski 50c24f17e3 soc: starfive: jh71xx: select 64BIT for SOC_JH7110
We get a 32bit binary otherwise.

Signed-off-by: Daniel Maslowski <info@orangecms.org>
2024-04-09 14:20:39 +02:00
Laurentiu Mihalcea 399c2cba65 nxp: imx8ulp: enable pinctrl
This commit enables pinctrl on i.MX8ULP. This includes:
	1) Adding `pinctrl_soc.h` header file.
	2) Adding DTS node for IOMUXC1, which is one of the
	IPs responsible for managing the 8ULP pads.
	3) Adding .dtsi with pin definitions. For now, only
	the LPUART7 pads are added to this file because this
	is going to be the only consummer for now.
	4) Modifying the `pinctrl_imx.c` driver to work for 8ULP.
	5) Enabling the `CONFIG_HAS_MCUX_IOMUXC`, which is a
	dependency of `CONFIG_PINCTRL_IMX`.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-09 11:06:14 +02:00
Nikodem Kastelik 6bce78937d soc: nordic: add nRF54 PWM HAS_HW & base addr validation
Add HAS_HW symbols for PWM instances
found on nRF54H20 and nRF54L15 devices.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-09 11:05:46 +02:00
Marek Matej 2395f08d48 soc: espressif: esp32: simple boot support
Add simplistic booting method which allows to run
applications without the 2nd stage bootloader.

- introduce memory layout header file
- update and optimize default and mcuboot linker scripts
- remove building multiple binaries during the application build

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-08 09:16:41 -04:00
Marek Matej 323f811c7c soc: espressif: esp32s2: simple boot support
Add simplistic booting method which allows to run
applications without the 2nd stage bootloader.

- introduce memory layout header file
- update and optimize default and mcuboot linker scripts
- remove building multiple binaries during the application build

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-08 09:16:41 -04:00
Marek Matej 553238704f soc: espressif: esp32s3: simple boot support
Add simplistic booting method which allows to run
applications without the 2nd stage bootloader.

- introduce memory layout header file
- update and optimize default and mcuboot linker scripts
- remove building multiple binaries during the application build

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-08 09:16:41 -04:00
Marek Matej f9008b5330 soc: espressif: esp32c3: simple boot support
Add simplistic booting method which allows to run
applications without the 2nd stage bootloader.

- introduce memory layout header file
- update and optimize default and mcuboot linker scripts
- remove building multiple binaries during the application build

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-08 09:16:41 -04:00
Marek Matej 43e3088c2d soc: espressif: Simple boot support
Add simplistic booting method which allows to load without 2nd stage
bootloader.
Update common architecture loader to support all build scenarios.

- simple boot: using single binary application without bootloader
- mcuboot: zephyr port of MCUboot
- application: loaded by the MCUboot

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-04-08 09:16:41 -04:00
Adam Berlinger e3c759e835 soc: st: add PM support for STM32H5
Single STOP mode level supported on STM32H5

Signed-off-by: Adam Berlinger <adam.berlinger@st.com>
2024-04-08 15:55:24 +03:00
Jose Alberto Meza 83c031556b soc: arm: microchip: mec172x: Add macro to get pin mux value
Add macro to read pin mux control value

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-04-05 23:47:32 +03:00
Filip Kokosinski ab84989a12 arch/riscv: remove the Kconfig.core file
This commit removes the `Kconfig.core` file. It's been largely unused, and
the only symbol it provides (`RISCV_CORE_E31`) overlaps with the SoC-layer
provided `SOC_SERIES_SIFIVE_FREEDOM_FE300`.

As of date, the only SoC that uses the E31 core in Zephyr is the FE310 SoC.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-04-05 16:46:01 +03:00
Sylvio Alves ad12a06e2e soc: espressif: esp32c3: update to hal_espressif v5.1
Modify and reorganize SoC to meet updated hal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-04-05 13:39:53 +02:00
Sylvio Alves 561f31bb54 soc: espressif: esp32s3: update to hal_espressif v5.1
Modify and reorganize SoC to meet updated hal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-04-05 13:39:53 +02:00
Sylvio Alves 072ea896d7 soc: espressif: esp32s2: update to hal_espressif v5.1
Modify and reorganize SoC to meet updated hal.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-05 13:39:53 +02:00
Sylvio Alves e587249704 soc: espressif: esp32: update to hal_espressif v5.1
Modify and reorganize SoC to meet updated hal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-04-05 13:39:53 +02:00
Sylvio Alves e63ddb70b3 soc: espressif: common: update to hal_espressif v5.1
Modify and reorganize SoC to meet updated hal.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-05 13:39:53 +02:00
Gerard Marull-Paretas 37f9958fea soc: nordic: nrf54h: set DMASEC for CCM030 if enabled
DMASEC is set to non-secure by default, which prevents CCM from
accessing secure memory. Change DMASEC to secure.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-04-05 13:19:21 +02:00
Daniel DeGrasse b6477deb4a soc: nxp: rw: add reset code for LCDIC
Clear LCDIC reset signal at init when the LCDIC peripheral is enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-04 23:59:37 +03:00
Georgios Vasilakis 7a8d454e22 soc: nordic: Refactor soc_secure.h
The soc_secure_* function are used by the non-secure application
to access hardware resources which are mapped as secure.
Using these functions for hardware resources mapped as non-secure
is missleading.

We have some soc_secure_* functions which read FICR values.
In nRF91 and nRF53 platforms this made sense since FICR
has hardware fixed mapping as secure.
For nRF54 though the FICR has hardware fixed mapping as non-secure.

This change refactors the soc_secure.h to exclude the functions
which read FICR values from being included when FICR is mapped as
non-secure.

Also updates the hwinfo and ieee802154 drivers to adjust to this change.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2024-04-04 13:17:13 -05:00
Steven Chang e44c0987b9 driver: watchdog: prevent floating point usage
Prevent the use of floating point operations

Signed-off-by: Steven Chang <steven@ene.com.tw>
2024-04-03 21:12:17 +01:00
Daniel Baluta cffea52fa8 boards: nxp: Rename mimxrt685_evk to mimxrt685_evk_mimxrt685s_cm33
In preparation for adding AMP support for i.MX RT6xx family we need
to rename existing cm33 support files to more specific names.

e.g mimxrt685_evk.dts -> mimxrt685_evk_mimxrt685s_cm33.dts

This will allow us to later add support for Cadence DSP found on i.MX
RT6xx series.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-04-03 15:41:16 +01:00
Daniel Baluta 68a7057513 soc: nxp: imxrt: Prepare imxrt6xx soc for AMP support
imxrt6xx are dual core devices featuring an ARM Cortex-M33
core and an Cadence Xtensa HIFI4 Audio DSP.

Currently only m33 core is supported. In order to support
the Cadence DSP we need first to do some code-reorganization
for m33.

We start by moving all cm33 related code to its own directory
and introduce the cpuclusters property in soc.yml file.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-04-03 15:41:16 +01:00
Iuliana Prodan 019b813a71 linker: nxp: add orphan linker section
Add missing linker section to avoid warning
about orphans when building with host compiler.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-04-03 10:34:18 +02:00
Jimmy Zheng f80377bd4e soc: andestech: linker.ld: clarify usage of __rom_region_end/size
Clarify usage of __rom_region_end/size in XIP system.
When PMP is enabled, __rom_region_end should be padded to meet the
requirement of PMP entry, and the actual ROM region usage ends at
.last_section instead of __rom_region_end.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-04-02 21:04:20 -04:00
Jimmy Zheng ed021551dc soc: andestech: linker.ld: fixed ROM padding issue
Updated ROM region padding to utilize LMA instead of location counter,
because the location counter has been assigned to 'RAM_BASE'.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-04-02 21:04:20 -04:00
Jimmy Zheng abffe27edb soc: andestech: pma.c: include soc_v5.h
Add include header for CSR definition.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-04-02 21:04:20 -04:00