soc: rpi_pico: Port to HWMv2

Ports the rpi_pico SoC configuration to hardware model version 2

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae
2024-01-11 10:13:23 +00:00
parent c2df4ca9cb
commit 42cff42c42
15 changed files with 44 additions and 45 deletions

View File

@@ -1,19 +0,0 @@
# Raspberry Pi RP2XXX MCU line
# Copyright (c) 2021 Nordic Semiconductor ASA
# Copyright (c) 2021 Yonatan Schachter
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_RP2XXX
bool "Raspberry Pi RP2 series MCU"
select ARM
select CPU_CORTEX_M0PLUS
select CPU_CORTEX_M_HAS_SYSTICK
select CPU_CORTEX_M_HAS_VTOR
select CPU_HAS_ARM_MPU
select SOC_FAMILY_RPI_PICO
select HAS_RPI_PICO
select XIP
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
help
Enable support for Raspberry Pi RP2 MCU series

View File

@@ -1,6 +1,7 @@
# Raspberry Pi (RP) MCU line
# Copyright (c) 2021 Nordic Semiconductor ASA
# Copyright (c) 2021 Yonatan Schachter
# SPDX-License-Identifier: Apache-2.0
source "soc/arm/rpi_pico/*/Kconfig.series"
rsource "*/Kconfig"

View File

@@ -5,7 +5,7 @@
if SOC_FAMILY_RPI_PICO
source "soc/arm/rpi_pico/*/Kconfig.defconfig.series"
rsource "*/Kconfig.defconfig"
config PINCTRL
default y

View File

@@ -1,18 +1,12 @@
# Raspberry Pi (RP) MCU line
# Copyright (c) 2021 Nordic Semiconductor ASA
# Copyright (c) 2021 Yonatan Schachter
# SPDX-License-Identifier: Apache-2.0
config SOC_FAMILY_RPI_PICO
bool
if SOC_FAMILY_RPI_PICO
config SOC_FAMILY
string
default "rpi_pico"
default "rpi_pico" if SOC_FAMILY_RPI_PICO
source "soc/arm/rpi_pico/*/Kconfig.soc"
endif # SOC_FAMILY_RPI_PICO
rsource "*/Kconfig.soc"

View File

@@ -5,4 +5,6 @@ zephyr_library()
zephyr_library_sources(soc.c)
zephyr_include_directories(.)
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")

View File

@@ -4,14 +4,17 @@
# Copyright (c) 2021 Yonatan Schachter
# SPDX-License-Identifier: Apache-2.0
choice
prompt "RP2xxx MCU Selection"
depends on SOC_SERIES_RP2XXX
config SOC_RP2040
bool "Raspberry Pi RP2040"
endchoice
config SOC_SERIES_RP2XXX
select ARM
select CPU_CORTEX_M0PLUS
select CPU_CORTEX_M_HAS_SYSTICK
select CPU_CORTEX_M_HAS_VTOR
select CPU_HAS_ARM_MPU
select HAS_RPI_PICO
select XIP
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
help
Enable support for Raspberry Pi RP2 MCU series
config RP2_REQUIRES_SECOND_STAGE_BOOT
bool

View File

@@ -6,10 +6,7 @@
if SOC_SERIES_RP2XXX
source "soc/arm/rpi_pico/rp2/Kconfig.defconfig.rp2*"
config SOC_SERIES
default "rp2"
rsource "Kconfig.defconfig.rp2*"
config NUM_IRQS
default 26

View File

@@ -3,10 +3,6 @@
# Copyright (c) 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config SOC
default "rp2040"
depends on SOC_RP2040
config BUILD_OUTPUT_UF2_USE_FLASH_BASE
default y if RP2_REQUIRES_SECOND_STAGE_BOOT

View File

@@ -0,0 +1,19 @@
# Raspberry Pi RP2XXX MCU line
# Copyright (c) 2021 Nordic Semiconductor ASA
# Copyright (c) 2021 Yonatan Schachter
# SPDX-License-Identifier: Apache-2.0
config SOC_RP2040
bool
select SOC_SERIES_RP2XXX
config SOC_SERIES_RP2XXX
bool
select SOC_FAMILY_RPI_PICO
config SOC_SERIES
default "rp2" if SOC_SERIES_RP2XXX
config SOC
default "rp2040" if SOC_SERIES_RP2XXX

View File

@@ -0,0 +1,6 @@
family:
- name: rpi_pico
series:
- name: rp2
socs:
- name: rp2040