Commit graph

5973 commits

Author SHA1 Message Date
Pisit Sawangvonganan
8e4c072991 style: soc: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Hou Zhiqiang
5d4537f827 soc: nxp: imx: add i.MX95 Cortex-A55 support
Added basic soc support for i.MX95 Cortex-A55.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
5b6f07d1a6 soc: nxp: imx: add i.MX95 Cortex-M7 support
The i.MX95 applications processor features advanced graphics and
video cores, powerful vision and machine learning acceleration,
efficient CPU performance, real-time processing, and advanced
security with the integrated EdgeLock® secure enclave to support
energy-efficient edge computing.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
5e09d7db26 soc: nxp: imx: clang-format imx93 code files
clang-format imx93 code files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
d7fab01b6c soc: nxp: imx: create new directory for imx93
Created new directory for imx93 under imx9, as imx93
is one soc of imx9 series.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-11 09:34:04 +02:00
Raffael Rostagno
bd3b731ddc soc: esp32c2: esp8684: Console baudrate from device tree
Get console baudrate property from device tree to allow
proper configuration for 26 and 40 Mhz devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-10 17:17:17 -04:00
Laurentiu Mihalcea
3f2790b89c soc: imx9: remove custom linker script
The custom linker script was required because SOF needed
some extra linker sections. Other than that, the custom linker
script was identical to the common architecture script. This
commit removes the custom linker script because:

	* keeping the custom linker script in sync with the
	common one is troublesome.

	* application-specific linker sections shouldn't be
	included in the generic soc linker script. Instead,
	they should be handled at the application level
	(i.e: via cmake commands if additional sections are
	needed or via a new, custom linker script if more
	changes are needed)

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-10 12:41:02 -04:00
Neil Chen
fb65babc6a soc: mcxa156: add SOC support for MCXA56
Add MCXA156 support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Duy Nguyen
5ff44120e1 Kconfig: Fix issue in KConfig of Renesas modules
Add condition for KConfig Renesas FSP hal module
Move the DUAL_BANK_MODE from SOC to flash driver KCONFIG

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-09-10 14:42:55 +01:00
Declan Snyder
d931f0b7c0 soc: imxrt: Fix flexspi xip configuration issue
Fix flexspi xip configuration issue regarding code relocation
due to the order of kconfig defaults being sourced

The flexspi setup was not being relocated to an on chip location

Also remove rt1060 conf file in flash common test which changes the
code relocation location to RAM, just keep as ITCM for all M7 which
as of now all have ITCM from NXP with flexspi.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-10 14:42:15 +01:00
Sylvio Alves
8233b70ece espressif: clean up unused code
Remove all entries that as not being used.
This also update hal to re-enable warning flags
as such as -Wno-unused-variable.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-09 13:55:39 -04:00
Grzegorz Swiderski
26c99a6f36 soc: nordic: Extend address validation for Haltium platform
VPR addresses are platform-dependent, so let's use a common symbol -
CONFIG_NRF_PLATFORM_HALTIUM - to cover both nRF54H and nRF92 series.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski
3b56ef0de1 soc: nordic: nrf92: Update supported NRFS services
PMIC service should be supported on Application and Radiocore, whereas
DVFS service is currently unsupported.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski
57ce595ac1 soc: nordic: nrf92: Set PPR hart ID to processor ID
Booting VPRs requires changing the default value of CONFIG_RV_BOOT_HART.
This must be reverted (back to zero) for a future nRF9230 SoC revision,
which will align more closely with the RISC-V spec.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Karol Lasończyk
aca6b2ab22 soc: nrf: Update systemoff sequence for nRF54L15
Production version of the nRF54L15 SoC needs reset reason
to be cleared before going into system off.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-09 13:54:05 -04:00
Guennadi Liakhovetski
be041b14fe Intel: ADSP: move HPSRAM mask into assembly
Assembly in power_down() in power_down.S already defines data and
code to be locked in cache when powering down SRAM. Instead of adding
another such location in power.c, move the hpsram_mask[] array into
power_down.S.  This fixes hard to debug failures when shutting down
the ADSP.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-09 13:53:56 -04:00
Anas Nashif
8c32a82e47 arch: arc: replace ARC_EARLY_SOC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARC.

Replace soc_early_asm_init_percpu() with platform_reset()

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Anas Nashif
f519dd1411 arch: arm: replace PLATFORM_SPECIFIC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARM.

Replace z_arm_platform_init() with platform_reset().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Mahesh Mahadevan
bdfd1d2e1b soc: mcx: Fix build errors when building for XIP from FlexSPI
Include compile of the flash file when FlexSPI_XIP is enabled
even when the FlexSPI driver is not enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Yong Cong Sin
4e54cff223 soc: qemu: riscv: update IRQ config
- Update `MAX_IRQ_PER_AGGREGATOR` to 1024 to match with the
  devicetree
- Update `2ND_LEVEL_INTERRUPT_BITS` to 11 bits to
  be able to encode the L2 IRQs.
- Update `NUM_IRQS` to 1036 (L1 has 12, L2 has 1024)

