Commit graph

5973 commits

Author SHA1 Message Date
Jonny Gellhaar
9bb5d1e784 soc: stm32wb: fix ble low-power
Release HSI CLK48 semaphore when going to sleep to allow C2 (M0)
core to start and stop clock as needed while C1 core is not running.

CLK48 is shared between RNG and USB. RNG is needed by M0 during BLE
advertisement. If semaphore is locked, C2 core can start it when it
needs to but not stop it.

Fixes zephyrproject-rtos#69955.

Signed-off-by: Jonny Gellhaar <jonny.gellhaar@prevas.se>
2024-11-29 11:45:20 +01:00
Gerard Marull-Paretas
c4c53f87fe soc: microchip: mec*: remove redundant PINCTRL/GPIO defconfigs
These options must be selected by drivers that use the associated
APIs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-29 05:41:53 +01:00
Andy Ross
b4fb833eb9 soc/mediatek/adsp: Source timer rate from DTS
These devices have an architecturally fixed 13 MHz clock device.  But
thankfully you can put a default into a DTS binding so we don't have
to repeat it for all of them.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
09495c9e48 soc/mediatek: Ruffify python scripts
These in-tree scripts fail the new ruff checks.  Clean things up so
modifications can merge.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
fe5c11db05 boards/mediatek: Add mt8196_adsp
Add Zephyr support for the Audio DSP on the MT8196 SOC.  This is a
very similar device to previous designs.  Most of this patch is just
DTS.

The biggest delta is the more complicated second level interrupt
controller, though it is still able to be represented using some
vaguely clever DTS config over the older intc_mtk_adsp driver.

Also the memory layout is slightly different, requiring a little
indirection to set the initial boot stack address and log output
buffer.  And the timer "irq_ack" register bits moved.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
e35de00f86 soc/mtk_adsp: Update gen_img.py address space rules
New platform has different mappings.  Auto-detect rather than parse
dts or similar, as this is is really just a simple format for testing.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
3c0269f4f6 soc/mtk_adsp: Add missing z_prep_c() prototype
The early boot function got renamed to a pseudo-standard "z_prep_c",
but this isn't an actual API and doesn't have a prototype in the
headers anywhere, so the compiler started whining about an undeclared
function.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
cc43e3a527 soc/mediatek: Add missing snippets sections
This got missed by the first version, but recent SOF needs it for
STRUCT_SECTION_ITERABLE usage.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
5364783ba1 soc: boards: Add Mediatek MT8186 and MT8188 audio DSPs
These are very similar devices to mt8195, minimal changes needed
beyond boilerplate configuration.

In the process, this reworks the board/soc layout to be HWMv2
compliant, with "adsp" becoming a CPU cluster beneath the SOC.  So the
name of the boards to west become e.g. "mt8195/mt8195/adsp" (which can
be shortened to "mt8195//adsp" if desired).

Note that the cpuclk driver is not yet ported, it works only with 8195
(the clocking/power architecture seems similar between the parts, but
the graph of wells and clocks is different and historically these have
been three separate drivers in SOF).  The biggest changes are in the
image/loader scripts, which needed some rework for cross-device
portability.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
cdd4cbcc67 soc/mtk_adsp: Remove "msg" API
This is a feature of the 8195 DSP only, which is used only vestigially
by SOF to store data that nothing reads.  The Linux kernel on the
other side uses a shared driver for all 81xx devices, which does not
expose the feature.  It seems to work, but it's not worth maintaining
a driver in tree for legacy hardware that will never use it.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Andy Ross
48a84911ac soc/mtk_adsp: Add default console hook
Wire the default printk output to the console at boot, just to be sure
we have stdio output good enough to get tests to pass.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00
Yong Cong Sin
e6dd68ec89 arch: riscv: introduce CONFIG_RISCV_GP_PURPOSE choice
Introduce `CONFIG_RISCV_GP_PURPOSE` choice to make sure that only
one of `CONFIG_RISCV_GP` or `CONFIG_RISCV_CURRENT_VIA_GP` can be
enabled, instead of relying of dependencies.

To do that, introduce a new
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING` that can be selected
by SoC when it implemented global pointer (GP) initialization for
relative addressing in its linker.

`CONFIG_RISCV_GP` will be the default choice when
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING=y`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-28 12:51:09 +01:00
Aksel Skauge Mellbye
f3246cda17 drivers: pinctrl: silabs: Add pinctrl driver for digital bus
Silicon Labs Series 2 and newer devices do alternate function
configuration fundamentally differently from Series 0 and 1. Pin routing
is done in a centralized fashion in the GPIO peripheral, as opposed to
having ROUTE registers in every peripheral. The concept of alternate
function location numbers also does not exist, functions are directly
assigned to GPIOs by their port and pin number.

