dts: nxp_k2x: Correct and enable MCG clock controller binding

nxp_k2x.dtsi: Corrects Multipurpose Clock Generator binding
to utilize nxp,kinetis-mcg. Assign MCG to FlexTimer devices.
Enable FlexTimer clocks via System Integration Module clock
gate control registers.

Kconfig.defconfig.mk22f12: Enable default use of
CLOCK_CONTROL_MCUX_MCG when CLOCK_CONTROL is selected.

Signed-off-by: Ryan Holleran <rhollerar@gmail.com>
This commit is contained in:
Ryan Holleran 2021-01-29 23:18:32 -06:00 committed by Anas Nashif
commit b417bb85d2
2 changed files with 18 additions and 5 deletions

View file

@ -60,11 +60,10 @@
};
mcg: clock-controller@40064000 {
compatible = "nxp,k22f-mcg";
compatible = "nxp,kinetis-mcg";
reg = <0x40064000 0xd>;
system-clock-frequency = <120000000>;
clock-controller;
label = "MCG";
#clock-cells = <1>;
};
osc: clock-controller@40065000 {
@ -298,6 +297,8 @@
compatible = "nxp,kinetis-ftm";
reg = <0x40038000 0x98>;
interrupts = <42 0>;
clocks = <&mcg KINETIS_MCG_FIXED_FREQ_CLK>,
<&sim KINETIS_SIM_BUS_CLK 0x103C 24>;
prescaler = <16>;
label = "FTM_0";
status = "disabled";
@ -307,6 +308,8 @@
compatible = "nxp,kinetis-ftm";
reg = <0x40039000 0x98>;
interrupts = <43 0>;
clocks = <&mcg KINETIS_MCG_FIXED_FREQ_CLK>,
<&sim KINETIS_SIM_BUS_CLK 0x103C 25>;
prescaler = <16>;
label = "FTM_1";
status = "disabled";
@ -316,6 +319,8 @@
compatible = "nxp,kinetis-ftm";
reg = <0x4003a000 0x98>;
interrupts = <44 0>;
clocks = <&mcg KINETIS_MCG_FIXED_FREQ_CLK>,
<&sim KINETIS_SIM_BUS_CLK 0x103C 26>;
prescaler = <16>;
label = "FTM_2";
status = "disabled";
@ -325,6 +330,8 @@
compatible = "nxp,kinetis-ftm";
reg = <0x400b9000 0x98>;
interrupts = <71 0>;
clocks = <&mcg KINETIS_MCG_FIXED_FREQ_CLK>,
<&sim KINETIS_SIM_BUS_CLK 0x103C 6>;
prescaler = <16>;
label = "FTM_3";
status = "disabled";

View file

@ -12,9 +12,15 @@ config ADC_MCUX_ADC16
default y
depends on ADC
if CLOCK_CONTROL
config CLOCK_CONTROL_MCUX_MCG
default y
config CLOCK_CONTROL_MCUX_SIM
default y
depends on CLOCK_CONTROL
endif # CLOCK_CONTROL
config PINMUX_MCUX
default y