Commit graph

3414 commits

Author SHA1 Message Date
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