This commit adds a new pinctrl driver for devices that use DBUS. It fully
makes use of pinctrl design principles as outlined in the Zephyr
documentation. The previous driver hard-codes pin properties such as filter
and pull-up/down in the driver itself, while the new driver leaves this up
to the user as configurable DeviceTree properties. The previous driver has
hard-coded support for UART, SPI and I2C, while the new driver has generic
support for all DBUS signals.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-11-27 22:51:55 -05:00
Sylvio Alves
36d41181be soc: esp32c3: add FH4X type and SoC revision
FH4X SoC type contains improvements in ROM code that
can save up to 35kB of memory.

Update hal_espressif in order to select proper linker
file based on upon SoC model.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-27 21:06:51 +00:00
Sylvio Alves
4101401dd7 boards: esp32c3-based: update soc type info
This updates a few esp32c3-based boards accordingly to
its oficial SoC model.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-27 21:06:51 +00:00
Andrej Butok
03628a4102 soc: kinetis: disable on reset NMI and EzPort
- Disables on reset NMI and EzPort.
- Fixes possible reset and power-on issues.
- Already applied for K64, now applying for the rest of Kinetis.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-11-27 21:06:09 +00:00
Jamel Arbi
70add85f9f drivers: openthread: nxp: Add a HDLC RCP communication
Add a HDLC RCP communication with its hdlc_api interface APIs
and a NXP driver.

Signed-off-by: Jamel Arbi <jamel.arbi@nxp.com>
2024-11-27 10:37:21 -05:00
Dat Nguyen Duy
e4539aa9c9 board: s32z2xxdc2: allow the code to be executed from code RAM
- Trace32 runner: no need to configure TE bit in CFG_CORE
register in the cmm start-up script, it can be configured
at Zephyr start-up code when required (via SCTRL register)

- MPU static regions also needs to be updated for XIP and
non-XIP

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-11-26 15:43:45 -05:00
Dat Nguyen Duy
303bc5acb5 soc: s32ze: clean up cache initialization
Use Zephyr cache API to initialize cache as done for
various platforms. Enabling CACHE_MANAGEMENT by default

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-11-26 15:43:45 -05:00
Krzysztof Chruściński
980e0acbf1 soc: nordic: common: Add mram latency manager
Add module for managing multiple requests for MRAM latency.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-26 15:43:37 -05:00
Adam Kondraciuk
be1f40547f soc: nordic: nrf54h: disable IRQ before PM config
IRQs must be disabled before starting any procedures to prepare
for low-power states.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-26 14:46:55 +00:00
Adam Kondraciuk
9b252855fd soc: nordic: Add LRCCONF management
Due to the possibility of simultaneous accesess to LRCCONF registers,
additional management is required.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-26 14:46:55 +00:00
6d3348bd83 drivers: add ch32v00x pinctrl support
This commit adds the pinctrl driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
936c78e8ba soc: add wch_ch32v003 soc files
This commit adds the soc support for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
Lucas Tamborrino
cdbd2b5558 soc: espressif: Add hardware initialization
Bring hardware initialization to zephyr code base.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-11-26 00:12:45 +01:00
Daniel Leung
22de29e768 soc: intel_adsp/ace: put syscall helpers in vector code section
This puts the syscall helpers into the vector code section, and
is a tiny TLB optimization. Before this, worst case scenario is
that there would 2 instruction TLB misses when both the syscall
helpers and the vector code pages are not in TLB cache. With
this change, there would be at most 1 instruction TLB miss as
now the syscall helper and the vector code (which includes
exception handling code and xtensa_do_syscall()) are now in
the same page, and the same TLB entry.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-26 00:12:18 +01:00
Martin Åberg
b88d0bf8c7 soc: Enable SVT on GR716A by default
GR716A has limited instruction memory capacity. Enabling SVT
saves 3.5 KiB.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-11-25 21:53:55 +01:00
Krzysztof Chruściński
114d9b34e2 soc: nordic: nrf53: Update default value of NRF53_SYNC_RTC
Most likely there is no point of synchronizing RTC if net core is
not enabled. Same for the bootloader.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-25 17:42:39 +01:00
Ali Hozhabri
b2d4c2e2b1 soc: stm32: stm32wb0x: Disable BT_AUTO_PHY_UPDATE & BT_AUTO_DATA_LEN_UPDATE
Put the default value for BT_AUTO_PHY_UPDATE and BT_AUTO_DATA_LEN_UPDATE
to "n" at SOC level since they cause "controller busy" due to starting
several parallel BLE procedures during connection by
"perform_auto_initiated_procedures" function. At the moment, ST controller
does not support parallelism, i.e. host should not initiate a new procedure
before previous one is completed.

