Add initialization of critical components for the RTL8752H
series.
Key initializations include:
- Realtek OS abstraction layer.
- Clock active mode settings.
- Power Management (PM).
- PHY modules.
- Bluetooth controller ROM initialization.
Note: A mechanism is introduced to synchronize the RAM Vector Table between
Realtek's ROM code (which writes raw ISRs) and Zephyr's interrupt
management subsystem (sw_isr_table).
Signed-off-by: Zhiyuan Tang <zhiyuan_tang@realsil.com.cn>
- Add NBU pinmux to configure HDI mode with external radio
- Define nbu_handler to the MU interrupt handler
- Enable TSTMR0 clock at init
- Enable connectivity framework, MCMGR, rpmsg-lite
- Enable MU driver when selecting NXP_RF_IMU
- Disable LPUART1 to avoid pin conflicts with radio interface
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
When using an external radio, we need to configure pins for HDI mode.
Since it's specific to NBU, we can add this control in the nxp_nbu
driver.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Define a shared memory section in STCM, this shared memory is used
to transmit data to the NBU core.
This shared STCM section must be used through non-secure address range
because the NBU core can only access non-secure memory regions, and
the main core must reference non-secure addresses in the data shared
with the NBU core.
Since the MCXW70 doesn't have an SMU2, reworked the sections.ld file
to use a macro-based approach to determine the node label.
This allows to differentiate devices that have SMU2 from those that
don't, while reusing the same sections.ld file.
Use "stcm_shared" as node label for MCXW70.
Use node status in sections.ld since all regions are not available
on all SoCs.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
- Configure FLEXSPI2 root clock using SYS_PLL3_PFD2 with divider 2
when FLEXSPI2 is enabled and not used for XIP flash
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add counter timer driver support for Realtek Bee series SoCs,
including RTL87x2G and RTL8752H.
This driver is based on the hardware timer and supports:
- Relative alarm configuration
- Top value configuration
Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
BOARD_GrantTRDCFullPermissions() flow:
- Request TRDC ownership via ELE for AON/MEGA/WAKEUP
- Apply SDK-aligned DAC (including TRDC3 MDAC assignments)
- Grant full access control settings for TRDC1/TRDC2
Refactor the implementation out of soc.c into a dedicated trdc_setup.c
file to keep soc.c focused on early init sequencing, and add it to the
SoC CMakeLists.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
- Gate off M7 clock before clearing M7_CFG[WAIT] (CPUWAIT) and gate
it back on after the deassert. (This is the process requirement
in RT118X RM)
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
The default value 0x200 wasn't compatible with IVT alignment which was
set to 0x400 due to large number of ISR.
Signed-off-by: Petr Buchta <petr.buchta@nxp.com>
The RW612 will enter PM_STATE_RUNTIME_IDLE mode when idle but the
average current is higher than expected. The expected current should be
around 15mA but the actual current is nearly 18mA.
By disabling AVPLL and TDDR clock in clock_init, the current of
PM_STATE_RUNTIME_IDLE mode is ok, which is around 15.5mA
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Select HAS_PM for RTS5912, this SoC supports PM and there's some
"default y" entries for it, resulting in a combination where PM is
selected and cannot be unselected.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Replaces usage of these deprecated macros with ones that support
fixed and mapped partition compatibles. Also includes an update to
hal_espressif which also (rightly or wrongly) has zephyr specific
code in it
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This change is being reverted as devices should be updated to use
the new zephyr,mapped-partitions binding instead in which the
ranges property should be used
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
SOC_IMX943_PM_MCORE had no dependency on NXP_SCMI_CPU_DOMAIN_HELPERS,
causing pm_mcore.c to be compiled even when the scmi_nxp_cpu_* symbols
were not built, resulting in undefined reference link failures.
Fix by adding depends on NXP_SCMI_CPU_DOMAIN_HELPERS to the Kconfig
entry, ensuring pm_mcore.c is only compiled when the full SCMI CPU
domain stack is present. With this change, enabling CONFIG_PM=y without
the required SCMI stack is caught at Kconfig level rather than failing
at link time.
Fixes#103992
Signed-off-by: Jjateen Gundesha <jjateen97@gmail.com>
Defining `__soc_handle_irq` (part of the code path run on every
interrupt) as a jump to `get_irq` introduces unnecessary latency to
interrupt handling and inflates code size. Since `get_irq` is not
otherwise called, rename it to `__soc_handle_irq` and delete the old
trampoline.
The signature of the function is changed to match the declaration of
`__soc_handle_irq`, which is possible since commit
495a3281d4679c19703810afbac9607d16ac6788 corrected its declaration.
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Set zephyr,system-timer = &lptmr0 in the MCX-W7x and MCX-W70 DTSI
/chosen nodes. lptmr1 remains available for use by the counter driver.
Both drivers can be active simultaneously since they use separate
hardware instances.
Update SYS_CLOCK_HW_CYCLES_PER_SEC in the MCX-W7xx SoC defconfig to
resolve the clock frequency from the chosen node path instead of the
lptmr0 nodelabel.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Set zephyr,system-timer = &lptmr1 in the i.MX95 DTSI /chosen node.
lptmr2 remains available for use by the counter driver. Both drivers
can be active simultaneously since they use separate hardware instances.
Default MCUX_LPTMR_TIMER to y in the i.MX95 SoC defconfig and resolve
SYS_CLOCK_HW_CYCLES_PER_SEC from the chosen node path instead of a
hard-coded node address.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Implementing the stm32wba power controller interface to manage
the ram retention in s2ram power state.
According the defined RAM, only the required pages will be retained.
This memory size can be modified by the overlay mechanism matching
the RAM required by the application and highlighted
in the building report.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
Set CONFIG_CODE_DATA_RELOCATION for cm33 core so
that code that needs to be executed from RAM rather
than ext flash gets properly relocated
Additionally, ensure that the SRAM memory allows code
to be executed from it so set the MPU appropriately.
This aligns the strategy with the cm55 core for which all
this is already in place but does it by properly
setting the MPU regions from the start.
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
Add a more generic function `soc_radio_init` to enable additional
operations to be performed as part of radio init.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Disable debug support when powering off through the SoC STANDBY
state to prevent draining current.
When CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP is enabled, debug remains
powered in standby state which is expected when sleeping but not when
powering off.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Disable debug support when powering off through the SoC STANDBY
state to prevent draining current.
When CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP is enabled, debug remains
powered in standby state which is expected when sleeping but not when
powering off.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Disable debug support when powering off through the SoC STANDBY
state to prevent draining current.
When CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP is enabled, debug remains
powered in standby state which is expected when sleeping but not when
powering off.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
When the system clock operates at 96MHz, the core voltage must be
raised to 1.1V to ensure stability.
This fixes spurious resets occuring mainly during clock initialization.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
This adds the CC1312R SoC by Texas Instruments, this requires virtually
no changes since the cc13x2_c26x2 family of SoCs already implement
everything.
One thing not yet enabled is the IEEE 802.15.4g Sub-GHz
driver for this SoC because I can't download SmartRF Studio
due to access constraints from TI.
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
Added Kconfig that allows enabling nRF91 anomaly 36
workaround. Added translation to MDK-based symbol
in mdk_config.h.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Add stm32mp215f SoC variants that are close to stm32mp25x with
less features but with optimized power consumption:
- rework SOC management to handle both stm32mp25x and stm32mp21x
- Fix NUM_IRQS where last usable IRQ is 311
- Factorize Kconfig
Signed-off-by: Christophe Guibout <christophe.guibout@st.com>
Add CONFIG_SOC_ATMEL_SAM_MCK_PRESCALLER to allow configure the
Master Clock (MCK) prescaler. This is needed for SAM4E which
requires a prescaler of 2 to achieve the correct clock frequency.
Changes:
- Add SOC_ATMEL_SAM_MCK_PRESCALLER Kconfig option with default of 2 for
SAM4E and 1 for other SAM series
- Fix SOC_ATMEL_SAM_PLLA_MULA default for SAM4E from 9 to 19 to achieve
120MHz: 12MHz * 20 / 2 = 120MHz
- Use CONFIG_SOC_ATMEL_SAM_MCK_PRESCALLER in SoC init for
SAM4E, SAM4S, SAMX7X
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Replace direct comparison of the DT `name` cell against kCLOCK_* SDK
enum values with KINETIS_SIM_CLOCK_DECODE_NAME(), which extracts the
clock_name field from the encoded id cell produced by KINETIS_SIM_CLOCK().
A local DT_CLOCK_NAME() helper wraps the decode for readability.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
When SHA is activated in the DT, configure it's register region with
strong ordered, read and write access.
Signed-off-by: Tony Han <tony.han@microchip.com>
The `gpio_stm32_configure()` function is used by both the GPIO and PINCTRL
drivers to configure I/O pins. Move it to the GPIO port manager module's
code so it can be shared properly and update both drivers accordingly.
With this change, the GPIO and PINCTRL drivers are completely decoupled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
On STM32 hardware, the GPIO port's MMIO interface is used for two purposes
which have their own separate Zephyr API: controlling the state of digital
I/O pins directly (GPIO API) and configuring I/O pins for a specific usage
(PINCTRL API). Historically, this was handled by having the PINCTRL driver
call inside the GPIO driver which works but creates a dependency loop.
Introduce a new `GPIO port manager` module in SoC-specific common code that
takes over various from the existing GPIO/PINCTRL drivers: GPIO port device
instantiation and `GPIO port index -> device` mapping respectively.
Modify the GPIO and PINCTRL drivers to make use of this GPIO port manager
module - a first step in decoupling both drivers from each other.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move the helper function which computes the LL pin value from a pin number
to the <stm32_gpio_shared.h> header as this function can be useful for
modules other than the GPIO driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move the ports list from the GPIO driver to a shared SoC-specific header.
This will allow reuse from other drivers such as pinctrl.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>