Enable the IEEE 802.15.4 radio on the BL70x (BL702) series: add the
ieee802154 devicetree node, compile the RF/platform shim, link the
lmac154/RF blobs, and place the timing-critical lmac154 .tcm_code in ITCM
(otherwise those input sections become orphans at an unloaded address).
Provide CONFIG_BT_HCI_DRIVER_LOG_LEVEL for 802.15.4-only builds so the
shared BLE/802.15.4 platform shim compiles without Bluetooth enabled.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Enable the IEEE 802.15.4 radio on the BL70xL (BL702L) series: add the
ieee802154 devicetree node, compile the RF/platform shim, place the
timing-critical lmac154 code in ITCM, and link the lmac154/RF blobs.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Enable the IEEE 802.15.4 radio on the BL61x (BL616) series: add the
ieee802154 devicetree node, RF/PHY init via the shared wl_api blobs, the
TCM code section, and link the lmac154 blob. The GLB reset / memcpy shims
required by the BL616 blobs live with the other HAL shims.
Signed-off-by: William Markezana <william.markezana@gmail.com>
When autostart is enabled for cpunet, move it to early hook.
There is no reason to start it so late (after POST_KERNEL).
RTC pretick setup is also moved there. It requires GPPI to be
initialized but it happens before early hook.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The NETC 1588 timer reference clock was configured to use the external
clock input by setting NETC_PORT_MISC_CFG[TMR_EXT_CLK_SEL]. That option
expects a dedicated clock to be wired to a chip pin on the board.
This should not be assumed for every board. Boards without such an
external clock have no signal on that input, so the 1588 timer reference
never runs. Accessing the NETC timer registers while its clock is
stopped hangs the CPU during early NETC bring-up, before the console is
up, producing a completely silent boot with no UART output.
Default to the internal 1588 timer clock instead, which is the reset
value and works on any board. Boards that do provide an external 1588
reference clock can set TMR_EXT_CLK_SEL to select it.
Signed-off-by: Tobias Aguiar <tobias.aguiarsilvadealmeida@nxp.com>
The NETC MDIO driver has no runtime dependency on the NETC Ethernet
driver. Requiring it prevented use cases where an external stack owns
the NETC Ethernet controller while Zephyr manages only the MDIO bus
and PHY drivers.
Drop the Ethernet driver dependency from the MDIO Kconfig. Relax the
NETC bring-up guards in board.c, soc.c, and the clock control driver to
cover MDIO_NXP_IMX_NETC as well, so the NETC clock roots and MII-mode
configuration run whenever either the Ethernet or the MDIO driver is
enabled. Extend the HAL netc component and its SoC sub-component to
build for MDIO-only configurations in the same way, by enabling
driver.netc and the SoC-specific sub-component when MDIO_NXP_IMX_NETC
is set.
Signed-off-by: Tobias Aguiar <tobias.aguiarsilvadealmeida@nxp.com>
when the devicetree prop timebase-frequency is set,
use it instead of the clock-frequency of the cpu. The vexiiriscv
can run in a seperate clock domain, but the time and the other
peripherals still run on the other slower frequency.
Needs: #120216
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
PIC32CM SG/GC has a 0x400 byte alignment requirement for the
vector table. The default ROM_START_OFFSET of 0x200 from
Kconfig.zephyr causes a mismatch between where MCUboot
jumps and where the vector table is located.
Signed-off-by: Cristian Guemes <cristian.guemes@microchip.com>
Replace scripts/kconfig/hardened.csv with a distributed YAML database.
The CSV format could not carry any explanation for its recommendations,
had no validation (a malformed line was silently dropped), no notion of
profiles, no ownership story, and no way to extend it out of tree.
The database now lives where the code lives: the central
scripts/kconfig/hardening.yaml defines the hardening profiles (plus
rules for top-level Kconfig symbols), and per-subsystem hardening.yaml
fragments next to the relevant Kconfig files carry the rules, so each
rule is reviewed by the maintainers of the code it hardens. Every rule
has a required rationale and optional references, supports exact-value
and integer min/max recommendations (STACK_POINTER_RANDOM is now
'>=100' instead of '==100'), and belongs to a profile: 'base' (memory
protection and inherently insecure features) or 'strict' (extends base
with debug/observability feature removal). The default profile is
'strict', matching the rule set the CSV checked.
hardenconfig is restructured around a serializable HardeningReport
model so results can be consumed programmatically, and gains:
- a Rationale column in the report
- profile selection:
west build -t hardenconfig -- -DHARDENCONFIG_PROFILE=base
- HARDENCONFIG_SHOW_ALL to also list PASS/NA results
- HARDENCONFIG_STRICT to exit non-zero on failures, for CI use
- HARDENCONFIG_JSON to write machine-readable results, including which
database file each rule came from
- HARDENCONFIG_EXTRA_SOURCES to layer out-of-tree database files that
may add profiles/rules and override in-tree ones
The EXPERIMENTAL/DEPRECATED/NOT_SECURE marker symbol detection is
preserved unchanged.
Three CSV entries are intentionally not carried over because they were
redundant: BT_CONN_DISABLE_SECURITY and BT_OOB_DATA_FIXED can only be
enabled together with BT_TESTING, and TIMER_RANDOM_GENERATOR together
with TEST_RANDOM_GENERATOR, all of which the database already
recommends disabling for the same profiles.
Behavioral fix: the CSV's DEBUG_COREDUMP line used '=' instead of ','
and was silently ignored, so CONFIG_DEBUG_COREDUMP was never actually
checked; it now is.
Also add tabulate to requirements-base.txt: hardenconfig has always
imported it, but it was only pulled in via other requirements files.
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Let the i.MX91 advertise CPU frequency scaling and declare the ARM_PLL
entry point the CCM driver calls. The shared i.MX9 P-state and ARM_PLL
code is built as soon as an ARM_PLL node is enabled, so nothing else is
needed here: the i.MX91 core clock is switched between the A55 clock root
and ARM_PLL the same way as on i.MX93, and the shared code selects the
name its HAL gives the CCM GPR_SHARED1 field rather than testing for a
SoC.
The i.MX91 has a single Cortex-A55, so the capability is not conditional
on SMP; only a cluster with more than one core is, because there the
subsystem has to drive every CPU with the same P-state. The spinlock and
the check that skips a rate already programmed stay, and are cheap on a
single core.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com>
Implement the CPU frequency scaling P-state driver for the i.MX9
Cortex-A55 cores whose ARM_PLL is programmed by Zephyr, and the ARM_PLL
programming it relies on.
cpu_freq_scale_ccm.c builds the P-state configs from the devicetree
performance states and applies one by setting the IMX_CCM_ARM_PLL_CLK
clock of the CCM driver. A P-state whose clock-frequency has no matching
ARM PLL operating point fails to build.
pll.c owns ARM_PLL: it takes the dividers from the operating points of
the nxp,imx9-arm-pll node, so the usable frequencies are data rather than
a table in the code, and a build assert rejects an operating point whose
dividers do not produce its clock-frequency. A rate change runs the cores
off a step clock, calls CLOCK_PllInit() and selects ARM_PLL again once it
has locked. The HAL initializes g_clockSourceFreq[] from a table that
assumes the reset dividers, so an init hook reads the dividers the boot
loader programmed and publishes the frequency ARM_PLL actually runs at
before the CCM driver is initialized.
ARM_PLL is a cluster resource shared by every Cortex-A55 core, so a
transition always moves the whole cluster: a spinlock serializes
concurrent requests and a request for the rate already programmed is
skipped, leaving the cluster reprogrammed once. The SoC therefore only
advertises the capability on SMP builds, where the subsystem drives every
CPU with the same P-state.
The i.MX9 parts that scale the core clock through SCMI do not build
either file.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com>
Add the SoC-side glue for the BL602 wifi4 firmware blob: AON RF
power-on, PHY power tables fed from devicetree, the firmware scheduler
task with the wifi_main bring-up wrap, MAC HW DMA-dead recovery, the
WIFI_RAM linker sections, and the IPC glue the wifi4 driver core hooks
into (shared-environment seeding, the E2A mailbox ISR, firmware quirk
workarounds and the TX path with the txl_cntrl_push redirect the blob
needs to put frames on air).
The bl60x_em_8kb_wifi.dtsi snippet enables the WiFi MAC alongside the
8 KB BLE exchange memory: EM keeps the top 8 KB of RAM and WIFI_RAM
covers the 32 KB below it at the vendor ram_wifi origin (0x42042000),
with all_ram/sram0 scaled down so the linker enforces the boundary.
Signed-off-by: William Markezana <william.markezana@gmail.com>
PSC3 uses the MCWDT as its tick source since it is enabled by default
on the board. This changes is to make the default timer be systick
and for it to switch over to use the MWCDT when entering suspend.
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
When using systick with companion lpm_timer, the systick freezes
when the device enters deep-sleep. Reset the sytick when
transitioning to improve tick accuracy.
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
The lpm_timer implementation is identical across pse84 and psc3 socs.
Consolidate them under a common directory.
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
- Expand the file doc block to describe the C0/C1 match cascade wake
alarm and the free-running C2 elapsed-time reference.
- Add explanatory comments to the MCWDT config fields and to the
enter/exit/init/ISR flow.
- Rename lpm_entry_count -> lpm_entry_c2 and MCWDT_RESET_TIME_US ->
MCWDT_ENABLE_DELAY_US so the identifiers match their actual use, and
correct the enable-delay comment to cite the TRM's 2 CLK_LF cycles.
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
- Set Counter 0 to NONE mode so a raw C0 match can no longer wake the
SoC early; only the Counter 1 alarm interrupt wakes it.
- Program the C0/C1 cascade match via Cy_MCWDT_SetMatch() instead of a
direct combined MCWDT_MATCH register write.
- Add cascade-settle loops that wait for the previous match to
propagate and skip the ambiguous near-live-count window, folding the
skipped ticks back into the delay so the total stays exact.
- Run the match update under irq_lock and snapshot the C2 elapsed
reference at the same instant.
- Clamp the requested delay to the programmable range and leave the
counters free-running (masked until armed) so timing is identical
across DeepSleep and the DeepSleep-RAM warm boot.
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Richard Mc Sweeney <Richard.McSweeney@infineon.com>
Skip the SAU init when running the MCUBoot as it
would interfere with the RRAM configuration.
This has no effect on the standalone secure image
because it will handle the SAU initialization itself and
had no impact for tf-m cases because the sau init is
handled by the SPE image itself.
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
The introduction of MCUBoot support adds a lot of corner cases for
the signing and merging of the final hex files.
In non tf-m cases the mcuboot app itself needs to have an mcuboot
format as expected by the extended boot, but the rest of the images
are handled through mcuboot configs.
In tf-m cases given the request to be able to validate and update SPE
and NSPE images independendtly, the signing and merging needs to
be updated so that both images have mcuboot metadata but get
flashed as a single image overall.
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
This commit adds MCUBoot partition support in the memory map
for kit_pse84_eval alongside the documentation of the new layout.
There is an overlay file needed for the mcuboot build
which is needed to select the correct flash node (different between
cm33s and an mcuboot image). Included are also conf files for
mcuboot specific configs which are meant to be a first example
for users. Additionally it excludes the MCUBoot case from the
build output adjust lma config which does not apply to RRAM apps.
For the external flash, write-block-size was corrected
to 16 which is the minimum block that can be programmed
maintaining correct ECC. 256 is the maximum page size
that can be programmed at once in a single operation and
was not the correct value to expose in the dt.
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
MCXW7x keeps every CMC SRAM bank powered in all modes, including banks the
linked image never uses. Add an opt-in feature
(CONFIG_SOC_MCXW7X_SHUTDOWN_UNUSED_RAM) that powers off, in all modes via
the CMC SRAMDIS register, every bank lying entirely above the top of used
RAM (_image_ram_end). Bank geometry comes from a new optional "sram-banks"
property on the nxp,cmc node, so the code is SoC-agnostic and the
VBAT-retained bank is omitted from the list. No-op under the default
arena size (-1, mask 0).
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Add the boot-time hardware setup the on-chip BLE controller requires:
- mark the Exchange Memory bus window (0x28000000) Bufferable in the
sysmap, since the bridge silently drops Strongly Ordered writes;
- select 32 KB of Exchange Memory (EM_SEL) in soc_prep_hook before
the controller heap is initialised;
- ungate the shared RF/PHY clock before mm_system_power_on.
Add bflb_rf_init() for PHY/RF calibration via the phyrf blob (xtal
frequency from DTS, crystal capcode from the AON register) and the
controller hardware port glue: stdout stubs, flash XIP read, IRQ
registration and efuse MAC helpers.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Factorize CMake instructions when programming an STM32 SoC based board
when TF-M is embedded: the HEX file merges non-secure and secure
firmware and the non-secure image must be programmed with the
flash secure address range due to target configuration set before
programming the flash which makes the flash non-secure address range
possibly not accessible.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
ENET_TIMER2 clock root, used for PTP timestamping, was
never configured. Configure both to 100 MHz since the ptp_timer is mostly
used to precisely time 1s. A 24 MHz timer would result in a rounding
error.
Add guards for both instances so each is only configured when its
devicetree node is present.
Signed-off-by: Mateo Ivankovic <mateo.ivankovic@inovex.de>
Update soc.c for support udphs
The udphs's hclk in sama7d65 is not fixed, it's a usbpll clock and needs
to be configured with correct clock rate before using.
Since the set_rate() function wasn't implemented in pmc driver, we have to
configure this usbpll clock in soc_early_init_hook(), and this usbpll clock
will be enabled or disabled in the udphs driver dynamically.
Signed-off-by: CHEN Xing <xing.chen@microchip.com>
Add delay function for sam soc
When function soc_early_init_hook() in soc.c is called, the pit
(the system timer) has not yet been activated, thus the k_busy_wait()
doesn't work now.
Here we added a cpu based delay function for soc_early_init_hook().
Signed-off-by: CHEN Xing <xing.chen@microchip.com>
Add clock control driver
Implement bootup clock initialization, on, off, configure and get_rate API
Signed-off-by: Sountharya P <Sountharya.P@microchip.com>
The kernel now defaults SYS_CLOCK_HW_CYCLES_PER_SEC to the CPU
timebase-frequency devicetree property, so the bflb, cva6 and ganga
SoC defaults doing the same are no longer needed.
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
With testing, there are lots of IPIs flying around which can
overwhelm the IDC block. Testing threads being spawned and
destroyed all the time results in lots of sched IPIs being
broadcasted. Further complicated the issue when MMU is also
enabled as there are now TLB shootdown IPI being broadcasted
all the time too. To make matters drastically worse is
the latest kernel IPI code change where it always preserves
the pending IPI bit for current CPU resulting in other CPUs
rushing in to send IPI back to the current CPU.
With all that said, enable CONFIG_IPI_OPTIMIZE to limit
sched IPIs to only relevant CPUs for scheduling purpose in
order to reduce hardware chatter. Experiments show that
things are working fine with up to 3 active CPUs without
CONFIG_IPI_OPTIMIZE, but more will always cause issue.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Introduce power control for GPIO port 4 to reduce power consumption when
not in use. The P4 pins are powered off by default if not enabled in the
device tree, addressing the issue of unnecessary current draw.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
common_clock_set_freq() was missing cases for IMX_CCM_USB_CLK and
IMX_CCM_USB_PHY_CLK, so mcux_ccm_set_subsys_rate() returned -ENOTSUP
whenever a UDC NXP EHCI driver instance requested these clocks during
udc_mcux_driver_preinit(). This left the USB device controller
uninitialized with no error surfaced to the application, only visible
as a silent "not ready" failure.
Add the two missing cases:
- IMX_CCM_USB_CLK: routed from the Hsio root, sourced from the
400 MHz SysPll1Pfd1Div2 and divided by 3 for ~133.33 MHz, the
closest achievable match to the requested 134 MHz.
- IMX_CCM_USB_PHY_CLK: routed from the UsbPhyBurunin root, same
400 MHz source divided by 8 for an exact 50 MHz. This root has no
dedicated LPCG gate.
Assisted-by: GitHub Copilot:claude-sonnet-5
Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
Implement xtensa_triple_fault_breadcrumb for Intel ADSP ACE and CAVS
platforms.
When a triple fault occurs, the assembly handler records EPC1,
EXCCAUSE | 0xdb1e0000, and DEPC into HP-SRAM window0 using literal-free
address construction compatible with Clang IAS.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Provide a strong xtensa_fatal_breadcrumb() override for Intel ADSP
platforms that writes the faulting PC, exception cause, and excvaddr
into the uncached HP-SRAM window0 alias.
The host driver prints window0[0] as firmware state and window0[1]
as status/error code during IPC timeouts. Latching the first fatal
exception preserves root-cause diagnostics across crash loops.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Define configuration symbols for enabling STM32 PSA Crypto Drivers.
CONFIG_USE_STM32_HAL_PSA_CRYPTO_DRIVERS is experimental, it is
disabled by default.
CONFIG_USE_STM32_HAL_PSA_CRYPTO_DRIVERS is a generic config switch
to embed or not STM32 PSA Crypto Drivers. Config switches are defined
per hardware resources in STM32 SoCs:
- CONFIG_USE_STM32_HAL_PSA_CRYPTO_DRIVERS_AES for STM32 AES
- CONFIG_USE_STM32_HAL_PSA_CRYPTO_DRIVERS_CRYP for STM32 CRYP
- CONFIG_USE_STM32_HAL_PSA_CRYPTO_DRIVERS_SAES for STM32 SAES
- CONFIG_USE_STM32_HAL_PSA_CRYPTO_DRIVERS_HASH for STM32 HASH
Enabling of one of those latter are conditioned to the presence
of a related enabled node in the DT and prevents the node is
integrated in the Zephyr native crypto framework.
STM32 RNG is out of scope since Zephyr integration of PSA Crypto
makes the PSA Crypto library to rely on the already existing STM32
entropy driver.
Update manifest to sync on the STM32 HAL module that provides
PSA Crypto drivers implementation for STM32 HASH and AES/CRYP/SAES
(transparent key).
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
On reset, the CH32V series starts executing from address 0x0 which is
aliased to the main flash. The startup code immediately jumps into the
corresponding non-aliased address at 0x08000000. This assumes that the
application is linked at the start of flash.
Add support for linking at a non-zero offset. This is required for
boards like the Comu that use the first 2 KiB for a bootloader.
Signed-off-by: Michael Hope <michaelh@juju.nz>
Add CONFIG_ESP_MBEDTLS_HEAP_ALLOC_EXT_RAM, a convenience option for
Espressif SoCs with external RAM (PSRAM). When enabled it selects
MBEDTLS_HEAP_CUSTOM_SECTION, placing the mbed TLS heap in the
.mbedtls_heap linker section that the esp32, esp32c5, esp32c61,
esp32p4, esp32s2 and esp32s3 linker scripts already map into their
PSRAM memory region. This frees internal SRAM for other allocations
and lets MBEDTLS_HEAP_SIZE grow well beyond what internal RAM alone
can provide, which matters for TLS handshakes (e.g. MQTT over TLS)
on memory-constrained boards.
The option is defined next to ESP_SPIRAM in soc/espressif/common,
rather than in the generic tf-psa-crypto Kconfig, since it is an
Espressif-specific convenience symbol and only makes sense on SoCs
that both support PSRAM and already wire .mbedtls_heap into their
linker scripts.
It depends explicitly on MBEDTLS_ENABLE_HEAP: since it lives outside
the Mbed TLS Kconfig tree, its "select" of MBEDTLS_HEAP_CUSTOM_SECTION
would otherwise not be gated by that symbol's own
(MBEDTLS_ENABLE_HEAP && MBEDTLS) dependency. Kconfig's "select" does
not respect a target's "depends on", so enabling PSRAM and this
option while leaving Mbed TLS disabled would otherwise produce a
fatal Kconfig warning:
warning: MBEDTLS_HEAP_CUSTOM_SECTION ... has direct dependencies
(MBEDTLS_ENABLE_HEAP && MBEDTLS) ... with value n, but is
currently being y-selected by ESP_MBEDTLS_HEAP_ALLOC_EXT_RAM ...
Verified with a real board configure (esp32s3_eye) that PSRAM-only
builds with Mbed TLS disabled configure cleanly, and that builds
with MBEDTLS_ENABLE_HEAP=y still select MBEDTLS_HEAP_CUSTOM_SECTION
as expected.
Signed-off-by: Pedro Ramos <pedrohq.r@hotmail.com>
Assisted-by: Claude-Code:Sonnet-5 [Read] [Edit] [Bash]
Complete soc.yml and Kconfig.soc to add stm32mp13 SoC variants
newly added in device trees.
Note: today only stm32mp135f_dk is upstreamed so other variants
are not used in today's tests.
Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
Storing the Bluetooth identity through settings writes to flash
from the system workqueue and peaks at about 1.3-1.5 KiB on
Espressif SoCs, overflowing the 1 KiB default into the adjacent
stack. Raise the default to 2048 when BT_SETTINGS is enabled.
The Bluetooth shell peaks above the 2 KiB shell stack default
during bt init, so raise it to 4096 when BT_SHELL is enabled.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
RT266x boots from an AHAB container at a fixed 0x1000 offset
(ROM-mandated, not user-configurable), so hard-code that value
rather than adding a new Kconfig symbol. RT118x continues to
use CONFIG_IMAGE_CONTAINER_OFFSET unchanged.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add the i.MX RT266x SoC series for the single Cortex-M85 core: SoC
Kconfig and defconfig, the memory linker script, the pinctrl SoC glue,
and the early bring-up in soc.c. The clock bring-up programs every CGU
root to its steady state in the early init hook, before the clock
controller runs, reading the steady-state values back from devicetree.
Register RT266x in soc.yml and extend the shared boot-header linker
script to emit the RT266x boot container.
The pinctrl SoC glue comes with a dedicated nxp,mcux-rt266x-pinctrl
binding: RT266x drives each pad through a single combined IOMUXC PIO
register whose PULLENA polarity and four-level drive-strength / slew-rate
encodings differ from the RT11xx parts, so it cannot reuse the RT11xx
binding. drive-strength is expressed as named impedances ("100-ohm" /
"66-ohm" / "50-ohm" / "33-ohm") and slew-rate as low/medium/fast/high,
both ordered to map directly onto the register fields.
Only the PIO5/PIO6/PIO7 pads have a DRIVE field, and only the others have
ODENA, so the glue writes a field a pad does not have. Asking for one is
a mistake rather than a no-op, so a build assertion per pin rejects
drive-strength on a pad without DRIVE and drive-open-drain on a pad
without ODENA, instead of silently dropping the request.
The core implements double-precision floating point and both Helium
extensions, so the series selects CPU_HAS_FPU_DOUBLE_PRECISION,
ARMV8_1_M_MVEI and ARMV8_1_M_MVEF together with FPU. Both L1 caches are
enabled from the early init hook, which SystemInit() leaves off.
The clock bring-up window parks both XSPI controllers, so no PSRAM or NOR
XIP access is permitted while it runs. Its functions live in ITCM and are
marked noinline: the section attribute alone does not keep the compiler
from inlining them into their flash-resident caller, which would leave
.itcm empty and run the park sequence out of the flash it just disabled.
The stacks the window uses are in DTCM through the board's
zephyr,kernel-stacks chosen node, so no stack-switch trampoline is
needed.
Register the S3MU_Type and LLC_Type HAL types in the checkpatch
typedefs file: soc.c dereferences them as "Type *const", but their
typedefs live in the HAL headers outside the commit diff, so checkpatch
otherwise misreads the '*' as multiplication and reports a spurious
SPACING error.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add the pin controller for the MT8188, with the full pin table and the
devicetree macros that turn a pinmux property into a pin and function pair.
The register window is mapped with device_map() at PRE_KERNEL_1 priority 0
rather than reached through its physical address. There is no struct
device to hang DEVICE_MMIO off, because pinctrl_configure_pins() is called
from other drivers' init before any pin controller device would exist, but
the window still has to be mapped rather than assumed; a static
mmu_regions.c entry would do the same job less portably and only on arm64.
The cluster directory goes on the include path here because the pinctrl
framework includes pinctrl_soc.h, which this commit adds.
Co-authored-by: Felix Freimann <felix.freimann@mediatek.com>
Signed-off-by: Aary Patil <aary.patil@mediatek.com>
Describe the Cortex-A55 cluster of the MT8188 alongside the audio DSP that
already lives on this die: soc.yml gains the cluster, and a Kconfig.soc
symbol, an arm64 selects block and a defconfig follow it.
The timer frequency is deliberately not set here. The cluster selects
TIMER_READS_ITS_FREQUENCY_AT_RUNTIME, so the architected timer publishes
CNTFRQ_EL0 into z_clock_hw_cycles_per_sec during its own init and
sys_clock_hw_cycles_per_sec() reads that, not the Kconfig value.
Signed-off-by: Aary Patil <aary.patil@mediatek.com>
The family symbol carried the Xtensa selects and guarded the
Kconfig.defconfig body. That was accurate while every cpucluster in the
family was an audio DSP, but the same dies carry Arm cpuclusters, which
cannot join the family without inheriting an Xtensa toolchain. Move the
architecture selects onto the cpucluster symbols, so a cpucluster asks for
the architecture it runs, and move the shared audio DSP defaults into
common/adsp beside the sources they configure, sourced by each audio DSP
cpucluster from its own defconfig.
The family symbol is left describing the silicon rather than one cpucluster
type, and no symbol stands for "this is an audio DSP": the cpuclusters that
are one say so themselves. A cpucluster on another architecture, or a chip
in the family with no audio DSP at all, needs nothing added here. No
functional change: all five DSP targets produce byte-identical images.
Signed-off-by: Aary Patil <aary.patil@mediatek.com>
The family directory held eight audio DSP files - the soc, irq, mailbox and
IPI sources, the shared header, the shared linker script and the two image
tools - beside the Kconfig files that describe the family as a whole. That
read correctly while every cpucluster in the family was an audio DSP, and
stops reading correctly as soon as one is not. Move them under common/adsp
and give each SoC a CMakeLists for the cpucluster files it owns: its own
cpuclk.c where it has one, and its own linker script. The shared directory
is entered only for the cpuclusters that need it.
Each cpucluster has a thin soc.h and linker.ld including the shared ones,
so those relative paths move with them, and each SoC's CMakeLists puts its
cluster directory on the include path so <soc.h> still resolves. The load
script is named in the board documentation, so that path moves too. Pure
relocation otherwise: no source line changes beyond those shim includes.
Signed-off-by: Aary Patil <aary.patil@mediatek.com>