Add code to clock and release reset signal for USBOTG controller on
RW6xx SOC when USB is enabled, and add KConfig selection to indicate to
build system which USB controller this SOC uses.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
IPC has inverted the usage of the state lock API.
In this API semantics, the get method disallow the policy of
using the given state, while the put() release this constraint.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fix the inline documentation to match implementation. As IPFL is used,
the correct matching function is xthal_icache_region_lock().
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Fix the inline documentation to match implementation. As IPFL is used,
the correct matching function is xthal_icache_region_lock().
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Nordic SoCs use this hook to execute `SystemInit` as early as possible
after ARM core reset. Previously, `z_arm_platform_init` was defined as
assembly code, which would simply jump to the other function.
However, this extra code can be avoided by using `SystemInit` directly
in place of the `z_arm_platform_init` symbol (whenever it's undefined).
This is now done with a linker script containing a `PROVIDE` directive.
This saves 4 bytes of ROM (0-16 depending on alignment) and also makes
it possible to override `z_arm_platform_init` out of tree, if needed.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
We need to use correct SOC name when naming the Kconfig.defconfig*
files.
So we need the following changes:
- mimx8mp -> mimx8ml8
- mimx8mm -> imx8mm6
- mimx8mn -> mimx8mn6
- mimx8mq -> mimx8mq6
Then we also need to take care of qualifiers name. Standard notation
uses "_" instead of "."
e.g : Kconfig.defconfig.mimx8mp.a53 -> Kconfig.defconfig.mimx8ml8_a53
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Checking if the device state is locked is not correct, device runtime
put / get is no longer checking for it and the only place that was
locking device's state was the pm action callback and if the idea
was to protect some concurrent call, using it is not enough.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There is no needed to lock/unlock a device state in its pm action
callback. The power management subsystem should take care of
serialize these calls.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Prevent the system from entering runtime idle state during IPC
transactions until the HOST acknowledgment is received.
This patch modifies the IPC mechanism to:
- Lock the runtime idle state immediately after sending an IPC message
to the HOST, preventing the system from entering a low-power state.
- Unlock the runtime idle state once the IPC transaction is acknowledged
by the HOST, allowing the system to enter low-power states if
conditions permit.
The changes ensure that the DSP does not enter a power state that could
interrupt the IPC communication process, maintaining the integrity of
the IPC state machine.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This commit enables pinctrl on i.MX8ULP. This includes:
1) Adding `pinctrl_soc.h` header file.
2) Adding DTS node for IOMUXC1, which is one of the
IPs responsible for managing the 8ULP pads.
3) Adding .dtsi with pin definitions. For now, only
the LPUART7 pads are added to this file because this
is going to be the only consummer for now.
4) Modifying the `pinctrl_imx.c` driver to work for 8ULP.
5) Enabling the `CONFIG_HAS_MCUX_IOMUXC`, which is a
dependency of `CONFIG_PINCTRL_IMX`.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Add simplistic booting method which allows to run
applications without the 2nd stage bootloader.
- introduce memory layout header file
- update and optimize default and mcuboot linker scripts
- remove building multiple binaries during the application build
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add simplistic booting method which allows to run
applications without the 2nd stage bootloader.
- introduce memory layout header file
- update and optimize default and mcuboot linker scripts
- remove building multiple binaries during the application build
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add simplistic booting method which allows to run
applications without the 2nd stage bootloader.
- introduce memory layout header file
- update and optimize default and mcuboot linker scripts
- remove building multiple binaries during the application build
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add simplistic booting method which allows to run
applications without the 2nd stage bootloader.
- introduce memory layout header file
- update and optimize default and mcuboot linker scripts
- remove building multiple binaries during the application build
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add simplistic booting method which allows to load without 2nd stage
bootloader.
Update common architecture loader to support all build scenarios.
- simple boot: using single binary application without bootloader
- mcuboot: zephyr port of MCUboot
- application: loaded by the MCUboot
Signed-off-by: Marek Matej <marek.matej@espressif.com>
This commit removes the `Kconfig.core` file. It's been largely unused, and
the only symbol it provides (`RISCV_CORE_E31`) overlaps with the SoC-layer
provided `SOC_SERIES_SIFIVE_FREEDOM_FE300`.
As of date, the only SoC that uses the E31 core in Zephyr is the FE310 SoC.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
DMASEC is set to non-secure by default, which prevents CCM from
accessing secure memory. Change DMASEC to secure.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The soc_secure_* function are used by the non-secure application
to access hardware resources which are mapped as secure.
Using these functions for hardware resources mapped as non-secure
is missleading.
We have some soc_secure_* functions which read FICR values.
In nRF91 and nRF53 platforms this made sense since FICR
has hardware fixed mapping as secure.
For nRF54 though the FICR has hardware fixed mapping as non-secure.
This change refactors the soc_secure.h to exclude the functions
which read FICR values from being included when FICR is mapped as
non-secure.
Also updates the hwinfo and ieee802154 drivers to adjust to this change.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
In preparation for adding AMP support for i.MX RT6xx family we need
to rename existing cm33 support files to more specific names.
e.g mimxrt685_evk.dts -> mimxrt685_evk_mimxrt685s_cm33.dts
This will allow us to later add support for Cadence DSP found on i.MX
RT6xx series.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
imxrt6xx are dual core devices featuring an ARM Cortex-M33
core and an Cadence Xtensa HIFI4 Audio DSP.
Currently only m33 core is supported. In order to support
the Cadence DSP we need first to do some code-reorganization
for m33.
We start by moving all cm33 related code to its own directory
and introduce the cpuclusters property in soc.yml file.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Clarify usage of __rom_region_end/size in XIP system.
When PMP is enabled, __rom_region_end should be padded to meet the
requirement of PMP entry, and the actual ROM region usage ends at
.last_section instead of __rom_region_end.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Updated ROM region padding to utilize LMA instead of location counter,
because the location counter has been assigned to 'RAM_BASE'.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
LPFlexcomm is a MFD device hence select this Kconfig whenever
it is enabled.
Remove the selection from the individual driver Kconfig files.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Change, for audio DSP and M7 cores, SOC_<name> to match
the exact soc name.
Update the board files accordingly.
These configs are used in SOF and NXP_HAL, so change
sha for these modules.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Enable sleep mode on LPC55S69 (corresponding to zephyr's runtime idle
mode). Add DT description and power api implementations.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Timing function need Cycle Count Register CYCCNT of DWT,
but Arm-Cortex-M23 only support DWT_CTRL, DWT_PCSR and DWT_COMP
& DWT_FUNCTION registers. It can't meet the requirement of timing
function, so to remove CPU_CORTEX_M_HAS_DWT.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
During the migration to Hw model V2 the PR #63495
was not fully reported.
This change is adding the support Serial Wire / JTAG port pins
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Fixes the following errors when sparse (SCA) is enabled:
soc/intel/intel_adsp/ace/power.c:46:12: warning:
cast removes address space '__cache' of expression
/soc/intel/intel_adsp/ace/power.c:48:9: warning:
incorrect type in argument 1 (different address spaces)
Fixes#70725
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Select the LPTIM clock source STM32_LPTIM_CLOCK to be
LSE or LSI depending on the DTS clocks property
of the stm32_lp_tick_source node.
This will also affect the SYS_CLOCK_TICKS_PER_SEC
depending on the lptim prescaler
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add SoC initialization to set the UART RDC permission in the early
phase, so that the it can be used by Zephyr on Cortex-A cores.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
To minimize time the CPU spends when preparing for sleep, make sure
the pending transactions are finished before calling `wfi`.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
The SOC name `imx8ulp` has been just a placeholder until
support for the SOC's ADSP (since this is the only core
that's supported in Zephyr) could be added to the NXP HAL.
Now that the support has been added, to make use of it, the
SOC name `imx8ulp` has to be changed to `mimx8ud7`. As such,
this commit does the following:
1) Introduces SOC part number configuration - needed
by some HAL headers.
2) Replaces all occurrences of `imx8ulp` (as the SOC
name) with `mimx8ud7`.
3) Enables `CONFIG_HAS_MCUX`.
4) Aligns all `CONFIG_SOC_` configurations with the
new SOC name.
5) Updates SOF hash. This is needed to fix build issues
caused by this name change. This is not done in a separate
commit to preserve bisectability.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Simple rename to align the kernel naming scheme. This is being
used throughout the tree, especially in the architecture code.
As this is not a private API internal to kernel, prefix it
appropriately with K_.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Doing a `GCLK->CTRLA.bit.SWRST = 1` will cause boot chaining to hang.
Setting the CPU clock to run from OSCULP32K during initialization is
all that is needed.
Signed-off-by: Jon Ringle <jringle@gridpoint.com>
Issue an upstream read transaction through uncached memory to flush
out all pending transactions before power down the host domain.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fixes: #69785
The boards_legacy sub-folder was temporarily introduce in collab-hwm
branch during porting to HWMv2.
This should have been removed before merging collab-hwm to main as it
prevent looking up boards in oot roots.
Removing the temporary sub-folder for HWMv2.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Clean up early days TF-M development directives which are outdated today.
Factorize remaining CMake instructions in soc.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Replaces inaccurate or wrong vendor prefixes in board and soc
folder names with those from thr vendor prefix file
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Move the Kconfig symbols SOC_ESP32_PROCPU, SOC_ESP32_APPCPU,
SOC_ESP32S3_PROCPU, and SOC_ESP32S3_APPCPU.
The CPU cluster is defined in espessifc/soc.yml and should therefore
be available in the HWMv2 Kconfig.soc tree.
This will allow sysbuild to test for the CPU cluster when targeting
remote board for a build.
Update espressif boards accordingly.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Interrupts should not be enabled this early in boot time.
Driver initializations expect IRQs not to arrive when
setting up HW.
Remove enabling `MSTATUS.MIE` in `__start`.
It will be enabled when main thread is switched to,
as threads by default start with enabled `MSTATUS.MIE`.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
Due to HW issue, VPR needs to keep MSTATUS.MIE enabled during sleep.
Otherwise, interrupts will not wake it up.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
MEMC_MCUX_FLEXSPI depends on code relocation being enabled on parts that
XIP from the FlexSPI by default and requires a string describing the RAM
region to relocate code into. Add these Kconfigs to the RW SOC port.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This patch updates the power status register bitfield definitions in the
power management header for the Intel ADSP ACE 2.0 LNL platform.
Modifications include:
- Adjusting the 'ioxpgs' field from 4 bits to 2 bits.
- Adding a 'rsvd11' field with 2 bits to reflect reserved space.
- Changing the 'mlpgs' field from 2 bits to 1 bit.
- Updating the 'rsvd14' field from 1 bit to 2 bits for alignment.
These changes ensure that the power status register bitfields match the
latest hardware specification for the ACE 2.0 LNL SoC, which is crucial
for accurate power domain status monitoring.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
In the interrupt pending routine, only the interrupt status needs to be
cleared at the end of the interrupt routine. There is no need to do a
hardware reset(HALT) to avoid clearing the next transfer interrupt when
the current transfer is completed.
Test: Testing this function does not cause I2C data/clk to get stuck on
the system platform.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Add support for propagating SOC_NRF54LX_DISABLE_FICR_TRIMCNF and
SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE values to nrfx.
Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
Previous adjustments to hwmv2 lost this Kconfig file.
Test: west build -p always -b it82xx2_evb samples/hello_world
config BOARD_IT82XX2_EVB
select SOC_IT82302_AX
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
When non-primary core is powered down and restart with sequence of:
- PM state set to SOFT_OFF
- once target core is idle, cut power with soc_adsp_halt_cpu()
- power up core again with k_smp_cpu_resume()
The execution will continue from stored DSP core context, but
will hit an assert in z_smp_cpu_mobile() as the PS.INTLEVEL
is zero.
Fix this issue by storing and restoring PS register in this flow.
Link: https://github.com/zephyrproject-rtos/zephyr/issues/70181
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The core clock of 8ULP's HIFI4 DSP runs at 475.2MHz. As such,
correct the value of `CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC` to
reflect this.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Transition to a low power DMI L1 state should be allowed only after all
pending DMA channels transfers have started.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Dependencies of NXP_IMXRT_BOOT_HEADER were set incorrectly for the
RT11xx series part when building a dual core image. The boot header
should be enabled by default for the primary M7 core, and always
disabled when MCUBOOT is used or the M4 core is targeted
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Use `DT_REG_HAS_IDX()` instead of `DT_NODE_EXISTS()` when checking
if for a given nodelabel the base address of the associated node
should be validated, so that the validation is performed only if
the base address is available. This prevents build failures in cases
like the os_mgmt_datetime test where the `rtc` nodelabel is used for
an emulated RTC.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Unlike the remainder of the RT10xx series, the RT1011 SOC requires that
the flash configuration block be placed at an offset of 0x400 bytes,
instead of the start of the flash.
Fixes#70090
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
With the transition to HWMv2, `CONFIG_CPU_HAS_DCACHE` is no
longer selected. This causes issues with Sound Open Firmware
since this configuration allows the usage of DCACHE-related
cache management operations. As such, to fix said issues,
select `CONFIG_CPU_HAS_DCACHE` on all NXP ADSP SOCs.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Check the driver configuration to disable
the USB Type-C dead battery, only if
- a USB PD system is in place (the UCPD node is enabled)
- or the user does not require USB PHY anyway
Signed-off-by: Francois Ramu <francois.ramu@st.com>
In case the core is not power gated, waiti will restore intlevel. In
this case we lock interruption after it.
In the bug scenario, the host starts streaming and via SOF APIs, keeps a
lock to prevent Zephyr from entering PM_STATE_RUNTIME_IDLE. During the
test case, host removes this block and core0 is allowed to enter IDLE
state.
When core0 enters power gated state, interrrupts are left enabled (so
the core can be woken up when something happens). This leaves a race
where suitably timed interrupt will actually block entry to power gated
state and k_cpu_idle() in power_gate_entry() will return. This is rare,
but happens often enough that the relatively short test plan run on SOF
pull-requests will trigger this case.
Fixes#69807
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>