Skip to content

Commit

Permalink
soc: arm: nxp: ke1xf: add RTC support
Browse files Browse the repository at this point in the history
Add support for the RTC present in the NXP Kinetis KE1xF SoC series.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
  • Loading branch information
henrikbrixandersen authored and MaureenHelm committed May 20, 2019
1 parent 5b400fb commit 3cdb192
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dts/arm/nxp/nxp_ke1xf.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

/ {
aliases {
rtc-0 = &rtc0;
uart-0 = &uart0;
uart-1 = &uart1;
uart-2 = &uart2;
Expand Down Expand Up @@ -63,6 +64,16 @@
#clock-cells = <1>;
};

rtc0: rtc@4003d000 {
compatible = "nxp,kinetis-rtc";
reg = <0x4003d000 0x1000>;
interrupts = <46 0>, <47 0>;
interrupt-names = "alarm", "seconds";
clock-frequency = <32768>;
prescaler = <32768>;
label = "RTC_0";
};

flash_controller: flash-controller@40020000 {
compatible = "nxp,kinetis-ftfe";
label = "FLASH_CTRL";
Expand Down
14 changes: 14 additions & 0 deletions soc/arm/nxp_kinetis/ke1xf/Kconfig.defconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ config CLOCK_CONTROL_MCUX_PCC

endif # CLOCK_CONTROL

if RTC

config RTC_MCUX
default y

endif # RTC

if COUNTER

config COUNTER_MCUX_RTC
default y

endif # COUNTER

if PINMUX

config PINMUX_MCUX
Expand Down
1 change: 1 addition & 0 deletions soc/arm/nxp_kinetis/ke1xf/Kconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ config SOC_SERIES_KINETIS_KE1XF
select HAS_MCUX_FTFX
select HAS_MCUX_LPUART
select HAS_MCUX_PCC
select HAS_MCUX_RTC
select HAS_MCUX_SIM
help
Enable support for Kinetis KE1xF MCU series
8 changes: 8 additions & 0 deletions soc/arm/nxp_kinetis/ke1xf/dts_fixup.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
#define DT_MCUX_PCC_0_NAME DT_NXP_KINETIS_PCC_40065000_LABEL
#define DT_MCUX_PCC_0_BASE_ADDRESS DT_NXP_KINETIS_PCC_40065000_BASE_ADDRESS

#define CONFIG_RTC_0_NAME DT_NXP_KINETIS_RTC_4003D000_LABEL
#define CONFIG_RTC_PRESCALER DT_NXP_KINETIS_RTC_4003D000_PRESCALER
#define DT_RTC_0_NAME DT_NXP_KINETIS_RTC_4003D000_LABEL
#define DT_RTC_MCUX_0_NAME DT_NXP_KINETIS_RTC_4003D000_LABEL
#define DT_RTC_MCUX_0_BASE_ADDRESS DT_NXP_KINETIS_RTC_4003D000_BASE_ADDRESS
#define DT_RTC_MCUX_0_IRQ DT_NXP_KINETIS_RTC_4003D000_IRQ_ALARM
#define DT_RTC_MCUX_0_IRQ_PRI DT_NXP_KINETIS_RTC_4003D000_IRQ_ALARM_PRIORITY

#define DT_FLASH_DEV_BASE_ADDRESS DT_NXP_KINETIS_FTFE_40020000_BASE_ADDRESS
#define DT_FLASH_DEV_NAME DT_NXP_KINETIS_FTFE_40020000_LABEL

Expand Down

0 comments on commit 3cdb192

Please sign in to comment.