drivers/serial: Make nRF5 UART pin configuration board-specific
The exact pin numbers for the nRF5 UART configuration is board-specific, so the Kconfig default values should be in a board-specific file. Change-Id: Ibaacde292db191221e32b3626c68bf972dd26016 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
641944283d
commit
b1d5ae72e3
6 changed files with 36 additions and 8 deletions
|
@ -11,8 +11,6 @@ CONFIG_XIP=y
|
|||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_NRF5=y
|
||||
CONFIG_UART_NRF5_GPIO_TX_PIN=13
|
||||
CONFIG_UART_NRF5_GPIO_RX_PIN=15
|
||||
|
||||
# enable console
|
||||
CONFIG_CONSOLE=y
|
||||
|
|
|
@ -30,6 +30,18 @@ config GPIO_NRF5
|
|||
config GPIO_NRF5_P0
|
||||
default y
|
||||
|
||||
config UART_NRF5_GPIO_TX_PIN
|
||||
default 13
|
||||
|
||||
config UART_NRF5_GPIO_RX_PIN
|
||||
default 15
|
||||
|
||||
config UART_NRF5_GPIO_RTS_PIN
|
||||
default 12
|
||||
|
||||
config UART_NRF5_GPIO_CTS_PIN
|
||||
default 14
|
||||
|
||||
endif # UART_NRF5
|
||||
|
||||
endif # BOARD_96B_NITROGEN
|
||||
|
|
|
@ -30,6 +30,18 @@ config GPIO_NRF5
|
|||
config GPIO_NRF5_P0
|
||||
default y
|
||||
|
||||
config UART_NRF5_GPIO_TX_PIN
|
||||
default 9
|
||||
|
||||
config UART_NRF5_GPIO_RX_PIN
|
||||
default 11
|
||||
|
||||
config UART_NRF5_GPIO_RTS_PIN
|
||||
default 8
|
||||
|
||||
config UART_NRF5_GPIO_CTS_PIN
|
||||
default 10
|
||||
|
||||
endif # UART_NRF5
|
||||
|
||||
endif # BOARD_NRF51_PCA10028
|
||||
|
|
|
@ -7,8 +7,6 @@ CONFIG_BOARD_NRF51_PCA10028=y
|
|||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_NRF5=y
|
||||
CONFIG_UART_NRF5_GPIO_TX_PIN=9
|
||||
CONFIG_UART_NRF5_GPIO_RX_PIN=11
|
||||
|
||||
# enable console
|
||||
CONFIG_CONSOLE=y
|
||||
|
|
|
@ -30,6 +30,18 @@ config GPIO_NRF5
|
|||
config GPIO_NRF5_P0
|
||||
default y
|
||||
|
||||
config UART_NRF5_GPIO_TX_PIN
|
||||
default 6
|
||||
|
||||
config UART_NRF5_GPIO_RX_PIN
|
||||
default 8
|
||||
|
||||
config UART_NRF5_GPIO_RTS_PIN
|
||||
default 5
|
||||
|
||||
config UART_NRF5_GPIO_CTS_PIN
|
||||
default 7
|
||||
|
||||
endif # UART_NRF5
|
||||
|
||||
endif # BOARD_NRF52_PCA10040
|
||||
|
|
|
@ -68,7 +68,6 @@ config UART_NRF5_FLOW_CONTROL
|
|||
config UART_NRF5_GPIO_TX_PIN
|
||||
int "TX Pin Number"
|
||||
range 0 31
|
||||
default 6
|
||||
depends on UART_NRF5
|
||||
depends on GPIO_NRF5
|
||||
help
|
||||
|
@ -77,7 +76,6 @@ config UART_NRF5_GPIO_TX_PIN
|
|||
config UART_NRF5_GPIO_RX_PIN
|
||||
int "RX Pin Number"
|
||||
range 0 31
|
||||
default 8
|
||||
depends on UART_NRF5
|
||||
depends on GPIO_NRF5
|
||||
help
|
||||
|
@ -86,7 +84,6 @@ config UART_NRF5_GPIO_RX_PIN
|
|||
config UART_NRF5_GPIO_RTS_PIN
|
||||
int "RTS Pin Number"
|
||||
range 0 31
|
||||
default 5
|
||||
depends on UART_NRF5
|
||||
depends on GPIO_NRF5
|
||||
depends on UART_NRF5_FLOW_CONTROL
|
||||
|
@ -96,7 +93,6 @@ config UART_NRF5_GPIO_RTS_PIN
|
|||
config UART_NRF5_GPIO_CTS_PIN
|
||||
int "CTS Pin Number"
|
||||
range 0 31
|
||||
default 7
|
||||
depends on UART_NRF5
|
||||
depends on GPIO_NRF5
|
||||
depends on UART_NRF5_FLOW_CONTROL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue