Commit graph

4777 commits

Author SHA1 Message Date
Tom Burdick
6e66efa088 soc: intel_adsp_ace15: Include stdint.h
File was using stdint.h defined types without including and caused a
build error depending on include ordering.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-08-04 10:41:27 +02:00
David Ullmann
bcc7499684 drivers: rt6xx ctimer pwm driver
using ctimer to implement pwm api
Signed-off-by: David Ullmann <davidu@meta.com>
2023-08-03 12:39:06 -04:00
Nicolas Pitre
9a748371eb timer: allow for configuring it out
Some configurations have the system timer driver hardwired in.
Let's make them compatible with CONFIG_SYS_CLOCK_EXISTS=n.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-08-03 10:29:46 +02:00
Manuel Argüelles
12627d329e soc: nxp_s32: s32k344: add EMAC support
This device has a single instance of EMAC (a 100Mbps version of GMAC).
TCP/UDP checksum calculation is offloaded.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-03 10:28:20 +02:00
Ioannis Karachalios
34ce476ce6 soc: smartbond: da1469x: Support Global Foundries silicon
Add support for the GF silicon variant.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-08-02 14:00:39 +02:00
Manuel Argüelles
c7200cac00 soc: nxp_s32: add LPSPI to S32K344
Reuse existing NXP LPSPI binding for this SoC since the hardware block
for this device is the same as the one supported for other NXP devices.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Henrik Brix Andersen
de656c1169 drivers: can: sam: do not select cache management
Do not select CONFIG_CACHE_MANAGEMENT in the Microchip SAM CAN driver
Kconfig but rather leave it up to the SoC/platform Kconfig to enable it as
needed and enable CACHE_MANAGEMENT by default for the Atmel SAM E70/V71 SoC
series.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2023-07-31 19:38:22 +00:00
Antoine Bout
dbea999347 soc/arm/silabs: Kconfig: add SOC_GECKO_USE_RAIL kconfig option
Currently on zephyr, RAIL is used only for bluetooth. RAIL library is
needed to use efr32 radio regardless of the protocol used. We add
SOC_GECKO_USE_RAIL kconfig option to indicate if we use radio.
FPU is needed when using RAIL, we configure it if SOC_GECKO_USE_RAIL
is set.

Signed-off-by: Antoine Bout <antoine.bout@silabs.com>
2023-07-31 09:05:17 +00:00
Dong Wang
4e3ec6207d ish: add module Kconfig for Intel HAL
Add a new Kconfig option to enable the build of Intel HAL and select
it always for ish SoCs

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2023-07-28 17:49:09 +02:00
Dong Wang
445f9d28c4 boards: x86: Add boards and SoCs for Intel ISH
Adds new boards and SoCs for the Intel Sensor Hub (ISH).

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2023-07-28 17:49:09 +02:00
Flavio Ceolin
250748bfe6 intel_adsp: Add option about switch off hpsram
Add an option to control whether or not hpsram banks should
be switched off during the power down. This is particular useful
when running tests because we don't want to lose the contents
of the memory window before we capture it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-28 08:30:26 -04:00
Gerard Marull-Paretas
0b49b86f06 soc: arm: st_stm32: remove redundant PM_STATE_ACTIVE case
pm_state_exit_post_ops() will never be called with PM_STATE_ACTIVE.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-28 09:09:01 +00:00
David Ullmann
724a5cd54f board: add cy8ckit 062 pioneer
Tested with hello_world and blinky projects
Signed-off-by: David Ullmann <davidl.ullmann@gmail.com>
2023-07-27 15:26:40 -04:00
Cong Nguyen Huu
3d1285bc40 drivers: i2c_mcux: update to compatible with S32K344
Update to shim driver compatible with the hardware block
in S32K344. Configure the pins before initializing I2C
to avoid happening bus busy.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-27 12:32:07 -05:00
Cong Nguyen Huu
36d63e132d boards: arm: mr_canhubk3: enable support for FlexCAN
Reuse existing MCUX-based shim driver for FlexCAN.
Enable flexcan0 for Zephyr canbus to run tests.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-27 11:06:45 -05:00
Carles Cufi
acb8f6bf0b soc: nordic_nrf: Add nRF52833 QDAA variant
This variant has fewer pins.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-07-27 08:47:35 +00:00
Carles Cufi
b140963557 soc: nordic_nrf: Add nRF52840 QFAA variant
This variant has fewer pins.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-07-27 08:47:35 +00:00
Andriy Gelman
d8f955e375 drivers: pwm: Add driver for xmc4xxx using ccu8 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 8 (CCU8)
module. There are two CCU8 nodes with each one having four slices.
Each slice has two output channels.

Unlike CCU4, this module can generate complementary high-side/low-side
signals for each output channel. A variable dead time can be added
during the off to on transitions to make sure that the
high-side/low-side signals are not on at the same time.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Andriy Gelman
23b6e4f507 drivers: pwm: Add driver for xmc4xxx using ccu4 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 4 (CCU4)
module. There are four CCU4 with each one having four channels
Thus it's possible to have up to 16 pwm output signals. The output of
each channel can only be connected to a specific port/pin. The possible
connection and gpio configurations are defined using pinctrl.

The CCU4 module also has a capture mode. Capture support will be added
in the future.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Wojciech Sipak
69d0f03ebd soc: quicklogic_eos_s3: remove unneeded code
Pinmuxing is now done by a pinctrl driver, not by board.c,
so the code used previously for pinmuxing can be removed.

Fixes #59186.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-26 14:59:59 +02:00
Wojciech Sipak
bff69f5384 drivers: pinctrl: add driver for EOS S3
This adds a new pinctrl driver for Quicklogic EOS S3 SoC

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-26 14:59:59 +02:00
Lucas Tamborrino
47515f4d7b soc: xtensa: esp32s3: Add external ram noinit section
Add section to allocate memory of WiFi and NET stack in SPIRAM

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-07-26 14:42:20 +02:00
Lucas Tamborrino
c435dea191 soc: xtensa: esp32s3: add support for SPIRAM
Add support for external PSRAM for esp32s3.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-07-26 14:42:20 +02:00
Iuliana Prodan
1295283a8a soc: xtensa: nxp: add resource_table section in linker script
Add resource_table section in linker script for nxp_adsp_imx8m
for inter-process communication.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-26 14:33:36 +02:00
Wojciech Sipak
40fa96506b drivers: pinctrl: Add pinctrl driver for Gecko Series 1
This adds a new pinctrl driver for EFM32.

Co-authored-by: Todd Dust <Todd.Dust@silabs.com>
Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-26 14:33:03 +02:00
Florian Grandel
d34709121f drivers: cc13xx_cc26xx: pinctrl: support edge detection
Introduces support for SoC-specific input-edge-detect configuration to
the CC13/26xx pinctrl driver.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-26 14:32:53 +02:00
Florian Grandel
0dcbb22265 drivers: cc13xx_cc26xx: pinctrl: support drive strength
Introduces support for drive-strength configuration to the CC13/26xx
pinctrl driver.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-26 14:32:53 +02:00
Florian Grandel
31fb5f53d2 drivers: cc13xx_cc26xx: pinctrl: fix header conflict
CC13/26xx's pinctrl_cc13xx_cc26xx.c driver included ioc.h and
(indirectly) pinctrl_soc.h which contained duplicate defines.

This change removes the header conflict and redundant definitions.

This prepares for subsequent changes in this change set that add
additional flags to the pinctrl driver which would otherwise trigger the
header conflict.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-26 14:32:53 +02:00
Yong Cong Sin
84b86d9b0c soc: riscv: Add ability to use custom sys_io functions
Add Kconfig RISCV_SOC_HAS_CUSTOM_SYS_IO symbol so that a riscv
SoC can set to specify that it has a custom implementation for
sys_io functions.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-26 09:43:59 +02:00
Girisha Dengi
75547dd522 soc: arm64: Add agilex5 soc folder and its configurations
Add Agilex5 soc folder, MMU table and its configurations for
Intel SoC FPGA Agilex5 platform for initial bring up.
Add ARM Cortex-a76 and Cortex-a55 HMP cluster type.

Signed-off-by: Teik Heng Chong <teik.heng.chong@intel.com>
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-25 16:58:01 +00:00
Marek Matej
6b57b3b786 soc: xtensa,riscv: esp32xx: refactor folder structure
Refactor the ESP32 target SOCs together with
all related boards. Most braking changes includes:

- changing the CONFIG_SOC_ESP32* to refer to
  the actual soc line (esp32,esp32s2,esp32s3,esp32c3)
- replacing CONFIG_SOC with the CONFIG_SOC_SERIES
- creating CONFIG_SOC_FAMILY_ESP32 to embrace all
  the ESP32 across all used architectures
- introducing CONFIG_SOC_PART_NUMBER_* to
  provide a SOC model config
- introducing the 'common' folder to hide all
  commonly used configs and files.
- updating west.yml to reflect previous changes in hal

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Andrzej Głąbek
fa609e5844 drivers: spi: nrfx: Clean up driver instantiation
- use CONFIG_HAS_HW_NRF_* symbols consistently in nRF multi-instance
  drivers when creating particular driver instances
- remove unnecessary hidden Kconfig options that indicated the type of
  peripheral to be used by a given instance (e.g. SPI, SPIM, or SPIS)
  and enabled proper nrfx driver instance; instead, use one option per
  peripheral type and include the corresponding shim driver flavor into
  compilation basing on that option (not the one that enables the nrfx
  driver as it was incorrectly done so far in some cases)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-07-25 13:41:51 +02:00
Carlo Caione
15e84cbfac dts: Move to 'zephyr,memory-attr'
Move to 'zephyr,memory-attr' and use the newly introduced helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Fabio Baltieri
e065e5c600 soc: silabs_exx32: define an empty pm_state_exit_post_ops
Some EFR32 build broke after 3d2194f11e with:

pm.c:152: undefined reference to `pm_state_exit_post_ops'

Add an extra empty function to make this one build again.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-25 10:43:33 +02:00
Wojciech Sipak
e9613856cb boards: arm: add efm32gg_sltb009a board
- Add Silabs SLTB009A board
- Add Silabs EFM32GG12B SoC

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-25 09:11:11 +02:00
Mathieu Anquetin
3e2765cc0d dts: arm: st: Add dts and soc additions for stm32f105xb
Added dts additions for stm32f105xb cpu which is the same as existing
stm32f105xc with less flash.

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-07-24 14:15:42 +00:00
Peter van der Perk
6971865d01 soc: nxp_imx: rt11xx enable xbar driver
Add bindings to nxp,mcux-bar dirver

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2023-07-24 08:29:21 -05:00
Grant Ramsay
c0d144b3cd soc: arm64: add comments expanding the K3 acronym
This may be useful to users who do not know what K3 means

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-07-24 09:10:09 +00:00
Grant Ramsay
666769e54b soc: arm64: rename "TI Sitara" to "TI K3"
The Keystone 3 (K3) family encompasses a wider variety of SoC's.
This aligns the soc/arm64 naming with the soc/arm directory.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-07-24 09:10:09 +00:00
Derek Snell
e44314aeee soc: nxp_imx: rt5xx: fix part numbers in WLCSP
Dropped R from part numbers to match MCUXpresso SDK

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2023-07-21 09:09:55 -05:00
Mulin Chao
f34fff91bc driver: flash: npcx: introduce npcx flash driver
This CL attempts to implement npcx's flash driver instead of the
original one (npcx spi driver plus spi_nor flash driver).

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-07-20 16:22:47 +02:00
Mulin Chao
7411fbcb5b pinctrl: npcx: add DEV_CTLx configuration support
Add a new pinctrl type to control peripheral modules' specific IO
characteristics such as tri-state, the power supply type selection (3.3V
or 1.8V), and so on. In NPCX series, the corresponding registers/fields
are irregular. This CL wraps these definitions to dt nodes and put them
in pinctrl property if needed.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-07-20 16:22:47 +02:00
Gerard Marull-Paretas
f603061938 soc: xtensa: intel_adsp: cavs: fix PM hooks guards
The PM hooks were guarded with CONFIG_PM_POLICY_CUSTOM, however, they
need to be guarded (if file is always compiled) with CONFIG_PM. In fact,
CONFIG_PM_POLICY_CUSTOM requires to implement a custom policy hook,
something this module did not provide.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-20 10:33:00 +00:00
Gerard Marull-Paretas
55f5a75c58 pm: remove unnecessary __weak from pm_state_set/pm_exit_post_ops
Remove unnecessary __weak attribute from power management functions.
These functions are now defined once, globally, and mandatory for
systems that support CONFIG_PM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-20 10:33:00 +00:00
Gerard Marull-Paretas
3d2194f11e pm: introduce HAS_PM
Add a new Kconfig option that has to be selected by SoCs providing PM
hooks. This option will be now required to enable CONFIG_PM. Before this
change, CONFIG_PM could always be enabled, regardless of SoC providing
any kind of low-power support.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-20 10:33:00 +00:00
Gerard Marull-Paretas
26bf349ab1 pm: drop HAS_NO_PM
Remove HAS_NO_PM option, in preparation for a new HAS_PM option
(inverted logic).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-20 10:33:00 +00:00
Mykola Kvach
0c4900d5ab soc: arm64: renesas: gen3: Move GIC version to DT
Move the GIC version to the device tree for Renesas R-Car Gen3
to improve readability

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-07-18 11:14:05 +00:00
Wojciech Sipak
c811a4f430 drivers: adc: add ADC driver for EFM32
This adds a driver for ADCs available on EFM32

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-18 11:05:39 +00:00
Daniel Leung
e55fb88bcb soc: intel_adsp/ace: update clock rate
The clock rates for ACE series of Intel Audio DSP have changed.
The values come from the SOF project in their board configs.

CONFIG_XTENSA_CCOUNT_HZ is also set so the arch timing test
can pass.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-17 16:27:08 -04:00
Emilio Benavente
c6e3bac4f2 soc: arm: lpc55xxx: Updated clock init
Updated the clock init to reflect the sdk also
updated the clock frequencies to reflect the
respective soc clock values, this file originally
contained unexpected clock values, updated comments
to reflect changes and got rid of doxygen style
comments

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-17 13:05:44 -05:00
Jimmy Zheng
4f26203b59 soc: riscv: andes_v5: remove redundant CONFIG_CACHE_ENABLE
Replace redundant CONFIG_CACHE_ENABLE by generic Kconfig CONFIG_ICACHE,
CONFIG_DCACHE.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
e6b1251b0d soc: riscv: andes_v5: enlarge TEST_EXTRA_STACK_SIZE
Enlarge TEST_EXTRA_STACK_SIZE for AE350 RV64 bitstream.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
b6122c358a soc: riscv: andes_v5: add Andes I/O Coherence Port option
Add CONFIG_SOC_ANDES_V5_IOCP to indicate Andes I/O Coherence Port handle
cache coherency between cache and external non-caching master, such as DMA
controller.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
a1665cbf1c soc: riscv: andes_v5: refine Andes L2 cache
Refine source code and flush all I/D-Cache before update L2 cache register.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
65edd8433c soc: riscv: andes_v5: add Andes EXEC.IT option
Andes EXEC.IT (Execution on Instruction Table) is supported by Andes
toolchain only. Andes toolchain will replaces suitable 32-bit instructions
with the 16-bit "exec.it <INDEX>" in which <INDEX> points to a
corresponding 32-bit instruction in look up table.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
004e00a0bd soc: riscv: andes_v5: add RV32E_CPU option
Add CONFIG_RV32E_CPU for AE350 platform integrated with Andes RV32E core,
such as N22, D23 core.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
d5c4bd6830 soc: riscv: andes_v5: support RISC-V C extension
Enable RISC-V C extension for Andes core.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
9c7f0376b8 soc: riscv: andes_v5: support PMP and USERSPACE
Enable PMP and set PMP granularity to 8 for most of ae350 bitstream.
This commit also make MPU_ALIGN() apply to __rom_region_end in XIP system.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
bf0e01bee2 soc: riscv: andes_v5: refine Andes PMA
Refine PMA driver and define MPU_ALIGN() to PMA granularity in
RAM_SECTIONS, otherwise MPU_ALIGN() is defined to PMP granularity.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Jimmy Zheng
de1cd06294 soc: riscv: andes_v5: update ae350 linker.ld
Synchronize ae350 linker.ld with riscv generic linker.ld and workaround
kernel object address may be 0x0 in XIP system.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
L Lakshmanan
71244acd22 board: ti_am62x_sk_m4: Added board files for TI AM62X SK
Added configuration and documentation files for the AM62x board
M4 core.

Signed-off-by: L Lakshmanan <l-lakshmanan@ti.com>
2023-07-16 07:33:34 -04:00
L Lakshmanan
0e97c9d14d soc: ti_k3: Added SoC files for Cortex M4F on ti_am62x_sk
Added SoC support files for the Cortex M4F core on the TI AM62X SK EVM.

Signed-off-by: L Lakshmanan <l-lakshmanan@ti.com>
2023-07-16 07:33:34 -04:00
Marc Herbert
35e8e6fa03 soc/xtensa/nxp_adsp/CMakeLists.txt: use new WEST_SIGN_OPTS variable
Align `soc/nxp_adsp` with new `WEST_SIGN_OPTS` option added to
`soc/intel_adsp` by recent commit d98a7c2f8d ("soc: xtensa: cmake: add
new WEST_SIGN_OPTS variable").

This allows per-board rimage customization at the CMake level. Example
in `zephyr/boards/xtensa/nxp_adsp_NEWBOARD/board.cmake`:

  set(WEST_SIGN_OPTS -- -c rimage/config/special.toml)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-07-13 14:19:26 +02:00
Guillaume Gautier
8432081f51 soc: arm: st_stm32: stm32wba: Add LPTIM to Kconfig
For STM32WBA, enable LPTIM if Power management is enabled

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-12 11:48:10 +02:00
Guillaume Gautier
38722ce9d0 soc: arm: st_stm32: stm32wba: Add Power support
Add Power support

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-12 11:48:10 +02:00
Tim-Marek Thomas
5d75940ae3 boards: riscv: neorv32: Updates compatibility to neoverse v1.8.6
With NEORV32 v1.8.2 the UART module was changed to a simpler
implementation. This updates the UART driver for the open-source NEORV32
RISC-V compatible processor system (SOC).

Signed-off-by: Tim-Marek Thomas <thomas@sra.uni-hannover.de>
2023-07-11 18:19:55 +00:00
Tim Lin
0960bb3066 ITE: drivers/i2c: Add I2C target driver used buffer mode
Add I2C target driver used buffer mode. The maximum accessible buffer
is 2044 bytes, the default is 256 bytes.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-07-11 15:50:13 +02:00
Guillaume Gautier
3bd3f8d1c6 soc: arm: st_stm32: stm32wba: Add soc config for STM32WBA
Add soc config for STM32WBA SoC series

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-11 15:05:05 +02:00
Mykola Kvach
634e73dd21 soc: arm64: add PFC files to Renesas r8a77961 Gen3 SoC
Add Pin Function Controller tables of registers and their bits
for ARM64 Renesas R-Car family. With this changes we can use
Renesas PFC driver for configuring bias and driving capabilities.

Add only needed driver strength and bias pins to PFC,
e.g. SDx and UART TX/RX pins.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-07-11 11:17:41 +02:00
Mykola Kvach
38675f2b92 soc: arm64: add support of r8a77961
Add support of r8a77961 SoC to gen3 series.
Create a dtsi file with a common part for both r8a77951 and r8a77961.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-07-11 11:17:41 +02:00
Mykola Kvach
e0cf31483b soc: arm64: add PFC files to Renesas r8a77951 Gen3 SoC
Add Pin Function Controller tables of registers and their bits
for ARM64 Renesas R-Car family. With this changes we can use
Renesas PFC driver for configuring bias and driving capabilities.

Note: some of files copy-pasted from Renesas Arm 32
      SoC directory and this commit is a temporary
      solution, we need to rework it in order to use
      the same source files for both architectures.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-07-11 11:17:41 +02:00
Mykola Kvach
d0472aae7a soc: arm64: add Renesas Rcar Gen3 SoC support
Add files for supporting arm64 Renesas r8a77951 SoC.
Add config option CPU_CORTEX_A57.

Enable build of clock_control_r8a7795_cpg_mssr.c for
a new ARM64 SoC R8A77951.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-07-11 11:17:41 +02:00
Bill Waters
541482ff20 driver: i2c: infineon: Adding XMC4 I2C driver
- This includes the driver, test app, and sample app
- Only the boards\arm\xmc47_relax_kit board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-07-11 09:43:19 +02:00
Daniel Leung
25c6553edd soc: intel_adsp/ace: use functions to do CPU power control
Instead of relying on direct memory access via structs to
control CPU power and status, using inline functions instead
to hide the details. This makes reading the common code a bit
cleaner.

The function names are generic and not architecture or
platform specific, in an attempt to ease future arch or
platform additions with code reuse. Or else we would need to
rename these.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-10 16:13:03 +02:00
Tomasz Leman
3764814831 intel_adsp: boot: d3: hp sram reinit
Adding HP SRAM initialization in D3 power state exit procedure.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-07-10 16:08:32 +02:00
Marek Matej
0038620b37 soc: xtensa: disable SPIRAM when MCUBOOT
Some boards has ESP_SPIRAM enabled by default, which is
causing issues when MCUboot is used as 2nd bootloader.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-10 15:10:14 +02:00
Nikolay Agishev
a983abe426 ARC: Turn off stack checking for hsdk4xd
Turn off unsupported configuration for hsdk4xd

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2023-07-10 09:29:43 +02:00
Iuliana Prodan
dc49a314fd west: sign.py: fix sign when CONFIG_KERNEL_BIN_NAME is used
This fixes the following build error:
```
zephyr/zephyr.elf', needed by 'zephyr/zephyr.ri', missing and no known
rule to make it
```
This appears when CONFIG_KERNEL_BIN_NAME is used.

Therefore, do not use zephyr.elf since some samples might be called
based on CONFIG_KERNEL_BIN_NAME.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-10 09:29:33 +02:00
Daniel Mangum
43b057a7ce soc: neorv32: Fix spelling in reset.S
Fixes minor misspelling of instruction in the neorv32 reset.S.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2023-07-09 17:50:09 +00:00
Florian Grandel
38e2eb8fe6 soc: ti: cc13/26xx: clean up include hierarchy
Removes duplicate code and inconsistencies in the naming of the
cc13xx_cc26xx devicetree and RTC driver hierarchy and alignes it with
the actual TI product series naming hierarchy.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-07 18:46:24 -04:00
Andrzej Kuros
abd90085ac soc: arm: nrf53: workaround pop lr after wfi crash
On nRF5340 net core it was observed that when `wfi` instruction was
followed by `pop {r0, lr}` in the `arch_cpu_idle` function,
the value of `lr` sometimes got read as 0 from memory despite
having correct value stored in the memory.

This commit inserts additional `nop` instruction after waking up
to delay access to the memory.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2023-07-07 14:32:27 +02:00
Marc Desvaux
4293835192 soc : arm: st_stm32: stm32h5: add linker for STM32H5X
add some modifications for linker

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-07-07 10:06:54 +00:00
Mulin Chao
2cf3caa11c driver: wdt: npcx: add WDT_OPT_PAUSE_HALTED_BY_DBG support.
This CL adds WDT_OPT_PAUSE_HALTED_BY_DBG support by enabling freeze mode.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-07-07 09:19:50 +02:00
Manuel Arguelles
405160ca62 boards: mr_canhubk3: enable LPUART serial driver
Reuse existing MCUX-based shim driver for LPUART that is compatible with
the hardware block in S32K344. DMA is not yet supported.

Use the board's debug connector (P6 / LPUART2) as default console.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Manuel Arguelles
00125a4d1e soc: nxp_s32: generalize pinctrl header for all family
Unify the pinctrl_soc.h header for all the NXP S32 family by using
the HAL macros that expose the features supported on specific
devices. This approach still need a different binding for each device to
expose in DT different properties and allowed values.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Manuel Arguelles
8a47dd5ff8 soc: nxp: s32k3: enable clock control
Enable clock control by default on S32K344 SoCs and add clock
definitions.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Manuel Arguelles
b22f1162f3 soc: nxp: s32k: support minimal power and reset
Introduce minimal power initialization for NXP S32 SoCs and allow to
reset the SoC through the sys_reboot() API.

Presently only S32K3 SoCs is supported but it can be extended later to
other NXP S32 SoCs, hence it's placed in a common directory.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Manuel Arguelles
d2985f118a soc: arm: introduce support for NXP S32K344
The S32K3 MCUs are 32-bit Arm Cortex-M7-based microcontrollers with a
focus on automotive and industrial applications. The S32K344 features
a lock-step core, internal flash, RAM and TCM with ECC.

Co-authored-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Co-authored-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Benedikt Schmidt
42051fc2d4 dts: arm: st: add STM32L451
Add the MCU STM32L451.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-07-06 09:46:14 +00:00
Gerard Marull-Paretas
fcaa259e22 soc: arm: remove all unnecessary NMI_INIT() calls
NMI_INIT() is now a no-op, so remove it from all SoC code. Also remove
the irq lock/unlock pattern as it was likely a cause of copy&paste when
NMI_INIT() was called.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-07-05 09:15:36 +02:00
Sumit Batra
0ae7010946 soc: rt10xx: fix the sequence of Enet2 ref clk enablement
This patch sets ENET2 ref clock to be generated by External OSC

ENET2 ref clock direction as output

ENET2 ref clk frequency to 50MHz

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2023-07-03 15:24:00 -05:00
Manimaran A
f6eeb9dc84 soc: MEC1701: Removed Microchip MEC1701
Removed MEC1701 SOC specific sources

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-07-01 12:38:07 +02:00
Manuel Argüelles
c651dfbb2b soc: nuvoton_numaker: add guard in defconfg
It must be guarded so the option selection doesn't appear at root level.

Fixes #59876

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-06-30 16:47:51 +02:00
Keith Packard
710422ec5e include/zephyr: Fix linker scripts to define _end after all static RAM data
The Zephyr linker scripts have inconsistent ordering of various chunks of
data which lands in RAM at runtime. This leads to the value of _end not
being consistently defined as the maximum address of static variables used
in the application.

Create a helper linker fragment, zephyr/linker/ram-end.ld, which can be
included after the last possible definition of RAM data, that consistently
sets _image_ram_end, _end and z_mapped_end.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-28 08:41:02 +00:00
Serhiy Katsyuba
431108d89e intel_adsp: ace: Restore IDC interrupt on D3 exit
After exiting D3 state if IMR context save is enabled, IDC interrupt
must be re-enabled again for all cores.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-06-28 06:50:27 +00:00
cyliang tw
51d57f612d drivers: pinctrl: add pin group for NuMaker pinctrl
Update Nuvoton numaker series pinctrl, let support pin group.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-28 06:49:38 +00:00
Manojkumar Subramaniam
6e887e3f61 soc: riscv: Add initial support for Efinix Sapphire SoC
- It's a riscv privilege spec SoC

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2023-06-27 12:09:57 +00:00
Anas Nashif
7584c17374 intel_adsp: restructure dmic headers and move regs to soc
The ifdefs in in dmic headers is getting out of control and makes
maintainence very ddifficult, especially when having to maintain out of
tree SoCs sharing the same data and information.

Keep header clean and per SoC and share some common registers in one
place instead avoiding confusion and making it easier to read and
maintain.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-23 14:27:44 -04:00
Anas Nashif
c62e55973b intel_adsp: remove deprecated cache macros
SOC_DCACHE_FLUSH and SOC_DCACHE_INVALIDATE are not being used anywhere.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-23 11:14:08 -04:00
Alberto Escolar Piedras
7ee41b8776 soc inf (native): Refactor into a top and bottom
Where the bottom is the only one which interacts with
the host operating system.
And the top the only one that interacts or is aware
of the hosted operating system (Zephyr).

The bottom uses the native simulator CPU
start/stop emulation.
By now we replicate its code as a provisional measure,
until the native simulator becomes standard.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-23 12:16:26 +02:00
Alberto Escolar Piedras
bd66c1d953 arch POSIX: Refactor into a top and bottom
Where the bottom is the only one which interacts with
the host operating system, and does not necessarily
need to know about the Zephyr OS.
This is in preparation for the native simulator,
which which the bottom is also fully Zephy agnostic.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-23 12:16:26 +02:00
Florian Grandel
b245012ca2 drivers: ieee802154: cc13/26xx_subg: R-to-P link workaround
A known issue exists that does not allow a CC13/26x2R device to
establish a link to a CC13/26x2P device unless the capacitor array is
tuned to a non-default value in the P device.

See SimpleLink(TM) cc13xx_cc26xx SDK 6.20+ Release Notes, Known Issues.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-23 09:20:55 +02:00
Alberto Escolar Piedras
8b760196df soc posix: Refactor native_tasks into own file
The native_tasks logic is unrelated to the remaining
of the soc logic (which handles CPU start/stopping)
refactor it out into its own file.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-23 08:59:21 +02:00
Alberto Escolar Piedras
9e3d5c89e9 soc inf (POSIX): Correct Kconfig option description
Let's remove the native_posix part from the SOC description
and just refer to "native".

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-23 08:59:21 +02:00
Alberto Escolar Piedras
38b9120129 arch posix: native tasks header: Add missing include
The native_tasks header requires the toolchain header.
Let's include it directly instead of requiring users
of this header to include it before.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-23 08:59:21 +02:00
Andrey Borisovich
23b3cae1b1 inte_adsp: ipc: prevent ipc message send during Device power transition
When CONFIG_PM_DEVICE is enabled IPC Device may be during power transition
during a call to intel_adsp_ipc_send_message function.
Changed signatures of intel_adsp_ipc_send_message and its sync version
to return int and negative error codes on error.
On attempt to send IPC message during Device power transition
-ESHUTDOWN error code is returned, on busy state -EBUSY.
Updated all function references.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-06-22 06:14:57 -04:00
Andrey Borisovich
355f8cfe4f intel_adsp: ipc: device support D3 power state change
When option CONFIG_PM_DEVICE is enabled, IPC driver is capable
of entering D3 power state described as PM_DEVICE_ACTION_SUSPEND
(and leaving that state - powering back to PM_DEVICE_ACTION_ACTIVE).
New power control callbacks 'ipc_power_control_api' are introduced for
use during power state transisions. They allow Zephyr application
specific code to be executed.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-06-22 06:14:57 -04:00
Andrey Borisovich
1d58b1b83f intel_adsp: mem_window: reinitialize after idle exit
Exiting idle state requires to reinitialize all memory window
instances to flush the cached memory.
Added function that calls initialization of devices during runtime.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-06-22 06:14:57 -04:00
Andrey Borisovich
7595cafb02 intel_adsp: timer: implemented sys_clock_idle_exit function
Generic header for system clock allows to define a sys_clock_idle_exit
function for the clock implementation.
Implemented the function in the intel_adsp_timer to reinitialize
device driver after the idle exit state.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-06-22 06:14:57 -04:00
Lucas Tamborrino
e229898caf drivers: pinctrl: esp32xx: allow internal loopback
Provides a way to use pinctrl to allow internal loopback
on a peripheral pin for testing purposes.
This is done by using output-enable on a input pin and
input-enable on a output pin.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-22 08:13:36 +00:00
Florian Grandel
c6c93e394d soc: cc13x2_cc26x2 series: enable RTT support
All Cortex-M processors can support RTT by default. This change enables
RTT support for the cc13xx/cc26xx SoC series (tested in hardware on
CC1352R).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-21 20:02:50 -04:00
Lucas Tamborrino
ba3766a75f debug: coredump: xtensa: add esp32s2
Add coredump support for esp32s2.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-06-21 16:06:06 -04:00
Huifeng Zhang
c1ecb8faaa arch: arm: enable FPU and FPU sharing for v8r aarch32
This commit is to enable FPU and FPU_SHARING for v8r aarch32.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-06-21 16:06:08 +02:00
cyliang tw
c448dceb57 drivers: reset: add support for NuMaker series reset
Add Nuvoton numaker series reset controller support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw
4ad399d54d drivers: clock_control: add support for Nuvoton numaker series CLK
Add Nuvoton numaker series clock controller support, including:
1.  Do system clock initialization in z_arm_platform_init().
2.  Support peripheral clock control API equivalent to BSP
    CLK_EnableModuleClock()/CLK_SetModuleClock().

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw
5879810137 drivers: pinctrl: add support for NuMaker series pinctrl
Add Nuvoton numaker series pinctrl support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
cyliang tw
512371b75b soc: arm: add support for nuvoton numaker m46x series
Add initial support for nuvoton numaker m46x SoC series including
basic init.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
Adrian Warecki
64b2246dbc soc: adsp: clk: Add multiple clock sources support for dai
Added a new function to check whether a clock source is supported by a
platform and to retrieve its frequency.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-06-20 14:19:13 -04:00
Adrian Warecki
1a4bc7580b adsp: Rename cpu clock related functions
The word cpu was added to the names of functions, structs, types
and definitions to disambiguate the names and make room in the namespace
for soc clock control functions.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-06-20 14:19:13 -04:00
Adrian Warecki
b9e5cf5110 adsp: ace: ace_dfpmccu structure field description
Added ace_dfpmccu structure field descriptions to make the code more
readable.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-06-20 14:19:13 -04:00
Jaska Uimonen
a8b28f13c1 soc: intel_adsp: cavs: add simple IMR functionality
Add simple mechanism to load the image from IMR memory. Basically we are
only setting a flag in power off for the next boot to jump to existing
image in IMR.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-06-20 09:28:56 +01:00
Piotr Wojnarowski
562716d709 soc: arm64: xenvm: Move GIC version to DT
Move the GIC version to the device tree for xenvm
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
bc8b234d9c soc: arm64: ls1046a: Move GIC version to DT
Move the GIC version to the device tree for ls1046a
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
6b004bc1b9 soc: arm64: am6x: Move GIC version to DT
Move the GIC version to the device tree for am6x
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
0e537bc04e soc: arm64: rk3399: Move GIC version to DT
Move the GIC version to the device tree for rk3399
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
2ba2e1dc3a soc: arm64: intel_socfpga: Move GIC version to DT
Move the GIC version to the device tree for intel_socfpga
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
7908d7556c soc: arm64: nxp_imx: Move GIC version to DT
Move the GIC version to the device tree for nxp_imx
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
7626426f27 soc: arm64: qemu: Move GIC version to DT
Move the GIC version to the device tree for the QEMU platforms
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
184440239e soc: arm64: mimx9: Move GIC version to DT
Move the GIC version to the device tree for mimx9
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
03aa363a6c soc: arm64: viper: Move GIC version to DT
Move the GIC version to the device tree for viper
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
ff9fe7271a soc: arm64: fvp_aemv8: Move GIC version to DT
Move the GIC version to the device tree for fvp_aemv8{a,r}
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
fc29f73a29 soc: arm: xilinx_zynqmp: Move GIC version to DT
Move the GIC version to the device tree for xilinx_zynqmp
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
0835a99fac soc: arm: renesas_rcar: Move GIC version to DT
Move the GIC version to the device tree for renesas_rcar
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
48ba2aec6a soc: arm: cyclonev: Move GIC version to DT
Move the GIC version to the device tree for cyclonev
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
bca43d3eaf soc: arm: nxp_s32: Move GIC version to DT
Move the GIC version to the device tree for nxp_s32
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Piotr Wojnarowski
95c1a7e83f soc: arm: xilinx_zynq7000: Move GIC version to DT
Move the GIC version to the device tree for xilinx_zynq7000
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-06-17 08:01:46 -04:00
Manimaran A
0f6cb5edcd drivers: ps2: microchip: Low power and wakeup enabled
ps2 driver updated to support low power and wakeup.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-06-17 07:59:07 -04:00
Marcin Zapolski
f9baca493c soc: arm: stm32l4: Add STM32L4Q5 support
Add STM32L4Q5 to the list of supported SOCs.
Fix copy-paste error in STM32L4P5 SOC file.

Signed-off-by: Marcin Zapolski <mz4pol@gmail.com>
2023-06-17 07:56:49 -04:00
Gerard Marull-Paretas
c0bc9f974f drivers: pinctrl: add TI CC32XX driver
Add a new pinctrl driver for TI CC32XX SoC. The driver has not been
tested, just implemented following datasheet specs and checked that it
compiles. Consider this as a best-effort driver to remove custom pinmux
code in board files.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-17 07:55:43 -04:00
Daniel DeGrasse
9c6853c42f soc: arm: nxp_imx: do not enable RT boot header for CM4 core
Disable RT boot header for CM4 core. This will ensure the boot header is
not present when building an application targeting RAM on the CM4.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-17 07:50:46 -04:00
Carlo Caione
fc480c9382 riscv: privileged: Add support for CLIC vectored mode
Zephyr currently only supports CLINT direct mode and CLINT vectored
mode. Add support for CLIC vectored mode as well.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-17 07:48:52 -04:00
Carlo Caione
6160383ec7 riscv: Rename RISCV_MTVEC_VECTORED_MODE to RISCV_VECTORED_MODE
Before adding support for the CLIC vectored mode, rename
CONFIG_RISCV_MTVEC_VECTORED_MODE to CONFIG_RISCV_VECTORED_MODE to be
more generic and eventually include also the CLIC vectored mode.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-17 07:48:52 -04:00
Khor Swee Aun
5bf2260e90 soc: riscv: riscv-privileged: INTEL Nios V/g support
Add support for INTEL FPGA Nios V/g RISC-V based Processors.
Also amended SOC_NIOSV_M to use ATOMIC_OPERATIONS_BUILTIN.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-06-17 07:34:05 -04:00
Jaska Uimonen
339b00de11 soc: xtensa: intel_adsp: fix memory bank shutdown
Amount of memory banks should vary depending on platform, otherwise
power down sequence might result in ipc timeout as the memory used by
the ipc itself is shutdown.

Lift the needed defines from sram.c to adsp_memory.h and shorten the
names to avoid collision with sof code. No functional change to sram.c.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-06-17 07:31:11 -04:00
Flavio Ceolin
5dfaf23f47 xtensa: intel_adsp: lnl: Fix dspcs struct
This is struct is used to access to contiguous registers for each core
and lnl has 5.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-06-17 07:30:21 -04:00
Gerard Marull-Paretas
c59b57c0be soc: esp32*: do not enable HAS_DYNAMIC_DEVICE_HANDLES
It doesn't make sense to select this option at SoC level. This feature
is meant for subsystems/modules that need device handles to be
modifiable at runtime.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-15 10:09:26 -04:00
Carlo Caione
8eeb5c992e riscv: Move directory to *-privileged
Because the spec is "privileged" not "privilege".

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-09 11:46:29 -04:00
Carlo Caione
edd3437826 riscv: Rename Kconfig symbol to *_PRIVILEGED
Rename SOC_FAMILY_RISCV_PRIVILEGE to SOC_FAMILY_RISCV_PRIVILEGED because
the spec is "privileged".

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-09 11:46:29 -04:00
Pierre-Louis Bossart
b871138fae soc/intel_adsp: fix typo in L1EXP definition
The field offset is incorrect, L1EXP is at bit 24 and L1ETP at bit 25.

Fixes: cc6e9c094a ("soc/intel_adsp: Low level HDA driver and tests")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-06-06 17:20:01 -04:00
Carlo Caione
7a48ad34d9 nordic: Rely on internal busy_wait implementation for QEMU
The Nordic board are selecting CONFIG_ARCH_HAS_CUSTOM_BUSY_WAIT by
default and rely on some HAL code to implement a cycle accurate busy
delay loop.

This is in general fine for real hardware but when QEMU and emulation is
taken into account, a cycle accurate busy wait implementation based on
delay in executing machine code can be misleading.

Let's take for example qemu_cortex_m0 (that is based on the nRF51
chipset) and this code:

  uint32_t before, after;

  while (1) {
      before = k_cycle_get_32();
      k_busy_wait(1000 * 1000);
      after = k_cycle_get_32();
      printk("diff cycles: %d\n", after - before);
  }

With CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000 this diff cycles should
be always around 1000000, in reality when executed with:

  qemu-system-arm -cpu cortex-m0 -machine microbit -nographic
      -kernel build/zephyr/zephyr.elf

This results in something like this:

  diff cycles: 22285
  diff cycles: 24339
  diff cycles: 21483
  diff cycles: 21063
  diff cycles: 21116
  diff cycles: 19633

This is possibly due to the fact that the cycle accurate delay busy loop
is too fast in emulation.

When dealing with QEMU let's use the reliable busy loop implementation
based on k_cycle_get_32() instead.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-05 20:20:54 -04:00
TOKITA Hiroshi
56f64f68ac soc: riscv: gd32vf103: Fix SYS_CLOCK_HW_CYCLES_PER_SEC to 27000000
As a result of the 11a2107d991b("riscv: timer: driver revamp") commit,
gd32vf103 no longer works properly.

In the
c9c04e491e0f("soc: riscv: Add initial support for GigaDevice GD32V SoC")
that is the first commit of implementation of this SoC,
set the CPU frequency to CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC,
and riscv_machine_timer divide the clock with the value of
CONFIG_RISCV_MACHINE_TIMER_SYSTEM_CLOCK_DIVIDER.

The CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC should set the timer's clock,
so I fixed to set the config as 27MHz in this PR.  Also, remove the
unnecessary CONFIG_RISCV_MACHINE_TIMER_SYSTEM_CLOCK_DIVIDER setting.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-06-05 07:08:02 -04:00
Marc Herbert
d98a7c2f8d soc: xtensa: cmake: add new WEST_SIGN_OPTS variable
This allows per-board rimage customization.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-06-02 15:07:59 -04:00
Marek Matej
02d157b8db soc: esp32: Update soc startup and cache init
Updated the cache init functions
and clean-up the soc startup function.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-06-01 10:05:20 +02:00
Marek Matej
548e8b717d soc: esp32: Fix linker scripts
Updated the flash segment alignment on S3,
so that mapping corresponds with the linkage.
Fixed hard-coded flash size for ESP32.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-06-01 10:05:20 +02:00
Kai Vehmanen
aa5b66be5f intel_adsp: cavs25: configure access to ALH
For Intel cavs2.5, access from LPGPDMAC to Audio Link Hub
RX/TX registers needs to be explicitly enabled before use.

The logic follow hardware initialization done in
SOF project sof/src/platform/intel/cavs/platform.c

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-05-30 10:50:02 -04:00
Siyuan Cheng
4babd545cc drivers: pinctrl: add pinctrl driver for ARC emsdp
Add Synopsys ARC EMSDP board Pin controller for its Pmod
and Arduino shield interface.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-05-29 09:21:07 -04:00
Mahesh Mahadevan
0602ef8647 soc: nxp_lpc: Add USBFS support
1. Add support for the USB Full Speed controller
2. Add a Kconfig to specify if a dedicated USB
   RAM is available in the SoC.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-26 17:53:37 -04:00
Daniel DeGrasse
ac0ae62b58 soc: arm: nxp_imx: add FLEXSPI1 and FLEXSPI2 memory sections for RT5xx
Add FLEXSPI1 and FLEXSPI2 memory sections for RT5xx SOC. These sections
can be used by the user's application as part of a custom linker script,
if the application needs to relocate a buffer to external SRAM connected
to FLEXSPI1 or FLEXSPI2

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-26 10:21:34 -05:00
Tyler Ng
28a18ece43 soc: riscv: riscv-privilege: opentitan: Enable watchdog reset function
Adds watchdog reset as a reset source at SoC init. This is achieved by:

1. Writing 0x2 to the RESET_EN bitfield register to indicate watchdog
reset is enabled.
2. Writing 0x1 to the CFG_CDC_SYNC register to commit the change.
3. Polling the CFG_CDC_SYNC register until reading 0 to confirm the
change has been processed.

This patch is part of the OpenTitan watchdog (AON Timer) support patch
series. It is needed to ensure that the watchdog reset functionality
is enabled. Note that the timer itself is not enabled here, only the
reset function.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
Tyler Ng
e6075541ab soc: riscv: riscv-privilege: opentitan: Fix PLIC interrupts
1. Fixes the number of interrupts in OpenTitan by default. This should
   be 32 + 185 = 217 IRQs, as there are 185 configurable registers,
   including interrupt 0.

2. Adds 2ND_LVL_INTR_00_OFFSET Kconfig, which is needed to generate a
   PLIC interrupt on IRQ 11.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
Anas Nashif
8e3437461d soc: intel_adsp: remove obsolete headers for cAVS platforms
The SoCs/Boards using those headers were dropped, so remove those
remaining headers that were forgotten.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-26 09:06:12 -04:00
BJ Chen
215f180296 ITE: drivers/usb/device: Add USB Device Controller Support
Add USB Device Driver (usb_dc) of ITE IT82xx2

TEST=west build -p always -b it82xx2_evb
1. zephyr/sample/subsys/usb/hid
2. zephyr/sample/subsys/usb/hid-mouse

Signed-off-by: BJ Chen <bj.chen@ite.com.tw>
2023-05-26 12:40:18 +02:00
Filip Kokosinski
c590f62613 soc/arm/silabs_ex32/efr32bg27: select CONFIG_SOC_GECKO_SE
This commits selects the `CONFIG_SOC_GECKO_SE` option for the BG27 SoC
series. This is required for BLE support, as it enables the inclusion of
the `sl_protocol_crypto` component from SiLabs HAL.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-26 05:54:40 -04:00
Niek Ilmer
abf9e4d1f4 scripts: runners: ezflashcli: Add support to flash images for MCUboot
Internal bootloader will only run application image if valid product
header is present on flash. This means product header is required for
application that are not linked to code partition. Other applications
that are linked to code partition are meant to be run by MCUboot and
should not touch product header, with the exception of MCUboot itself
which is also run by internal bootloader so requires product header.

Default flash load offset for applications not linked to code partition
is set to 0x2400 as this is where internal bootloader looks for an
application image to run based on product header written by flasher.

Flash load offset for MCUboot is set from boot partition.

Valid product header is added by ezFlashCLI when using "flash_image"
command.

Co-authored-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2023-05-26 05:53:02 -04:00
Niek Ilmer
ffdbf05a47 soc: arm: smartbond: Reconfigure cache on init
Applications that are run from MCUboot should reconfigure cache to
ensure they run from cached ared on flash. Initial cache configuration
is done by internal bootloader and is valid for MCUboot only.

Cache is configured once at boot, then new configuration is applied by
triggering SW reset.

Co-authored-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2023-05-26 05:53:02 -04:00
Niek Ilmer
d39ada2248 soc: arm: smartbond: Set flash base address
Flash address is updated to 0x16000000, i.e. actual location instead of
remapped one. FLASH_BASE_ADDRESS is now set via dts.

Co-authored-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2023-05-26 05:53:02 -04:00
Flavio Ceolin
44415eb881 intel_adsp: Initialize threadptr register
Initialize threadptr with 0 during the boot before it possibly be used
since the architectural reset state is undefined.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-25 18:23:39 -04:00
Marek Matej
4796746b5e soc: esp32: MCUboot support
This make MCUboot build as Zephyr application.
Providing optinal 2nd stage bootloader to the
IDF bootloader, which is used by default.
This provides more flexibility when building
and loading multiple images and aims to
brings better DX to users by using the sysbuild.
MCUboot and applications has now separate
linker scripts.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-05-25 16:15:54 +02:00
Roman Dobrodii
a2d9f6fcbe soc/arm/silabs: bugfix - disable PMGR if no DEV_INIT
sl_power_manager can only be used if HAL services infrastructure
is enabled, and that is controlled by SOC_GECKO_DEV_INIT kconfig option.
Therefore, SOC_GECKO_PM_BACKEND_PMGR may not be enabled without
SOC_GECKO_DEV_INIT.

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-05-25 13:34:18 +00:00
Rander Wang
49c7aa56fa soc: intel_adsp: undefine NOP32
It should not be NOP16.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-05-25 04:49:14 -04:00
Roman Dobrodii
defb159ab1 soc/arm/silabs: support BLE with PM in Series 2 SoCs
Using EM2 or deeper sleep states (where HF clocks are off) requires
special care if BLE radio is used, since BLE radio relies on that clock,
and its power/clock requirements need to be taken into account
On SiLabs, radio PM is implemented as part of RAIL blob, which relies
on sl_power_manager HAL service. I've implemented SoC PM
state changes using sl_power_manager instead of emlib, and added
call to RAIL PM initialization in Gecko HCI driver.

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-05-24 13:31:44 -04:00
Carlo Caione
6f3a13d974 barriers: Move __ISB() to the new API
Remove the arch-specific ARM-centric __ISB() macro and use the new
barrier API instead.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-05-24 13:13:57 -04:00
Carlo Caione
cb11b2e84b barriers: Move __DSB() to the new API
Remove the arch-specific ARM-centric __DSB() macro and use the new
barrier API instead.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-05-24 13:13:57 -04:00
Tomasz Leman
7d54586751 soc: intel_adsp: ipc: check for pending ack
This patch modifies intel_adsp_ipc_is_complete function so it don't
report that IPC is completed when we are still waiting for ACK from
HOST.

This change will allow to solve the problem that occurs during the power
state transitions. Occasionally, the Application decides to enter the
power gating state after sending an IPC message, before receiving an ACK
from the HOST. This results in broken IPC communication when coming back
to Idle state.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-05-23 22:07:08 -04:00
Jeppe Odgaard
eed2de8c03 soc: rt10xx: add flexspi clock functions
Add SOC specific function to set the flexspi clock divider and get the
flexspi clock frequency.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-05-22 10:15:03 +02:00
Kamil Serwus
632704e04b sam: can: CAN driver for SAM0 socs
Driver was based on can_sam. SAMC21 has only 1 interrupt for one
can "output", so can interrupt has to executes two lines of
interrupts.
CAN is configured to use OSC48M clock via GLCK7. GLCK7 is set
by divider configured from dts.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2023-05-22 08:03:58 +00:00
Sumit Batra
7dce14632d soc: arm: nxp_imx: support enet2 interface on RT106x series
This patch enables the PLL clock output and PLL ref clock
for second ethernet module in NXP's i.MxRT106x SoCs

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2023-05-18 14:08:06 -05:00
Laurentiu Mihalcea
58d1c6146c soc: xtensa: nxp_adsp: Enable cache management API for NXP SoCs
Thanks to PR [1] which introduces support for cache management
operations on xtensa architecture NXP SoCs can now use the
Zephyr native cache management API.

This commit enables some configurations that will allow us
to use the native Zephyr cache management API.

[1]: https://github.com/zephyrproject-rtos/zephyr/pull/50136

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-17 18:34:24 -04:00
Mike J. Chen
7c0784db36 mimxrt595_evk: add i3c
Add i3c to device tree and the clock init to soc.c

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-05-17 09:34:31 -05:00
Mulin Chao
9da9c90639 intc: miwu: npcx: improve interrupt latency of miwu input events
To reduce the interrupt latency of MIWU events, the driver prepares a
dedicated callback function item list for each MIWU group in this PR. We
needn't check the MIWU table and group of the event in ISR. And the
maximum item number of each list is also limited to 8. After applying
this PR, the interrupt latency reduces to ~10us consistently.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-05-17 09:48:54 +02:00
Sreeram Tatapudi
ea591e2899 drivers: bluetooth: Add Infineon Bluetooth driver
Add initial version of the Bluetooth driver for
the cy8cproto_063_ble board

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-17 09:59:36 +03:00
Flavio Ceolin
706cfbbb76 intel_adsp: ace: Fix heap in the linker
The end of the heap should be the same as _heap_sentry. The current end
marker just covers the range of memory that is explicitly put in
.heap_memand not account until the end of L2_SRAM_BASE +
L2_SRAM_SIZE memory.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-16 20:56:20 -04:00
Manimaran A
f8c8ee65be drivers: pinctrl: Microchip XEC PINCTRL glitch fix
Glitches were observed if a GPIO pin was configured by
ROM to a non-default state and then Zephyr PINCTRL
reconfigured the pin. The fix involves using the correct
PINCTRL YAML output enable and state flags. Reading the
current spin state and reflecting into new pin configuration
if the pin is output and the drive low/high properties are
not present. We also take advantage of GPIO hardware reflecing
the alternate output value in the parallel output bit before
enabling parallel output mode. Interpret boolean flags with
both enable and disable as do not touch if neither flag is
present. We give precedence to enable over disable if both
flags mistakenly appear. Note, PINCTRL always clears the
GPIO control input pad disable bit.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-16 18:52:44 -04:00
Mahesh Mahadevan
df26e99637 pm: rt5xx: Enable OS Timer as wakeup source
1. Enable os_timer as a wakeup-source in the board
   dts file.
2. Enable PM_DEVICE when PM is enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-16 18:19:35 +02:00
Peter Mitsis
2ebb2bb1ab soc: xtensa: Lower HW_STATE_CHECK_DELAY
The macro HW_STATE_CHECK_DELAY represents the number of usec to
busy-wait when waiting for a h/w register state change. This value
has been lowered by 75% to correct a couple of issues related
to Power Management (PM).

1. This resolves a kernel.timer.tickless test failure (see
tests/kernel/timer/timer_api) on the LNL simulator where the test
was taking too long to wake after sleeping for 50 ticks. This
was tracked down to the xtensa SOC power management code where
it was performing a busy wait of 256 usec, which was equivalent
to 2.56 ticks.

2. Furthermore, this delay of 256 usec contradicted the information
in the DTSI (see power-states for d0i3) which states that the
"exit-latency-us" is 100 usec. Reducing this value to 64 helps to
keep that in line.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-05-16 06:12:27 -04:00
Marc Herbert
5ae7bd84d3 soc: xtensa: nxp: invoke west sign at west build time
This aligns `soc/xtensa/nxp_adsp/` with commit
fad2da39aa ("intel_adsp: move `west sign` from `west flash` to earlier
`west build`")

The --if-tool-available option preserves backwards-compatibility:
nothing happens if rimage is not found.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-16 12:08:43 +02:00
Daniel Leung
9fc99928ca soc: intel_adsp/ace: update SOC_TOOLCHAIN_NAME
Update the SOC_TOOLCHAIN_NAME to intel_ace15_mtpm so that
we use the correct overlay in Xtensa HAL module. Note that
ace20_lnl will also be using this as well. That will change
once we have a proper toolchain for ace20_lnl.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-16 01:50:00 +09:00
Daniel Leung
49d0ad5520 soc: intel_adsp: update toolchain for cavs25
This updates the toolchain used for intel_adsp_cavs25 to
the proper toolchain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-05-16 01:50:00 +09:00
Jaroslaw Stelter
9c0dd7e3be intel_adsp: ace20_lnl: Change LNL core count to 5
The ACE 2.0 LNL platform has 5 HIFI4 cores. Change number
of cores to enable 5th core on the platform.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-05-15 08:00:11 -04:00
Oliver King
a13858e132 soc: stm32wl: Added logging declaration to soc.c
Added logging declaration to soc.c of stm32wl, which resolves build
errors when using this SOC with DEBUG logging level

Fixes: #57655

Signed-off-by: Oliver King <oliver.king@steadconnect.com>
2023-05-15 09:59:22 +00:00
Flavio Ceolin
15a3f8c7e7 intel_adsp: ace: Fix __rodata_region_end marker on linker
Move __rodata_region_end to after the inclusion of common-rom.ld

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-12 18:20:54 -04:00
Guennadi Liakhovetski
986eb6aafd xtensa: remove ELF section address rewriting
(resubmitting after it has been reverted by 0f2a352cbd ('Revert
"xtensa: remove ELF section address rewriting"')

Now rimage can handle both cached and uncached addresses correctly,
ELF rewriting isn't needed any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-05-12 18:19:59 -04:00
Yves Vandervennet
0f87666126 i2s : mimxrt595_evk_cm33: enablement of driver
board:

 - update device tree to use flexcomm devices to the chip design
 - enable clocks (soc init file)
 - setup connections for loopback test in system controller (board init
   file)

tests:

 - update board files (overlay, conf)

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2023-05-12 13:50:33 -05:00
Flavio Ceolin
665812f994 xtensa: intel_adsp: Lock vecbase after initial setup
Lock the vecbase register after the hw initialization.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-12 06:01:46 -04:00
Daniel DeGrasse
b3fd44a4ac soc: arm: nxp_imx: add KConfig definitions for RT1042
Add Kconfig defintions for RT1042 SOC, including part numbers and SOC
feature selections.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:35:40 -05:00
Daniel DeGrasse
746758d1f6 drivers: display: update MCUX ELCDIF driver to use new lcdif binding
Update MCUX ELCDIF driver to use new LCDIF bindings. This
update also adds support for configuring the root clock of
the ELCDIF module based on the pixel-clock property to the
RT11xx SOC clock init, as this SOC series has this IP block

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Daniel DeGrasse
a4afa7d164 drivers: update DCNANO LCDIF IP to use shared LCDIF binding
Update DCNANO LCDIF IP to use shared lcd interface binding. This
requires changes to the RT5xx SOC and RT595 EVK, as this SOC
uses the LCDIF IP, and configures the clock for it based off
the new pixel-clock property.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Daniel DeGrasse
98408b1733 dts: mipi_dsi: introduce phy-clock property
Introduce phy-clock property, which is used by MIPI devices to determine
the target clock frequency for the MIPI PHY. This property can vary
depending on the attached display and target framerate.

Update the MIPI DSI MCUX driver to utilize this property to configure
the MIPI host, and update the RT500 clock initialization to configure
the MIPI root clock based on this property.

Remove dphy-clk-div property from the MIPI DSI 2L binding, as it
is redundant with this change.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:04:24 +02:00
Flavio Ceolin
05cd4b07f7 intel_adsp: linker: Rename text area variables
Use Zephyr's convention for text region start and end.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-10 08:06:30 -04:00
Maxime Vincent
012663f178 soc: arm: nxp: add lpc55s16jbd64
Add support for lpc55s16jbd64 chip variant

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2023-05-10 10:15:14 +02:00
Sreeram Tatapudi
38d3a90b3f soc: infineon_cat1: Support PSoC 1M devices
- Add the files required to support PSoC 1M devices

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-10 16:49:59 +09:00
Nicolas Pitre
3aab212920 riscv: Microchip Mi-V should use built-in atomic operations
The Mi-V implements the A extension therefore it shouldn't use the C
version. The built-in version generates code with proper machine
opcodes.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-05-09 13:04:27 +02:00
Iuliana Prodan
b2f1f64f57 boards: xtensa: nxp_adsp_imx8m: Add UART support for the ADSP from i.MX8MP
Enable UART on the DSP from the i.MX8MP target:
- add corresponding nodes in dtsi and dts;
- create a dts overlay for uart;
- add a config fragment for uart and console configuration.

So, in order to compile an application and enable UART
a user must run west build using DTC_OVERLAY_FILE and CONF_FILE.

Here's an example for hello_world:
west build -p always -b nxp_adsp_imx8m samples/hello_world/
-DDTC_OVERLAY_FILE="boards/xtensa/nxp_adsp_imx8m/
nxp_adsp_imx8m_uart.overlay" -DCONF_FILE="boards/xtensa/nxp_adsp_imx8m/
nxp_adsp_imx8m_uart.conf"

For other applications, like SOF, where we don't need UART, we simply run:
west build -p always -b nxp_adsp_imx8m ../modules/audio/sof/ --
-DTOOLCHAIN=/opt/zephyr-sdk-0.15.2/xtensa-nxp_imx8m_adsp_zephyr-elf/
bin/xtensa-nxp_imx8m_adsp_zephyr-elf -DINIT_CONFIG=imx8m_defconfig

The nxp_adsp_imx8m is using the nxp_imx_iuart driver.
For now, is used in poll mode.
Next step is to enable the interrupt controller in
DSP and use the interrupt driver UART.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-08 13:06:12 -05:00
Iuliana Prodan
98bc2d8a40 soc: xtensa: nxp_adsp: imx8m: rename soc
Rename soc to mimx8ml8 to link this board to the
MIMX8ML8 device from nxp_hal/mcux/mcux-sdk/.

We need this in order to use the drivers from mcux-sdk.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-08 13:06:12 -05:00
Antonio Tessarolo
4598e6bf0a drivers/adc: imx6sx ADC support.
This commit adds support for adc_vf610 ADC.

Signed-off-by: Antonio Tessarolo <anthonytexdev@gmail.com>
2023-05-08 16:42:40 +02:00
Sreeram Tatapudi
883e40db51 soc: infineon_cat1: Support for .cy_ramfunc
- Add cy_ramfunc in to RAMFUNC_SECTION section

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-08 11:16:09 +02:00
Gerard Marull-Paretas
8b616ab24a soc: arm: atmel_sam0: use late PRE_KERNEL_1 level for samr3x radio off
Initialize in the late stage of PRE_KERNEL_1 instead of using
early PRE_KERNEL_2.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-05 18:57:07 +09:00
Gerard Marull-Paretas
6dde0056fc soc: arm: atmel_sam0: improve radio off handling for samr3x
Improve the radio off code, mainly:

- Compile the file only if necessary, ie, LORA radio not in use
- Use pin information from DT, so that we do not need to hardcode pins
  and can switch to dt-spec APIs.
- Improve error handling, includes, etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-05 18:57:07 +09:00
Andrzej Głąbek
7a54aed015 modules: hal_nordic: nrfx: Handle properly I2S0 instance
Although existing nRF SoCs have only one I2S instance, the nrfx_i2s
driver has now multi-instance API and the related nrfx configuration
symbols need to be used appropriately.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Daniel DeGrasse
b686f206b9 soc: arm: nxp: ensure code cache is enabled at boot for RT11xx
Ensure code cache is enabled at boot for RT11xx. CMSIS SystemInit should
enable the code cache, but if CONFIG_INIT_ARCH_HW_AT_BOOT=y and
CONFIG_CACHE_MANAGEMENT=y, then the cache will be disabled after
SystemInit is called. Since calling SCB_EnableICache will not
change hardware settings if the ICACHE is already enabled, just
call it unconditionally during init.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-04 20:50:37 +02:00
Markus Fuchs
4310853d07 boards: Add support for SiLabs xG24-PK6010A board
Add Silicon Labs xG24-PK6010A (BRD4187C radio plug-in board)
support to the efr32_radio board.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-05-04 20:49:12 +02:00
Jan Peters
b9235faf22 soc: arm: imx_rt10xx: enable code cache during boot
For certain combinations of configuration parameters,
z_arm_init_arch_hw_at_boot() disables the instruction cache. Make sure
to re-enable it if required.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2023-05-04 10:47:23 +02:00
Filip Kokosinski
a30862455e treewide: rename Microsemi to Microchip
Do a treewide Microsemi to Microchip rename and update obsolete links in
the board docs.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-04 10:47:07 +02:00
Paul Olaru
fa5117225a nxp_adsp: Do not use xtensa hal with xcc-clang
Do not use XTENSA_HAL when building with xt-clang, instead use the HAL
that is provided by the toolchain, similarly to xt-xcc.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2023-05-02 11:12:52 -05:00
Nikolay Agishev
0d8292ab6b ARC: Add HS4x support
Minimal HSDK4xD support

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2023-05-02 16:54:24 +02:00
Andriy Gelman
f2b61595f0 soc: arm: infineon_xmc: Add XMC4700 MCU series
Adds XMC4700 MCU series.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-05-02 12:34:55 +02:00
Tomasz Leman
04d97569d1 intel_adsp: power: add missing header
After commit e195739565 function bmemcpy require soc_util include.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-05-01 10:59:05 +01:00
Emil Obalski
52e203f800 ipc: Remove internal API for clearing shared memory
Clearing of shared memory by one side of the communication
is no longer required after
commit 0620cb1fe1
("ipc: ipc_service: icmsg: Increase reliability of bonding")
was merged.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-04-29 12:24:17 +02:00
Lucas Tamborrino
b24d9ca7a6 drivers: flash: esp32s3: Add spiflash support
Add support for spiflash to esp32s3

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-28 10:08:16 +02:00
Declan Snyder
4b45928e86 drivers: lpadc: Move SOC code out of driver
To be consistent with the current NXP clocking scheme,
move the LPADC clocking code to the SOC files where
all of the other peripheral clocking is done.

Also remove any other SOC-specific code to the
respective SOC file and out of this driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-04-28 10:08:05 +02:00
Tomasz Leman
aba3b12e31 intel_adsp: power: ace: cache invalidation
This patch moves cache flush/invalidation to section executed only when
IMR context saving is enabled. If this option is disabled no FW context
is stored so any lost data doesn't matter.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-04-28 10:07:15 +02:00
Tomasz Leman
e5fc2093c2 intel_adsp: power: ace: interrupts on and off
Masking out all interrupt during power state transition and restoring
them after is now common thing for all power states. No need to
duplicate code.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-04-28 10:07:15 +02:00
Tomasz Leman
3df442a982 intel_adsp: ace: secondary core context restore
Reusing primary core context save/restore flow for purpose of secondary
core D0 -> D3 -> D0 transitions. If core is re-enabled we use
dsp_restore_vector as the FW entry point.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-04-28 10:07:15 +02:00
Tomasz Leman
9282ebef00 intel_adsp: ace: cpu context save refactor
This patch is preparing cpu context save and restore code so it can be
later used by the multiple cores.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-04-28 10:07:15 +02:00
Tomasz Leman
96bf4e8961 intel_adsp: ace: add stack for other cores
This patch replace temporary stack of the restore vector with interrupt
stack to reduce memory usage. Additionally we can assign seprate stack
for each core. This will allow to reuse this vector for secondary cores.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-04-28 10:07:15 +02:00
Kai Vehmanen
c410ebe5fe soc: xtensa: intel_adsp: fix build error for cavs
Build of Intel cAVS2.5 platforms fails due to undefined reference
sys_cache_data_flush_and_invd_all(). Fix this by adding missing
header include to bring in the inline definition for this function.

Fixes: 6388f5f106 ("xtensa: use sys_cache API instead of custom interfaces")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-04-27 11:08:46 -05:00
Anas Nashif
6388f5f106 xtensa: use sys_cache API instead of custom interfaces
Use sys_cache instead of custom and internal APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-26 07:31:22 -04:00
Anas Nashif
aa4f2bc81e xtensa: move arch non cache API code from cache.h to arch.h
Move additional cache code related to architecture support into arch.h
and leave cache.h with cache API implementation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-26 07:31:22 -04:00
Anas Nashif
e195739565 intel_adsp: move utils to a new header
Move utility code into a new header and cleanup soc.h

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-26 07:31:22 -04:00
Anas Nashif
400c7950b6 soc: intel_adsp: use abstracted arch APIs for cache ops
Use architecture APIs for cache operations with this soc family.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-26 07:31:22 -04:00
Tim Lin
1a2874affb ITE: drivers/i2c: Disable pre-detect on IT82xx2 family
Disable the hardware I2C target detection on the IT82xx2 SoC family.

Note: The register setting of I2C target detection is different in
IT81XX2 and IT82XX2 SOC.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-26 12:55:02 +02:00
Balthazar Deliers
a0ad7b7752 dts/arm/st/u5: Support for STM32U59x
Added support for STM32U595 and STM32U599 with basic peripherals.

Signed-off-by: Balthazar Deliers <balthazar.deliers@psicontrol.com>
2023-04-25 20:00:28 +02:00
Roman Dobrodii
563cc014dd soc/arm/silabs/bg2x: enable flash driver
It is enabled by default if Device Tree includes a flash controller,
and disabled otherwise. SoC defconfig should not touch it.

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-04-25 12:20:20 +02:00
Ryan McClelland
e01a5c52ca soc: mps3: add pmu defines for cmsis
The mps3 soc is missing PMU defines required for CMSIS. This
adds the defines __PMU_PRESENT and __PMU_NUM_EVENTCNT
enabling the api for the PMU.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-04-24 13:36:03 +02:00
Marc Desvaux
c4522be374 soc: arm: st_stm32: Move STM32H7_DUAL_CORE
Move STM32H7_DUAL_CORE to
soc/arm/st_stm32/stm32h7/Kconfig.soc
add select STM32H7_DUAL_CORE for SOC_STM32H745XX/H747XX
Cleanup old occurences where was set to y

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-04-24 13:30:46 +02:00
Jan Krautmacher
759b572711 soc: arm: Add CONFIG_STM32H7_BOOT_M4_AT_INIT
This new Kconfig option lets the developer configure if the Cortex M4
core should be force-booted during M7 init independent of the BCM4
option byte.

This allows to disable this default behaviour via Kconfig which was not
possible so far.

Signed-off-by: Jan Krautmacher <jan@krautmacher.org>
2023-04-24 13:30:39 +02:00
Jamie McCrae
f79a08d6c0 soc: arm: nordic: Deprecate reboot type in GPREGRET
Deprecates setting GPREGRET to the reset reason as this has been
replaced with the boot mode retention subsystem for nRF51/nRF52.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-24 13:27:53 +02:00
Mateusz Sierszulski
0417d38d4d drivers/adc: add Gecko IADC driver
This commit adds the Gecko IADC driver and support for it to the
efr32bg_sltb010a board.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-04-21 16:24:39 +02:00
Filip Kokosinski
f810094dc8 soc/arm/silabs_exx32/efr32mg24: enable Secure Element
Secure Element's mailbox is needed for entropy gathering purposes.
Enable it in the EFR32MG24 SoC series Kconfig.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-21 16:24:25 +02:00
Roman Dobrodii
cb14d8b099 soc/arm/silabs_exx32: fix PM implementation - wake up using BURTC timer
- Add Gecko BURTC sys_clock driver to handle wake up from EM2,3 states
- Remove custom PM policy and dependency on HAL sl_power_manager service
- EM1 supported in all configurations
- EM2,3 supported only if SysTick is replaced by BURTC

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-04-21 16:24:05 +02:00
Krzysztof Boronski
df7f10422e boards: arm: efr32bg27_brd2602: Initial support
Adds initial support for efr32bg27_brd2602 - Thunderboard-style board.
Supported features are:
* counter
* gpio
* uart

Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-04-21 12:55:06 +02:00
Manojkumar Subramaniam
d57363bc97 riscv: refactor: Utilize the available helper macro
use helper macros from csr.h instead of inline assembly which results
in cleaner and more maintainable code

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2023-04-21 12:54:55 +02:00
Jaroslaw Stelter
5ff2ca8415 intel_adsp: ace20_lnl: Add imr layout header to LNL
To enable IMR on LNL platform new header added to
support context save/restore must be added also to LNL.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-20 13:14:34 -04:00
Filip Kokosinski
4a614de289 drivers/bluetooth/hci: add SiLabs BLE HCI driver
This commit adds the SiLabs Bluetooth HCI driver. It also enables this
BLE HCI driver on the efr32bg_sltb010a board.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-20 16:13:14 +02:00
Yves Vandervennet
788ba12137 nxp: hal: code update to reflect changes in SDK 2.13
HAL API changes in ethernet and pwm
SoC RT595 power management code change
west.yml update

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2023-04-20 08:11:19 -05:00
Jamie McCrae
794ab10827 soc: Only select HAS_SEGGER_RTT if module is available
This prevents configuration errors if a board is configured when
the SoC indicates segger RTT support but the segger module is
not available.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-04-20 14:57:51 +02:00
Daniel Leung
1e9d4602ab xtensa: add some structs for interrupt stack frames
This adds some structs for interrupt stack frames to make it
easier to access individual elements, and ultimately getting
rid of magic array element numbers in the code. Hopefully,
this would aid in debugging where you can view the whole
struct in debugger.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-04-20 04:45:52 -04:00
Ben Lauret
9cdc5d38b2 drivers: spi: Add driver for smartbond
This adds the SPI driver for the Renesas SmartBond(tm) DA1469x MCU family.
The driver only supports controller mode. All four SPI modes are supported.
Note that the lowest supported speed is 2285714Hz.
Requesting speeds higher than 16MHz, will result in a 16MHz SCLK.

Co-authored-by: Stan Geitel <stan@geitel.nl>

Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
2023-04-20 10:32:40 +02:00
Marek Matej
ddab8786fd soc: kconfig: Add config for ESP32 family
Introduce config for all ESP32 chips which
may be using different architectures but
shares common peripherals and features.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-04-19 17:12:26 +02:00
Sylvio Alves
a6c8c6e546 soc: esp32s3: add Wi-Fi support
This adds Wi-Fi linker areas and also bring wi-Fi entry
into SoC device tree.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-04-19 17:11:58 +02:00
Filip Kokosinski
3583cd2d31 soc/arm/silabs_exx32/common/soc_power: add missing __weak symbol
This commit adds a missing `__weak` symbol to the `pm_policy_next_state`
function.

This is needed for e.g. `tests/kernel/profiling/profiling_api` to build
correctly.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-19 04:54:19 -04:00
Laurentiu Mihalcea
57ca49aaa9 soc: arm64: nxp: mimx9: Create identity mappings for regions in SOF dts
This commit creates identity mappings for all memory regions required
by SOF. This is needed because drivers using these memory regions have
not yet been ported to Zephyr.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-04-19 10:01:19 +02:00
Laurentiu Mihalcea
e1841a966d soc: arm64: nxp: mimx9: Modify linker script to include SOF sections
Since SOF uses some extra sections we need to add them to the linker
script. The used linker script is simply a copy of arm64 linker script
with SOF regions included. This is because conditionally adding sections
to the main arm64 linker script is not really desirable.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-04-19 10:01:19 +02:00
Tim Lin
71b92265d7 ITE: dts: it82xx2: Increase sram to 256KB
1. Increase sram to 256KB.
   A block sram of SCAR0~15 is 4KB.
   A block sram of SCAR16~19 is 16KB.
   A block sram of SCAR20~23 is 32KB.

2. Removed the register of RVILMCR which has no effect.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin
491e3e6477 ITE: drivers/gpio: Add gpio_ite_it8xxx2_v2 driver
This driver is made for it82xx2 series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin
7f3d61c608 ITE: dts: it8xxx2: Add the option of 512k flash size
Add the option of 512k flash size.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin
051bd7098a ITE: dts: it82xx2: Add pinctrl node and kscan's pinctrl
Add the pinctrl node that has been remapped in the chip of it82xx2.
And modify kscan's pinctrl for the it82xx2.
And swap I2C default pins.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin
e1ae5c02cb ITE: dts: it82xx2: Add GPIO general control node in it82xx2.dtsi
Add the GPIO general control node that has been remapped in the
chip of it82xx2.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Ruibin Chang
3fb097c1ff ITE: it82xx2.dtsi: add watchdog device node
With this change, it82xx2 series can use the same
watchdog driver as it81xx2 series.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-04-19 03:48:38 -04:00
Ruibin Chang
b9a7340ded ITE drivers/interrupt_controller: add intc_ite_it8xxx2_v2 driver
This driver is made for it82xx2 series.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-04-19 03:48:38 -04:00
Tim Lin
44250a9e67 ITE: soc: it8xxx2: Add it82302 and it82202 chip configuration
Add the chip configuration for it82302 and it82202.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Andrzej Głąbek
2a4373ce0d soc: nordic_nrf: nrf91: Add support for nRF9161 SiP / nRF9120 SoC
The nRF9161 is technically a SiP (System-in-Package) that consists of
the nRF9120 SoC and additional components like PMIC, FEM, and XTAL,
so for nrfx/MDK the nRF9120 SoC is to be selected as the build target,
but since the nRF9161 is what a user can actually see on a board, using
only nRF9120 in the Zephyr build infrastructure might be confusing.
That's why in the top level of SoC definitions (for user-configurable
options in Kconfig, for example) the nRF9161 term is used and nRF9120
underneath.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-17 09:30:12 -07:00
Andrzej Głąbek
d05a95e5c1 soc: nordic_nrf: nrf52: Clean up option dependencies in Kconfig.soc
Use one common `if SOC_SERIES_NRF52X` instead of `depends on` for
each particular SoC option.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-17 09:30:12 -07:00
Andrzej Głąbek
399fa64e7e soc: nordic_nrf: Remove unnecessary inclusions
This is a follow-up to commit 4be102f8e05a9fa12290d8209a8cb38569265478.

Inclusion of `<system_nrf*.>` from `soc.c` files is no longer needed
since `SystemInit()` is not called from those files.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-17 09:30:12 -07:00
Jaska Uimonen
bdffde3695 soc: xtensa: intel_adsp: do power off only with custom pm policy
The power off sequence in cavs is meant to be used only by custom pm
policy handler thus guard it with proper ifdefs.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-04-17 15:12:24 +02:00
Maxime Vincent
006f16de25 USB: NXP LPC55S16 USB-HS support
This adds USB-HS support for LPC55S16, much in the same way that
LPC55S28 support was added previously.

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2023-04-13 10:28:00 -05:00
Alberto Escolar Piedras
659e2292a5 soc_inf: Refactor native tasks into own header
The native_tasks definition was directly in the soc_inf soc.h
header. But soc.h pulls a lot of other headers.
Some of those could cause conflicts, say with application
headers, for users who only wanted the be able to register
native tasks in a module.

Let's refactor the native tasks definitions into their own header
and include that header from soc_inf's soc.h.
In this way users who need only need to register a native tasks
can just include posix_native_tasks.h, and all previous users
see no change.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-13 13:35:20 +02:00
Gerard Marull-Paretas
4863c5f05b sys/util: extend usage of DIV_ROUND_UP
Many areas of Zephyr divide and round up without using the DIV_ROUND_UP
macro. Make use of it, so that we make use of a tested system macro and
at the same time we make code more readable.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-12 16:42:29 +02:00
Gerard Marull-Paretas
a5fd0d184a init: remove the need for a dummy device pointer in SYS_INIT functions
The init infrastructure, found in `init.h`, is currently used by:

- `SYS_INIT`: to call functions before `main`
- `DEVICE_*`: to initialize devices

They are all sorted according to an initialization level + a priority.
`SYS_INIT` calls are really orthogonal to devices, however, the required
function signature requires a `const struct device *dev` as a first
argument. The only reason for that is because the same init machinery is
used by devices, so we have something like:

```c
struct init_entry {
	int (*init)(const struct device *dev);
	/* only set by DEVICE_*, otherwise NULL */
	const struct device *dev;
}
```

As a result, we end up with such weird/ugly pattern:

```c
static int my_init(const struct device *dev)
{
	/* always NULL! add ARG_UNUSED to avoid compiler warning */
	ARG_UNUSED(dev);
	...
}
```

This is really a result of poor internals isolation. This patch proposes
a to make init entries more flexible so that they can accept sytem
initialization calls like this:

```c
static int my_init(void)
{
	...
}
```

This is achieved using a union:

```c
union init_function {
	/* for SYS_INIT, used when init_entry.dev == NULL */
	int (*sys)(void);
	/* for DEVICE*, used when init_entry.dev != NULL */
	int (*dev)(const struct device *dev);
};

