Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions boards/arm/lpcxpresso55s69/lpcxpresso55s69-clocks.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* Copyright 2023 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

/* Configure clock tree for 150Mhz operation */
&syscon {
/* Enable FRO 12m as input for PLL0 */
fro-12m {
status = "okay";
};

/* PLL0 should clock from FRO12m */
pll0clksel {
status = "okay";
sel = <&fro_12m>;
/* Raw PLL0 output frequency of 300MHz */
pll0 {
status = "okay";
mult = <25>;
div = <1>;
pll0-pdec {
status = "okay";
div = <2>;
};
};
};
/* Route PLL0 output through PDEC, which divides to 150MHz */
pll0-directo {
status = "okay";
sel = <&pll0_pdec>;
};
pll0-bypass {
status = "okay";
sel = <&pll0_directo>;
};
/* Route PLL0 main clock through mainclkselb */
mainclkselb {
status = "okay";
sel = <&pll0_bypass>;
/* AHB clk div sets main system clock, which will be 150MHz */
ahbclkdiv {
status = "okay";
div = <1>;
};
};

/* Clock Flexcomm0 from FRO12m */
fcclksel0 {
status = "okay";
sel = <&fro_12m>;
};
};
1 change: 1 addition & 0 deletions boards/arm/lpcxpresso55s69/lpcxpresso55s69.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include "lpcxpresso55s69-pinctrl.dtsi"
#include "lpcxpresso55s69-clocks.dtsi"

/ {
aliases{
Expand Down
1 change: 1 addition & 0 deletions boards/arm/lpcxpresso55s69/lpcxpresso55s69_cpu0_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_PINCTRL=y
CONFIG_NXP_DTS_CLOCKING=y

# Enable TrustZone-M
CONFIG_TRUSTED_EXECUTION_SECURE=y
Expand Down
1 change: 1 addition & 0 deletions boards/arm/lpcxpresso55s69/lpcxpresso55s69_cpu1_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ CONFIG_BOARD_LPCXPRESSO55S69_CPU1=y
CONFIG_GPIO=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
CONFIG_PINCTRL=y
CONFIG_NXP_DTS_CLOCKING=y

CONFIG_RUNTIME_NMI=y
4 changes: 4 additions & 0 deletions drivers/clock_control/clock_control_mcux_syscon.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,12 @@ static int mcux_lpc_syscon_clock_control_get_subsys_rate(
*rate = CLOCK_GetDcPixelClkFreq();
break;
#endif
case MCUX_CORE_CLK:
*rate = CLOCK_GetCoreSysClkFreq();
break;
}


return 0;
}

Expand Down
1 change: 1 addition & 0 deletions dts/arm/nxp/nxp_lpc55S6x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
};

#include "nxp_lpc55S6x_common.dtsi"
#include "nxp_lpc55Sxx_clocks.dtsi"

/*
* Explicitly enable IAP after we include the common LPC55S6X dtsi file,
Expand Down
1 change: 1 addition & 0 deletions dts/arm/nxp/nxp_lpc55S6x_ns.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
};

#include "nxp_lpc55S6x_common.dtsi"
#include "nxp_lpc55Sxx_clocks.dtsi"
Loading