Skip to content

Commit f503313

Browse files
jrte-devdkalowsk
authored andcommitted
drivers: mcxc osc: use oscillator internal capacitance value from DT
Use default value 0 if board DT doesn't define it.e It's totally fine if the board device tree doen't define load_capacitance_picofarads for the crystal oscillator. In that case, just fallback to 0. Signed-off-by: jens rudberg <jens@teenage.engineering>
1 parent e42cfcf commit f503313

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

soc/nxp/mcx/mcxc/soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const sim_clock_config_t simConfig_BOARD_BootClockRUN = {
6868

6969
const osc_config_t oscConfig_BOARD_BootClockRUN = {
7070
.freq = DT_PROP(OSC_NODE, clock_frequency),
71-
.capLoad = 0,
71+
.capLoad = DT_PROP_OR(OSC_NODE, load_capacitance_picofarads, 0),
7272
#if DT_ENUM_HAS_VALUE(OSC_NODE, mode, external)
7373
.workMode = kOSC_ModeExt,
7474
#elif DT_ENUM_HAS_VALUE(OSC_NODE, mode, low_power)

0 commit comments

Comments
 (0)