soc: nordic: Move DCDC configuration to DT for nRF54L15

Moving configuration for nRF54L15 device from kconfig to dts.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
This commit is contained in:
Karol Lasończyk 2024-08-16 12:21:45 +02:00 committed by Fabio Baltieri
parent bc5477ab10
commit 85c292ac59
6 changed files with 41 additions and 21 deletions

View File

@ -1,13 +0,0 @@
# nRF54L15 PDK board configuration
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
if BOARD_NRF54L15PDK_NRF54L15_CPUAPP
config BOARD_ENABLE_DCDC
bool "DCDC mode"
select SOC_NRF54L_VREG_MAIN_DCDC
default y
endif # BOARD_NRF54L15PDK_NRF54L15_CPUAPP

View File

@ -36,6 +36,15 @@
load-capacitance-femtofarad = <15000>; load-capacitance-femtofarad = <15000>;
}; };
&regulators {
status = "okay";
};
&vregmain {
status = "okay";
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
};
&grtc { &grtc {
owned-channels = <0 1 2 3 4 5 6 7 8 9 10 11>; owned-channels = <0 1 2 3 4 5 6 7 8 9 10 11>;
/* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */ /* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */

View File

@ -0,0 +1,12 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
description: Nordic REGULATORS (voltage regulators control module) on nRF54L.
compatible: "nordic,nrf54l-regulators"
include: base.yaml
properties:
reg:
required: true

View File

@ -6,6 +6,7 @@
#include <mem.h> #include <mem.h>
#include <nordic/nrf_common.dtsi> #include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/delete-node/ &sw_pwm; /delete-node/ &sw_pwm;
@ -577,6 +578,22 @@
interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>; interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>;
status = "disabled"; status = "disabled";
}; };
regulators: regulator@120000 {
compatible = "nordic,nrf54l-regulators";
reg = <0x120000 0x1000>;
status = "disabled";
#address-cells = <1>;
#size-cells = <1>;
vregmain: regulator@120600 {
compatible = "nordic,nrf5x-regulator";
reg = <0x120600 0x1>;
status = "disabled";
regulator-name = "VREGMAIN";
regulator-initial-mode = <NRF5X_REG_MODE_LDO>;
};
};
}; };
rram_controller: rram-controller@5004b000 { rram_controller: rram-controller@5004b000 {

View File

@ -54,11 +54,6 @@ config SOC_NRF_FORCE_CONSTLAT
of base resources on while in sleep. The advantage of having a constant of base resources on while in sleep. The advantage of having a constant
and predictable latency will be at the cost of having increased power consumption. and predictable latency will be at the cost of having increased power consumption.
config SOC_NRF54L_VREG_MAIN_DCDC
bool "NRF54L DC/DC converter."
help
To enable, an inductor must be connected to the DC/DC converter pin.
config SOC_NRF54L_NORMAL_VOLTAGE_MODE config SOC_NRF54L_NORMAL_VOLTAGE_MODE
bool "NRF54L Normal Voltage Mode." bool "NRF54L Normal Voltage Mode."

View File

@ -149,9 +149,9 @@ static int nordicsemi_nrf54l_init(void)
nrf_power_task_trigger(NRF_POWER, NRF_POWER_TASK_CONSTLAT); nrf_power_task_trigger(NRF_POWER, NRF_POWER_TASK_CONSTLAT);
} }
if (IS_ENABLED(CONFIG_SOC_NRF54L_VREG_MAIN_DCDC)) { #if (DT_PROP(DT_NODELABEL(vregmain), regulator_initial_mode) == NRF5X_REG_MODE_DCDC)
nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_MAIN, true); nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_MAIN, true);
} #endif
if (IS_ENABLED(CONFIG_SOC_NRF54L_NORMAL_VOLTAGE_MODE)) { if (IS_ENABLED(CONFIG_SOC_NRF54L_NORMAL_VOLTAGE_MODE)) {
nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_MEDIUM, false); nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_MEDIUM, false);