From 1031a21088fffbebc55bdaa49af0fb8749f2e8b1 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Fri, 9 Feb 2024 21:50:32 +0100 Subject: [PATCH 01/12] soc: atmel: Port SAM family to HWMv2 Port all the Atmel SAM SoCs to HWMv2. Signed-off-by: Gerson Fernando Budke --- .../atmel_sam => atmel/sam}/CMakeLists.txt | 3 +- soc/atmel/sam/Kconfig | 12 ++ .../atmel_sam => atmel/sam}/Kconfig.defconfig | 12 +- soc/atmel/sam/Kconfig.soc | 10 ++ .../sam}/common/CMakeLists.txt | 2 + soc/atmel/sam/common/Kconfig | 96 ++++++++++ .../sam}/common/atmel_sam_dt.h | 0 .../sam}/common/pinctrl_soc.h | 0 .../sam}/common/pwm_fixup.h | 0 .../atmel_sam => atmel/sam}/common/soc_gpio.c | 0 .../atmel_sam => atmel/sam}/common/soc_gpio.h | 0 .../atmel_sam => atmel/sam}/common/soc_pmc.c | 0 .../atmel_sam => atmel/sam}/common/soc_pmc.h | 0 .../sam}/common/soc_power.c | 0 .../sam}/common/soc_poweroff.c | 0 .../sam}/common/soc_sam4l_gpio.c | 0 .../sam}/common/soc_sam4l_pm.c | 0 .../sam}/common/soc_sam4l_poweroff.c | 0 .../atmel_sam => atmel/sam}/common/soc_supc.c | 0 .../atmel_sam => atmel/sam}/common/soc_supc.h | 0 .../sam4l => atmel/sam/sam3x}/CMakeLists.txt | 3 + .../sam/sam3x/Kconfig} | 8 +- soc/atmel/sam/sam3x/Kconfig.defconfig | 14 ++ soc/atmel/sam/sam3x/Kconfig.soc | 43 +++++ .../arm/atmel_sam => atmel/sam}/sam3x/soc.c | 14 +- .../arm/atmel_sam => atmel/sam}/sam3x/soc.h | 20 +-- .../sam}/sam4e/CMakeLists.txt | 3 + .../sam/sam4e/Kconfig} | 8 +- soc/atmel/sam/sam4e/Kconfig.defconfig | 13 ++ soc/atmel/sam/sam4e/Kconfig.soc | 37 ++++ .../arm/atmel_sam => atmel/sam}/sam4e/soc.c | 14 +- .../arm/atmel_sam => atmel/sam}/sam4e/soc.h | 21 ++- .../sam3x => atmel/sam/sam4l}/CMakeLists.txt | 3 + soc/atmel/sam/sam4l/Kconfig | 10 ++ soc/atmel/sam/sam4l/Kconfig.defconfig | 9 + soc/atmel/sam/sam4l/Kconfig.soc | 107 +++++++++++ .../arm/atmel_sam => atmel/sam}/sam4l/soc.c | 0 .../arm/atmel_sam => atmel/sam}/sam4l/soc.h | 44 ++--- .../sam}/sam4s/CMakeLists.txt | 3 + .../sam/sam4s/Kconfig} | 9 +- soc/atmel/sam/sam4s/Kconfig.defconfig | 13 ++ soc/atmel/sam/sam4s/Kconfig.soc | 74 ++++++++ .../arm/atmel_sam => atmel/sam}/sam4s/soc.c | 14 +- .../arm/atmel_sam => atmel/sam}/sam4s/soc.h | 37 ++-- .../sam}/same70/CMakeLists.txt | 3 + soc/atmel/sam/same70/Kconfig | 19 ++ soc/atmel/sam/same70/Kconfig.defconfig | 13 ++ soc/atmel/sam/same70/Kconfig.soc | 122 +++++++++++++ .../arm/atmel_sam => atmel/sam}/same70/soc.c | 16 +- .../arm/atmel_sam => atmel/sam}/same70/soc.h | 46 ++--- .../sam}/same70/soc_config.c | 49 ++--- .../sam}/samv71/CMakeLists.txt | 3 + soc/atmel/sam/samv71/Kconfig | 19 ++ soc/atmel/sam/samv71/Kconfig.defconfig | 13 ++ soc/atmel/sam/samv71/Kconfig.soc | 122 +++++++++++++ .../arm/atmel_sam => atmel/sam}/samv71/soc.c | 14 +- .../arm/atmel_sam => atmel/sam}/samv71/soc.h | 47 +++-- .../sam}/samv71/soc_config.c | 52 +++--- soc/atmel/sam/soc.yml | 89 ++++++++++ soc/soc_legacy/arm/atmel_sam/Kconfig | 19 -- soc/soc_legacy/arm/atmel_sam/Kconfig.soc | 6 - .../atmel_sam/sam3x/Kconfig.defconfig.series | 27 --- .../arm/atmel_sam/sam3x/Kconfig.soc | 89 ---------- .../atmel_sam/sam4e/Kconfig.defconfig.series | 33 ---- .../arm/atmel_sam/sam4e/Kconfig.soc | 91 ---------- .../atmel_sam/sam4l/Kconfig.defconfig.series | 44 ----- .../arm/atmel_sam/sam4l/Kconfig.series | 19 -- .../arm/atmel_sam/sam4l/Kconfig.soc | 61 ------- .../atmel_sam/sam4s/Kconfig.defconfig.series | 32 ---- .../arm/atmel_sam/sam4s/Kconfig.soc | 111 ------------ .../atmel_sam/same70/Kconfig.defconfig.series | 41 ----- .../arm/atmel_sam/same70/Kconfig.series | 28 --- .../arm/atmel_sam/same70/Kconfig.soc | 167 ----------------- .../atmel_sam/samv71/Kconfig.defconfig.series | 41 ----- .../arm/atmel_sam/samv71/Kconfig.series | 28 --- .../arm/atmel_sam/samv71/Kconfig.soc | 168 ------------------ 76 files changed, 1062 insertions(+), 1226 deletions(-) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/CMakeLists.txt (62%) create mode 100644 soc/atmel/sam/Kconfig rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/Kconfig.defconfig (75%) create mode 100644 soc/atmel/sam/Kconfig.soc rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/CMakeLists.txt (90%) create mode 100644 soc/atmel/sam/common/Kconfig rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/atmel_sam_dt.h (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/pinctrl_soc.h (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/pwm_fixup.h (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_gpio.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_gpio.h (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_pmc.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_pmc.h (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_power.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_poweroff.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_sam4l_gpio.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_sam4l_pm.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_sam4l_poweroff.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_supc.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/common/soc_supc.h (100%) rename soc/{soc_legacy/arm/atmel_sam/sam4l => atmel/sam/sam3x}/CMakeLists.txt (64%) rename soc/{soc_legacy/arm/atmel_sam/sam3x/Kconfig.series => atmel/sam/sam3x/Kconfig} (62%) create mode 100644 soc/atmel/sam/sam3x/Kconfig.defconfig create mode 100644 soc/atmel/sam/sam3x/Kconfig.soc rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam3x/soc.c (86%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam3x/soc.h (75%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam4e/CMakeLists.txt (64%) rename soc/{soc_legacy/arm/atmel_sam/sam4e/Kconfig.series => atmel/sam/sam4e/Kconfig} (57%) create mode 100644 soc/atmel/sam/sam4e/Kconfig.defconfig create mode 100644 soc/atmel/sam/sam4e/Kconfig.soc rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam4e/soc.c (86%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam4e/soc.h (74%) rename soc/{soc_legacy/arm/atmel_sam/sam3x => atmel/sam/sam4l}/CMakeLists.txt (64%) create mode 100644 soc/atmel/sam/sam4l/Kconfig create mode 100644 soc/atmel/sam/sam4l/Kconfig.defconfig create mode 100644 soc/atmel/sam/sam4l/Kconfig.soc rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam4l/soc.c (100%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam4l/soc.h (84%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam4s/CMakeLists.txt (64%) rename soc/{soc_legacy/arm/atmel_sam/sam4s/Kconfig.series => atmel/sam/sam4s/Kconfig} (51%) create mode 100644 soc/atmel/sam/sam4s/Kconfig.defconfig create mode 100644 soc/atmel/sam/sam4s/Kconfig.soc rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam4s/soc.c (87%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/sam4s/soc.h (63%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/same70/CMakeLists.txt (66%) create mode 100644 soc/atmel/sam/same70/Kconfig create mode 100644 soc/atmel/sam/same70/Kconfig.defconfig create mode 100644 soc/atmel/sam/same70/Kconfig.soc rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/same70/soc.c (88%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/same70/soc.h (58%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/same70/soc_config.c (51%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/samv71/CMakeLists.txt (66%) create mode 100644 soc/atmel/sam/samv71/Kconfig create mode 100644 soc/atmel/sam/samv71/Kconfig.defconfig create mode 100644 soc/atmel/sam/samv71/Kconfig.soc rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/samv71/soc.c (90%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/samv71/soc.h (57%) rename soc/{soc_legacy/arm/atmel_sam => atmel/sam}/samv71/soc_config.c (51%) create mode 100644 soc/atmel/sam/soc.yml delete mode 100644 soc/soc_legacy/arm/atmel_sam/Kconfig delete mode 100644 soc/soc_legacy/arm/atmel_sam/Kconfig.soc delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.defconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.soc delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.defconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.soc delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.defconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.soc delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.defconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.soc delete mode 100644 soc/soc_legacy/arm/atmel_sam/same70/Kconfig.defconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/same70/Kconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/same70/Kconfig.soc delete mode 100644 soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.defconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.series delete mode 100644 soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.soc diff --git a/soc/soc_legacy/arm/atmel_sam/CMakeLists.txt b/soc/atmel/sam/CMakeLists.txt similarity index 62% rename from soc/soc_legacy/arm/atmel_sam/CMakeLists.txt rename to soc/atmel/sam/CMakeLists.txt index d02e74e706b4af..b379b725d92b0c 100644 --- a/soc/soc_legacy/arm/atmel_sam/CMakeLists.txt +++ b/soc/atmel/sam/CMakeLists.txt @@ -1,8 +1,9 @@ # Makefile - Atmel SAM MCU family # # Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 # +add_subdirectory(common) add_subdirectory(${SOC_SERIES}) -add_subdirectory_ifdef(CONFIG_ASF common) diff --git a/soc/atmel/sam/Kconfig b/soc/atmel/sam/Kconfig new file mode 100644 index 00000000000000..1154f04961af90 --- /dev/null +++ b/soc/atmel/sam/Kconfig @@ -0,0 +1,12 @@ +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_FAMILY_SAM + select ASF + select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE + +if SOC_FAMILY_SAM + +rsource "*/Kconfig" + +endif # SOC_FAMILY_SAM diff --git a/soc/soc_legacy/arm/atmel_sam/Kconfig.defconfig b/soc/atmel/sam/Kconfig.defconfig similarity index 75% rename from soc/soc_legacy/arm/atmel_sam/Kconfig.defconfig rename to soc/atmel/sam/Kconfig.defconfig index 6c328866a95b0b..8cf4c2ba4d2ebe 100644 --- a/soc/soc_legacy/arm/atmel_sam/Kconfig.defconfig +++ b/soc/atmel/sam/Kconfig.defconfig @@ -1,21 +1,25 @@ # Atmel SAM MCU family default configuration options # Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 -source "soc/soc_legacy/arm/atmel_sam/*/Kconfig.defconfig.series" - if SOC_FAMILY_SAM -config SYS_CLOCK_HW_CYCLES_PER_SEC - default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency) +rsource "*/Kconfig.defconfig" config CLOCK_CONTROL default y +config GPIO + default y + config PINCTRL default y +config SYS_CLOCK_HW_CYCLES_PER_SEC + default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency) + config WATCHDOG default y diff --git a/soc/atmel/sam/Kconfig.soc b/soc/atmel/sam/Kconfig.soc new file mode 100644 index 00000000000000..e52a46a1dc7bd3 --- /dev/null +++ b/soc/atmel/sam/Kconfig.soc @@ -0,0 +1,10 @@ +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_FAMILY_SAM + bool + +config SOC_FAMILY + default "atmel_sam" if SOC_FAMILY_SAM + +rsource "*/Kconfig.soc" diff --git a/soc/soc_legacy/arm/atmel_sam/common/CMakeLists.txt b/soc/atmel/sam/common/CMakeLists.txt similarity index 90% rename from soc/soc_legacy/arm/atmel_sam/common/CMakeLists.txt rename to soc/atmel/sam/common/CMakeLists.txt index 3fe8bdd1d6d21b..8f53f047230063 100644 --- a/soc/soc_legacy/arm/atmel_sam/common/CMakeLists.txt +++ b/soc/atmel/sam/common/CMakeLists.txt @@ -1,6 +1,8 @@ +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 zephyr_include_directories(.) + zephyr_library_sources_ifndef(CONFIG_SOC_SERIES_SAM4L soc_pmc.c) zephyr_library_sources_ifndef(CONFIG_SOC_SERIES_SAM4L soc_gpio.c) zephyr_library_sources_ifndef(CONFIG_SOC_SERIES_SAM4L soc_supc.c) diff --git a/soc/atmel/sam/common/Kconfig b/soc/atmel/sam/common/Kconfig new file mode 100644 index 00000000000000..def4e019379d19 --- /dev/null +++ b/soc/atmel/sam/common/Kconfig @@ -0,0 +1,96 @@ +# Atmel SAM MCU series general configuration options + +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +if SOC_FAMILY_SAM && !SOC_SERIES_SAM4L + +menu "Clocks" + +config SOC_ATMEL_SAM_EXT_SLCK + bool "Use external crystal oscillator for slow clock" + help + Says y if you want to use external 32 kHz crystal oscillator to drive + the slow clock. Note that this adds a few seconds to boot time, as the + crystal needs to stabilize after power-up. + + Says n if you do not need accurate and precise timers. The slow clock + will be driven by the internal fast RC oscillator running at 32 kHz. + +config SOC_ATMEL_SAM_EXT_MAINCK + bool "Use external crystal oscillator for main clock" + default y + help + The main clock is being used to drive the PLL, and thus driving the + processor clock. + + Says y if you want to use external crystal oscillator to drive the + main clock. Note that this adds about a second to boot time, as the + crystal needs to stabilize after power-up. + + The crystal used here can be from 3 to 20 MHz. + + Says n here will use the internal fast RC oscillator running at 12 MHz. + +menu "PLL A" + +config SOC_ATMEL_SAM_PLLA_MULA + int "PLL MULA" + default 6 if SOC_SERIES_SAM3X + default 9 if SOC_SERIES_SAM4S || SOC_SERIES_SAM4E + default 24 if SOC_SERIES_SAME70 || SOC_SERIES_SAMV71 + range 1 62 + help + This is the multiplier (MULA) used by the PLL. + The processor clock is (MAINCK * (MULA + 1) / DIVA). + + Board config file can override this settings for a particular board. + + With default of MULA == N, and DIVA == 1 the PLL will run at N+1 times + the main clock frequency. + +config SOC_ATMEL_SAM_PLLA_DIVA + int "PLL DIVA" + default 1 + range 1 255 + help + This is the divider (DIVA) used by the PLL. + The processor clock is (MAINCK * (MULA + 1) / DIVA). + + Board config file can override this settings + for a particular board. + + With default of MULA == N, and DIVA == 1 the PLL will run at N+1 times + the main clock frequency. + +config SOC_ATMEL_SAM_MDIV + int "MDIV" + depends on SOC_SERIES_SAME70 || SOC_SERIES_SAMV71 + default 2 + range 1 4 + help + This divisor defines a ratio between processor clock (HCLK) + and master clock (MCK) where the maximum value is 150MHz: + MCK = HCLK / MDIV + +endmenu # PLL A +endmenu # clocks + +config SOC_ATMEL_SAM_WAIT_MODE + bool "CPU goes to Wait mode instead of Sleep mode" + depends on SOC_ATMEL_SAM_EXT_MAINCK + default y if DEBUG + help + For JTAG debugging CPU clock (HCLK) should not stop. In order to + achieve this, make CPU go to Wait mode instead of Sleep mode while + using external crystal oscillator for main clock. + +config SOC_ATMEL_SAM_DISABLE_ERASE_PIN + bool "Disable ERASE pin" + help + At reset ERASE pin is configured in System IO mode. Asserting the + ERASE pin at '1' will completely erase Flash memory. Setting this + option will switch the pin to general IO mode giving control of the + pin to the GPIO module. + +endif # SOC_FAMILY_SAM && !SOC_SERIES_SAM4L diff --git a/soc/soc_legacy/arm/atmel_sam/common/atmel_sam_dt.h b/soc/atmel/sam/common/atmel_sam_dt.h similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/atmel_sam_dt.h rename to soc/atmel/sam/common/atmel_sam_dt.h diff --git a/soc/soc_legacy/arm/atmel_sam/common/pinctrl_soc.h b/soc/atmel/sam/common/pinctrl_soc.h similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/pinctrl_soc.h rename to soc/atmel/sam/common/pinctrl_soc.h diff --git a/soc/soc_legacy/arm/atmel_sam/common/pwm_fixup.h b/soc/atmel/sam/common/pwm_fixup.h similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/pwm_fixup.h rename to soc/atmel/sam/common/pwm_fixup.h diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_gpio.c b/soc/atmel/sam/common/soc_gpio.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_gpio.c rename to soc/atmel/sam/common/soc_gpio.c diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_gpio.h b/soc/atmel/sam/common/soc_gpio.h similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_gpio.h rename to soc/atmel/sam/common/soc_gpio.h diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_pmc.c b/soc/atmel/sam/common/soc_pmc.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_pmc.c rename to soc/atmel/sam/common/soc_pmc.c diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_pmc.h b/soc/atmel/sam/common/soc_pmc.h similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_pmc.h rename to soc/atmel/sam/common/soc_pmc.h diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_power.c b/soc/atmel/sam/common/soc_power.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_power.c rename to soc/atmel/sam/common/soc_power.c diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_poweroff.c b/soc/atmel/sam/common/soc_poweroff.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_poweroff.c rename to soc/atmel/sam/common/soc_poweroff.c diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_sam4l_gpio.c b/soc/atmel/sam/common/soc_sam4l_gpio.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_sam4l_gpio.c rename to soc/atmel/sam/common/soc_sam4l_gpio.c diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_sam4l_pm.c b/soc/atmel/sam/common/soc_sam4l_pm.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_sam4l_pm.c rename to soc/atmel/sam/common/soc_sam4l_pm.c diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_sam4l_poweroff.c b/soc/atmel/sam/common/soc_sam4l_poweroff.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_sam4l_poweroff.c rename to soc/atmel/sam/common/soc_sam4l_poweroff.c diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_supc.c b/soc/atmel/sam/common/soc_supc.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_supc.c rename to soc/atmel/sam/common/soc_supc.c diff --git a/soc/soc_legacy/arm/atmel_sam/common/soc_supc.h b/soc/atmel/sam/common/soc_supc.h similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/common/soc_supc.h rename to soc/atmel/sam/common/soc_supc.h diff --git a/soc/soc_legacy/arm/atmel_sam/sam4l/CMakeLists.txt b/soc/atmel/sam/sam3x/CMakeLists.txt similarity index 64% rename from soc/soc_legacy/arm/atmel_sam/sam4l/CMakeLists.txt rename to soc/atmel/sam/sam3x/CMakeLists.txt index 7424bb9f7b9bc8..6a01266941a27f 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4l/CMakeLists.txt +++ b/soc/atmel/sam/sam3x/CMakeLists.txt @@ -1,5 +1,8 @@ +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 +zephyr_include_directories(.) + zephyr_sources( soc.c ) diff --git a/soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.series b/soc/atmel/sam/sam3x/Kconfig similarity index 62% rename from soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.series rename to soc/atmel/sam/sam3x/Kconfig index 08a3781b6d3ea1..1f66f4ef398178 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.series +++ b/soc/atmel/sam/sam3x/Kconfig @@ -3,19 +3,13 @@ # Copyright (c) 2014-2015 Wind River Systems, Inc. # Copyright (c) 2016 Intel Corporation. # Copyright (c) 2017 Justin Watson -# Copyright (c) 2023 Gerson Fernando Budke +# Copyright (c) 2023-2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 config SOC_SERIES_SAM3X - bool "Atmel SAM3X MCU" select ARM select CPU_CORTEX_M3 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU - select SOC_FAMILY_SAM select PLATFORM_SPECIFIC_INIT - select ASF select HAS_POWEROFF - help - Enable support for Atmel SAM3X Cortex-M3 microcontrollers. - Part No.: SAM3X8E diff --git a/soc/atmel/sam/sam3x/Kconfig.defconfig b/soc/atmel/sam/sam3x/Kconfig.defconfig new file mode 100644 index 00000000000000..7a41eb6fad74cd --- /dev/null +++ b/soc/atmel/sam/sam3x/Kconfig.defconfig @@ -0,0 +1,14 @@ +# Atmel SAM3X MCU series configuration options + +# Copyright (c) 2014-2015 Wind River Systems, Inc. +# Copyright (c) 2016 Intel Corporation. +# Copyright (c) 2017 Justin Watson +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +if SOC_SERIES_SAM3X + +config NUM_IRQS + default 45 + +endif # SOC_SERIES_SAM3X diff --git a/soc/atmel/sam/sam3x/Kconfig.soc b/soc/atmel/sam/sam3x/Kconfig.soc new file mode 100644 index 00000000000000..db700bd1a5b88b --- /dev/null +++ b/soc/atmel/sam/sam3x/Kconfig.soc @@ -0,0 +1,43 @@ +# Atmel SAM3X MCU series + +# Copyright (c) 2014-2015 Wind River Systems, Inc. +# Copyright (c) 2016 Intel Corporation. +# Copyright (c) 2017 Justin Watson +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAM3X + bool + select SOC_FAMILY_SAM + help + Enable support for Atmel SAM3X MCU Series + +config SOC_SERIES + default "sam3x" if SOC_SERIES_SAM3X + +config SOC_SAM3X4C + bool + select SOC_SERIES_SAM3X + +config SOC_SAM3X4E + bool + select SOC_SERIES_SAM3X + +config SOC_SAM3X8C + bool + select SOC_SERIES_SAM3X + +config SOC_SAM3X8E + bool + select SOC_SERIES_SAM3X + +config SOC_SAM3X8H + bool + select SOC_SERIES_SAM3X + +config SOC + default "sam3x4c" if SOC_SAM3X4C + default "sam3x4e" if SOC_SAM3X4E + default "sam3x8c" if SOC_SAM3X8C + default "sam3x8e" if SOC_SAM3X8E + default "sam3x8h" if SOC_SAM3X8H diff --git a/soc/soc_legacy/arm/atmel_sam/sam3x/soc.c b/soc/atmel/sam/sam3x/soc.c similarity index 86% rename from soc/soc_legacy/arm/atmel_sam/sam3x/soc.c rename to soc/atmel/sam/sam3x/soc.c index 9a20d566375317..08e803c4f1dae6 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam3x/soc.c +++ b/soc/atmel/sam/sam3x/soc.c @@ -1,8 +1,8 @@ /* * Copyright (c) 2013-2015 Wind River Systems, Inc. * Copyright (c) 2016 Intel Corporation. - * Copyright (c) 2023 Gerson Fernando Budke * Copyright (c) 2023 Basalte bv + * Copyright (c) 2023-2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ @@ -38,11 +38,11 @@ static ALWAYS_INLINE void clock_init(void) soc_pmc_enable_clock_failure_detector(); - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM3X_EXT_SLCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_SLCK)) { soc_supc_slow_clock_select_crystal_osc(); } - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM3X_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { /* * Setup main external crystal oscillator. */ @@ -78,8 +78,8 @@ static ALWAYS_INLINE void clock_init(void) * With Processor Clock prescaler at 1 * Processor Clock (HCLK) = 84 MHz. */ - soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAM3X_PLLA_MULA, 0x3Fu, - CONFIG_SOC_ATMEL_SAM3X_PLLA_DIVA); + soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAM_PLLA_MULA, 0x3Fu, + CONFIG_SOC_ATMEL_SAM_PLLA_DIVA); /* * Final setup of the Master Clock @@ -92,14 +92,14 @@ static ALWAYS_INLINE void clock_init(void) soc_pmc_mck_set_source(SOC_PMC_MCK_SRC_PLLA_CLK); /* Disable internal fast RC if we have an external crystal oscillator */ - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM3X_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { soc_pmc_osc_disable_fastrc(); } } void z_arm_platform_init(void) { - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM3X_WAIT_MODE)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* * Instruct CPU to enter Wait mode instead of Sleep mode to * keep Processor Clock (HCLK) and thus be able to debug diff --git a/soc/soc_legacy/arm/atmel_sam/sam3x/soc.h b/soc/atmel/sam/sam3x/soc.h similarity index 75% rename from soc/soc_legacy/arm/atmel_sam/sam3x/soc.h rename to soc/atmel/sam/sam3x/soc.h index 3fe78a7e6ba7b0..b47450ac052aea 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam3x/soc.h +++ b/soc/atmel/sam/sam3x/soc.h @@ -1,6 +1,7 @@ /* - * Copyright (c) 2016 Intel Corporation. * Copyright (c) 2013-2015 Wind River Systems, Inc. + * Copyright (c) 2016 Intel Corporation. + * Copyright (c) 2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ @@ -12,25 +13,24 @@ * drivers for core peripherals as well as symbols specific to Atmel SAM family. */ -#ifndef _ATMEL_SAM3X_SOC_H_ -#define _ATMEL_SAM3X_SOC_H_ +#ifndef _SOC_ATMEL_SAM_SAM3X_SOC_H_ +#define _SOC_ATMEL_SAM_SAM3X_SOC_H_ #ifndef _ASMLANGUAGE - #define DONT_USE_CMSIS_INIT #define DONT_USE_PREDEFINED_CORE_HANDLERS #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS -#if defined CONFIG_SOC_PART_NUMBER_SAM3X4C +#if defined(CONFIG_SOC_SAM3X4C) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAM3X4E +#elif defined(CONFIG_SOC_SAM3X4E) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAM3X8C +#elif defined(CONFIG_SOC_SAM3X8C) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAM3X8E +#elif defined(CONFIG_SOC_SAM3X8E) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAM3X8H +#elif defined(CONFIG_SOC_SAM3X8H) #include #else #error Library does not support the specified device. @@ -49,4 +49,4 @@ #endif /* _ASMLANGUAGE */ -#endif /* _ATMEL_SAM3X_SOC_H_ */ +#endif /* _SOC_ATMEL_SAM_SAM3X_SOC_H_ */ diff --git a/soc/soc_legacy/arm/atmel_sam/sam4e/CMakeLists.txt b/soc/atmel/sam/sam4e/CMakeLists.txt similarity index 64% rename from soc/soc_legacy/arm/atmel_sam/sam4e/CMakeLists.txt rename to soc/atmel/sam/sam4e/CMakeLists.txt index 7424bb9f7b9bc8..6a01266941a27f 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4e/CMakeLists.txt +++ b/soc/atmel/sam/sam4e/CMakeLists.txt @@ -1,5 +1,8 @@ +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 +zephyr_include_directories(.) + zephyr_sources( soc.c ) diff --git a/soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.series b/soc/atmel/sam/sam4e/Kconfig similarity index 57% rename from soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.series rename to soc/atmel/sam/sam4e/Kconfig index 93cc0e20a48365..57441f1eaef13b 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.series +++ b/soc/atmel/sam/sam4e/Kconfig @@ -2,20 +2,14 @@ # Copyright (c) 2017 Justin Watson # Copyright (c) 2018 Vincent van der Locht -# Copyright (c) 2019-2023 Gerson Fernando Budke +# Copyright (c) 2019-2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 config SOC_SERIES_SAM4E - bool "Atmel SAM4E MCU" select ARM select CPU_CORTEX_M4 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU select CPU_HAS_FPU - select SOC_FAMILY_SAM select PLATFORM_SPECIFIC_INIT - select ASF select HAS_POWEROFF - help - Enable support for Atmel SAM4E Cortex-M4 microcontrollers. - Part No.: SAM4E16E, SAM4E16C, SAM4E8E, SAM4E8C diff --git a/soc/atmel/sam/sam4e/Kconfig.defconfig b/soc/atmel/sam/sam4e/Kconfig.defconfig new file mode 100644 index 00000000000000..bb3d457731def6 --- /dev/null +++ b/soc/atmel/sam/sam4e/Kconfig.defconfig @@ -0,0 +1,13 @@ +# Atmel SAM4E MCU series configuration options + +# Copyright (c) 2017 Justin Watson +# Copyright (c) 2018 Vincent van der Locht +# Copyright (c) 2019-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +if SOC_SERIES_SAM4E + +config NUM_IRQS + default 47 + +endif # SOC_SERIES_SAM4E diff --git a/soc/atmel/sam/sam4e/Kconfig.soc b/soc/atmel/sam/sam4e/Kconfig.soc new file mode 100644 index 00000000000000..31acc8ccf28f11 --- /dev/null +++ b/soc/atmel/sam/sam4e/Kconfig.soc @@ -0,0 +1,37 @@ +# Atmel SAM4E MCU series + +# Copyright (c) 2017 Justin Watson +# Copyright (c) 2018 Vincent van der Locht +# Copyright (c) 2019-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAM4E + bool + select SOC_FAMILY_SAM + help + Enable support for Atmel SAM4E MCU series + +config SOC_SERIES + default "sam4e" if SOC_SERIES_SAM4E + +config SOC_SAM4E16E + bool + select SOC_SERIES_SAM4E + +config SOC_SAM4E16C + bool + select SOC_SERIES_SAM4E + +config SOC_SAM4E8E + bool + select SOC_SERIES_SAM4E + +config SOC_SAM4E8C + bool + select SOC_SERIES_SAM4E + +config SOC + default "sam4e16e" if SOC_SAM4E16E + default "sam4e16c" if SOC_SAM4E16C + default "sam4e8e" if SOC_SAM4E8E + default "sam4e8c" if SOC_SAM4E8C diff --git a/soc/soc_legacy/arm/atmel_sam/sam4e/soc.c b/soc/atmel/sam/sam4e/soc.c similarity index 86% rename from soc/soc_legacy/arm/atmel_sam/sam4e/soc.c rename to soc/atmel/sam/sam4e/soc.c index b1c8174fddcf61..82468f48738408 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4e/soc.c +++ b/soc/atmel/sam/sam4e/soc.c @@ -2,7 +2,7 @@ * Copyright (c) 2013-2015 Wind River Systems, Inc. * Copyright (c) 2016 Intel Corporation. * Copyright (c) 2017 Justin Watson - * Copyright (c) 2019-2023 Gerson Fernando Budke + * Copyright (c) 2019-2024 Gerson Fernando Budke * Copyright (c) 2023 Basalte bv * * SPDX-License-Identifier: Apache-2.0 @@ -40,11 +40,11 @@ static ALWAYS_INLINE void clock_init(void) soc_pmc_enable_clock_failure_detector(); - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM4E_EXT_SLCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_SLCK)) { soc_supc_slow_clock_select_crystal_osc(); } - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM4E_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { /* * Setup main external crystal oscillator. */ @@ -70,8 +70,8 @@ static ALWAYS_INLINE void clock_init(void) /* * Setup PLLA */ - soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAM4E_PLLA_MULA, 0x3Fu, - CONFIG_SOC_ATMEL_SAM4E_PLLA_DIVA); + soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAM_PLLA_MULA, 0x3Fu, + CONFIG_SOC_ATMEL_SAM_PLLA_DIVA); /* * Final setup of the Master Clock @@ -84,14 +84,14 @@ static ALWAYS_INLINE void clock_init(void) soc_pmc_mck_set_source(SOC_PMC_MCK_SRC_PLLA_CLK); /* Disable internal fast RC if we have an external crystal oscillator */ - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM4E_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { soc_pmc_osc_disable_fastrc(); } } void z_arm_platform_init(void) { - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM4E_WAIT_MODE)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* * Instruct CPU to enter Wait mode instead of Sleep mode to * keep Processor Clock (HCLK) and thus be able to debug diff --git a/soc/soc_legacy/arm/atmel_sam/sam4e/soc.h b/soc/atmel/sam/sam4e/soc.h similarity index 74% rename from soc/soc_legacy/arm/atmel_sam/sam4e/soc.h rename to soc/atmel/sam/sam4e/soc.h index 290653e148ab8d..78b42a231c0143 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4e/soc.h +++ b/soc/atmel/sam/sam4e/soc.h @@ -1,9 +1,9 @@ /* - * Copyright (c) 2019-2020 Gerson Fernando Budke + * Copyright (c) 2013-2015 Wind River Systems, Inc. + * Copyright (c) 2016 Intel Corporation. * Copyright (c) 2018 Vincent van der Locht * Copyright (c) 2017 Justin Watson - * Copyright (c) 2016 Intel Corporation. - * Copyright (c) 2013-2015 Wind River Systems, Inc. + * Copyright (c) 2019-2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ @@ -12,25 +12,24 @@ * @file SoC configuration macros for the Atmel SAM4E family processors. */ -#ifndef _ATMEL_SAM4E_SOC_H_ -#define _ATMEL_SAM4E_SOC_H_ +#ifndef _SOC_ATMEL_SAM_SAM4E_SOC_H_ +#define _SOC_ATMEL_SAM_SAM4E_SOC_H_ #include #ifndef _ASMLANGUAGE - #define DONT_USE_CMSIS_INIT #define DONT_USE_PREDEFINED_CORE_HANDLERS #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS -#if defined(CONFIG_SOC_PART_NUMBER_SAM4E16E) +#if defined(CONFIG_SOC_SAM4E16E) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4E16C) +#elif defined(CONFIG_SOC_SAM4E16C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4E8E) +#elif defined(CONFIG_SOC_SAM4E8E) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4E8C) +#elif defined(CONFIG_SOC_SAM4E8C) #include #else #error Library does not support the specified device. @@ -49,4 +48,4 @@ #endif /* !_ASMLANGUAGE */ -#endif /* _ATMEL_SAM4E_SOC_H_ */ +#endif /* _SOC_ATMEL_SAM_SAM4E_SOC_H_ */ diff --git a/soc/soc_legacy/arm/atmel_sam/sam3x/CMakeLists.txt b/soc/atmel/sam/sam4l/CMakeLists.txt similarity index 64% rename from soc/soc_legacy/arm/atmel_sam/sam3x/CMakeLists.txt rename to soc/atmel/sam/sam4l/CMakeLists.txt index 7424bb9f7b9bc8..6a01266941a27f 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam3x/CMakeLists.txt +++ b/soc/atmel/sam/sam4l/CMakeLists.txt @@ -1,5 +1,8 @@ +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 +zephyr_include_directories(.) + zephyr_sources( soc.c ) diff --git a/soc/atmel/sam/sam4l/Kconfig b/soc/atmel/sam/sam4l/Kconfig new file mode 100644 index 00000000000000..15ad8ba2583413 --- /dev/null +++ b/soc/atmel/sam/sam4l/Kconfig @@ -0,0 +1,10 @@ +# Copyright (c) 2020-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAM4L + select ARM + select CPU_CORTEX_M4 + select CPU_CORTEX_M_HAS_DWT + select CPU_HAS_ARM_MPU + select PLATFORM_SPECIFIC_INIT + select HAS_POWEROFF diff --git a/soc/atmel/sam/sam4l/Kconfig.defconfig b/soc/atmel/sam/sam4l/Kconfig.defconfig new file mode 100644 index 00000000000000..72116af1342c22 --- /dev/null +++ b/soc/atmel/sam/sam4l/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2020-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +if SOC_SERIES_SAM4L + +config NUM_IRQS + default 80 + +endif # SOC_SERIES_SAM4L diff --git a/soc/atmel/sam/sam4l/Kconfig.soc b/soc/atmel/sam/sam4l/Kconfig.soc new file mode 100644 index 00000000000000..bccacba2eb6588 --- /dev/null +++ b/soc/atmel/sam/sam4l/Kconfig.soc @@ -0,0 +1,107 @@ +# Copyright (c) 2020-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAM4L + bool + select SOC_FAMILY_SAM + help + Enable support for Atmel SAM4L Cortex-M4 microcontrollers. + Part No.: SAM4LS8C, SAM4LS8B, SAM4LS8A, SAM4LS4C, SAM4LS4B, + SAM4LS4A, SAM4LS2C, SAM4LS2B, SAM4LS2A, SAM4LC8C, SAM4LC8B, + SAM4LC8A, SAM4LC4C, SAM4LC4B, SAM4LC4A SAM4LC2C, SAM4LC2B, + SAM4LC2A + +config SOC_SERIES + default "sam4l" if SOC_SERIES_SAM4L + +config SOC_SAM4LS2A + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LS2B + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LS2C + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LS4A + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LS4B + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LS4C + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LS8A + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LS8B + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LS8C + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC2A + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC2B + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC2C + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC4A + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC4B + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC4C + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC8A + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC8B + bool + select SOC_SERIES_SAM4L + +config SOC_SAM4LC8C + bool + select SOC_SERIES_SAM4L + +config SOC + default "sam4ls2a" if SOC_SAM4LS2A + default "sam4ls2b" if SOC_SAM4LS2B + default "sam4ls2c" if SOC_SAM4LS2C + default "sam4ls4a" if SOC_SAM4LS4A + default "sam4ls4b" if SOC_SAM4LS4B + default "sam4ls4c" if SOC_SAM4LS4C + default "sam4ls8a" if SOC_SAM4LS8A + default "sam4ls8b" if SOC_SAM4LS8B + default "sam4ls8c" if SOC_SAM4LS8C + default "sam4lc2a" if SOC_SAM4LC2A + default "sam4lc2b" if SOC_SAM4LC2B + default "sam4lc2c" if SOC_SAM4LC2C + default "sam4lc4a" if SOC_SAM4LC4A + default "sam4lc4b" if SOC_SAM4LC4B + default "sam4lc4c" if SOC_SAM4LC4C + default "sam4lc8a" if SOC_SAM4LC8A + default "sam4lc8b" if SOC_SAM4LC8B + default "sam4lc8c" if SOC_SAM4LC8C diff --git a/soc/soc_legacy/arm/atmel_sam/sam4l/soc.c b/soc/atmel/sam/sam4l/soc.c similarity index 100% rename from soc/soc_legacy/arm/atmel_sam/sam4l/soc.c rename to soc/atmel/sam/sam4l/soc.c diff --git a/soc/soc_legacy/arm/atmel_sam/sam4l/soc.h b/soc/atmel/sam/sam4l/soc.h similarity index 84% rename from soc/soc_legacy/arm/atmel_sam/sam4l/soc.h rename to soc/atmel/sam/sam4l/soc.h index f044fc8363c81b..329178aa2884d1 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4l/soc.h +++ b/soc/atmel/sam/sam4l/soc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Gerson Fernando Budke + * Copyright (c) 2020-2024 Gerson Fernando Budke * SPDX-License-Identifier: Apache-2.0 */ @@ -7,8 +7,8 @@ * @file SoC configuration macros for the Atmel SAM4L family processors. */ -#ifndef _ATMEL_SAM4L_SOC_H_ -#define _ATMEL_SAM4L_SOC_H_ +#ifndef _SOC_ATMEL_SAM_SAM4L_SOC_H_ +#define _SOC_ATMEL_SAM_SAM4L_SOC_H_ #ifndef _ASMLANGUAGE @@ -16,41 +16,41 @@ #define DONT_USE_PREDEFINED_CORE_HANDLERS #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS -#if defined(CONFIG_SOC_PART_NUMBER_SAM4LS8C) +#if defined(CONFIG_SOC_SAM4LS8C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LS8B) +#elif defined(CONFIG_SOC_SAM4LS8B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LS8A) +#elif defined(CONFIG_SOC_SAM4LS8A) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LS4C) +#elif defined(CONFIG_SOC_SAM4LS4C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LS4B) +#elif defined(CONFIG_SOC_SAM4LS4B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LS4A) +#elif defined(CONFIG_SOC_SAM4LS4A) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LS2C) +#elif defined(CONFIG_SOC_SAM4LS2C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LS2B) +#elif defined(CONFIG_SOC_SAM4LS2B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LS2A) +#elif defined(CONFIG_SOC_SAM4LS2A) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC8C) +#elif defined(CONFIG_SOC_SAM4LC8C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC8B) +#elif defined(CONFIG_SOC_SAM4LC8B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC8A) +#elif defined(CONFIG_SOC_SAM4LC8A) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC4C) +#elif defined(CONFIG_SOC_SAM4LC4C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC4B) +#elif defined(CONFIG_SOC_SAM4LC4B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC4A) +#elif defined(CONFIG_SOC_SAM4LC4A) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC2C) +#elif defined(CONFIG_SOC_SAM4LC2C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC2B) +#elif defined(CONFIG_SOC_SAM4LC2B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4LC2A) +#elif defined(CONFIG_SOC_SAM4LC2A) #include #else #error Library does not support the specified device. @@ -220,4 +220,4 @@ #endif /* !_ASMLANGUAGE */ -#endif /* _ATMEL_SAM4L_SOC_H_ */ +#endif /* _SOC_ATMEL_SAM_SAM4L_SOC_H_ */ diff --git a/soc/soc_legacy/arm/atmel_sam/sam4s/CMakeLists.txt b/soc/atmel/sam/sam4s/CMakeLists.txt similarity index 64% rename from soc/soc_legacy/arm/atmel_sam/sam4s/CMakeLists.txt rename to soc/atmel/sam/sam4s/CMakeLists.txt index 7424bb9f7b9bc8..6a01266941a27f 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4s/CMakeLists.txt +++ b/soc/atmel/sam/sam4s/CMakeLists.txt @@ -1,5 +1,8 @@ +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 +zephyr_include_directories(.) + zephyr_sources( soc.c ) diff --git a/soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.series b/soc/atmel/sam/sam4s/Kconfig similarity index 51% rename from soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.series rename to soc/atmel/sam/sam4s/Kconfig index f591d96ba88e3a..26836bc509b61d 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.series +++ b/soc/atmel/sam/sam4s/Kconfig @@ -2,20 +2,13 @@ # Copyright (c) 2017 Justin Watson # Copyright (c) 2018 Vincent van der Locht -# Copyright (c) 2020-2023 Gerson Fernando Budke +# Copyright (c) 2020-2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 config SOC_SERIES_SAM4S - bool "Atmel SAM4S MCU" select ARM select CPU_CORTEX_M4 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU - select SOC_FAMILY_SAM select PLATFORM_SPECIFIC_INIT - select ASF select HAS_POWEROFF - help - Enable support for Atmel SAM4S Cortex-M4 microcontrollers. - Part No.: SAM4S16C, SAM4S16B, SAM4S8C, SAM4S8B, - SAM4S4C, SAM4S4B, SAM4S4A, SAM4S2C, SAM4S2B, SAM4S2A diff --git a/soc/atmel/sam/sam4s/Kconfig.defconfig b/soc/atmel/sam/sam4s/Kconfig.defconfig new file mode 100644 index 00000000000000..bc78f97f404822 --- /dev/null +++ b/soc/atmel/sam/sam4s/Kconfig.defconfig @@ -0,0 +1,13 @@ +# Atmel SAM4S MCU series configuration options + +# Copyright (c) 2017 Justin Watson +# Copyright (c) 2018 Vincent van der Locht +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +if SOC_SERIES_SAM4S + +config NUM_IRQS + default 35 + +endif # SOC_SERIES_SAM4S diff --git a/soc/atmel/sam/sam4s/Kconfig.soc b/soc/atmel/sam/sam4s/Kconfig.soc new file mode 100644 index 00000000000000..32ac386a400520 --- /dev/null +++ b/soc/atmel/sam/sam4s/Kconfig.soc @@ -0,0 +1,74 @@ +# Atmel SAM4S MCU series + +# Copyright (c) 2017 Justin Watson +# Copyright (c) 2018 Vincent van der Locht +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAM4S + bool + select SOC_FAMILY_SAM + help + Enable support for Atmel SAM4S Cortex-M4 microcontrollers. + Part No.: SAM4S16C, SAM4S16B, SAM4S8C, SAM4S8B, + SAM4S4C, SAM4S4B, SAM4S4A, SAM4S2C, SAM4S2B, SAM4S2A + +config SOC_SERIES + default "sam4s" if SOC_SERIES_SAM4S + +config SOC_SAM4S2A + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S2B + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S2C + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S4A + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S4B + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S4C + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S8B + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S8C + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S16B + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4S16C + bool + select SOC_SERIES_SAM4S + +config SOC_SAM4SA16C + bool + select SOC_SERIES_SAM4S + +config SOC + default "sam4s2a" if SOC_SAM4S2A + default "sam4s2b" if SOC_SAM4S2B + default "sam4s2c" if SOC_SAM4S2C + default "sam4s4a" if SOC_SAM4S4A + default "sam4s4b" if SOC_SAM4S4B + default "sam4s4c" if SOC_SAM4S4C + default "sam4s8b" if SOC_SAM4S8B + default "sam4s8c" if SOC_SAM4S8C + default "sam4s16b" if SOC_SAM4S16B + default "sam4s16c" if SOC_SAM4S16C + default "sam4sa16c" if SOC_SAM4SA16C diff --git a/soc/soc_legacy/arm/atmel_sam/sam4s/soc.c b/soc/atmel/sam/sam4s/soc.c similarity index 87% rename from soc/soc_legacy/arm/atmel_sam/sam4s/soc.c rename to soc/atmel/sam/sam4s/soc.c index 5efaa35e894986..09c42eae391208 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4s/soc.c +++ b/soc/atmel/sam/sam4s/soc.c @@ -2,8 +2,8 @@ * Copyright (c) 2013-2015 Wind River Systems, Inc. * Copyright (c) 2016 Intel Corporation. * Copyright (c) 2017 Justin Watson - * Copyright (c) 2023 Gerson Fernando Budke * Copyright (c) 2023 Basalte bv + * Copyright (c) 2023-2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ @@ -43,11 +43,11 @@ static ALWAYS_INLINE void clock_init(void) soc_pmc_enable_clock_failure_detector(); - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM4S_EXT_SLCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_SLCK)) { soc_supc_slow_clock_select_crystal_osc(); } - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM4S_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { /* * Setup main external crystal oscillator. */ @@ -76,8 +76,8 @@ static ALWAYS_INLINE void clock_init(void) /* * Setup PLLA */ - soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAM4S_PLLA_MULA, 0x3Fu, - CONFIG_SOC_ATMEL_SAM4S_PLLA_DIVA); + soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAM_PLLA_MULA, 0x3Fu, + CONFIG_SOC_ATMEL_SAM_PLLA_DIVA); /* * Final setup of the Master Clock @@ -90,14 +90,14 @@ static ALWAYS_INLINE void clock_init(void) soc_pmc_mck_set_source(SOC_PMC_MCK_SRC_PLLA_CLK); /* Disable internal fast RC if we have an external crystal oscillator */ - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM4S_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { soc_pmc_osc_disable_fastrc(); } } void z_arm_platform_init(void) { - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM4S_WAIT_MODE)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* * Instruct CPU to enter Wait mode instead of Sleep mode to * keep Processor Clock (HCLK) and thus be able to debug diff --git a/soc/soc_legacy/arm/atmel_sam/sam4s/soc.h b/soc/atmel/sam/sam4s/soc.h similarity index 63% rename from soc/soc_legacy/arm/atmel_sam/sam4s/soc.h rename to soc/atmel/sam/sam4s/soc.h index ec3ab20471e87b..f74692d6ba8925 100644 --- a/soc/soc_legacy/arm/atmel_sam/sam4s/soc.h +++ b/soc/atmel/sam/sam4s/soc.h @@ -1,9 +1,9 @@ /* - * Copyright (c) 2020 Gerson Fernando Budke - * Copyright (c) 2018 Vincent van der Locht - * Copyright (c) 2017 Justin Watson - * Copyright (c) 2016 Intel Corporation. * Copyright (c) 2013-2015 Wind River Systems, Inc. + * Copyright (c) 2016 Intel Corporation. + * Copyright (c) 2017 Justin Watson + * Copyright (c) 2018 Vincent van der Locht + * Copyright (c) 2020-2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ @@ -12,39 +12,38 @@ * @file SoC configuration macros for the Atmel SAM4S family processors. */ -#ifndef _ATMEL_SAM4S_SOC_H_ -#define _ATMEL_SAM4S_SOC_H_ +#ifndef _SOC_ATMEL_SAM_SAM4S_SOC_H_ +#define _SOC_ATMEL_SAM_SAM4S_SOC_H_ #include #ifndef _ASMLANGUAGE - #define DONT_USE_CMSIS_INIT #define DONT_USE_PREDEFINED_CORE_HANDLERS #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS -#if defined(CONFIG_SOC_PART_NUMBER_SAM4S16C) +#if defined(CONFIG_SOC_SAM4S16C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4SA16C) +#elif defined(CONFIG_SOC_SAM4SA16C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S16B) +#elif defined(CONFIG_SOC_SAM4S16B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S8C) +#elif defined(CONFIG_SOC_SAM4S8C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S8B) +#elif defined(CONFIG_SOC_SAM4S8B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S4C) +#elif defined(CONFIG_SOC_SAM4S4C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S4B) +#elif defined(CONFIG_SOC_SAM4S4B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S4A) +#elif defined(CONFIG_SOC_SAM4S4A) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S2C) +#elif defined(CONFIG_SOC_SAM4S2C) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S2B) +#elif defined(CONFIG_SOC_SAM4S2B) #include -#elif defined(CONFIG_SOC_PART_NUMBER_SAM4S2A) +#elif defined(CONFIG_SOC_SAM4S2A) #include #else #error Library does not support the specified device. @@ -63,4 +62,4 @@ #endif /* !_ASMLANGUAGE */ -#endif /* _ATMEL_SAM4S_SOC_H_ */ +#endif /* _SOC_ATMEL_SAM_SAM4S_SOC_H_ */ diff --git a/soc/soc_legacy/arm/atmel_sam/same70/CMakeLists.txt b/soc/atmel/sam/same70/CMakeLists.txt similarity index 66% rename from soc/soc_legacy/arm/atmel_sam/same70/CMakeLists.txt rename to soc/atmel/sam/same70/CMakeLists.txt index 8373266d4ec020..2ed685c2f6f4f1 100644 --- a/soc/soc_legacy/arm/atmel_sam/same70/CMakeLists.txt +++ b/soc/atmel/sam/same70/CMakeLists.txt @@ -1,5 +1,8 @@ +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 +zephyr_include_directories(.) + zephyr_sources( soc.c soc_config.c diff --git a/soc/atmel/sam/same70/Kconfig b/soc/atmel/sam/same70/Kconfig new file mode 100644 index 00000000000000..f799cd43c6911b --- /dev/null +++ b/soc/atmel/sam/same70/Kconfig @@ -0,0 +1,19 @@ +# Atmel SAM E70 MCU series + +# Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2023-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAME70 + select ARM + select CPU_CORTEX_M7 + select CPU_CORTEX_M_HAS_DWT + select CPU_HAS_ARM_MPU + select CPU_HAS_FPU_DOUBLE_PRECISION + select CPU_HAS_ICACHE + select CPU_HAS_DCACHE + select INIT_ARCH_HW_AT_BOOT + select PLATFORM_SPECIFIC_INIT + select HAS_SWO + select XIP + select HAS_POWEROFF diff --git a/soc/atmel/sam/same70/Kconfig.defconfig b/soc/atmel/sam/same70/Kconfig.defconfig new file mode 100644 index 00000000000000..6d2a78218c2f6b --- /dev/null +++ b/soc/atmel/sam/same70/Kconfig.defconfig @@ -0,0 +1,13 @@ +# Atmel SAM E70 MCU series configuration options + +# Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2023-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +if SOC_SERIES_SAME70 + +config NUM_IRQS + default 74 if SOC_ATMEL_SAME70_REVB + default 71 + +endif # SOC_SERIES_SAME70 diff --git a/soc/atmel/sam/same70/Kconfig.soc b/soc/atmel/sam/same70/Kconfig.soc new file mode 100644 index 00000000000000..1ca424596a1d1d --- /dev/null +++ b/soc/atmel/sam/same70/Kconfig.soc @@ -0,0 +1,122 @@ +# Atmel SAM E70 MCU series + +# Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAME70 + bool + select SOC_FAMILY_SAM + help + Enable support for Atmel SAM E70 ARM Cortex-M7 Microcontrollers. + Part No.: SAME70J19, SAME70J20, SAME70J21, SAME70N19, SAME70N20, + SAME70N21, SAME70Q19, SAME70Q20, SAME70Q21, SAME70J19B, SAME70J20B, + SAME70J21B, SAME70N19B, SAME70N20B, SAME70N21B, SAME70Q19B, + SAME70Q20B, SAME70Q21B + +config SOC_ATMEL_SAME70_REVB + bool + +config SOC_SERIES + default "same70" if SOC_SERIES_SAME70 + +config SOC_SAME70J19 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70J20 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70J21 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70N19 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70N20 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70N21 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70Q19 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70Q20 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70Q21 + bool + select SOC_SERIES_SAME70 + +config SOC_SAME70J19B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC_SAME70J20B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC_SAME70J21B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC_SAME70N19B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC_SAME70N20B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC_SAME70N21B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC_SAME70Q19B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC_SAME70Q20B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC_SAME70Q21B + bool + select SOC_SERIES_SAME70 + select SOC_ATMEL_SAME70_REVB + +config SOC + default "same70j19" if SOC_SAME70J19 + default "same70j20" if SOC_SAME70J20 + default "same70j21" if SOC_SAME70J21 + default "same70n19" if SOC_SAME70N19 + default "same70n20" if SOC_SAME70N20 + default "same70n21" if SOC_SAME70N21 + default "same70q19" if SOC_SAME70Q19 + default "same70q20" if SOC_SAME70Q20 + default "same70q21" if SOC_SAME70Q21 + default "same70j19b" if SOC_SAME70J19B + default "same70j20b" if SOC_SAME70J20B + default "same70j21b" if SOC_SAME70J21B + default "same70n19b" if SOC_SAME70N19B + default "same70n20b" if SOC_SAME70N20B + default "same70n21b" if SOC_SAME70N21B + default "same70q19b" if SOC_SAME70Q19B + default "same70q20b" if SOC_SAME70Q20B + default "same70q21b" if SOC_SAME70Q21B diff --git a/soc/soc_legacy/arm/atmel_sam/same70/soc.c b/soc/atmel/sam/same70/soc.c similarity index 88% rename from soc/soc_legacy/arm/atmel_sam/same70/soc.c rename to soc/atmel/sam/same70/soc.c index 02ebce73c6de90..ba3a44e875af85 100644 --- a/soc/soc_legacy/arm/atmel_sam/same70/soc.c +++ b/soc/atmel/sam/same70/soc.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2016 Piotr Mienkowski - * Copyright (c) 2023 Gerson Fernando Budke + * Copyright (c) 2023-2024 Gerson Fernando Budke * SPDX-License-Identifier: Apache-2.0 */ @@ -43,12 +43,12 @@ static ALWAYS_INLINE void clock_init(void) soc_pmc_enable_clock_failure_detector(); - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAME70_EXT_SLCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_SLCK)) { soc_supc_slow_clock_select_crystal_osc(); } - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAME70_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { /* * Setup main external crystal oscillator. */ @@ -83,8 +83,8 @@ static ALWAYS_INLINE void clock_init(void) * With Processor Clock prescaler at 1 * Processor Clock (HCLK)=300 MHz. */ - soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAME70_PLLA_MULA, 0x3Fu, - CONFIG_SOC_ATMEL_SAME70_PLLA_DIVA); + soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAM_PLLA_MULA, 0x3Fu, + CONFIG_SOC_ATMEL_SAM_PLLA_DIVA); soc_pmc_enable_upllck(0x3Fu); @@ -95,19 +95,19 @@ static ALWAYS_INLINE void clock_init(void) /* Setting PLLA as MCK, first prescaler, then divider and source last */ soc_pmc_mck_set_prescaler(1); - soc_pmc_mck_set_divider(CONFIG_SOC_ATMEL_SAME70_MDIV); + soc_pmc_mck_set_divider(CONFIG_SOC_ATMEL_SAM_MDIV); soc_pmc_mck_set_source(SOC_PMC_MCK_SRC_PLLA_CLK); /* Disable internal fast RC if we have an external crystal oscillator */ - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAME70_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { soc_pmc_osc_disable_fastrc(); } } void z_arm_platform_init(void) { - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAME70_WAIT_MODE)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* * Instruct CPU to enter Wait mode instead of Sleep mode to * keep Processor Clock (HCLK) and thus be able to debug diff --git a/soc/soc_legacy/arm/atmel_sam/same70/soc.h b/soc/atmel/sam/same70/soc.h similarity index 58% rename from soc/soc_legacy/arm/atmel_sam/same70/soc.h rename to soc/atmel/sam/same70/soc.h index ad72b4d2ef0b69..92cec70d926af0 100644 --- a/soc/soc_legacy/arm/atmel_sam/same70/soc.h +++ b/soc/atmel/sam/same70/soc.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2016 Piotr Mienkowski + * Copyright (c) 2024 Gerson Fernando Budke * SPDX-License-Identifier: Apache-2.0 */ @@ -10,53 +11,52 @@ * drivers for core peripherals as well as symbols specific to Atmel SAM family. */ -#ifndef _ATMEL_SAME70_SOC_H_ -#define _ATMEL_SAME70_SOC_H_ +#ifndef _SOC_ATMEL_SAM_SAME70_SOC_H_ +#define _SOC_ATMEL_SAM_SAME70_SOC_H_ #include #ifndef _ASMLANGUAGE - #define DONT_USE_CMSIS_INIT #define DONT_USE_PREDEFINED_CORE_HANDLERS #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS -#if defined CONFIG_SOC_PART_NUMBER_SAME70J19 +#if defined(CONFIG_SOC_SAME70J19) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70J20 +#elif defined(CONFIG_SOC_SAME70J20) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70J21 +#elif defined(CONFIG_SOC_SAME70J21) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70N19 +#elif defined(CONFIG_SOC_SAME70N19) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70N20 +#elif defined(CONFIG_SOC_SAME70N20) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70N21 +#elif defined(CONFIG_SOC_SAME70N21) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70Q19 +#elif defined(CONFIG_SOC_SAME70Q19) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70Q20 +#elif defined(CONFIG_SOC_SAME70Q20) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70Q21 +#elif defined(CONFIG_SOC_SAME70Q21) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70J19B +#elif defined(CONFIG_SOC_SAME70J19B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70J20B +#elif defined(CONFIG_SOC_SAME70J20B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70J21B +#elif defined(CONFIG_SOC_SAME70J21B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70N19B +#elif defined(CONFIG_SOC_SAME70N19B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70N20B +#elif defined(CONFIG_SOC_SAME70N20B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70N21B +#elif defined(CONFIG_SOC_SAME70N21B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70Q19B +#elif defined(CONFIG_SOC_SAME70Q19B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70Q20B +#elif defined(CONFIG_SOC_SAME70Q20B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAME70Q21B +#elif defined(CONFIG_SOC_SAME70Q21B) #include #else #error Library does not support the specified device. @@ -72,11 +72,11 @@ /** Master Clock (MCK) Frequency */ #define SOC_ATMEL_SAM_MCK_FREQ_HZ \ - (SOC_ATMEL_SAM_HCLK_FREQ_HZ / CONFIG_SOC_ATMEL_SAME70_MDIV) + (SOC_ATMEL_SAM_HCLK_FREQ_HZ / CONFIG_SOC_ATMEL_SAM_MDIV) /** UTMI PLL clock (UPLLCK) Frequency */ #define SOC_ATMEL_SAM_UPLLCK_FREQ_HZ MHZ(480) #endif /* _ASMLANGUAGE */ -#endif /* _ATMEL_SAME70_SOC_H_ */ +#endif /* _SOC_ATMEL_SAM_SAME70_SOC_H_ */ diff --git a/soc/soc_legacy/arm/atmel_sam/same70/soc_config.c b/soc/atmel/sam/same70/soc_config.c similarity index 51% rename from soc/soc_legacy/arm/atmel_sam/same70/soc_config.c rename to soc/atmel/sam/same70/soc_config.c index 27d71da492078b..cd1f8b80d76dbe 100644 --- a/soc/soc_legacy/arm/atmel_sam/same70/soc_config.c +++ b/soc/atmel/sam/same70/soc_config.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016 Piotr Mienkowski + * Copyright (c) 2024 Gerson Fernando Budke * SPDX-License-Identifier: Apache-2.0 */ @@ -22,10 +23,12 @@ */ static int atmel_same70_config(void) { -#ifdef CONFIG_SOC_ATMEL_SAME70_DISABLE_ERASE_PIN - /* Disable ERASE function on PB12 pin, this is controlled by Bus Matrix */ - MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO12; -#endif + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_DISABLE_ERASE_PIN)) { + /* Disable ERASE function on PB12 pin, this is controlled + * by Bus Matrix + */ + MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO12; + } /* In Cortex-M based SoCs JTAG interface can be used to perform * IEEE1149.1 JTAG Boundary scan only. It can not be used as a debug @@ -35,26 +38,26 @@ static int atmel_same70_config(void) /* Disable TDI function on PB4 pin, this is controlled by Bus Matrix */ MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO4; -#ifdef CONFIG_LOG_BACKEND_SWO - /* Disable PCK3 clock used by ETM module */ - PMC->PMC_SCDR = PMC_SCDR_PCK3; - while ((PMC->PMC_SCSR) & PMC_SCSR_PCK3) { - ; - } - /* Select PLLA clock as PCK3 clock */ - PMC->PMC_PCK[3] = PMC_MCKR_CSS_PLLA_CLK; - /* Enable PCK3 clock */ - PMC->PMC_SCER = PMC_SCER_PCK3; - /* Wait for PCK3 setup to complete */ - while (!((PMC->PMC_SR) & PMC_SR_PCKRDY3)) { - ; + if (IS_ENABLED(CONFIG_LOG_BACKEND_SWO)) { + /* Disable PCK3 clock used by ETM module */ + PMC->PMC_SCDR = PMC_SCDR_PCK3; + while ((PMC->PMC_SCSR) & PMC_SCSR_PCK3) { + ; + } + /* Select PLLA clock as PCK3 clock */ + PMC->PMC_PCK[3] = PMC_MCKR_CSS_PLLA_CLK; + /* Enable PCK3 clock */ + PMC->PMC_SCER = PMC_SCER_PCK3; + /* Wait for PCK3 setup to complete */ + while (!((PMC->PMC_SR) & PMC_SR_PCKRDY3)) { + ; + } + /* Enable TDO/TRACESWO function on PB5 pin */ + MATRIX->CCFG_SYSIO &= ~CCFG_SYSIO_SYSIO5; + } else { + /* Disable TDO/TRACESWO function on PB5 pin */ + MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO5; } - /* Enable TDO/TRACESWO function on PB5 pin */ - MATRIX->CCFG_SYSIO &= ~CCFG_SYSIO_SYSIO5; -#else - /* Disable TDO/TRACESWO function on PB5 pin */ - MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO5; -#endif return 0; } diff --git a/soc/soc_legacy/arm/atmel_sam/samv71/CMakeLists.txt b/soc/atmel/sam/samv71/CMakeLists.txt similarity index 66% rename from soc/soc_legacy/arm/atmel_sam/samv71/CMakeLists.txt rename to soc/atmel/sam/samv71/CMakeLists.txt index 8373266d4ec020..2ed685c2f6f4f1 100644 --- a/soc/soc_legacy/arm/atmel_sam/samv71/CMakeLists.txt +++ b/soc/atmel/sam/samv71/CMakeLists.txt @@ -1,5 +1,8 @@ +# Copyright (c) 2024 Gerson Fernando Budke # SPDX-License-Identifier: Apache-2.0 +zephyr_include_directories(.) + zephyr_sources( soc.c soc_config.c diff --git a/soc/atmel/sam/samv71/Kconfig b/soc/atmel/sam/samv71/Kconfig new file mode 100644 index 00000000000000..682adb4a7155c0 --- /dev/null +++ b/soc/atmel/sam/samv71/Kconfig @@ -0,0 +1,19 @@ +# Atmel SAM V71 MCU series + +# Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2019-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAMV71 + select ARM + select CPU_CORTEX_M7 + select CPU_CORTEX_M_HAS_DWT + select CPU_HAS_ARM_MPU + select CPU_HAS_FPU_DOUBLE_PRECISION + select CPU_HAS_ICACHE + select CPU_HAS_DCACHE + select INIT_ARCH_HW_AT_BOOT + select PLATFORM_SPECIFIC_INIT + select HAS_SWO + select XIP + select HAS_POWEROFF diff --git a/soc/atmel/sam/samv71/Kconfig.defconfig b/soc/atmel/sam/samv71/Kconfig.defconfig new file mode 100644 index 00000000000000..2eefe71ec55a33 --- /dev/null +++ b/soc/atmel/sam/samv71/Kconfig.defconfig @@ -0,0 +1,13 @@ +# Atmel SAM V71 MCU series configuration options + +# Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2019-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +if SOC_SERIES_SAMV71 + +config NUM_IRQS + default 74 if SOC_ATMEL_SAMV71_REVB + default 71 + +endif # SOC_SERIES_SAMV71 diff --git a/soc/atmel/sam/samv71/Kconfig.soc b/soc/atmel/sam/samv71/Kconfig.soc new file mode 100644 index 00000000000000..664b0ef4f676bc --- /dev/null +++ b/soc/atmel/sam/samv71/Kconfig.soc @@ -0,0 +1,122 @@ +# Atmel SAM V71 MCU series + +# Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2019-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_SAMV71 + bool + select SOC_FAMILY_SAM + help + Enable support for Atmel SAM V71 ARM Cortex-M7 Microcontrollers. + Part No.: SAMV71J19, SAMV71J20, SAMV71J21, SAMV71N19, SAMV71N20, + SAMV71N21, SAMV71Q19, SAMV71Q20, SAMV71Q21, SAMV71J19B, SAMV71J20B, + SAMV71J21B, SAMV71N19B, SAMV71N20B, SAMV71N21B, SAMV71Q19B, + SAMV71Q20B, SAMV71Q21B + +config SOC_ATMEL_SAMV71_REVB + bool + +config SOC_SERIES + default "samv71" if SOC_SERIES_SAMV71 + +config SOC_SAMV71J19 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71J20 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71J21 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71N19 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71N20 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71N21 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71Q19 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71Q20 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71Q21 + bool + select SOC_SERIES_SAMV71 + +config SOC_SAMV71J19B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC_SAMV71J20B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC_SAMV71J21B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC_SAMV71N19B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC_SAMV71N20B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC_SAMV71N21B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC_SAMV71Q19B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC_SAMV71Q20B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC_SAMV71Q21B + bool + select SOC_SERIES_SAMV71 + select SOC_ATMEL_SAMV71_REVB + +config SOC + default "samv71j19" if SOC_SAMV71J19 + default "samv71j20" if SOC_SAMV71J20 + default "samv71j21" if SOC_SAMV71J21 + default "samv71n19" if SOC_SAMV71N19 + default "samv71n20" if SOC_SAMV71N20 + default "samv71n21" if SOC_SAMV71N21 + default "samv71q19" if SOC_SAMV71Q19 + default "samv71q20" if SOC_SAMV71Q20 + default "samv71q21" if SOC_SAMV71Q21 + default "samv71j19b" if SOC_SAMV71J19B + default "samv71j20b" if SOC_SAMV71J20B + default "samv71j21b" if SOC_SAMV71J21B + default "samv71n19b" if SOC_SAMV71N19B + default "samv71n20b" if SOC_SAMV71N20B + default "samv71n21b" if SOC_SAMV71N21B + default "samv71q19b" if SOC_SAMV71Q19B + default "samv71q20b" if SOC_SAMV71Q20B + default "samv71q21b" if SOC_SAMV71Q21B diff --git a/soc/soc_legacy/arm/atmel_sam/samv71/soc.c b/soc/atmel/sam/samv71/soc.c similarity index 90% rename from soc/soc_legacy/arm/atmel_sam/samv71/soc.c rename to soc/atmel/sam/samv71/soc.c index 6e82b9fe2f63c6..c1b58bc126e81e 100644 --- a/soc/soc_legacy/arm/atmel_sam/samv71/soc.c +++ b/soc/atmel/sam/samv71/soc.c @@ -41,12 +41,12 @@ static ALWAYS_INLINE void clock_init(void) soc_pmc_enable_clock_failure_detector(); - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAMV71_EXT_SLCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_SLCK)) { soc_supc_slow_clock_select_crystal_osc(); } - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAMV71_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { /* * Setup main external crystal oscillator. */ @@ -81,8 +81,8 @@ static ALWAYS_INLINE void clock_init(void) * With Processor Clock prescaler at 1 * Processor Clock (HCLK)=300 MHz. */ - soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAMV71_PLLA_MULA, 0x3Fu, - CONFIG_SOC_ATMEL_SAMV71_PLLA_DIVA); + soc_pmc_enable_pllack(CONFIG_SOC_ATMEL_SAM_PLLA_MULA, 0x3Fu, + CONFIG_SOC_ATMEL_SAM_PLLA_DIVA); soc_pmc_enable_upllck(0x3Fu); @@ -93,18 +93,18 @@ static ALWAYS_INLINE void clock_init(void) /* Setting PLLA as MCK, first prescaler, then divider and source last */ soc_pmc_mck_set_prescaler(1); - soc_pmc_mck_set_divider(CONFIG_SOC_ATMEL_SAMV71_MDIV); + soc_pmc_mck_set_divider(CONFIG_SOC_ATMEL_SAM_MDIV); soc_pmc_mck_set_source(SOC_PMC_MCK_SRC_PLLA_CLK); /* Disable internal fast RC if we have an external crystal oscillator */ - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAMV71_EXT_MAINCK)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_EXT_MAINCK)) { soc_pmc_osc_disable_fastrc(); } } void z_arm_platform_init(void) { - if (IS_ENABLED(CONFIG_SOC_ATMEL_SAMV71_WAIT_MODE)) { + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_WAIT_MODE)) { /* * Instruct CPU to enter Wait mode instead of Sleep mode to * keep Processor Clock (HCLK) and thus be able to debug diff --git a/soc/soc_legacy/arm/atmel_sam/samv71/soc.h b/soc/atmel/sam/samv71/soc.h similarity index 57% rename from soc/soc_legacy/arm/atmel_sam/samv71/soc.h rename to soc/atmel/sam/samv71/soc.h index 4c85be42136075..8b54125bce52ee 100644 --- a/soc/soc_legacy/arm/atmel_sam/samv71/soc.h +++ b/soc/atmel/sam/samv71/soc.h @@ -1,6 +1,6 @@ /* - * Copyright (c) 2019 Gerson Fernando Budke * Copyright (c) 2016 Piotr Mienkowski + * Copyright (c) 2019-2024 Gerson Fernando Budke * SPDX-License-Identifier: Apache-2.0 */ @@ -11,53 +11,52 @@ * drivers for core peripherals as well as symbols specific to Atmel SAM family. */ -#ifndef _ATMEL_SAMV71_SOC_H_ -#define _ATMEL_SAMV71_SOC_H_ +#ifndef _SOC_ATMEL_SAM_SAMV71_SOC_H_ +#define _SOC_ATMEL_SAM_SAMV71_SOC_H_ #include #ifndef _ASMLANGUAGE - #define DONT_USE_CMSIS_INIT #define DONT_USE_PREDEFINED_CORE_HANDLERS #define DONT_USE_PREDEFINED_PERIPHERALS_HANDLERS -#if defined CONFIG_SOC_PART_NUMBER_SAMV71J19 +#if defined(CONFIG_SOC_SAMV71J19) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71J20 +#elif defined(CONFIG_SOC_SAMV71J20) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71J21 +#elif defined(CONFIG_SOC_SAMV71J21) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71N19 +#elif defined(CONFIG_SOC_SAMV71N19) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71N20 +#elif defined(CONFIG_SOC_SAMV71N20) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71N21 +#elif defined(CONFIG_SOC_SAMV71N21) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71Q19 +#elif defined(CONFIG_SOC_SAMV71Q19) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71Q20 +#elif defined(CONFIG_SOC_SAMV71Q20) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71Q21 +#elif defined(CONFIG_SOC_SAMV71Q21) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71J19B +#elif defined(CONFIG_SOC_SAMV71J19B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71J20B +#elif defined(CONFIG_SOC_SAMV71J20B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71J21B +#elif defined(CONFIG_SOC_SAMV71J21B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71N19B +#elif defined(CONFIG_SOC_SAMV71N19B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71N20B +#elif defined(CONFIG_SOC_SAMV71N20B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71N21B +#elif defined(CONFIG_SOC_SAMV71N21B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71Q19B +#elif defined(CONFIG_SOC_SAMV71Q19B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71Q20B +#elif defined(CONFIG_SOC_SAMV71Q20B) #include -#elif defined CONFIG_SOC_PART_NUMBER_SAMV71Q21B +#elif defined(CONFIG_SOC_SAMV71Q21B) #include #else #error Library does not support the specified device. @@ -73,7 +72,7 @@ /** Master Clock (MCK) Frequency */ #define SOC_ATMEL_SAM_MCK_FREQ_HZ \ - (SOC_ATMEL_SAM_HCLK_FREQ_HZ / CONFIG_SOC_ATMEL_SAMV71_MDIV) + (SOC_ATMEL_SAM_HCLK_FREQ_HZ / CONFIG_SOC_ATMEL_SAM_MDIV) /** UTMI PLL clock (UPLLCK) Frequency */ #define SOC_ATMEL_SAM_UPLLCK_FREQ_HZ MHZ(480) @@ -82,4 +81,4 @@ #include "pwm_fixup.h" -#endif /* _ATMEL_SAMV71_SOC_H_ */ +#endif /* _SOC_ATMEL_SAM_SAMV71_SOC_H_ */ diff --git a/soc/soc_legacy/arm/atmel_sam/samv71/soc_config.c b/soc/atmel/sam/samv71/soc_config.c similarity index 51% rename from soc/soc_legacy/arm/atmel_sam/samv71/soc_config.c rename to soc/atmel/sam/samv71/soc_config.c index 2bcff027539840..51638a997b3752 100644 --- a/soc/soc_legacy/arm/atmel_sam/samv71/soc_config.c +++ b/soc/atmel/sam/samv71/soc_config.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 2019 Gerson Fernando Budke * Copyright (c) 2016 Piotr Mienkowski + * Copyright (c) 2019-2024 Gerson Fernando Budke * SPDX-License-Identifier: Apache-2.0 */ @@ -23,12 +23,12 @@ */ static int atmel_samv71_config(void) { -#ifdef CONFIG_SOC_ATMEL_SAMV71_DISABLE_ERASE_PIN - /* Disable ERASE function on PB12 pin, this is controlled by Bus - * Matrix - */ - MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO12; -#endif + if (IS_ENABLED(CONFIG_SOC_ATMEL_SAM_DISABLE_ERASE_PIN)) { + /* Disable ERASE function on PB12 pin, this is controlled + * by Bus Matrix + */ + MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO12; + } /* In Cortex-M based SoCs JTAG interface can be used to perform * IEEE1149.1 JTAG Boundary scan only. It can not be used as a debug @@ -39,26 +39,26 @@ static int atmel_samv71_config(void) */ MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO4; -#ifdef CONFIG_LOG_BACKEND_SWO - /* Disable PCK3 clock used by ETM module */ - PMC->PMC_SCDR = PMC_SCDR_PCK3; - while ((PMC->PMC_SCSR) & PMC_SCSR_PCK3) { - ; - } - /* Select PLLA clock as PCK3 clock */ - PMC->PMC_PCK[3] = PMC_MCKR_CSS_PLLA_CLK; - /* Enable PCK3 clock */ - PMC->PMC_SCER = PMC_SCER_PCK3; - /* Wait for PCK3 setup to complete */ - while (!((PMC->PMC_SR) & PMC_SR_PCKRDY3)) { - ; + if (IS_ENABLED(CONFIG_LOG_BACKEND_SWO)) { + /* Disable PCK3 clock used by ETM module */ + PMC->PMC_SCDR = PMC_SCDR_PCK3; + while ((PMC->PMC_SCSR) & PMC_SCSR_PCK3) { + ; + } + /* Select PLLA clock as PCK3 clock */ + PMC->PMC_PCK[3] = PMC_MCKR_CSS_PLLA_CLK; + /* Enable PCK3 clock */ + PMC->PMC_SCER = PMC_SCER_PCK3; + /* Wait for PCK3 setup to complete */ + while (!((PMC->PMC_SR) & PMC_SR_PCKRDY3)) { + ; + } + /* Enable TDO/TRACESWO function on PB5 pin */ + MATRIX->CCFG_SYSIO &= ~CCFG_SYSIO_SYSIO5; + } else { + /* Disable TDO/TRACESWO function on PB5 pin */ + MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO5; } - /* Enable TDO/TRACESWO function on PB5 pin */ - MATRIX->CCFG_SYSIO &= ~CCFG_SYSIO_SYSIO5; -#else - /* Disable TDO/TRACESWO function on PB5 pin */ - MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO5; -#endif return 0; } diff --git a/soc/atmel/sam/soc.yml b/soc/atmel/sam/soc.yml new file mode 100644 index 00000000000000..9d95bcdf147f4a --- /dev/null +++ b/soc/atmel/sam/soc.yml @@ -0,0 +1,89 @@ +family: +- name: atmel_sam + series: + - name: sam3x + socs: + - name: sam3x4c + - name: sam3x4e + - name: sam3x8c + - name: sam3x8e + - name: sam3x8h + - name: sam4e + socs: + - name: sam4e8c + - name: sam4e8e + - name: sam4e16c + - name: sam4e16e + - name: sam4l + socs: + - name: sam4ls2a + - name: sam4ls2b + - name: sam4ls2c + - name: sam4ls4a + - name: sam4ls4b + - name: sam4ls4c + - name: sam4ls8a + - name: sam4ls8b + - name: sam4ls8c + - name: sam4lc2a + - name: sam4lc2b + - name: sam4lc2c + - name: sam4lc4a + - name: sam4lc4b + - name: sam4lc4c + - name: sam4lc8a + - name: sam4lc8b + - name: sam4lc8c + - name: sam4s + socs: + - name: sam4s2a + - name: sam4s2b + - name: sam4s2c + - name: sam4s4a + - name: sam4s4b + - name: sam4s4c + - name: sam4s8b + - name: sam4s8c + - name: sam4s16b + - name: sam4s16c + - name: sam4sa16c + - name: same70 + socs: + - name: same70j19 + - name: same70j20 + - name: same70j21 + - name: same70n19 + - name: same70n20 + - name: same70n21 + - name: same70q19 + - name: same70q20 + - name: same70q21 + - name: same70j19b + - name: same70j20b + - name: same70j21b + - name: same70n19b + - name: same70n20b + - name: same70n21b + - name: same70q19b + - name: same70q20b + - name: same70q21b + - name: samv71 + socs: + - name: samv71j19 + - name: samv71j20 + - name: samv71j21 + - name: samv71n19 + - name: samv71n20 + - name: samv71n21 + - name: samv71q19 + - name: samv71q20 + - name: samv71q21 + - name: samv71j19b + - name: samv71j20b + - name: samv71j21b + - name: samv71n19b + - name: samv71n20b + - name: samv71n21b + - name: samv71q19b + - name: samv71q20b + - name: samv71q21b diff --git a/soc/soc_legacy/arm/atmel_sam/Kconfig b/soc/soc_legacy/arm/atmel_sam/Kconfig deleted file mode 100644 index 8ab7628cf6fa1a..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/Kconfig +++ /dev/null @@ -1,19 +0,0 @@ -# Atmel SAM MCU family configuration options - -# Copyright (c) 2016 Piotr Mienkowski -# SPDX-License-Identifier: Apache-2.0 - -config SOC_FAMILY_SAM - bool - select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE - -if SOC_FAMILY_SAM - -config SOC_FAMILY - string - default "atmel_sam" - -# Select SoC Part No. and configuration options -source "soc/soc_legacy/arm/atmel_sam/*/Kconfig.soc" - -endif # SOC_FAMILY_SAM diff --git a/soc/soc_legacy/arm/atmel_sam/Kconfig.soc b/soc/soc_legacy/arm/atmel_sam/Kconfig.soc deleted file mode 100644 index 1147a196c9ebf2..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/Kconfig.soc +++ /dev/null @@ -1,6 +0,0 @@ -# Atmel SAM MCU series selection - -# Copyright (c) 2016 Piotr Mienkowski -# SPDX-License-Identifier: Apache-2.0 - -source "soc/soc_legacy/arm/atmel_sam/*/Kconfig.series" diff --git a/soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.defconfig.series b/soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.defconfig.series deleted file mode 100644 index 7873880dc587a5..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.defconfig.series +++ /dev/null @@ -1,27 +0,0 @@ -# Atmel SAM3X MCU series configuration options - -# Copyright (c) 2017 Justin Watson -# Copyright (c) 2016 Intel Corporation. -# Copyright (c) 2014-2015 Wind River Systems, Inc. -# SPDX-License-Identifier: Apache-2.0 - -if SOC_SERIES_SAM3X - -config SOC_SERIES - default "sam3x" - -config SOC_PART_NUMBER - default "sam3x4c" if SOC_PART_NUMBER_SAM3X4C - default "sam3x4e" if SOC_PART_NUMBER_SAM3X4E - default "sam3x8c" if SOC_PART_NUMBER_SAM3X8C - default "sam3x8e" if SOC_PART_NUMBER_SAM3X8E - default "sam3x8h" if SOC_PART_NUMBER_SAM3X8H - -# -# SAM3 family has total 45 peripherals capable of -# generating interrupts. -# -config NUM_IRQS - default 45 - -endif # SOC_SERIES_SAM3X diff --git a/soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.soc b/soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.soc deleted file mode 100644 index 1e9a203396a300..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam3x/Kconfig.soc +++ /dev/null @@ -1,89 +0,0 @@ -# Atmel SAM3X MCU series - -# Copyright (c) 2017 Justin Watson -# Copyright (c) 2016 Intel Corporation. -# Copyright (c) 2014-2015 Wind River Systems, Inc. -# SPDX-License-Identifier: Apache-2.0 - -choice - prompt "Atmel SAM3X MCU Selection" - depends on SOC_SERIES_SAM3X - - config SOC_PART_NUMBER_SAM3X4C - bool "SAM3X4C" - config SOC_PART_NUMBER_SAM3X4E - bool "SAM3X4E" - config SOC_PART_NUMBER_SAM3X8C - bool "SAM3X8C" - config SOC_PART_NUMBER_SAM3X8E - bool "SAM3X8E" - config SOC_PART_NUMBER_SAM3X8H - bool "SAM3X8H" -endchoice - -if SOC_SERIES_SAM3X - -config SOC_ATMEL_SAM3X_EXT_SLCK - bool "Atmel SAM3 to use external crystal oscillator for slow clock" - help - Says y if you want to use external 32 kHz crystal - oscillator to drive the slow clock. Note that this - adds a few seconds to boot time, as the crystal - needs to stabilize after power-up. - - Says n if you do not need accurate and precise timers. - The slow clock will be driven by the internal fast - RC oscillator running at 32 kHz. - -config SOC_ATMEL_SAM3X_EXT_MAINCK - bool "Atmel SAM3 to use external crystal oscillator for main clock" - help - The main clock is being used to drive the PLL, and - thus driving the processor clock. - - Says y if you want to use external crystal oscillator - to drive the main clock. Note that this adds about - a second to boot time, as the crystal needs to - stabilize after power-up. - - The crystal used here can be from 3 to 20 MHz. - - Says n here will use the internal fast RC oscillator - running at 12 MHz. - -config SOC_ATMEL_SAM3X_PLLA_MULA - hex - default 0x06 - help - This is the multiplier (MULA) used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - With default of MULA == 6, and DIVA == 1, - PLL is running at 7 times of main clock. - -config SOC_ATMEL_SAM3X_PLLA_DIVA - hex - default 0x01 - help - This is the divider (DIVA) used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - With default of MULA == 6, and DIVA == 1, - PLL is running at 7 times of main clock. - -config SOC_ATMEL_SAM3X_WAIT_MODE - bool "Atmel SAM3 goes to Wait mode instead of Sleep mode" - depends on SOC_ATMEL_SAM3X_EXT_MAINCK - default y if DEBUG - help - For JTAG debugging CPU clock (HCLK) should not stop. In order - to achieve this, make CPU go to Wait mode instead of Sleep - mode while using external crystal oscillator for main clock. - -endif # SOC_SERIES_SAM3X diff --git a/soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.defconfig.series b/soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.defconfig.series deleted file mode 100644 index 779c0d5dbed051..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.defconfig.series +++ /dev/null @@ -1,33 +0,0 @@ -# Atmel SAM4E MCU series configuration options - -# Copyright (c) 2017 Justin Watson -# Copyright (c) 2018 Vincent van der Locht -# Copyright (c) 2019 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -if SOC_SERIES_SAM4E - -config SOC_SERIES - default "sam4e" - -config SOC_PART_NUMBER - default "sam4e16e" if SOC_PART_NUMBER_SAM4E16E - default "sam4e16c" if SOC_PART_NUMBER_SAM4E16C - default "sam4e8e" if SOC_PART_NUMBER_SAM4E8E - default "sam4e8c" if SOC_PART_NUMBER_SAM4E8C - -# -# SAM4E family has total 47 peripherals capable of -# generating interrupts. -# -config NUM_IRQS - default 47 - -if NETWORKING - -config NET_L2_ETHERNET - default y - -endif # NETWORKING - -endif # SOC_SERIES_SAM4E diff --git a/soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.soc b/soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.soc deleted file mode 100644 index e48e8de0170871..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam4e/Kconfig.soc +++ /dev/null @@ -1,91 +0,0 @@ -# Atmel SAM4E MCU series - -# Copyright (c) 2017 Justin Watson -# Copyright (c) 2018 Vincent van der Locht -# Copyright (c) 2019 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -choice - prompt "Atmel SAM4E MCU Selection" - depends on SOC_SERIES_SAM4E - - config SOC_PART_NUMBER_SAM4E16E - bool "SAM4E16E" - - config SOC_PART_NUMBER_SAM4E16C - bool "SAM4E16C" - - config SOC_PART_NUMBER_SAM4E8E - bool "SAM4E8E" - - config SOC_PART_NUMBER_SAM4E8C - bool "SAM4E8C" - -endchoice - -if SOC_SERIES_SAM4E - -config SOC_ATMEL_SAM4E_EXT_SLCK - bool "Atmel SAM4E to use external crystal oscillator for slow clock" - help - Says y if you want to use external 32 kHz crystal - oscillator to drive the slow clock. Note that this - adds a few seconds to boot time, as the crystal - needs to stabilize after power-up. - - Says n if you do not need accurate and precise timers. - The slow clock will be driven by the internal fast - RC oscillator running at 32 kHz. - -config SOC_ATMEL_SAM4E_EXT_MAINCK - bool "Atmel SAM4E to use external crystal oscillator for main clock" - help - The main clock is being used to drive the PLL, and - thus driving the processor clock. - - Says y if you want to use external crystal oscillator - to drive the main clock. Note that this adds about - a second to boot time, as the crystal needs to - stabilize after power-up. - - The crystal used here can be from 3 to 20 MHz. - - Says n here will use the internal fast RC oscillator - running at 12 MHz. - -config SOC_ATMEL_SAM4E_PLLA_MULA - hex "PLL MULA" - default 0x09 - help - This is the multiplier (MULA) used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - With default of MULA == 9, and DIVA == 1, - PLL is running at 10 times of main clock. - -config SOC_ATMEL_SAM4E_PLLA_DIVA - hex "PLL DIVA" - default 0x01 - help - This is the divider (DIVA) used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - With default of MULA == 9, and DIVA == 1, - PLL is running at 10 times of main clock. - -config SOC_ATMEL_SAM4E_WAIT_MODE - bool "Atmel SAM4E goes to Wait mode instead of Sleep mode" - depends on SOC_ATMEL_SAM4E_EXT_MAINCK - default y if DEBUG - help - For JTAG debugging CPU clock (HCLK) should not stop. In order - to achieve this, make CPU go to Wait mode instead of Sleep - mode while using external crystal oscillator for main clock. - -endif # SOC_SERIES_SAM4E diff --git a/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.defconfig.series b/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.defconfig.series deleted file mode 100644 index 71fc855d112932..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.defconfig.series +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2020 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -if SOC_SERIES_SAM4L - -config SOC_SERIES - default "sam4l" - -config SOC_PART_NUMBER - default "sam4ls8c" if SOC_PART_NUMBER_SAM4LS8C - default "sam4ls8b" if SOC_PART_NUMBER_SAM4LS8B - default "sam4ls8a" if SOC_PART_NUMBER_SAM4LS8A - default "sam4ls4c" if SOC_PART_NUMBER_SAM4LS4C - default "sam4ls4b" if SOC_PART_NUMBER_SAM4LS4B - default "sam4ls4a" if SOC_PART_NUMBER_SAM4LS4A - default "sam4ls2c" if SOC_PART_NUMBER_SAM4LS2C - default "sam4ls2b" if SOC_PART_NUMBER_SAM4LS2B - default "sam4ls2a" if SOC_PART_NUMBER_SAM4LS2A - default "sam4lc8c" if SOC_PART_NUMBER_SAM4LC8C - default "sam4lc8b" if SOC_PART_NUMBER_SAM4LC8B - default "sam4lc8a" if SOC_PART_NUMBER_SAM4LC8A - default "sam4lc4c" if SOC_PART_NUMBER_SAM4LC4C - default "sam4lc4b" if SOC_PART_NUMBER_SAM4LC4B - default "sam4lc4a" if SOC_PART_NUMBER_SAM4LC4A - default "sam4lc2c" if SOC_PART_NUMBER_SAM4LC2C - default "sam4lc2b" if SOC_PART_NUMBER_SAM4LC2B - default "sam4lc2a" if SOC_PART_NUMBER_SAM4LC2A - -# -# SAM4L family has total 43 peripherals capable of -# generating interrupts. -# -config NUM_IRQS - default 80 - -# Configure default device drivers. If a feature is supported by more than one -# device driver the default configuration will be placed in the board defconfig -# file. - -config USART_SAM - default y - depends on SERIAL - -endif # SOC_SERIES_SAM4L diff --git a/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.series b/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.series deleted file mode 100644 index 0a8192f5bd9fdd..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.series +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2020-2023 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -config SOC_SERIES_SAM4L - bool "Atmel SAM4L MCU" - select ARM - select CPU_CORTEX_M4 - select CPU_CORTEX_M_HAS_DWT - select CPU_HAS_ARM_MPU - select SOC_FAMILY_SAM - select PLATFORM_SPECIFIC_INIT - select ASF - select HAS_POWEROFF - help - Enable support for Atmel SAM4L Cortex-M4 microcontrollers. - Part No.: SAM4LS8C, SAM4LS8B, SAM4LS8A, SAM4LS4C, SAM4LS4B, - SAM4LS4A, SAM4LS2C, SAM4LS2B, SAM4LS2A, SAM4LC8C, SAM4LC8B, - SAM4LC8A, SAM4LC4C, SAM4LC4B, SAM4LC4A SAM4LC2C, SAM4LC2B, - SAM4LC2A diff --git a/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.soc b/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.soc deleted file mode 100644 index 358cfc76042c1c..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam4l/Kconfig.soc +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2020 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -choice - prompt "Atmel SAM4L MCU Selection" - depends on SOC_SERIES_SAM4L - - config SOC_PART_NUMBER_SAM4LS8C - bool "SAM4LS8C" - - config SOC_PART_NUMBER_SAM4LS8B - bool "SAM4LS8B" - - config SOC_PART_NUMBER_SAM4LS8A - bool "SAM4LS8A" - - config SOC_PART_NUMBER_SAM4LS4C - bool "SAM4LS4C" - - config SOC_PART_NUMBER_SAM4LS4B - bool "SAM4LS4B" - - config SOC_PART_NUMBER_SAM4LS4A - bool "SAM4LS4A" - - config SOC_PART_NUMBER_SAM4LS2C - bool "SAM4LS2C" - - config SOC_PART_NUMBER_SAM4LS2B - bool "SAM4LS2B" - - config SOC_PART_NUMBER_SAM4LS2A - bool "SAM4LS2A" - - config SOC_PART_NUMBER_SAM4LC8C - bool "SAM4LC8C" - - config SOC_PART_NUMBER_SAM4LC8B - bool "SAM4LC8B" - - config SOC_PART_NUMBER_SAM4LC8A - bool "SAM4LC8A" - - config SOC_PART_NUMBER_SAM4LC4C - bool "SAM4LC4C" - - config SOC_PART_NUMBER_SAM4LC4B - bool "SAM4LC4B" - - config SOC_PART_NUMBER_SAM4LC4A - bool "SAM4LC4A" - - config SOC_PART_NUMBER_SAM4LC2C - bool "SAM4LC2C" - - config SOC_PART_NUMBER_SAM4LC2B - bool "SAM4LC2B" - - config SOC_PART_NUMBER_SAM4LC2A - bool "SAM4LC2A" -endchoice diff --git a/soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.defconfig.series b/soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.defconfig.series deleted file mode 100644 index 78afd905d6348f..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.defconfig.series +++ /dev/null @@ -1,32 +0,0 @@ -# Atmel SAM4S MCU series configuration options - -# Copyright (c) 2017 Justin Watson -# Copyright (c) 2018 Vincent van der Locht -# SPDX-License-Identifier: Apache-2.0 - -if SOC_SERIES_SAM4S - -config SOC_SERIES - default "sam4s" - -config SOC_PART_NUMBER - default "sam4s16c" if SOC_PART_NUMBER_SAM4S16C - default "sam4sa16c" if SOC_PART_NUMBER_SAM4SA16C - default "sam4s16b" if SOC_PART_NUMBER_SAM4S16B - default "sam4s8c" if SOC_PART_NUMBER_SAM4S8C - default "sam4s8b" if SOC_PART_NUMBER_SAM4S8B - default "sam4s4c" if SOC_PART_NUMBER_SAM4S4C - default "sam4s4b" if SOC_PART_NUMBER_SAM4S4B - default "sam4s4a" if SOC_PART_NUMBER_SAM4S4A - default "sam4s2c" if SOC_PART_NUMBER_SAM4S2C - default "sam4s2b" if SOC_PART_NUMBER_SAM4S2B - default "sam4s2a" if SOC_PART_NUMBER_SAM4S2A - -# -# SAM4S family has total 35 peripherals capable of -# generating interrupts. -# -config NUM_IRQS - default 35 - -endif # SOC_SERIES_SAM4S diff --git a/soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.soc b/soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.soc deleted file mode 100644 index c8c9dd9e21e4a5..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/sam4s/Kconfig.soc +++ /dev/null @@ -1,111 +0,0 @@ -# Atmel SAM4S MCU series - -# Copyright (c) 2017 Justin Watson -# Copyright (c) 2018 Vincent van der Locht -# SPDX-License-Identifier: Apache-2.0 - -choice - prompt "Atmel SAM4S MCU Selection" - depends on SOC_SERIES_SAM4S - - config SOC_PART_NUMBER_SAM4S16C - bool "SAM4S16C" - - config SOC_PART_NUMBER_SAM4SA16C - bool "SAM4SA16C" - - config SOC_PART_NUMBER_SAM4S16B - bool "SAM4S16B" - - config SOC_PART_NUMBER_SAM4S8C - bool "SAM4S8C" - - config SOC_PART_NUMBER_SAM4S8B - bool "SAM4S8B" - - config SOC_PART_NUMBER_SAM4S4C - bool "SAM4S4C" - - config SOC_PART_NUMBER_SAM4S4B - bool "SAM4S4B" - - config SOC_PART_NUMBER_SAM4S4A - bool "SAM4S4A" - - config SOC_PART_NUMBER_SAM4S2C - bool "SAM4S2C" - - config SOC_PART_NUMBER_SAM4S2B - bool "SAM4S2B" - - config SOC_PART_NUMBER_SAM4S2A - bool "SAM4S2A" - -endchoice - -if SOC_SERIES_SAM4S - -config SOC_ATMEL_SAM4S_EXT_SLCK - bool "Atmel SAM4S to use external crystal oscillator for slow clock" - help - Says y if you want to use external 32 kHz crystal - oscillator to drive the slow clock. Note that this - adds a few seconds to boot time, as the crystal - needs to stabilize after power-up. - - Says n if you do not need accurate and precise timers. - The slow clock will be driven by the internal fast - RC oscillator running at 32 kHz. - -config SOC_ATMEL_SAM4S_EXT_MAINCK - bool "Atmel SAM4S to use external crystal oscillator for main clock" - help - The main clock is being used to drive the PLL, and - thus driving the processor clock. - - Says y if you want to use external crystal oscillator - to drive the main clock. Note that this adds about - a second to boot time, as the crystal needs to - stabilize after power-up. - - The crystal used here can be from 3 to 20 MHz. - - Says n here will use the internal fast RC oscillator - running at 12 MHz. - -config SOC_ATMEL_SAM4S_PLLA_MULA - hex "PLL MULA" - default 0x09 - help - This is the multiplier (MULA) used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - With default of MULA == 9, and DIVA == 1, - PLL is running at 10 times of main clock. - -config SOC_ATMEL_SAM4S_PLLA_DIVA - hex "PLL DIVA" - default 0x01 - help - This is the divider (DIVA) used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - With default of MULA == 9, and DIVA == 1, - PLL is running at 10 times of main clock. - -config SOC_ATMEL_SAM4S_WAIT_MODE - bool "Atmel SAM4S goes to Wait mode instead of Sleep mode" - depends on SOC_ATMEL_SAM4S_EXT_MAINCK - default y if DEBUG - help - For JTAG debugging CPU clock (HCLK) should not stop. In order - to achieve this, make CPU go to Wait mode instead of Sleep - mode while using external crystal oscillator for main clock. - -endif # SOC_SERIES_SAM4S diff --git a/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.defconfig.series b/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.defconfig.series deleted file mode 100644 index f024e0d0616193..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.defconfig.series +++ /dev/null @@ -1,41 +0,0 @@ -# Atmel SAM E70 MCU series configuration options - -# Copyright (c) 2016 Piotr Mienkowski -# Copyright (c) 2023 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -if SOC_SERIES_SAME70 - -config SOC_SERIES - default "same70" - -config SOC_PART_NUMBER - default "same70q21" if SOC_PART_NUMBER_SAME70Q21 - default "same70q20" if SOC_PART_NUMBER_SAME70Q20 - default "same70q19" if SOC_PART_NUMBER_SAME70Q19 - default "same70n21" if SOC_PART_NUMBER_SAME70N21 - default "same70n20" if SOC_PART_NUMBER_SAME70N20 - default "same70n19" if SOC_PART_NUMBER_SAME70N19 - default "same70j21" if SOC_PART_NUMBER_SAME70J21 - default "same70j20" if SOC_PART_NUMBER_SAME70J20 - default "same70j19" if SOC_PART_NUMBER_SAME70J19 - default "same70q21b" if SOC_PART_NUMBER_SAME70Q21B - default "same70q20b" if SOC_PART_NUMBER_SAME70Q20B - default "same70q19b" if SOC_PART_NUMBER_SAME70Q19B - default "same70n21b" if SOC_PART_NUMBER_SAME70N21B - default "same70n20b" if SOC_PART_NUMBER_SAME70N20B - default "same70n19b" if SOC_PART_NUMBER_SAME70N19B - default "same70j21b" if SOC_PART_NUMBER_SAME70J21B - default "same70j20b" if SOC_PART_NUMBER_SAME70J20B - default "same70j19b" if SOC_PART_NUMBER_SAME70J19B - -# -# SAM E70 family has in total 71 peripherals capable of generating interrupts -# for the revision A and 74 for the revision B (not all Peripheral Identifiers -# are used). -# -config NUM_IRQS - default 74 if SOC_ATMEL_SAME70_REVB - default 71 - -endif # SOC_SERIES_SAME70 diff --git a/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.series b/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.series deleted file mode 100644 index 4e7d6aa396e94d..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.series +++ /dev/null @@ -1,28 +0,0 @@ -# Atmel SAM E70 MCU series - -# Copyright (c) 2016 Piotr Mienkowski -# Copyright (c) 2023 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -config SOC_SERIES_SAME70 - bool "Atmel SAME70 MCU" - select ARM - select CPU_CORTEX_M7 - select CPU_CORTEX_M_HAS_DWT - select CPU_HAS_ARM_MPU - select CPU_HAS_FPU_DOUBLE_PRECISION - select CPU_HAS_ICACHE - select CPU_HAS_DCACHE - select SOC_FAMILY_SAM - select INIT_ARCH_HW_AT_BOOT - select PLATFORM_SPECIFIC_INIT - select ASF - select HAS_SWO - select XIP - select HAS_POWEROFF - help - Enable support for Atmel SAM E70 ARM Cortex-M7 Microcontrollers. - Part No.: SAME70J19, SAME70J20, SAME70J21, SAME70N19, SAME70N20, - SAME70N21, SAME70Q19, SAME70Q20, SAME70Q21, SAME70J19B, SAME70J20B, - SAME70J21B, SAME70N19B, SAME70N20B, SAME70N21B, SAME70Q19B, - SAME70Q20B, SAME70Q21B diff --git a/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.soc b/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.soc deleted file mode 100644 index c396e1e59d7255..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/same70/Kconfig.soc +++ /dev/null @@ -1,167 +0,0 @@ -# Atmel SAM E70 MCU series - -# Copyright (c) 2016 Piotr Mienkowski -# SPDX-License-Identifier: Apache-2.0 - -choice - prompt "Atmel SAME70 MCU Selection" - depends on SOC_SERIES_SAME70 - - config SOC_PART_NUMBER_SAME70Q21 - bool "SAME70Q21" - - config SOC_PART_NUMBER_SAME70Q20 - bool "SAME70Q20" - - config SOC_PART_NUMBER_SAME70Q19 - bool "SAME70Q19" - - config SOC_PART_NUMBER_SAME70N21 - bool "SAME70N21" - - config SOC_PART_NUMBER_SAME70N20 - bool "SAME70N20" - - config SOC_PART_NUMBER_SAME70N19 - bool "SAME70N19" - - config SOC_PART_NUMBER_SAME70J21 - bool "SAME70J21" - - config SOC_PART_NUMBER_SAME70J20 - bool "SAME70J20" - - config SOC_PART_NUMBER_SAME70J19 - bool "SAME70J19" - - config SOC_PART_NUMBER_SAME70Q21B - bool "SAME70Q21B" - select SOC_ATMEL_SAME70_REVB - - config SOC_PART_NUMBER_SAME70Q20B - bool "SAME70Q20B" - select SOC_ATMEL_SAME70_REVB - - config SOC_PART_NUMBER_SAME70Q19B - bool "SAME70Q19B" - select SOC_ATMEL_SAME70_REVB - - config SOC_PART_NUMBER_SAME70N21B - bool "SAME70N21B" - select SOC_ATMEL_SAME70_REVB - - config SOC_PART_NUMBER_SAME70N20B - bool "SAME70N20B" - select SOC_ATMEL_SAME70_REVB - - config SOC_PART_NUMBER_SAME70N19B - bool "SAME70N19B" - select SOC_ATMEL_SAME70_REVB - - config SOC_PART_NUMBER_SAME70J21B - bool "SAME70J21B" - select SOC_ATMEL_SAME70_REVB - - config SOC_PART_NUMBER_SAME70J20B - bool "SAME70J20B" - select SOC_ATMEL_SAME70_REVB - - config SOC_PART_NUMBER_SAME70J19B - bool "SAME70J19B" - select SOC_ATMEL_SAME70_REVB -endchoice - -if SOC_SERIES_SAME70 - -config SOC_ATMEL_SAME70_REVB - bool - -config SOC_ATMEL_SAME70_EXT_SLCK - bool "Use external crystal oscillator for slow clock" - help - Say y if you want to use external 32 kHz crystal - oscillator to drive the slow clock. Note that this - adds a few seconds to boot time, as the crystal - needs to stabilize after power-up. - - Says n if you do not need accurate and precise timers. - The slow clock will be driven by the internal fast - RC oscillator running at 32 kHz. - -config SOC_ATMEL_SAME70_EXT_MAINCK - bool "Use external crystal oscillator for main clock" - help - The main clock is being used to drive the PLL, and - thus driving the processor clock. - - Say y if you want to use external crystal oscillator - to drive the main clock. Note that this adds about - a second to boot time, as the crystal needs to - stabilize after power-up. - - The crystal used here can be from 3 to 20 MHz. - - Says n here will use the internal fast RC oscillator - running at 12 MHz. - -config SOC_ATMEL_SAME70_MDIV - int "MDIV" - default 2 - range 1 4 - help - This divisor defines a ratio between processor clock (HCLK) - and master clock (MCK): - MCK = HCLK / MDIV - -config SOC_ATMEL_SAME70_PLLA_MULA - int "PLL MULA" - default 24 - range 1 62 - help - This is the multiplier MULA used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - Setting MULA=0 would disable PLL at boot, this is currently - not supported. - - With default of MULA == 24, and DIVA == 1, - PLL is running at 25 times the main clock frequency. - -config SOC_ATMEL_SAME70_PLLA_DIVA - int "PLL DIVA" - default 1 - range 1 255 - help - This is the divider DIVA used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - Setting DIVA=0 would disable PLL at boot, this is currently - not supported. - - With default of MULA == 24, and DIVA == 1, - PLL is running at 25 times the main clock frequency. - -config SOC_ATMEL_SAME70_WAIT_MODE - bool "Go to Wait mode instead of Sleep mode" - depends on SOC_ATMEL_SAME70_EXT_MAINCK - default y if DEBUG - help - For JTAG debugging CPU clock (HCLK) should not stop. In order - to achieve this, make CPU go to Wait mode instead of Sleep - mode while using external crystal oscillator for main clock. - -config SOC_ATMEL_SAME70_DISABLE_ERASE_PIN - bool "Disable ERASE pin" - help - At reset ERASE pin is configured in System IO mode. Asserting the ERASE - pin at '1' will completely erase Flash memory. Setting this option will - switch the pin to general IO mode giving control of the pin to the GPIO - module. - -endif # SOC_SERIES_SAME70 diff --git a/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.defconfig.series b/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.defconfig.series deleted file mode 100644 index 5209139f61c765..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.defconfig.series +++ /dev/null @@ -1,41 +0,0 @@ -# Atmel SAM V71 MCU series configuration options - -# Copyright (c) 2016 Piotr Mienkowski -# Copyright (c) 2019-2023 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -if SOC_SERIES_SAMV71 - -config SOC_SERIES - default "samv71" - -config SOC_PART_NUMBER - default "samv71q21" if SOC_PART_NUMBER_SAMV71Q21 - default "samv71q20" if SOC_PART_NUMBER_SAMV71Q20 - default "samv71q19" if SOC_PART_NUMBER_SAMV71Q19 - default "samv71n21" if SOC_PART_NUMBER_SAMV71N21 - default "samv71n20" if SOC_PART_NUMBER_SAMV71N20 - default "samv71n19" if SOC_PART_NUMBER_SAMV71N19 - default "samv71j21" if SOC_PART_NUMBER_SAMV71J21 - default "samv71j20" if SOC_PART_NUMBER_SAMV71J20 - default "samv71j19" if SOC_PART_NUMBER_SAMV71J19 - default "samv71q21b" if SOC_PART_NUMBER_SAMV71Q21B - default "samv71q20b" if SOC_PART_NUMBER_SAMV71Q20B - default "samv71q19b" if SOC_PART_NUMBER_SAMV71Q19B - default "samv71n21b" if SOC_PART_NUMBER_SAMV71N21B - default "samv71n20b" if SOC_PART_NUMBER_SAMV71N20B - default "samv71n19b" if SOC_PART_NUMBER_SAMV71N19B - default "samv71j21b" if SOC_PART_NUMBER_SAMV71J21B - default "samv71j20b" if SOC_PART_NUMBER_SAMV71J20B - default "samv71j19b" if SOC_PART_NUMBER_SAMV71J19B - -# -# SAM V71 family has in total 71 peripherals capable of generating interrupts -# for the revision A and 74 for the revision B (not all Peripheral Identifiers -# are used). -# -config NUM_IRQS - default 74 if SOC_ATMEL_SAMV71_REVB - default 71 - -endif # SOC_SERIES_SAMV71 diff --git a/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.series b/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.series deleted file mode 100644 index cadee35acb5219..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.series +++ /dev/null @@ -1,28 +0,0 @@ -# Atmel SAM V71 MCU series - -# Copyright (c) 2016 Piotr Mienkowski -# Copyright (c) 2019-2023 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -config SOC_SERIES_SAMV71 - bool "Atmel SAMV71 MCU" - select ARM - select CPU_CORTEX_M7 - select CPU_CORTEX_M_HAS_DWT - select CPU_HAS_ARM_MPU - select CPU_HAS_FPU_DOUBLE_PRECISION - select CPU_HAS_ICACHE - select CPU_HAS_DCACHE - select SOC_FAMILY_SAM - select INIT_ARCH_HW_AT_BOOT - select PLATFORM_SPECIFIC_INIT - select ASF - select HAS_SWO - select XIP - select HAS_POWEROFF - help - Enable support for Atmel SAM V71 ARM Cortex-M7 Microcontrollers. - Part No.: SAMV71J19, SAMV71J20, SAMV71J21, SAMV71N19, SAMV71N20, - SAMV71N21, SAMV71Q19, SAMV71Q20, SAMV71Q21, SAMV71J19B, SAMV71J20B, - SAMV71J21B, SAMV71N19B, SAMV71N20B, SAMV71N21B, SAMV71Q19B, - SAMV71Q20B, SAMV71Q21B diff --git a/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.soc b/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.soc deleted file mode 100644 index c8e7d60438c720..00000000000000 --- a/soc/soc_legacy/arm/atmel_sam/samv71/Kconfig.soc +++ /dev/null @@ -1,168 +0,0 @@ -# Atmel SAM V71 MCU series - -# Copyright (c) 2019 Gerson Fernando Budke -# Copyright (c) 2016 Piotr Mienkowski -# SPDX-License-Identifier: Apache-2.0 - -choice - prompt "Atmel SAMV71 MCU Selection" - depends on SOC_SERIES_SAMV71 - - config SOC_PART_NUMBER_SAMV71Q21 - bool "SAMV71Q21" - - config SOC_PART_NUMBER_SAMV71Q20 - bool "SAMV71Q20" - - config SOC_PART_NUMBER_SAMV71Q19 - bool "SAMV71Q19" - - config SOC_PART_NUMBER_SAMV71N21 - bool "SAMV71N21" - - config SOC_PART_NUMBER_SAMV71N20 - bool "SAMV71N20" - - config SOC_PART_NUMBER_SAMV71N19 - bool "SAMV71N19" - - config SOC_PART_NUMBER_SAMV71J21 - bool "SAMV71J21" - - config SOC_PART_NUMBER_SAMV71J20 - bool "SAMV71J20" - - config SOC_PART_NUMBER_SAMV71J19 - bool "SAMV71J19" - - config SOC_PART_NUMBER_SAMV71Q21B - bool "SAMV71Q21B" - select SOC_ATMEL_SAMV71_REVB - - config SOC_PART_NUMBER_SAMV71Q20B - bool "SAMV71Q20B" - select SOC_ATMEL_SAMV71_REVB - - config SOC_PART_NUMBER_SAMV71Q19B - bool "SAMV71Q19B" - select SOC_ATMEL_SAMV71_REVB - - config SOC_PART_NUMBER_SAMV71N21B - bool "SAMV71N21B" - select SOC_ATMEL_SAMV71_REVB - - config SOC_PART_NUMBER_SAMV71N20B - bool "SAMV71N20B" - select SOC_ATMEL_SAMV71_REVB - - config SOC_PART_NUMBER_SAMV71N19B - bool "SAMV71N19B" - select SOC_ATMEL_SAMV71_REVB - - config SOC_PART_NUMBER_SAMV71J21B - bool "SAMV71J21B" - select SOC_ATMEL_SAMV71_REVB - - config SOC_PART_NUMBER_SAMV71J20B - bool "SAMV71J20B" - select SOC_ATMEL_SAMV71_REVB - - config SOC_PART_NUMBER_SAMV71J19B - bool "SAMV71J19B" - select SOC_ATMEL_SAMV71_REVB -endchoice - -if SOC_SERIES_SAMV71 - -config SOC_ATMEL_SAMV71_REVB - bool - -config SOC_ATMEL_SAMV71_EXT_SLCK - bool "Use external crystal oscillator for slow clock" - help - Say y if you want to use external 32 kHz crystal - oscillator to drive the slow clock. Note that this - adds a few seconds to boot time, as the crystal - needs to stabilize after power-up. - - Says n if you do not need accurate and precise timers. - The slow clock will be driven by the internal fast - RC oscillator running at 32 kHz. - -config SOC_ATMEL_SAMV71_EXT_MAINCK - bool "Use external crystal oscillator for main clock" - help - The main clock is being used to drive the PLL, and - thus driving the processor clock. - - Say y if you want to use external crystal oscillator - to drive the main clock. Note that this adds about - a second to boot time, as the crystal needs to - stabilize after power-up. - - The crystal used here can be from 3 to 20 MHz. - - Says n here will use the internal fast RC oscillator - running at 12 MHz. - -config SOC_ATMEL_SAMV71_MDIV - int "MDIV" - default 2 - range 1 4 - help - This divisor defines a ratio between processor clock (HCLK) - and master clock (MCK): - MCK = HCLK / MDIV - -config SOC_ATMEL_SAMV71_PLLA_MULA - int "PLL MULA" - default 24 - range 1 62 - help - This is the multiplier MULA used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - Setting MULA=0 would disable PLL at boot, this is currently - not supported. - - With default of MULA == 24, and DIVA == 1, - PLL is running at 25 times the main clock frequency. - -config SOC_ATMEL_SAMV71_PLLA_DIVA - int "PLL DIVA" - default 1 - range 1 255 - help - This is the divider DIVA used by the PLL. - The processor clock is (MAINCK * (MULA + 1) / DIVA). - - Board config file can override this settings - for a particular board. - - Setting DIVA=0 would disable PLL at boot, this is currently - not supported. - - With default of MULA == 24, and DIVA == 1, - PLL is running at 25 times the main clock frequency. - -config SOC_ATMEL_SAMV71_WAIT_MODE - bool "Go to Wait mode instead of Sleep mode" - depends on SOC_ATMEL_SAMV71_EXT_MAINCK - default y if DEBUG - help - For JTAG debugging CPU clock (HCLK) should not stop. In order - to achieve this, make CPU go to Wait mode instead of Sleep - mode while using external crystal oscillator for main clock. - -config SOC_ATMEL_SAMV71_DISABLE_ERASE_PIN - bool "Disable ERASE pin" - help - At reset ERASE pin is configured in System IO mode. Asserting the ERASE - pin at '1' will completely erase Flash memory. Setting this option will - switch the pin to general IO mode giving control of the pin to the GPIO - module. - -endif # SOC_SERIES_SAMV71 From 7cfc7c8549bf90df03b9727042336e7854ec5a87 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Fri, 9 Feb 2024 21:55:59 +0100 Subject: [PATCH 02/12] boards: sam4e_xpro: Convert to HWMv2 Port the board to HWMv2. Signed-off-by: Gerson Fernando Budke --- boards/atmel/index.rst | 10 ++++++++ boards/atmel/sam/sam4e_xpro/Kconfig.defconfig | 9 +++++++ .../atmel/sam/sam4e_xpro/Kconfig.sam4e_xpro | 5 ++++ .../arm => atmel/sam}/sam4e_xpro/board.cmake | 0 boards/atmel/sam/sam4e_xpro/board.yml | 5 ++++ .../sam}/sam4e_xpro/doc/img/sam4e_xpro.jpg | Bin .../sam}/sam4e_xpro/doc/index.rst | 22 +++++++++++++----- .../sam}/sam4e_xpro/sam4e_xpro-pinctrl.dtsi | 3 +-- .../sam}/sam4e_xpro/sam4e_xpro.dts | 0 .../sam}/sam4e_xpro/sam4e_xpro.yaml | 12 ++++++++-- .../sam}/sam4e_xpro/sam4e_xpro_defconfig | 5 ---- .../sam}/sam4e_xpro/support/openocd.cfg | 0 .../arm/sam4e_xpro/Kconfig.board | 8 ------- .../arm/sam4e_xpro/Kconfig.defconfig | 11 --------- 14 files changed, 56 insertions(+), 34 deletions(-) create mode 100644 boards/atmel/index.rst create mode 100644 boards/atmel/sam/sam4e_xpro/Kconfig.defconfig create mode 100644 boards/atmel/sam/sam4e_xpro/Kconfig.sam4e_xpro rename boards/{boards_legacy/arm => atmel/sam}/sam4e_xpro/board.cmake (100%) create mode 100644 boards/atmel/sam/sam4e_xpro/board.yml rename boards/{boards_legacy/arm => atmel/sam}/sam4e_xpro/doc/img/sam4e_xpro.jpg (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4e_xpro/doc/index.rst (89%) rename boards/{boards_legacy/arm => atmel/sam}/sam4e_xpro/sam4e_xpro-pinctrl.dtsi (96%) rename boards/{boards_legacy/arm => atmel/sam}/sam4e_xpro/sam4e_xpro.dts (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4e_xpro/sam4e_xpro.yaml (76%) rename boards/{boards_legacy/arm => atmel/sam}/sam4e_xpro/sam4e_xpro_defconfig (59%) rename boards/{boards_legacy/arm => atmel/sam}/sam4e_xpro/support/openocd.cfg (100%) delete mode 100644 boards/boards_legacy/arm/sam4e_xpro/Kconfig.board delete mode 100644 boards/boards_legacy/arm/sam4e_xpro/Kconfig.defconfig diff --git a/boards/atmel/index.rst b/boards/atmel/index.rst new file mode 100644 index 00000000000000..94d1cafb403e15 --- /dev/null +++ b/boards/atmel/index.rst @@ -0,0 +1,10 @@ +.. _boards-atmel: + +Atmel Corporation +################# + +.. toctree:: + :maxdepth: 1 + :glob: + + **/* diff --git a/boards/atmel/sam/sam4e_xpro/Kconfig.defconfig b/boards/atmel/sam/sam4e_xpro/Kconfig.defconfig new file mode 100644 index 00000000000000..f5e3a93e0c0e8a --- /dev/null +++ b/boards/atmel/sam/sam4e_xpro/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +if NETWORKING + +config NET_L2_ETHERNET + default y + +endif # NETWORKING diff --git a/boards/atmel/sam/sam4e_xpro/Kconfig.sam4e_xpro b/boards/atmel/sam/sam4e_xpro/Kconfig.sam4e_xpro new file mode 100644 index 00000000000000..d545050aa9053f --- /dev/null +++ b/boards/atmel/sam/sam4e_xpro/Kconfig.sam4e_xpro @@ -0,0 +1,5 @@ +# Copyright (c) 2019-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_SAM4E_XPRO + select SOC_SAM4E16E diff --git a/boards/boards_legacy/arm/sam4e_xpro/board.cmake b/boards/atmel/sam/sam4e_xpro/board.cmake similarity index 100% rename from boards/boards_legacy/arm/sam4e_xpro/board.cmake rename to boards/atmel/sam/sam4e_xpro/board.cmake diff --git a/boards/atmel/sam/sam4e_xpro/board.yml b/boards/atmel/sam/sam4e_xpro/board.yml new file mode 100644 index 00000000000000..017a22d62cdc5c --- /dev/null +++ b/boards/atmel/sam/sam4e_xpro/board.yml @@ -0,0 +1,5 @@ +board: + name: sam4e_xpro + vendor: atmel + socs: + - name: sam4e16e diff --git a/boards/boards_legacy/arm/sam4e_xpro/doc/img/sam4e_xpro.jpg b/boards/atmel/sam/sam4e_xpro/doc/img/sam4e_xpro.jpg similarity index 100% rename from boards/boards_legacy/arm/sam4e_xpro/doc/img/sam4e_xpro.jpg rename to boards/atmel/sam/sam4e_xpro/doc/img/sam4e_xpro.jpg diff --git a/boards/boards_legacy/arm/sam4e_xpro/doc/index.rst b/boards/atmel/sam/sam4e_xpro/doc/index.rst similarity index 89% rename from boards/boards_legacy/arm/sam4e_xpro/doc/index.rst rename to boards/atmel/sam/sam4e_xpro/doc/index.rst index dce8fc7a5c527d..18d0836c6d6ff0 100644 --- a/boards/boards_legacy/arm/sam4e_xpro/doc/index.rst +++ b/boards/atmel/sam/sam4e_xpro/doc/index.rst @@ -44,25 +44,35 @@ features: +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ -| UART | on-chip | serial port | +| GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ -| USART | on-chip | serial port | +| AFEC | on-chip | adc | ++-----------+------------+-------------------------------------+ +| COUNTER | on-chip | counter | ++-----------+------------+-------------------------------------+ +| ETHERNET | on-chip | ethernet | ++-----------+------------+-------------------------------------+ +| HWINFO | on-chip | hwinfo | ++-----------+------------+-------------------------------------+ +| HSMCI | on-chip | sdhc | +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ +| PWM | on-chip | pwm | ++-----------+------------+-------------------------------------+ | SPI | on-chip | spi | +-----------+------------+-------------------------------------+ -| ETHERNET | on-chip | ethernet | +| UART | on-chip | serial port | +-----------+------------+-------------------------------------+ -| WATCHDOG | on-chip | watchdog | +| USART | on-chip | serial port | +-----------+------------+-------------------------------------+ -| GPIO | on-chip | gpio | +| WATCHDOG | on-chip | watchdog | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig -:zephyr_file:`boards/arm/sam4e_xpro/sam4e_xpro_defconfig`. +:zephyr_file:`boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig`. Connections and IOs =================== diff --git a/boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro-pinctrl.dtsi b/boards/atmel/sam/sam4e_xpro/sam4e_xpro-pinctrl.dtsi similarity index 96% rename from boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro-pinctrl.dtsi rename to boards/atmel/sam/sam4e_xpro/sam4e_xpro-pinctrl.dtsi index fb19be497ca6a3..29f51f1e13cf61 100644 --- a/boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro-pinctrl.dtsi +++ b/boards/atmel/sam/sam4e_xpro/sam4e_xpro-pinctrl.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, Gerson Fernando Budke + * Copyright (c) 2022-2024, Gerson Fernando Budke * SPDX-License-Identifier: Apache-2.0 */ @@ -105,5 +105,4 @@ ; }; }; - }; diff --git a/boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro.dts b/boards/atmel/sam/sam4e_xpro/sam4e_xpro.dts similarity index 100% rename from boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro.dts rename to boards/atmel/sam/sam4e_xpro/sam4e_xpro.dts diff --git a/boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro.yaml b/boards/atmel/sam/sam4e_xpro/sam4e_xpro.yaml similarity index 76% rename from boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro.yaml rename to boards/atmel/sam/sam4e_xpro/sam4e_xpro.yaml index 76ca997b1a0c90..561b06b8afe42d 100644 --- a/boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro.yaml +++ b/boards/atmel/sam/sam4e_xpro/sam4e_xpro.yaml @@ -6,11 +6,19 @@ toolchain: - zephyr - gnuarmemb - xtools +flash: 1024 +ram: 128 supported: - - netif:eth + - adc + - counter - gpio - - spi + - hwinfo + - i2c + - netif:eth + - pwm - sdhc + - spi + - uart - watchdog - xpro_gpio - xpro_i2c diff --git a/boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro_defconfig b/boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig similarity index 59% rename from boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro_defconfig rename to boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig index c5380342d78247..cf189ca136bdee 100644 --- a/boards/boards_legacy/arm/sam4e_xpro/sam4e_xpro_defconfig +++ b/boards/atmel/sam/sam4e_xpro/sam4e_xpro_defconfig @@ -1,9 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_SAM4E=y -CONFIG_SOC_PART_NUMBER_SAM4E16E=y -CONFIG_SOC_ATMEL_SAM4E_EXT_MAINCK=y -CONFIG_BOARD_SAM4E_XPRO=y CONFIG_BUILD_OUTPUT_HEX=y CONFIG_ARM_MPU=y @@ -11,6 +7,5 @@ CONFIG_HW_STACK_PROTECTION=y CONFIG_WDT_DISABLE_AT_BOOT=y CONFIG_CONSOLE=y -CONFIG_GPIO=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y diff --git a/boards/boards_legacy/arm/sam4e_xpro/support/openocd.cfg b/boards/atmel/sam/sam4e_xpro/support/openocd.cfg similarity index 100% rename from boards/boards_legacy/arm/sam4e_xpro/support/openocd.cfg rename to boards/atmel/sam/sam4e_xpro/support/openocd.cfg diff --git a/boards/boards_legacy/arm/sam4e_xpro/Kconfig.board b/boards/boards_legacy/arm/sam4e_xpro/Kconfig.board deleted file mode 100644 index e0e214469923f9..00000000000000 --- a/boards/boards_legacy/arm/sam4e_xpro/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Atmel SAM4E Xplained Pro Board selection - -# Copyright (c) 2019 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_SAM4E_XPRO - bool "Atmel SAM4E Xplained Pro" - depends on SOC_PART_NUMBER_SAM4E16E diff --git a/boards/boards_legacy/arm/sam4e_xpro/Kconfig.defconfig b/boards/boards_legacy/arm/sam4e_xpro/Kconfig.defconfig deleted file mode 100644 index e11bd8b37eeea6..00000000000000 --- a/boards/boards_legacy/arm/sam4e_xpro/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# Atmel SAM4E Xplained Pro Board configuration - -# Copyright (c) 2019 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_SAM4E_XPRO - -config BOARD - default "sam4e_xpro" - -endif # BOARD_SAM4E_XPRO From b842e590de4b0c726facaba8fdefea300b60ec30 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Fri, 9 Feb 2024 22:40:04 +0100 Subject: [PATCH 03/12] boards: sam4l_ek: Convert to HWMv2 Port the board to HWMv2. Signed-off-by: Gerson Fernando Budke --- boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek | 5 +++++ .../arm => atmel/sam}/sam4l_ek/board.cmake | 0 boards/atmel/sam/sam4l_ek/board.yml | 5 +++++ .../doc/img/atmel-sam4l-ek-callouts.jpg | Bin .../arm => atmel/sam}/sam4l_ek/doc/index.rst | 20 +++++++++++------- .../sam}/sam4l_ek/sam4l_ek-pinctrl.dtsi | 0 .../arm => atmel/sam}/sam4l_ek/sam4l_ek.dts | 0 .../arm => atmel/sam}/sam4l_ek/sam4l_ek.yaml | 10 ++++++--- .../sam}/sam4l_ek/sam4l_ek_defconfig | 5 ----- .../boards_legacy/arm/sam4l_ek/Kconfig.board | 8 ------- .../arm/sam4l_ek/Kconfig.defconfig | 11 ---------- 11 files changed, 29 insertions(+), 35 deletions(-) create mode 100644 boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/board.cmake (100%) create mode 100644 boards/atmel/sam/sam4l_ek/board.yml rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/doc/index.rst (93%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/sam4l_ek-pinctrl.dtsi (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/sam4l_ek.dts (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/sam4l_ek.yaml (78%) rename boards/{boards_legacy/arm => atmel/sam}/sam4l_ek/sam4l_ek_defconfig (58%) delete mode 100644 boards/boards_legacy/arm/sam4l_ek/Kconfig.board delete mode 100644 boards/boards_legacy/arm/sam4l_ek/Kconfig.defconfig diff --git a/boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek b/boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek new file mode 100644 index 00000000000000..be93be83111161 --- /dev/null +++ b/boards/atmel/sam/sam4l_ek/Kconfig.sam4l_ek @@ -0,0 +1,5 @@ +# Copyright (c) 2020-2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_SAM4L_EK + select SOC_SAM4LC4C diff --git a/boards/boards_legacy/arm/sam4l_ek/board.cmake b/boards/atmel/sam/sam4l_ek/board.cmake similarity index 100% rename from boards/boards_legacy/arm/sam4l_ek/board.cmake rename to boards/atmel/sam/sam4l_ek/board.cmake diff --git a/boards/atmel/sam/sam4l_ek/board.yml b/boards/atmel/sam/sam4l_ek/board.yml new file mode 100644 index 00000000000000..7045ba351ce083 --- /dev/null +++ b/boards/atmel/sam/sam4l_ek/board.yml @@ -0,0 +1,5 @@ +board: + name: sam4l_ek + vendor: atmel + socs: + - name: sam4lc4c diff --git a/boards/boards_legacy/arm/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg b/boards/atmel/sam/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg similarity index 100% rename from boards/boards_legacy/arm/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg rename to boards/atmel/sam/sam4l_ek/doc/img/atmel-sam4l-ek-callouts.jpg diff --git a/boards/boards_legacy/arm/sam4l_ek/doc/index.rst b/boards/atmel/sam/sam4l_ek/doc/index.rst similarity index 93% rename from boards/boards_legacy/arm/sam4l_ek/doc/index.rst rename to boards/atmel/sam/sam4l_ek/doc/index.rst index ee5d71201718d9..a28b0728836ea6 100644 --- a/boards/boards_legacy/arm/sam4l_ek/doc/index.rst +++ b/boards/atmel/sam/sam4l_ek/doc/index.rst @@ -61,29 +61,33 @@ The sam4l_ek board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | Interface | Controller | Driver/Component | +===========+============+=====================================+ -| GPIO | on-chip | gpio | -+-----------+------------+-------------------------------------+ -| HWINFO | on-chip | Unique 120 bit serial number | -+-----------+------------+-------------------------------------+ | MPU | on-chip | arch/arm | +-----------+------------+-------------------------------------+ | NVIC | on-chip | arch/arm | +-----------+------------+-------------------------------------+ -| SPI | on-chip | spi | -+-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ -| TRNG | on-chip | 32-bit True Random Number Generator | +| COUNTER | on-chip | counter | ++-----------+------------+-------------------------------------+ +| GPIO | on-chip | gpio | ++-----------+------------+-------------------------------------+ +| HWINFO | on-chip | Unique 120 bit serial number | ++-----------+------------+-------------------------------------+ +| SPI | on-chip | spi | ++-----------+------------+-------------------------------------+ +| TRNG | on-chip | entropy | +-----------+------------+-------------------------------------+ | TWIM | on-chip | i2c master port-interrupt | +-----------+------------+-------------------------------------+ | USART | on-chip | serial port | +-----------+------------+-------------------------------------+ +| USB | on-chip | usb device | ++-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig -:zephyr_file:`boards/arm/sam4l_ek/sam4l_ek_defconfig`. +:zephyr_file:`boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig`. Connections and IOs =================== diff --git a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek-pinctrl.dtsi b/boards/atmel/sam/sam4l_ek/sam4l_ek-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/sam4l_ek/sam4l_ek-pinctrl.dtsi rename to boards/atmel/sam/sam4l_ek/sam4l_ek-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek.dts b/boards/atmel/sam/sam4l_ek/sam4l_ek.dts similarity index 100% rename from boards/boards_legacy/arm/sam4l_ek/sam4l_ek.dts rename to boards/atmel/sam/sam4l_ek/sam4l_ek.dts diff --git a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek.yaml b/boards/atmel/sam/sam4l_ek/sam4l_ek.yaml similarity index 78% rename from boards/boards_legacy/arm/sam4l_ek/sam4l_ek.yaml rename to boards/atmel/sam/sam4l_ek/sam4l_ek.yaml index cdadbee508a2fc..f33959c7805951 100644 --- a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek.yaml +++ b/boards/atmel/sam/sam4l_ek/sam4l_ek.yaml @@ -2,16 +2,20 @@ identifier: sam4l_ek name: SAM4L-EK type: mcu arch: arm -flash: 256 -ram: 32 toolchain: - zephyr - gnuarmemb - xtools +flash: 256 +ram: 32 supported: + - counter - gpio + - entropy + - hwinfo - i2c - spi - - usart + - uart + - usb - usb_device vendor: atmel diff --git a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek_defconfig b/boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig similarity index 58% rename from boards/boards_legacy/arm/sam4l_ek/sam4l_ek_defconfig rename to boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig index c5faaad19834be..6c902f537d7c2b 100644 --- a/boards/boards_legacy/arm/sam4l_ek/sam4l_ek_defconfig +++ b/boards/atmel/sam/sam4l_ek/sam4l_ek_defconfig @@ -1,13 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_SAM4L=y -CONFIG_SOC_PART_NUMBER_SAM4LC4C=y -CONFIG_BOARD_SAM4L_EK=y - CONFIG_ARM_MPU=y CONFIG_HW_STACK_PROTECTION=y CONFIG_CONSOLE=y -CONFIG_GPIO=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y diff --git a/boards/boards_legacy/arm/sam4l_ek/Kconfig.board b/boards/boards_legacy/arm/sam4l_ek/Kconfig.board deleted file mode 100644 index 1c0987a045f80c..00000000000000 --- a/boards/boards_legacy/arm/sam4l_ek/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Atmel SAM4L-EK selection - -# Copyright (c) 2020 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_SAM4L_EK - bool "Atmel SAM4L-EK" - depends on SOC_PART_NUMBER_SAM4LC4C diff --git a/boards/boards_legacy/arm/sam4l_ek/Kconfig.defconfig b/boards/boards_legacy/arm/sam4l_ek/Kconfig.defconfig deleted file mode 100644 index 315afa1b31261c..00000000000000 --- a/boards/boards_legacy/arm/sam4l_ek/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# Atmel SAM4L-EK Board configuration - -# Copyright (c) 2020 Gerson Fernando Budke -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_SAM4L_EK - -config BOARD - default "sam4l_ek" - -endif # BOARD_SAM4L_EK From 55f1e404fa0e3999d0ba521a5100d7b05845c4ba Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Fri, 9 Feb 2024 22:54:12 +0100 Subject: [PATCH 04/12] boards: sam4s_xplained: Convert to HWMv2 Port the board to HWMv2. Signed-off-by: Gerson Fernando Budke --- .../sam/sam4s_xplained/Kconfig.sam4s_xplained | 5 ++++ .../sam}/sam4s_xplained/board.cmake | 0 boards/atmel/sam/sam4s_xplained/board.yml | 5 ++++ .../sam4s_xplained/doc/img/sam4s_xplained.jpg | Bin .../sam}/sam4s_xplained/doc/index.rst | 27 ++++++++++-------- .../sam4s_xplained-pinctrl.dtsi | 0 .../sam}/sam4s_xplained/sam4s_xplained.dts | 0 .../sam}/sam4s_xplained/sam4s_xplained.yaml | 5 +++- .../sam4s_xplained/sam4s_xplained_defconfig | 9 ++---- .../arm/sam4s_xplained/Kconfig.board | 8 ------ .../arm/sam4s_xplained/Kconfig.defconfig | 11 ------- 11 files changed, 31 insertions(+), 39 deletions(-) create mode 100644 boards/atmel/sam/sam4s_xplained/Kconfig.sam4s_xplained rename boards/{boards_legacy/arm => atmel/sam}/sam4s_xplained/board.cmake (100%) create mode 100644 boards/atmel/sam/sam4s_xplained/board.yml rename boards/{boards_legacy/arm => atmel/sam}/sam4s_xplained/doc/img/sam4s_xplained.jpg (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4s_xplained/doc/index.rst (94%) rename boards/{boards_legacy/arm => atmel/sam}/sam4s_xplained/sam4s_xplained-pinctrl.dtsi (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4s_xplained/sam4s_xplained.dts (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam4s_xplained/sam4s_xplained.yaml (89%) rename boards/{boards_legacy/arm => atmel/sam}/sam4s_xplained/sam4s_xplained_defconfig (56%) delete mode 100644 boards/boards_legacy/arm/sam4s_xplained/Kconfig.board delete mode 100644 boards/boards_legacy/arm/sam4s_xplained/Kconfig.defconfig diff --git a/boards/atmel/sam/sam4s_xplained/Kconfig.sam4s_xplained b/boards/atmel/sam/sam4s_xplained/Kconfig.sam4s_xplained new file mode 100644 index 00000000000000..08f005f16d0c5e --- /dev/null +++ b/boards/atmel/sam/sam4s_xplained/Kconfig.sam4s_xplained @@ -0,0 +1,5 @@ +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_SAM4S_XPLAINED + select SOC_SAM4S16C diff --git a/boards/boards_legacy/arm/sam4s_xplained/board.cmake b/boards/atmel/sam/sam4s_xplained/board.cmake similarity index 100% rename from boards/boards_legacy/arm/sam4s_xplained/board.cmake rename to boards/atmel/sam/sam4s_xplained/board.cmake diff --git a/boards/atmel/sam/sam4s_xplained/board.yml b/boards/atmel/sam/sam4s_xplained/board.yml new file mode 100644 index 00000000000000..c406301245ba1b --- /dev/null +++ b/boards/atmel/sam/sam4s_xplained/board.yml @@ -0,0 +1,5 @@ +board: + name: sam4s_xplained + vendor: atmel + socs: + - name: sam4s16c diff --git a/boards/boards_legacy/arm/sam4s_xplained/doc/img/sam4s_xplained.jpg b/boards/atmel/sam/sam4s_xplained/doc/img/sam4s_xplained.jpg similarity index 100% rename from boards/boards_legacy/arm/sam4s_xplained/doc/img/sam4s_xplained.jpg rename to boards/atmel/sam/sam4s_xplained/doc/img/sam4s_xplained.jpg diff --git a/boards/boards_legacy/arm/sam4s_xplained/doc/index.rst b/boards/atmel/sam/sam4s_xplained/doc/index.rst similarity index 94% rename from boards/boards_legacy/arm/sam4s_xplained/doc/index.rst rename to boards/atmel/sam/sam4s_xplained/doc/index.rst index 092079cb984c2d..9c1b999eca91fe 100644 --- a/boards/boards_legacy/arm/sam4s_xplained/doc/index.rst +++ b/boards/atmel/sam/sam4s_xplained/doc/index.rst @@ -1,7 +1,7 @@ .. _sam4s_xplained: SAM4S Xplained -################ +############## Overview ******** @@ -40,31 +40,33 @@ features: +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ -| UART | on-chip | serial port | +| ADC | on-chip | adc | +-----------+------------+-------------------------------------+ -| USART | on-chip | serial port | +| COUNTER | on-chip | counter | +-----------+------------+-------------------------------------+ -| I2C | on-chip | i2c | +| GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ -| SPI | on-chip | spi | +| HWINFO | on-chip | Unique device serial number | +-----------+------------+-------------------------------------+ -| WATCHDOG | on-chip | watchdog | +| I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ -| GPIO | on-chip | gpio | +| PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ -| HWINFO | on-chip | Unique device serial number | +| SPI | on-chip | spi | +-----------+------------+-------------------------------------+ | SMC | on-chip | memc (PSRAM) | +-----------+------------+-------------------------------------+ -| PWM | on-chip | pwm | +| UART | on-chip | serial port | +-----------+------------+-------------------------------------+ -| ADC | on-chip | adc | +| USART | on-chip | serial port | ++-----------+------------+-------------------------------------+ +| WATCHDOG | on-chip | watchdog | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig -:zephyr_file:`boards/arm/sam4s_xplained/sam4s_xplained_defconfig`. +:zephyr_file:`boards/atmel/sam/sam4s_xplained/sam4s_xplained_defconfig`. Connections and IOs =================== @@ -89,7 +91,8 @@ The section flashing uses the UART from the Segger USB debug connection. Programming and Debugging ************************* -The SAM4S Xplained board comes with Segger `J-Link OB `_. This provides a debug +The SAM4S Xplained board comes with Segger +`J-Link OB `_. This provides a debug interface to the SAM4S16C chip. You can use Ozone or JLink to communicate with the SAM4S16C. diff --git a/boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained-pinctrl.dtsi b/boards/atmel/sam/sam4s_xplained/sam4s_xplained-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained-pinctrl.dtsi rename to boards/atmel/sam/sam4s_xplained/sam4s_xplained-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained.dts b/boards/atmel/sam/sam4s_xplained/sam4s_xplained.dts similarity index 100% rename from boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained.dts rename to boards/atmel/sam/sam4s_xplained/sam4s_xplained.dts diff --git a/boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained.yaml b/boards/atmel/sam/sam4s_xplained/sam4s_xplained.yaml similarity index 89% rename from boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained.yaml rename to boards/atmel/sam/sam4s_xplained/sam4s_xplained.yaml index 20e5949b0feab3..0cc1a4f9debe02 100644 --- a/boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained.yaml +++ b/boards/atmel/sam/sam4s_xplained/sam4s_xplained.yaml @@ -6,9 +6,13 @@ toolchain: - zephyr - gnuarmemb - xtools +flash: 1024 +ram: 128 supported: - adc + - counter - gpio + - hwinfo - memc - pwm - spi @@ -17,5 +21,4 @@ supported: - xplained_i2c - xplained_serial - xplained_spi - - hwinfo vendor: atmel diff --git a/boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained_defconfig b/boards/atmel/sam/sam4s_xplained/sam4s_xplained_defconfig similarity index 56% rename from boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained_defconfig rename to boards/atmel/sam/sam4s_xplained/sam4s_xplained_defconfig index 09f69d3220b69f..91293d9a64121c 100644 --- a/boards/boards_legacy/arm/sam4s_xplained/sam4s_xplained_defconfig +++ b/boards/atmel/sam/sam4s_xplained/sam4s_xplained_defconfig @@ -1,16 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_SAM4S=y -CONFIG_SOC_PART_NUMBER_SAM4S16C=y -CONFIG_SOC_ATMEL_SAM4S_EXT_MAINCK=y -CONFIG_BOARD_SAM4S_XPLAINED=y - CONFIG_ARM_MPU=y CONFIG_HW_STACK_PROTECTION=y CONFIG_WDT_DISABLE_AT_BOOT=y CONFIG_CONSOLE=y -CONFIG_GPIO=y -CONFIG_MEMC=y CONFIG_SERIAL=y CONFIG_UART_CONSOLE=y + +CONFIG_MEMC=y diff --git a/boards/boards_legacy/arm/sam4s_xplained/Kconfig.board b/boards/boards_legacy/arm/sam4s_xplained/Kconfig.board deleted file mode 100644 index 65ec186370b329..00000000000000 --- a/boards/boards_legacy/arm/sam4s_xplained/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Atmel SAM4S Xplained Board selection - -# Copyright (c) 2017 Justin Watson -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_SAM4S_XPLAINED - bool "Atmel SAM4S Xplained" - depends on SOC_PART_NUMBER_SAM4S16C diff --git a/boards/boards_legacy/arm/sam4s_xplained/Kconfig.defconfig b/boards/boards_legacy/arm/sam4s_xplained/Kconfig.defconfig deleted file mode 100644 index d201fa44209e67..00000000000000 --- a/boards/boards_legacy/arm/sam4s_xplained/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# Atmel SAM4S Xplained Board configuration - -# Copyright (c) 2017 Justin Watson -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_SAM4S_XPLAINED - -config BOARD - default "sam4s_xplained" - -endif # BOARD_SAM4S_XPLAINED From c34ba573287af8cac516c7db24e16aec188c24e3 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Sat, 10 Feb 2024 07:45:09 +0100 Subject: [PATCH 05/12] boards: sam_e70_xplained: Convert to HWMv2 Port the board to HWMv2. Signed-off-by: Gerson Fernando Budke --- .../sam}/sam_e70_xplained/Kconfig.defconfig | 7 --- .../sam_e70_xplained/Kconfig.sam_e70_xplained | 7 +++ .../sam}/sam_e70_xplained/board.cmake | 0 boards/atmel/sam/sam_e70_xplained/board.yml | 6 +++ .../doc/img/sam_e70_xplained.jpg | Bin .../sam}/sam_e70_xplained/doc/index.rst | 42 +++++++++++------- .../sam/sam_e70_xplained/pre_dt_board.cmake | 6 +++ .../sam_e70_xplained-common.dtsi | 0 .../sam_e70_xplained-pinctrl.dtsi | 0 .../sam_e70_xplained_same70q21.dts} | 2 +- .../sam_e70_xplained_same70q21.yaml} | 23 +++++----- .../sam_e70_xplained_same70q21_defconfig | 12 +++++ .../sam_e70_xplained_same70q21b.dts} | 2 +- .../sam_e70_xplained_same70q21b.yaml} | 20 +++++---- .../sam_e70_xplained_same70q21b_defconfig | 12 +++++ .../sam}/sam_e70_xplained/support/openocd.cfg | 0 .../arm/sam_e70_xplained/Kconfig.board | 8 ---- .../sam_e70_xplained_defconfig | 20 --------- .../sam_e70b_xplained_defconfig | 20 --------- 19 files changed, 95 insertions(+), 92 deletions(-) rename boards/{boards_legacy/arm => atmel/sam}/sam_e70_xplained/Kconfig.defconfig (81%) create mode 100644 boards/atmel/sam/sam_e70_xplained/Kconfig.sam_e70_xplained rename boards/{boards_legacy/arm => atmel/sam}/sam_e70_xplained/board.cmake (100%) create mode 100644 boards/atmel/sam/sam_e70_xplained/board.yml rename boards/{boards_legacy/arm => atmel/sam}/sam_e70_xplained/doc/img/sam_e70_xplained.jpg (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam_e70_xplained/doc/index.rst (86%) create mode 100644 boards/atmel/sam/sam_e70_xplained/pre_dt_board.cmake rename boards/{boards_legacy/arm => atmel/sam}/sam_e70_xplained/sam_e70_xplained-common.dtsi (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam_e70_xplained/sam_e70_xplained-pinctrl.dtsi (100%) rename boards/{boards_legacy/arm/sam_e70_xplained/sam_e70_xplained.dts => atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.dts} (93%) rename boards/{boards_legacy/arm/sam_e70_xplained/sam_e70_xplained.yaml => atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.yaml} (78%) create mode 100644 boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21_defconfig rename boards/{boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained.dts => atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.dts} (82%) rename boards/{boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained.yaml => atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.yaml} (76%) create mode 100644 boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b_defconfig rename boards/{boards_legacy/arm => atmel/sam}/sam_e70_xplained/support/openocd.cfg (100%) delete mode 100644 boards/boards_legacy/arm/sam_e70_xplained/Kconfig.board delete mode 100644 boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained_defconfig delete mode 100644 boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained_defconfig diff --git a/boards/boards_legacy/arm/sam_e70_xplained/Kconfig.defconfig b/boards/atmel/sam/sam_e70_xplained/Kconfig.defconfig similarity index 81% rename from boards/boards_legacy/arm/sam_e70_xplained/Kconfig.defconfig rename to boards/atmel/sam/sam_e70_xplained/Kconfig.defconfig index ab33a8333f7d47..59f0676d06b57b 100644 --- a/boards/boards_legacy/arm/sam_e70_xplained/Kconfig.defconfig +++ b/boards/atmel/sam/sam_e70_xplained/Kconfig.defconfig @@ -3,11 +3,6 @@ # Copyright (c) 2016 Piotr Mienkowski # SPDX-License-Identifier: Apache-2.0 -if BOARD_SAM_E70_XPLAINED - -config BOARD - default "sam_e70_xplained" - if ETH_SAM_GMAC # Read MAC address from AT24MAC402 EEPROM @@ -30,5 +25,3 @@ config NET_L2_ETHERNET default y endif # NETWORKING - -endif # BOARD_SAM_E70_XPLAINED diff --git a/boards/atmel/sam/sam_e70_xplained/Kconfig.sam_e70_xplained b/boards/atmel/sam/sam_e70_xplained/Kconfig.sam_e70_xplained new file mode 100644 index 00000000000000..8cff5c27738422 --- /dev/null +++ b/boards/atmel/sam/sam_e70_xplained/Kconfig.sam_e70_xplained @@ -0,0 +1,7 @@ +# Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_SAM_E70_XPLAINED + select SOC_SAME70Q21 if BOARD_SAM_E70_XPLAINED_SAME70Q21 + select SOC_SAME70Q21B if BOARD_SAM_E70_XPLAINED_SAME70Q21B diff --git a/boards/boards_legacy/arm/sam_e70_xplained/board.cmake b/boards/atmel/sam/sam_e70_xplained/board.cmake similarity index 100% rename from boards/boards_legacy/arm/sam_e70_xplained/board.cmake rename to boards/atmel/sam/sam_e70_xplained/board.cmake diff --git a/boards/atmel/sam/sam_e70_xplained/board.yml b/boards/atmel/sam/sam_e70_xplained/board.yml new file mode 100644 index 00000000000000..1308363814ac12 --- /dev/null +++ b/boards/atmel/sam/sam_e70_xplained/board.yml @@ -0,0 +1,6 @@ +board: + name: sam_e70_xplained + vendor: atmel + socs: + - name: same70q21 + - name: same70q21b diff --git a/boards/boards_legacy/arm/sam_e70_xplained/doc/img/sam_e70_xplained.jpg b/boards/atmel/sam/sam_e70_xplained/doc/img/sam_e70_xplained.jpg similarity index 100% rename from boards/boards_legacy/arm/sam_e70_xplained/doc/img/sam_e70_xplained.jpg rename to boards/atmel/sam/sam_e70_xplained/doc/img/sam_e70_xplained.jpg diff --git a/boards/boards_legacy/arm/sam_e70_xplained/doc/index.rst b/boards/atmel/sam/sam_e70_xplained/doc/index.rst similarity index 86% rename from boards/boards_legacy/arm/sam_e70_xplained/doc/index.rst rename to boards/atmel/sam/sam_e70_xplained/doc/index.rst index c7abfac8cc83bd..bab33f538c461c 100644 --- a/boards/boards_legacy/arm/sam_e70_xplained/doc/index.rst +++ b/boards/atmel/sam/sam_e70_xplained/doc/index.rst @@ -44,35 +44,43 @@ features: +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ -| UART | on-chip | serial port | -+-----------+------------+-------------------------------------+ -| USART | on-chip | serial port | +| AFEC | on-chip | adc | +-----------+------------+-------------------------------------+ -| I2C | on-chip | i2c | +| CAN FD | on-chip | can | +-----------+------------+-------------------------------------+ -| SPI | on-chip | spi | +| COUNTER | on-chip | counter | +-----------+------------+-------------------------------------+ | ETHERNET | on-chip | ethernet | +-----------+------------+-------------------------------------+ -| WATCHDOG | on-chip | watchdog | -+-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ -| ADC | on-chip | ADC via AFEC | +| DAC | on-chip | dac | +-----------+------------+-------------------------------------+ -| USB | on-chip | USB device | +| HWINFO | on-chip | Unique device serial number | ++-----------+------------+-------------------------------------+ +| I2C | on-chip | i2c | ++-----------+------------+-------------------------------------+ +| I2S | on-chip | i2s | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ -| CAN | on-chip | canbus | +| SPI | on-chip | spi | +-----------+------------+-------------------------------------+ -| HWINFO | on-chip | Unique device serial number | +| UART | on-chip | serial port | ++-----------+------------+-------------------------------------+ +| USART | on-chip | serial port | ++-----------+------------+-------------------------------------+ +| USB | on-chip | USB device | ++-----------+------------+-------------------------------------+ +| WATCHDOG | on-chip | watchdog | ++-----------+------------+-------------------------------------+ +| XDMAC | on-chip | dma | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig -:zephyr_file:`boards/arm/sam_e70_xplained/sam_e70_xplained_defconfig`. +:zephyr_file:`boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21_defconfig`. Connections and IOs =================== @@ -138,19 +146,19 @@ Flashing .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: sam_e70_xplained + :board: sam_e70_xplained/same70q21 :goals: build flash You should see "Hello World! sam_e70_xplained" in your terminal. -#. To use the SoC variation B IC, you need type "sam_e70b_xplained". +#. To use the SoC variation B IC, you need type "sam_e70_xplained/same70q21b". .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: sam_e70b_xplained + :board: sam_e70_xplained/same70q21b :goals: build flash - You should see "Hello World! sam_e70b_xplained" in your terminal. + You should see "Hello World! sam_e70_xplained" in your terminal. You can flash the image using an external debug adapter such as J-Link or ULINK, connected to the 20-pin JTAG header. Supply the name of the @@ -167,7 +175,7 @@ You can debug an application in the usual way. Here is an example for the .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: sam_e70_xplained + :board: sam_e70_xplained/same70q21 :maybe-skip-config: :goals: debug diff --git a/boards/atmel/sam/sam_e70_xplained/pre_dt_board.cmake b/boards/atmel/sam/sam_e70_xplained/pre_dt_board.cmake new file mode 100644 index 00000000000000..3b32c9ca518166 --- /dev/null +++ b/boards/atmel/sam/sam_e70_xplained/pre_dt_board.cmake @@ -0,0 +1,6 @@ +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +# Suppress "unique_unit_address_if_enabled" to handle the following overlaps: +# - /soc/ethernet@40050000 & /soc/mdio@40050000 +list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained-common.dtsi b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained-common.dtsi similarity index 100% rename from boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained-common.dtsi rename to boards/atmel/sam/sam_e70_xplained/sam_e70_xplained-common.dtsi diff --git a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained-pinctrl.dtsi b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained-pinctrl.dtsi rename to boards/atmel/sam/sam_e70_xplained/sam_e70_xplained-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained.dts b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.dts similarity index 93% rename from boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained.dts rename to boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.dts index ee002c846fa98d..64a26cecc88b0a 100644 --- a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained.dts +++ b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.dts @@ -1,7 +1,7 @@ /* * Copyright (c) 2017 Piotr Mienkowski * Copyright (c) 2017 Justin Watson - * Copyright (c) 2020-2023 Gerson Fernando Budke + * Copyright (c) 2020-2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained.yaml b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.yaml similarity index 78% rename from boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained.yaml rename to boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.yaml index 714795a2104d3c..e6da0170989a60 100644 --- a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained.yaml +++ b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.yaml @@ -1,23 +1,26 @@ -identifier: sam_e70_xplained +identifier: sam_e70_xplained/same70q21 name: SAM E70 Xplained type: mcu arch: arm -ram: 384 -flash: 2048 toolchain: - zephyr - gnuarmemb - xtools +flash: 2048 +ram: 384 supported: - - dma - - netif:eth - adc - - i2s + - can + - counter + - dac + - dma - gpio + - hwinfo + - i2s + - pwm + - netif:eth - spi - - watchdog + - usb - usb_device - - pwm - - can - - hwinfo + - watchdog vendor: atmel diff --git a/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21_defconfig b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21_defconfig new file mode 100644 index 00000000000000..f5404f816bee14 --- /dev/null +++ b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21_defconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_BUILD_OUTPUT_HEX=y + +CONFIG_ARM_MPU=y +CONFIG_CACHE_MANAGEMENT=y +CONFIG_HW_STACK_PROTECTION=y +CONFIG_WDT_DISABLE_AT_BOOT=y + +CONFIG_CONSOLE=y +CONFIG_SERIAL=y +CONFIG_UART_CONSOLE=y diff --git a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained.dts b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.dts similarity index 82% rename from boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained.dts rename to boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.dts index a26b519d4afe8d..e65d9da3325494 100644 --- a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained.dts +++ b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.dts @@ -1,6 +1,6 @@ /* * Copyright (c) 2020 Stephanos Ioannidis - * Copyright (c) 2020 Gerson Fernando Budke + * Copyright (c) 2020-2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained.yaml b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.yaml similarity index 76% rename from boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained.yaml rename to boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.yaml index 8cd515dca40a69..8d15c3ae088e22 100644 --- a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained.yaml +++ b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.yaml @@ -1,22 +1,26 @@ -identifier: sam_e70b_xplained +identifier: sam_e70_xplained/same70q21b name: SAM E70 Xplained (Revision B) type: mcu arch: arm -ram: 384 -flash: 2048 toolchain: - zephyr - gnuarmemb - xtools +flash: 2048 +ram: 384 supported: - - netif:eth - adc + - can + - counter - dac + - dma - gpio + - hwinfo + - i2s + - pwm + - netif:eth - spi - - watchdog + - usb - usb_device - - pwm - - can - - hwinfo + - watchdog vendor: atmel diff --git a/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b_defconfig b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b_defconfig new file mode 100644 index 00000000000000..f5404f816bee14 --- /dev/null +++ b/boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b_defconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_BUILD_OUTPUT_HEX=y + +CONFIG_ARM_MPU=y +CONFIG_CACHE_MANAGEMENT=y +CONFIG_HW_STACK_PROTECTION=y +CONFIG_WDT_DISABLE_AT_BOOT=y + +CONFIG_CONSOLE=y +CONFIG_SERIAL=y +CONFIG_UART_CONSOLE=y diff --git a/boards/boards_legacy/arm/sam_e70_xplained/support/openocd.cfg b/boards/atmel/sam/sam_e70_xplained/support/openocd.cfg similarity index 100% rename from boards/boards_legacy/arm/sam_e70_xplained/support/openocd.cfg rename to boards/atmel/sam/sam_e70_xplained/support/openocd.cfg diff --git a/boards/boards_legacy/arm/sam_e70_xplained/Kconfig.board b/boards/boards_legacy/arm/sam_e70_xplained/Kconfig.board deleted file mode 100644 index f7ff0b7c37d6a1..00000000000000 --- a/boards/boards_legacy/arm/sam_e70_xplained/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Atmel SMART SAM E70 Xplained Board selection - -# Copyright (c) 2016 Piotr Mienkowski -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_SAM_E70_XPLAINED - bool "Atmel SMART SAM E70 Xplained Board" - depends on SOC_PART_NUMBER_SAME70Q21 || SOC_PART_NUMBER_SAME70Q21B diff --git a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained_defconfig b/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained_defconfig deleted file mode 100644 index 30cb50e4512625..00000000000000 --- a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70_xplained_defconfig +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_SOC_SERIES_SAME70=y -CONFIG_SOC_PART_NUMBER_SAME70Q21=y -CONFIG_SOC_ATMEL_SAME70_EXT_MAINCK=y -CONFIG_SOC_ATMEL_SAME70_PLLA_MULA=24 -CONFIG_SOC_ATMEL_SAME70_PLLA_DIVA=1 -CONFIG_BOARD_SAM_E70_XPLAINED=y -CONFIG_BUILD_OUTPUT_HEX=y - -CONFIG_ARM_MPU=y -CONFIG_CACHE_MANAGEMENT=y -CONFIG_HW_STACK_PROTECTION=y -CONFIG_WDT_DISABLE_AT_BOOT=y - -CONFIG_CONSOLE=y -CONFIG_GPIO=y -CONFIG_SERIAL=y -CONFIG_UART_CONSOLE=y -CONFIG_USART_SAM=y diff --git a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained_defconfig b/boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained_defconfig deleted file mode 100644 index 5aba40c44008cb..00000000000000 --- a/boards/boards_legacy/arm/sam_e70_xplained/sam_e70b_xplained_defconfig +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_SOC_SERIES_SAME70=y -CONFIG_SOC_PART_NUMBER_SAME70Q21B=y -CONFIG_SOC_ATMEL_SAME70_EXT_MAINCK=y -CONFIG_SOC_ATMEL_SAME70_PLLA_MULA=24 -CONFIG_SOC_ATMEL_SAME70_PLLA_DIVA=1 -CONFIG_BOARD_SAM_E70_XPLAINED=y -CONFIG_BUILD_OUTPUT_HEX=y - -CONFIG_ARM_MPU=y -CONFIG_CACHE_MANAGEMENT=y -CONFIG_HW_STACK_PROTECTION=y -CONFIG_WDT_DISABLE_AT_BOOT=y - -CONFIG_CONSOLE=y -CONFIG_GPIO=y -CONFIG_SERIAL=y -CONFIG_UART_CONSOLE=y -CONFIG_USART_SAM=y From eab232d14fef57f811b23af47cfb12509670bbc2 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Sat, 10 Feb 2024 08:09:53 +0100 Subject: [PATCH 06/12] boards: sam_v71_xult: Convert to HWMv2 Port the board to HWMv2. Signed-off-by: Gerson Fernando Budke --- .../sam}/sam_v71_xult/Kconfig.defconfig | 7 --- .../sam/sam_v71_xult/Kconfig.sam_v71_xult | 7 +++ .../sam}/sam_v71_xult/board.cmake | 0 boards/atmel/sam/sam_v71_xult/board.yml | 6 +++ .../sam_v71_xult/doc/img/sam_v71_xult.jpg | Bin .../sam}/sam_v71_xult/doc/index.rst | 42 +++++++++++------- .../atmel/sam/sam_v71_xult/pre_dt_board.cmake | 6 +++ .../sam_v71_xult/sam_v71_xult-common.dtsi | 0 .../sam_v71_xult/sam_v71_xult-pinctrl.dtsi | 0 .../sam_v71_xult/sam_v71_xult_samv71q21.dts} | 2 +- .../sam_v71_xult/sam_v71_xult_samv71q21.yaml} | 20 ++++++--- .../sam_v71_xult_samv71q21_defconfig | 12 +++++ .../sam_v71_xult/sam_v71_xult_samv71q21b.dts} | 4 +- .../sam_v71_xult_samv71q21b.yaml} | 18 +++++--- .../sam_v71_xult_samv71q21b_defconfig | 12 +++++ .../sam}/sam_v71_xult/support/openocd.cfg | 0 .../arm/sam_v71_xult/Kconfig.board | 9 ---- .../arm/sam_v71_xult/sam_v71_xult_defconfig | 20 --------- .../arm/sam_v71_xult/sam_v71b_xult_defconfig | 20 --------- .../shields/arduino_uno_click/doc/index.rst | 2 +- boards/shields/atmel_rf2xx/doc/index.rst | 22 ++++----- boards/shields/inventek_eswifi/doc/index.rst | 22 ++++----- 22 files changed, 119 insertions(+), 112 deletions(-) rename boards/{boards_legacy/arm => atmel/sam}/sam_v71_xult/Kconfig.defconfig (84%) create mode 100644 boards/atmel/sam/sam_v71_xult/Kconfig.sam_v71_xult rename boards/{boards_legacy/arm => atmel/sam}/sam_v71_xult/board.cmake (100%) create mode 100644 boards/atmel/sam/sam_v71_xult/board.yml rename boards/{boards_legacy/arm => atmel/sam}/sam_v71_xult/doc/img/sam_v71_xult.jpg (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam_v71_xult/doc/index.rst (87%) create mode 100644 boards/atmel/sam/sam_v71_xult/pre_dt_board.cmake rename boards/{boards_legacy/arm => atmel/sam}/sam_v71_xult/sam_v71_xult-common.dtsi (100%) rename boards/{boards_legacy/arm => atmel/sam}/sam_v71_xult/sam_v71_xult-pinctrl.dtsi (100%) rename boards/{boards_legacy/arm/sam_v71_xult/sam_v71_xult.dts => atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.dts} (84%) rename boards/{boards_legacy/arm/sam_v71_xult/sam_v71_xult.yaml => atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.yaml} (78%) create mode 100644 boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21_defconfig rename boards/{boards_legacy/arm/sam_v71_xult/sam_v71b_xult.dts => atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.dts} (63%) rename boards/{boards_legacy/arm/sam_v71_xult/sam_v71b_xult.yaml => atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.yaml} (78%) create mode 100644 boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b_defconfig rename boards/{boards_legacy/arm => atmel/sam}/sam_v71_xult/support/openocd.cfg (100%) delete mode 100644 boards/boards_legacy/arm/sam_v71_xult/Kconfig.board delete mode 100644 boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult_defconfig delete mode 100644 boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult_defconfig diff --git a/boards/boards_legacy/arm/sam_v71_xult/Kconfig.defconfig b/boards/atmel/sam/sam_v71_xult/Kconfig.defconfig similarity index 84% rename from boards/boards_legacy/arm/sam_v71_xult/Kconfig.defconfig rename to boards/atmel/sam/sam_v71_xult/Kconfig.defconfig index dca80a82289f77..5c860149dc8b9d 100644 --- a/boards/boards_legacy/arm/sam_v71_xult/Kconfig.defconfig +++ b/boards/atmel/sam/sam_v71_xult/Kconfig.defconfig @@ -4,11 +4,6 @@ # Copyright (c) 2016 Piotr Mienkowski # SPDX-License-Identifier: Apache-2.0 -if BOARD_SAM_V71_XULT - -config BOARD - default "sam_v71_xult" - if ETH_SAM_GMAC # Read MAC address from AT24MAC402 EEPROM @@ -31,5 +26,3 @@ config NET_L2_ETHERNET default y endif # NETWORKING - -endif # BOARD_SAM_V71_XULT diff --git a/boards/atmel/sam/sam_v71_xult/Kconfig.sam_v71_xult b/boards/atmel/sam/sam_v71_xult/Kconfig.sam_v71_xult new file mode 100644 index 00000000000000..e84ae3fc535f7a --- /dev/null +++ b/boards/atmel/sam/sam_v71_xult/Kconfig.sam_v71_xult @@ -0,0 +1,7 @@ +# Copyright (c) 2016 Piotr Mienkowski +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_SAM_V71_XULT + select SOC_SAMV71Q21 if BOARD_SAM_V71_XULT_SAMV71Q21 + select SOC_SAMV71Q21B if BOARD_SAM_V71_XULT_SAMV71Q21B diff --git a/boards/boards_legacy/arm/sam_v71_xult/board.cmake b/boards/atmel/sam/sam_v71_xult/board.cmake similarity index 100% rename from boards/boards_legacy/arm/sam_v71_xult/board.cmake rename to boards/atmel/sam/sam_v71_xult/board.cmake diff --git a/boards/atmel/sam/sam_v71_xult/board.yml b/boards/atmel/sam/sam_v71_xult/board.yml new file mode 100644 index 00000000000000..68996e0648586c --- /dev/null +++ b/boards/atmel/sam/sam_v71_xult/board.yml @@ -0,0 +1,6 @@ +board: + name: sam_v71_xult + vendor: atmel + socs: + - name: samv71q21 + - name: samv71q21b diff --git a/boards/boards_legacy/arm/sam_v71_xult/doc/img/sam_v71_xult.jpg b/boards/atmel/sam/sam_v71_xult/doc/img/sam_v71_xult.jpg similarity index 100% rename from boards/boards_legacy/arm/sam_v71_xult/doc/img/sam_v71_xult.jpg rename to boards/atmel/sam/sam_v71_xult/doc/img/sam_v71_xult.jpg diff --git a/boards/boards_legacy/arm/sam_v71_xult/doc/index.rst b/boards/atmel/sam/sam_v71_xult/doc/index.rst similarity index 87% rename from boards/boards_legacy/arm/sam_v71_xult/doc/index.rst rename to boards/atmel/sam/sam_v71_xult/doc/index.rst index a61fe887d6a877..e0b5fce6c04d32 100644 --- a/boards/boards_legacy/arm/sam_v71_xult/doc/index.rst +++ b/boards/atmel/sam/sam_v71_xult/doc/index.rst @@ -50,35 +50,43 @@ features: +-----------+------------+-------------------------------------+ | SYSTICK | on-chip | systick | +-----------+------------+-------------------------------------+ -| UART | on-chip | serial port | -+-----------+------------+-------------------------------------+ -| USART | on-chip | serial port | +| AFEC | on-chip | adc | +-----------+------------+-------------------------------------+ -| I2C | on-chip | i2c | +| CAN FD | on-chip | can | +-----------+------------+-------------------------------------+ -| SPI | on-chip | spi | +| COUNTER | on-chip | counter | +-----------+------------+-------------------------------------+ | ETHERNET | on-chip | ethernet | +-----------+------------+-------------------------------------+ -| WATCHDOG | on-chip | watchdog | -+-----------+------------+-------------------------------------+ | GPIO | on-chip | gpio | +-----------+------------+-------------------------------------+ -| ADC | on-chip | ADC via AFEC | +| DAC | on-chip | dac | +-----------+------------+-------------------------------------+ -| USB | on-chip | USB device | +| HWINFO | on-chip | Unique device serial number | ++-----------+------------+-------------------------------------+ +| I2C | on-chip | i2c | ++-----------+------------+-------------------------------------+ +| I2S | on-chip | i2s | +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ -| CAN FD | on-chip | can | +| SPI | on-chip | spi | +-----------+------------+-------------------------------------+ -| HWINFO | on-chip | Unique device serial number | +| UART | on-chip | serial port | ++-----------+------------+-------------------------------------+ +| USART | on-chip | serial port | ++-----------+------------+-------------------------------------+ +| USB | on-chip | USB device | ++-----------+------------+-------------------------------------+ +| WATCHDOG | on-chip | watchdog | ++-----------+------------+-------------------------------------+ +| XDMAC | on-chip | dma | +-----------+------------+-------------------------------------+ Other hardware features are not currently supported by Zephyr. The default configuration can be found in the Kconfig -:zephyr_file:`boards/arm/sam_v71_xult/sam_v71_xult_defconfig`. +:zephyr_file:`boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21_defconfig`. Connections and IOs =================== @@ -141,19 +149,19 @@ Flashing .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: sam_v71_xult + :board: sam_v71_xult/samv71q21 :goals: build flash You should see "Hello World! sam_v71_xult" in your terminal. -#. To use the SoC variation B IC, you need type "sam_v71b_xult". +#. To use the SoC variation B IC, you need type "sam_v71_xult/samv71q21b". .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: sam_v71b_xult + :board: sam_v71_xult/samv71q21b :goals: build flash - You should see "Hello World! sam_v71b_xult" in your terminal. + You should see "Hello World! sam_v71_xult" in your terminal. You can flash the image using an external debug adapter such as J-Link or ULINK, connected to the 20-pin JTAG header. Supply the name of the @@ -170,7 +178,7 @@ You can debug an application in the usual way. Here is an example for the .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: sam_v71_xult + :board: sam_v71_xult/samv71q21 :maybe-skip-config: :goals: debug diff --git a/boards/atmel/sam/sam_v71_xult/pre_dt_board.cmake b/boards/atmel/sam/sam_v71_xult/pre_dt_board.cmake new file mode 100644 index 00000000000000..3b32c9ca518166 --- /dev/null +++ b/boards/atmel/sam/sam_v71_xult/pre_dt_board.cmake @@ -0,0 +1,6 @@ +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +# Suppress "unique_unit_address_if_enabled" to handle the following overlaps: +# - /soc/ethernet@40050000 & /soc/mdio@40050000 +list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult-common.dtsi b/boards/atmel/sam/sam_v71_xult/sam_v71_xult-common.dtsi similarity index 100% rename from boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult-common.dtsi rename to boards/atmel/sam/sam_v71_xult/sam_v71_xult-common.dtsi diff --git a/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult-pinctrl.dtsi b/boards/atmel/sam/sam_v71_xult/sam_v71_xult-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult-pinctrl.dtsi rename to boards/atmel/sam/sam_v71_xult/sam_v71_xult-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult.dts b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.dts similarity index 84% rename from boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult.dts rename to boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.dts index 634da676e964d7..9bdcadc7946317 100644 --- a/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult.dts +++ b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.dts @@ -1,7 +1,7 @@ /* * Copyright (c) 2017 Piotr Mienkowski * Copyright (c) 2017 Justin Watson - * Copyright (c) 2019-2020 Gerson Fernando Budke + * Copyright (c) 2020-2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult.yaml b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.yaml similarity index 78% rename from boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult.yaml rename to boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.yaml index 010552029502b2..e8b433685d0107 100644 --- a/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult.yaml +++ b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21.yaml @@ -1,4 +1,4 @@ -identifier: sam_v71_xult +identifier: sam_v71_xult/samv71q21 name: SAM V71 Xplained Ultra type: mcu arch: arm @@ -6,22 +6,28 @@ toolchain: - zephyr - gnuarmemb - xtools +flash: 2048 +ram: 384 supported: - - dma - - netif:eth - adc - arduino_gpio - arduino_i2c - arduino_spi + - can + - counter + - dac + - dma + - hwinfo - gpio + - i2s + - pwm + - netif:eth - spi - - watchdog + - usb - usb_device - - pwm + - watchdog - xpro_gpio - xpro_i2c - xpro_serial - xpro_spi - - can - - hwinfo vendor: atmel diff --git a/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21_defconfig b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21_defconfig new file mode 100644 index 00000000000000..f5404f816bee14 --- /dev/null +++ b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21_defconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_BUILD_OUTPUT_HEX=y + +CONFIG_ARM_MPU=y +CONFIG_CACHE_MANAGEMENT=y +CONFIG_HW_STACK_PROTECTION=y +CONFIG_WDT_DISABLE_AT_BOOT=y + +CONFIG_CONSOLE=y +CONFIG_SERIAL=y +CONFIG_UART_CONSOLE=y diff --git a/boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult.dts b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.dts similarity index 63% rename from boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult.dts rename to boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.dts index 8f16beb951fe1b..f6f7f5a03ebfdd 100644 --- a/boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult.dts +++ b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.dts @@ -1,6 +1,6 @@ /* * Copyright (c) 2020 Stephanos Ioannidis - * Copyright (c) 2020 Gerson Fernando Budke + * Copyright (c) 2020-2024 Gerson Fernando Budke * * SPDX-License-Identifier: Apache-2.0 */ @@ -12,5 +12,5 @@ / { model = "Atmel SAM V71B Xplained Ultra board"; - compatible = "atmel,sam_v71b_xult", "atmel,samv71q21b", "atmel,samv71b"; + compatible = "atmel,sam_v71_xult", "atmel,samv71q21b", "atmel,samv71b"; }; diff --git a/boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult.yaml b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.yaml similarity index 78% rename from boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult.yaml rename to boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.yaml index 9dbb670075f53d..578359edbbe011 100644 --- a/boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult.yaml +++ b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b.yaml @@ -1,4 +1,4 @@ -identifier: sam_v71b_xult +identifier: sam_v71_xult/samv71q21b name: SAM V71 Xplained Ultra (Revision B) type: mcu arch: arm @@ -6,22 +6,28 @@ toolchain: - zephyr - gnuarmemb - xtools +flash: 2048 +ram: 384 supported: - - netif:eth - adc - arduino_gpio - arduino_i2c - arduino_spi + - can + - counter - dac + - dma + - hwinfo - gpio + - i2s + - pwm + - netif:eth - spi - - watchdog + - usb - usb_device - - pwm + - watchdog - xpro_gpio - xpro_i2c - xpro_serial - xpro_spi - - can - - hwinfo vendor: atmel diff --git a/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b_defconfig b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b_defconfig new file mode 100644 index 00000000000000..f5404f816bee14 --- /dev/null +++ b/boards/atmel/sam/sam_v71_xult/sam_v71_xult_samv71q21b_defconfig @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_BUILD_OUTPUT_HEX=y + +CONFIG_ARM_MPU=y +CONFIG_CACHE_MANAGEMENT=y +CONFIG_HW_STACK_PROTECTION=y +CONFIG_WDT_DISABLE_AT_BOOT=y + +CONFIG_CONSOLE=y +CONFIG_SERIAL=y +CONFIG_UART_CONSOLE=y diff --git a/boards/boards_legacy/arm/sam_v71_xult/support/openocd.cfg b/boards/atmel/sam/sam_v71_xult/support/openocd.cfg similarity index 100% rename from boards/boards_legacy/arm/sam_v71_xult/support/openocd.cfg rename to boards/atmel/sam/sam_v71_xult/support/openocd.cfg diff --git a/boards/boards_legacy/arm/sam_v71_xult/Kconfig.board b/boards/boards_legacy/arm/sam_v71_xult/Kconfig.board deleted file mode 100644 index 9ca0469360e4c8..00000000000000 --- a/boards/boards_legacy/arm/sam_v71_xult/Kconfig.board +++ /dev/null @@ -1,9 +0,0 @@ -# Atmel SMART SAM V71 Xplained Board selection - -# Copyright (c) 2019 Gerson Fernando Budke -# Copyright (c) 2016 Piotr Mienkowski -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_SAM_V71_XULT - bool "Atmel SMART SAM V71 Xplained Ultra Board" - depends on SOC_PART_NUMBER_SAMV71Q21 || SOC_PART_NUMBER_SAMV71Q21B diff --git a/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult_defconfig b/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult_defconfig deleted file mode 100644 index 3c82428d40e086..00000000000000 --- a/boards/boards_legacy/arm/sam_v71_xult/sam_v71_xult_defconfig +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_SOC_SERIES_SAMV71=y -CONFIG_SOC_PART_NUMBER_SAMV71Q21=y -CONFIG_SOC_ATMEL_SAMV71_EXT_MAINCK=y -CONFIG_SOC_ATMEL_SAMV71_PLLA_MULA=24 -CONFIG_SOC_ATMEL_SAMV71_PLLA_DIVA=1 -CONFIG_BOARD_SAM_V71_XULT=y -CONFIG_BUILD_OUTPUT_HEX=y - -CONFIG_ARM_MPU=y -CONFIG_CACHE_MANAGEMENT=y -CONFIG_HW_STACK_PROTECTION=y -CONFIG_WDT_DISABLE_AT_BOOT=y - -CONFIG_CONSOLE=y -CONFIG_GPIO=y -CONFIG_SERIAL=y -CONFIG_UART_CONSOLE=y -CONFIG_USART_SAM=y diff --git a/boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult_defconfig b/boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult_defconfig deleted file mode 100644 index bf9eea03a5d3b5..00000000000000 --- a/boards/boards_legacy/arm/sam_v71_xult/sam_v71b_xult_defconfig +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_SOC_SERIES_SAMV71=y -CONFIG_SOC_PART_NUMBER_SAMV71Q21B=y -CONFIG_SOC_ATMEL_SAMV71_EXT_MAINCK=y -CONFIG_SOC_ATMEL_SAMV71_PLLA_MULA=24 -CONFIG_SOC_ATMEL_SAMV71_PLLA_DIVA=1 -CONFIG_BOARD_SAM_V71_XULT=y -CONFIG_BUILD_OUTPUT_HEX=y - -CONFIG_ARM_MPU=y -CONFIG_CACHE_MANAGEMENT=y -CONFIG_HW_STACK_PROTECTION=y -CONFIG_WDT_DISABLE_AT_BOOT=y - -CONFIG_CONSOLE=y -CONFIG_GPIO=y -CONFIG_SERIAL=y -CONFIG_UART_CONSOLE=y -CONFIG_USART_SAM=y diff --git a/boards/shields/arduino_uno_click/doc/index.rst b/boards/shields/arduino_uno_click/doc/index.rst index c13c3cb8d8c38a..4e260a7db432e0 100644 --- a/boards/shields/arduino_uno_click/doc/index.rst +++ b/boards/shields/arduino_uno_click/doc/index.rst @@ -44,7 +44,7 @@ other mikroBUS shields. For example: .. zephyr-app-commands:: :zephyr-app: samples/net/sockets/echo_server :host-os: unix - :board: sam_v71_xult + :board: sam_v71_xult/samv71q21 :gen-args: -DOVERLAY_CONFIG=overlay-802154.conf :shield: "arduino_uno_click atmel_rf2xx_mikrobus" :goals: build diff --git a/boards/shields/atmel_rf2xx/doc/index.rst b/boards/shields/atmel_rf2xx/doc/index.rst index e9d2777fafe570..31670bf936daf0 100644 --- a/boards/shields/atmel_rf2xx/doc/index.rst +++ b/boards/shields/atmel_rf2xx/doc/index.rst @@ -265,15 +265,15 @@ details). Tested Boards ============= -+-----------------------------+------------------------------+-----------+ -| Board | Disabled Interface | Variation | -+=============================+==============================+===========+ -| ATMEL sam4s_xplained | | 2 | -+-----------------------------+------------------------------+-----------+ -| ATMEL sam4e_xpro | Ethernet | 3 , 4 | -+-----------------------------+------------------------------+-----------+ -| ATMEL sam_v71_xult | Ethernet | 3 , 4 , 5 | -+-----------------------------+------------------------------+-----------+ ++------------------------------+------------------------------+-----------+ +| Board | Disabled Interface | Variation | ++==============================+==============================+===========+ +| ATMEL sam4s_xplained | | 2 | ++------------------------------+------------------------------+-----------+ +| ATMEL sam4e_xpro | Ethernet | 3 , 4 | ++------------------------------+------------------------------+-----------+ +| ATMEL sam_v71_xult/samv71q21 | Ethernet | 3 , 4 , 5 | ++------------------------------+------------------------------+-----------+ Sample usage ************ @@ -303,7 +303,7 @@ Set ``-DSHIELD=`` when you invoke ``west build``. .. zephyr-app-commands:: :zephyr-app: samples/net/sockets/echo_server :host-os: unix - :board: [sam4e_xpro | sam_v71_xult] + :board: [sam4e_xpro | sam_v71_xult/samv71q21] :gen-args: -DOVERLAY_CONFIG=overlay-802154.conf :shield: [atmel_rf2xx_xpro | atmel_rf2xx_legacy] :goals: build flash @@ -312,7 +312,7 @@ Set ``-DSHIELD=`` when you invoke ``west build``. .. zephyr-app-commands:: :zephyr-app: samples/net/sockets/echo_server :host-os: unix - :board: [sam_v71_xult | frdm_k64f | nucleo_f767zi] + :board: [sam_v71_xult/samv71q21 | frdm_k64f | nucleo_f767zi] :gen-args: -DOVERLAY_CONFIG=overlay-802154.conf :shield: atmel_rf2xx_arduino :goals: build flash diff --git a/boards/shields/inventek_eswifi/doc/index.rst b/boards/shields/inventek_eswifi/doc/index.rst index e19713acd3f957..9b0d9a46e1da3e 100644 --- a/boards/shields/inventek_eswifi/doc/index.rst +++ b/boards/shields/inventek_eswifi/doc/index.rst @@ -121,15 +121,15 @@ details). Tested Boards ============= -+-----------------------------+------------------------------+-----------+ -| Board | Disabled Interface | Variation | -+=============================+==============================+===========+ -| ATMEL sam_v71_xult | Ethernet | 2 , 3 | -+-----------------------------+------------------------------+-----------+ -| ST nucleo_f767zi | Ethernet | 2 , 3 | -+-----------------------------+------------------------------+-----------+ -| ST disco_l475_iot1 | | - | -+-----------------------------+------------------------------+-----------+ ++------------------------------+------------------------------+-----------+ +| Board | Disabled Interface | Variation | ++==============================+==============================+===========+ +| ATMEL sam_v71_xult/samv71q21 | Ethernet | 2 , 3 | ++------------------------------+------------------------------+-----------+ +| ST nucleo_f767zi | Ethernet | 2 , 3 | ++------------------------------+------------------------------+-----------+ +| ST disco_l475_iot1 | | - | ++------------------------------+------------------------------+-----------+ .. note:: ST disco_l475_iot1 already have an ISM43362 module with IWIN SPI @@ -152,7 +152,7 @@ Set ``-DSHIELD=`` when you invoke ``west build``. .. zephyr-app-commands:: :zephyr-app: samples/net/wifi :host-os: unix - :board: [sam_v71_xult | nucleo_f767zi] + :board: [sam_v71_xult/samv71q21 | nucleo_f767zi] :shield: inventek_eswifi_arduino_uart :goals: build flash :compact: @@ -160,7 +160,7 @@ Set ``-DSHIELD=`` when you invoke ``west build``. .. zephyr-app-commands:: :zephyr-app: samples/net/wifi :host-os: unix - :board: [sam_v71_xult | nucleo_f767zi] + :board: [sam_v71_xult/samv71q21 | nucleo_f767zi] :shield: inventek_eswifi_arduino_spi :goals: build flash :compact: From 870d1f6b8f37d1a938c13ec38ad105d2b65ce7a7 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Sat, 10 Feb 2024 08:19:52 +0100 Subject: [PATCH 07/12] boards: RoboKit1: Convert to HWMv2 Port the board to HWMv2. Signed-off-by: Gerson Fernando Budke --- .../arm/tdk_robokit1/Kconfig.board | 8 -------- .../arm/tdk_robokit1/Kconfig.defconfig | 11 ----------- .../arm/tdk_robokit1/tdk_robokit1.dts | 16 ---------------- .../arm/tdk_robokit1/tdk_robokit1_defconfig | 17 ----------------- boards/tdk/index.rst | 10 ++++++++++ boards/tdk/robokit1/Kconfig.robokit1 | 6 ++++++ .../tdk_robokit1 => tdk/robokit1}/board.cmake | 3 ++- boards/tdk/robokit1/board.yml | 5 +++++ .../robokit1}/doc/img/tdk_robokit1.jpg | Bin .../robokit1}/doc/index.rst | 10 +++++----- .../robokit1/robokit1-common.dtsi} | 2 +- .../robokit1/robokit1-pinctrl.dtsi} | 0 boards/tdk/robokit1/robokit1.dts | 17 +++++++++++++++++ .../robokit1/robokit1.yaml} | 14 +++++++------- boards/tdk/robokit1/robokit1_defconfig | 11 +++++++++++ .../robokit1}/support/openocd.cfg | 0 16 files changed, 64 insertions(+), 66 deletions(-) delete mode 100644 boards/boards_legacy/arm/tdk_robokit1/Kconfig.board delete mode 100644 boards/boards_legacy/arm/tdk_robokit1/Kconfig.defconfig delete mode 100644 boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1.dts delete mode 100644 boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1_defconfig create mode 100644 boards/tdk/index.rst create mode 100644 boards/tdk/robokit1/Kconfig.robokit1 rename boards/{boards_legacy/arm/tdk_robokit1 => tdk/robokit1}/board.cmake (99%) create mode 100644 boards/tdk/robokit1/board.yml rename boards/{boards_legacy/arm/tdk_robokit1 => tdk/robokit1}/doc/img/tdk_robokit1.jpg (100%) rename boards/{boards_legacy/arm/tdk_robokit1 => tdk/robokit1}/doc/index.rst (96%) rename boards/{boards_legacy/arm/tdk_robokit1/tdk_robokit1-common.dtsi => tdk/robokit1/robokit1-common.dtsi} (99%) rename boards/{boards_legacy/arm/tdk_robokit1/tdk_robokit1-pinctrl.dtsi => tdk/robokit1/robokit1-pinctrl.dtsi} (100%) create mode 100644 boards/tdk/robokit1/robokit1.dts rename boards/{boards_legacy/arm/tdk_robokit1/tdk_robokit1.yaml => tdk/robokit1/robokit1.yaml} (89%) create mode 100644 boards/tdk/robokit1/robokit1_defconfig rename boards/{boards_legacy/arm/tdk_robokit1 => tdk/robokit1}/support/openocd.cfg (100%) diff --git a/boards/boards_legacy/arm/tdk_robokit1/Kconfig.board b/boards/boards_legacy/arm/tdk_robokit1/Kconfig.board deleted file mode 100644 index 16ea951fc203c7..00000000000000 --- a/boards/boards_legacy/arm/tdk_robokit1/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# TDK RoboKit 1 Board Options - -# Copyright (c) 2022 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_TDK_ROBOKIT1 - bool "TDK RoboKit1 Board" - depends on SOC_PART_NUMBER_SAME70Q21 || SOC_PART_NUMBER_SAME70Q21B diff --git a/boards/boards_legacy/arm/tdk_robokit1/Kconfig.defconfig b/boards/boards_legacy/arm/tdk_robokit1/Kconfig.defconfig deleted file mode 100644 index eab856c9089abd..00000000000000 --- a/boards/boards_legacy/arm/tdk_robokit1/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# TDK RoboKit1 Configuration - -# Copyright (c) 2022 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_TDK_ROBOKIT1 - -config BOARD - default "tdk_robotkit1" - -endif # BOARD_TDK_ROBOKIT1 diff --git a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1.dts b/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1.dts deleted file mode 100644 index a8763609e9b814..00000000000000 --- a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1.dts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2022 Intel Corporation - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/dts-v1/; - -#include - -#include "tdk_robokit1-common.dtsi" - -/ { - model = "TDK RoboKit1"; - compatible = "tdk,robokit1", "atmel,same70q21", "atmel,same70"; -}; diff --git a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1_defconfig b/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1_defconfig deleted file mode 100644 index f5df64df2a5267..00000000000000 --- a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1_defconfig +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_SOC_SERIES_SAME70=y -CONFIG_SOC_PART_NUMBER_SAME70Q21B=y -CONFIG_SOC_ATMEL_SAME70_EXT_MAINCK=y -CONFIG_SOC_ATMEL_SAME70_PLLA_MULA=24 -CONFIG_SOC_ATMEL_SAME70_PLLA_DIVA=1 -CONFIG_ARM_MPU=y -CONFIG_CONSOLE=y -CONFIG_UART_CONSOLE=y -CONFIG_SERIAL=y -CONFIG_BOARD_TDK_ROBOKIT1=y -CONFIG_WDT_DISABLE_AT_BOOT=y -CONFIG_BUILD_OUTPUT_HEX=y - -# Enable HW stack protection -CONFIG_HW_STACK_PROTECTION=y diff --git a/boards/tdk/index.rst b/boards/tdk/index.rst new file mode 100644 index 00000000000000..fe11070b5bc13d --- /dev/null +++ b/boards/tdk/index.rst @@ -0,0 +1,10 @@ +.. _boards-tdk: + +TDK +### + +.. toctree:: + :maxdepth: 1 + :glob: + + **/* diff --git a/boards/tdk/robokit1/Kconfig.robokit1 b/boards/tdk/robokit1/Kconfig.robokit1 new file mode 100644 index 00000000000000..136a9fe8df1f04 --- /dev/null +++ b/boards/tdk/robokit1/Kconfig.robokit1 @@ -0,0 +1,6 @@ +# Copyright (c) 2022 Intel Corporation +# Copyright (c) 2024 Gerson Fernando Budke +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_ROBOKIT1 + select SOC_SAME70Q21B diff --git a/boards/boards_legacy/arm/tdk_robokit1/board.cmake b/boards/tdk/robokit1/board.cmake similarity index 99% rename from boards/boards_legacy/arm/tdk_robokit1/board.cmake rename to boards/tdk/robokit1/board.cmake index 975b58dbcb1154..391006d62de358 100644 --- a/boards/boards_legacy/arm/tdk_robokit1/board.cmake +++ b/boards/tdk/robokit1/board.cmake @@ -1,6 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 board_runner_args(jlink "--device=ATSAME70Q21") +include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) + board_runner_args(openocd --cmd-post-verify "atsamv gpnvm set 1") include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) -include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) diff --git a/boards/tdk/robokit1/board.yml b/boards/tdk/robokit1/board.yml new file mode 100644 index 00000000000000..c97c2a0c940214 --- /dev/null +++ b/boards/tdk/robokit1/board.yml @@ -0,0 +1,5 @@ +board: + name: robokit1 + vendor: tdk + socs: + - name: same70q21b diff --git a/boards/boards_legacy/arm/tdk_robokit1/doc/img/tdk_robokit1.jpg b/boards/tdk/robokit1/doc/img/tdk_robokit1.jpg similarity index 100% rename from boards/boards_legacy/arm/tdk_robokit1/doc/img/tdk_robokit1.jpg rename to boards/tdk/robokit1/doc/img/tdk_robokit1.jpg diff --git a/boards/boards_legacy/arm/tdk_robokit1/doc/index.rst b/boards/tdk/robokit1/doc/index.rst similarity index 96% rename from boards/boards_legacy/arm/tdk_robokit1/doc/index.rst rename to boards/tdk/robokit1/doc/index.rst index a34408c3baff6d..ef65431b7e5a96 100644 --- a/boards/boards_legacy/arm/tdk_robokit1/doc/index.rst +++ b/boards/tdk/robokit1/doc/index.rst @@ -1,4 +1,4 @@ -.. _tdk_robokit1: +.. _robokit1: TDK RoboKit 1 ############# @@ -107,7 +107,7 @@ features: - N/A The default configuration can be found in the Kconfig -:zephyr_file:`boards/arm/tdk_robokit1/tdk_robokit1_defconfig`. +:zephyr_file:`boards/tdk/robokit1/robokit1_defconfig`. Connections and IOs =================== @@ -157,10 +157,10 @@ Flashing .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: tdk_robokit1 + :board: robokit1 :goals: build flash - You should see "Hello World! tdk_robokit1" in your terminal. + You should see "Hello World! robokit1" in your terminal. Debugging ========= @@ -170,7 +170,7 @@ You can debug an application in the usual way. Here is an example for the .. zephyr-app-commands:: :zephyr-app: samples/hello_world - :board: tdk_robokit1 + :board: robokit1 :maybe-skip-config: :goals: debug diff --git a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1-common.dtsi b/boards/tdk/robokit1/robokit1-common.dtsi similarity index 99% rename from boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1-common.dtsi rename to boards/tdk/robokit1/robokit1-common.dtsi index 5fc1bf4cb9f5f9..40fa35366a2b3f 100644 --- a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1-common.dtsi +++ b/boards/tdk/robokit1/robokit1-common.dtsi @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "tdk_robokit1-pinctrl.dtsi" +#include "robokit1-pinctrl.dtsi" / { aliases { diff --git a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1-pinctrl.dtsi b/boards/tdk/robokit1/robokit1-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1-pinctrl.dtsi rename to boards/tdk/robokit1/robokit1-pinctrl.dtsi diff --git a/boards/tdk/robokit1/robokit1.dts b/boards/tdk/robokit1/robokit1.dts new file mode 100644 index 00000000000000..46d160b20741f7 --- /dev/null +++ b/boards/tdk/robokit1/robokit1.dts @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2022 Intel Corporation + * Copyright (c) 2024 Gerson Fernando Budke + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +#include + +#include "robokit1-common.dtsi" + +/ { + model = "TDK RoboKit1"; + compatible = "tdk,robokit1", "atmel,same70q21b", "atmel,same70"; +}; diff --git a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1.yaml b/boards/tdk/robokit1/robokit1.yaml similarity index 89% rename from boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1.yaml rename to boards/tdk/robokit1/robokit1.yaml index 4c4d8b19e13c2a..8cbd19f73a6f05 100644 --- a/boards/boards_legacy/arm/tdk_robokit1/tdk_robokit1.yaml +++ b/boards/tdk/robokit1/robokit1.yaml @@ -1,21 +1,21 @@ -identifier: tdk_robokit1 +identifier: robokit1 name: TDK RoboKit1 type: mcu arch: arm -ram: 384 flash: 2048 +ram: 384 toolchain: - zephyr - gnuarmemb - xtools supported: + - can - dma - - i2c + - hwinfo - gpio + - i2c + - pwm - spi - - watchdog - usb_device - - pwm - - can - - hwinfo + - watchdog vendor: tdk diff --git a/boards/tdk/robokit1/robokit1_defconfig b/boards/tdk/robokit1/robokit1_defconfig new file mode 100644 index 00000000000000..0f48eff3adf680 --- /dev/null +++ b/boards/tdk/robokit1/robokit1_defconfig @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_BUILD_OUTPUT_HEX=y + +CONFIG_ARM_MPU=y +CONFIG_HW_STACK_PROTECTION=y +CONFIG_WDT_DISABLE_AT_BOOT=y + +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y +CONFIG_SERIAL=y diff --git a/boards/boards_legacy/arm/tdk_robokit1/support/openocd.cfg b/boards/tdk/robokit1/support/openocd.cfg similarity index 100% rename from boards/boards_legacy/arm/tdk_robokit1/support/openocd.cfg rename to boards/tdk/robokit1/support/openocd.cfg From 63791b8b521cd0b776087996a7f1af5460d6d9ac Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Fri, 9 Feb 2024 22:24:05 +0100 Subject: [PATCH 08/12] boards: arduino_due: Convert to HWMv2 Port the board to HWMv2. Signed-off-by: Gerson Fernando Budke --- .../arduino_due/Kconfig.arduino_due} | 5 +---- .../arduino_due/arduino_due-pinctrl.dtsi | 0 .../arm => arduino}/arduino_due/arduino_due.dts | 0 .../arm => arduino}/arduino_due/arduino_due.yaml | 8 ++++---- .../arduino_due/arduino_due_defconfig | 11 +++-------- .../arm => arduino}/arduino_due/board.cmake | 0 boards/arduino/arduino_due/board.yml | 5 +++++ .../arduino_due/doc/img/arduino_due.jpg | Bin .../arm => arduino}/arduino_due/doc/index.rst | 2 +- .../boards_legacy/arm/arduino_due/Kconfig.defconfig | 11 ----------- samples/drivers/lcd_hd44780/src/main.c | 5 ++--- 11 files changed, 16 insertions(+), 31 deletions(-) rename boards/{boards_legacy/arm/arduino_due/Kconfig.board => arduino/arduino_due/Kconfig.arduino_due} (50%) rename boards/{boards_legacy/arm => arduino}/arduino_due/arduino_due-pinctrl.dtsi (100%) rename boards/{boards_legacy/arm => arduino}/arduino_due/arduino_due.dts (100%) rename boards/{boards_legacy/arm => arduino}/arduino_due/arduino_due.yaml (100%) rename boards/{boards_legacy/arm => arduino}/arduino_due/arduino_due_defconfig (52%) rename boards/{boards_legacy/arm => arduino}/arduino_due/board.cmake (100%) create mode 100644 boards/arduino/arduino_due/board.yml rename boards/{boards_legacy/arm => arduino}/arduino_due/doc/img/arduino_due.jpg (100%) rename boards/{boards_legacy/arm => arduino}/arduino_due/doc/index.rst (99%) delete mode 100644 boards/boards_legacy/arm/arduino_due/Kconfig.defconfig diff --git a/boards/boards_legacy/arm/arduino_due/Kconfig.board b/boards/arduino/arduino_due/Kconfig.arduino_due similarity index 50% rename from boards/boards_legacy/arm/arduino_due/Kconfig.board rename to boards/arduino/arduino_due/Kconfig.arduino_due index 8e0a7ae81b047c..0e9cc38393cf96 100644 --- a/boards/boards_legacy/arm/arduino_due/Kconfig.board +++ b/boards/arduino/arduino_due/Kconfig.arduino_due @@ -1,8 +1,5 @@ -# Arduino Due Board configuration - # Copyright (c) 2017 Justin Watson # SPDX-License-Identifier: Apache-2.0 config BOARD_ARDUINO_DUE - bool "Arduino Due Board" - depends on SOC_PART_NUMBER_SAM3X8E + select SOC_SAM3X8E diff --git a/boards/boards_legacy/arm/arduino_due/arduino_due-pinctrl.dtsi b/boards/arduino/arduino_due/arduino_due-pinctrl.dtsi similarity index 100% rename from boards/boards_legacy/arm/arduino_due/arduino_due-pinctrl.dtsi rename to boards/arduino/arduino_due/arduino_due-pinctrl.dtsi diff --git a/boards/boards_legacy/arm/arduino_due/arduino_due.dts b/boards/arduino/arduino_due/arduino_due.dts similarity index 100% rename from boards/boards_legacy/arm/arduino_due/arduino_due.dts rename to boards/arduino/arduino_due/arduino_due.dts diff --git a/boards/boards_legacy/arm/arduino_due/arduino_due.yaml b/boards/arduino/arduino_due/arduino_due.yaml similarity index 100% rename from boards/boards_legacy/arm/arduino_due/arduino_due.yaml rename to boards/arduino/arduino_due/arduino_due.yaml index 779271c0e12af1..21a71527ffea08 100644 --- a/boards/boards_legacy/arm/arduino_due/arduino_due.yaml +++ b/boards/arduino/arduino_due/arduino_due.yaml @@ -2,14 +2,14 @@ identifier: arduino_due name: Arduino Due type: mcu arch: arm -ram: 96 -flash: 512 toolchain: - zephyr - gnuarmemb - xtools +flash: 512 +ram: 96 supported: - - watchdog - - gpio - arduino_i2c + - gpio + - watchdog vendor: arduino diff --git a/boards/boards_legacy/arm/arduino_due/arduino_due_defconfig b/boards/arduino/arduino_due/arduino_due_defconfig similarity index 52% rename from boards/boards_legacy/arm/arduino_due/arduino_due_defconfig rename to boards/arduino/arduino_due/arduino_due_defconfig index 32fa49bd002c35..fb11f348f48d93 100644 --- a/boards/boards_legacy/arm/arduino_due/arduino_due_defconfig +++ b/boards/arduino/arduino_due/arduino_due_defconfig @@ -1,14 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_SAM3X=y -CONFIG_SOC_PART_NUMBER_SAM3X8E=y -CONFIG_BOARD_ARDUINO_DUE=y CONFIG_ARM_MPU=y +CONFIG_HW_STACK_PROTECTION=y +CONFIG_WDT_DISABLE_AT_BOOT=y + CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y CONFIG_SERIAL=y -CONFIG_SOC_ATMEL_SAM3X_EXT_MAINCK=y -CONFIG_WDT_DISABLE_AT_BOOT=y - -# Enable HW stack protection -CONFIG_HW_STACK_PROTECTION=y diff --git a/boards/boards_legacy/arm/arduino_due/board.cmake b/boards/arduino/arduino_due/board.cmake similarity index 100% rename from boards/boards_legacy/arm/arduino_due/board.cmake rename to boards/arduino/arduino_due/board.cmake diff --git a/boards/arduino/arduino_due/board.yml b/boards/arduino/arduino_due/board.yml new file mode 100644 index 00000000000000..351bc719a15374 --- /dev/null +++ b/boards/arduino/arduino_due/board.yml @@ -0,0 +1,5 @@ +board: + name: arduino_due + vendor: arduino + socs: + - name: sam3x8e diff --git a/boards/boards_legacy/arm/arduino_due/doc/img/arduino_due.jpg b/boards/arduino/arduino_due/doc/img/arduino_due.jpg similarity index 100% rename from boards/boards_legacy/arm/arduino_due/doc/img/arduino_due.jpg rename to boards/arduino/arduino_due/doc/img/arduino_due.jpg diff --git a/boards/boards_legacy/arm/arduino_due/doc/index.rst b/boards/arduino/arduino_due/doc/index.rst similarity index 99% rename from boards/boards_legacy/arm/arduino_due/doc/index.rst rename to boards/arduino/arduino_due/doc/index.rst index cbb5ce62ca5ffd..f8990b277c152a 100644 --- a/boards/boards_legacy/arm/arduino_due/doc/index.rst +++ b/boards/arduino/arduino_due/doc/index.rst @@ -56,7 +56,7 @@ See `Arduino Due website`_ and `Atmel SAM3X8E Datasheet`_ for a complete list of Arduino Due board hardware features. The default configuration can be found in the Kconfig -:zephyr_file:`boards/arm/arduino_due/arduino_due_defconfig`. +:zephyr_file:`boards/arduino/arduino_due/arduino_due_defconfig`. .. note:: For I2C, pull-up resistors are required for using SCL1 and SDA1 (near IO13). diff --git a/boards/boards_legacy/arm/arduino_due/Kconfig.defconfig b/boards/boards_legacy/arm/arduino_due/Kconfig.defconfig deleted file mode 100644 index 13c6fdf57225e0..00000000000000 --- a/boards/boards_legacy/arm/arduino_due/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# Arduino Due Board configuration - -# Copyright (c) 2017 Justin Watson -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_ARDUINO_DUE - -config BOARD - default "arduino_due" - -endif # BOARD_ARDUINO_DUE diff --git a/samples/drivers/lcd_hd44780/src/main.c b/samples/drivers/lcd_hd44780/src/main.c index 19f873e52d4ae1..3210f9c030534c 100644 --- a/samples/drivers/lcd_hd44780/src/main.c +++ b/samples/drivers/lcd_hd44780/src/main.c @@ -70,14 +70,13 @@ #include #include - -#if defined(CONFIG_SOC_PART_NUMBER_SAM3X8E) +#if defined(CONFIG_SOC_SAM3X8E) #define GPIO_NODE DT_NODELABEL(pioc) #else #error "Unsupported GPIO driver" #endif -#if defined(CONFIG_SOC_PART_NUMBER_SAM3X8E) +#if defined(CONFIG_SOC_SAM3X8E) /* Define GPIO OUT to LCD */ #define GPIO_PIN_PC12_D0 12 /* PC12 - pin 51 */ #define GPIO_PIN_PC13_D1 13 /* PC13 - pin 50 */ From 18f676581385ee287590eefe6f124b8b46309091 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Thu, 15 Feb 2024 23:36:39 +0100 Subject: [PATCH 09/12] tests: atmel_sam: Update platform name This update all atmel_sam entries to use the new platform name related to sam_e70_xplained and sam_v71_xult. Signed-off-by: Gerson Fernando Budke --- .../code_relocation/testcase.yaml | 2 +- .../cmsis_dsp/basicmath/testcase.yaml | 2 +- ...lay => sam_e70_xplained_same70q21.overlay} | 0 ...ay => sam_e70_xplained_same70q21b.overlay} | 0 ...overlay => sam_v71_xult_samv71q21.overlay} | 0 ...verlay => sam_v71_xult_samv71q21b.overlay} | 0 tests/drivers/build_all/adc/testcase.yaml | 2 +- tests/drivers/build_all/pwm/testcase.yaml | 4 ++-- .../drivers/flash/erase_blocks/testcase.yaml | 2 +- ...lay => sam_e70_xplained_same70q21.overlay} | 0 ...lay => sam_e70_xplained_same70q21.overlay} | 0 ...overlay => sam_v71_xult_samv71q21.overlay} | 0 .../{tdk_robokit1.conf => robokit1.conf} | 0 ...{tdk_robokit1.overlay => robokit1.overlay} | 0 ...lay => sam_e70_xplained_same70q21.overlay} | 0 ...overlay => sam_v71_xult_samv71q21.overlay} | 0 tests/drivers/spi/spi_loopback/testcase.yaml | 10 ++++---- tests/kernel/workq/critical/testcase.yaml | 2 +- tests/lib/cmsis_dsp/bayes/testcase.yaml | 2 +- tests/lib/cmsis_dsp/complexmath/testcase.yaml | 2 +- tests/lib/cmsis_dsp/distance/testcase.yaml | 2 +- tests/lib/cmsis_dsp/fastmath/testcase.yaml | 2 +- tests/lib/cmsis_dsp/filtering/testcase.yaml | 8 +++---- .../lib/cmsis_dsp/interpolation/testcase.yaml | 2 +- tests/lib/cmsis_dsp/matrix/testcase.yaml | 24 +++++++++---------- .../cmsis_dsp/quaternionmath/testcase.yaml | 2 +- tests/lib/cmsis_dsp/statistics/testcase.yaml | 2 +- tests/lib/cmsis_dsp/support/testcase.yaml | 2 +- tests/lib/cmsis_dsp/svm/testcase.yaml | 2 +- tests/lib/cmsis_dsp/transform/testcase.yaml | 20 ++++++++-------- tests/lib/cmsis_nn/testcase.yaml | 2 +- tests/net/ptp/clock/testcase.yaml | 2 +- tests/subsys/dsp/basicmath/testcase.yaml | 2 +- tests/subsys/logging/log_syst/testcase.yaml | 2 +- 34 files changed, 51 insertions(+), 51 deletions(-) rename tests/drivers/adc/adc_api/boards/{sam_e70_xplained.overlay => sam_e70_xplained_same70q21.overlay} (100%) rename tests/drivers/adc/adc_api/boards/{sam_e70b_xplained.overlay => sam_e70_xplained_same70q21b.overlay} (100%) rename tests/drivers/adc/adc_api/boards/{sam_v71_xult.overlay => sam_v71_xult_samv71q21.overlay} (100%) rename tests/drivers/adc/adc_api/boards/{sam_v71b_xult.overlay => sam_v71_xult_samv71q21b.overlay} (100%) rename tests/drivers/gpio/gpio_basic_api/boards/{sam_e70_xplained.overlay => sam_e70_xplained_same70q21.overlay} (100%) rename tests/drivers/i2s/i2s_api/boards/{sam_e70_xplained.overlay => sam_e70_xplained_same70q21.overlay} (100%) rename tests/drivers/i2s/i2s_api/boards/{sam_v71_xult.overlay => sam_v71_xult_samv71q21.overlay} (100%) rename tests/drivers/spi/spi_loopback/boards/{tdk_robokit1.conf => robokit1.conf} (100%) rename tests/drivers/spi/spi_loopback/boards/{tdk_robokit1.overlay => robokit1.overlay} (100%) rename tests/drivers/spi/spi_loopback/boards/{sam_e70_xplained.overlay => sam_e70_xplained_same70q21.overlay} (100%) rename tests/drivers/spi/spi_loopback/boards/{sam_v71_xult.overlay => sam_v71_xult_samv71q21.overlay} (100%) diff --git a/tests/application_development/code_relocation/testcase.yaml b/tests/application_development/code_relocation/testcase.yaml index 5391d4f0b790a7..2fcf97b6aa629c 100644 --- a/tests/application_development/code_relocation/testcase.yaml +++ b/tests/application_development/code_relocation/testcase.yaml @@ -27,7 +27,7 @@ tests: platform_allow: - qemu_cortex_m3 - mps2/an385 - - sam_e70_xplained + - sam_e70_xplained/same70q21 integration_platforms: - qemu_cortex_m3 application_development.code_relocation.riscv: diff --git a/tests/benchmarks/cmsis_dsp/basicmath/testcase.yaml b/tests/benchmarks/cmsis_dsp/basicmath/testcase.yaml index f2c2f5c0a6d0ac..d63b4f0aa8323a 100644 --- a/tests/benchmarks/cmsis_dsp/basicmath/testcase.yaml +++ b/tests/benchmarks/cmsis_dsp/basicmath/testcase.yaml @@ -11,7 +11,7 @@ tests: benchmark.cmsis_dsp.basicmath: integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 benchmark.cmsis_dsp.basicmath.fpu: filter: CONFIG_CPU_HAS_FPU diff --git a/tests/drivers/adc/adc_api/boards/sam_e70_xplained.overlay b/tests/drivers/adc/adc_api/boards/sam_e70_xplained_same70q21.overlay similarity index 100% rename from tests/drivers/adc/adc_api/boards/sam_e70_xplained.overlay rename to tests/drivers/adc/adc_api/boards/sam_e70_xplained_same70q21.overlay diff --git a/tests/drivers/adc/adc_api/boards/sam_e70b_xplained.overlay b/tests/drivers/adc/adc_api/boards/sam_e70_xplained_same70q21b.overlay similarity index 100% rename from tests/drivers/adc/adc_api/boards/sam_e70b_xplained.overlay rename to tests/drivers/adc/adc_api/boards/sam_e70_xplained_same70q21b.overlay diff --git a/tests/drivers/adc/adc_api/boards/sam_v71_xult.overlay b/tests/drivers/adc/adc_api/boards/sam_v71_xult_samv71q21.overlay similarity index 100% rename from tests/drivers/adc/adc_api/boards/sam_v71_xult.overlay rename to tests/drivers/adc/adc_api/boards/sam_v71_xult_samv71q21.overlay diff --git a/tests/drivers/adc/adc_api/boards/sam_v71b_xult.overlay b/tests/drivers/adc/adc_api/boards/sam_v71_xult_samv71q21b.overlay similarity index 100% rename from tests/drivers/adc/adc_api/boards/sam_v71b_xult.overlay rename to tests/drivers/adc/adc_api/boards/sam_v71_xult_samv71q21b.overlay diff --git a/tests/drivers/build_all/adc/testcase.yaml b/tests/drivers/build_all/adc/testcase.yaml index 02ba10c6e20c23..80f2ae8982d44f 100644 --- a/tests/drivers/build_all/adc/testcase.yaml +++ b/tests/drivers/build_all/adc/testcase.yaml @@ -32,7 +32,7 @@ tests: drivers.adc.sam0.build: platform_allow: atsame54_xpro drivers.adc.sam.afec.build: - platform_allow: sam_e70_xplained + platform_allow: sam_e70_xplained/same70q21 drivers.adc.stm32.build: platform_allow: disco_l475_iot1 drivers.adc.xec.build: diff --git a/tests/drivers/build_all/pwm/testcase.yaml b/tests/drivers/build_all/pwm/testcase.yaml index c119ed581674c9..7c66424575ee49 100644 --- a/tests/drivers/build_all/pwm/testcase.yaml +++ b/tests/drivers/build_all/pwm/testcase.yaml @@ -41,8 +41,8 @@ tests: platform_allow: atsame54_xpro drivers.pwm.build.sam: platform_allow: - - sam_e70_xplained - - sam_v71b_xult + - sam_e70_xplained/same70q21 + - sam_v71_xult/samv71q21b drivers.pwm.stm32.build: platform_allow: disco_l475_iot1 drivers.pwm.xec.build: diff --git a/tests/drivers/flash/erase_blocks/testcase.yaml b/tests/drivers/flash/erase_blocks/testcase.yaml index 3791b0b19e7675..5be1ff92c1f0ad 100644 --- a/tests/drivers/flash/erase_blocks/testcase.yaml +++ b/tests/drivers/flash/erase_blocks/testcase.yaml @@ -11,7 +11,7 @@ tests: harness: ztest build_only: true platform_allow: - - sam_v71_xult + - sam_v71_xult/samv71q21 - b_u585i_iot02a - nrf9160dk/nrf9160 - nrf5340dk/nrf5340/cpuapp diff --git a/tests/drivers/gpio/gpio_basic_api/boards/sam_e70_xplained.overlay b/tests/drivers/gpio/gpio_basic_api/boards/sam_e70_xplained_same70q21.overlay similarity index 100% rename from tests/drivers/gpio/gpio_basic_api/boards/sam_e70_xplained.overlay rename to tests/drivers/gpio/gpio_basic_api/boards/sam_e70_xplained_same70q21.overlay diff --git a/tests/drivers/i2s/i2s_api/boards/sam_e70_xplained.overlay b/tests/drivers/i2s/i2s_api/boards/sam_e70_xplained_same70q21.overlay similarity index 100% rename from tests/drivers/i2s/i2s_api/boards/sam_e70_xplained.overlay rename to tests/drivers/i2s/i2s_api/boards/sam_e70_xplained_same70q21.overlay diff --git a/tests/drivers/i2s/i2s_api/boards/sam_v71_xult.overlay b/tests/drivers/i2s/i2s_api/boards/sam_v71_xult_samv71q21.overlay similarity index 100% rename from tests/drivers/i2s/i2s_api/boards/sam_v71_xult.overlay rename to tests/drivers/i2s/i2s_api/boards/sam_v71_xult_samv71q21.overlay diff --git a/tests/drivers/spi/spi_loopback/boards/tdk_robokit1.conf b/tests/drivers/spi/spi_loopback/boards/robokit1.conf similarity index 100% rename from tests/drivers/spi/spi_loopback/boards/tdk_robokit1.conf rename to tests/drivers/spi/spi_loopback/boards/robokit1.conf diff --git a/tests/drivers/spi/spi_loopback/boards/tdk_robokit1.overlay b/tests/drivers/spi/spi_loopback/boards/robokit1.overlay similarity index 100% rename from tests/drivers/spi/spi_loopback/boards/tdk_robokit1.overlay rename to tests/drivers/spi/spi_loopback/boards/robokit1.overlay diff --git a/tests/drivers/spi/spi_loopback/boards/sam_e70_xplained.overlay b/tests/drivers/spi/spi_loopback/boards/sam_e70_xplained_same70q21.overlay similarity index 100% rename from tests/drivers/spi/spi_loopback/boards/sam_e70_xplained.overlay rename to tests/drivers/spi/spi_loopback/boards/sam_e70_xplained_same70q21.overlay diff --git a/tests/drivers/spi/spi_loopback/boards/sam_v71_xult.overlay b/tests/drivers/spi/spi_loopback/boards/sam_v71_xult_samv71q21.overlay similarity index 100% rename from tests/drivers/spi/spi_loopback/boards/sam_v71_xult.overlay rename to tests/drivers/spi/spi_loopback/boards/sam_v71_xult_samv71q21.overlay diff --git a/tests/drivers/spi/spi_loopback/testcase.yaml b/tests/drivers/spi/spi_loopback/testcase.yaml index ee952a1b0539dd..f75033a3751025 100644 --- a/tests/drivers/spi/spi_loopback/testcase.yaml +++ b/tests/drivers/spi/spi_loopback/testcase.yaml @@ -31,7 +31,7 @@ tests: extra_configs: - CONFIG_SPI_RTIO=y platform_allow: - - tdk_robokit1 + - robokit1 - mimxrt1170_evk_cm7 - vmu_rt1170 drivers.spi.mcux_dspi_dma.loopback: @@ -44,11 +44,11 @@ tests: - OVERLAY_CONFIG="overlay-sam-spi-dma.conf" - DTC_OVERLAY_FILE="overlay-sam-spi-dma.overlay" platform_allow: - - sam_e70_xplained - - sam_v71_xult - - tdk_robokit1 + - sam_e70_xplained/same70q21 + - sam_v71_xult/samv71q21 + - robokit1 integration_platforms: - - sam_e70_xplained + - sam_e70_xplained/same70q21 drivers.spi.stm32_spi_16bits_frames.loopback: extra_args: - OVERLAY_CONFIG="overlay-stm32-spi-16bits.conf" diff --git a/tests/kernel/workq/critical/testcase.yaml b/tests/kernel/workq/critical/testcase.yaml index 822e6d2af99ef6..8ffeefa9d7eb15 100644 --- a/tests/kernel/workq/critical/testcase.yaml +++ b/tests/kernel/workq/critical/testcase.yaml @@ -13,7 +13,7 @@ tests: extra_configs: - CONFIG_WDT_DISABLE_AT_BOOT=y integration_platforms: - - sam_e70_xplained + - sam_e70_xplained/same70q21 kernel.workqueue.critical.nsim: platform_allow: nsim_sem_mpu_stack_guard extra_configs: diff --git a/tests/lib/cmsis_dsp/bayes/testcase.yaml b/tests/lib/cmsis_dsp/bayes/testcase.yaml index 255fe353d67c46..a12a37065d259d 100644 --- a/tests/lib/cmsis_dsp/bayes/testcase.yaml +++ b/tests/lib/cmsis_dsp/bayes/testcase.yaml @@ -4,7 +4,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/complexmath/testcase.yaml b/tests/lib/cmsis_dsp/complexmath/testcase.yaml index ae8f3741867dab..12a8a1586a6a43 100644 --- a/tests/lib/cmsis_dsp/complexmath/testcase.yaml +++ b/tests/lib/cmsis_dsp/complexmath/testcase.yaml @@ -4,7 +4,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/distance/testcase.yaml b/tests/lib/cmsis_dsp/distance/testcase.yaml index 781d9bd42fae81..73b96d94117dec 100644 --- a/tests/lib/cmsis_dsp/distance/testcase.yaml +++ b/tests/lib/cmsis_dsp/distance/testcase.yaml @@ -4,7 +4,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/fastmath/testcase.yaml b/tests/lib/cmsis_dsp/fastmath/testcase.yaml index 14f28f1a485068..c137c670fe8b42 100644 --- a/tests/lib/cmsis_dsp/fastmath/testcase.yaml +++ b/tests/lib/cmsis_dsp/fastmath/testcase.yaml @@ -4,7 +4,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/filtering/testcase.yaml b/tests/lib/cmsis_dsp/filtering/testcase.yaml index da34deec3a0d02..3557cad803ae49 100644 --- a/tests/lib/cmsis_dsp/filtering/testcase.yaml +++ b/tests/lib/cmsis_dsp/filtering/testcase.yaml @@ -12,7 +12,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -41,7 +41,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -70,7 +70,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -99,7 +99,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/interpolation/testcase.yaml b/tests/lib/cmsis_dsp/interpolation/testcase.yaml index 116d8f6bfca9a5..45bb3049ce7a4c 100644 --- a/tests/lib/cmsis_dsp/interpolation/testcase.yaml +++ b/tests/lib/cmsis_dsp/interpolation/testcase.yaml @@ -4,7 +4,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/matrix/testcase.yaml b/tests/lib/cmsis_dsp/matrix/testcase.yaml index 22d3a55810fd6a..f88a5c7c1897f0 100644 --- a/tests/lib/cmsis_dsp/matrix/testcase.yaml +++ b/tests/lib/cmsis_dsp/matrix/testcase.yaml @@ -9,7 +9,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -38,7 +38,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -67,7 +67,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -96,7 +96,7 @@ tests: and CONFIG_FULL_LIBC_SUPPORTED) integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 tags: cmsis_dsp min_flash: 128 @@ -124,7 +124,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -153,7 +153,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -182,7 +182,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -213,7 +213,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -244,7 +244,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -275,7 +275,7 @@ tests: and CONFIG_FULL_LIBC_SUPPORTED) integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 tags: cmsis_dsp min_flash: 128 @@ -303,7 +303,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -334,7 +334,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/quaternionmath/testcase.yaml b/tests/lib/cmsis_dsp/quaternionmath/testcase.yaml index 3ee231453f53e3..1976d6c9ceeb26 100644 --- a/tests/lib/cmsis_dsp/quaternionmath/testcase.yaml +++ b/tests/lib/cmsis_dsp/quaternionmath/testcase.yaml @@ -4,7 +4,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/statistics/testcase.yaml b/tests/lib/cmsis_dsp/statistics/testcase.yaml index d72613c03e1014..e11b211ab565b6 100644 --- a/tests/lib/cmsis_dsp/statistics/testcase.yaml +++ b/tests/lib/cmsis_dsp/statistics/testcase.yaml @@ -4,7 +4,7 @@ tests: and CONFIG_FULL_LIBC_SUPPORTED) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/support/testcase.yaml b/tests/lib/cmsis_dsp/support/testcase.yaml index 82e14c001eccd7..048668cbaaab5e 100644 --- a/tests/lib/cmsis_dsp/support/testcase.yaml +++ b/tests/lib/cmsis_dsp/support/testcase.yaml @@ -4,7 +4,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/svm/testcase.yaml b/tests/lib/cmsis_dsp/svm/testcase.yaml index b2faa4bd65c5cd..14e05f571792a8 100644 --- a/tests/lib/cmsis_dsp/svm/testcase.yaml +++ b/tests/lib/cmsis_dsp/svm/testcase.yaml @@ -4,7 +4,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_dsp/transform/testcase.yaml b/tests/lib/cmsis_dsp/transform/testcase.yaml index 94b5d12f66e6fb..5b4e779f1714a3 100644 --- a/tests/lib/cmsis_dsp/transform/testcase.yaml +++ b/tests/lib/cmsis_dsp/transform/testcase.yaml @@ -9,7 +9,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -37,7 +37,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -65,7 +65,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -91,7 +91,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -117,7 +117,7 @@ tests: and CONFIG_FULL_LIBC_SUPPORTED) integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 tags: cmsis_dsp min_flash: 512 @@ -144,7 +144,7 @@ tests: and CONFIG_FULL_LIBC_SUPPORTED) integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 tags: cmsis_dsp min_flash: 512 @@ -171,7 +171,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -197,7 +197,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -225,7 +225,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp @@ -251,7 +251,7 @@ tests: ) or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: cmsis_dsp diff --git a/tests/lib/cmsis_nn/testcase.yaml b/tests/lib/cmsis_nn/testcase.yaml index 14f2792a22bc74..3952266880e5d3 100644 --- a/tests/lib/cmsis_nn/testcase.yaml +++ b/tests/lib/cmsis_nn/testcase.yaml @@ -3,7 +3,7 @@ tests: filter: CONFIG_CPU_CORTEX_M and CONFIG_FULL_LIBC_SUPPORTED integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 tags: cmsis_nn min_flash: 64 diff --git a/tests/net/ptp/clock/testcase.yaml b/tests/net/ptp/clock/testcase.yaml index 1d72469533700c..6d5134dcf6f360 100644 --- a/tests/net/ptp/clock/testcase.yaml +++ b/tests/net/ptp/clock/testcase.yaml @@ -3,7 +3,7 @@ common: # We can only run this in platforms that support PTP clock platform_allow: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - native_posix - native_sim integration_platforms: diff --git a/tests/subsys/dsp/basicmath/testcase.yaml b/tests/subsys/dsp/basicmath/testcase.yaml index 06f77175df506e..0b395f41df3c17 100644 --- a/tests/subsys/dsp/basicmath/testcase.yaml +++ b/tests/subsys/dsp/basicmath/testcase.yaml @@ -3,7 +3,7 @@ tests: filter: CONFIG_FULL_LIBC_SUPPORTED or CONFIG_ARCH_POSIX integration_platforms: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - mps2/an521/cpu0 - native_sim tags: zdsp diff --git a/tests/subsys/logging/log_syst/testcase.yaml b/tests/subsys/logging/log_syst/testcase.yaml index 62fcb7a0569d1b..d77a94d1d09b2e 100644 --- a/tests/subsys/logging/log_syst/testcase.yaml +++ b/tests/subsys/logging/log_syst/testcase.yaml @@ -20,7 +20,7 @@ tests: integration_platforms: - mps2/an385 - qemu_x86 - - sam_e70_xplained + - sam_e70_xplained/same70q21 extra_configs: - CONFIG_LOG_MIPI_SYST_ENABLE=y - CONFIG_LOG_BACKEND_MOCK_OUTPUT_SYST=y From 490b75ac4aa5eaa7317aa3bc5313accd57889e79 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Thu, 15 Feb 2024 23:38:17 +0100 Subject: [PATCH 10/12] samples: atmel_sam: Update platform name This update all atmel_sam entries to use the new platform name related to sam_e70_xplained and sam_v71_xult. Signed-off-by: Gerson Fernando Budke --- .../{tdk_robokit1.overlay => robokit1.overlay} | 0 ....overlay => sam_e70_xplained_same70q21.overlay} | 0 ...xult.overlay => sam_v71_xult_samv71q21.overlay} | 0 ....overlay => sam_e70_xplained_same70q21.overlay} | 0 ...overlay => sam_e70_xplained_same70q21b.overlay} | 0 ...xult.overlay => sam_v71_xult_samv71q21.overlay} | 0 ...ult.overlay => sam_v71_xult_samv71q21b.overlay} | 0 ....overlay => sam_e70_xplained_same70q21.overlay} | 0 ...overlay => sam_e70_xplained_same70q21b.overlay} | 0 ...xult.overlay => sam_v71_xult_samv71q21.overlay} | 0 ...ult.overlay => sam_v71_xult_samv71q21b.overlay} | 0 samples/drivers/dac/sample.yaml | 8 ++++---- samples/drivers/eeprom/sample.yaml | 4 ++-- samples/net/cloud/mqtt_azure/sample.yaml | 2 +- samples/net/cloud/tagoio_http_post/README.rst | 4 ++-- ...lained.conf => sam_e70_xplained_same70q21.conf} | 0 samples/net/gptp/sample.yaml | 2 +- ...lained.conf => sam_e70_xplained_same70q21.conf} | 2 +- samples/net/sockets/echo_client/README.rst | 2 +- samples/net/sockets/echo_client/sample.yaml | 14 +++++++------- samples/net/sockets/echo_server/README.rst | 2 +- samples/net/sockets/echo_server/sample.yaml | 14 +++++++------- samples/net/sockets/txtime/README.rst | 2 +- samples/net/zperf/sample.yaml | 2 +- .../boards/{tdk_robokit1.conf => robokit1.conf} | 0 samples/subsys/llext/shell_loader/README.rst | 2 +- samples/subsys/logging/syst/sample.yaml | 2 +- samples/subsys/tracing/README.rst | 4 ++-- samples/subsys/tracing/sample.yaml | 4 ++-- 29 files changed, 35 insertions(+), 35 deletions(-) rename samples/drivers/adc/boards/{tdk_robokit1.overlay => robokit1.overlay} (100%) rename samples/drivers/adc/boards/{sam_e70_xplained.overlay => sam_e70_xplained_same70q21.overlay} (100%) rename samples/drivers/adc/boards/{sam_v71_xult.overlay => sam_v71_xult_samv71q21.overlay} (100%) rename samples/drivers/counter/alarm/boards/{sam_e70_xplained.overlay => sam_e70_xplained_same70q21.overlay} (100%) rename samples/drivers/counter/alarm/boards/{sam_e70b_xplained.overlay => sam_e70_xplained_same70q21b.overlay} (100%) rename samples/drivers/counter/alarm/boards/{sam_v71_xult.overlay => sam_v71_xult_samv71q21.overlay} (100%) rename samples/drivers/counter/alarm/boards/{sam_v71b_xult.overlay => sam_v71_xult_samv71q21b.overlay} (100%) rename samples/drivers/dac/boards/{sam_e70_xplained.overlay => sam_e70_xplained_same70q21.overlay} (100%) rename samples/drivers/dac/boards/{sam_e70b_xplained.overlay => sam_e70_xplained_same70q21b.overlay} (100%) rename samples/drivers/dac/boards/{sam_v71_xult.overlay => sam_v71_xult_samv71q21.overlay} (100%) rename samples/drivers/dac/boards/{sam_v71b_xult.overlay => sam_v71_xult_samv71q21b.overlay} (100%) rename samples/net/gptp/boards/{sam_e70_xplained.conf => sam_e70_xplained_same70q21.conf} (100%) rename samples/net/ipv4_autoconf/boards/{sam_e70_xplained.conf => sam_e70_xplained_same70q21.conf} (57%) rename samples/sensor/sensor_shell/boards/{tdk_robokit1.conf => robokit1.conf} (100%) diff --git a/samples/drivers/adc/boards/tdk_robokit1.overlay b/samples/drivers/adc/boards/robokit1.overlay similarity index 100% rename from samples/drivers/adc/boards/tdk_robokit1.overlay rename to samples/drivers/adc/boards/robokit1.overlay diff --git a/samples/drivers/adc/boards/sam_e70_xplained.overlay b/samples/drivers/adc/boards/sam_e70_xplained_same70q21.overlay similarity index 100% rename from samples/drivers/adc/boards/sam_e70_xplained.overlay rename to samples/drivers/adc/boards/sam_e70_xplained_same70q21.overlay diff --git a/samples/drivers/adc/boards/sam_v71_xult.overlay b/samples/drivers/adc/boards/sam_v71_xult_samv71q21.overlay similarity index 100% rename from samples/drivers/adc/boards/sam_v71_xult.overlay rename to samples/drivers/adc/boards/sam_v71_xult_samv71q21.overlay diff --git a/samples/drivers/counter/alarm/boards/sam_e70_xplained.overlay b/samples/drivers/counter/alarm/boards/sam_e70_xplained_same70q21.overlay similarity index 100% rename from samples/drivers/counter/alarm/boards/sam_e70_xplained.overlay rename to samples/drivers/counter/alarm/boards/sam_e70_xplained_same70q21.overlay diff --git a/samples/drivers/counter/alarm/boards/sam_e70b_xplained.overlay b/samples/drivers/counter/alarm/boards/sam_e70_xplained_same70q21b.overlay similarity index 100% rename from samples/drivers/counter/alarm/boards/sam_e70b_xplained.overlay rename to samples/drivers/counter/alarm/boards/sam_e70_xplained_same70q21b.overlay diff --git a/samples/drivers/counter/alarm/boards/sam_v71_xult.overlay b/samples/drivers/counter/alarm/boards/sam_v71_xult_samv71q21.overlay similarity index 100% rename from samples/drivers/counter/alarm/boards/sam_v71_xult.overlay rename to samples/drivers/counter/alarm/boards/sam_v71_xult_samv71q21.overlay diff --git a/samples/drivers/counter/alarm/boards/sam_v71b_xult.overlay b/samples/drivers/counter/alarm/boards/sam_v71_xult_samv71q21b.overlay similarity index 100% rename from samples/drivers/counter/alarm/boards/sam_v71b_xult.overlay rename to samples/drivers/counter/alarm/boards/sam_v71_xult_samv71q21b.overlay diff --git a/samples/drivers/dac/boards/sam_e70_xplained.overlay b/samples/drivers/dac/boards/sam_e70_xplained_same70q21.overlay similarity index 100% rename from samples/drivers/dac/boards/sam_e70_xplained.overlay rename to samples/drivers/dac/boards/sam_e70_xplained_same70q21.overlay diff --git a/samples/drivers/dac/boards/sam_e70b_xplained.overlay b/samples/drivers/dac/boards/sam_e70_xplained_same70q21b.overlay similarity index 100% rename from samples/drivers/dac/boards/sam_e70b_xplained.overlay rename to samples/drivers/dac/boards/sam_e70_xplained_same70q21b.overlay diff --git a/samples/drivers/dac/boards/sam_v71_xult.overlay b/samples/drivers/dac/boards/sam_v71_xult_samv71q21.overlay similarity index 100% rename from samples/drivers/dac/boards/sam_v71_xult.overlay rename to samples/drivers/dac/boards/sam_v71_xult_samv71q21.overlay diff --git a/samples/drivers/dac/boards/sam_v71b_xult.overlay b/samples/drivers/dac/boards/sam_v71_xult_samv71q21b.overlay similarity index 100% rename from samples/drivers/dac/boards/sam_v71b_xult.overlay rename to samples/drivers/dac/boards/sam_v71_xult_samv71q21b.overlay diff --git a/samples/drivers/dac/sample.yaml b/samples/drivers/dac/sample.yaml index fa7dea45c316d8..687818eb8d5063 100644 --- a/samples/drivers/dac/sample.yaml +++ b/samples/drivers/dac/sample.yaml @@ -35,10 +35,10 @@ tests: - nucleo_l552ze_q - nucleo_u575zi_q - nucleo_wl55jc - - sam_e70_xplained - - sam_e70b_xplained - - sam_v71_xult - - sam_v71b_xult + - sam_e70_xplained/same70q21 + - sam_e70_xplained/same70q21b + - sam_v71_xult/samv71q21 + - sam_v71_xult/samv71q21b - stm32f3_disco - stm32l562e_dk - twr_ke18f diff --git a/samples/drivers/eeprom/sample.yaml b/samples/drivers/eeprom/sample.yaml index 0a5cef505748a0..1c592eb87817b1 100644 --- a/samples/drivers/eeprom/sample.yaml +++ b/samples/drivers/eeprom/sample.yaml @@ -27,8 +27,8 @@ tests: - arduino_spi platform_exclude: - ubx_evkannab1/nrf52832 - - sam_v71_xult - - sam_v71b_xult + - sam_v71_xult/samv71q21 + - sam_v71_xult/samv71q21b - pan1781_evb - pan1782_evb - pan1770_evb diff --git a/samples/net/cloud/mqtt_azure/sample.yaml b/samples/net/cloud/mqtt_azure/sample.yaml index ffa3e86689540f..0513b8e0c2a481 100644 --- a/samples/net/cloud/mqtt_azure/sample.yaml +++ b/samples/net/cloud/mqtt_azure/sample.yaml @@ -7,7 +7,7 @@ tests: sample.net.cloud.mqtt_azure: harness: net platform_allow: - - sam_e70_xplained + - sam_e70_xplained/same70q21 - frdm_k64f - qemu_x86 integration_platforms: diff --git a/samples/net/cloud/tagoio_http_post/README.rst b/samples/net/cloud/tagoio_http_post/README.rst index dc0f2b9da6c061..30778353c503ca 100644 --- a/samples/net/cloud/tagoio_http_post/README.rst +++ b/samples/net/cloud/tagoio_http_post/README.rst @@ -51,7 +51,7 @@ tagoio-http-client sample application with minimal configuration: .. zephyr-app-commands:: :zephyr-app: samples/net/cloud/tagoio_http_post - :board: [sam4e_xpro | sam_v71_xult | frdm_k64f | nucleo_f767zi] + :board: [sam4e_xpro | sam_v71_xult/samv71q21 | frdm_k64f | nucleo_f767zi] :goals: build flash :compact: @@ -75,7 +75,7 @@ need fill ``CONFIG_TAGOIO_HTTP_WIFI_SSID`` with your wifi network SSID and .. zephyr-app-commands:: :zephyr-app: samples/net/cloud/tagoio_http_post - :board: [sam_v71_xult | frdm_k64f | nucleo_f767zi] + :board: [sam_v71_xult/samv71q21 | frdm_k64f | nucleo_f767zi] :shield: [esp_8266_arduino | inventek_eswifi_arduino_uart] :gen-args: -DEXTRA_CONF_FILE=overlay-wifi.conf :goals: build flash diff --git a/samples/net/gptp/boards/sam_e70_xplained.conf b/samples/net/gptp/boards/sam_e70_xplained_same70q21.conf similarity index 100% rename from samples/net/gptp/boards/sam_e70_xplained.conf rename to samples/net/gptp/boards/sam_e70_xplained_same70q21.conf diff --git a/samples/net/gptp/sample.yaml b/samples/net/gptp/sample.yaml index 52b90a7f4e2681..02591c22a6b241 100644 --- a/samples/net/gptp/sample.yaml +++ b/samples/net/gptp/sample.yaml @@ -10,7 +10,7 @@ tests: sample.net.gptp: platform_allow: - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - native_posix - native_posix_64 - native_sim diff --git a/samples/net/ipv4_autoconf/boards/sam_e70_xplained.conf b/samples/net/ipv4_autoconf/boards/sam_e70_xplained_same70q21.conf similarity index 57% rename from samples/net/ipv4_autoconf/boards/sam_e70_xplained.conf rename to samples/net/ipv4_autoconf/boards/sam_e70_xplained_same70q21.conf index ce81ebf899e41d..e89285e418cd77 100644 --- a/samples/net/ipv4_autoconf/boards/sam_e70_xplained.conf +++ b/samples/net/ipv4_autoconf/boards/sam_e70_xplained_same70q21.conf @@ -1,4 +1,4 @@ -# sam_e70_xplained board need more buffers, otherwise it fails to build +# sam_e70_xplained/same70q21 board need more buffers, otherwise it fails to build CONFIG_NET_PKT_RX_COUNT=20 CONFIG_NET_PKT_TX_COUNT=20 diff --git a/samples/net/sockets/echo_client/README.rst b/samples/net/sockets/echo_client/README.rst index 2cc1500d1489c9..ddb67e94eec20d 100644 --- a/samples/net/sockets/echo_client/README.rst +++ b/samples/net/sockets/echo_client/README.rst @@ -75,7 +75,7 @@ Example building for the IEEE 802.15.4 RF2XX transceiver: .. zephyr-app-commands:: :zephyr-app: samples/net/sockets/echo_client :host-os: unix - :board: [atsamr21_xpro | sam4s_xplained | sam_v71_xult] + :board: [atsamr21_xpro | sam4s_xplained | sam_v71_xult/samv71q21] :gen-args: -DEXTRA_CONF_FILE=overlay-802154.conf :goals: build flash :compact: diff --git a/samples/net/sockets/echo_client/sample.yaml b/samples/net/sockets/echo_client/sample.yaml index ac3cb737a74628..a32277d4d9c445 100644 --- a/samples/net/sockets/echo_client/sample.yaml +++ b/samples/net/sockets/echo_client/sample.yaml @@ -13,7 +13,7 @@ tests: platform_allow: - qemu_x86 - frdm_k64f - - sam_e70_xplained + - sam_e70_xplained/same70q21 - qemu_cortex_m3 - frdm_kw41z integration_platforms: @@ -35,28 +35,28 @@ tests: - OVERLAY_CONFIG="overlay-802154.conf" platform_allow: - sam4e_xpro - - sam_v71_xult + - sam_v71_xult/samv71q21 integration_platforms: - - sam_v71_xult + - sam_v71_xult/samv71q21 sample.net.sockets.echo_client.802154.rf2xx.legacy: extra_args: - SHIELD=atmel_rf2xx_legacy - OVERLAY_CONFIG="overlay-802154.conf" platform_allow: - sam4e_xpro - - sam_v71_xult + - sam_v71_xult/samv71q21 integration_platforms: - - sam_v71_xult + - sam_v71_xult/samv71q21 sample.net.sockets.echo_client.802154.rf2xx.arduino: extra_args: - SHIELD=atmel_rf2xx_arduino - OVERLAY_CONFIG="overlay-802154.conf" platform_allow: - - sam_v71_xult + - sam_v71_xult/samv71q21 - frdm_k64f - nucleo_f767zi integration_platforms: - - sam_v71_xult + - sam_v71_xult/samv71q21 sample.net.sockets.echo_client.802154.rf2xx.mikrobus: extra_args: - SHIELD=atmel_rf2xx_mikrobus diff --git a/samples/net/sockets/echo_server/README.rst b/samples/net/sockets/echo_server/README.rst index 54e27a1be3a901..b05ed42b32c67c 100644 --- a/samples/net/sockets/echo_server/README.rst +++ b/samples/net/sockets/echo_server/README.rst @@ -79,7 +79,7 @@ Example building for the atsamr21_xpro with RF2XX driver support: .. zephyr-app-commands:: :zephyr-app: samples/net/sockets/echo_server :host-os: unix - :board: [atsamr21_xpro | sam4e_xpro | sam_v71_xult] + :board: [atsamr21_xpro | sam4e_xpro | sam_v71_xult/samv71q21] :gen-args: -DEXTRA_CONF_FILE=overlay-802154.conf :goals: build flash :compact: diff --git a/samples/net/sockets/echo_server/sample.yaml b/samples/net/sockets/echo_server/sample.yaml index 8d88a63ad89e6e..ffd1b5b4e96701 100644 --- a/samples/net/sockets/echo_server/sample.yaml +++ b/samples/net/sockets/echo_server/sample.yaml @@ -13,7 +13,7 @@ tests: platform_allow: - qemu_x86 - qemu_x86_64 - - sam_e70_xplained + - sam_e70_xplained/same70q21 - frdm_k64f - qemu_cortex_m3 - frdm_kw41z @@ -36,28 +36,28 @@ tests: - OVERLAY_CONFIG="overlay-802154.conf" platform_allow: - sam4e_xpro - - sam_v71_xult + - sam_v71_xult/samv71q21 integration_platforms: - - sam_v71_xult + - sam_v71_xult/samv71q21 sample.net.sockets.echo_server.802154.rf2xx.legacy: extra_args: - SHIELD=atmel_rf2xx_legacy - OVERLAY_CONFIG="overlay-802154.conf" platform_allow: - sam4e_xpro - - sam_v71_xult + - sam_v71_xult/samv71q21 integration_platforms: - - sam_v71_xult + - sam_v71_xult/samv71q21 sample.net.sockets.echo_server.802154.rf2xx.arduino: extra_args: - SHIELD=atmel_rf2xx_arduino - OVERLAY_CONFIG="overlay-802154.conf" platform_allow: - - sam_v71_xult + - sam_v71_xult/samv71q21 - frdm_k64f - nucleo_f767zi integration_platforms: - - sam_v71_xult + - sam_v71_xult/samv71q21 sample.net.sockets.echo_server.802154.rf2xx.mikrobus: extra_args: - SHIELD=atmel_rf2xx_mikrobus diff --git a/samples/net/sockets/txtime/README.rst b/samples/net/sockets/txtime/README.rst index 46979ce68bbceb..d0eb9ad0827c11 100644 --- a/samples/net/sockets/txtime/README.rst +++ b/samples/net/sockets/txtime/README.rst @@ -11,7 +11,7 @@ This sample is a simple UDP sender/receiver which will set the SO_TXTIME socket option and expects the Ethernet driver to send the data when the TX time is expected. The application requires that the board has PTP clock support. A simulated PTP clock is -provided for qemu_x86 board. Also frdm_k64f and sam_e70_xplained boards +provided for qemu_x86 board. Also frdm_k64f and sam_e70_xplained/same70q21 boards are supported. Other mcux or gmac Ethernet driver based boards should work too. User can control how long the application should wait between packets sent by diff --git a/samples/net/zperf/sample.yaml b/samples/net/zperf/sample.yaml index 0efa5ccc064edc..14adbe46c316d3 100644 --- a/samples/net/zperf/sample.yaml +++ b/samples/net/zperf/sample.yaml @@ -6,7 +6,7 @@ common: platform_exclude: - native_posix - native_posix_64 - - sam_e70_xplained + - sam_e70_xplained/same70q21 min_ram: 64 sample: description: Network performance measurement tool for Zephyr diff --git a/samples/sensor/sensor_shell/boards/tdk_robokit1.conf b/samples/sensor/sensor_shell/boards/robokit1.conf similarity index 100% rename from samples/sensor/sensor_shell/boards/tdk_robokit1.conf rename to samples/sensor/sensor_shell/boards/robokit1.conf diff --git a/samples/subsys/llext/shell_loader/README.rst b/samples/subsys/llext/shell_loader/README.rst index 583299028be0e8..5062222ff2b0e5 100644 --- a/samples/subsys/llext/shell_loader/README.rst +++ b/samples/subsys/llext/shell_loader/README.rst @@ -20,7 +20,7 @@ Building .. zephyr-app-commands:: :zephyr-app: samples/subsys/llext/shell_loader - :board: tdk_robokit1 + :board: robokit1 :goals: build :compact: diff --git a/samples/subsys/logging/syst/sample.yaml b/samples/subsys/logging/syst/sample.yaml index 58985b7630c0e2..8c4681c4fe8823 100644 --- a/samples/subsys/logging/syst/sample.yaml +++ b/samples/subsys/logging/syst/sample.yaml @@ -38,7 +38,7 @@ tests: extra_args: OVERLAY_CONFIG=overlay_immediate.conf integration_platforms: - qemu_x86 - - sam_e70_xplained + - sam_e70_xplained/same70q21 harness: console harness_config: type: multi_line diff --git a/samples/subsys/tracing/README.rst b/samples/subsys/tracing/README.rst index 9c14af231d5667..89c3ac1eb5f358 100644 --- a/samples/subsys/tracing/README.rst +++ b/samples/subsys/tracing/README.rst @@ -44,7 +44,7 @@ Build a USB-tracing image with: .. zephyr-app-commands:: :zephyr-app: samples/subsys/tracing - :board: sam_e70_xplained + :board: sam_e70_xplained/same70q21 :conf: "prj_usb.conf" :goals: build :compact: @@ -53,7 +53,7 @@ or: .. zephyr-app-commands:: :zephyr-app: samples/subsys/tracing - :board: sam_e70_xplained + :board: sam_e70_xplained/same70q21 :conf: "prj_usb_ctf.conf" :goals: build :compact: diff --git a/samples/subsys/tracing/sample.yaml b/samples/subsys/tracing/sample.yaml index a5c3de401f0953..877ea096b5802a 100644 --- a/samples/subsys/tracing/sample.yaml +++ b/samples/subsys/tracing/sample.yaml @@ -45,7 +45,7 @@ tests: extra_args: CONF_FILE="prj_uart.conf" filter: dt_chosen_enabled("zephyr,tracing-uart") sample.tracing.transport.usb: - platform_allow: sam_e70_xplained + platform_allow: sam_e70_xplained/same70q21 depends_on: usb_device extra_args: CONF_FILE="prj_usb.conf" sample.tracing.transport.uart.ctf: @@ -57,7 +57,7 @@ tests: extra_args: CONF_FILE="prj_uart_ctf.conf" filter: dt_chosen_enabled("zephyr,tracing-uart") sample.tracing.transport.usb.ctf: - platform_allow: sam_e70_xplained + platform_allow: sam_e70_xplained/same70q21 depends_on: usb_device extra_args: CONF_FILE="prj_usb_ctf.conf" sample.tracing.transport.native: From 8e47264e23756c95b5c397692bb40777e6a3c703 Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Sun, 11 Feb 2024 14:54:05 +0100 Subject: [PATCH 11/12] CODEOWNERS: Update Atmel entries Update Atmel related rules to keep consistent. Signed-off-by: Gerson Fernando Budke --- CODEOWNERS | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 16dfd85cc02113..bd6bbf17e86773 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -19,13 +19,7 @@ # entries that are not covered by the MAINTAINERS file. /soc/arm/aspeed/ @aspeeddylan -/soc/arm/atmel_sam/common/*_sam4l_*.c @nandojve -/soc/arm/atmel_sam/sam3x/ @ioannisg -/soc/arm/atmel_sam/sam4e/ @nandojve -/soc/arm/atmel_sam/sam4l/ @nandojve -/soc/arm/atmel_sam/sam4s/ @fallrisk -/soc/arm/atmel_sam/same70/ @nandojve -/soc/arm/atmel_sam/samv71/ @nandojve +/soc/atmel/ @nandojve /soc/arm/bcm*/ @sbranden /soc/arm/infineon_cat1/ @ifyall @npal-cy /soc/arm/infineon_xmc/ @parthitce @@ -101,11 +95,7 @@ /boards/arm/rpi_pico/ @yonsch /boards/arm/ronoth_lodev/ @NorthernDean /boards/arm/xmc45_relax_kit/ @parthitce -/boards/arm/sam4e_xpro/ @nandojve -/boards/arm/sam4l_ek/ @nandojve -/boards/arm/sam4s_xplained/ @fallrisk -/boards/arm/sam_e70_xplained/ @nandojve -/boards/arm/sam_v71_xult/ @nandojve +/boards/atmel/ @nandojve /boards/arm/scobc_module1/ @yashi /boards/arm/v2m_beetle/ @fvincenzo /boards/arm/olimexino_stm32/ @ydamigos @@ -411,13 +401,7 @@ /dts/arc/ @abrodkin @ruuddw @iriszzw @evgeniy-paltsev /dts/arm/acsip/ @NorthernDean /dts/arm/aspeed/ @aspeeddylan -/dts/arm/atmel/sam4e* @nandojve -/dts/arm/atmel/sam4l* @nandojve -/dts/arm/atmel/samr21.dtsi @benpicco -/dts/arm/atmel/sam*5*.dtsi @benpicco -/dts/arm/atmel/same70* @nandojve -/dts/arm/atmel/samv71* @nandojve -/dts/arm/atmel/ @galak +/dts/arm/atmel/ @galak @nandojve /dts/arm/broadcom/ @sbranden /dts/arm/cypress/ @ifyall @npal-cy /dts/arm/gd/ @nandojve @@ -475,6 +459,7 @@ /dts/bindings/counter/snps,dw-timers.yaml @pbalsundar /dts/bindings/wifi/*esp-at.yaml @mniestroj /dts/bindings/*/*gd32* @nandojve +/dts/bindings/*/*sam* @nandojve /dts/bindings/*/*npcx* @MulinChao @ChiHuaL /dts/bindings/*/*psoc6* @ifyall @npal-cy /dts/bindings/*/*infineon*cat1* @ifyall @npal-cy From b5cad58876c3caaff3066a029fdcf3fc3577fc1c Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Sun, 11 Feb 2024 14:55:01 +0100 Subject: [PATCH 12/12] MAINTAINERS: Update Atmel entries Update Atmel related rules to keep consistent. Signed-off-by: Gerson Fernando Budke --- MAINTAINERS.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index 26b34f70fde0d0..6151386cb7e145 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -3383,10 +3383,9 @@ Microchip SAM Platforms: - mnkp - stephanosio files: - - boards/arm/atsam*/ - - boards/arm/sam*/ + - boards/atmel/ - dts/arm/atmel/ - - soc/arm/atmel_sam*/ + - soc/atmel/ - drivers/*/*sam*.c - dts/bindings/*/atmel,* labels: