From 2cd0236a8c0761656dcfe6b20ade5b832285ba7a Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 18 Aug 2020 17:10:08 +0200 Subject: [PATCH] cpu/samd5x: add all parts to Kconfig --- cpu/samd5x/Kconfig | 24 +++++++++++--------- cpu/samd5x/Kconfig.samd51 | 47 +++++++++++++++++++++++++++++++++++++++ cpu/samd5x/Kconfig.same54 | 22 ++++++++++++++++++ 3 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 cpu/samd5x/Kconfig.samd51 create mode 100644 cpu/samd5x/Kconfig.same54 diff --git a/cpu/samd5x/Kconfig b/cpu/samd5x/Kconfig index 27210f8ffb..786ad65c99 100644 --- a/cpu/samd5x/Kconfig +++ b/cpu/samd5x/Kconfig @@ -5,7 +5,7 @@ # directory for more details. # -config CPU_FAM_SAMD5X +config CPU_COMMON_SAMD5X bool select CPU_COMMON_SAM0 select CPU_CORE_CORTEX_M4F @@ -14,25 +14,29 @@ config CPU_FAM_SAMD5X select HAS_CPU_SAMD5X select HAS_PERIPH_HWRNG -## CPU Models -config CPU_MODEL_SAME54P20A +config CPU_FAM_SAMD51 bool - select CPU_FAM_SAMD5X + select CPU_COMMON_SAMD5X + +config CPU_FAM_SAME54 + bool + select CPU_COMMON_SAMD5X ## Declaration of specific features config HAS_CPU_SAMD5X bool help - Indicates that a 'samd5x' cpu is being used. + Indicates that a SAMD5x/SAME5x cpu is being used. ## CPU common symbols config CPU_FAM - default "samd5x" if CPU_FAM_SAMD5X - -config CPU_MODEL - default "same54p20a" if CPU_MODEL_SAME54P20A + default "samd51" if CPU_FAM_SAMD51 + default "same54" if CPU_FAM_SAME54 config CPU - default "samd5x" if CPU_FAM_SAMD5X + default "samd5x" if CPU_COMMON_SAMD5X + +source "$(RIOTCPU)/samd5x/Kconfig.samd51" +source "$(RIOTCPU)/samd5x/Kconfig.same54" source "$(RIOTCPU)/sam0_common/Kconfig" diff --git a/cpu/samd5x/Kconfig.samd51 b/cpu/samd5x/Kconfig.samd51 new file mode 100644 index 0000000000..7b32b420ec --- /dev/null +++ b/cpu/samd5x/Kconfig.samd51 @@ -0,0 +1,47 @@ +## CPU Models +config CPU_MODEL_SAMD51G18A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL_SAMD51G19A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL_SAMD51J18A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL_SAMD51J19A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL_SAMD51J20A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL_SAMD51N19A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL_SAMD51N20A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL_SAMD51P19A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL_SAMD51P20A + bool + select CPU_FAM_SAMD51 + +config CPU_MODEL + default "samd51g18a" if CPU_MODEL_SAMD51G18A + default "samd51g19a" if CPU_MODEL_SAMD51G19A + default "samd51j18a" if CPU_MODEL_SAMD51J18A + default "samd51j19a" if CPU_MODEL_SAMD51J19A + default "samd51j20a" if CPU_MODEL_SAMD51J20A + default "samd51n19a" if CPU_MODEL_SAMD51N19A + default "samd51n20a" if CPU_MODEL_SAMD51N20A + default "samd51p19a" if CPU_MODEL_SAMD51P19A + default "samd51p20a" if CPU_MODEL_SAMD51P20A diff --git a/cpu/samd5x/Kconfig.same54 b/cpu/samd5x/Kconfig.same54 new file mode 100644 index 0000000000..0f0afb6ce6 --- /dev/null +++ b/cpu/samd5x/Kconfig.same54 @@ -0,0 +1,22 @@ +## CPU Models +config CPU_MODEL_SAME54N19A + bool + select CPU_FAM_SAME54 + +config CPU_MODEL_SAME54N20A + bool + select CPU_FAM_SAME54 + +config CPU_MODEL_SAME54P19A + bool + select CPU_FAM_SAME54 + +config CPU_MODEL_SAME54P20A + bool + select CPU_FAM_SAME54 + +config CPU_MODEL + default "same54n19a" if CPU_MODEL_SAME54N19A + default "same54n20a" if CPU_MODEL_SAME54N20A + default "same54p19a" if CPU_MODEL_SAME54P19A + default "same54p20a" if CPU_MODEL_SAME54P20A