soc: lpc55xxx: Support, enable, test NXP MRT

Support NXP MRT on LPC55XXX SOC series, enable on
lpcxpresso55s69_cpu0, add test overlay to counter basic api test

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
Declan Snyder 2023-11-03 10:39:36 -05:00 committed by Carles Cufí
parent 93c59793c2
commit fef0018cca
4 changed files with 55 additions and 0 deletions

View file

@ -204,3 +204,7 @@ i2s1: &flexcomm7 {
&dma1 {
status = "okay";
};
&mrt_channel0 {
status = "okay";
};

View file

@ -410,6 +410,38 @@
prescaler = <2>;
#pwm-cells = <3>;
};
mrt: mrt@d000 {
compatible = "nxp,mrt";
reg = <0xd000 0x100>;
interrupts = <9 0>;
num-channels = <4>;
num-bits = <24>;
clocks = <&syscon MCUX_MRT_CLK>;
#address-cells = <1>;
#size-cells = <0>;
mrt_channel0: mrt_channel@0 {
compatible = "nxp,mrt-channel";
reg = <0>;
status = "disabled";
};
mrt_channel1: mrt_channel@1 {
compatible = "nxp,mrt-channel";
reg = <1>;
status = "disabled";
};
mrt_channel2: mrt_channel@2 {
compatible = "nxp,mrt-channel";
reg = <2>;
status = "disabled";
};
mrt_channel3: mrt_channel@3 {
compatible = "nxp,mrt-channel";
reg = <3>;
status = "disabled";
};
};
};
&nvic {

View file

@ -347,6 +347,10 @@ DT_FOREACH_STATUS_OKAY(nxp_lpc_ctimer, CTIMER_CLOCK_SETUP)
#endif /* SOC platform */
#endif /* DAC */
#ifdef CONFIG_COUNTER_NXP_MRT
RESET_PeripheralReset(kMRT_RST_SHIFT_RSTn);
#endif
}
/**

View file

@ -0,0 +1,15 @@
/*
* Copyright 2023 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
&mrt_channel1 {
status = "okay";
};
/* channel 2 disabled to test disabled channel not breaking things */
&mrt_channel3 {
status = "okay";
};