From 908a7eb3f69a5a450b1b5090fdcb4d54dfe251cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Fri, 3 Jan 2025 11:56:54 +0100 Subject: [PATCH] boards: nordic: Set 64M CPU frequency for nrf54l20pdk and nrf54l09pdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nrf54l20pdk and nrf54l09pdk must use 64 MHz for now. So far it was done by using SOC_NRF54LX_SKIP_CLOCK_CONFIG Kconfig option which was skipping oscillator configuration so that it was running the default frequency (which is 64 MHz). This approach was a bit cryptic because DT was indicating that CPU was running 128 MHz when actual frequency was different (and it was relying on assumption that default frequency is 64 MHz). After adding hfpll as clock source for CPU Kconfig option can be replaced with DT setting where actual frequency is correctly indicated. Since hfpll is a clock source for fast peripherals (e.g. TIMER00) it is possible to have single source of information regarding frequency. Signed-off-by: Krzysztof Chruściński --- boards/nordic/nrf54l09pdk/Kconfig.defconfig | 3 --- boards/nordic/nrf54l09pdk/nrf54l09_cpuapp_common.dtsi | 5 +++++ boards/nordic/nrf54l20pdk/Kconfig.defconfig | 3 --- boards/nordic/nrf54l20pdk/nrf54l20_cpuapp_common.dtsi | 5 +++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/boards/nordic/nrf54l09pdk/Kconfig.defconfig b/boards/nordic/nrf54l09pdk/Kconfig.defconfig index e495d3e67ce8..44589c9b35b7 100644 --- a/boards/nordic/nrf54l09pdk/Kconfig.defconfig +++ b/boards/nordic/nrf54l09pdk/Kconfig.defconfig @@ -9,9 +9,6 @@ config BT_CTLR config ROM_START_OFFSET default 0x800 if BOOTLOADER_MCUBOOT -config SOC_NRF54LX_SKIP_CLOCK_CONFIG - default y - config SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE default y diff --git a/boards/nordic/nrf54l09pdk/nrf54l09_cpuapp_common.dtsi b/boards/nordic/nrf54l09pdk/nrf54l09_cpuapp_common.dtsi index c258cb2f4b77..0bdab1b8851d 100644 --- a/boards/nordic/nrf54l09pdk/nrf54l09_cpuapp_common.dtsi +++ b/boards/nordic/nrf54l09pdk/nrf54l09_cpuapp_common.dtsi @@ -27,6 +27,11 @@ status = "okay"; }; +&hfpll { + /* For now use 64 MHz clock for CPU and fast peripherals. */ + clock-frequency = ; +}; + &lfxo { load-capacitors = "internal"; load-capacitance-femtofarad = <15500>; diff --git a/boards/nordic/nrf54l20pdk/Kconfig.defconfig b/boards/nordic/nrf54l20pdk/Kconfig.defconfig index f6987b800879..406a65c88269 100644 --- a/boards/nordic/nrf54l20pdk/Kconfig.defconfig +++ b/boards/nordic/nrf54l20pdk/Kconfig.defconfig @@ -6,9 +6,6 @@ if BOARD_NRF54L20PDK_NRF54L20_CPUAPP config ROM_START_OFFSET default 0x800 if BOOTLOADER_MCUBOOT -config SOC_NRF54LX_SKIP_CLOCK_CONFIG - default y - config SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE default y diff --git a/boards/nordic/nrf54l20pdk/nrf54l20_cpuapp_common.dtsi b/boards/nordic/nrf54l20pdk/nrf54l20_cpuapp_common.dtsi index cdf6d62a30a7..0d3c1fe98e99 100644 --- a/boards/nordic/nrf54l20pdk/nrf54l20_cpuapp_common.dtsi +++ b/boards/nordic/nrf54l20pdk/nrf54l20_cpuapp_common.dtsi @@ -27,6 +27,11 @@ status = "okay"; }; +&hfpll { + /* For now use 64 MHz clock for CPU and fast peripherals. */ + clock-frequency = ; +}; + &lfxo { load-capacitors = "internal"; load-capacitance-femtofarad = <15500>;