Kinetis:Add LPUART for use with K66

Add LPUART made UART5 an uption as the K66 does not have UART5
This commit is contained in:
David Sidrane
2017-02-23 18:55:39 -10:00
parent 61b10c5e58
commit 29ab603a66
+218
View File
@@ -220,27 +220,60 @@ config ARCH_CHIP_MK66FN2M0VLQ18
endchoice
# These "hidden" settings determine is a peripheral option is available for
# the selection MCU
config KINETIS_HAVE_UART5
bool
default n
config KINETIS_HAVE_LPUART0
bool
default n
config KINETIS_HAVE_LPUART1
bool
default n
# When there are multiple instances of a device, these "hidden" settings
# will automatically be selected and will represent the 'OR' of the
# instances selected.
config KINETIS_LPUART
bool
default n
config KINETIS_UART
bool
default n
select MCU_SERIAL
# Chip families
config ARCH_FAMILY_K20
bool
default n
select KINETIS_HAVE_UART5
config ARCH_FAMILY_K40
bool
default n
select KINETIS_HAVE_UART5
config ARCH_FAMILY_K60
bool
default n
select KINETIS_HAVE_UART5
config ARCH_FAMILY_K64
bool
default n
select KINETIS_HAVE_UART5
config ARCH_FAMILY_K66
bool
default n
select KINETIS_HAVE_LPUART0
menu "Kinetis Peripheral Support"
@@ -280,6 +313,7 @@ config KINETIS_UART0
bool "UART0"
default n
select UART0_SERIALDRIVER
select KINETIS_UART
---help---
Support UART0
@@ -287,6 +321,7 @@ config KINETIS_UART1
bool "UART1"
default n
select UART1_SERIALDRIVER
select KINETIS_UART
---help---
Support UART1
@@ -294,6 +329,7 @@ config KINETIS_UART2
bool "UART2"
default n
select UART2_SERIALDRIVER
select KINETIS_UART
---help---
Support UART2
@@ -301,6 +337,7 @@ config KINETIS_UART3
bool "UART3"
default n
select UART3_SERIALDRIVER
select KINETIS_UART
---help---
Support UART3
@@ -308,16 +345,37 @@ config KINETIS_UART4
bool "UART4"
default n
select UART4_SERIALDRIVER
select KINETIS_UART
---help---
Support UART4
config KINETIS_UART5
bool "UART5"
default n
depends on KINETIS_HAVE_UART5
select UART5_SERIALDRIVER
select KINETIS_UART
---help---
Support UART5
config KINETIS_LPUART0
bool "Low power LPUART0"
default n
depends on KINETIS_HAVE_LPUART0
select OTHER_UART_SERIALDRIVER
select KINETIS_LPUART
---help---
Support the low power UART0
config KINETIS_LPUART1
bool "Low power LPUART1"
default n
depends on KINETIS_HAVE_LPUART1
select OTHER_UART_SERIALDRIVER
select KINETIS_LPUART
---help---
Support the low power UART1
config KINETIS_ENET
bool "Ethernet"
default n
@@ -839,6 +897,10 @@ config KINETIS_SD4BIT_FREQ
endif
endmenu # Kinetis SDHC Configuration
#
# MCU serial peripheral driver?
#
menu "Kinetis UART Configuration"
config KINETIS_UARTFIFOS
@@ -847,3 +909,159 @@ config KINETIS_UARTFIFOS
depends on KINETIS_UART0
endmenu # Kinetis UART Configuration
menu "Kinetis LPUART0 Configuration"
depends on KINETIS_LPUART0
config LPUART0_RXBUFSIZE
int "Receive buffer size"
default 256
---help---
Characters are buffered as they are received. This specifies
the size of the receive buffer.
config LPUART0_TXBUFSIZE
int "Transmit buffer size"
default 256
---help---
Characters are buffered before being sent. This specifies
the size of the transmit buffer.
config LPUART0_BAUD
int "BAUD rate"
default 115200
---help---
The configured BAUD of the UART.
config LPUART0_BITS
int "Character size"
default 8
---help---
The number of bits. Must be either 7 or 8.
config LPUART0_PARITY
int "Parity setting"
range 0 2
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config LPUART0_2STOP
int "use 2 stop bits"
default 0
---help---
1=Two stop bits
config LPUART0_IFLOWCONTROL
bool "LPUART0 RTS flow control"
default n
select SERIAL_IFLOWCONTROL
---help---
Enable LPUART0 RTS flow control
config LPUART0_OFLOWCONTROL
bool "LPUART0 CTS flow control"
default n
select SERIAL_OFLOWCONTROL
---help---
Enable LPUART0 CTS flow control
config LPUART0_DMA
bool "LPUART0 DMA support"
default n
select SERIAL_DMA
---help---
Enable DMA transfers on LPUART0
endmenu # Kinetis LPUART0 Configuration
menu "Kinetis LPUART1 Configuration"
depends on KINETIS_LPUART1
config LPUART1_RXBUFSIZE
int "Receive buffer size"
default 256
---help---
Characters are buffered as they are received. This specifies
the size of the receive buffer.
config LPUART1_TXBUFSIZE
int "Transmit buffer size"
default 256
---help---
Characters are buffered before being sent. This specifies
the size of the transmit buffer.
config LPUART1_BAUD
int "BAUD rate"
default 115200
---help---
The configured BAUD of the UART.
config LPUART1_BITS
int "Character size"
default 8
---help---
The number of bits. Must be either 7 or 8.
config LPUART1_PARITY
int "Parity setting"
range 0 2
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config LPUART1_2STOP
int "use 2 stop bits"
default 0
---help---
1=Two stop bits
config LPUART1_IFLOWCONTROL
bool "LPUART1 RTS flow control"
default n
select SERIAL_IFLOWCONTROL
---help---
Enable LPUART1 RTS flow control
config LPUART1_OFLOWCONTROL
bool "LPUART1 CTS flow control"
default n
select SERIAL_OFLOWCONTROL
---help---
Enable LPUART1 CTS flow control
config LPUART1_DMA
bool "LPUART1 DMA support"
default n
select SERIAL_DMA
---help---
Enable DMA transfers on LPUART1
endmenu # Kinetis LPUART1 Configuration
choice
prompt "Kinetis LPUART Serial Console"
default NO_LPUART_SERIAL_CONSOLE
depends on DEV_CONSOLE && KINETIS_LPUART
config LPUART0_SERIAL_CONSOLE
bool "Use LPUART0 as the serial console"
depends on KINETIS_LPUART0
select OTHER_SERIAL_CONSOLE
---help---
Use the LPUART0 device as the serial console
config LPUART1_SERIAL_CONSOLE
bool "Use LPUART1 as the serial console"
depends on KINETIS_LPUART1
select OTHER_SERIAL_CONSOLE
---help---
Use the LPUART1 device as the serial console
config NO_LPUART_SERIAL_CONSOLE
bool "No LPUART serial console"
---help---
No serial LPUART based console OR some other serial device provides the serial console
endchoice # Kinetis LPUART Serial Console