struct init_entry {
	/* stores init function (either for SYS_INIT or DEVICE*)
	union init_function init_fn;
	/* stores device pointer for DEVICE*, NULL for SYS_INIT. Allows
	 * to know which union entry to call.
	 */
	const struct device *dev;
}
```

This solution **does not increase ROM usage**, and allows to offer clean
public APIs for both SYS_INIT and DEVICE*. Note that however, init
machinery keeps a coupling with devices.

**NOTE**: This is a breaking change! All `SYS_INIT` functions will need
to be converted to the new signature. See the script offered in the
following commit.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

init: convert SYS_INIT functions to the new signature

Conversion scripted using scripts/utils/migrate_sys_init.py.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

manifest: update projects for SYS_INIT changes

Update modules with updated SYS_INIT calls:

- hal_ti
- lvgl
- sof
- TraceRecorderSource

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

tests: devicetree: devices: adjust test

Adjust test according to the recently introduced SYS_INIT
infrastructure.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

tests: kernel: threads: adjust SYS_INIT call

Adjust to the new signature: int (*init_fn)(void);

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-12 14:28:07 +00:00
Franciszek Zdobylak
fe9d6d5737 soc: riscv: sifive: fu740: add DDR clk
Add code that initializes DDR clk alongside other clocks.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-04-12 13:05:55 +02:00
Thomas Stranger
053697cd5f soc: arm: rpi_pico: use aarch32 common nmi init definitions
Remove per soc definitions that are already defined in the exact same
way in include/zephyr/arch/arm/aarch32/nmi.h.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2023-04-12 08:59:36 +02:00
Thomas Stranger
f1263f5868 soc: arm: nordic_nrf: use aarch32 common nmi init definitions
Remove per soc definitions that are already defined in the exact same
way in include/zephyr/arch/arm/aarch32/nmi.h.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2023-04-12 08:59:36 +02:00
Nikodem Kastelik
d5f83d2a7f soc: nordic_nrf: nrf53: remove startup part of anomaly 160 workaround
Initialization part of this anomaly is now handled internally
by the startup code provided by the MDK.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2023-04-11 14:39:59 +02:00
Gerard Marull-Paretas
0ebe14beb4 sys: util: migrate all files to DIV_ROUND_UP
ceiling_fraction is deprecated, use DIV_ROUND_UP.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-11 12:00:37 +02:00
Gerard Marull-Paretas
1f14506c37 soc: arm: aspeed: remove unused DIV_ROUND_UP
Helper macro is not used, so delete it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-11 12:00:37 +02:00
Marc Herbert
fad2da39aa intel_adsp: move west sign from west flash to earlier west build
Invoking `west sign` in `west build` accelerates twister because `west
build` is run in parallel, see rationale in superseded and very
different (CMake-based) PR #52942.

To maximize backwards compatibility:
- `west sign` is optional in `west build`
- `west flash` will sign (again) if any rimage --option is passed

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-04-10 22:04:47 -04:00
Lucas Tamborrino
fcd9234111 soc: xtensa: esp32s3: Add FPU support
Enable FPU on esp32s3

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-08 12:34:25 +02:00
scott worley
cfcd92b893 soc: mec172x: Fix interrupt unmasking in SoC PM restore path
Zephyr PM expects the SoC layer upon wake to unmask interrupts
the PM layer masked. MEC172x was re-enabling interrupt globally
in the Cortex-M4 but not clearing the mask set by Zephyr PM.
This worked in previous Zephyr releases but broke in the latest
Zephyr changes. Fixed the SoC to re-enable interrupts globally
and call irq_unlock(0) as Zephyr PM does if pm_state_exit_post_ops
is not implemented. Tested on MEC172x EVB with PLL clock out pin
enabled and verified PLL goes off in deep sleep, system wakes,
and interrupts are firing.

Signed-off-by: scott worley <scott.worley@microchip.com>
2023-04-07 13:38:56 +02:00
Pawel Czarnecki
91bea1f93b soc: efr32bg2: Kconfig: enable UART interrupt API when PM is used
Power Management works correctly with interrupt API of the UART driver

Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
2023-04-07 13:33:28 +02:00
Filip Kokosinski
c939d6a473 soc/arm/silabs_exx32/common: support power management for EFR32BG
This commit introduces power management support for EFR32BG SoCs.

Tested on the efr32bg_sltb010a board.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-07 13:33:28 +02:00
Rodrigo Cataldo
a25996a661 soc: arm64: qemu: bump highest IRQ when ITS is enabled
The purpose of the GIC ITS is to translate message-passing interrupts into
LPIs. The LPI range starts at value 8192, which means the current default
value (200) is too low. Therefore, bump the highest IRQ number when ITS
is enabled.

Signed-off-by: Rodrigo Cataldo <rodrigo.cataldo@huawei.com>
Co-authored-by: Henri Xavier <datacomos@huawei.com>
2023-04-07 13:26:01 +02:00
Ionut Catalin Pavel
f450153c64 soc: arm: atmel_sam0: improved samd20/samd21/samr21 clocking mechanism
There are some issues with the current version of the code, mainly the
improper use of the internal OSC8M as a source for the DFLL48m without
division. The DFLL48M is designed to accept a maximum of ~33KHz
at it's input, as higher values will bring the multiplier down,
leading to instability.

Also added the following features:
* Support for external HF oscillator (XOSC)
* Support for crystal/external oscillators on XOSC32K/XOSC
* Automatic dividers/multiplier computation based on DT cpu frequency
* Support for user configurable NVM wait states
* Added option to skip clock (re)initialization (bootloader usecase).

Tests were performed on a custom SAMD20G18 board using different clock
sources and cpu frequencies.
Clocks were routed to GPIO pins and observed on a scope.
According to the datasheet, architecture is identical on D21/R21.

Due to the nature of the internal architecture and the fact that
DFLL48M is not really meant to output anything other than 48MHZ
some combinations of requested DT cpu frequency and source
frequency will not result in a perfect match.

Mostly insipred by the SAML21 implementation.

Signed-off-by: Ionut Catalin Pavel <iocapa@iocapa.com>
2023-04-07 13:21:44 +02:00
Mahesh Mahadevan
174824f1cb drivers: gpio: Update NXP GPIO driver for the updated IP Block
1. Move the GPIO mux setting to the soc layer. The GPIO MUX
value may vary based on the SoC Family
2. Enable the digital input buffer if available

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-04-06 14:14:11 -05:00
Anas Nashif
c71b71a662 soc: intel_adsp: simplify for only cavs25
Remove conditional code now that we only support CAVS25.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-06 18:51:56 +02:00
Anas Nashif
98e3699cf7 soc: remove intel_adsp_cavs20
Remove SoC definition for cavs20.
Support for this platform was removed in SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-06 18:51:56 +02:00
Anas Nashif
683a9d90ab soc: remove intel_adsp_cavs18
Remove SoC for cavs18.
Support for this platform was removed in SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-06 18:51:56 +02:00
Anas Nashif
d2cf740e68 soc: remove intel_adsp_cavs15
Remove SoC for cavs15.
Support for this platform was removed in SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-06 18:51:56 +02:00
Jerzy Kasenberg
884d7ea706 drivers: clock_control: smartbond: initial support
This commit adds basic support for the clock controller used in
SmartBond MCUs.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-04-05 15:09:04 +02:00
Pieter De Gendt
6b532ff43e treewide: Update clock control API usage
Replace all (clock_control_subsys_t *) casts with (clock_control_subsys_t)

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-05 10:55:46 +02:00
Scott Worley
5a6cf526ef soc: mec172x: Add hardware debug configuration
Add configuration items to select various ARM debug options
such as SWD only, SWD plus SWV, or SWD plus ETM. The default
is SWD only.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2023-04-04 16:46:07 -04:00
Andrei Emeltchenko
c6b3f009ff boards: rpl_crb: Indicate support for SMBus
Indicate support for SMBus in the board documentation and yaml file.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-04-04 08:15:00 -04:00
Andrei Emeltchenko
42e9751fcf boards: ehl_crb: Indicate support for SMBus
Indicate support for SMBus in the board documentation and yaml file.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-04-04 08:15:00 -04:00
Mateusz Sierszulski
7e2852fe95 boards: Add support for SiLabs efr32xg24_dk2601b board
This commit adds support for Silicon Labs efr32xg24_dk2601b board.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-04-04 13:34:45 +02:00
Mateusz Sierszulski
7f40908e9d soc: silabs_exx32: Add support for SiLabs efr32mg24 SoC
This commit adds support for Silicon Labs EFR32MG24 SoC.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-04-04 13:34:45 +02:00
Jaroslaw Stelter
872907f42c intel_adsp: ace20_lnl: Enable PM on LNL platform
LNL uses MM_DRV_INTEL_ADSP_MTL_TLB to save / restore context.
This is exactly the same like on MTL. Enable PM for ACE 2.0 then.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-03 15:17:21 +02:00
Jaroslaw Stelter
55caa18f3e intel_adsp: ace20_lnl: Update power and status registers
PWRCTL and PWRSTS registers for ACE 2.0 must be updated.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-03 15:17:21 +02:00
Jaroslaw Stelter
feee9405b2 intel_adsp: ace20_lnl: dts: add L3 memory definitions macros
Add helper macros for l3 memory definitions from
the Device Tree

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-03 15:17:21 +02:00
Flavio Ceolin
bfcef7da8c intel_adsp: ace20_lnl: Add L3 region definition
Add L3_MEM* definitions to adsp_memory.h

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-04-03 15:17:21 +02:00
Jaroslaw Stelter
e2881fe61a intel_adsp: ace20_lnl: add soc definitions for LNL platform.
LNL platform is ACE 2.0 series with changes in shim registers and HW
features. Initial definition replicates MTL as much as possible, however
it will vary after enabling LNL platform.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-03 15:17:21 +02:00
Declan Snyder
8adc90dfbc soc: infineon_cat1: Fix failing boards
Fix some issues with builds related to ROM START offset

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-03-30 18:19:32 -04:00
Anisetti Avinash Krishna
acef57e350 dts: x86: intel: raptor_lake: Added UART instances
Added UART instances and changes to enabled
support for PCIe UART instances.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-03-30 09:43:29 -04:00
Adrian Warecki
ea405eb49e drivers: wdt: Add wdt_intel_adsp driver
Added a new watchdog driver which can handle a multiple wdt_dw instances
and can control the pause signal.

The mlt platform has three designware watchdogs, one for each core.
I decided to create a separate intel watchdog driver for the following
reasons:

1. All three devices share the same interrupt number. Each watchdog reports
an interrupt to the core to which it has been assigned. The same interrupt
number cannot be used by multiple devices in the device tree. So, it would
be assigned to only one device. The other dw watchdog devices would use
this assignment, even though it would not be described for them in the dt.
The interrupt handler function in dw watchdog checks the interrupt flag.
If the interrupt was connected to the first watchdog, and the second or
third watchdog signal an interrupt, the interrupt handler of the first
device would ignore it because it would not have set the interrupt flag.
The watchdog device don't knows anything about the existence of the others
devices.

2. The designware watchdog only supports a hardware pause signal. It cannot
be paused programmatically. On the mtl platform, there is a separate group
of control registers for all per-core watchdogs. There are GPIO-like
registers that allows control of a hardware pause signal for subordinate
watchdogs. This separate block is shared by all three watchdogs.

3. The base addresses of the subordinate watchdogs are read from the
aforementioned control registers. As a result, in the device tree we have
only one base address for the intel watchdog, which points to the pause
control registers and containing the base addresses of the subordinate
devices.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-03-29 09:45:49 -04:00
Manuel Argüelles
83613baf4a soc: fvp_aemv8r_aarch32: enable caches at init
Enable at SoC boot time when enabled through Kconfig. Cache management
API is not used since it could be built without its support enabled.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-03-29 09:03:37 +02:00
Manuel Argüelles
35e1f3564d soc: fvp_aemv8r_aarch32: fix MPU region gap for nocache
When CONFIG_NOCACHE_MEMORY=y, the .nocache section is placed in between
__rodata_region_end and _app_smem_start/__kernel_ram_start. Make sure
this region is covered by the MPU background region so that the static
region for nocache is configured correctly.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-03-29 09:03:37 +02:00
Marc Herbert
67f7b43136 soc: xtensa: remote-fw-service.py: fix usage without sudo
It's best practice to run as little code as possible as root (especially
when listening to network ports). When not itself running as root
already, remote-fw-service.py has always tried to invoke cavstool.py
with "sudo". Unfortunately this looks like it never worked; at least not
on Ubuntu 22 where this commit was tested. Moreover it did not fail
immediately but mysteriously timed out without any useful error message.

- The first, most obvious bug was that "sudo" does not propagate
SIGKILL (and a few other signals), see "man sudo". Compare:

```
$ sudo sleep 30 &
$ kill  $! # sudo propagates the TERM signal and sleep is terminated