Disable CONFIG_BT_HCI_ACL_FLOW_CONTROL at SOC level.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
c8d034cf0b soc: stm32: stm32wb0x: Dedicate RAM section for BLE part
Dedicate RAM section on STM32WB0x for BLE part based on the number
of radio tasks and device type.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
TOKITA Hiroshi
88149afff7 soc: raspberrypi: Drop PINCTRL from Kconfig.defconfig
The `Kconfig.defconfig` is not good place for put `select PINCTRL`.
Drop `select PINCTL` from `Kconfig.defconfig` and add it at each
driver's Kconfig.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 14:42:01 +01:00
Hou Zhiqiang
91593fc899 soc: nxp: imx95: A55: enable SDK cache driver
Enable the SDK cache driver for A core.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-11-25 12:16:33 +01:00
Gerard Marull-Paretas
e6b24df0af soc: nordic: nrf54h: gpd: use nrf_gpio_pin_retain_enable|disable
Instead of raw register access.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-11-25 12:16:17 +01:00
Pieter De Gendt
bf2db7afc0 python: Format and sort imports
ruff check --select I001 --fix applied to all python files that had
this as only issue.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-25 10:07:13 +01:00
Daniel Leung
3d3ffa2c05 soc: intel_adsp/ace30: do not map 0x0
The MMU mapping in SoC covers 0x0 which prevents catching NULL
pointer accesses. Since there are no hardware registers at
the very first page of memory, we move the starting point one
page later.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-25 08:30:57 +01:00
Dino Li
e59289d899 soc/it8xxx2: disable USB debug path at default
This change disables USB debug path at default, in order to prevent SoC
from entering debug mode when there is signal toggling on GPH5/GPH6.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-11-25 08:30:48 +01:00
Yong Cong Sin
b1def7145f arch: deprecate _current
`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-23 20:12:24 -05:00
Daniel DeGrasse
42cc35f941 soc: nxp: consolidate nxp port pinctrl headers
NXP PORT IP instantiations often have different features absent, IE
input buffer, open drain, or slew rate support. Check if the relevant
PCR register bitmasks are defined in the common pin control file, and
define the bitmasks to 0x0 (no effect) if they are not. This allows us
to further consolidate the pinctrl_soc.h headers for SOCs using the PORT
IP.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-22 13:01:02 -06:00
Aymeric Aillet
dd446a724f soc: renesas: rcar: Remove CONFIG_PINCTRL
Remove CONFIG_PINCTRL from rcar defconfig files
Fixes: #78619

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2024-11-22 17:41:02 +01:00
Carles Cufi
e78832034f soc: nordic: Introduce the nRF54L05 and nRF54L10
These two new ICs are variants of the nRF54L15 with different memory
sizes:

- nRF54L05: 500KB RRAM, 96KB RAM
- nRF54L10: 1022KB RRAM, 192KB RAM
- nRF54L15: 1524KB RRAM, 256KB RAM

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Carles Cufi
0b3a15016b soc: nordic: nRF54L: Consolidate common Kconfig options
There are many common options to all ICs of the 54L series. Consolidate
them in a single entry so that they do not need to be re-typed for each
SoC series member.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Lucien Zhao
a8f5958c78 soc: nxp: imxrt: imxrt118x: add flexspi support
add flexspi.c file to get flexspi clock rate.

Enable flexspi1 clock if don't boot from flash.

Use custom fixed mpu_regions.c file to config MPU for CM7

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-20 16:00:02 -05:00
Marek Matej
98d0a2bb34 soc: espressif: esp32c6 split cached area
Split the cached area and assign both parts IROM and DROM meaning. This
is necessary to overcome the esptool section merging issues.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-20 15:58:07 -05:00
Jakub Wasilewski
8e881959a4 boards: hifive_unmatched: add support for S7 and U74 targets
Add `hifive_unmatched//s7` (earlier selected by default, using
`hifive_unmatched`) and `hifive_unmatched//u74` targets.

Define work-area for other 4 cores in openocd.cfg

Update twister platform white/black lists, to support new targets

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Jakub Wasilewski
2423c87d54 boards: hifive_unleashed: add support for E51 and U54 targets
Add `hifive_unleashed//e51` (earlier selected by default, using
`hifive_unleashed`) and `hifive_unleashed//u54` targets.

Define work-area for other 4 cores in openocd.cfg

Update twister platform white/black lists, to support new targets

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
TOKITA Hiroshi
f0219c35da drivers: pinctrl: Remove renesas,ra-pinctrl driver
Remove the renesas,ra-pinctrl driver, which is no longer
needed after migrating to the FSP-based implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
397c48a13e dts: arm: renesas: ra4: Use renesas,ra-pinctrl-pfs driver
Switch the pinctrl driver to renesas,ra-pinctrl-pfs which can be
used with FSP.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
af2021ea4c soc: renesas: ra: ra4m1: Adapts the Option Setting Memory to FSP.
Since the Option Setting Memory area is set in FSP, the Kconfig value
switches between using the FSP implementation or the existing
Option Setting Memory implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
c968d4eb81 soc: renesas: ra: ra4m1: Migrate to FSP-based configuration
Change to use FSP to integrate with other Renesas RA series.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
Lucien Zhao
e5ee95893c dts: arm: nxp: rt118x: add lptmr instances
Config/Enable lptmr1/2/3 clock
Add 3 lptmr instances for RT118X

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-19 18:36:31 -05:00