Skip to content

Commit

Permalink
boards: arm: Add support for NXP FRDM-K22F board
Browse files Browse the repository at this point in the history
This adds support for NXP's Freedom K22 board.

Co-authored-by: Sean Nyekjaer <[email protected]>
Co-authored-by: Tom Burdick <[email protected]>
Signed-off-by: Tom Burdick <[email protected]>
  • Loading branch information
2 people authored and galak committed Sep 25, 2019
1 parent 6a708e6 commit 45c7783
Show file tree
Hide file tree
Showing 12 changed files with 731 additions and 0 deletions.
11 changes: 11 additions & 0 deletions boards/arm/frdm_k22f/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Copyright (c) 2019, Prevas A/S
#
# SPDX-License-Identifier: Apache-2.0
#

if(CONFIG_PINMUX_MCUX)
zephyr_library()
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_sources(pinmux.c)
endif()
11 changes: 11 additions & 0 deletions boards/arm/frdm_k22f/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Kconfig - FRDM-K22F board
#
# Copyright (c) 2018, Prevas A/S
#
# SPDX-License-Identifier: Apache-2.0
#

config BOARD_FRDM_K22F
bool "NXP FRDM-K22F"
depends on SOC_SERIES_KINETIS_K2X
select SOC_PART_NUMBER_MK22FN512VLH12
98 changes: 98 additions & 0 deletions boards/arm/frdm_k22f/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Kconfig - FRDM-K22F board
#
# Copyright (c) 2018 Prevas A/S
#
# SPDX-License-Identifier: Apache-2.0
#

if BOARD_FRDM_K22F

config BOARD
default "frdm_k22f"

config OSC_XTAL0_FREQ
default 8000000

config MCG_PRDIV0
default 0x3

config MCG_VDIV0
default 0xc

config MCG_FCRDIV
default 0

if UART_MCUX

config UART_MCUX_1
default y if UART_CONSOLE

endif # UART_MCUX

if PINMUX_MCUX

config PINMUX_MCUX_PORTA
default y

config PINMUX_MCUX_PORTB
default y

config PINMUX_MCUX_PORTC
default y

config PINMUX_MCUX_PORTD
default y

config PINMUX_MCUX_PORTE
default y if UART_MCUX_1

endif # PINMUX_MCUX

if GPIO_MCUX

config GPIO_MCUX_PORTA
default y

config GPIO_MCUX_PORTB
default y

config GPIO_MCUX_PORTC
default y

config GPIO_MCUX_PORTD
default y

config GPIO_MCUX_PORTE
default y

endif # GPIO_MCUX

if I2C

config I2C_0
default y

endif # I2C

if ADC

config ADC_0
default y

endif # ADC

if PWM_MCUX_FTM

config PWM_3
default y

endif # PWM_MCUX_FTM

if SPI

config SPI_0
default y

endif # SPI

endif # BOARD_FRDM_K22F
18 changes: 18 additions & 0 deletions boards/arm/frdm_k22f/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: Apache-2.0

set_ifndef(OPENSDA_FW daplink)

if(OPENSDA_FW STREQUAL jlink)
set_ifndef(BOARD_DEBUG_RUNNER jlink)
set_ifndef(BOARD_FLASH_RUNNER jlink)
elseif(OPENSDA_FW STREQUAL daplink)
set_ifndef(BOARD_DEBUG_RUNNER pyocd)
set_ifndef(BOARD_FLASH_RUNNER pyocd)
endif()

board_runner_args(jlink "--device=MK22FN512xxx12")
board_runner_args(pyocd "--target=k22f")

include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Binary file added boards/arm/frdm_k22f/doc/frdm_k22f.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 45c7783

Please sign in to comment.