$ sudo sleep 30 & sudoPID=$!
$ kill -KILL $sudoPID
$  ps  xfao pid,ppid,pgid,sid,comm | grep -C 5 -e PID -e sleep -e sudo
```

Fix this by invoking proc.terminate() first before proc.kill().
proc.terminate() is more "polite" with cavstool even when not using
sudo.

- Second issue: when signals are sent to sudo, strace shows that its
signal handler invokes `getpgid()` and then ignores signals coming from
its own process group. `man sudo` states: "sudo will not relay signals
that were sent by the command it is running...", which seems related.

`start_new_session=True` option moves sudo to a different PGID which
stops sudo from ignoring signals from its remote-fw-service.py parent.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-03-28 16:42:29 -04:00
Francois Ramu
3b1dd7380b soc: arm: stm32h5 new soc serie
Introduce the new stm32h5 soc serie from STMIcroelectronics.
Note that stm32h503x do not have TrustZone nor SAU

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-28 15:07:51 +02:00
Luca Fancellu
0deeb5ff65 soc: include: fvp_aemv8r: Define device memory as device tree node
A recent change introduced the possibility to declare MPU memory
regions using the device tree and the framework described in
zephyr/linker/devicetree_regions.h.

So remove the device region declared in mpu_regions[] and the used
defines for the addresses, rename REGION_DEVICE_ATTR to REGION_IO_ATTR
in arm_mpu.h to be compatible with the framework and add a device tree
node to fvp_baser_aemv8r.dts to describe the device memory region.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
2023-03-27 13:20:47 +00:00
Sylvio Alves
10a7baba0e soc: esp32s3: add bluetooth support
This only adds proper HEAP and HCI definition to enable
BLE support to ESP32-S3.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-03-27 13:19:38 +00:00
Hein Wessels
68b9be8381 soc: arm: stm32h7: remove manual linker section
Remove the manually created linker section, because it's already
automatically generated for all sram regions in the DTS with the
"zephyr,memory-region" compatibility.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-03-24 17:37:06 +00:00
Pavlo Havrylyuk
e40254a44a soc: infineon_cat1: add HardFp support PSoC 6
Added HardFp support for PSoC 6

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-03-24 11:34:45 +09:00
Jay Vasanth
b0ce525b90 drivers: espi: Microchip MEC172x eSPI VW initialization update
Change device tree VW routing to a form allowing overrides.
Add two new DT optional properties for specifying the reset
source and reset value of each virtual wire. Only virtual
wires that are enabled using the status property are modified.
NOTE: eSPI virtual wires are controlled in groups of 4 by
hardware. The optional reset signal source properties applies
to all four virtual wires in the group. If this field is
changed from the hardware default, it should be changed for
only one virtual wire in the group. If the property exists
in more than one wire in the group it must be set to the
same value.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-23 11:58:26 -04:00
Jay Vasanth
f6619a8688 drivers: espi: Update Microchip MEC172x eSPI virtual wires to use DT
Modify Mircrochip MEC172x eSPI driver to get eSPI virtual wire
hardware routing from device tree.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-23 11:58:26 -04:00
Manimaran A
c42a155988 driver: clock control: Microchip XEC fix missing domain parameter
The clock control driver requires three pieces of information:
PCR register index, bit position, and clock domain. Clock domain
was missing from DT information and MCHP macros.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-03-23 11:55:19 -04:00
Jaska Uimonen
95168e6776 soc: intel_adsp: cavs: start using zephyr power management
Start using zephyr power management in cavs platform in a similar way
that is already done in ace. This commit only addresses the power off/on
sequence. Runtime power management is not implemented.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-03-23 07:57:14 -04:00
Anas Nashif
0f2a352cbd Revert "xtensa: remove ELF section address rewriting"
This reverts commit 7a85983ebc.

This commit was merged prematurely and is causing issues on multiple
platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-22 08:35:52 -04:00
Yonatan Schachter
84665de122 soc: rpi_pico: Added panic handler
Some pico-sdk drivers call a panic function, originally implemented
as part of the Pico's C runtime. This commit adds a Zephyr compatible
implementation of panic, so that those drivers could be compiled with
Zephyr.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-03-22 09:33:52 +01:00
Gerson Fernando Budke
88cedcf5c5 drivers: clock: Add Atmel SAM PMC driver
Add initial version of clock control for Atmel SAM SoC series. This add
support to Power Management which allows control peripherals clock.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Vaishnav Achath
cb953a4255 soc: arm: ti_simplelink: Add support for TI CC13X2X7 SoC series
Product URL: https://www.ti.com/product/CC1352P7
Datasheet : https://www.ti.com/lit/ds/symlink/cc1352p7.pdf

Features:

Powerful 48-MHz Arm® Cortex®-M4F processor
* 704KB flash program memory
* 256KB of ROM for protocols and library functions
* 8KB of cache SRAM
* 144KB of ultra-low leakage SRAM with parity for
high-reliability operation
* Dual-band Sub-1 GHz and 2.4 GHz operation

Updates:
* Remove CC1352P7_LaunchXL due to compliance checks
* Add CC1352P7 updates
* Update hal_ti for CC1352P7 support
* Remove blank line at end of modules/Kconfig.simplelink
* Split struct and typedef for pinctrl_soc_pin/pinctrl_soc_pin_t
* Reference cc13x2_cc26x2/pinctrl_soc.h
* Reference cc13x2_cc26x2/soc.h

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2023-03-21 16:03:43 -04:00
Krzysztof Chruscinski
9a73b9c80d hal_nordic: Change scheme for RTC and TIMER reservation
In general, RTC and TIMER driver implements counter API but there
are exception when those peripherals are used in a custom way
(e.g. for system timer or bluetooth). In that case, system must
prevent using counter based on a reserved instance. Previously,
it was managed by Kconfig options but that cannot be maintained
when switching to devicetree configuration of the counter driver.

A new approach removes Kconfig options and instead adds static
asserts in the files which are using direct peripherals. Those
asserts check if given node is not enabled in the device tree.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Jamie McCrae
417d704b86 soc: arm: nordic: Add GPREGRET register validation
Adds validation for Nordic nRF GPREGRET registers.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 15:02:09 +01:00
Nikolay Agishev
14ec9e9dcb ARC: Add MWDT support into qemu_arc_hs platform
Add Metaware toolchain into qemu_arc_hs* platforms

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2023-03-20 11:43:37 +01:00
Yanqin Wei
a1f55c63b3 soc: fvp_aemv8r: add mpu region from device tree
Some platforms need to define multiple memory regions with
various attribute. This patch adds dts defined regions in the mpu
configuration. The memory attribute can be set in the device tree.

Signed-off-by: Yanqin Wei <Yanqin.Wei@arm.com>
2023-03-20 09:54:35 +01:00
Guennadi Liakhovetski
7a85983ebc xtensa: remove ELF section address rewriting
Now rimage can handle both cached and uncached addresses correctly,
ELF rewriting isn't needed any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-20 09:52:15 +01:00
Marc Desvaux
ba44549ae8 soc: arm: st_stm32: stm32l4: power.c ultra_low_power mode
STM32L4x power management (ultra_low_power) of Standby mode
and shutdown mode ultra_low_power

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-17 14:20:05 +01:00
Marc Desvaux
407216b505 soc: arm: st_stm32: stm32l4: power.c standby shutdownn mode
STM32L4x power management stop mode modification


Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-17 14:20:05 +01:00
Manimaran A
2b66410675 soc: configuration: microchip SOC Kconfig bug fix
Removed the EEPROM and ESPI configuration from file
Kconfig.defconfig.mec172xnsz. Since it overrides the
setting present in the Device Tree file.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-03-16 12:03:57 -05:00
Francois Ramu
6199b9175a soc: arm: stm32h7 soc defines the _STM32H7_SOC_H_ flag
Fix the error of the _STM32H7_SOC_H_ flag name
for the stm32h7 serie

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-16 16:42:47 +01:00
Felipe
bd705e68b0 soc: xtensa: esp32: increase shared memory region
for esp32 and esp32_net because the default 2048
bytes are not sufficient for rpmsg usage.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2023-03-16 16:42:13 +01:00
Tim Lin
94ae33c20a ITE: soc/riscv/ite: policy: Add minimum residency time to enter sleep
Adding this condition will limit the minimum residency time to enter
sleep mode. This will fix tests in test\kernel\sleep\usleep.c causing
longer than expected test times due to going into sleep mode with no
time limit.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-03-16 09:16:34 +01:00
Anisetti Avinash Krishna
e454203290 soc: x86: raptor_lake: Add GPIO support for rpl_crb
Enabled GPIO support for rpl_crb board by adding
platform GPIO specific definitions.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-03-15 22:41:53 +00:00
Artur Rojek
49fa1519df nxp: imx: Derive i.MX8 UARTs from DT bindings
Use Device Tree bindings to configure clock source/frequency for enabled
UARTs only.

Get rid of UART clock ungating from `soc.c`, as that functionality has
been moved to the clock controller.

Signed-off-by: Artur Rojek <artur@conclusive.pl>
2023-03-15 09:13:10 +01:00
Declan Snyder
48214e86b0 soc: rt: Add flash chosen node functionality
Add functionality for changing the code location
based on the flash chosen node for RT devices.

Remove obsolete Kconfigs that used to be used
to set the code location for RT devices.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-03-15 09:12:52 +01:00
Benjamin Björnsson
cc48212875 soc: arm: st_stm32: stm32c0: Add STM32C0 Series support
Add initial support of STM32C0 Series.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-14 17:35:37 +00:00
Tomasz Leman
9854c915ff intel_adsp: cpu init refactor
Reusing existing code during CPU init at power gating exit.

Additional changes:
- replacing magic value for memctl and atomctl with more readable
  definitions,
- using dedicated macros in place of asm inlines.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-03-14 10:48:38 +01:00
Siyuan Cheng
f9d155b7d5 dts: boards :emsdp: add SPI support
There is a spi-flash fl256s on emsdp board, which can be
contolled by DesignWare SPI driver. Now add DW SPI and
SPI-FLASH support for emsdp board.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-03-10 11:39:24 +01:00
Miika Karanki
1f49b5b56c soc: stm32u5: Add simple POWER_SUPPLY_CHOICE configuration
Allow selecting between direct SMPS and LDO on the startup. This
enables selecting to use SMPS regulators which can save bit of power.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2023-03-07 15:49:57 +01:00
Chen Xingyu
7ae7847643 soc: arm: Add support for STM32H730xxQ
The STM32H730 series has a variant built with SMPS. It uses
`stm32h730xxq.h` header file instead of `stm32h730xx.h`, which has the
SMPS macro defined.

This commit adds the `SOC_STM32H730XXQ` configuration option to allow
the build system include the proper header file. With this change,
boards can enable `CONFIG_POWER_SUPPLY_DIRECT_SMPS` to set up the power
supply for the CPU.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2023-03-07 15:49:47 +01:00
Guillaume Gautier
b19f47d2b1 soc: arm: st_stm32: stm32f0: add kconfig for stm32f042x6
Add Kconfig for STMF042x6 to support the Nucleo F042K6.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-03-07 15:49:30 +01:00
Daniel DeGrasse
676278c0ec soc: arm: nxp_imx: r5xx: add clock initialization for MIPI and LCDIF
Add clock initialization for MIPI and LCIDF to NXP RT5xx SOC.
Note that clock divider properties are used by both initialization
routines, as the required clock divider will vary depending on
attached display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +01:00
Andriy Gelman
33d1792e3d drivers: spi: Add xmc4xxx driver
Adds spi driver for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-03-03 17:20:17 +01:00
Andrzej Głąbek
ca9ac5a3e2 soc: nrf53: Restore accidentally removed suppress_message flag check
This is a follow-up to commit 7195db01f4.

Restore the check that was accidentaliy removed in the above commit,
so that the message is again logged only once per detection of the
anomaly 160 conditions.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-03-03 17:19:10 +01:00
Marc Herbert
a8c0123d3c intel_adsp: cmake: add_custom_command(.mod) to fix incremental build
Now building twice back to back does not build anything the second time
when CONFIG_CLEANUP_INTERMEDIATE_FILES (which obviously breaks
incremental builds) is also turned off.

Fixes commit 2906d1aa51 ("soc/intel_adsp: Build bootloader with Zephyr")

Properly implementing custom commands requires BOTH
`add_custom_command()` and an `add_custom_target()` wrapper with some
careful DEPENDS wizardry between them.

https://cmake.org/cmake/help/latest/command/add_custom_target.html
> Use the add_custom_command() command to generate a file with
> dependencies.

The documentation of add_custom_command() also similarly refers to
add_custom_target()

When this is not done properly, the build is cursed in various, very
time-consuming ways which are not officially documented but here
instead:
https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-03-02 15:34:55 -05:00
Grant Ramsay
76a4b44227 soc: arm64: ti_sitara: Add pinctrl support for TI AM6X A53 SoC
TI Sitara processors use the K3 architecture

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-03-02 13:50:06 +01:00
Ning Shang
bd240d1fe5 ESP32-S2: fix - use correct storage label
This is a bugfix. It uses the right storage label `slot0_partition` for
esp32s2. Note that this is already the case for esp32 and esp32s3.

This should address
https://github.com/zephyrproject-rtos/zephyr/issues/55286.

Signed-off-by: Ning Shang <syncom.dev@gmail.com>
2023-03-02 09:59:10 +01:00
Andrzej Głąbek
7195db01f4 soc: nrf53: Change logging level of anomaly 160 message to DEBUG
This is a follow-up to commit fe3b97a87f.

This message should not be a warning, as it does not actually indicate
that something potentially bad happened. On the contrary, it informs
that conditions in which the anomaly 160 could occur were detected and
the anomaly was prevented from occurring. There is no need for this
message to appear in the default configuration (INFO level). In fact,
the message would undesirably flood the console in some cases (like
the kernel/mem_protect/stack_random test) and sometimes it would also
require enlarging the stack of the idle thread (the function is called
underneath k_cpu_idle()). Therefore, the logging level of this message
is changed to DEBUG.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-03-02 09:03:10 +01:00
Ruibin Chang
f77f02c032 ITE drivers/sensor/vcmp/it8xxx2: add work queue for voltage comparator
Voltage comparator driver submits notifications into system work queue,
this change will make driver to use dedicated work queue, and priority
of dedicated work queue are configurable as well.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-03-01 09:12:49 -06:00
Hein Wessels
e01270793e drivers: dma: stm32: bdma support for H7
Implement STM32H7 BDMA driver.

Co-authored-by: Jeroen van Dooren <jeroen.van.dooren@nobleo.nl>
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-03-01 15:58:27 +01:00
Nazar Palamar
dcf52fd566 drivers: pinctrl: Add Infineon CAT1 Pin controller driver
Added initial version of Infineon CAT1 Pin controller driver.
Added initial version of binding file for Infineon CAT1 Pinctrl driver.
Added initial version of dt header for Infineon CAT1 pinctrl driver.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-01 11:44:57 +01:00
Nazar Palamar
750475f3b8 soc: arm: Introduce Infineon CAT1/PSoC 6 SOC integration
Add initial version of Infineon CAT1/PSoC 6 SOC integration.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-01 11:44:57 +01:00
Gerard Marull-Paretas
27b73a116f soc: arm: nordic_nrf: replace NRF_DT_CHECK_PIN_ASSIGNMENTS
Since PINCTRL and pinctrl-0 is now required, there's no point in doing
extra validation at driver level. Modify the macro to just check that
sleep state is present when needed, since it was the only remaining
assertion that was not covered. Renamed the macro to make it more clear
what it does: NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-28 08:42:05 -08:00
Sylvio Alves
f18d811c6c soc: esp32c3: fix soc architecture definition
Update ESP32-C3 architecture as IMC instead IMA.

Although not documented, ESP32-S3 supports CSR instructions.
It also needs to be enabled, otherwise build will fail.

Fixes #53555

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-28 12:47:56 +01:00
Jonas Otto
60b8773491 arch: riscv enable flash config
For RISCV arch, enable FLASH_SIZE and FLASH_BASE_ADDRESS config.
To avoid duplicated work, remove flash config from RISCV soc.

Signed-off-by: Jonas Otto <jonas@jonasotto.com>
2023-02-28 10:29:03 +01:00
Fabio Baltieri
1751c8f0f5 soc: mec172x: drop non existing option PINMUX_XEC
Drop the non existing option PINMUX_XEC, this has been removed in

d76f4f2c8a drivers: pinmux: mchp_xec: drop driver

And is currently causing build errors.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-02-27 20:52:51 +01:00
Sylvio Alves
bbd40b85c0 soc: esp32s3: add base source content
This brings esp32s3 linker, DTS and all
necessary files to allow the soc support.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-27 19:41:33 +01:00
Jeff Daly
e32c362038 Microchip: create DTS and Kconfig definition of MEC172x LJ package.
Define extra pins and IP blocks in DTS and Kconfig for the LJ package of
the MEC172x SoC.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2023-02-27 19:41:11 +01:00
Francois Ramu
25279df662 soc: arm: stm32l4 serie has a stm32l4p5 device
Add the stm32l4p5 device to the list of stm32l4 plus

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-27 17:30:12 +01:00
Francois Ramu
74d10f3f27 soc: arm: stm32u5 config for the BackUp SRAM
Add the stm32U5 serie for the support of the STM32_BACKUP_SRAM
The PWR peripheral is enabled by the soc/arm/st_stm32/stm32u5/soc.c

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-27 11:35:07 +01:00
Marc Herbert
eead89e7f2 soc: intel_adsp: cavstool.py: simplify asyncio.run() call
Fixes the following warning:

cavstool.py:706: DeprecationWarning: There is no current event loop
  asyncio.get_event_loop().run_until_complete(main())

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-02-26 09:18:24 -05:00
Grant Ramsay
f92dd6d357 drivers: serial: Name the NS16550 variant Kconfig choice
Naming this choice allows setting a default value in defconfig.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-02-24 18:11:56 +01:00
Grant Ramsay
84f92c7bc3 soc: arm64: Add TI AM6234 SoC A53 support
Add minimal SoC support for the TI AM6X series Cortex-A53 Core.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-02-24 18:11:56 +01:00
Andrzej Głąbek
4e197b7c5e soc: nrf53: Warn if workaround for anomaly 160 cannot be applied
This is a follow-up to commit fe3b97a87f.

Add a cmake warning issued when the workaround for the nRF5340 anomaly
160 cannot be applied because the application is configured with no
system clock.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-02-24 09:22:57 +01:00
Gerard Marull-Paretas
d76f4f2c8a drivers: pinmux: mchp_xec: drop driver
Drop Microchip XEC driver in favor of pinctrl.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-23 16:56:04 -05:00
Gerard Marull-Paretas
9ca624eb13 drivers: pinmux: mcux: drop driver
Drop the MCUX driver in favor of Kinetis pinctrl driver.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-23 16:56:04 -05:00
Gerard Marull-Paretas
099012a59f drivers: pinmux: lpc11u6x: drop driver
Drop LPC11U6X pinmux driver in favor of pinctrl.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-23 16:56:04 -05:00
Gerard Marull-Paretas
33372b9e48 drivers: pinmux: mcux_lpc: drop driver
Drop MCUX LPC pinmux driver in favor of pinctrl.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-23 16:56:04 -05:00
Gerard Marull-Paretas
d925c660ed drivers: pinmux: stm32: drop driver
Drop STM32 pinmux driver in favor of pinctrl. Some definitions located
in pinmux headers were used by the pinctrl driver, so they have been
moved there.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-02-23 16:56:04 -05:00
Daniel DeGrasse
37a5158dc4 soc: arm: nxp_imx: rt5xx: cleanup core if booting from bootloader
Cleanup core if booting from bootloader using RT5xx. This is required
because the call to SystemInit will push data to the stack, and the
bootloader may have configured stack limits or MPU settings. Either
would cause the core to fault if these settings are not first
cleaned up.

Perform this cleanup if the boot header is not present, as in this case
the application was likely kicked off via a bootloader.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-23 10:45:02 +01:00
Tim Lin
00e6c19ab5 ITE: drivers/adc: Add config of ADC reference voltage full-scale 3300mV
This option can enable ADC internal reference voltage as
full-scale 3300mV.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-02-23 08:59:54 +01:00
Mikhail Siomin
8310f83726 soc: arm: nxp_imx: rt: Allow to include boot header.
Allow to include boot header for code linked into
not only FlexSPI controlled memory.
Fixes #53867

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2023-02-23 08:57:30 +01:00
Daniel Leung
53316d5c8e toolchain: rename xcc-clang to xt-clang
This reflects the actual compiler executable name of the Xtensa
LLVM/Clang compiler.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-02-22 08:35:46 -05:00
Andrzej Głąbek
fe3b97a87f soc: nrf53: Add workaround for anomaly 160
Implement a workaround for the nRF53 anomaly 160. This consist of
a set of writes to certain hardware registers that is done at boot
and a piece of code that is executed when the CPU is made idle and
that prevents the CPU from switching between active and sleep modes
more than five times within a 200 us period.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-02-22 08:50:18 +01:00
Andriy Gelman
8a97da056b drivers: dma: Add infineon xmc4xxx dma support
Adds dma drivers for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-02-21 21:15:53 +01:00
Siyuan Cheng
b475e1fcbf zdsp: add ARC DSPLIB backend for zdsp
Introduce ARC DSPLIB backend zdsp library for ARC target.
Add agu and restrict attributes to map with ARC DSPLIB

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-02-21 15:06:06 +01:00
Khor Swee Aun
5b17a6da84 soc: riscv: riscv-privilege: INTEL NIOSV support
Add support for INTEL FPGA NIOSV RISCV based Processors.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-02-20 09:29:13 -05:00
Daniel DeGrasse
24b66b30eb soc: arm: nxp_imx: use CMSIS SystemInit for all NXP iMX.RT SOCs
Use CMSIS SystemInit for all NXP iMX.RT SOCs, to simplify initialization
flow, and remove redundant code where possible.

Introduce Kconfigs to disable Cache at boot, since SystemInit will enable
code cache on these platforms, which may be undesirable behavior.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-20 09:47:28 +01:00
Daniel DeGrasse
3b59b495b7 soc: arm: nxp_lpc: convert NXP LPC SOCs to use CMSIS SystemInit
Convert NXP LPC SOCs to use CMSIS SystemInit, and remove redundant code
where it exists. This will enable initialization flows to be more
standardized across all platforms.

Since LPC54xxx and LPC55xxx series enables SRAM banks in SystemInit,
provide Kconfigs to bypass this setting and keep additional SRAM
banks unclocked.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-20 09:47:28 +01:00
Daniel DeGrasse
1e83a34164 soc: arm: nxp_kinetis: move NXP Kinetis SOCs to use SystemInit
Add call to SystemInit for all NXP Kinetis SOCs and remove any
redundant code from initialization flow. This allows watchdog
initialization to be removed from all Kinetis SOCs as it is handled
by SystemInit.

Since Kinetis watchdog is enabled by default at boot, allow watchdog
setup to by bypassed with CONFIG_WDOG_ENABLE_AT_BOOT. This
setting requires the user to provide a watchdog configuration hook
using z_arm_watchdog_init, but will allow the watchdog to remain
enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-20 09:47:28 +01:00
Hake Huang
c775387e16 usb: add usb device support for lpc55s28 platform
update the endpint in dts to 6 to alignd with RM
enable usb-device for LPC55S28
all USB supported tests/samples PASS

samples:
scripts/twister -p lpcxpresso55s28 \
--device-testing --hardware-map ~/map.yml \
-T samples/subsys/usb/
...
INFO    - 7 of 25 test configurations passed (100.00%),\
0 failed, 18 skipped with 0 warnings in 73.49 seconds
...

tests
scripts/twister -p lpcxpresso55s28 \
--device-testing --hardware-map ~/map.yml \
-T tests/subsys/usb/
...
INFO    - 3 of 4 test configurations passed (100.00%),\
0 failed, 1 skipped with 0 warnings in 36.39 seconds
...

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-02-19 20:57:40 -05:00
Jay Vasanth
b1cf745828 pm: MEC172x: enable device power mgmt in soc layer
Allow the the SoC to enter deep sleep when CONFIG_PM_DEVICE
is enabled. This will allow to selectively add low power
support for certain drivers like UART and ADC.
The previous checking of ifndef CONFIG_PM_DEVICE was
incorrect. The MEC172x requires the soc power file to perform
some operations when CONFIG_PM_DEVICE is enabled to allow
the hardware to shut down the PLL.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-02-19 20:39:40 -05:00
Adrian Warecki
ddad6226c0 adsp: boot: power: Separate watchdog state from core power
The watchdog is controlled by ll-scheduler and should not be resumed when
a core is bringing up. Watchdog pause control code was removed.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-19 20:36:31 -05:00
Adrian Warecki
da4f20901f adsp: ipc: Emergency ipc message send
Added intel_adsp_ipc_send_message_emergency function that allows to send an
ipc message notifying about emergency event, such as watchdog timeout.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-19 20:36:31 -05:00
Adrian Warecki
625f226842 adsp: ace: Non-maskable interrupt handling
The non-maskable interrupt have no corresponding bit in INTERRUPT and
INTENABLE registers so its occurrence cannot be confirmed. Removed the code
that checked if the interrupt flag is set.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-19 20:36:31 -05:00
Aastha Grover
8f5bcb2e76 intel_adsp: ace: fix linker script for xcc-clang compiler
rodata section for xtensa overrides the .ctors section
containing the constructor info and the _ZEPHYR_CTOR_LIST_.
Removes the ctor related linker script lines from the rodata
section of the ace linker script to ensure that the .ctors is
properly generated and placed when using the xcc-clang compiler.

Fixes #54730

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2023-02-10 18:05:14 -06:00
Björn Stenberg
dcbc56cfe7 ethernet: stm32h7: Move DMA buffers from sram3 to sram2
PR #30403 implemented nocache regions for ethernet DMA buffers in sram3 to
fix issue #29915. Unfortunately, some STM32H7 variants do not have any
sram3 so they still suffer from #29915.

All H7 variants have sram2 though, so use that for targets without sram3.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2023-02-09 22:14:07 +09:00
Guillaume Gautier
645d91b028 soc: arm: st_stm32: common: Increase the value of HW semaphore retry
When running the blinky example on STM32H747, with the BOOT_CM4 bit set
to 0, the M4 core goes into panic.
Increasing the value of the hardware semaphore retry prevents this.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-02-03 02:22:22 +09:00
Francois Ramu
0262d33478 soc: arm: stm32f3 enable Debug Module during SLEEP mode
This patch allows successive reflashing operation on stm32f3
boards by Enabling the Debug Module during SLEEP mode.
This will especially makes reflahing and debugging possible
with pyocd runner on west commands.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-02 10:35:17 +00:00
Tomasz Leman
60a20471b5 intel_adsp: ace: enable interrupts for secondary core
Temporary re-enabling interrupts before going to waiti. Right now
secondary cores don't have proper context restore flow and after leaving
D3 state core will return here and stuck. This is temporary workaround.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-02-02 03:29:20 +09:00
Tomasz Leman
6045eed2f3 intel_adsp: ace: enable core power gating
Allowing the power domain of non-active cores to enter power gating
state.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-02-02 03:29:20 +09:00
Tomasz Leman
e1dbc2efef intel_adsp: ace: add core power off step
Adding additional core power-off before core is properly power-up after
power domains is wake up from power gaiting state.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-02-02 03:29:20 +09:00
Tomasz Leman
a99b073392 intel_adsp: ace: d3 exit update
This patch is moving common power configuration code outside of the
section only for the primary core. This should be enabled for all cores
and it was put there probably by mistake.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-02-02 03:29:20 +09:00
Tom Burdick
156c7cd217 intel_adsp: bbzero/bmemcpy with picolibc fix
When building with picolibc and gcc, the loops to do zeroing/copying
get replaced by gcc with calls to memset/memcpy. This fails this early in
the boot process and results in an illegal instruction exception.

Marking the variables being manipulated in the calls as volatile prevents
the compiler from optimizing the loops (replacing them with memset/memcpy).

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-02-02 03:09:35 +09:00
Almin Iriskic
0dcd6925d3 soc: stm32: fix rtt on stm32u5 series by enabling GPDMA1 clock
On some STM32 MCUs SEGGER RTT is only working with realtime updates
when DMA is clocked. The STM32U5 series uses a new DMA controller
module called GPDMA.

Refs: #34324
Fixes: #54316

Signed-off-by: Almin Iriskic <almin.iriskic@student.tugraz.at>
2023-02-02 02:43:21 +09:00
Shawn Nematbakhsh
f0e790c66b soc: riscv: riscv-privilege: Add support for OpenTitan SOC
Add support for OpenTitan, an open source silicon root of trust.

Signed-off-by: Shawn Nematbakhsh <shawn@rivosinc.com>
2023-01-27 19:25:26 +09:00
Stancu Florin
9f6d8c1c23 soc: cc13xx_cc26xx: add Kconfig option for custom radio hwattrs
Useful for implementing board-specific antenna switching using the RF
event callback.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2023-01-27 17:44:38 +09:00
Stancu Florin
65039bf287 soc: cc13xx_cc26xx: add P chip variants to Kconfig
Add SOC_CC1352P and SOC_CC2652P chip types to SoC's Kconfig
(with integrated high power amplifiers).

Also requires modifications to HAL TI's family conditions.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2023-01-27 17:44:38 +09:00
Stancu Florin
200a0db01a soc: cc13xx_cc26xx: config option to enable boost mode
New KConfig option to set `CCFG_FORCE_VDDR_HH` inside CC13xx/CC26xx
customer configuration file, making it it possible to use 14dBm
TX power (instead of the default 13 dBm limitation).

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2023-01-27 17:44:38 +09:00
Jamie McCrae
ec7044437e treewide: Disable automatic argparse argument shortening
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-26 20:12:36 +09:00
Hein Wessels
3293d8057d soc: posix: inf_clock: add C++ support to NATIVE_TASK
Explicitly define function pointer as (void*)() and not (void*).
In C this cast is done implicitly, but C++ does not allow it.

Also, the const is moved to the correct location. Now it's a constant
pointer to a function(void) that returns void, instead of a pointer
to a function(void) returning (const void).

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-01-26 09:30:36 +01:00
Alberto Escolar Piedras
8a5273525e nrf52_bsim: Convert from a nRF52832 to a nRF52833
The nRF HW models have been updated to correspond to a 52833 instead
of a 52832. Let's follow them.

The motivation for the change is to enable proper BIS encryption support
(for BT LE Audio ISO).

Changes:

* Point in manifest to latest HW models

* SOC_COMPATIBLE_NRF52832 has been removed, and SOC_COMPATIBLE_NRF52833
added in its place (with no uses at this point)

* Where SOC_COMPATIBLE_NRF52832 was used to set encryption like for a 52832
(to avoid using the MAXPACKETLENGHT), we set the condition to just
SOC_NRF52832.
Note: The MAXPACKETLENGHT register exists in the new simulated nrf52833,
thought it does nothing.

* In the BLE ctrl LLL radio HAL, all macros are renamed accordingly
(timings are NOT changed).

* Board dts definition now refers to the 52833 soc definition. New 52833
features set as not supported by now.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-01-26 09:29:18 +01:00
Jeppe Odgaard
9fb47e43a8 dts: arm: add xbar and qdec nodes and update soc
Add three xbar nodes and four qdec nodes in the rt10xx devicetree include.
Add xbara to rt1052 in Kconfig.soc

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Manuel Arguelles
4a3c630f7b boards: s32z270dc2_r52: enable Ethernet support
Introduce DT nodes for NETC complex and enable its usage for
s32z270dc2_r52 boards. Using PSI0 as default networking interface and
Switch Port0 as it's the only port available on this board.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-01-24 14:37:20 +01:00
Tom Burdick
a684714d5c soc: intel_adsp: Correct HDA parameter docstrings
The parameter doc string for hda was incorrect as the parameters
had been updated to take the IP base address, block size, and stream id
instead. Updates all doc string comments to account for the change.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-23 11:51:21 -08:00
Tom Burdick
b14296af38 dma: HDA ignore repeated start/stop requests
The DMA API contract specifies that start/stop may be called multiple
times. Prior to adding power management this was perfectly fine as it was.
In adding power management, there are additional side effects that can
cause issues. Instead check the state of the channel prior to start/stop
and do nothing if already in the desired state.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-23 11:51:21 -08:00
Guennadi Liakhovetski
8ff8834695 xtensa: sparse: fix address space mismatch
Fix remaining sparse address space mismatch warnings.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-20 15:01:12 -05:00
Evgeniy Paltsev
f796fd34d8 boards: ARC: nsim: align compiler options for GCC & MWDT
Align MWDT compiler options to GCC ones for ARCv2 hsim hs3x boards.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-01-20 12:23:03 +01:00
Adrian Warecki
8794de2934 intel_adsp: soc: ace: Add communication widget driver
Intel DSP Communication Widget is a device for generic sideband
message transmit/receive between IPs in a SOC.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-01-18 10:47:21 +01:00
Dino Li
a41a4e5e24 espi: it8xxx2: enable espi transaction interrupt
The interrupt is used to wake up EC from low power mode.
So EC does not defer eSPI bus while transaction is accepted.
Fixes EC host commands slow issue.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2023-01-18 09:55:44 +01:00
Piotr Makaruk
00b5114344 dma: hda: enable xrun handling
Enable link under/overruns handling and reporting such events in dma
status

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-17 18:50:15 -05:00
Filip Kokosinski
4b198e2009 soc: arm :efr32bg22: depend on DT_HAS_*_ENABLED for SPI selection
This commit modifies the defconfig for efr32bg22 SoC so that Gecko SPI
selection depends on the DT_HAS_*_ENABLED define.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-01-17 15:37:27 -06:00
Daniel DeGrasse
47271ce8be treewide: update usage of zephyr_code_relocate
Update usage of zephyr_code_relocate to follow new API. The old method
of relocating a file was the following directive:

zephyr_code_relocate(file location)

The new API for zephyr_code_relocate uses the following directive:

zephyr_code_relocate(FILES file LOCATION location)

update in tree usage to follow this model. Also, update the NXP HAL SHA,
as NXP's HAL uses this macro as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-17 18:08:37 +01:00
Ruibin Chang
344c9c67f9 ITE drivers/pinctrl/it8xxx2: extend pinctrl driver for kscan pins
Extend pinctrl driver for kscan pins.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-01-14 09:22:39 +01:00
Declan Snyder
19bd9a3618 boards: arm: Renamed NXP usdhc in imxrt5xx
The names of these peripherals in the device tree
did not match the Reference Manual for the RT500.

Also fixed a typo in a comment referring to USDHC which should have been
about USB.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-01-14 09:22:22 +01:00
Declan Snyder
36b6dec832 boards: arm: mimxrt595_evk: Plumbs RT595 USDHC
- Adds the pin controls and ushdc settings in device tree
- Attaches clock to USDHC in soc.c
- Adds binding for mmc

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-01-14 09:22:22 +01:00
Pawel Czarnecki
750e6c946e soc: arm: efr32bg22: include soc_gpio.h
Include header required in Gecko I2C driver

Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
2023-01-13 10:23:55 -06:00
Pawel Czarnecki
371e893314 soc: arm: efr32bg22: defconfig: remove I2C_GECKO default n
Don't disable I2C by default

Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
2023-01-13 10:23:55 -06:00
YuLong Yao
2086acfa0e soc: gd32a50x: introduce gd32a50x soc series
soc: gd32a50x: introduce gd32a50x soc series

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
Mateusz Sierszulski
b36a31fd7a drivers: entropy: Add Gecko trng driver for EFR32BG22
This commit enables entropy driver on EFR32BG22 SoC.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-01-12 15:22:11 +00:00
Andrzej Głąbek
c50108113d soc: nrf53: Fix extraction of the XOSC32MTRIM.SLOPE bitfield
The value in this bitfield is provided in the two's complement form,
so it requires special handling. Previously, it was read as just an
unsigned value and this could result in a wrongly computed CAPVALUE.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-12 13:30:58 +01:00
Tomasz Leman
d6048afeea Revert "soc: intel_adsp/ace: fix CPU halting"
This reverts commit 81908cd367.

This commit introduced a regression on SOF. Value of soc_cpus_active is
set by the core X it self in functions pm_state_set and
pm_state_exit_post_ops. soc_adsp_halt_cpu can by called only by the
primary core.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-01-11 07:06:10 -05:00
Mulin Chao
b1214ead19 driver: i2c: npcx: simplify smb bank registers with union
For NPCX SMB/I2C SMB modules in FIFO mode, the registers include:

* Common registers, offset 0x00-0x0f, accessible regardless of the value
  of BNK_SEL
* Bank 0 registers, offset 0x10-0x1e, accessible if BNK_SEL is set to 0
* Bank 1 registers, offset 0x10-0x1e, accessible if BNK_SEL
is set to 1

In the current driver, it uses two structures, `smb_reg` and
`smb_fifo_reg`, to access `Common + Bank 0` and `Common + Bank 1`
registers. But It might be easy to misunderstand that they are two
different modules.

This CL tries to simplify this by the following steps:

1. Use `union` to combine `Bank 0/1` registers in the same structure.
2. Remove `smb_fifo_reg`. We needn't use two structures to present
   SMB registers.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-01-11 09:40:36 +01:00
Michał Barnaś
3ae105e76b ec_host_cmd: add NPCX SHI peripheral for the host commands
This commit adds the support for host commands being transported
by the Serial Host Interface on the NPCX SoC.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-01-11 09:38:45 +01:00
Adrian Warecki
21f278c04b adsp: boot: power: Fixed used register name
The code used the name DFDSPBRCP referring to the DSP Boot / Recovery
Capability Pointer register from DSP Subsystem Capability / Status
Registers range. The address used, however, pointed to DSP Core Shim
(DSPCS) registers block. Changed define names to not be misleading.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-01-09 17:05:58 -05:00
Mahesh Mahadevan
0eb3c15715 soc: nxp: Add Power Management support for RT5xx
1. Support Sleep, Deep Sleep and Deep Power down modes
2. Enable the MEMC FlexSPI driver when using device power
   management so we can reconfigure the FlexSPI pins to
   save power. The MEMC FlexSPI driver is enabled when we
   enable the Flash subsystem, however we would like to
   reconfigure the FlexSPI pins even when the Flash driver
   is disabled, hence MEMC is selected when PM_DEVICE
   is turned on.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-01-04 11:03:42 -06:00
Manuel Arguelles
a7743a49aa drivers: pinctrl: rename S32 to NXP S32
Following updates previously done for other drivers, rename all
occurrences of S32 to NXP S32 to avoid ambiguity.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-01-04 16:51:38 +01:00
Sylvio Alves
cff71c8d2b driver: systimer: increase esp32c3 tick resolution
hal_espressif systimer HAL calls are based on 1MHz reference.
This changes systimer driver to allow max clocking reference of 16MHz
and increases soc tick resolution by reducing min delay interval.

This also sets all ESP32-C3 socs to 16MHz hardware cycles reference.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-01-04 14:24:25 +01:00
Daniel DeGrasse
1af8f2700b soc: arm: add support for FlexSPI1 clock configuration for NXP RT5xx
Add support for configuring FlexSPI1 clock speed to RT5xx soc
initialization, so that memory present on FlexSPI1 can be accessed.
Note that FlexSPI1 is referred to as FlexSPI2 in the dts files for this
SOC.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-04 10:35:25 +01:00
Kai Vehmanen
e753af063f intel_adsp: ace: power: fix build error with asserts enabled
If defined(CONFIG_ASSERT) and !defined(CONFIG_ADSP_IMR_CONTEXT_SAVE),
build will fail as symbol "global_imr_ram_storage" is not defined.

Link: https://github.com/thesofproject/sof/issues/6896
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-03 18:49:29 -05:00
Sylvio Alves
42b33382f7 driver: clock: esp32: retrieve HW clock from DTS
ESP32 and ESP32-S2 HW clock are tied to DTS clock configuration.
This changes updates the default configuration to retrieve
this information from DTS.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-01-03 17:12:06 -05:00
Sylvio Alves
7f55b2162c soc: esp32: add CCOUNT xtensa rate default value
Xtensa's ESP32 misses this base CCOUNT value, which causes wrong
arch_timing_freq_get() value reference.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-01-03 17:12:06 -05:00
Cyril Fougeray
56ee74615c soc: arm: stm32g4: PM support
Add power management support for STM32G4 series.
Supported modes include STOP0 and STOP1.

Signed-off-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
2023-01-03 11:00:58 +01:00
Jay Vasanth
3583421134 soc: microchip_mec: Replace test clock out Kconfig with DT entry
Remove the test clock out Kconfig from SoC level. Instead use
device tree PINCTRL entry with updated clock control driver.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
Jay Vasanth
c7e0d727d7 drivers: clock: Microchip XEC clock driver add MEC15xx support
Add support for Microchip MEC15xx to the XEC clock control driver.
MEC15xx 32KHz clock support uses the same 32KHz source for both the
PLL and peripherals. MEC152x does not include the PCR clock monitor
present in MEC172x.  MEC15xx and MEC172x support internal silicon
oscillator, parallel and single ended crystal inputs, and the
32KHZ_PIN input. MEC152x supports fall back to internal silicon
OSC when VTR and 32KHZ_PIN are turned off. Therefore in MEC152x the
internal silicon oscillator can only be disabled if using an external
32KHz which is always on. For MEC152x the driver will only use the
PLL source clock device tree value.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
Jay Vasanth
ed52729a4b drivers: clock: Microchip MEC172x clock control driver support all modes
Fix Microchip XEC clock control driver single-ended XTAL2 pin
initialization. Add support for external 32KHZ_IN pin as a
clock source including PINTRL to switch the GPIO to 32KHZ_IN
function. Add device tree option to disable internal silicon
oscillator if it is not required by the configuration. Add
device tree tuning options based on crystal and board layout.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
HaiLong Yang
e6b600e0c3 soc: arm: gigadevice: add gd32l23x series
The Cortex-M23 on GD32L23x implement the System Timer, but not
contain FPU.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-12-28 10:37:52 +01:00
Reto Schneider
cb7791baf1 soc: nrf52: Kconfig option for nRF52840 anomaly 198
Enabling by default (if SPI3 used) because it affects all revisions
since "Engineering B", including the most recent one as of today
(revision 3).

Size changes when enabled:
 - -Og: flash +160 bytes (+0.02%), RAM +8 bytes (+0.01%)
 - -Os: flash +144 bytes (+0.02%), no change to RAM usage

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-12-27 15:32:22 +01:00
Lucas Tamborrino
9e289c1b20 arch: xtensa: save FPU register in context switching
Save FP user register and FP register file during context switch.

This change enables shared FP registers mode using CONFIG_FPU_SHARING.

Since there is no lazy stacking, the FPU registers will be saved regardless
of whether floating point calculations are performed in the threads when
CONFIG_FPU_SHARING is enabled. This require 72 additional bytes in the
stack memory.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-12-27 13:23:17 +01:00
Andriy Gelman
ed105761fa soc: arm: infineon_xmc: 4xxx: Disable unalign trap on reset
The unaligned trap bit is set by default, contrary to the xmc
reference manual. This PR unsets the bit in the initialization.
It can still be set later via the CONFIG_TRAP_UNALIGNED_ACCESS
option.

Note that the same approach is used in xmc4500 reference software
init code (see SystemCoreSetup() in infineon hal module).

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-23 14:57:17 +01:00
Emilio Benavente
2c58952416 soc: arm: nxp_imx: replaced CODE_LOCATION and added FLEXSPI_XIP to soc
Cleaning up the instances of CODE_LOCATION used in the soc
clock_init and replaced them with the Kconfig
FLASH_MCUX_FLEXSPI_XIP due to the correlation with
the flexspi clocks and the XIP feature of Flexspi.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-12-22 11:07:08 +01:00
Emilio Benavente
39762716d4 boards: arm: rtxxx: moving the instances FLASH_MCUX_FLEXSPI_XIP
This Kconfig is moved to the soc level since it determines
the flexspi clock initialization for XIP.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-12-22 11:07:08 +01:00
Lukasz Mazur
f7ab9a8c52 pinctrl_stm32: GPIO output info in Z_PINCTRL_STM32_PINCFG_INIT
Added information about pin output direction into
Z_PINCTRL_STM32_PINCFG_INIT if output_low or output_high is provided.
GPIO output flag is set in configuration struct and this will end up
being loaded into MODE register. Because of that it is no longer
required for pinctrl_configure_pins() to set MODE register value for
GPIO input/output.
Fixes #53141.

Signed-off-by: Lukasz Mazur <lukasz.mazur@hidglobal.com>
2022-12-22 11:00:45 +01:00
Erwan Gouriou
66d4c64966 all: Fix "#if IS_ENABLED(CONFIG_FOO)" occurrences
Clean up occurrences of "#if IS_ENABLED(CONFIG_FOO)" an replace
with classical "#if defined(CONFIG_FOO)".

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-21 10:09:23 +01:00
Filip Kokosinski
509e101a91 soc: silabs_exx32: Add support for SiLabs EFR32BG22 SoC
This commit adds support for Silicon Labs EFR32BG22 SoC.

Co-authored-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-12-20 22:50:19 +01:00
Pawel Czarnecki
e8d3673c13 soc: arm: silabs: remove soc_gpio_configure wrapper
It would be better to use GPIO_PinModeSet() functions directly
in the drivers.

Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
2022-12-20 22:50:19 +01:00
Andriy Gelman
2d3493bff0 drivers: adc: Add ADC xmc4xxx drivers
The ADC module has four conversion groups, each one is set up as a zephyr
device. The start-up calibration is initiated globally for all groups
and it is run in each device init function. The ADC module supports post
calibration per group. Post calibration is run automatically after each
group acquires the samples.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-20 14:17:23 +01:00
Andriy Gelman
f197fe0684 soc: arm: infineon_xmc: Set include headers via xmc_device.h
xmc_device.h sets which XMC4xxx.h file to include and also sets
other defines such as GLOCK_GATING_SUPPORTED.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-20 14:17:23 +01:00
Jakub Dabek
72f626046d memory manager: add region calculation for virtual memory
Add region calculations and implementation of
sys_mm_drv_query_memory_regions to pass calculated regions down
the line.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2022-12-20 07:03:55 -05:00
Jakub Dabek
d76419973a devicetree: add virtual memory entry for intel platform
Add virtual memory entry in dt to use as virtual space
regions for aplication.
Add virtual memory definition in adsp_memory.h

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2022-12-20 07:03:55 -05:00
Jiafei Pan
921b32663b board: arm64: add pinctrl support for imx93 evk board
1. Added imx93-pinctrl dts binding yaml
2. Added imx93 pinctrl_soc.h header file
3. Updated imx93 dts to enable pinctrl for lpuart.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-12-20 09:22:40 +01:00
Jiafei Pan
08978d146c soc: arm64: add i.MX93 MPU support
Add i.MX93 Cortex-A Core support on Zephyr.

i.MX 93 applications processors deliver efficient machine learning
(ML) acceleration and advanced security with integrated EdgeLock
secure enclave to support energy-efficient edge computing.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-12-20 09:22:40 +01:00
Siyuan Cheng
a147a26a2b arc: add nsim_em11d target
add nsim_em11d target specific for DSP feature

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2022-12-19 11:56:55 +01:00
Tomasz Leman
720787f75a intel_adsp: boot: allow boot from imr without restore
This patch makes IMR context save an option that can be enabled. By
default FW, after D3 state transition, will be boot using normal flow.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-12-16 11:03:46 -08:00
Nils Larsen
ca6d02147d nxp_imx: fix base address of Flexspi2
The base address is 0x400d0000 not 0x4000d000

Signed-off-by: Nils Larsen <nils.larsen@posteo.de>
2022-12-16 15:37:55 +01:00
Daniel DeGrasse
4be1fb81ce soc: arm: nxp: switch imxrt boards to use systick timer unless CONFIG_PM=y
Switch all imxrt boards to use the systick timer by default, and only
enable the GPT timer when using low power modes. This is desirable
because the systick has a higher resolution, but the GPT can run
while the core clock is gated, making it useful for low power modes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-16 09:31:48 +01:00
Jaroslaw Stelter
caf309c6f6 intel_adsp: remove ace_v1x-regs.h file
ACE code is no longer using this header, so it could be dropped.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-12-16 05:53:23 +01:00
Dino Li
2ecdd8fa89 ITE soc/it8xxx2/linker: add sections for hw sha256 calculation
IT8XXX2 HW support sha256 calculation, and its calculation is
faster than FW. We place SHA256 message, hash and key data
(total 512bytes) in RAM. If we enable hw sha256, because
HW limits, the sha256 data must place in first 4KB of RAM.
We add sections for hw sha256 calculation in linker.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-12-14 09:51:25 +01:00
Siyuan Cheng
9a7ed58b25 arc: add XY mem support
The XY Memory is a feature commonly found in DSP processors to increase
the DSP performance. The XY component allows a ARC processor to
implicitly load source operands and store results into a closely coupled
memory using a single instruction.

Add XY memory for ARC EM9D/EM11D processors including em_starterkit,
em_starterkit_em11d. emsdp_em9d, nsim_em, iotdk.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2022-12-12 14:38:13 +00:00
Andriy Gelman
727e589448 drivers: interrupt_controller: Add XMC4XXX ERU driver
In Infineon XMC4XXX SoCs, gpio interrupts are triggered via an
Event Request Unit (ERU) module. A subset of the gpios are
connected to the ERU. The ERU monitors edge triggers and creates
a SR.

This driver configures the ERU for a target port/pin combination
for rising/falling edge events. Note that the ERU module does
not generate SR based on the gpio level. Internally the ERU
tracks the *status* of an event. The status is set on a positive
edge and unset on a negative edge (or vice-versa depending on
the configuration). The value of the status is used to implement
a level triggered interrupt; The ISR checks the status flag and
calls the callback function if the status is set.

The ERU configurations for supported port/pin combinations are
stored in a devicetree file dts/arm/infineon/xmc4xxx_x_x-intc.dtsi.
The configurations are stored in the opaque array
uint16 port_line_mapping[].

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-12 10:51:29 +01:00
Duong Vu Nam
a8a72c581e soc: arm: refactor MPU region for NXP S32Z/E
Currently, memory from  __rodata_region_end to __kernel_ram_start (or
_app_smem_start if config userspace) was uncovered by programable MPU
region. But to config static MPU region (nocache region is on ths
region), the programable MPU region need confg full patition.

Signed-off-by: Duong Vu Nam <duong.vunam@nxp.com>
2022-12-12 10:39:31 +01:00
Duong Vu Nam
7fc20ec0bc Soc: arm: enable I/D-caches at NXP S32Z/E SoC
Enable cache to increase retrieval performance.

Signed-off-by: Duong Vu Nam <duong.vunam@nxp.com>
2022-12-12 10:39:31 +01:00
TOKITA Hiroshi
edc115b1b7 soc: gd32f4xx: correct typo
RCU_CFG1_TIMERSEK_MSK -> RCU_CFG1_TIMERSEL_MSK

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-12-12 10:08:12 +01:00
Anders Rillbert
2c162449eb xtensa: linker: Fix #52539 by updating the linker scripts
include all drom sections in the calculation of drom size.

Signed-off-by: Anders Rillbert <anders.rillbert@kutso.se>
2022-12-08 18:46:59 +01:00
Filip Brozovic
3453a3b247 drivers: pinctrl: add numicro pinctrl driver
This commit adds a pinctrl driver for the Nuvoton NuMicro family
of processors.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
2022-12-08 18:46:33 +01:00
Jose Alberto Meza
5d34891ae0 soc: arm: microchip: mec172x: Correct PECI base address
Use correct device tree entry

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-12-07 09:45:25 -06:00
Daniel DeGrasse
6bcdcc3795 dts: nxp_imx: Add zephyr,memory-region attribute to memory regions
Add zephyr,memory-region compatible and attribute to SOC memory regions,
so that sections will be generated and MPU attributes can be applied.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-05 19:54:37 +01:00
Daniel DeGrasse
66f35b286c soc: nxp_imx: Add code to wait for second core boot in RT11xx
Use the messaging unit to ensure that the RT11xx dual core mode will
wait for the second core to boot successfully during early init

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-05 19:54:37 +01:00
Daniel DeGrasse
5992ae2a3d soc: rt11xx: Enabled multicore support with second image
RT11xx features CM4 core, which must be booted from CM7 core. Add
support for loading an image for the CM4 to RAM, and booting the CM4 core
from this image. Each image is built independently using sysbuild, and the
M4 image build produces built collateral with load address information the
M7 image can use to load it to RAM

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-05 19:54:37 +01:00
Daniel DeGrasse
755af99707 soc: rt1xxx: allow linking code to OCRAM region
Allow linking code into OCRAM region when building for RT1xxx SOCs. This
can be used on the RT11xx dual core SOCs as a shared memory region, when
the M7 core needs to load code into a region accessible to the M4 core.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-05 19:54:37 +01:00
Glauber Maroto Ferreira
2cbc3f4f99 pm: esp32c3: system power management
Adds initial system power management support.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Glauber Maroto Ferreira
aba71499a9 soc: esp32c3: set RTC registers to known state
Low-power management is part of the RTC peripherals' domain
on ESP32C3. This dependency implies the need to bring some RTC
registers to a known state, during system initialization, to
achieve proper low-power handling.

The RTC slow memory region is also delimited and used during
power domain options selection.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Glauber Maroto Ferreira
063d94c0ec pm: esp32s2: system power management
Adds initial system power management support.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Glauber Maroto Ferreira
204bf27824 soc: esp32s2: set RTC registers to known state
Low-power management is part of the RTC peripherals' domain
on ESP32S2. This dependency implies the need to bring some RTC
registers to a known state, during system initialization, to
achieve proper low-power handling.

The RTC slow memory region is also delimited and used during
power domain options selection.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Glauber Maroto Ferreira
bf65685a83 pm: esp32: system power management
- Adds initial system power management support.
- Adds option to add extra delay when waking from
deep sleep.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Glauber Maroto Ferreira
a92bbb2d19 soc: esp32: set RTC registers to known state
Low-power management is part of the RTC peripherals' domain
on ESP32. This dependency implies the need to bring some RTC
registers to a known state, during system initialization, to
achieve proper low-power handling.

The RTC slow memory region is also delimited and used during
power domain options selection.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Glauber Maroto Ferreira
f0b4eb5557 soc: esp32x: replace STATUS by int
Replace 'STATUS' by 'int' in extern function
signatures.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Johann Fischer
0f6e2ba7cd soc: expand ifdef by adding new Kconfig option UDC_KINETIS
Expand ifdef by adding new Kconfig option UDC_KINETIS as
preparation for USBFSOTG UDC driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-02 12:55:18 +01:00
Tim Lin
ad2dc064a7 ITE: soc: it81xx2: Add new variant of it81xx2cx related configuration
Add new variant configuration of it81202cx and it81302cx.
This cx variant of it81xx2 changes are as follows:
1. SRAM size will increase from 60k to 128k.
2. Configurable ILM size is still 60k.
3. Support M extension of RISC-V.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-12-02 11:29:00 +01:00
Carlo Caione
cc427b4bb0 cache: Fix libraries and drivers
Fix the usage to be compliant to the new cache API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-12-01 13:40:56 -05:00
Carlo Caione
189cd1f4a2 cache: Rework cache API
The cache operations must be quick, optimized and possibly inlined. The
current API is clunky, functions are not inlined and passing parameters
around that are basically always known at compile time.

In this patch we rework the cache functions to allow us to get rid of
useless parameters and make inlining easier.

In particular this changeset is doing three things:

1. `CONFIG_HAS_ARCH_CACHE` is now `CONFIG_ARCH_CACHE` and
   `CONFIG_HAS_EXTERNAL_CACHE` is now `CONFIG_EXTERNAL_CACHE`

2. The cache API has been reworked.

3. Comments are added.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-12-01 13:40:56 -05:00
Tomasz Leman
8e9a01d96a intel_adsp: ace: power header update
This patch is replacing hardcoded register address with one taken from
device tree.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-11-30 17:46:17 -05:00
Sylvio Alves
2bfc4451cf linker: esp32: fix IRAM length for mcuboot
When MCUBoot is enabled, IRAM region needs to be set
to a smaller value to avoid overlapping. This shall be re-worked
when MCUboot build for ESP32 is performed in Zephyr environment.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-11-30 13:40:10 +01:00
Manuel Arguelles
10c9e40566 soc: nxp: s32ze: add option to select RTU index
Add a hidden Kconfig option to select the index of the target RTU
(Real-Time Unit) subsystem. This index can be used by peripheral
drivers, for example, to know the peripheral instance index since the
HAL is index-based.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-11-30 11:29:39 +01:00
Jay Vasanth
38ad230aec drivers: pinctrl: Microchip XEC PINCTRL add invert pin
Microchip XEC GPIO pins support inverting the output of
alternate pin functions. This feature may be useful for
those peripherals that do not implement output inversion
in the peripheral. GPIO control register pad input and
parallel input register values are not affected by the
function output invert feature. GPIO interrupt detection
of an output is inverted if the invert polarity is enabled.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-11-30 11:29:22 +01:00
Emilio Benavente
1e540f965f soc: lpcxpresso55S36 added PowerInit in clock_init.
Added a missing SDK function POWER_PowerInit
to the clock_init function of the soc in lpc55S36.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-11-30 11:29:12 +01:00
Ettore Chimenti
21a6bb3d2d dts: arm: st: add STM32F302xC device tree
Add ST Micro STM32F302xC family of microcontrollers.

Signed-off-by: Ettore Chimenti <ek5.chimenti@gmail.com>
2022-11-29 09:15:12 +00:00
Wei-Tai Lee
b055e3ca23 soc: riscv: andes_v5: Fix system initialization for L2C
- Put L2C init level in pre_kernel_2 to wait for syscon driver
- Check if SMU exists when preprocessing

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2022-11-29 09:50:05 +01:00
Arsen Eloglian
3659c2db4b intel_common: clean up & rename cavs_* to adsp_*
ADSP common definitions has been fixed
and changed from CAVS_* to  ADSP_*

Signed-off-by: Arsen Eloglian <ArsenX.Eloglian@intel.com>
2022-11-28 17:45:20 -05:00
Evgeniy Paltsev
d2488d2160 ARC: control shared (common) interrupts via IDU
Control shared interrupts enabling/disabling via IDU.
With that we can easily enable and disable them for all cores
in one place.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-11-28 17:44:54 +01:00
Maciej Zagrabski
1cf65ac47a soc: stm32u5: Replace IMGTOOL_ARGS with ROM_START_OFFSET
EXTRA_IMGTOOL_ARGS is used to set additional options by the user.
Any user change will overwrite this option, which
is unintuitive.
Also option ROM_START_OFFSET will be overwritten which is also unintuitive.

Replace hardcoded config option MCUBOOT_EXTRA_IMGTOOL_ARGS
with proper config ROM_START_OFFSET.

Signed-off-by: Maciej Zagrabski <mzi@trackunit.com>
2022-11-28 15:38:45 +00:00
Marc Herbert
57ea358afc intel_adsp: strip rimage main.mod when CONFIG_BUILD_OUTPUT_STRIPPED
Be consistency with zephyr.strip

This will help with reproducibility issues like the one in
https://github.com/thesofproject/sof-bin/pull/106

Use the `strip_command` introduced by commit c060b075a6 ("cmake:
toolchain: bintools abstraction")

boot.mod is already deterministic because it has no debug symbols; no
need to strip it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-11-28 10:00:50 -05:00
Marcin Szkudlinski
eb280f80e6 mtl: drv: avoid compilation warnings in ace/power.c
SOF compilation is sensitive to compilation warnings
Some simple and neutral changes to avoid them

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-26 05:46:08 -05:00
Marcin Szkudlinski
0f067896a6 mtl: drv: move ACE specific procedures to ace directory
IMR save and restore context is a flow implemented for ACE
move boot specific procedures to ace subdir

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-26 05:46:08 -05:00
Przemyslaw Blaszkowski
67791ddd70 soc: xtensa: ipc: unmask intc for core 0 only
In ACE architecture, only core 0 should receive IPC interrupts from host.
Unmasking secodnary core IPC interrupts was causing race condition in
ipc irq handler after enabling secondary core.

Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
2022-11-25 06:37:03 -05:00
Fabio Baltieri
b1d1f442cc xtensa: linker: add missing snippets-sections to ace-link.ld
The linker script for intel_adsp ace was missing the
snippets-sections.ld include, causing it to ignore any custom section
defined in with cmake zephyr_linker_sources().

Adding it in the same location as it's done in xtensa-cavs-linker.ld.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-11-24 16:37:49 +01:00
Arsen Eloglian
54c76ea7c1 soc: intel_adsp: adsp_shim: DfPMCCH definition
Add DfPMCCH block definition for mtl ACE platform

Signed-off-by: Arsen Eloglian <ArsenX.Eloglian@intel.com>
2022-11-22 20:03:06 -05:00
Manuel Arguelles
53e1ea58e0 soc: nxp_s32: update baremetal drivers version
HAL for NXP S32 is updated to a newer version, hence some headers and
macro definitions must be updated accordingly.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-11-21 09:18:13 -06:00
Daniel DeGrasse
54ea741a65 soc: arm: nxp: use zephyr,chosen flash node for RT5xx flash base address
Update rt5xx base address calculation to use the zephyr,chosen flash node
to determine flash base address. Note that due to the external flash
controller, the flexSPI base address must be used when the flash device
is on the flexSPI bus.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Daniel DeGrasse
b455492b1b soc: arm: nxp: use zephyr,chosen flash node for RT6xx flash base address
Update rt6xx base address calculation to use the zephyr,chosen flash node
to determine flash base address. Note that due to the external flash
controller, the flexSPI base address must be used when the flash device
is on the flexSPI bus.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-21 13:03:26 +01:00
Carles Cufi
4796ffee7a drivers: mm: Move mm_drv_intel_adsp_mtl_tlb to zephyr/
This file was mistakenly placed in include/ instead of include/zephyr.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-21 20:43:50 +09:00
Marcin Szkudlinski
c01a8c8807 mtl: soc: store power gating state in D3 state
Power gating register must be stored when CPU is in
power off state

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-18 13:00:04 -05:00
Marcin Szkudlinski
1631d2dc2d mtl: soc: add context save and restore flow
Context save is saving whole memory to persistent
memory area, than turning off memory and CPU
Context restore is a modified boot flow, where
the previously saved context is restored

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-18 13:00:04 -05:00
Marcin Szkudlinski
c929bbcc58 mtl: dts: add L3 memory definitions macros
Add helper macros for l3 memory definitions from
the Device Tree

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-18 13:00:04 -05:00
Emilio Benavente
1374415a2c soc: Updated clock_init in rt6xx
Updated the clock_init function to the latest sdk
and added a safe initialization for the flash setup

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-11-17 13:59:39 -06:00
Emilio Benavente
a3e3cbc3f9 soc: Setup up Kconfigs for safe flash code to load in SRAM
Added a selecion on rt6xx that allows the loading of
the safe flash clock initialization to be inside SRAM
if the user code is being executed from flash.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-11-17 13:59:39 -06:00
Emilio Benavente
9a2fa8d9c0 soc: Add safe flash clock support for MXRT685
Added Safe flash clock setup files for rt6xx

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-11-17 13:59:39 -06:00
Daniel DeGrasse
1ed776a218 soc: arm: imx_rt10xx: call CMSIS SystemInit at early boot
Call CMSIS SystemInit at early platform boot, to ensure that registers
are configured correctly on RT10xx series.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-17 11:53:42 -06:00
Tomasz Leman
f246d9540c intel_adsp: ace: power: ipc procedure update
This patch updates ipc response procedure in power down function. New
flow is only limited to the writs into two registers. We need to clear
the IPCxIDD register in case if its contains any leftovers from a
previous responce. And then write a response to the IPCxIDR.

To prepare response we need to copy incoming request and then mark it as
replay. New message with IPC Busy bit set is then send to host.

The reason for this is a change in the behavior of the IPC driver
compared to how it worked when this function was originaly implemented.
The biggest difference are enabled interrupts in register IPCxCTL.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-11-17 11:19:50 +01:00
Henri Xavier
5de23dab59 boards/arm64: Add QEMU Virt KVM support
Zephyr already has an AArch64 QEMU Virt TCG board.
We add a KVM version of it.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-11-17 11:16:08 +01:00
Flavio Ceolin
e3aac24821 xtensa: linker: Use zephyr's convention for rodata
Zephyr maps start/end of rodata section with variables
using __rodata_region namespace. The exception was Xtensa.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-11-17 15:44:48 +09:00
Nikolay Agishev
6e215ce6af boards: nsim_hs: Add separate config for XIP memory organization
Add XIP support with MWDT toolchain. To have it proper tested
add separate nsim platforms for XIP (flash + sram) and
non-XIP (sram) memory organization in addition to existing
nsim_hs platfor with CCMs (ICCM + DCCM) memory organization.

This PR also enables MPU for all nsim hs3x based platforms
(like we previously enabled it for qemu_arc_hs) to have proper
memory regions permissions.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2022-11-16 11:18:51 +01:00
Johan Hedberg
1d3e1c7778 soc: x86: Used fixed BDF values for early serial
Since DTS doesn't contain the BDF anymore (it's looked up at runtime),
hardcode the BDF value for the use of early serial.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2022-11-16 11:18:43 +01:00
Daniel DeGrasse
e274fbe3f9 soc: lpc54114: update multi core support for LMA address offset
Update lpc54114 support to use LMA address offset instead of linking
secondary core image into primary core memory. This will allow support
with sysbuild to be enabled. Additionally, use partitions to select where
the secondary core image will be located in flash

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
fadd86d3e2 boards: lpcxpresso55s69: use LMA adjustment for second core
Use LMA adjustment building dual core image with LPC55s69. The load
address adjustment allows the second core image to be flashed onto the chip
by the debugger, into the secure region of the LPC flash.

Additionally, remove the build dependency that was enforced by the SOC.
This requirement to build the secondary core image first can be enforced
by the project itself, instead of the core.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Kumar Gala
fb351a63e8 soc: xtensa: intel_adsp: ace: Rework setting soc_num_cpus
Move setting soc_num_cpus into its own SYS_INIT function such
that we can ensure it happens as one of the first things.  We
need soc_num_cpus set before soc_mp_init is called but also before
interrupt controller init functions might be called.

Also, by having it in its own function, it ensures that
soc_num_cpus gets set regardless of how CONFIG_MP_MAX_NUM_CPUS
is set.  Since if CONFIG_MP_MAX_NUM_CPUS=1, we do not call
soc_mp_init().

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-11-15 07:02:37 -05:00
Marcin Szkudlinski
6f3e0babb3 intel_adsp: include toolchain.h in adsp_memory.h
\MTL SOF is not compiling when
8d0eb6ce10
(devicetree: remove deprecated DT_CHOSEN_*_LABEL macros)
is applied
Fix - zephyr/toolchain used to be included by
devicetree/zephyr.h. The file has been removed by 8d0eb6ce10
Include is needed for ALWAYS_INLINE macro

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2022-11-14 14:27:01 -05:00
Jay Vasanth
4ce502777b soc: arm: mec1501: add debug interface configuration
Move regs configuration from previous pinmux.c to soc layer.
This involves the debug interface, configuring the GPIO bank power
and the test clock out pin.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-11-10 22:39:43 -05:00
Daniel DeGrasse
b53eaf1f24 soc: nxp_imx: include fsl_flexspi_nor_boot when boot header is present
Only include fsl_flexspi_nor_boot when a boot header is present,
as this is the only case where the boot header data will be required.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-10 09:11:08 -06:00
Tim Lin
fa751b8472 ITE: soc: chip_chipregs: Add SPISC register structure
Use spisc_it8xxx2_regs instead of IT83XX_SPI_*** registers declaration
to fix in cros_shi_it8xxx2.c

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-11-09 10:44:29 +01:00
Tim Lin
0789442132 ITE: soc: chip_chipregs: Access registers using structure method
Access registers using structure method.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-11-09 10:44:29 +01:00
Tim Lin
b3f46ccaec ITE: cleanup: soc: chip_chipregs: Rename the structure name of register
Rename the structure of flash_it8xxx2_regs to smfi_it8xxx2_regs.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-11-09 10:44:29 +01:00
Tim Lin
2937beb085 ITE: cleanup: soc: chip_chipregs: Remove unused registers
Remove unused registers.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-11-09 10:44:29 +01:00
William MARTIN
9aaeeb25d1 soc: arm: st_stm32: stm32f0: Add support for stm32f030x6
This commit adds the soc config for the STM32F030X6.

Signed-off-by: William MARTIN <william.martin@power-lan.com>
2022-11-09 10:43:41 +01:00
Hubert Miś
dc9d479dea ipc: add a multi-endpoint feature to icmsg
The icmsg backend for ipc_service has a limitation of supporting only
on endpoint. This limitation is acceptable for many IPC instances.
However, some require to use multiple endpoints sharing a single
instance. To preserve the simple and the most efficient single-instance
backend, a separated backend is introduced implementing a wrapper
around icmsg core which adds multiple endpoints support.

There are two multi-endpoint ipc_service icmsg backends: one in the
initiator role, and the other one in the follower role. In a IPC
configuration one end of communication must be in the follower role
while the other one is in the initiator. The initiator initiates
an endpoint discovery handshake to establish enpoint identifiers for
requested endpoint names. The follower responds to requests sent by
the initiator.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2022-11-09 10:41:43 +01:00
Kevin Townsend
9566e9704b boards: arm: mps2_an521: Resize _remote and _ns
The `mps2_an521_remote` and `mps2_an521_ns` targets have the same
memory layout for code and ram, meaning that you can't use TF-M
(`mps2_an521_ns`) and the second core (`mps2_an521_remote`) at the
same time.

This commit updates the memory map of the `_ns` build targets as
follows:

- Reduces the code memory region from 1 MB to 512 KB, maintaining the
  existing base memory address of `0x0010 0000`
- Maintains the existing 512 KB ram memory at `0x2810 0000`

It updates the `_remote` target as follows:

- Reserves 468 KB code memory at address `0x0038 B000`
- Reserves 512 KB ram memory at address `0x2818 0000`

This ensures that the code region for the `_remote` target doesn't
overlap with the code region used by the single flash image layout
defined upstream in TF-M, which the `_ns` target is based upon.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-11-08 10:57:35 -05:00
Adrian Bonislawski
728506df6f soc: intel_adsp/ace: wait for lpsram power up
Wait for lpsram power up before bbzero

Fixes commit 195db14

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-11-08 10:48:30 +01:00
Adrian Bonislawski
7e0c1a81cb soc: intel_adsp/ace: remove z_delay from hpsram init
No delay needed here, at init time fw can boot as soon as possible

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-11-08 10:48:30 +01:00
Tomislav Milkovic
c79ac5152b soc: arm: st_stm32: stm32l4: add support for L486 and L4A6
Add support for STM32L486 and STM32L4A6 families

Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
2022-11-08 10:46:16 +01:00
Kumar Gala
e3e24b266d soc: xtensa: intel_adsp: ace: Fix build when CONFIG_MP_NUM_CPUS=1
When CONFIG_MP_MAX_NUM_CPUS=1, which it does for some tests, we will
get compiler warnings with soc_adsp_halt_cpu(), so only build it
when CONFIG_MP_MAX_NUM_CPUS > 1.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-11-07 21:12:54 -05:00
Kamil Serwus
cad62fae61 soc: atmel: add base support for C2x SOC
Adds Atmel SAMC20 and SAMC21 soc. C series is based on Cortex-M0+.
C21 contains CAN interface.

The init routines are same for SAMC20 and SAMC21. They use one
clock OSC48M without configuration.

The code is inspirated from atmel_sam0/samd21.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2022-11-04 16:03:01 +01:00
Kamil Serwus
9f5edfbc55 soc: arm: atmel: Add revisions to soc
Some SAM0 contains revisions with separated includes for example
SAMC21 and SAMC21N.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>

Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-11-04 16:03:01 +01:00
Kumar Gala
a574957c74 soc: xtensa: intel_adsp: ace: set number of cpus at boot
We look at the Intra DSP communications capability register (DFIDCCP)
to determine the number of cores.  There might be a better way to
determine the number of cores, but this works for now.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-11-03 16:43:53 -04:00
Kumar Gala
6bdd91e9b1 soc: Add ability for SOC to specify runtime CPU detection
Add Kconfig SOC_HAS_RUNTIME_NUM_CPUS symbol that an SoC can
set to specify that it supports determining the number of CPUs
at runtime.

On xtensa add support for SOC_HAS_RUNTIME_NUM_CPUS and expose
soc_num_cpus that the SoC code should set early in boot as the
means to expose the number of cpus.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-11-03 16:43:53 -04:00
Ederson de Souza
e98a748ad2 soc/xtensa/intel_adsp/cavs: Support for code relocation
Basically:
  - Name RAMABLE_REGION as "RAM";
  - Insert the relocation hooks for gen_relocate_app.py.

Also, to help with "rimage" peculiarities, `fix_elf_addrs.py` changed to
not copy empty sections to output, as this would prevent someone trying
to move all of some section (such as BSS) to a different location and
reuse the platform linker script - which would generate an empty section
anyway.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-11-03 10:25:07 +01:00
Ederson de Souza
06990e69d6 soc/xtensa/intel_adsp/cavs: Expose linker script on include
This way, applications can reuse it by simply including it in their
custom linker scripts.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-11-03 10:25:07 +01:00
Ederson de Souza
8ac6f74a7d arch/xtensa: Enable code relocation
Besides adding ARCH_HAS_CODE_DATA_RELOCATION, this patch also adds
support for the "sample_controller" SoC (used by qemu_xtensa) as
demonstration.

As Xtensa lacks a common linker script at the arch level, enabling it
for each platform will be a piecemeal effort. This patch adds it to the
`soc/xtensa/sample_controller` SoC. Basically, default RAMABLE_REGION is
set to be called "RAM", and hooks are inserted so that
gen_relocate_app.py can add the relevant linker bits.

Also, `tests/application_developent/code_relocation` was tweaked to
support the qemu_xtensa platform. Basically, add the relevant linker
script and ensure that relevant memory regions have their program header
(PHDR) associated.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-11-03 10:25:07 +01:00
Ederson de Souza
fb26f18ae1 soc/xtensa/sample_controller: Expose linker script on include
This way, applications can reuse it by simply including it in their
custom linker scripts.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-11-03 10:25:07 +01:00
Ederson de Souza
d7f46136e0 soc/xtensa: Use standard __data_start/__data_end markers
Xtensa is the odd one out by using _data_start/_data_end instead. Using
the Zephyr standard helps avoid ifdefs for common code, like tests.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-11-03 10:25:07 +01:00
Marcin Niestroj
adfc705b51 ARM: nxp_imx: rt10xx: migrate ARM, AHB and IPG dividers to DT
Those dividers were configured in Kconfig so far. Add 'arm-podf',
'ahb-podf' and 'ipg-podf' "fixed-factor-clock" compatible DT child nodes
under 'ccm' (Clock Control Module) and use configured 'clock-div' values
instead of Kconfig equivalents.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-11-02 17:17:27 -05:00
Jaska Uimonen
1f6d6deaef sparse: fix sparse warnings found in sof compilation
Add proper sparse_force cast to assigments into sparse_cache pointers.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2022-11-02 14:34:20 -04:00
Kai Vehmanen
af5fb91a6c soc: intel_adsp: ipc: Do not send message until previous one is acked
Fix a bug where an IPC message is sent while the peer/host ack for
the previous message has not yet been processed. There is existing
logic to check 'idr' INTEL_ADSP_IPC_BUSY bit, but this leaves
the following race:

 - DSP: msg A sent by DSP to host
 - HOST: IRQ, msg A acked, host sets DONE bit -> ADSP_IPC_BUSY cleared
 - DSP: msg B sent by DSP to host, IPC_BUSY is clear so proceeding to send
	-> e.g. 'devdata->sem' is reset --> BUG!
 - DSP: IRQ, msg A done
	-> e.g. call to 'sem_give(&devdata->sem)' which is wrong as
	   the semaphore was just reset in previous step for msg B

Add additional state to track handling of the acks. This allows
to postpone sending message B (in above example), until message A
is fully processed.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-11-02 14:33:20 -04:00
Erwan Gouriou
46a09b308e soc: stm32wb: Set BT_USER_PHY_UPDATE as supported
STM32WB Controller supports application to initiate the "PHY Update
Procedure" (BT_USER_PHY_UPDATE) while it doesn't support it to be
automatically triggered on connection establishment (BT_AUTO_PHY_UPDATE).

Default BT_USER_PHY_UPDATE to true, which automatically defaults
BT_AUTO_PHY_UPDATE to false.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-11-02 11:11:10 +02:00
Kumar Gala
0a7c25e649 drivers: timer: intel_adsp: Update driver to use dts Kconfig symbol
Update Intel ADSP timer driver to use DT_HAS_<compat>_ENABLED Kconfig
symbol to expose the driver and enable it by default based on
devicetree.

We remove setting 'default y' for the timer driver in
Kconfig.defconfig.series as that is now handled in the driver Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-11-01 09:03:17 +00:00
Kumar Gala
117039ca2b IPM: remove defconfig/proj setting of IPM drivers
Now that IPM drivers are enabled based on devicetree we can
remove any cases of them getting enabled by Kconfig, *defconfig*,
and *.conf files.

We need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 16:45:56 -05:00
Jay Vasanth
d0fe965b9f drivers: espi_saf: Add Microchip MEC172x eSPI SAF version 2 driver
Microchip MEC172x has a modified eSPI SAF hardware implementation.
Hardware changes include multiple clock dividers for each SPI
flash device and data transfer using QMSPI local DMA.
espi reset interrupt is made a higer priority in MEC172x devicetree
because espi reset event resets all espi hardware and we don't
to want to service any other espi interrupt blocks when espi reset
occurs.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-10-28 14:29:46 -05:00
Jay Vasanth
d32d1eb966 soc: microchip_mec: Prepare for MEC172x SAF version 2
Microchip MEC172x eSPI SAF has significant hardware changes
requiring a new SAF configuration structure. In preparation
for the MEC172x we move the current SAF header out of common
to the MEC1501 subfolder, remove an unused and empty common
header and remove includes of the moved headers from MEC172x.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-10-28 14:29:46 -05:00
Jay Vasanth
0976343513 drivers: SPI: MEC172x QMSPI clock fix
Microchip MEC172x QMSPI expanded its clock divider register
field from 8 to 16 bits. QMSPI source clock is on the fast
peripheral domain therefore get the frequency from the clock
control driver.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-10-28 14:29:46 -05:00
Kumar Gala
f8fba49a41 soc: xtensa: intel_adsp: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-26 12:00:53 +02:00
Kumar Gala
0ce0f43b36 soc: xtensa: esp32: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus().  This is to allow
runtime determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-26 12:00:45 +02:00
Kumar Gala
9387d8689b soc: xtensa: esp32: Add CONFIG_SMP protection
Add #ifdef CONFIG_SMP around code that only needs to exist when
SMP is enabled.

Also include ksched.h to get decleration of z_sched_ipi.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-26 12:00:45 +02:00
Kamil Serwus
c707f1ed28 drivers: adc: sam0: fix compliation for feature SAMs for C21.
C21 doesn't have ADC_REFCTRL_REFSEL_AREFB and have different APBs.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2022-10-25 15:48:13 -07:00
Andrei Emeltchenko
42b6af2ee8 soc: raptor_lake: Cleanup CMakeLists
Cleanup CMakeLists fixing error message:
...
No SOURCES given to Zephyr library: soc__x86__raptor_lake
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-10-25 09:50:15 -05:00
Yinfang Wang
b2fe7045d1 soc: x86: Add Raptor Lake SoC definition
Add a basic definition for the Raptor Lake SoC.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-10-25 09:51:37 +03:00
Peter Marheine
ab2515ad26 it8xxx2: support relocating ISR code to RAM
IT8xxx2 uses a relatively slow SPI flash for ROM with a small 4k
I-cache. As a result in large or busy applications, instruction fetch
can be very costly due to I-cache misses. Since exception handling code
is some of the hottest code in most applications, add an option (enabled
by default) causing that code to execute out of RAM in order to improve
performance.

This is very similar to exception section placement on XIP niosii
platforms (which has similar motivation), but can still be disabled by
configuration.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-21 20:31:47 +02:00
Peter Marheine
d37f496ee7 it8xxx2: allow placing arithmetic functions in ILM
These functions are small and may be very hot depending on the workload,
so are usually a good choice to execute from RAM.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-21 20:31:47 +02:00
Peter Marheine
d4549ed808 it8xxx2: generalize ILM support
Executing code out of RAM on IT8xxx2 requires that the relevant
addresses be mapped onto the CPU's instruction memory bus, referred to
by ITE documentation as Instruction Local Memory (ILM). ILM mappings
configure blocks of RAM to be used for accesses to chosen addresses when
performing instruction fetch, instead of the memory that would normally
be accessed at that address.

ILM must be used for some chip features (particularly Flash
self-programming, to execute from RAM while writing to Flash), and has
historically been configured in the Flash driver. The RAM for that was
hard-coded as a single 4k block in the linker script.  Configuring ILM
in the flash driver is confusing because it is used by other SoC code as
well, currently in code that cannot depend on the Flash being functional
or in hand-selected functions that seem performance-critical.

This change moves ILM configuration to a new driver and dynamically
allocates RAM to ILM in the linker script, allowing software use of the
entire 64k RAM depending on configuration.  This makes ILM configuration
more discoverable and makes it much easier to correctly support the
CODE_DATA_RELOCATION feature on this SoC.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-21 20:31:47 +02:00
Peter Marheine
1b931af0ff it8xxx2: fix build with CONFIG_SOC_IT8XXX2_PLL_FLASH_48M=n
The chip I2C driver uses chip_get_pll_freq(), so that function needs to
be built even when the PLL configuration is not changed at boot.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-21 20:31:47 +02:00
Kumar Gala
a1195ae39b smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS
Change for loops of the form:

for (i = 0; i < CONFIG_MP_NUM_CPUS; i++)
   ...

to

unsigned int num_cpus = arch_num_cpus();
for (i = 0; i < num_cpus; i++)
   ...

We do the call outside of the for loop so that it only happens once,
rather than on every iteration.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-21 13:14:58 +02:00
Lauren Murphy
938b9533c7 intel: adsp: cavs: fix NO_OPTIMIZATION boot failure
Fixes boot failure on CAVS platforms with
CONFIG_NO_OPTIMIZATIONS=y by moving z_soc_mp_asm_entry
into .text linker section to ensure it is copied to
SRAM.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-10-20 18:53:04 -04:00
Andrey Borisovich
56e1c5061d soc: ace: add external IPC completion to ipc done handler
Sometimes IPC message acknowledgement should be done by external
code to provide sufficient timing (example assemble code related
to powering down). Added bool return type to ipc message done handler
that if callback function returns true, IPC API skips writing
IPC message completion bits.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-10-20 18:52:42 -04:00
Anas Nashif
ad05e79598 intel_adsp: mem_window: fix definition of memory windows
Fix wrong calculation of memory window sizes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-20 18:52:13 -04:00
Tomasz Leman
ed5abc9f71 ace: power: fix d0i3 restore
The restore vector after power gating was configuring the MEMCTL register
incorrectly. This caused an FW crash during the cache prefetch.

Additionally, since lp sram cache issue was fixed, xtensa hal function
can be replace with zephyr equivalent.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-10-20 18:00:26 -04:00
Jun Lin
82a887c98d driver: eSPI: npcx: support multiple bytes mode for Port80
eSPI PUT_IOWR_SHORT protocol can send 1/2/4 bytes of data in a single
transaction. This allows the host to send max 32-bits Port80 code
at one time. This CL sets bits OFS0_SEL~OFS3_SEL in the DPAR1 register
to let the EC hardware put the full Port80 code to DP80BUF FIFO.
It also groups the N-byte code into a single 32-bits variable when
necessary by analyzing the offset field in the DP80BUF register.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-10-20 15:41:22 +02:00
Michal Sieron
6423e7db38 soc: arm: eos_s3: Use frequency from Kconfig to configure main clock
Allows applications to use other frequencies than 60 MHz.
For example 48 MHz for USB communication with usbserial driver.

Signed-off-by: Michal Sieron <msieron@antmicro.com>
2022-10-20 15:41:09 +02:00
Kumar Gala
fc95ec98dd smp: Convert #if to use CONFIG_MP_MAX_NUM_CPUS
Convert CONFIG_MP_NUM_CPUS to CONFIG_MP_MAX_NUM_CPUS as we work on
phasing out CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-20 22:04:10 +09:00
Kumar Gala
6393a7ce5c smp: Kconfig: Move to using MP_MAX_NUM_CPUS
Continue to phase out MP_NUM_CPUS, change Kconfig to be
MP_MAX_NUM_CPUS and make MP_MAX_NUM_CPUS the main Kconfig symbol.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-20 22:04:10 +09:00
Anas Nashif
f09a3a1bd6 linker: intel_adsp: discard GNU-stack notes
discard GNU-stack notes coming from linker when building with clang.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-19 12:00:43 -04:00
Felipe Neves
5760fcc8ab soc: xtensa: esp32_net:
Fixes boot sequence for esp32_net, also reflect the changes in the
esp32 ipm driver.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-10-19 16:03:00 +02:00
Gerard Marull-Paretas
178bdc4afc include: add missing zephyr/irq.h include
Change automated searching for files using "IRQ_CONNECT()" API not
including <zephyr/irq.h>.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-17 22:57:39 +09:00
Krzysztof Chruscinski
72306f095d soc: arm: nordic_nrf: nrf53: Add default logging domain name
Add default log domain name for net core.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Kumar Gala
c778eb2a56 smp: Move arrays to use CONFIG_MP_MAX_NUM_CPUS
Move to use CONFIG_MP_MAX_NUM_CPUS for array size declarations instead
of CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-17 14:40:12 +09:00
Mahesh Mahadevan
2037b20db5 soc: nxp: Fix boot issue on RT595
Include the correct header file. This was uncovered due to
a recent change where zephyr/kernel.h include was removed
from init.h

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-10-14 09:57:18 +02:00
Martin Jäger
9326d113a2 soc: riscv: esp32c3: include espressif's soc.h
The soc.h from the espressif HAL module provides register definitions
like APB_CLK_FREQ, which are required for the Zephyr TWAI driver.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-10-14 09:55:09 +02:00
Manuel Arguelles
337dc5d651 soc: arm: add pinctrl support for NXP S32Z/E SoC's
Introduce support for Pinctrl driver on NXP S32Z/E SoC's.
The NXP S32 pin controller is a singleton node responsible for
controlling the pin function selection and pin properties, based on the
pin node group approach. The pinmux configuration is encoded in a
32-bit value.

Each S32 SoC implementing Pinctrl must create a `pinctrl_soc.h` header
which define SoC-specific macros to initialize the pinctrl structure.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-10-14 09:51:14 +02:00
Manuel Arguelles
41c36357bd soc: arm: introduce NXP S32Z/E support
This patch introduces support for NXP S32 devices, specifically for
S32Z27 from S32Z/E family.

NXP S32Z27 processors are composed of two Real-Time Units (RTU)
containing each four ARM Cortex-R52 cores with flexible split/lock
configuration, and dedicated internal SRAM.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-10-14 09:51:14 +02:00
Daniel Leung
b09973c460 soc: intel_adsp/common: remove reference to hp_sram_pm_banks
The commit boot code does not call hp_sram_pm_banks() so there is
no need to do an extern declare.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-10-13 21:38:41 -04:00
Daniel Leung
a2cb4a7ce3 soc: intel_adsp/ace: always inline funcs to get memory bank cnt
The functions to get memory bank counts are simple enough that
they can be always inlined. This mostly helps with debugging,
especially with NO optimizations, as inlining is being done only
if the inline keyword is specified. This creates a chicken and
egg problem where the SRAM init functions need to call these
before code copying can be done. However, these functions are
not in memory before code copying, resulting in jumping into
memory with random bits.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-10-13 21:38:41 -04:00
Daniel Leung
3ffe265426 soc: intel_adsp/common: only memcpy segment if needed
There is a "load" flag associated with segment to be copied
into Xtensa attached memory during manifest parsing. So only
copy those segment if indicated so. There may be some segments
in the struct with NULL destination address. So this is
to avoid memcpy into NULL.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-10-13 21:38:41 -04:00
Daniel Leung
195db14400 soc: intel_adsp/ace: zero out memory at ram init
There is an assumption in parse_module() during code/data copying
that the memory has already been zero-ed, and hence no need to
clear memory when a BSS segment is encountered. In CAVS ram
initialization code, bbzero() is called. However, in ACE code,
there is no such call. So add them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-10-13 21:38:41 -04:00
Huifeng Zhang
52cdf2aaf3 boards: fvp_baser_aemv8r: remove SOC_FVP_AEMV8R_EL2_INIT code
Now that VMPIDR_EL2 will be initialized in z_arm64_el2_init, the code
that I wrote for initializing VMPIDR_EL2 on fvp_baser_aemv8r can be
removed.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2022-10-12 18:46:49 +09:00
Gerard Marull-Paretas
e42f58ec94 init: s/ARCH/EARLY, call it just before arch kernel init
The `ARCH` init level was added to solve a specific problem, call init
code (SYS_INIT/devices) before `z_cstart` in the `intel_adsp` platform.
The documentation claims it runs before `z_cstart`, but this is only
true if the SoC/arch takes care of calling:

```c
z_sys_init_run_level(_SYS_INIT_LEVEL_ARCH);
```

Which is only true for `intel_adsp` nowadays. So in practice, we now
have a platform specific init level. This patch proposes to do things in
a slightly different way. First, level name is renamed to `EARLY`, to
emphasize it runs in the early stage of the boot process. Then, it is
handled by the Kernel (inside `z_cstart()` before calling
`arch_kernel_init()`). This means that any platform can now use this
level. For `intel_adsp`, there should be no changes, other than
`gcov_static_init()` will be called before (I assume this will allow to
obtain coverage for code called in EARLY?).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-12 17:16:27 +09:00
Anas Nashif
1e7548eeda intel_adsp: add missing headers
add headers previously included indirectly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 18:37:53 -04:00
Anas Nashif
c75ac38f6c drivers: intc_dw_ace: use CONFIG_DW_ICTL_ACE
Use CONFIG_DW_ICTL_ACE instead of a version kconfig.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
ede94516b0 drivers: intc_dw_ace: rename file
No need for the version in the file name, this will be used by multiple
versions of ACE.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
98a88cc5a7 intel_adsp: remove unused defines from soc.h
SSP_MN_DIV_BASE is not being used anywhere, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
6c3277eada intel_adsp: ace: rename namespace: MTL -> ACE
MTL is just one platform and this code is going to be used in multiple
platforms currently under development, so reduce the confusion and move
to a common namespace.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
0869e62539 intel_adsp: cleanup ace_v1x-regs.h more and prep for removal
File still not being removed due to out-of-tree usage. We will drop it
once the external code has stopped referencing it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
e852247de3 intel_adsp: ace: split power/boot/recovery defines from main header
Split the defines based on domain and cleanup ace_v1x-regs.h so we can
finally remove it and stop include soc specific headers across the tree.
Future generations of this family will be able to use the same naming
scheme without having to use the version name in the file name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
52297422fc timer: intel_adsp: use DTS for hardware information
Convert timer driver to use a light weight syscon and DTS and convert
register information to use offsets and sys_read/sys_write instead of
structs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
b81daae643 intel_adsp: ace: drop l2lm defines
L2LM control registers are not used in this soc generation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
2927777f40 intel_adsp: adapt shim for each platform
Now that we have shim defined for each platform, no need to support all
platforms within the same struct. This change exposes some bugs where we
were relying on the old structure and calling into unused register space
for example for SRAM initialization on some SoC generations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
059dc41cc6 intel_adsp: put interrupt defines in own headers/cleanup namespace
Cleanup soc.h and move interrupt defines into own headers. Rename some
of the defines for ACE to have a unified namespace.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Anas Nashif
100090832d drivers: intc: ace: use DW structure already defined in the driver
The DW register block was duplicated into the ACE header while we had
the same thing in the driver. Move everything to the driver as the first
step with further improvements planned on top of this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 12:50:05 -04:00
Gerard Marull-Paretas
edfcd0ab51 soc: xtensa: nxp_adsp: add missing xtensa irq.h include
The file uses architecture specific IRQ calls without including
appropriate headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
cb70d40da3 soc: lpc55xxx: remove unnecessary include
sys/util.h is not needed by soc.h, and was causing troubles with
redefinitions of ARRAY_SIZE (from HAL) in CI.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
81e23c2758 soc: arm: nxp_imx: add missing section_tags.h include
Include required for __imx_boot_ivt_section.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
343e900799 soc: arc: add missing aux_regs.h include
It is required for z_arc_v2_core_id()  or register read/write functions.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
98272b324b include: add missing sys/util.h include
Some files were using macros defined in sys/util.h without including it,
e.g. for MHZ().

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
597dd5901c include: add missing spinlock.h include
Some files are using the spinlock API without including the necessary
headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
4649e2347e include: add missing soc.h include
Some SoCs define stuff in soc.h, used in drivers or SoC code. Note that
soc.h is not introduced here as a catch-all header. soc.h optimizations
or removal is out of the scope of this patch.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
8a6cf41016 include: add missing nmi.h include
Some files make use of NMI API (NMI_INIT()) without including the
appropriate headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
6a0f554ffa include: add missing kernel.h include
Some files make use of Kernel APIs without including kernel.h, fix this
problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
acc8cb4bc8 include: add missing irq.h include
Some modules use the IRQ API without including the necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
e63b0bb3fe include: add missing errno.h include
With the incoming removal of kernel.h/types.h from init.h, lots of files
start to show compile errors because they relied on indirect
definitions, including errno.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
f7a5b47dff include: add missing devicetree.h include
Some files make use of DT APIs without including devicetree.h.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
4d953bd1fb include: add missing cmsis.h include
Some files make use of CMSIS APIs/definitions without explicitely
including CMSIS headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
34a6848887 include: add missing arch/cpu.h include
The sys* ops like sys_clear_bit are indirectly included via arch CPU
header. Other stuff like find_msb_set end up included via this header as
well.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Mahesh Mahadevan
245ef22d5f soc: nxp: Fix the clock setup for RT595
The core clock was incorrectly divided down.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-10-11 08:25:14 -05:00
Anas Nashif
63ff07e913 intel_adsp: move ipc command out of mem window setup
Do FW communication outside of memory window setup to accomodate for
additional IPC commands and headers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif
f33fb23810 intel_adsp: mem_window: do not depend on instance numbering from DT
This is not guaranteed to match the physical layout of the memory, so
get them individually based on node label.

For initialization, use bbzero.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif
d148ea1d7f intel_adsp: mem_window: support read-only flag
Some windows might need to be set as writtable, so add a flag read-only
to DTS bindings which is set to true for all windows right now. This can
be set to false where needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif
9cd53958ce intel_adsp: mem_window: rename defines CAVS_ -> ADSP_
Fix namespacing of memory window defines. Not all platforms are CAVS
based anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif
46af0620b3 console: move winstream console to drivers/
This was all done as part of the soc and called from the soc. Define
this type of console under drivers/console and use it in the SoCs
supporting that via SYS_INIT instead of calling the console code
directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anas Nashif
d038eb5dc7 intel_adsp: move memory windows to DTS proper
Instead of just declaring the memory window register in DTS and have
everything else all over the place (headers, Kconfig, etc.) this change
defines the memory window instances in DTS and uses the device model to
initialize the windows. Code is still part of the SoC, given that we do
not have a driver subsystem suitable for this type of device yet.

Move FW status to own workflow and separate from window setup.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 08:28:25 -04:00
Anisetti Avinash Krishna
8df2568a20 soc: x86: Clean up GPIO related defines
Clean up and refactor x86 SoC headers in preparation of adding
new platforms in the future.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2022-10-10 19:17:03 +03:00
Jay Vasanth
f87acb5bdd soc: arm: microchip: add common mec_gpio.h
add common mec_gpio.h to allow access to common gpio_regs
structure for both mec15xx and mec17xx, used in pinctrl driver

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-10-08 18:32:33 +02:00
Henri Xavier
a43b37bb07 boards: Add support for Khadas Edge-V board
This is an AArch64 board. We also add RK3399 SoC support,
as well as a very simple Synopsys 8250dw UART driver.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-10-08 18:32:14 +02:00
Daniel Leung
cdb77d843a soc: intel_adsp/ace: fix IDC processing for sched IPI
The Inter-DSP Communication (IDC) is being used to send
sched IPI to other CPU cores. When a core receives an IDC,
it needs to ACK it by clearing the BUSY bit in TDR, and also
needs to the BUSY bit in TDA to signal done after processing.
These two steps are needed to complete one IDC message.
If we do only one (and not both), the other side will not be
able to send another IDC message as the hardware still thinks
the core is processing the IDC message (and thus will not send
another one). So add the step to clear the BUSY bit in TDA so
we can have multiple sched IPIs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-10-07 18:12:34 -04:00
Liam Clark
6b8b9e058b soc: arm: st_stm32: add support for STM32L431XC
Add support for the STM32L431XC SoC.

Signed-off-by: Liam Clark <liam.james.clark@gmail.com>
2022-10-06 22:37:40 +00:00
Stephanos Ioannidis
41bb989123 soc: intel_adsp: Use build system Python to run fix_elf_addrs.py
This commit updates the intel_adsp build script to invoke the
`fix_elf_addrs.py` Python script using the Python executable detected
by the build system.

This ensures that the script is run using the same Python installation
used by the Zephyr build system.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-10-07 04:12:26 +09:00
Gerard Marull-Paretas
40a6f08d3c soc: arm: nxp_lpc: do not select PINMUX
The platform has support for pinctrl, but it is selecting both pinmux
and pinctrl. Legacy applications requiring pinmux should enable it
manually.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-06 05:24:15 -05:00
Daniel Leung
81908cd367 soc: intel_adsp/ace: fix CPU halting
() The check for whether the CPU is already active before halting
   was incorrect. It should only fail if the CPU is not active,
   but the CHECKIF() conditional was inverted. So invert it.

() Also need to set the entry in the bookkeeping array to false
   once a CPU is considered powered down.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-10-03 13:27:33 -04:00
Daniel Leung
13298c7a6a soc: intel_adsp/ace: fix condition to check core power bit
The conditionals to check if the CPA bit is already set or cleared
are incorrect. This results in the code always asserting. So fix
those.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-10-03 13:27:33 -04:00
TOKITA Hiroshi
db6d8c92ff modules: Add IRC configurations
Add options about Internal RC(IRC) oscillator.

- GD32_HAS_IRC_32K/40K indicates IRC types.
- GD32_LOW_SPEED_IRC_FREQUENCY is the numeric value of frequency

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-10-03 18:07:16 +02:00
Torsten Rasmussen
c107827bb7 linker: correct linker script _flash_used calculation
Linker scripts contains a `.last_section` section that is placed in rom
region as NOLOAD for the purpose of retrieve the actual number of bytes
contained in the image. See d85efe0b10

However, a previous section may cause the location counter to be
incremented for alignment purposes. This can result in the size of the
image to be 0x10FA but location counter to be 0x1100 because it has been
aligned for next section placement.

Therefore, two new Kconfig settings are introduced.
Those settings request the linker to will write a pattern in
`.last_section`. Together with removing NOLOAD and writing a patten to
the section then we ensure that data is written after alignment of
location counter, and thereby forces the image size to be in sync with
the location counter.

The default pattern used will be 0xE015 (end of last section).

Some systems may fill up the flash completely, or simply write data at
the end of the flash, which in both cases can result in overflow.
Therefore, the new settings can be disabled.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-10-03 13:13:46 +00:00
Andriy Gelman
072a428f78 drivers: flash: Add xmc4xxx flash drivers
Add xmc4xxx flash drivers.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-10-03 13:56:49 +02:00
Joakim Andersson
63e45c8c7b soc: nordic_nrf: Allow building with TF-M without platform partition
Allow building for nRF non-secure and TF-M enabled without having the
platform partition enabled.
In this configuration the soc_secure functions have no valid
implementation, leave it as a compilation error if the application
includes the functions.

Add missing dependency on soc_secure functions being available for
SOC_HFXO_CAP_INTERNAL configuration.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-03 10:17:45 +02:00
Joakim Andersson
c08964afd5 soc: nrf5340: Produce a Kconfig error when GPIO cannot be forwarded
Make Kconfig produce an error when GPIOs cannot be forwarded in the
current configuration instead of silently excluding the forwarding.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-03 10:17:45 +02:00
Jun Lin
a55c9f8ce7 driver: kscan: npcx: add driver support for kscan
Add keyboard scan driver support.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-10-03 10:14:51 +02:00
Thad House
f11e5b77f6 rpi_pico: Mark RTT as supported by RP2XXX Chip
RTT is supported by the RP2XXX series of chips, so it should be marked
as such

Signed-off-by: Thad House <thadhouse1@gmail.com>
2022-10-03 10:12:17 +02:00
Peter Marheine
5eb75b81f7 arm: rename default RAM region from 'SRAM' to 'RAM'
It's useful for RAMABLE_REGION to have a uniform name when
CODE_DATA_RELOCATION is supported, because otherwise the build system
needs to be aware of how the region name differs between architectures.
Since architectures tend to prefer one of 'SRAM' or 'RAM' for that
region, prefer to use 'RAM' as the more general term.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-03 10:09:53 +02:00
Grant Ramsay
897952370e drivers: ethernet: Add ESP32 Ethernet driver
This is to enable ESP32 Ethernet support

Signed-off-by: Grant Ramsay <grant.ramsay@hotmail.com>
2022-10-01 14:51:28 -04:00
Adrian Bonislawski
7eeeff5ce9 dma: hda: trigger link commit at dma_start
This will trigger link commit immediately after start
to fix hda start flow.
Applies to link out only.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-30 15:18:20 +00:00
Dino Li
db50a7aca7 drivers: gpio: it8xxx2: add support for GPIO_DISCONNECTED flag
This change was made to support the flag.
fixes: #50681

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2022-09-29 14:33:53 +00:00
Daniel Leung
e869cff96c soc: intel_adsp/ace: unmask all host IPC functionality
On ACE, there is another layer of interrupt masking where
this masks, in addition to the DesignWare controllers.
So we need to un-mask during IPC init or else we are not
going to get any host IPCs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-29 10:15:53 +00:00
Daniel Leung
4bbd3c7ef5 interrupt_controller: intc_dw_ace_v1x: fix multi-level IRQs
Zephyr encodes multi-level interrupts in a certain way, and
the driver is not utilizing the encoding correctly. So fix
it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-29 10:15:53 +00:00
Stephanos Ioannidis
ed13880f1d linker: Remove k_mem_pool section
This commit removes the `k_mem_pool` section for the memory pool API,
which was removed in the v2.5.0 release.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-28 14:24:34 +00:00
Anas Nashif
db75a82b24 intel_adsp: when using ztest, add delay between tests
console can't handle the amount of data coming from many tests, so
introduce a delay beween testcases.

Use ZTEST_TEST_DELAY_MS to delay test execution.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 10:53:43 +00:00
Tim Lin
3474ba919f ITE: drivers/i2c: FIFO2 can be selected to support channel of B or C
FIFO2 can be selected to support channel of B or C by dtsi.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-09-22 14:58:42 +00:00
Daniel Leung
b820cde7a9 soc: esp32: use Z_KERNEL_STACK_BUFFER instead of...
...Z_THREAD_STACK_BUFFER.

This is currently a symbolic change as Z_THREAD_STACK_BUFFER
is simply an alias to Z_KERNEL_STACK_BUFFER without userspace,
and Xtensa does not support userspace at the moment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 18:47:13 +00:00
Daniel Leung
74df88d8f5 soc: intel_adsp: use Z_KERNEL_STACK_BUFFER instead of...
...Z_THREAD_STACK_BUFFER.

This is currently a symbolic change as Z_THREAD_STACK_BUFFER
is simply an alias to Z_KERNEL_STACK_BUFFER without userspace,
and Xtensa does not support userspace at the moment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-21 18:47:13 +00:00
Jay Vasanth
64eeef9d57 soc: arm: microchip: update mec1501 soc header
update mec1501 soc.h to include soc_dt.h for pinctrl
related macros

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Andrey Borisovich
892682dac6 soc: intel_adsp_ace1x: fix for IPC implementation
In commit c75e6cfcb9
("soc: intel_adsp_ace1x: Added IPC/IDC implementation")
definition for INTEL_ADSP_IPC_DONE was modified for ace1x platforms.
This change was not correct as the new definition was also used to
program the IDA register.

Co-authored-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-09-21 14:08:38 +00:00
Emilio Benavente
2f149fb653 soc: arm: nxp: lpc55xxx: Added FlexPWM to the SOC Kconfig
Added MCUX_PWM Kconfig dependency;
Added missing pin function definition needed for PWM;
Enabled submodule clocks for FlexPWM

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-09-19 10:10:32 +00:00
Mahesh Mahadevan
46eaa81ac0 dts: rt1010: Fix RT1010 IP base addresses
Fix the Base addresses for the IP blocks that are
located at a different address on RT1010

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-16 14:50:06 -05:00
Enjia Mai
ef3e7a5fa6 soc: xtensa: cavstool: add support for logs coming from HDA logging
1) HDA logging seems to be using some padding like '\x00'. Such
string can print well on a terminal but corrupt the string match.
And this can cause false failure if RunID matching is affected.
Remove such padding before checking RunID.

An affected RunID example:
'7aa9ba3c6db12\x00\...\x00\x00\x00\x00d0c7fcf382a4af40ec6'

Expected:
'7aa9ba3c6db12d0c7fcf382a4af40ec6'

2) Use non-displayable chars for live connection check. Otherwise
the log output will have subtle garbage like extra spaces which
locate randomly.

This solution comes from the PR #50071, the author is smrtos.

Signed-off-by: Ming Shao <ming.shao@intel.com>
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-16 13:34:05 -04:00
Enjia Mai
d6cb27ddd8 soc: xtensa: remove the serivce logic in the FW loader
Remove the remote service logic in the FW loader, now
the FW loader is a pure FW loader as it used to be.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-16 13:34:05 -04:00
Enjia Mai
8b97e7b29f soc: xtensa: split the cavs server and the FW loader
Spilt the cavs server and FW loader, to make the cavstool.py
a pure FW loader and runner as it used to be. The reasons is
try to keep the FW loader won't be affected by the client-
server-based HW service as possible, and more easy to debug.

After splitting them, the service program spawns another
process to run the FW loader. The advantage is no matter when
the FW loader is stuck, the service can detect and stop it,
then continue to next test.

Fixes #47652.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-16 13:34:05 -04:00
Enjia Mai
581fc89084 soc: xtensa: tool: duplicate the cavstool.py to remote-fw-service.py
Copy cavstool.py to remote-fw-service.py in order to track changes
for following splitting work of cavstool.py.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-09-16 13:34:05 -04:00
BJ Chen
e1a2504ac3 soc: riscv: ite: removed redundant definitions
Removed redundant definitions of TRUE/FALSE

Signed-off-by: BJ Chen <bj.chen@ite.com.tw>
2022-09-14 08:31:21 -05:00
Lauren Murphy
85445474f2 boards, dts: fix filenames and dts refs for adsp clock
Changes filenames and DTS references from CAVS clock to
ADSP clock.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-09-14 07:23:08 -04:00
Lauren Murphy
1983a4c50c boards, dts: fix namespace for intel adsp cavs, ace
Fixes namespace for Intel ADSP CAVS and ACE boards.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-09-14 07:23:08 -04:00
Flavio Ceolin
b10c526352 ace: power: Only define d0i3 stack when needed
If the target is built without CONFIG_PM this stack is not
used and does not need to be defined.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-13 08:45:34 -04:00
Kai Vehmanen
1a6d868400 soc: xtensa: tools: do not interfere with IPC in logs-only mode
The tool has caused some hard to detect failures when used
concurrently with the SOF Linux driver to observe logs. This
has been rootcaused to the code to handle and send IPC messages
that has been active even in logs-only mode. In vast majority
of cases, the SOF kernel driver is faster to act and handles
the IPC interrupts. But occasionally the cavstool.py timing was
just right and it managed to ack a message before Linux driver.

Fix the problem by not handling IPC messages when the tool
is run in logs-only mode.

Reported-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-09-13 08:41:32 -04:00
Daniel Leung
164a1aa95e soc: arm/nxp/imx/rt6xx: add bits to support I3C controller
This adds a few bits to the RT6xx SoC code to support the I3C
bus interface on RT600 series.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Flavio Ceolin
d80be13791 intel_adsp: Use vectors offset defined in the hal
Do not hardcode vectors offset, instead get this values from the HAL.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Flavio Ceolin
bfdd5a7517 intel_adsp: ace: Remove un-existent vectors
Interrupt vectors level 5 and 6 are not available in ACE. Just remove
them from the linker script.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Flavio Ceolin
d103eee642 intel_adsp: ace: Fix debug vector address
In ace15_mtpm the debug exception vector address is mapped to INTLEVEL4
and not INTLEVEL 6. This can be checked in the core-isa header:

"""
define XCHAL_DEBUG_VECTOR_VADDR        XCHAL_INTLEVEL4_VECTOR_VADDR
"""

in
modules/hal/xtensa/zephyr/soc/intel_ace15_mtpm/xtensa/config/core-isa.h

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Flavio Ceolin
f37e7cdd3d intel_adsp: Do not use hal namespace
Do not define symbols using xtensa hal namespace.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Flavio Ceolin
b5a0567984 intel_adsp: Rename common file
Symbols defined in cavs-vectors.h is also used by ace, just rename it
to avoid confusion.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:53:12 -04:00
Andriy Gelman
538477f8b8 soc: arm: infineon: 4xxx: Fix UART comms during sleep
In normal operation the clock for peripheral devices is derived from
the PLL clock.
During sleep, the xmc4xxx can switch its system clock source (f_sys)
from the PLL clock to an f_ofi clock. Switching to the f_ofi clock
is the default behaviour which breaks UART comms.

Use the PLL clock source during sleep instead to fix the issue.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-09-09 16:30:36 -04:00
Andriy Gelman
5feae0eafc drivers: pinctrl: Add pinctrl driver for xmc4xxx
Add pinctrl driver for infineon xmc4xxx devices.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-09-09 16:28:41 -04:00
Flavio Ceolin
45465708f0 soc: intel_adsp: Add ACE soc series
ACE15_MTPM is one SOC from the ACE series. Organize
it following cavs pattern.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-09 16:03:59 -04:00
Mahesh Mahadevan
7f86411ed1 soc: mxrt: Add a compile time define for USB driver
Define DATA_SECTION_IS_CACHEABLE=1, this is used by
the SDK USB driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-09 09:44:46 -05:00
Mahesh Mahadevan
9619b02f9b soc: nxp: Add define needed by the SDK USB driver
1. Add USB_STACK_USE_DEDICATED_RAM=1 define that is
   used by the SDK USB driver
2. Delete unused "config USB_DEDICATED_MEMORY"

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-09 09:44:46 -05:00
Mahesh Mahadevan
9966181510 drivers: usb: mcux: Restructure driver for SDK updates
1. Move the defines from usb_dc_mcux.h to usb_device_config.h
   and fsl_os_abstraction.h. These headers are used by
   the SDK USB driver. usb_dc_mcux.h header file is not longer
   needed and hence deleted.
2. Delete the Zephyr implementation of the usb_device_struct
   driver and use the one implemented inside the SDK USB
   driver. This requires updating the references to
   usb_device_struct inside the USB driver
3. Move defines and structures used by the driver
   out of the header file that is included by the SDK and
   into the MCUX USB driver.
4. Use end point defines provided by Zephyr instead of adding
   them locally.
5. Add a Kconfig to set the thread stack size
6. Move code to enable interrupts back to usb_attach function.
   Interrupts should be enabled after the init is successful,
   else we see errors of the ISR getting called before the
   init is complete causing Faults
6. Update west.yml to update the NXP HAL to get the updated
   SDK USB driver.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-09 09:44:46 -05:00
Kumar Gala
318c12d17c timer: remove Kconfig.defconfig* setting of timer drivers
Now that timer drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-09 09:58:48 +00:00
Ederson de Souza
cf6bad78c4 soc/xtensa/intel_adsp: Disable L2 cache at boot based on Kconfig
Instead of deciding based on SoC version, add information to Kconfig and
get it from there on code.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
fcdc9c78e2 soc/xtensa/intel_adsp: Get register address from DTS
Instead of hardcoding it where it's used.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
5f4e2f99f0 soc/xtensa/intel_adsp/cavs: Init HP SRAM based on Kconfig
Instead of deciding to init based on SoC version, define that
information in Kconfig and use it from there.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
9b7375d82a soc/xtensa/intel_adsp/common: Power on cache SRAM banks based on Kconfig
Instead of using SoC version to decide to power on or not, add this
information to Kconfig and get it from there.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
c1dc2683b9 drivers/dai/intel/ssp: Get number of SSP ports from Kconfig
Instead of using SoC versions, define the information about base and
extended ports on Kconfig, and use this information from there.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
79980f250c drivers/dai/intel/ssp: Decide about clock gating based on Kconfig
Instead of using version of the SoC, declare on Kconfig the need for it,
and use this information to decide upon enabling the code or not.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Flavio Ceolin
9f13c1bf95 intel_adsp: ace: Fix wrong type assignment
error: assignment to 'void *' from 'unsigned int' makes pointer from int
|         lpsheader->lp_restore_vector = (uint32_t) &dsp_restore_vector;

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-08 17:54:35 -04:00
Flavio Ceolin
2851815c22 intel_adsp: ace: Add missing header on power.c
MEMCTL_L0IBUF_EN is defined in corebits.h

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-09-08 17:54:35 -04:00
Mateusz Sierszulski
9beb6ab2d6 soc: riscv: telink_b91: Place .init before .vectors section
This commit fixes placing .init sections before .vectors
sections in telink_b91 SoC.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2022-09-08 10:39:31 +02:00
Mateusz Sierszulski
acc39878ff soc: riscv: ae350: Remove redundant .vectors sections
This commit removes doubled .vectors sections in ae350 SoC.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2022-09-08 10:39:31 +02:00
Nikolay Agishev
a56777263e compiler: gcc: add support for tuning mcpu option for ARC targets
ARC processors are highly configurable, so ARC toolchain supports
big amount of mcpu options for all that HW configurations.
As difference in many configurations among the same processor
family usually doesn't affect Zephyr code we don't want
to create Kconfig option for each possible CPU configuration
(just to map Kconfig option to correspondent mcpu value
in 'cmake/gcc-m-cpu.cmake').
Instead we prefer being able to set proper mcpu value
individually for any ARC SoC and using 'cmake/gcc-m-cpu.cmake'
just for reasonable defaults.

To apply SoC-related changes for build-options on early stages of building
'tune_build_ops.cmake' should be created in appropriate SoC directory.
Example:
 ./soc/arc/snps_qemu/tune_build_ops.cmake
File content:
 set(GCC_ARC_TUNED_CPU hs4xd)

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2022-09-08 10:39:21 +02:00
Daniel DeGrasse
04773864a8 drivers: sdhc: add SD host controller driver for LPC SDIF
add SD host controller driver for LPC SDIF IP block, using NXP SDIF
HAL driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-08 10:06:28 +02:00
Andy Ross
b141551cba arch/xtensa: Properly namespace special register API
The Xtensa arch has historically had state/user register accessor
macros with bare three-byte symbol names.  I think this might have
been in the original Cadence-contributed arch integration, but I'm not
sure.  In any case they also exist in the same names in vendor
HAL/toolchain code and are causing collisions.  We never should have
had these symbols exposed in our header.

Put them under an XTENSA_ prefix to decollide.

Signed-off-by: Andy Ross <andyross@google.com>
2022-09-07 20:28:06 -04:00
Nils Larsen
1d7ff08c82 dts: rt11xx: add enet1g peripheral and set up clock
The enet1g peripheral was missing in device tree for nxp rt11xx.
With this commit, the peripheral can be operated like the enet peripheral
with the eth_mcux (kinetis-ethernet) driver at 10/100 Mbit (no gigabit).

Signed-off-by: Nils Larsen <nils.larsen@posteo.de>
2022-09-07 16:50:08 -05:00
Antonio Tessarolo
a0c4dd71e1 soc/imx: imx6sx and imx7 fix pinmux mask (second fix)
According to RM, there are 2 pins that need a 3 bit mask for daisy chain,
changed it accordingly.
(E.g. IOMUXC_UART4_IPP_UART_RXD_MUX_SELECT_INPUT for imx6sx)

Signed-off-by: Antonio Tessarolo <anthonytexdev@gmail.com>
2022-09-07 16:33:44 -05:00
Daniel DeGrasse
95994ca0fb soc: arm: nxp_kinetis: Fix flash MPU configuration for k6x
Fix NXP MPU configuration for k6x flash region. The previous flash MPU
setting was based around the assumption that the user was executing from
the flash region at 0x0000_0000–0x07FF_FFFF, which may not be case if the
user selects to execute from SRAM, such as running from sram_l

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-09-07 16:05:18 -05:00
Andrey Borisovich
c75e6cfcb9 soc: intel_adsp_ace1x: Added IPC/IDC implementation
Added IPC and IDC implementation for Intel ADSP ACE1X SoCs.

Co-authored-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-09-06 15:33:24 -04:00
Gerard Marull-Paretas
be38456279 include: types: remove ulong_t
ulong_t was mainly used in MIPS/RISC-V. Just use "unsigned long".

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-06 18:16:33 +02:00
Gerard Marull-Paretas
22e64fddfd drivers: pwm: gd32: use clock control API
Use the clock control API to enable/get rate of timer clocks.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-06 09:57:25 +02:00
Gerard Marull-Paretas
ca39f657b1 soc: arm,riscv: gigadevice: always enable CLOCK_CONTROL
Clock controller will be used by all drivers, so enable it by default.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-06 09:57:25 +02:00
Gerard Marull-Paretas
4aa31b4526 drivers: clock_control: gd32: initial support
This patch adds a clock control driver for GD32 platforms. It is
important to note that the driver is only able to handle peripheral
clocks, but not "system clocks" (e.g. PLL settings, SYS_CK, etc.).  On
some similar platforms (STM32) this task is embedded in the same clock
driver, performed at init time but with no options to do any
manipulation at runtime via the API calls. The clock control API as-is
is really orthogonal to "system clocks", and it is arguably a bad idea
to embed system clock init code in a clock control driver. It can be
done at SoC level still using Devicetree as a source of hardware
description/initial configuration.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-06 09:57:25 +02:00
Dominik Ermel
25d47f876e soc: esp32s2: Switch from FLASH_AREA_ to FIXED_PARTITION_
The commit switches flash area access from FLASH_AREA_
to FIXED_PARTITION_ macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
bee145a55e soc: esp32: Switch from FLASH_AREA_ to FIXED_PARTITION_
The commit switches flash area access from FLASH_AREA_
to FIXED_PARTITION_ macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
19971fde8e soc: esp32c3: Switch from FLASH_AREA_ to FIXED_PARTITION_
The commit switches flash area access from FLASH_AREA_
to FIXED_PARTITION_ macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Andrzej Kaczmarek
24821826ac soc: renesas_smartbond: Make SoC family Kconfig not selectable
Remove description from SOC_FAMILY_SMARTBOND so it's not directly
selectable. Also fix related board configuration.

Fixes #49916

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2022-09-05 14:50:30 +00:00
Gerard Marull-Paretas
79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Jiafei Pan
97fe92d481 boards: arm64: add imx8mn board support
i.MX8M Nano LPDDR4 EVK board is based on NXP i.MX8M Nano
applications processor, composed of a quad Cortex®-A53 cluster
and a single Cortex®-M47 core.

Zephyr OS is ported to run on the Cortex®-A53 core.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-09-05 10:17:13 +02:00
Jiafei Pan
8b92141878 boards: arm64: imx8mm/p: unify soc name
Replace imx8mm/p with mimx8m/p to unify name with the
other software components.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-09-05 10:17:13 +02:00
Jiafei Pan
93d59266b4 soc: arm64: imx8mm/p: enable pinctrl for soc and boards
Enable pinctrl on imx8mm and imx8mp platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-09-05 10:17:13 +02:00
Jiafei Pan
3b722abf8f boards: arm64: imx8mm/p: unify soc name in configuration item
Used unified name "IMX8M*" to replace "MIMX8M*".

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-09-05 10:17:13 +02:00
Jiafei Pan
234c91d62f soc: arm64: imx8mm/p: update SoC part number and name
To be synced with drivers in hal_nxp.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2022-09-05 10:17:13 +02:00
Mateusz Sierszulski
6c888b2db1 soc: telink_b91: Fix ROM region section overlap
Place vector sections after ROM_START sections.
Also add init.ld script that will prevent overlapping .init sections
in telink_b91 SoC.

Fixes #49036.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2022-09-02 14:19:53 +02:00
Andrey Borisovich
2e04bfdfe0 soc: intel_adsp: Refactored IPC/IDC
Changes to code:
1. Renamed CAVS_IPC API from common/include/cavs_ipc.h to
common/include/intel_adsp_ipc.h. Renamed all API functions and structs -
added "intel_adsp_" prefix.
2. Moved definitions from intel-ipc-regs.h and ace-ipc-regs.g to SOC
specific headers include/<soc_name>/adsp_ipc_regs.h.
3. Added new common intel_adsp_ipc_devtree.h header with new
macros to retrieve IPC and IDC nodes and register addresses.
Put those new macros in code replacing hardcoded values outside of
devicetree.
4. Changed documentation of IDC and renamed IDC register struct
to have common name between all intel adsp socs.
5. Removed excessive docs description on cAVS IPC protocol.

Changes to Devicetree:
1. Renamed in all CAVS boards .dtsi files content in IPC nodes:
   - "cavs_host_ipc" node labels to "adsp_ipc" labels.
   - compatible "intel,cavs-host-ipc" renamed to
     "intel,adsp-host-ipc".
2. Added (previously missing) yaml file for "intel,adsp-host-ipc"
   compatible.
3. Renamed in all CAVS boards .dtsi files content in IDC nodes:
   - "idc" node labels to "adsp_idc" labels.
   - compatible "intel,cavs-idc" renamed to "intel-adsp-idc"
4. Renamed intel,cavs_idc.yaml file to intel,adsp_idc.yaml
   so it is suitable for both CAVS and ACE SoC family.
   Moved it from ipm bindings to ipc bindings where it belongs.

Changes to Kconfig:
1. Renamed existing Kconfig option CONFIG_CAVS_IPC to
   INTEL_ADSP_IPC.
2. For renamed INTEL_ADSP_IPC addded default value based on
   status of the "adsp-ipc" and "adsp-ipc" node.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-09-02 08:18:32 -04:00
Tomasz Leman
90a4e60893 intel: adsp: add restore vector after pg
This patch adds core restore vector. FW will restore core context from
memory and then return to the state it was in before power gaiting.

Adding struct of LPSRAM header. ROM during reboot check this struct in
serching for magic value and restore vector address.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-09-02 10:53:52 +00:00
Tomasz Leman
9d9865d6cc intel: adsp: d0i3 initial implementation
This patch adds initial implementation of dynamic power gating for ace
platforms. The code is limited to enabling PG in HW registers and
disabling all interrupts.

CPU context storing and restoring still needs to be implemented. PG at
this moment will cause FW to halt during reboot.

Patch contains small refractor. Value CORE_POWER_CHECK_DELAY has been
moved to common header so it can be reused in other places.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-09-02 10:53:52 +00:00
Tomasz Leman
98e95d1d68 intel: adsp: power down procedure rename
This patch is renaming primary core power down procedure by removing ACE
prefix. Prefix was added to avoid name conflicts while linking. The
problem is now resolved and name can be revert to the original version.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-09-02 10:53:52 +00:00
Erwan Gouriou
f818b0478d drivers/timer: stm32: Enable lptim driver based on dt status
Similarly to other drivers, use auto generated DT_HAS_<COMPAT> Kconfig
symbol to control use of STM32 lptim driver.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-02 10:41:59 +00:00
Vijay Hiremath
f262b795b8 eSPI: npcx: Enable platform specific Virtual Wire GPIOs
Added code to enable platform specific Virtual Wire GPIOs. With this
change, able to send the USB-C overcurrent Virtual Wire event to
Meterolake SOC.

Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
2022-09-02 10:36:24 +00:00
Sylvio Alves
603bcc3be3 soc: esp32: add timer early init
Update all esp32 socs to include esp_timer early init, which
is part of hal v4.4.1 update.

Update reboot function to meet proper SoC init/deinit peripherals.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-01 21:48:18 +00:00
Sylvio Alves
684a755be4 linker: esp32: add wifi rodata content
Map wifi library rodata content in the linker script.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-01 21:48:18 +00:00
Boon Khai Ng
ef3c0d2fa3 soc: arm64: intel_socfpga: Increase kernel VM size and memory size
This patch is to increase kernel VM size to 1.5MB and
memory size to 2MB to ready for future driver bring up.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
2022-09-01 14:30:59 -04:00
Antonio Tessarolo
d552338637 soc/imx: imx6sx and imx7 fix pinmux mask
According to RM the daisy chain mask should include both bit 0 and 1, not
only bit 0.
Updated bitmask accordingly

Signed-off-by: Antonio Tessarolo <anthonytexdev@gmail.com>
2022-09-01 12:19:00 -05:00
Marcin Niestroj
356960bcb5 ARM: nxp_imx: rt10xx: add XTAL and RTC_XTAL DT clocks
There are two external clocks driving i.MX RT 10xx SoCs: XTAL and
RTC_XTAL. Add "fixed-clock" DT nodes for each. Update also "nxp,imx-ccm"
binding, so that CCM (Clock Control Module) peripheral consumes those
clocks by "xtal" and "rtc-xtal" names.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-09-01 08:11:50 -05:00
Thomas Stranger
a41606ec52 soc: arch: stm32g0: fix strobe init for g070 an g0b0
The STM32G070 and STM32G0B0 Socs don't have USB power delivery support
but the PINs PD0, PD2, PB15, PA8 pins of these still have the same
pull down on boot configuration options as the SOCs with UCPD support.

This commit skips the check if such a peripheral is enabled,
therefore the configuration will always be applied on these SOCs
and the compile error is resolved.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-01 10:28:48 +02:00
Erwan Gouriou
7d9b7d2934 soc: stm32u5: Request header-size 1024 when using imgtool
On STM32U5 series, when an image is build with mcuboot,
image starts at offset 0x400 instead of default 0x200.

This should be taken into account when calling imgtool by using
dedicated option to set header-size value.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-01 10:28:33 +02:00
Kumar Gala
ffb7793a6f soc: esp32: remove Kconfig.defconfig* setting of clock control drivers
Now that clock control drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-01 10:26:30 +02:00
Ederson de Souza
a7e9166574 soc/xtensa/intel_adsp/cavs: Fix XTENSA_CCOUNT_HZ value
The default value is actually 400MHz on cavs15 and cavs18.

Fixes: #49711

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-01 10:25:45 +02:00
Kumar Gala
3712e44fe0 intc: remove Kconfig.defconfig* setting of interrupt controller drivers
Now that interrupt controller drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-01 10:25:36 +02:00
Marcin Niestroj
611326b667 ARM: nxp_imx: rt10xx: remove unused LPUART peripheral header include
This allows to disable UART peripheral driver and still be able to build
correctly (header is not visible when LPUART driver is not enabled).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-09-01 10:25:13 +02:00
Marcin Niestroj
b47e6cc8ce ARM: nxp_imx: rt10xx: get systick freq from 'sysclk' DT nodelabel
So far systick frequency was duplicated in 'sysclk' DT nodelabel's
'clock-frequency' property and in per SoC SYS_CLOCK_HW_CYCLES_PER_SEC
default value. Set the latter based on DT configuration.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-09-01 10:24:55 +02:00
Andrzej Kaczmarek
f19252567c drivers: pinctrl: Add driver for smartbond
This adds pinctrl driver for Renesas SmartBond(tm) MCU family.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2022-08-31 20:32:03 +02:00
Andrzej Kaczmarek
69cddb1a29 soc: Add Renesas SmartBond(tm) DA1469x series SoC
This adds initial support for Renesas SmartBond(tm) DA1469x series SoC.

Initailly only DA14699 is explicitly supported, however this code should
also run on other SoCs in this series since all of them support the same
core features available initially.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Ben Lauret <ben.lauret.wm@renesas.com>
2022-08-31 20:32:03 +02:00
Nils Larsen
a3bae01e74 drivers: sdhc: add clock init for USDHC2-block of NXP i.MX-processors
The missing init is added analog to existing init of USDHC1 block.

Signed-off-by: Nils Larsen <nils.larsen@posteo.de>
2022-08-31 13:21:17 -05:00
Mahesh Mahadevan
ce0b24b95a soc: nxp: Remove the no cache linker script
This has been moved to the NXP HAL layer so that all
SDK NonCacheable symbols get placed in the nocache
region
Also pull in the HAL changes associated with this
change.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-08-31 12:16:30 -05:00
Gerard Marull-Paretas
0cd311c4a1 include: fix files using legacy include paths
Some files were still using the already deprecated include path, fix
this.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-31 06:49:00 -04:00
Adam Wojasinski
a04a451a9f soc: arm: nordic_nrf: Replace deprecated nrfx API
This commit replaces API that became deprecated with the release
of nrfx2.9 - see CHANGELOG in zephyrproject-rtos:hal_nordic repository

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2022-08-31 10:43:14 +02:00
Kumar Gala
4f2cbdb41a crypto: remove Kconfig.defconfig* setting of crypto drivers
Now that crypto drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-30 10:43:12 +00:00
Anas Nashif
4f81568286 intel_adsp: cavs: move CAVS linker script to series
This linker script is CAVS specific, so move it out of common/ and make
it part of the CAVS series.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-29 16:27:51 -04:00
Anas Nashif
f3729445e3 intel_adsp: cavs: push all common kconfigs into series
Consolidate common kconfigs of the CAVS series into the series level and
remove duplication among all supported SoCs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-29 16:27:51 -04:00
Stephanos Ioannidis
5e45769c94 soc: openisa_rv32m1: Update target architecture for GCC 12
This commit updates the custom target architecture type specified for
the `SOC_OPENISA_RV32M1_RI5CY` and `SOC_OPENISA_RV32M1_ZERO_RISCY` SoC
types to be compatible with the GCC 12, which now uses the ISA spec
20191213 by default.

Note that the hack overriding the build system-default `-march` flag
for these SoCs needs to be removed and they should be properly
specified using the ISA extension Kconfigs.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-29 16:57:18 +02:00
Carlo Caione
5fece03d7d riscv: Introduce Zicsr and Zifencei extensions
And enable the new extensions on all the SoCs.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-08-29 16:57:18 +02:00
Kai Vehmanen
8195ea7ea0 logging: Intel ADSP mtrace logging backend
Implements a logging backend implementing the mtrace protocol
to relay log messages over SRAM. This protocol is implemented
by the SOF Linux driver ("mtrace" debugfs interface).

This implementation follows example of the ADSP HDA logger implemented
in commit 6913da9ddd ("logging: cAVS HDA based logger").

Cc: Tom Burdick <thomas.burdick@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-29 10:43:42 +02:00
Kai Vehmanen
45c82c9090 arch/xtensa: adsp: add SRAM window 2 initialization
Define SRAM window 2 details to the headers and open access to host to
the window in bootloader.

Also clarify Kconfig documentation that the semantics of the windows can
vary depending on which host<->DSP communication scheme is in use.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-29 10:43:42 +02:00
Gerard Marull-Paretas
014d831d80 soc: arm/riscv: gigadevice: enable reset controller by default
Similar to pinctrl, almost all device drivers will depend on the reset
controller being available, so default the driver class to y at SoC
level.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-29 10:30:49 +02:00
TOKITA Hiroshi
702d079007 soc: arm: gigadevice: Add support for GD32F407 soc
Add initial support for GD32F407 soc

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-08-29 10:27:15 +02:00
Tom Burdick
3a4864bdd2 logging: adsp hda backend improvements
* Adds a default hook and init function for cavstool.
* Adds an optional padding on flush feature to ensure all data is written.
* Fixes an error in cavstool.py for correctly wrapping the ring buffer.
* The test case now ensures wraps and flushes occur numerous times.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-08-26 21:33:10 -04:00
Anas Nashif
6c7bf09222 intel_adsp: fix leakage of Kconfigs in soc family defconfig
Add missing conditionals and move CAVS related configs into own series
defconfig.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-26 13:17:02 -04:00
Kumar Gala
8d9f9d50f4 dma: remove Kconfig.defconfig* setting of DMA drivers
Now that DMA drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-26 14:27:23 +00:00
Kumar Gala
04adb949d1 soc: xilinx: zynq7000: move to using DT_STRING_UPPER_TOKEN_BY_IDX macro
Replaced hand coded use with DT_STRING_UPPER_TOKEN_BY_IDX.  We should have
introduced the APIs when this was needed since the token values in
devicetree_generated.h should only be accessed via an API macro.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-25 15:00:24 -07:00
Kumar Gala
1314d73104 I2S: remove Kconfig.defconfig* setting of I2S drivers
Now that I2S drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-25 15:03:11 -05:00
Yves Vandervennet
6b66d7f266 flash: nxp: enabling lpc55s36's FMC
This commit enables the SoC's flash memory controller.

 - added lpc55s36 specific code in the NXP MCUX driver
   to take advantage of the SoC's check-before-read
   capability
 - enabled the FMC node in the SoC's dtsi (iap)
 - added the flash controller chosen node to the board's dts

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2022-08-25 10:24:41 -05:00
Gerard Marull-Paretas
056734bea8 soc: riscv: ite: remove pinmux/pinctrl dead code
Remove unused definitions coming from the pre-pinctrl era.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-25 13:55:47 +00:00
Kumar Gala
3f8ba07b90 usb_device: remove Kconfig.defconfig* setting of usb device drivers
Now that usb device drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-25 08:05:54 -05:00
Gerard Marull-Paretas
c50316ecde soc: gigadevice: gd32f403: use DT for SYS_CLOCK_HW_CYCLES_PER_SEC
Set the default value for SYS_CLOCK_HW_CYCLES_PER_SEC based on DT cpu0
clock-frequency property.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Gerard Marull-Paretas
b9f1a0cfe6 soc: gigadevice: gd32f4xx: use DT for SYS_CLOCK_HW_CYCLES_PER_SEC
Set the default value for SYS_CLOCK_HW_CYCLES_PER_SEC based on DT cpu0
clock-frequency property.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 09:09:51 +00:00
Mahesh Mahadevan
32e2e1cb79 dts: lpc55S6x: Add back the USB SRAM region
USB SRAM region was accidentally deleted by an earlier
commit. Rename the memory region used by USB to USB_SRAM instead
of SRAM4. SRAM4 was the wrong name for this region.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-08-24 10:08:40 +02:00
Francois Ramu
3fafe7fdee drivers: dma: new dma peripheral driver for stm32u5
It includes the definition for the DMA peripheral of this type,
present on stm32U5 devices.
A particular DMA_STM32U5 config is selected for that purpose.
The driver is derived from the existing dma_stm32.c
The GPDMA is counting channels (0-15) ; stream offset is 0.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-24 10:05:32 +02:00
Anas Nashif
a04d06514a Revert "intel_adsp: cavs: irq: simplify code"
This reverts commit 2241fb0592.

Fixes #49200

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-23 20:46:10 -04:00
Pieter De Gendt
afc784c2ea soc: mimxrt1064: Add HAL clock header include
The low power mode logic for i.MX RT1064 indirectly includes the HAL
definitions, but this is fragile and depends on specific Kconfig options.

This fixes build issues if for example CONFIG_ARM_MPU is not set.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-08-23 11:39:27 -05:00
Richard Osterloh
258737b2ef soc: arm: stm32f4: Add STM32F423 support
Add support for STM32F423xx devices in dts and soc

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2022-08-23 16:23:55 +02:00
Tim Lin
822c37745e soc: it8xxx2: pull more function into ram code section
Pull more function into ram code section to effectively improve
access speed and performance.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-08-23 10:16:36 +02:00
Tim Lin
cb041d062f ITE: drivers/i2c: Add I2C FIFO mode
Adding I2C FIFO mode can reduce the time between each byte to
improve the I2C bus clock stretching during I2C transaction.
The I2C master supports two 32-bytes FIFOs, channel A and C
are supported now.

I2C FIFO mode of it8xxx2 can support I2C APIs including:
i2c_write(), i2c_read(), i2c_burst_read.

Test:
1. tests\drivers\i2c\i2c_api --> pass
2. Reading 16 bytes of data through i2c_burst_read() can reduce
   0.52ms(2.4ms->1.88ms) compared to the original pio mode when the
   frequency is 100KHz.
3. It is normal to read sensor data through I2C on Nereid's platform.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-08-23 10:16:36 +02:00
Wei-Tai Lee
534d61b48c soc: riscv: andes_v5: use syscon driver instead of accessing dts directly
Access syscon area by driver instead of parsing dts node.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2022-08-23 10:15:50 +02:00
Emilio Benavente
76e8909658 soc: arm: nxp: rt595: Attached clock freq to pmic
Attached the correct clock frequency for
FlexComm15 which connects to the PMIC_I2C peripheral

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2022-08-23 10:13:51 +02:00
Flavio Ceolin
96e988c53a intel_adsp: Do not use xtensa hal with xcc-clang
Do not usu XTENSA_HAL when building with xt-clang, instead uses
the HAL provided together with the toolchain. Just like it is
done with "xcc" toolchain variant.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-08-23 10:13:43 +02:00
Gerard Marull-Paretas
a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Evgeniy Paltsev
ee5b158e3a ARC: boards: QEMU: hs6x: minor description polish
Non-functional polish of Kconfig symbol description and
QEMU_CPU_TYPE_${ARCH} variable (used only for verbose cmake comments)
for HS6x QEMU.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-08-22 10:23:14 +00:00
Evgeniy Paltsev
2adfe5ce65 ARC: boards: ARCv3: add qemu_arc_hs5x board
Add qemu_arc_hs5x - single core ARCv3 32bit HS5x CPU.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-08-22 10:23:14 +00:00
Immo Birnbaum
4a8e766526 soc: xilinx_zynq7000: remove static MMU entries for PS UARTs
Remove the static MMU entries for each available Xilinx PS UART
instance. Those are no longer required now that the PS UART
driver uses the DEVICE_MMIO API for register space mapping.

Signed-off-by: Immo Birnbaum <immo.birnbaum@weidmueller.com>
2022-08-19 20:41:26 +00:00
Evgeniy Paltsev
9b6bc41692 ARC: boards: nsim: don't set ARC_HAS_ACCL_REGS to it's default
Don't setup CONFIG_ARC_HAS_ACCL_REGS option for board explicitly
if we use it default value.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-08-19 12:09:37 +02:00
Adam Zelik
d0bb17ab37 drivers: timer: Increase default user-allocable channel count to 3
Increase the default user-allocable number of RTC channels to meet
the nrf_802154 driver requirements.

Signed-off-by: Adam Zelik <adam.zelik@nordicsemi.no>
2022-08-19 12:08:59 +02:00
Mahesh Mahadevan
2bef8051b2 soc: RT595: Add USB support
1. Update soc.c file to add USB clock setup
2. Add a linker file to move USB transfer
   buffer and controller buffers to USB RAM
3. Update Kconfig's to add USB support
4. Add zephyr_udc0 nodelabel

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-08-19 08:16:18 +00:00
Andy Ross
74cc534758 cmake: Update CONFIG_ASAN support
This had bitrotten a bit, and didn't build as shipped.  Current
libasan implementations want -fsanitize=address passed as a linker
argument too.  We have grown a "lld" linker variant that needs the
same cmake treatment as the "ld" binutils one, but never got it.  But
the various flags had been cut/pasted around to different places, with
slightly different forms.  That's really sort of a mess, as sanitizer
support was only ever support with host toolchains for native_posix
(and AFAICT no one anywhere has made this work on cross compilers in
an embedded environment).  And the separate "gcc" vs. "llvm" layers
were silly, as there has only ever been one API for this feature (from
LLVM, then picked up compatibly by gcc).

Pull this stuff out and just do it in one place in the posix arch for
simplicity.

Also recent sanitizers are trying to add instrumentation padding
around data that we use linker trickery to pack tightly
(c.f. SYS_INIT, STRUCT_SECTION_ITERABLE) and we need a way
("__noasan") to turn that off.  Actually for gcc, it was enough to
just make the records const (already true for most of them, except a
native_posix init struct), but clang apparently isn't smart enough.

Finally, add an ASAN_RECOVER kconfig that enables the use of
"halt_on_error=0" in $ASAN_OPTIONS, which continues execution past the
first error.

Signed-off-by: Andy Ross <andyross@google.com>
2022-08-19 08:30:01 +02:00
Tom Burdick
efc0928570 dma/hda: Use the correct register block size for each IP block
Previous versions were using, incorrectly, the host in/out regblock size
of 40 bytes for all peripherals when in fact the link in/out regblock size
is 20 bytes in size.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-08-18 14:54:57 -05:00
Carlo Caione
710e7f24fe arch: arm: Fix cache-related Kconfig symbols
Switch to the new cache-related Kconfig symbols.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-08-18 11:30:49 +00:00
Enjia Mai
5b5107090d soc: xtensa: tools: add specifying log and request port for cavs client
Besides in a form of {host}:{port} to specifying the port using, we
also support specifying --log-port and --req-port parameters for the
cavstool client.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-16 22:51:53 -07:00
Enjia Mai
a38f533278 soc: xtensa: tools: remove dependency of netifaces package
Because we use INADDR_ANY by default now, specifying a net interface
is no longer needed. Remove it and remove the dependency of the
netifaces python package.

Fixes. #48584

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-16 22:51:53 -07:00
Enjia Mai
6a6a8a9fde soc: xtensa: cavstool server support specifying the port and iface
Make the cavstool service can start with specifying the port
optionally by:

   cavstool.py -s {host}:{log port} --req-port {req port}
OR
   cavstool.py -s {host} --log-port {log port} --req-port {req port}

And we can also specify the network interface instead:

   cavstool.py -i {network iface}

If the server address or the network interface is not specified,
it will use INADDR_ANY by default.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-16 22:51:53 -07:00
Enjia Mai
e33fd73546 soc: xtensa: add support for specifying the service port
Add specifying the port for the remote cavstool remote service.
Ex.

    west flash --remote-host {host}:{port} \
               --pty {host}:{port}

Specify the port is optional when running west.

And another major change is now we have to specify the remote log
service by --pty to make it output the log message immediately.
Previously it will output directly. Why we make this change is
because this is more close to the behavior we use west flash.

Fixes. #46865

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-16 22:51:53 -07:00
Declan Snyder
85359df09b dts: Renamed NXP usdhc in imxrt6xx
The names of these peripherals in the device tree
did not match the Reference Manual for the RT600.

Added alias for usdhc0 to be able to use SDHC test.

Also fixed a typo in a comment referring to USDHC which should have been
about USB.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-08-16 13:43:16 -05:00
Felipe Neves
f01f8f37c0 soc: xtensa: esp32_net: update linker
and adds newlibc fix for esp32_net SoC

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
d94dc98fd6 soc: xtensa: esp32_net: fixes include paths
that were changed with zephyr prefix  after rebasing.
Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
d808fa2c6d samples: drivers: ipm_esp32: add return
when ipm driver initialization fails.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
6ba5b21337 soc: xtensa: esp32_net: update kconfig
specific of soc to make it compatible to the new toolchain.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
382b4144e3 soc: xtensa: esp32: fix app cpu boot
procedure by setting its PC to 0 before reset.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
bb6e656ec0 soc: esp32_net: added esp32_net as an option
to use esp32 core 1 as a separate CPU, also
provide infrastructure to load firmware to
that CPU

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Pieter De Gendt
7ef643385b soc: arm: atmel_sam: sam4s: add support for sam4sa16c
Add soc support for sam4sa16c variant

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-08-16 12:53:50 +02:00
Kumar Gala
9f1f9a4843 peci: remove Kconfig.defconfig* setting of peci drivers
Now that peci drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-16 08:26:11 +00:00
Peter Marheine
4bb16a0247 ITE: enable CPU_HAS_FPU for IT8xxx2
This option was previously enabled only if the M extension was
available, because typical compilers do not provide internal libraries
for RV32IAFC so builds fail at link-time. An appropriately-configured
compiler (such as GCC configured with
`--with-multilib-generator=rv32iac-ilp32--f`) can support such a build
however, so don't lie about the presence of an FPU.

This doesn't affect existing builds because CONFIG_FPU gates use of the
FPU, and is off by default. Enabling CONFIG_FPU will require an
appropriately-configured compiler, possibly also requiring careful
choice of CONFIG_FLOAT_HARD.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-08-16 08:24:54 +00:00
Yves Vandervennet
7a4bb3b27c can: nxp: enabling MCAN on NXP's lpcxpresso55s36
This commit introduces

 - changes on SoC Kconfig and dts files
 - board specific changes (CAN node status, pinctrl and Zephyr alias)

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2022-08-15 13:37:38 -05:00
Kumar Gala
c54086da54 ethernet: remove Kconfig.defconfig* setting of ethernet drivers
Now that ethernet drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-15 14:32:45 +02:00
Flavio Ceolin
b39d897b09 adsp: gpdma: Move gpdma code to driver
DMA controller ownership can be done in the driver
initialization, it does not need to be part of the SoC. It simplify
the code and remove duplicated definitions.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-08-15 08:21:53 +00:00
Aurelien Jarno
72dab5bda9 soc: arm: stm32g0: fix USB-C PD dead battery support
Currently the USB-C PD dead battery support is disabled very early in
the boot process, in order to give access to CC1 and CC2 pins to the
application. However this breaks dead battery support as this instructs
the PD source to stop delivering power.

This commit changes the behavour to keep the internal pull-up in dead
battery pins enable if the UCPD driver is enabled, and the corresponding
UCPD peripheral is also enabled. The code is a bit complex as it aims to
support possible G0 devices with a single UCPD controller (as opposed to
the current one), and also because I haven't found any simple way to
match the UCPD peripheral with the bits in the SYSCFG_CFGR1 register (I
used the same trick with the base address as in the driver).

Given I have not been able to get that working with macros, the check is
done at "runtime", however GCC is smart enough to optimize the code. The
generated code is identical if none of the UCPD peripheral is enabled.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-08-15 08:20:29 +00:00
Immo Birnbaum
86d68e15e9 soc: arm: xilinx_zynq7000: add MMU PTEs for all AXI GPIO IP core instances
add the MMU page table entries for all instances of the Xilinx AXI GPIO
controller IP core. Other than any Zynq-7000 peripheral supported so far,
the existance of 1..n instances of the IP core within the FPGA part of the
SoC is optional. Therefore, other than addressing instances of supported
peripherals using their DT node label as has always been the case so far,
the data for the MMU page table is added using the DT_FOREACH_STATUS_OKAY
macro.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2022-08-15 08:11:35 +00:00
Navin Sankar Velliangiri
3a15dc8c31 soc: arm: nxp: Add LPC51U68 support.
Add initial support for NXP LPC51U68 SOC series

Signed-off-by: Navin Sankar Velliangiri <navin@linumiz.com>
2022-08-12 16:15:42 -05:00
Declan Snyder
310283dad1 soc: rt: CAAM requires cache write-through mode
The use of the RT11xx CAAM requires
cache write-through mode,
otherwise some tests give a compiler warning.

Add to the soc CMake to do this

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-08-12 11:43:37 -05:00
Kumar Gala
2169a09d8a sdhc: remove Kconfig.defconfig* setting of sdhc drivers
Now that sdhc drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:39:15 +02:00
Kumar Gala
19801debc5 peci: ite_it8xxx2: Move interrupt select to driver Kconfig
The driver really should select PECI_INTERRUPT_DRIVEN instead
of doing it in the SoC Kconfig.defconfig.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 14:16:59 +01:00
Gerard Marull-Paretas
ffc90592f8 soc: arm: gigadevice: add initial support for gd32e50x series
Add initial support for GD32E50X series (only GD32507X for now).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-12 14:13:49 +01:00
Anas Nashif
61103d415a intel_adsp: clk: add braces around if/for
add missing curly braces around if/for statements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-12 08:08:32 -04:00
Mahesh Mahadevan
aa061b42b6 soc: nxp_imx: Workaround for SDK macro name variation
The macro INPUTMUX_PINTSEL_COUNT is name INPUTMUX_PINT_SEL_COUNT
on certain SoC's in the SDK.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-08-12 11:34:03 +02:00
Kumar Gala
6124ccfccf drivers: ethernet: provide Kconfig means to disable ethernet drivers
There are several test cases that create fake ethernet devices and
expect the fake device to be the only ethernet device enabled.  Some
tests handle this be explicitly disabling actual ethernet drivers,
but this doesn't scale well.

Change drivers/ethernet/Kconfig to utilze a menuconfig option that
wraps all the drivers.  This allows us for those test cases that
don't want any actual ethernet drivers to disable them with a
simple CONFIG_ETH_DRIVER=n.

Note, the fake ethernet devices utilize CONFIG_ETH_INIT_PRIORITY so
we have it outside of the 'if ETH_DRIVER' block.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 11:33:43 +02:00
Erwan Gouriou
92b100e2df soc: stm32l5: power: Factorize some code pm_state_set
Factorize actions that do not depend on substate_id in pm_state_set.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-11 13:22:58 +01:00
Anas Nashif
2241fb0592 intel_adsp: cavs: irq: simplify code
Put duplicate snippet to get the device into a function.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Anas Nashif
1df711dea9 intel_adsp: remove unused defines IOAPIC_*
Those IOAPIC defines do not belong here..

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Anas Nashif
b1074152b0 intel_adsp: move z_soc_irq_* declarations
Move prototype declaration to include/zephyr/arch/xtensa/irq.h.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Anas Nashif
be2b943cfb intel_adsp: move cavs irq code under cavs/
This code is not common and is CAVS specific, so move it under cavs/
series.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Anas Nashif
9feaced96f intel_adsp: move power initialization to a common place
Make all series consistent with regard to where code is located and put
the power init code in power.c alongside other power related code.
Reduce soc.c per series to an empty file that can be removed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Anas Nashif
fc97a71c4d intel_adsp: use one soc_init for all series
initializing the SoC is the same across series, so put everything in one
place in the common code base.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Anas Nashif
31e7472f14 intel_adsp: unify boot_core0 across SoC series
We have the same boot flow, unify it and put the code in one place that
is used by all series.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Anas Nashif
663431077d intel_adsp: cavs: do not check for ace here
This is never built for ace, so remove the ifdef.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Anas Nashif
020bf56dc8 intel_adsp: acev1x: move sram init code into own file
Just to be consistent with other ADSP series.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-10 14:30:45 -04:00
Kumar Gala
ff2a1212bf counter: remove Kconfig.defconfig* setting of counter drivers
Now that counter drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-10 10:46:55 -05:00
TOKITA Hiroshi
dcfb98a182 soc: riscv: gd32vf103: Correct the missing machine timer name change
machine-timer node name changed in #48429.
but Kcondif.defconfig.gd32vf103 not followed it.
It makes misconfigures the RISCV_MACHINE_TIMER_SYSTEM_CLOCK_DIVIDER.
So the machine-timer did not count the actual time.

Correcting node name to fix this problem.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-08-10 13:08:27 +02:00
Attie Grande
df8db2d3f6 soc: atmel_sam0: fix include path for SAMR35
Add the "zephyr/" prefix...

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-08-10 12:00:11 +02:00
Gerard Marull-Paretas
b74a22924e net: lib: config: remove NET_CONFIG_IEEE802154_DEV_NAME
Remove NET_CONFIG_IEEE802154_DEV_NAME in favor of DT based choice using
zephyr,ieee802154.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Kumar Gala
236484456f drivers: kscan: Remove unnecessary Kconfig settings
Have the kscan device enabled in devicetree will now get the driver
enabled by default when CONFIG_KSCAN=y is set.  So we can remove
driver enabling Kconfig values in various Kconfig.defconfig files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-09 23:37:46 -05:00
Kumar Gala
f2fa572561 entropy: remove Kconfig.defconfig* setting of entropy drivers
Now that entropy drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-09 23:37:33 -05:00
Henrik Brix Andersen
b6376aed9d soc: arm: st: check if clock device is ready before accessing
Add check for device_is_ready() before accessing clock control devices.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-09 17:16:16 +02:00
Kumar Gala
63769bd1c1 drivers: display: Remove unnecessary Kconfig settings
Have the display enabled in devicetree will now get the driver
enabled by default when CONFIG_DISPLAY=y is set.  So we can remove
setting driver enabling Kconfig values in various .conf and
defconfig files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-09 12:27:44 +02:00
Kumar Gala
e31cba26be flash: remove Kconfig.defconfig* setting of flash drivers
Now that flash drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-09 12:27:28 +02:00
Kumar Gala
8429167e1c soc: nordic_nrf: drop IPM support
Only support mailbox as that is the preferred solution on NRF.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-08 10:42:32 +02:00
Gerard Marull-Paretas
61361e870b kconfig: remove redundant IEEE 802.15.4 defaults or selections
All IEEE 802.15.4 drivers are now automatically enabled if they are
'okay' in DT and all of its dependencies are 'y', including
CONFIG_IEEE802154. This means individual driver enablement is not
necessary anymore in Kconfig.defconfig files or samples/tests. Boards
need to still make sure any dependencies are enabled, e.g. SPI bus in
some cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:56:47 +02:00
Erwan Gouriou
e12d103a80 soc: stm32: Remove direct COUNTER_RTC_STM32 to COUNTER dependency
COUNTER_RTC_STM32 used to be enabled directly based on COUNTER status.
This should not be the case anymore as we should first check
DT_HAS_ST_STM32_RTC_ENABLED status (which is already done in
drivers/counter/Kconfig.stm32_rtc).

Remove these 3 lines that are not correct anymore.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-05 11:42:33 +01:00
Henri Xavier
3ba0cb19ea soc/arm64: Do not allow userspace to directly access peripherals
In some arm64 boards, MMU regions are set so userspace can access all
peripherals (MT_P_RW_U_RW), including the GIC.
This seems like a mistake, which has been copy/pasted in some boards.

Change this to no userspace access by default (MT_P_RW_U_NA),
like the other boards.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-08-05 06:28:57 +01:00
Jay Vasanth
ccb77af3b7 eeprom: Add Microchip eeprom driver skeleton
Prepare for Microchip eeprom driver addition. Update
dtsi, kconfig, cmake and relevant soc files for eeprom
driver addition.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-08-04 18:36:18 +02:00
Yves Vandervennet
cd7dbe92b1 soc: arm: nxp_lpc: lpc55xxx: disabling LPC55S36 IAP support
This is temporary until support has been enabled. lpc55s36's IAP controller
is different and does not match previous implementations.
The Zephyr driver uses a data structure matching the IAP controller to
implement a feature that should normally come out of the ROM.

Since IAP support is not in yet, disabling the option in the SoC's Kconfig
and disabling the node in the device tree is the proper way to go forward.

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2022-08-04 10:47:16 -05:00
Neil Chen
5642d4f805 soc: arm: nxp_lpc: lpc55xxx: LPC55S36: add device support
- Add soc information for LPC55S36

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2022-08-04 10:47:16 -05:00
Daniel DeGrasse
f7f94dd367 drivers: pinctrl: update lpc iocon to support LPC55s3x
LPC55s3x family has an additional analog mode bit available. Update
IOCON binding and IOCON driver to support setting this bit via a pin
control property.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-04 10:47:16 -05:00
Kumar Gala
27f28f2822 can: remove Kconfig.defconfig setting of CAN drivers
Now that CAN drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the CAN.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-04 13:47:52 +02:00
Gerard Marull-Paretas
736a1a9113 soc: riscv: remove usage of SOC_ERET
All SOC_ERET definitions expand to the mret instruction (used to return
from a trap: exception or interruption). The 'eret' instruction existed
in previous RISC-V privileged specs, but it doesn't seem to be used in
Zephyr (ref. RISC-V Privileged Architectures 3.2.2).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:44:48 +02:00
Gerard Marull-Paretas
2df965f490 drivers: ieee802154: nrf5: make driver DT-based
Use Devicetree to describe the radio and IEEE 802.15.4. This allows to
remove usage of IEEE802154_NRF5_DRV_NAME in preparation for the
removal of NET_CONFIG_IEEE802154_DEV_NAME.

All SoC files have been updated with the addition of an ieee802154 node
(disabled and only on those SoCs that define ieee802154-supported. The
peripheral has been enabled in the nRF52840DK board (used for testing
ieee802154).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas
7d5272db62 drivers: ieee802154: kw41z: make driver DT-based
Use Devicetree to describe the radio and IEEE 802.15.4. This allows to
remove usage of IEEE802154_KW41Z_DRV_NAME in preparation for the removal
of NET_CONFIG_IEEE802154_DEV_NAME.

KW41Z files have been updated with the addition of radio and an
ieee802154 nodes The peripheral has been enabled in the frdm_k41z board
(used for testing ieee802154).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Gerard Marull-Paretas
fa16891625 drivers: ieee802154: cc13x2_cc26x2: make driver DT-based
Use Devicetree to describe the radio and IEEE 802.15.4. This allows to
remove usage of IEEE802154_CC13XX_CC26XX_DRV_NAME in preparation for the
removal of NET_CONFIG_IEEE802154_DEV_NAME. All boards used in testing
have been updated to enable the peripheral in DT as well.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Kumar Gala
6298b27725 watchdog: remove Kconfig.defconfig setting of watchdog drivers
Now that watchdog drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
watchdog and not respect the devicetree state of the watchdog.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 18:30:17 -05:00
Kumar Gala
b5b2b627b5 dac: remove Kconfig.defconfig setting of DAC drivers
Now that DAC drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the DAC.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 18:45:23 +02:00
Tomasz Leman
7af70d9609 soc: ace_v1x: add power control registers
Those registers controls the power domain operations for DSP FW.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-08-03 11:47:27 -04:00
Gerard Marull-Paretas
83d73f6126 soc: arc: remove unused <soc.h> files
The ARC <soc.h> headers are no longer used, so they can be removed.
Refer to the previous commits for more context.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
1b142a5c55 soc: arc: snps_emsk: fix include list
Include only what is needed in soc_config.c

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
ac3697fe74 soc: arc: snps_emsk: remove empty soc.c
soc.c was empty, so just delete it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
2bee9b3fbb soc: arc: snps_nsim: fix include list
Include only what is needed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
dffbef0aff soc: arc: snps_nsim: s/soc.c/smp.c and compile only if CONFIG_SMP=y
The soc.c source only contains code relevant to SMP, and in fact, it is
a file that is left empty when pre-processed from a compiler perspective
if CONFIG_SMP=n. This change renames it to smp.c to make it clear it
contains SMP related code, and, it compiles it conditionally to
CONFIG_SMP=y.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
b2a1eeb6ac soc: arc: define ICI in DT
ICI (Inter-Core Interrupt Unit) interrupts and priorities were hardcoded
in C files. This patch moves this information to Devicetree and updates
code to make use of it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
60d3e487a3 soc: arc: snps_emsk/nsim: remove unused definitions
Remove definitions not used in any C unit throughout the tree.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
754c022fa2 soc: arc: snps_arc_iot: define sysconf in DT
sysconf base address was hardcoded in <soc.h>. Create a new compatible
and define it in Devicetree, where hardware needs to be described.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
36ac01780e soc: arc: snps_arc_iot: delete unused soc_irq.h file
The definitions provided by this file seem to be unused throughout the
tree, so remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
ef502746c9 soc: arc: snps_emsdp/k: remove unused SYSCLK_DEFAULT_IOSC_HZ
The definition is not used, so remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
80457bdc84 soc: arc: snps_arc_iot: move SYSCLK_DEFAULT_IOSC_HZ to sysconf
sysconf source file is the only user of such definition, so move it
there.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
5f40a9f40f soc: arc: synopsys: move secure timer0 definition to DT
Use Devicetree to describe secure timer0 instead of hardcoding values in
<soc.h>.

DT files have been structured to match the following requirements: In
case of sectimer0 - it's should be only enabled for:

- emsdp_em7d_esp.dts
- em_starterkit_em7d.dts
- nsim_sem_mpu_stack_guard.dts
- nsim_sem.dts

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
44250fe3d3 soc: arch: synopsys: move timer0/1 IRQ information to DT
timer0/1 IRQ information was hardcoded in soc.h, however, Devicetree is
nowadays a better place to describe hardware. Note that I have followed
existing upstream Linux code to do these changes.

Ref.
- https://elixir.bootlin.com/linux/latest/source/arch/arc/boot/dts/
  hsdk.dts
- https://elixir.bootlin.com/linux/latest/source/Documentation/
  devicetree/bindings/timer/snps,arc-timer.txt

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
3f12689f4e soc: arc: snps_arch_hdsk: fix include list
Include what is necessary: <zephyr/init.h> and a platform specific
architecture header.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Gerard Marull-Paretas
82ce3e566d soc: arc: snps_arch_hdsk: remove unused pinmux definitions
Pinmux definitions were not used, so remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Kevin Wang
25b4bd186d soc: riscv: riscv-privilege: andes_v5: ae350: MP_NUM_CPUS default value
Overlay zephyr kernel MP_NUM_CPUS from 1-8 (default 1-4)
for supporting 8 cpu cores.

Signed-off-by: Kevin Wang <yunkai@andestech.com>
2022-08-03 05:00:14 +01:00
Jimmy Zheng
4d00ee0738 soc: riscv: riscv-privilege: andes_v5: set default tick for XIP
Andes fpga base AE350(60M Hz) may fail in XIP because it causes hundreds
of cycles to fetch instructions, decreased tick rate to 100 if CONFIG_XIP.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2022-08-03 04:59:34 +01:00
Jimmy Zheng
47b6d33fd2 soc: riscv: riscv-privilege: andes_v5: added SMU register macros
Added Wake-Up Reset Status Register macros for hwinfo driver usage.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2022-08-03 04:59:34 +01:00
Jimmy Zheng
97fa8407cf soc: riscv: riscv-privilege: andes_v5: reworked Andes L2 cache
Detect the L2 cache at runtime and removed unused Kconfig
CONFIG_SOC_ANDES_V5_L2_CACHE.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2022-08-03 04:59:34 +01:00
Jimmy Zheng
500fafa921 soc: riscv: riscv-privilege: andes_v5: refined Andes PMA
Refined return value of pma_init() and skip PMA configuration if the region
size is 0.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2022-08-03 04:59:34 +01:00
Kumar Gala
7e8a312c6b adc: remove Kconfig.defconfig setting of ADC drivers
Now that ADC drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the ADC.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-02 15:51:43 -05:00
Fabio Baltieri
24d09d363c include: fix the remaining legacy #include paths
Add the "zephyr/" prefix to various #include statements that are
preventing the CI form running with LEGACY_INCLUDE_PATH=n.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Gerard Marull-Paretas
741bfedeab soc: riscv: mpfs: remove unused definition
RISCV_MTIMECMP_BY_HART (machine timer related) is not used, so remove
it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-02 09:12:31 +02:00
Gerard Marull-Paretas
418ad7d443 soc: riscv: remove unused RISCV_MTIME(CMP)_BASE and IRQ definitions
The RISC-V machine timer base addresses and IRQ are now obtained from
Devicetree.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-02 09:12:31 +02:00
Gerard Marull-Paretas
6de9fcf315 soc: riscv: gd32vf103: use nuclei,systimer compatible
After some analysis I found out that there's no machine timer provided
by the "riscv" vendor. There are some specs for the mtime/mtimecmp
registers (this is why we can have a single driver), but the actual
register layout or implementations differ amongst vendors. GD32 uses the
Nuclei implementation, named "system timer" in their documentation. This
patch aligns with vendor specs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-02 09:12:31 +02:00
Kumar Gala
84575930f5 i2c: Remove unncessary HAS_I2C_DW Kconfig symbol
The HAS_I2C_DW was to limit Kconfig visibility to only platforms
that utilize the I2C DW IP.  The Kconfig for I2C_DW depends on
DT_HAS_SNPS_DESIGNWARE_I2C_ENABLED which will cause the same
visbility limitation to only platforms that have I2C DW devicetree
nodes.  Thus we can remove HAS_I2C_DW and its references.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-01 18:01:44 +02:00
Kumar Gala
5c57a36f9d i2c: remove Kconfig.defconfig setting of I2C drivers
Now that I2C drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the I2C.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-01 18:01:44 +02:00
Tomasz Leman
5ee5af6d52 soc: ace_v1x: stoping WDT during transiotion to D3
During transition into D3 state, watchdog timer have to be paused. FW can
resume it when core is re-enabled.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-08-01 07:22:32 -04:00
Jay Vasanth
3e0f738cb2 mec15xx: pinctrl for both mec15xx and mec17xx
Changes to compile pinctrl driver for both mec15xx
and mec17xx. Also add mec15xx pinctrl dtsi

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-08-01 10:28:23 +02:00
Kumar Gala
5b9e0b615c clock_control: remove Kconfig.defconfig setting of clk control drivers
Now that clock control drivers are enabled based on devicetree we
need to remove any cases of them getting enabled by Kconfig.defconfig*
files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a sensor and not
respect the devicetree state of the clock control.  Additionally we
can get problems with prj.conf/defconfig getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 14:12:12 +02:00
Sylvio Alves
4120601a6c soc: esp32: allow wifi and net stack into spiram
This PR adds a KConfig option that allows moving
all .noinit content related to wifi a net stack into external
ram. This free dram space to application.

Linker script files are also modified so that the content
are mapped into external ram.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-07-29 14:11:00 +02:00
Jun Lin
ec4f700202 driver: PECI: npcx: add driver support for Nuvoton npcx family
This commit add the PECI driver for Nuvoton npcx family to support PECI
APIs.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-07-29 14:09:17 +02:00
Gerard Marull-Paretas
1be9af6794 soc: riscv: remove unused RISCV_RAM_BASE|SIZE definitions
The definitions are not used anywhere in Zephyr nor in modules, so
delete them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-28 20:51:31 +02:00
Gerard Marull-Paretas
98e5df0204 soc: riscv: sifive-freedom: remove unused 'always on domain' defines
The definitions under "Always ON Domain" are not used, remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-28 20:50:57 +02:00
Gerard Marull-Paretas
307415664d soc: riscv: sifive-freedom: remove unused pinmux definitions
These definitions are now part of the pinctrl DT headers, remove them
from soc.h

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-28 20:50:57 +02:00
Gerard Marull-Paretas
a0bdb489a2 soc: riscv: miv: remove unused PRCI base address
Base address for PRCI is not used anywhere in the tree for this
platform. Again, if ever used, this needs to come from DT.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-28 20:50:57 +02:00
Gerard Marull-Paretas
5fb43647dd soc: riscv: miv: remove unused GPIO definitions
There is no GPIO driver for such platform, and if it existed, all this
information should be provided in Devicetree (as other platform drivers
like UART do).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-28 20:50:57 +02:00
Gerard Marull-Paretas
a58035fbd1 soc: riscv: gd32vf103: remove unnecessary content from soc.h
- zephyr/toolchain.h is not needed
- gd32vf103.h is not needed (no CMSIS here)
- undefinition not needed, HAL is now patched with a prefix for this
  definition.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-28 20:50:57 +02:00
Gerard Marull-Paretas
93ba241b57 soc: riscv: gd32vf103: add missing include
SystemInit is declared in gd32vf103.h. Include it instead of relying on
indirect soc.h includes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-28 20:50:57 +02:00
Anas Nashif
02cfba9461 intel_adsp: ace: move tts headers to shim header
Move TTS header into adsp_shim and rename them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-28 14:11:23 -04:00
Anas Nashif
5e25ce66cf intel_adsp: move ace headers to include/
Put ace headers alongside other headers. The contents of ace_v1x-regs.h
will be moved around to new headers being added across all series and
SoCs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-28 14:11:23 -04:00
Anas Nashif
728d8eb2c0 intel_adsp: rename clock registers due to possible conflict
SOF using the same defines and in some cases generating conflicts.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-28 14:11:23 -04:00
Ederson de Souza
49d1583e2a soc/xtensa/intel_adsp: Enable WOVCRO based on platform support
Instead of enabling WOVCRO clock based on the SOC, use a configuration
to indicate support, so that each platform can specify if WOVCRO is
supported or not.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-07-28 11:04:05 -04:00
Ederson de Souza
28e07bf1ba soc/xtensa/intel_adsp: Fix clock selection when WOVCRO isn't available
If test for WOVCRO clock fails, code shouldn't just choose WOVCRO clock
as the lowest frequency one, but LPRO instead.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-07-28 11:04:05 -04:00
Flavio Ceolin
580f370867 intel_adsp: Rename multiprocessing cavs file
For intel adsp platforms we have a common multiprocessing.c file and
then another multiprocessing.c for ace and multiprocessing_cavs.c for
cavs. Rename the cavs specific implementation to follow the convention.
There is not need to "cavs" suffix since the file is already inside its
specific directory.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-27 17:50:52 -04:00
Flavio Ceolin
24f2fa96dc intel_adsp: Move cavs common files to a subdir
Inside the common directory there were files that are CAVS specific and
are not used by ACE_V1X. Lets create a subdir called cavs inside the
common to put files that are common for only cavs plaftorms.

Note that there are still remaining code that in the common folder that
are using cavs namespace like "cavs_ipc_*" that may need some additional
work.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-27 17:50:52 -04:00
Carlo Caione
0d3c70ea97 arch: riscv: Remove useless functions declaration
We already have riscv_clic.h and riscv_plic.h, no need to have the same
declarations in soc_common.h as well.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-27 18:44:35 +02:00
Kumar Gala
65e1c6fb1e pwm: remove Kconfig.defconfig setting of PWM drivers
Now that PWM drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the PWM.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-27 18:43:54 +02:00
Kumar Gala
960f2f1a37 spi: remove Kconfig.defconfig setting of SPI drivers
Now that SPI drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the SPI.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-27 09:49:00 +02:00
Kumar Gala
9a501e0922 serial: remove Kconfig.defconfig setting of serial drivers
Now that serial drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the serial.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 09:29:24 -05:00
Kumar Gala
600d749cf3 gpio: remove Kconfig.defconfig setting of GPIO drivers
Now that gpio drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the GPIO.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 08:49:38 +02:00
Anas Nashif
43371d0414 intel_adsp: move cavs to be a series
Intel ADSP CAVS is now a proper series with all CAVS SoCs running under
it. This will give us to Intel ADSP series:
- CAVS
- ACE v1.x

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-25 16:50:24 -04:00
Anas Nashif
e33bb9b6c5 drivers: dmic: remove old intel dmic driver
We now have another intel dmic driver under DAI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-25 13:14:49 -04:00
Flavio Ceolin
b1a968fca9 intel_adsp: ace: Add variables used in coredump
In order to coredump dump the ram memory, it is necessary that we define
in the linker scripts two variable to indicate the start and the end of
the ram area. Adding these variables to ace linker script.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-25 12:42:42 -04:00
Flavio Ceolin
7cbe74adb1 intel_adsp: cavs: Add variables used in coredump
In order to coredump dump the ram memory, it is necessary that we define
in the linker scripts two variable to indicate the start and the end of
the ram area. Adding these variables to cavs linker script.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-25 12:42:42 -04:00
Flavio Ceolin
f90082209d intel_adsp: Remove unused header
cavs/version.h was never used by Zephyr, it was supposed to be needed by
SoF. This no longer seems to be the case, just removing it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-25 12:41:56 -04:00
HaiLong Yang
ef1ad14c78 soc: arm: fix gd32f4xx series config
This add soc check for series config, also fix a miss spelling issue.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-25 15:14:21 +02:00
Kumar Gala
df0c6d4c43 sensors: remove defconfig setting of sensor drivers
Now that sensor drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the sensor.
Additionally we can get problems with prj.conf/defconfig
as well getting incorrectly overridden.

Fixes #48198

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-25 09:40:14 +02:00
Mulin Chao
8cf0feb3e2 power: npcx: add leakage-io support for better power consumption
This CL adds a DT node, 'power_leakage_io', which property,
'leak-gpios', contains GPIOs that have leakage current. In oerder to get
better power consumption, npcx power driver will disable the connections
between these io pads and input buffers before entering deep sleep.
Then, restore the connections after ec wakes up.

The users can overwrite this property at board DT file. Here is an
example:

    &power_leakage_io {
        leak-gpios = <&gpio0 0 0
                      &gpiob 1 0>;
    };

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-07-22 10:33:03 +02:00
Mulin Chao
9267655f42 driver: gpio: npcx: Support GPIO_VOLTAGE_1P8 flag
This CL configures low-voltage (1.8V) detection via GPIO driver with
GPIO_VOLTAGE_1P8 flag. It also adds support for this flag in
pin_get_config() function.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-07-22 10:33:03 +02:00
Mulin Chao
a5fee4c6de driver: scfg: npcx: cleanup low-voltage detection configuration
Cleanup npcx low-voltage (1.8V) detection configuration. It removes
unused soc utilities, macros, and DT node. We will configure this
feature by GPIO driver with GPIO_VOLTAGE_1P8 flag later.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-07-22 10:33:03 +02:00
Ruibin Chang
32906a18ec ITE soc/it8xxx2: disable unused integrated cc module
ITE EC chip it81202 and it81302 both have embedded integrated
pd module (support two usbpd ports), this is different from
standalone TCPC. To prevent cc pins leakage, we disable not
active ITE USBPD port cc modules, then cc pins can be used
as gpio if needed.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-07-22 10:32:12 +02:00
Anas Nashif
987693c270 intel_adsp: rename obsolete adsp timer config
Use INTEL_ADSP_TIMER instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
2af59e7d44 intel_adsp: unify timer registers and simplify timer driver
Declare clock control in the shim header per SoC and remove ifdeffry
from the driver simplifiying it and making it ready for the next
platform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
356779448c intel_adsp: minor header include reorg/fixups
Minor reorg of headers and when they get included.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
9a28930ece intel_adsp: rename power_init_mtl
No need for the suffix here, this is built only for Meteorlake anyways.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
1f1b10eb26 intel_adsp: move register definition from soc.c to shim header
Declare those register in the adsp_shim header instead of the code
applying ifdefs that limit the scope to only specific SoCs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
ad32077108 intel_adsp: move l1 memory definition to header
Move register definition to SoC header instead of hardcoding it where it
is being used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
01438a1998 intel_adsp: move imr configs to headers
Move those defines and values back to headers. Kconfig is not a good
place for this, later this should move to DTS.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
af3d5331a1 intel-adsp: migrate cavs-mem.h to adsp_memory.h
Move header and make it soc specific.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
3586227a7c intel_adsp: adsp_shim.h: run through clang-format
Run the files through clang-format to clean things up a bit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
453f37c3d9 intel_adsp: shim: cleanup shim header
Remove conditional code and SOC specific defines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
423264b96b intel_adsp: make shim header soc specific
using once single header to support multiple socs and product
generations is error prone and not easily maintained.

Over time we have been adding conditional code in headers and extending
structs  to support new HW features which becomes a problem.

Goal is to keep platform headers in sync with hardware specification and
allow of introduction of new platforms and hardware features by just
introducing a new SoC with its own set of headers.

This is now just a copy of existing cavs-shim.h with slight changes,
goal is to clean this up long term and sync with hardware datasheets and
align on naming as well.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
51cd0dd682 intel_adsp: move soc headers into include/
Move headers into the include/ folder per soc and rename fw_defs.h to
adsp_memory to align with SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
f72cdeb896 intel_adsp: common: remove unnecessary ifndefs
cavs15 has its own boot path, so no need to check for it in code it does
not run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif
2f83adae93 intel_adsp: common: build soc.c only for CAVS
build soc.c only for platforms that can use it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Kumar Gala
2d88414c4e drivers: serial: pl011: Remove unused Kconfig symbols
The driver has be DT_INST based for a while so the Kconfig
symbols CONFIG_UART_PL011_PORT0<n> aren't used.  So lets
remove them.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 16:40:28 +00:00
Simon Hein
c29d0a3c4f soc: arm: comply to coding guidelines MISRA C:2012 Rule 14.4
MISRA C:2012 Rule 14.4 (The controlling expression of an if statement
and the controlling expression of an iteration-statement shall have
essentially Boolean type.)

Use `do { ... } while (false)' instead of `do { ... } while (0)'.