Update the `MAX_IRQ_PER_AGGREGATOR` config in testcase
accordingly, so that it won't overflow the configured bits.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-06 14:06:23 -05:00
Krzysztof Chruściński
1dcd599982 soc: nordic: nrf54h: Add STM data flushing in pre_sleep
In order to get all data from STMESP written to ETR and processed
on time we need to write dummy data before sleep.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Adam Kondraciuk
ee9d23945f soc: nordic: nrf54h: poweroff: Add support for s2ram
Add functions for local domain suspend to RAM. Add matching resume
procedure. Add pm_s2ram function for determining source of reset.
Add preserving NVIC and MPU state in retained RAM when CPU is powered off
during S2RAM procedure.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-09-06 11:29:06 -04:00
Quy Tran
79fb5a391a drivers: flash: Add support for flash driver on MCK-RA8T1
Initial commit to support flash driver on MCK-RA8T1 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-06 11:28:04 -04:00
Quy Tran
beba6685af drivers: flash: Add support for flash driver on EK-RA8D1
Initial commit to support flash driver on EK-RA8D1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-06 11:28:04 -04:00
Duy Phuong Hoang. Nguyen
e1f990c176 drivers: flash: Initial support flash driver on EK-RA8M1
Initial commit for flash driver support on board using RA8 MCUs
* drivers: flash: implementation for flash driver on EK-RA8M1
* dts: arm: add device node for flash of EK-RA8M1
* boards: arm: enable support flash driver for ek_ra8m1, update
board documentation

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-09-06 11:28:04 -04:00
Erwan Gouriou
0e30625eec drivers: clock_control: stm32: Default driver selection out of soc
Rather setting the driver default in soc, make it directly at symbol
level rather than soc and clean up redundant `select` occurrences.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Erwan Gouriou
1483396157 soc: stm32: Select CLOCK_CONTROL by default for whole family
CLOCK_CONTROL subsystem is expected to be enabled systematically on all
STM32 devices.
Make it a series default.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Sean Nyekjaer
d218a2d73e soc: nordic: nrf52: fix used define for enabling DCDC converter
Use the correct define for checking if the DCDC converter shall be
enabled.

This resolves the opposite behavior where boards that enable the DCDC
converter uses the LDO and boards where LDO is used they enable the
DCDC.

