From f013e20bc5a104e8d05f896c6668c48a1f8fe1dd Mon Sep 17 00:00:00 2001 From: Declan Snyder Date: Wed, 12 Mar 2025 09:14:59 -0500 Subject: [PATCH] soc: nxp: Add missing resolve of system timer cfg These socs were missing a config line to disable SYSTICK if the LPTMR is configured for the system timer, similar to how other SOCs do this for alternative system timers than systick. This fixes build errors in the case where that lptmr kconfig is enabled. Also, the LPTMR kconfig should be default no because it is a secondary option for the system timer, being lower resolution than systick. This also resolves build errors. Signed-off-by: Declan Snyder --- drivers/timer/Kconfig.mcux_lptmr | 2 +- soc/nxp/imxrt/imxrt118x/Kconfig.defconfig | 3 +++ soc/nxp/mcx/mcxa/Kconfig.defconfig | 3 +++ soc/nxp/mcx/mcxc/Kconfig.defconfig | 3 +++ soc/nxp/mcx/mcxn/Kconfig.defconfig | 3 +++ soc/nxp/mcx/mcxw/Kconfig.defconfig | 3 +++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/timer/Kconfig.mcux_lptmr b/drivers/timer/Kconfig.mcux_lptmr index 9f92c0874f3..884ea4dc917 100644 --- a/drivers/timer/Kconfig.mcux_lptmr +++ b/drivers/timer/Kconfig.mcux_lptmr @@ -5,7 +5,7 @@ config MCUX_LPTMR_TIMER bool "MCUX LPTMR timer" - default y + default n depends on DT_HAS_NXP_KINETIS_LPTMR_ENABLED || \ MCUX_KINETIS_LPTMR depends on !COUNTER_MCUX_LPTMR diff --git a/soc/nxp/imxrt/imxrt118x/Kconfig.defconfig b/soc/nxp/imxrt/imxrt118x/Kconfig.defconfig index 228c42311df..439d49d74c4 100644 --- a/soc/nxp/imxrt/imxrt118x/Kconfig.defconfig +++ b/soc/nxp/imxrt/imxrt118x/Kconfig.defconfig @@ -3,6 +3,9 @@ if SOC_SERIES_IMXRT118X +config CORTEX_M_SYSTICK + default n if MCUX_LPTMR_TIMER + config NUM_IRQS default 239 diff --git a/soc/nxp/mcx/mcxa/Kconfig.defconfig b/soc/nxp/mcx/mcxa/Kconfig.defconfig index 11195acc0d7..3ee3181cd81 100644 --- a/soc/nxp/mcx/mcxa/Kconfig.defconfig +++ b/soc/nxp/mcx/mcxa/Kconfig.defconfig @@ -3,6 +3,9 @@ if SOC_SERIES_MCXA +config CORTEX_M_SYSTICK + default n if MCUX_LPTMR_TIMER + config NUM_IRQS default 88 diff --git a/soc/nxp/mcx/mcxc/Kconfig.defconfig b/soc/nxp/mcx/mcxc/Kconfig.defconfig index 717158585bc..c1b1f44eb63 100644 --- a/soc/nxp/mcx/mcxc/Kconfig.defconfig +++ b/soc/nxp/mcx/mcxc/Kconfig.defconfig @@ -3,6 +3,9 @@ if SOC_SERIES_MCXC +config CORTEX_M_SYSTICK + default n if MCUX_LPTMR_TIMER + config NUM_IRQS default 32 diff --git a/soc/nxp/mcx/mcxn/Kconfig.defconfig b/soc/nxp/mcx/mcxn/Kconfig.defconfig index 1668cfad798..ff26cb05e0c 100644 --- a/soc/nxp/mcx/mcxn/Kconfig.defconfig +++ b/soc/nxp/mcx/mcxn/Kconfig.defconfig @@ -3,6 +3,9 @@ if SOC_SERIES_MCXN +config CORTEX_M_SYSTICK + default n if MCUX_LPTMR_TIMER + config MFD default y if DT_HAS_NXP_LP_FLEXCOMM_ENABLED diff --git a/soc/nxp/mcx/mcxw/Kconfig.defconfig b/soc/nxp/mcx/mcxw/Kconfig.defconfig index d04ed76905a..330d7b80d85 100644 --- a/soc/nxp/mcx/mcxw/Kconfig.defconfig +++ b/soc/nxp/mcx/mcxw/Kconfig.defconfig @@ -3,6 +3,9 @@ if SOC_SERIES_MCXW +config CORTEX_M_SYSTICK + default n if MCUX_LPTMR_TIMER + config NUM_IRQS default 77 if SOC_MCXW727C default 75