This commit is a subset of the original commit:
5d02614e34a86b549c7707d3d9f0984bc3a5f22a

Signed-off-by: Simon Hein <SHein@baumer.com>
2022-07-21 10:31:00 +02:00
Tom Burdick
ac84039060 tests: intel_adsp: Silence the hda tests
Uses a macro with a define flag to enable register dumps on the DSP
side. On the python side a simple booling flag.

The default disabled both debug flags and makes the tests
considerably quieter.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-07-19 16:10:47 -04:00
Tomislav Milkovic
0fe2c1fe90 everywhere: Fix legacy include paths
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths

Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
2022-07-18 16:16:47 +00:00
Bernard Lee
5658e9e30d soc: arm: nordic_nrf: include linker sections header
Include linker sections header to move z_arm_platform_init to text
section. It is now is placed in the TEXT section.

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
2022-07-18 16:11:50 +00:00
Attie Grande
7ded40de84 soc: atmel_sam0: The ADC reference is locked while enabled for SAML21
For SAML21-based parts, the REFCTRL register is locked while the ADC is
enabled. Permit some parts to declare that they need the ADC to be
disabled before modifying REFCTRL.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Attie Grande
a10b8cb1c0 soc: atmel_sam0: Add support for SAMR34 and SAMR35 parts
Implement support for SAMR34 and SAMR35 parts, tested on a SAMR34
Xplained Pro dev board. Confirmed operational peripherals: UART, GPIO,
PWM, ADC.