Fixes: e189fb0720 ("soc: nordic: nrf52: add support for DT-based
regulators config")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2024-09-06 10:05:07 -05:00
Santosh Male
3e0b068fff SOC: Updated MAX IRQ num supported by Aglex5
Agilex5 device supports maximum of 274 interrupts which includes XMAC
interrupts as well.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Michal Smola
dd052055d8 soc: nxp mcxc: Add support for NXP MCXC series
Add initial suport for NXP MCXC series

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Andrzej Głąbek
7a2ce2882a drivers: clock_control: Add support for nRF54H20 clock controllers
Add custom clock_control API for nRF platforms that allows requesting
clocks with specified minimal required attributes (accuracy, precision,
and frequency). Provide an implementation of this API for FLL16M, HFXO,
HSFLL, and LFCLK controllers in the nRF54H20 SoC.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Marcin Szymczyk
161149ba01 soc: nordic: add enabled instances validation for nRF54L series
Align verification macros to nRF54L series specific instances.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-09-05 16:57:19 -04:00
Tomasz Leman
d389c95935 soc: intel_adsp: ace: Configurable SRAM retention mode and cleanup
This commit introduces a new Kconfig option `CONFIG_SRAM_RETENTION_MODE`
that allows the configuration of SRAM retention mode during the
initialization phase of the firmware boot-up process. By default, the
retention mode is enabled to maintain the existing behavior. However,
this option provides the flexibility to disable the retention mode if
needed, without modifying the Zephyr codebase.

The SRAM initialization functions `hp_sram_init` and `lp_sram_init` in
`sram.c` have been updated to conditionally set the retention mode based
on the value of this Kconfig option.

Additionally, an unused macro `DELAY_COUNT` has been removed from
`sram.c` to clean up the code.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-09-05 16:56:56 -04:00
Fabrice DJIATSA
4677920956 soc: st: stm32: add soc for stm32u073
select soc for stm32u073 and irq configuration

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-05 12:25:43 +01:00
Lucien Zhao
2680c7d020 dts: arm: nxp: nxp_rt118x: add acmp instances
enable acmp clock in rt118x/soc.c file

add instances and enable clock for rt118x

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Karol Lasończyk
198a005177 soc: Add support for nRF54L20 SoC
Introduce nRF54L20 entries in soc directory.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Andriy Gelman
4ffe418253 drivers: rtc: Add RTC driver for Infineon XMC4xxx devices
Adds support for settings/getting RTC time and using alarm/update feature.
The alarm option needs all fields to be set due to a hardware limitation.

RTC shares the same interrupt with the watchdog. Thus shared
interrupts must be enabled when WDT and RTC both need to trigger the ISR.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 09:54:52 +02:00
William Tambe
9c4a6712b2 xtensa: fix xtensa-sample-controller.ld to avoid .note.GNU-stack warnings
Prevent `warning: orphan section `.note.GNU-stack'` when building using
`west build -b xt-sim samples/hello_world`

Signed-off-by: William Tambe <williamt@cadence.com>
2024-09-04 09:54:19 +02:00
Kai Vehmanen
81977f2bff drivers: dma: intel_adsp_hda: fix intel_adsp_hda_unused() check
The ringbuffer availability check is subject to race with regards to
update of BF (Buffer Full) and BNE (Buffer Not Empty) bits in DGCS
register, and status of RP (Read Position) and WP (Write Position).

Following sequence is observed without this patch when
calling dma_get_status() on multiple Intel ADSP platforms:

iter 154 pending 1536 RP 768 WP 768, BNE 1, BF 1
-> dma_reload for 384
iter 155 pending 1536 RP 1152 WP 1152, BNE 1, BF 1
-> dma_reload for 384
iter 156 pending 0 RP 0 WP 0, BNE 1, BF 0

Value of pending is not expected to go from 1536 to zero if only 384
bytes have been consumed via dma_reload() since last call to
dma_get_status().

Change the logic to read DGCS register later, after the WP and RP have
been already read, and only check the BNE bit if Read and Write
Positions are equal.

Link: https://github.com/thesofproject/sof/issues/9418
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-09-04 09:53:57 +02:00
Francois Ramu
0fd7028eeb soc: stm32 decrease ticks per sec if sysclock is not LPTIM
Reduce the ticks per sec when the sysclock is low and
not LPTIM.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-09-04 09:53:50 +02:00
Daniel Leung
11e5a0de1d boards: xtensa/sample_controller: no HAL for xcc or xt-clang
Xtensa toolchains also contain a profile for sample_controller.
So if compiling for it, skip the Xtensa HAL module in Zephyr
tree so the toolchain can use the one included in the toolchain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-04 09:52:31 +02:00
Krzysztof Chruściński
175855e0d8 soc: nordic: Use 31250 Hz as system tick rate for GRTC
So far 10 kHz tick rate was used but it has 2 drawbacks:
- kernel timer precision is limited to 100 us which is worse compared
to 30 us on platforms which use RTC (which had 32768 Hz tick rate)
- GRTC has 1 MHz frequency so tick rate requires dividing by 100 during
 timeout calculation. When 31250 Hz is used (which is 1000000 / 32)
then dividing can be done with bit shifting and it is faster (> 2 times
faster on Cortex-M33 and >8 times faster on VPR - RISCV).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 10:43:30 +02:00
Peter Ujfalusi
9fd2e11944 drivers: dma: intel-adsp-hda: Report total_copied bytes on ACE2/3
With ACE2/3 the HDA DMA includes registers to read the Linear Link
Position.
Previous platforms (CAVS, ACE1) was able to report the LLP for GPDMA. Since
ACE2 all links are handled with HD-DMA, hence the new register has been
added for the firmware to report the LLP to the host.

Set the total_copied to 0 for older ACE1/CAVS platforms and in case of
host DMA on ACE2/3 since the informatiojn is not available.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-09-03 10:42:25 +02:00
Gerard Marull-Paretas
726c8abf32 soc: nordic: nrf54l15: add missing include
Add nrf5x binding header, as NRF5X_REG_MODE_DCDC is used in a macro
comparison. Missing header prevented evaluation to become true and so
enable DC/DC module.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-02 12:29:51 -04:00
Nazar Palamar
261344c6c7 soc: infineon/cyw20829: Update SYS_CLOCK_HW_CYCLES_PER_SEC
Update SYS_CLOCK_HW_CYCLES_PER_SEC to 96000000

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Fabrice DJIATSA
21150edc05 soc: st: stm32: add soc for stm32u031
select soc for stm32u031 and irq configuration

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-02 11:53:47 +02:00
Marcio Ribeiro
baf62b7a98 soc: esp32: XIP removed from Espressif targets
The way ESP32 XIP works (with MMU and cache) does no fit the way Zephyr XIP
is implemented, causing issues related to included Zephyr linker files.
Flash code still resides in flash for execution, but MMU/Cache handles it
in such way that XIP might not (or should not) be used with current Zephyr
approach. To address this problem, XIP configuration option is being
removed from Espressif targets.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-31 06:47:52 -04:00
Marcio Ribeiro
cb583995b8 arch: riscv: imply XIP config pushed to SoC level
'imply XIP' pushed from arch/Kconfig/'config RISCV' to riscv SoCs Kconfig
files to allow riscv SoCs having XIP enabled (or not) at SoC level

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-31 06:47:52 -04:00
Marcin Wierzbicki
eebaa2b270 soc: arm: nxp_s32: s32k1: add support for ADC
Add support for the Analog-to-Digital Converter (ADC).

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Declan Snyder
630faa1592 soc: nxp: rt1011: Fix RT1011 FCB offset
RT1011 expects it's flash configuration block at a different offset than
the rest of the RT10xx series. Add default to fix the platform not
booting.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-29 16:11:18 -04:00