dts: arm: Kinetis: Add FRDM_K64F support

This patch adds DTS support for the FRDM_K64F board.  The defconfig
enables the DTS usage and the FRDM K64F specific DTS file provides the
differences from the base Kinetis DTS definitions.

A fixup file is provided to map the generated configuration information
to the driver consumers.  The fixup file will be removed once the
drivers are modified to handle the newly generated information.

Change-Id: Ib0ada28faff6a30e8b40eba5c5853e9018ae5fcb
Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
Andy Gross 2017-01-30 00:19:46 -06:00 committed by Anas Nashif
parent ddce7dea40
commit 4192dcc6bc
4 changed files with 55 additions and 0 deletions

View file

@ -9,3 +9,4 @@ CONFIG_CORTEX_M_SYSTICK=y
CONFIG_GPIO=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000
CONFIG_OSC_EXTERNAL=y
CONFIG_HAS_DTS=y

View file

@ -1,3 +1,4 @@
ifeq ($(CONFIG_HAS_DTS),y)
dtb-$(CONFIG_BOARD_FRDM_K64F) = frdm_k64f.dts_compiled
always := $(dtb-y)
endif

33
dts/arm/frdm_k64f.dts Normal file
View file

@ -0,0 +1,33 @@
/dts-v1/;
#include "nxp_k6x.dtsi"
/ {
model = "NXP Freedom MK64F board";
compatible = "nxp,mk64f12", "nxp,k64f", "nxp,k6x";
aliases {
uart_0 = &uart0;
uart_3 = &uart3;
pinmux_a = &pinmux_a;
pinmux_b = &pinmux_b;
pinmux_c = &pinmux_c;
pinmux_d = &pinmux_d;
pinmux_e = &pinmux_e;
gpio_a = &gpioa;
gpio_b = &gpiob;
gpio_c = &gpioc;
gpio_d = &gpiod;
gpio_e = &gpioe;
};
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &uart0;
};
};
&uart0 {
status = "ok";
};

20
dts/arm/frdm_k64f.fixup Normal file
View file

@ -0,0 +1,20 @@
#define CONFIG_NUM_IRQS ARM_ARMV7M_NVIC_E000E100_NUM_IRQS
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_ARMV7M_NVIC_E000E100_NUM_IRQ_PRIO_BITS
#define CONFIG_UART_MCUX_0_BAUD_RATE NXP_K64F_UART_4006A000_BAUD_RATE
#define CONFIG_UART_MCUX_0_IRQ_PRI NXP_K64F_UART_4006A000_ZEPHYR_IRQ_PRIO
#define CONFIG_UART_MCUX_1_BAUD_RATE NXP_K64F_UART_4006B000_BAUD_RATE
#define CONFIG_UART_MCUX_1_IRQ_PRI NXP_K64F_UART_4006B000_ZEPHYR_IRQ_PRIO
#define CONFIG_UART_MCUX_2_BAUD_RATE NXP_K64F_UART_4006C000_BAUD_RATE
#define CONFIG_UART_MCUX_2_IRQ_PRI NXP_K64F_UART_4006C000_ZEPHYR_IRQ_PRIO
#define CONFIG_UART_MCUX_3_BAUD_RATE NXP_K64F_UART_4006D000_BAUD_RATE
#define CONFIG_UART_MCUX_3_IRQ_PRI NXP_K64F_UART_4006D000_ZEPHYR_IRQ_PRIO
#define CONFIG_UART_MCUX_4_BAUD_RATE NXP_K64F_UART_400EA000_BAUD_RATE
#define CONFIG_UART_MCUX_4_IRQ_PRI NXP_K64F_UART_400EA000_ZEPHYR_IRQ_PRIO
#define CONFIG_UART_MCUX_5_BAUD_RATE NXP_K64F_UART_400EB000_BAUD_RATE
#define CONFIG_UART_MCUX_5_IRQ_PRI NXP_K64F_UART_400EB000_ZEPHYR_IRQ_PRIO