NOTE: The SAMR34 datasheet lists NVIC line 20 for the ADC's interrupt,
but the SAML21 datasheet gives line 22. It appears that the SAMR34 sheet
is incorrect (the ADC doesn't function with line 20), and as such, I have
also omitted the adjustments for TC4 and AC...

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Attie Grande
64e4200d94 soc: atmel_sam0: Add support for SAML21 parts
Implement support for SAML21 parts, tested on a SAML21 Xplained Pro dev
board. Confirmed operational peripherals: UART, GPIO, PWM, ADC.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Enjia Mai
9b8726c101 soc: xtensa: include linker/section.h to fix the build error
Some tests was built failed due to cannot find the __imr macro:
Try to fix it by including the linker/section.h in soc.h.

Fixes #47830.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-16 05:53:45 -04:00
Mulin Chao
24fb705cdd npcx: scfg: psl: cleanup unused functions and DT files
Clean up unused psl functions in scfg.c, unused DT macros, unused psl DT
nodes and related yaml files. Currently, PSL pad configurations are made
by pinctrl mechanism. Please refer
https://issuetracker.google.com/234861079 for more detail.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-07-15 10:00:15 +02:00
Johann Fischer
3c971307dc arch/kernel/soc/samples: use unsigned int for irq_lock()
irq_lock() returns an unsigned integer key.
Generated by spatch using semantic patch
scripts/coccinelle/irq_lock.cocci

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-14 14:37:13 -05:00
Tom Burdick
c225cf3b8a dma: HDA rename prefix from cAVS to ADSP
HDA is a common IP used across the entire ADSP line and deserves
a name respecting that alongside similiar IP drivers such as the
ADSP GPDMA driver.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-07-14 17:53:46 +00:00
Anas Nashif
76f990af8a intel_adsp: move attribute macros to dedicated linker header
Those belong where other attribute macros are usually defined. They are
not xtensa or ADSP specific and are used across Intel SoCs on all
architectures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif
680df57582 intel_adsp: add a header for soc specific defines
Instead of ifdeffing on SOCs and missing things along the way, maintain
platform definitions that are different among SoCs in one single file
per SoC and use data from that file critical spots.

In this case, we were checking for CAVS25, setting one value where
everything else was set to 0, so new SoC like ACE was getting 0 as well,
although it has the same value as TGL.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif
e328508a66 intel_adsp: ace: run soc.c through clang-format
Just a minor cleanup.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif
fc67224864 intel_adsp: ace: simplify and cleanup sram init functions
Remove redundant code and simplify SRAM init functions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif
332d9fb7d1 intel_adsp: ace: rename inx -> idx
Original author probably meant inx for index, use idx instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Anas Nashif
f82b271b1f intel_adsp: ace: convert delay count into a define
The delay count was converted to a define.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-13 11:15:46 -04:00
Mulin Chao
3468a02f72 npcx: scfg: pinmux: cleanup unused functions and macro
Clean up unused pinmux function 'npcx_pinctrl_mux_configure()' and
related 'NPCX_DT_IO_ALT*' macro functions.

Please refer https://issuetracker.google.com/234861079 for more detail.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-07-13 10:38:49 +02:00
Tim Lin
04c6d7569f ITE: drivers/i2c: Add command queue mode
Adding command queue mode can reduce the time between each byte to
improve the I2C bus clock stretching during I2C transaction.

I2C command queue mode of it8xxx2 can support I2C APIs including:
i2c_write(), i2c_read(), i2c_burst_read.

Test:
1. tests\drivers\i2c\i2c_api --> pass
2. Reading 16 bytes of data through i2c_burst_read() can reduce
   0.72ms(2.54ms->1.82ms) compared to the original pio mode when the
   frequency is 100KHz.
3. krabby platform can boot normally.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-07-13 10:15:32 +02:00
Jay Vasanth
7c88336171 soc: device_power: MEC172x: fix incorrect for loop check
fix incorrect iteration condition in MEC172x device_power.c

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-07-12 09:24:30 -05:00
Jeppe Odgaard
af6f975391 soc: select HAS_MCUX_SRC for MIMXRT1052
Select missing HAS_MCUX_SRC Kconfig symbol for MIMXRT1052,
that allows using NXP i.MX mcux SRC hwinfo driver.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/47025

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2022-07-12 10:17:38 +02:00
Pieter De Gendt
3cde5a0aaa soc: mimxrt1064: Remove unused low power header include
The included header file wasn't used.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-11 17:51:18 -05:00
Pieter De Gendt
3556bf6fa9 soc: mimxrt1064: Fix low power build issue with video PLL
Fix build error if CONFIG_PM and CONFIG_INIT_VIDEO_PLL are enabled.
Added 2 missing semicolons.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-11 17:51:18 -05:00
Peter Ujfalusi
e243122c1e dma/cavs_hda: Configure DGMBS only for host DMA configuration
The DGMBS should be only set for the host side and not on the link DMA.

Fixes: #46632
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2022-07-11 18:04:54 +00:00
Carlo Caione
2f5fef960e sample: s2ram: Introduce S2RAM sample
Introduce a template / sample for S2RAM running on rf5340dk.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 15:26:26 +02:00
Carlo Caione
541024eb43 riscv: litex-vexriscv: Add missing header
soc.h is using sys_read* functions. Add the proper header for that.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Carlo Caione
5d104f20ab riscv: Introduce API for CLIC and PLIC
Introduce a new interface for CLIC and PLIC to be used by the drivers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Carlo Caione
56466a14e1 riscv: Decouple CLIC and PLIC
Try to decouple CLIC and PLIC as much as possible.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Carlo Caione
31c5dc2230 Kconfig: Introduce RISCV_HAS_CLIC
Introduce a new RISCV_HAS_CLIC symbol for platforms using CLIC,
reorganize the Kconfigs and make the Nuclei ECLIC depending on the new
symbol.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 14:31:39 +02:00
Julien Massot
08f5fb5cdb soc: arm: fvp_aemv8r_aarch32: define static mpu regions
Add static MPU regions for this SoC.
These regions will be initialized as static region during system boot.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-07-11 11:17:02 +02:00
Flavio Ceolin
ad8ae7f735 dma: intel: Merge cavs and ace gpdma
cAVS and ACE gpdma driver have several similarities. This commit merge
this two drivers into a single one for Intel ADSP devices.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-11 10:21:17 +02:00
Flavio Ceolin
b1abe896e6 intel_adsp: ace: Fix function return
zephyr/soc/xtensa/intel_adsp/ace_v1x/irq.c: In function
'z_soc_irq_is_enabled':

zephyr/soc/xtensa/intel_adsp/ace_v1x/irq.c:47:3: warning: 'return'
with no value, in function returning non-void [-Wreturn-type]

   47 |   return;

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-08 21:13:29 -04:00
Kumar Gala
a22ac090db soc: xtensa: intel_adsp: ace_v1x: irq: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 20:03:32 +00:00
Kumar Gala
37fc9552e6 soc: xtensa: intel_adsp: irq: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 20:03:32 +00:00
Kumar Gala
4faf362030 soc: apollo_lake: gpio: Drop use of DT_LABEL
Change APL_GPIO_DEV_* defines to be DT_NODELABELs instead of
"label" strings.  This lets us change users of these defines to
use DEVICE_DT_GET.

We update samples/board/up_squared/gpio_counter to use DEVICE_DT_GET
as part of this change.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 20:01:47 +00:00
Tom Burdick
572ccd531d intel_adsp: Use device tree to enable/disable each HDA driver
Uses the dt_compat_enabled Kconfig preprocessor to set defaults
for each HDA driver.

Each direction is uniquely selectable which can be useful when building
with SOF where only some directions may wish to be enabled at any given
time.

By default, given the device tree (intel_cavs.dtsi) only the host
directions are enabled but an overlay may adjust that as needed.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-07-08 14:33:06 -04:00
Francois Ramu
c1782a096e soc: arm: new stm32f412Rx device
This adds a new stm32f412Rx in the list of stm32F4 devices.
The module stm32cube/stm32f4/soc/stm32f412rx.h exists

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-08 10:49:31 +02:00
Marc Herbert
08baba2520 soc/intel_adsp: cavstool: add support for DSP power state: D3
Change some behaviors when --log-only is passed in order to add support
for DSP power state: D3. This makes it possible to keep `cavstool
--log-only` running permanently in the "real-world" use case where the
Linux kernel loads the firmware and powers down audio when not in use.

More specifically:
- Do not disable D3 when using --log-only.
- Wait forever for the FW at boot time.
- Check live status when an invalid IPC is received and wait forever if
  not alive.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-08 10:45:44 +02:00
Marc Herbert
ef4cd76970 soc/intel_adsp: cavstool: new parameter wait_fw_entered(timeout_s)
Add a new timeout_s parameter that can also be 'None' = infinite.

No functional change. Required to add future support for DSP power
state: D3

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-08 10:45:44 +02:00
Mulin Chao
851e357aa4 pinctrl: npcx: add pinctrl support for psl pads
This CL introduces how to configure PSL (Power Switch Logic) pads
properties such as input detection mode/polarity, pin-muxing and so
on via pinctrl mechanism. It includes:

1. Add two pinctrl properties and their enums for PSL input
   detection configuration.
    psl-in-mode:
      - "level"
      - "mode"
    psl-in-pole:
      - "low-falling"
      - "high-rising"

2. Add macro functions to get PSL input detection and pin-muxing
   configurations from 'pinmux', 'psl-offset' abd 'psl-polarity'
   properties.

Here is an example to configure PSL_IN2 as the PSL detection input and
its mode and polarity.

/* A falling edge detection type for PSL_IN2 */
&psl_in2_gp00 {
	psl-in-mode = "edge";
	psl-in-pol = "low-falling";
};

A device will be introduced later which uses this pinctrl node to
configure PSL input detection settings and how to turn off VCC1 power
rail by PSL_OUT.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2022-07-07 14:12:52 +00:00
Joep Buruma
7e0fff24c7 drivers: pwm: add pwm driver for rpi_pico
Add pwm driver implementation for rpi pico family.
Adds myself as codeowner of drivers/pwm/*rpi_pico*

Signed-off-by: Joep Buruma <burumaj50@gmail.com>
2022-07-07 15:17:26 +02:00
Carlo Caione
fbe3436b36 esp32c3: Avoid circular header inclusion
Include arch.h from a different location to avoid missing symbol errors.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-07 10:00:20 +02:00
Carlo Caione
0e788b89a6 riscv: Use IRQ vector table for vectored mode
For vectored interrupts use the generated IRQ vector table instead of
relying on a custom-generated table.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-07 10:00:20 +02:00
Pieter De Gendt
e381170282 uart_pipe: Remove obsolete UART_PIPE_ON_DEV_NAME Kconfig
The UART pipe device is selected with devicetree chosen zephyr,uart-pipe

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-07 09:59:49 +02:00
Flavio Ceolin
158a87018c intel: adsp: Simplify PM
Both idle and suspend states were just being used to set the cpu
idle. That is not necessary, if the pm policy does not find a suitable
power state the kernel automatically calls k_cpu_idle().

This remove unnecessary code and the weirdness of having
min-residency-us set to 0 and other arbitrary values.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-07 02:10:11 -04:00
Enjia Mai
faff3f7ecc soc: xtensa: partial fix of socket misuse and refine the code
1. Improve the firmware transfer reliability by fixing the misuse
of the socket. Fix the most frequent occurence of the common `recv()`
bug described here:

https://docs.python.org/3/howto/sockets.html#using-a-socket

The longer term fix is to switch to a higher level API like Python
Remote Objects.

2. Not rely on the client's command to disconnect. Previously we
rely on the SIGINT to send stop_command to the server, but it does
not work well in some environments. Refine the whole logic and the
sever disconnect service by checking if the client is alive or not.

These changes make the client-server-based cavstool more stable.

Fixes #46864

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-06 20:38:41 -04:00
Andrey Borisovich
e0b1d81acb soc: intel_adsp: added casting for C++ compiler in soc.h
Header soc.h is included during C++ source file compilation
and required adding C++ casts as implicit casting from void*
is forbidden. Fixed minor warning comparing signed with unsigned
integer.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-06 15:11:07 -04:00
Andrey Borisovich
aa253d9ab1 soc: intel_adsp: reading HP SRAM banks count for ACE1X from Devicetree
Replaced hardcoded for intel_adsp_ace15_mtpm board
HP_MEMORY_BANKS value used in SOF code with generic approach -
using PLATFORM_HPSRAM_EBB_COUNT read from Devicetree.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-06 15:11:07 -04:00
Flavio Ceolin
92725e3102 soc: adsp: sram: Assorted cosmetic fixes
General code style fixes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-06 15:11:07 -04:00
Flavio Ceolin
7291c518a0 soc: ace: Organizing include headers
Properly prefixing some include files with "zephyr", also organizing
the order they are included.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-06 15:11:07 -04:00
Flavio Ceolin
65fbfcd480 soc: ace: Move power management to its own file
Move power management hooks to its own C file.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-06 15:11:07 -04:00
Flavio Ceolin
e4a3e2d8b6 intel_adsp: Unify cavs and ace timers
These two timers were sharing pretty much the same code. Actually
mtl timer was a "superset" of cavs timer. Just merge them into a
single one called intel audio dsp timer (intel_adsp_timer).

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-06 15:11:07 -04:00
Andrey Borisovich
e0e2dbf6f0 soc: ace1x: provided register names to addresses
Provided register names to hardcoded addresses in ace_v1x-regs
header.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-06 15:11:07 -04:00
Anas Nashif
8792dd800d soc: ace1.x: use common code
Do not duplicate code in new SoC and reuse code from intel_adsp/common.
Move SRAM code into own file in common code and setup SRAM in soc for
MTL platform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-06 15:11:07 -04:00
Tomasz Leman
0b15a8d3ef soc: ace_v1x: pm_state_exit_post_ops implementation
Implementation of the function used during the exit from the lower power
states.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-07-06 15:11:07 -04:00
Tomasz Leman
8940b9cae5 soc: ace_v1x: pm_state_set implementation
This patch implements pm_state_set function for ACE platforms.

This is initial implementation and only includes the basic handling of
PM_STATE_SOFT_OFF.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-07-06 15:11:07 -04:00
Tomasz Leman
cc9f82de44 soc: ace_v1x: soc_adsp_halt_cpu implementation
This patch add soc_adsp_halt_cpu implementation for ace. Function disable
power and check CPA status to report success. Function should be used only
for secondary cores and can be executed only from primary core.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-07-06 15:11:07 -04:00
Rafal Redzimski
b49d794966 ace: multiprocessing: add polling for core powered up confirmation
Poll for CPA bit by which HW confirms that the core has been powered up.

Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Co-authored-by: Tomasz Leman <tomasz.m.leman@intel.com>
Co-authored-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-06 15:11:07 -04:00
Rafal Redzimski
090b01e73c ace: multiprocessing: enable secondary core boot through ROM
Add ace/mtl rom flags definitions.
Set the flags in battr to indicate to rom that it should execute
secondary core procedure.

Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Co-authored-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-06 15:11:07 -04:00
Anas Nashif
b330a05539 intel_adsp: add a new series to support Meteorlake
Meteorlake support as part of the Intel ADSP family.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Co-authored-by: Michal Wasko <michal.wasko@intel.com>
Co-authored-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Co-authored-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Co-authored-by: Enjia Mai <enjia.mai@intel.com>
Co-authored-by: Flavio Ceolin <flavio.ceolin@intel.com>
Co-authored-by: Tomasz Leman <tomasz.m.leman@intel.com>
Co-authored-by: Bonislawski Adrian <adrian.bonislawski@intel.com>
Co-authored-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Co-authored-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-06 15:11:07 -04:00
Anas Nashif
782b083686 soc: add mising braces to single line if statements
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-06 11:00:45 -04:00
Alexandre Duchesne
1561b1046f soc: arm: gigadevice: Initial support for gd32f470
add initial support for gd32f470 SoC

Signed-off-by: Alexandre Duchesne <alexandre.duchesne@rtone.fr>
2022-07-06 13:22:25 +02:00
Ruibin Chang
dc3f29f67f ITE tests/kernel/sleep: tune CONFIG_SYS_CLOCK_TICKS_PER_SEC down
We need more time to run codes because of the performance,
so I tune CONFIG_SYS_CLOCK_TICKS_PER_SEC down to reduce
the times of running k_usleep(1), then it can pass test_usleep().

Verified by follow test pattern:
west build -p always -b it8xxx2_evb tests/kernel/sleep

fixes #46208

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-07-05 11:29:43 +00:00
Christian Taedcke
e71c2d1893 boards: efm32pg_stk3402a: Add minimal pwm support
With this additions samples/basic/blinky_pwm works.
LED0 is used as pwm output.

Signed-off-by: Christian Taedcke <hacking@taedcke.com>
2022-07-04 15:51:11 +02:00
Alex Sergeev
f7f35af277 soc: gd32: Add HAS_SEGGER_RTT
Enable SEGGER RTT for GigaDevice family.

Signed-off-by: Alex Sergeev <asergeev@carbonrobotics.com>
2022-07-04 09:50:35 +02:00
Enjia Mai
a1e388ea2e soc: xtensa: keep the CAVS old flasher still works
Keep the cavstwist.sh it is still working by specifying an
environment variable when CAVS_OLD_FLASHER is set. Provide
a fallback once the client-server-based tool does not work
well in some conditions.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-02 06:06:19 -04:00
Kumar Gala
287acdbb9d i2c: sam0: Set driver Kconfig default based on devicetree
Change Kconfig default to be based on if the devicetree has the
atmel,i2c-sam0 driver enabled.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-01 15:05:55 -05:00
Kumar Gala
d200321767 video: mcux_csi: Set driver Kconfig default based on devicetree
Change Kconfig default to be based on if the devicetree has the
nxp,imx-csi driver enabled.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-01 14:56:33 -05:00
Daniel Leung
1277c38797 cavs: disable timer interrupt on cpu power off
Since the timer interrupt is delivered to all cores at the same
time, it needs to be disabled (or masked) to prevent it from
waking a suspended CPU core.

Note that there is no need to re-enable (unmask) timer
interrupt separately as it is being taken care of in
smp_timer_init() when the CPU re-inits itself.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-07-01 14:04:50 -04:00
Guennadi Liakhovetski
3748bdcad6 xtensa: return to idle() when booting sporadically
To power down secondary cores on cAVS 2.5 platforms the primary core
enables the power-saving mode for the respective secondary core and
waits until that core enters idle() and executes the waiti
instruction at which point the core should enter a lower-power mode.
However, that core can then also automatically wake up and execute
its reset path if, e.g. an interrupt is delivered to it. However, it
isn't entirely clear which events are able to wake up cores from that
state. Disabling interrupts on the interrupt controller didn't seem
to prevent that from happening completely. In particular a specific
ADL notebook seems to be susceptible to this problem. Checking for
such sporadic boots and returning to idle fixes the problem.

BugLink: https://github.com/zephyrproject-rtos/zephyr/issues/46372
BugLink: https://github.com/thesofproject/sof/issues/5733
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 14:04:50 -04:00
Bartosz Bilas
33a4c78699 soc: select HAS_MCUX_XBARA for MIMXRT1062
Select HAS_MCUX_XBARA Kconfig symbol for MIMXRT1062,
since the XBARA Inter-Peripheral Crossbar Switch peripheral is present
on this SOC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-07-01 16:23:11 +00:00
Glauber Maroto Ferreira
fb919a75ba soc: esp32/s2/c3: pinctrl: update pin init macros
Updates pin initialization macros to make use
of pin grouping.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-01 16:22:18 +00:00
Jay Vasanth
e74978cc03 microchip: mec: zephyr spi image generation
Added mchp mec zephyr image generator python script. It takes
zephyr.bin as input and produces zephyr.mchp.bin.
The default behavior is to not pad to SPI flash size.
(Enable through CONFIG_MCHP_MEC_UNSIGNED_HEADER=y and
CONFIG_MCHP_MEC_HEADER_FLASH_SIZE_256K=y)

zephyr.mchp.bin is composed of:
1. First 4KB contains TAG at offset 0 and header at offset 0x100
2. Offset 0x1000 is the start of zephyr.bin which has been padded
to a multiple of 128 bytes.
3. Boot-ROM EC Info Block (128 bytes)
4. Boot-ROM Co-Signature Block (96 bytes)
5. Boot-ROM trailer (160 bytes) contains the SHA-384 digest of 2-4.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-07-01 11:35:13 +02:00
Bartosz Bilas
091a54202a soc: arm: nxp_imx: rt: add new MIMXRT1062CVJ5B part number
Add missing MIMXRT1062CVJ5B SOC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-06-30 19:50:03 +00:00
Bartosz Bilas
dcf2d4d542 soc: arm: nxp_imx: rt: add new MIMXRT1062CVJ5A part number
Add missing MIMXRT1062CVJ5A SOC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-06-30 19:50:03 +00:00
Alexandre Duchesne
7109e7dc20 soc: st_stm32f7: Add stm32f750xx SoC
add initial support for STM32F750xx SoC

Signed-off-by: Alexandre Duchesne <alexandre.duchesne@rtone.fr>
2022-06-30 13:41:06 +00:00
Ederson de Souza
afed5e4010 soc/xtensa/intel_adsp/tools: Dial back stream reset sleep
A full second is too much, and since "Ack local interrupt before
processing IPC" patch, it doesn't seem necessary. This whole second
wait would break tests that log too much content, as the firmware
is already running during the reset - and the host script wouldn't read
the contents, thus some of the logs would be overwritten.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-06-30 06:13:30 -04:00
Jaroslaw Stelter
8632986746 soc: intel_adsp: Add lib_code module type.
External libraries can contain processing module code or common library
code. Library manager need to distinguish between both type of modules
for proper loading.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-06-29 10:41:59 -04:00
Dmytro Firsov
f4cea5da70 xenvm: drivers: xen: add Xen grant table driver
This commit introduces driver for granting access for own grant
table and for mapping/unmapping foreign gref. Grant tables are used
for data exchange between Xen domains via shared memory page(s) (e.g.
for sharing ring buffer with driver data) This functionality is
widely used and needed for implementing PV backend/frontend drivers.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2022-06-28 22:34:26 -04:00
Daniel DeGrasse
69d153cd3d soc: nxp_imx: rt: enable SWO output for iMX RT 10xx series
enable swo output for iMX RT 10xx series. SWO pinmux settings are
currently only present for the RT1060 and RT1064

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-06-28 16:02:09 -05:00
Ederson de Souza
7ab8607e71 soc/xtensa/intel_adsp/tools: Ack local interrupt before processing IPC
It seems a race can happen between the host acknowledging a DONE
interrupt and the DSP being able to mark some IPC as done. To avoid
this, the host script now always acknowledges the DONE interrupt
_before_ processing the IPC message.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-06-28 14:56:57 -04:00
Henrik Brix Andersen
9d51d9145b soc: arm: xilinx: zynq7000: default to 1 CPU core
Default to 1 CPU core on the Xilinx Zynq-7000 SoC series since Zephyr does
not yet suppport SMP on aarch32.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-06-28 20:46:11 +02:00
Henrik Brix Andersen
e8df5bdf5b soc: arm: xilinx: zynq7000: add pinctrl header file
Add Xilinx Zynq-70000 pinctrl header file to define SoC specific
pinctrl_soc_t structure. This is used to store pin configurations for the
pinctrl driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-06-28 20:46:11 +02:00
Henrik Brix Andersen
982d379808 soc: arm: xilinx: zynq7000: unlock the slcr at boot
Unlock the Xilinx Zynq-7000 System Level Control Registers (SLCR) at boot
to allow write access using the generic syscon driver.

Since the generic syscon driver uses the DEVICE_MMIO_* APIs for
memory-mapped IO we can remove the dedicated SLCR MMU region.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-06-28 20:46:11 +02:00
Jeremy Bettis
6ede43b078 npcx: Set hex_file automatically w/ npcx hex image
When using CONFIG_NPCX_IMAGE_OUTPUT_HEX, set the hex_file
runners_yaml_props_target property, so that west flash will flash the
correct file.

Change the cmake flash rules to populate the hex_file value in the
runners.yaml file if either CONFIG_BUILD_OUTPUT_HEX is enabled or some
cmake file set the runners_yaml_props_target hex_file property.

Update the npcx9m6f_evb instructions now that the filename is implicit.

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2022-06-28 11:09:35 +02:00
Ederson de Souza
4fd8d474ec soc/xtensa/intel_adsp/tools: Do not use grep Perl extensions
They may be disabled in some environments (such as Gentoo based
developer mode on Chromebooks). Use extended regular expressions
instead.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-06-27 15:41:00 -05:00
Ederson de Souza
0ce9446978 soc/xtensa/intel_adsp: Add cAVS clock driver
Simple driver that allows one to choose the clock speed of xtensa cores.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-06-27 12:42:04 +02:00
Alex Kolosov
4a52bc22b6 soc: riscv: telink_b91: add dfu related configurations for b91 platform
Modify Telink b91 config files and linker script with necessary config
settings required for DFU.

Signed-off-by: Alex Kolosov <rikorsev@gmail.com>
2022-06-24 20:25:33 +02:00
Bartosz Bilas
63e9fb6190 soc: select HAS_MCUX_SRC for MIMXRT1062
Select missing HAS_MCUX_SRC Kconfig symbol for MIMXRT1062,
that allows using NXP i.MX mcux SRC hwinfo driver.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-06-24 12:30:11 -05:00
Lauren Murphy
318e6db239 debug: coredump: add xtensa intel adsp, support toolchains
Adds compatibility with Intel ADSP GDB from Zephyr SDK and
from Cadence toolchain to coredump_gdbserver.py.

Adds CAVS 15-25 (APL) register definitions. Implements
handle_register_single_read_packet to serve ADSP GDB
p packets.

Prevents BSA from changing between stack dump printout
and coredump by taking lock. Observed to be necessary for
accurate results on slower simulated platforms.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-06-23 15:44:45 -04:00
Keith Packard
01187b92a2 soc/it8xxx2: Place arithmetic funcs in .text section
Placing these in the __ram_code section generates a relocation error when
building with toolchain version 0.14.1, moving them back to .text fixes
that (presumably with a performance penalty).

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-22 13:15:55 +02:00
Sylvio Alves
54ca96f523 soc: esp32: opt to make device handles in dram
ESP32 linker loader needs all sections to be align correctly.
When MCUBoot is enabled, device handles provide by device-handles.ld
does not make the ALIGN(4) at the end, which breaks the loader
initialization. This PR make sure that this particular section
is placed in DRAM instead.

For now this is a workaround until this can be handled in loader script.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-06-22 12:27:43 +02:00
Sylvio Alves
8e04acab3b linker: esp32: fix flash linking reference
Referenced spi_flash_rom_patch.c object was wrongly
linked, which can cause crash due to flash cache disabled
operation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-06-22 12:27:32 +02:00
Anas Nashif
bc38f25178 intel_adsp: fix typo PLATFORM_INIT_LPRSRAM -> PLATFORM_INIT_LPSRAM
Fix typo in define preventing initialization of LPSRAM.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-22 12:16:41 +02:00
Carlo Caione
741b9dc65d riscv: Rename __irq_wrapper to _isr_wrapper
For some reasons RISCV is the only arch where the vector table entry is
called __irq_wrapper instead of _isr_wrapper. This is not only a
cosmetic change but Zephyr expects the common ISR handler to be called
_isr_wrapper (for example when generating the IRQ vector table).

Change it.

find ./ -type f -exec sed -i 's/__irq_wrapper/_isr_wrapper/g' {} \;

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-06-21 20:27:20 -04:00
Rafal Redzimski
bd46470167 xtensa: intel_adsp: add rom jump address definition
Add the definition of address which is used by ROM to jump to FW.

Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-21 14:01:01 -04:00
Anas Nashif
09cd218cde intel_adsp: use arch_proc_id() instead of local function
Use arch_proc_id interface instead of locally defined function.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-21 10:48:28 +02:00
Yinfang Wang
4278d69924 test: Enable the GPIO tests on EHL_CRB.
Enable testcases under tests/drivers/gpio/gpio_basic_api
To run in twister, "-X gpio_loopback" parameter is needed.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-06-21 10:47:56 +02:00
Stephanos Ioannidis
c40949a389 soc: esp32s2: Drop IRAM_ATTR from forward declarations
This commit drops the `IRAM_ATTR` macro from the function declarations
because:

1. `IRAM_ATTR` macro makes use of the `__COUNTER__` preprocessor macro,
which increments for every macro invocation and causes the section
specified in the forward declaration to not match that of the
function definition.

2. Section attributes need not be specified for forward declarations.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-06-20 10:28:06 +02:00
Aurelien Jarno
e54224ddab soc: stm32: h7: Generate MPU regions from DT nodes
Commit b91d21d32c added the possibility to define MPU regions from the
device tree, however commit c276088567 removed that possibility for H7
SoC, as it now uses a SoC specific definition of the MPU regions without
the DT-defined regions (probably because the two PRs got developped in
parallel).

Fix that by adding the macro which adds the DT-defined regions to the
STM32H7 specific file.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-06-20 10:27:52 +02:00
Dino Li
e1c5222afd soc: it8xxx2: add soc variants
Currently there are two soc variants (IT81202BX and IT81302BX) on
it8xxx2 series. The IT81202BX is 128-pin package (GPIO K and L groups
aren't bonding with pad).
This makes soc variant configurable and apply corresponding configuration
for a soc.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2022-06-20 10:25:08 +02:00