soc: nxp: convert iMX7 Dual core to HWMv2

Convert iMX7 Dual core to HWMv2. As in HWMv1, Only M4 core is supported
by this port.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse
2024-02-29 19:22:34 +00:00
committed by Jamie
parent 29ef2f23eb
commit fc835d893d
15 changed files with 87 additions and 85 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2017, NXP
# Copyright 2017,2024 NXP
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -9,4 +9,6 @@ zephyr_sources(
soc_clk_freq.c
)
zephyr_include_directories(.)
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "")

16
soc/nxp/imx/imx7d/Kconfig Normal file
View File

@@ -0,0 +1,16 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_IMX7D
select ARM
select CPU_CORTEX_M4
select CPU_CORTEX_M_HAS_DWT
select CLOCK_CONTROL
select CPU_HAS_FPU
select CPU_HAS_ARM_MPU
config SOC_MCIMX7D_M4
select HAS_IMX_HAL
select HAS_IMX_GPIO
select HAS_IMX_I2C
select HAS_IMX_IOMUXC

View File

@@ -0,0 +1,18 @@
# iMX7 core series
# Copyright 2017,2024 NXP
# SPDX-License-Identifier: Apache-2.0
if SOC_SERIES_IMX7D
config NUM_IRQS
# must be >= the highest interrupt number used
default 127
config PINCTRL_IMX
default y if HAS_IMX_IOMUXC
depends on PINCTRL
rsource "Kconfig.defconfig.*"
endif # SOC_SERIES_IMX7D

View File

@@ -1,12 +1,9 @@
# iMX7 M4 core series
# Copyright (c) 2017, NXP
# Copyright 2017,2024 NXP
# SPDX-License-Identifier: Apache-2.0
if SOC_MCIMX7_M4
config SOC
default "mcimx7d"
if SOC_MCIMX7D_M4
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 200000000
@@ -14,4 +11,4 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
config GPIO
default y
endif # SOC_MCIMX7_M4
endif # SOC_MCIMX7D_M4

View File

@@ -0,0 +1,40 @@
# iMX7D core series
# Copyright 2017,2024 NXP
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_IMX7D
bool
select SOC_FAMILY_NXP_IMX
help
Enable support for iMX7D MCU series
config SOC_MCIMX7D
bool
select SOC_SERIES_IMX7D
config SOC_MCIMX7D_M4
bool
select SOC_MCIMX7D
help
NXP iMX7 Dual M4 Core
config SOC_SERIES
default "imx7d" if SOC_SERIES_IMX7D
config SOC
default "mcimx7d" if SOC_MCIMX7D
config SOC_PART_NUMBER_MCIMX7D7DVM10SC
bool
config SOC_PART_NUMBER_MCIMX7D5EVM10SC
bool
config SOC_PART_NUMBER_MCIMX7S3DVK08SA
bool
config SOC_PART_NUMBER
default "MCIMX7D7DVM10SC" if SOC_PART_NUMBER_MCIMX7D7DVM10SC
default "MCIMX7D5EVM10SC" if SOC_PART_NUMBER_MCIMX7D5EVM10SC
default "MCIMX7S3DVK08SA" if SOC_PART_NUMBER_MCIMX7S3DVK08SA

View File

@@ -50,3 +50,9 @@ family:
cpuclusters:
- name: a9
- name: m4
- name: imx7d
socs:
- name: mcimx7d
cpuclusters:
- name: a7
- name: m4

View File

@@ -1,21 +0,0 @@
# iMX7 M4 core series
# Copyright (c) 2017, NXP
# SPDX-License-Identifier: Apache-2.0
if SOC_SERIES_IMX7_M4
config SOC_SERIES
default "mcimx7_m4"
config NUM_IRQS
# must be >= the highest interrupt number used
default 127
config PINCTRL_IMX
default y if HAS_IMX_IOMUXC
depends on PINCTRL
source "soc/soc_legacy/arm/nxp_imx/mcimx7_m4/Kconfig.defconfig.mcimx7_m4"
endif # SOC_SERIES_IMX7_M4

View File

@@ -1,16 +0,0 @@
# iMX7 M4 core series
# Copyright (c) 2017, NXP
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_IMX7_M4
bool "i.MX7 M4 Core Series"
select ARM
select CPU_CORTEX_M4
select CPU_CORTEX_M_HAS_DWT
select SOC_FAMILY_IMX
select CLOCK_CONTROL
select CPU_HAS_FPU
select CPU_HAS_ARM_MPU
help
Enable support for i.MX7 M4 MCU series

View File

@@ -1,40 +0,0 @@
# iMX7 M4 core series
# Copyright (c) 2017, NXP
# SPDX-License-Identifier: Apache-2.0
choice
prompt "i.MX7 M4 Selection"
depends on SOC_SERIES_IMX7_M4
config SOC_MCIMX7_M4
bool "SOC_MCIMX7_M4"
select HAS_IMX_HAL
select HAS_IMX_GPIO
select HAS_IMX_I2C
select HAS_IMX_IOMUXC
endchoice
if SOC_MCIMX7_M4
config SOC_PART_NUMBER_MCIMX7D7DVM10SC
bool
config SOC_PART_NUMBER_MCIMX7D5EVM10SC
bool
config SOC_PART_NUMBER_MCIMX7S3DVK08SA
bool
config SOC_PART_NUMBER_IMX7_M4
string
default "MCIMX7D7DVM10SC" if SOC_PART_NUMBER_MCIMX7D7DVM10SC
default "MCIMX7D5EVM10SC" if SOC_PART_NUMBER_MCIMX7D5EVM10SC
default "MCIMX7S3DVK08SA" if SOC_PART_NUMBER_MCIMX7S3DVK08SA
help
This string holds the full part number of the SoC. It is a hidden option
that you should not set directly. The part number selection choice defines
the default value for this string.
endif # SOC_SERIES_IMX7_M4

View File

@@ -4,7 +4,7 @@ common:
tests:
libraries.libc.sprintf:
extra_args: CONF_FILE=prj.conf
filter: not CONFIG_SOC_MCIMX7_M4 and CONFIG_STDOUT_CONSOLE
filter: not CONFIG_SOC_MCIMX7D_M4 and CONFIG_STDOUT_CONSOLE
integration_platforms:
- qemu_x86
arch_exclude: posix