From bc904cb39680e3b044585fc9605d1f6b322a294f Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 18 Aug 2020 17:22:47 +0200 Subject: [PATCH] cpu/saml21: add all parts to Kconfig --- cpu/saml21/Kconfig | 34 +++++++---------- cpu/saml21/Kconfig.saml21 | 77 +++++++++++++++++++++++++++++++++++++++ cpu/saml21/Kconfig.samr30 | 12 ++++++ cpu/saml21/Kconfig.samr34 | 17 +++++++++ 4 files changed, 120 insertions(+), 20 deletions(-) create mode 100644 cpu/saml21/Kconfig.saml21 create mode 100644 cpu/saml21/Kconfig.samr30 create mode 100644 cpu/saml21/Kconfig.samr34 diff --git a/cpu/saml21/Kconfig b/cpu/saml21/Kconfig index 0d3391790d..9a380442d7 100644 --- a/cpu/saml21/Kconfig +++ b/cpu/saml21/Kconfig @@ -5,31 +5,25 @@ # directory for more details. # -config CPU_FAM_SAML21 +config CPU_COMMON_SAML21 bool select CPU_COMMON_SAM0 select CPU_CORE_CORTEX_M0PLUS select HAS_BACKUP_RAM select HAS_CPU_SAML21 -## CPU Models -config CPU_MODEL_SAML21J18A +config CPU_FAM_SAML21 bool - select CPU_FAM_SAML21 + select CPU_COMMON_SAML21 select HAS_PERIPH_HWRNG -config CPU_MODEL_SAML21J18B +config CPU_FAM_SAMR30 bool - select CPU_FAM_SAML21 - select HAS_PERIPH_HWRNG + select CPU_COMMON_SAML21 -config CPU_MODEL_SAMR30G18A +config CPU_FAM_SAMR34 bool - select CPU_FAM_SAML21 - -config CPU_MODEL_SAMR34J18B - bool - select CPU_FAM_SAML21 + select CPU_COMMON_SAML21 select HAS_PERIPH_HWRNG ## Declaration of specific features @@ -41,14 +35,14 @@ config HAS_CPU_SAML21 ## Common CPU symbols config CPU_FAM default "saml21" if CPU_FAM_SAML21 - -config CPU_MODEL - default "saml21j18a" if CPU_MODEL_SAML21J18A - default "saml21j18b" if CPU_MODEL_SAML21J18B - default "samr30g18a" if CPU_MODEL_SAMR30G18A - default "samr34j18b" if CPU_MODEL_SAMR34J18B + default "samr30" if CPU_FAM_SAMR30 + default "samr34" if CPU_FAM_SAMR34 config CPU - default "saml21" if CPU_FAM_SAML21 + default "saml21" if CPU_COMMON_SAML21 + +source "$(RIOTCPU)/saml21/Kconfig.saml21" +source "$(RIOTCPU)/saml21/Kconfig.samr30" +source "$(RIOTCPU)/saml21/Kconfig.samr34" source "$(RIOTCPU)/sam0_common/Kconfig" diff --git a/cpu/saml21/Kconfig.saml21 b/cpu/saml21/Kconfig.saml21 new file mode 100644 index 0000000000..ad7b82e1d7 --- /dev/null +++ b/cpu/saml21/Kconfig.saml21 @@ -0,0 +1,77 @@ +## CPU Models +config CPU_MODEL_SAML21E15B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21E16B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21E17B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21E18B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21G16B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21G17B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21G18B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21J16B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21J17B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21J17BU + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21J18B + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21J18BU + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21E18A + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21G18A + bool + select CPU_FAM_SAML21 + +config CPU_MODEL_SAML21J18A + bool + select CPU_FAM_SAML21 + +config CPU_MODEL + default "saml21e15b" if CPU_MODEL_SAML21E15B + default "saml21e16b" if CPU_MODEL_SAML21E16B + default "saml21e17b" if CPU_MODEL_SAML21E17B + default "saml21e18b" if CPU_MODEL_SAML21E18B + default "saml21g16b" if CPU_MODEL_SAML21G16B + default "saml21g17b" if CPU_MODEL_SAML21G17B + default "saml21g18b" if CPU_MODEL_SAML21G18B + default "saml21j16b" if CPU_MODEL_SAML21J16B + default "saml21j17b" if CPU_MODEL_SAML21J17B + default "saml21j17bu" if CPU_MODEL_SAML21J17BU + default "saml21j18b" if CPU_MODEL_SAML21J18B + default "saml21j18bu" if CPU_MODEL_SAML21J18BU + default "saml21e18a" if CPU_MODEL_SAML21E18A + default "saml21g18a" if CPU_MODEL_SAML21G18A + default "saml21j18a" if CPU_MODEL_SAML21J18A diff --git a/cpu/saml21/Kconfig.samr30 b/cpu/saml21/Kconfig.samr30 new file mode 100644 index 0000000000..447e75c8d6 --- /dev/null +++ b/cpu/saml21/Kconfig.samr30 @@ -0,0 +1,12 @@ +## CPU Models +config CPU_MODEL_SAMR30E18A + bool + select CPU_FAM_SAMR30 + +config CPU_MODEL_SAMR30G18A + bool + select CPU_FAM_SAMR30 + +config CPU_MODEL + default "samr30e18a" if CPU_MODEL_SAMR30E18A + default "samr30g18a" if CPU_MODEL_SAMR30G18A diff --git a/cpu/saml21/Kconfig.samr34 b/cpu/saml21/Kconfig.samr34 new file mode 100644 index 0000000000..a57fc7ed20 --- /dev/null +++ b/cpu/saml21/Kconfig.samr34 @@ -0,0 +1,17 @@ +## CPU Models +config CPU_MODEL_SAMR34J16B + bool + select CPU_FAM_SAMR34 + +config CPU_MODEL_SAMR34J17B + bool + select CPU_FAM_SAMR34 + +config CPU_MODEL_SAMR34J18B + bool + select CPU_FAM_SAMR34 + +config CPU_MODEL + default "samr34j16b" if CPU_MODEL_SAMR34J16B + default "samr34j17b" if CPU_MODEL_SAMR34J17B + default "samr34j18b" if CPU_MODEL_SAMR34J18B