#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

if ARCH_CHIP_BCM2708

comment "BCM2708 Configuration Options"

choice
	prompt "BCM2708 Chip Selection"
	default ARCH_CHIP_BCM2835

config ARCH_CHIP_BCM2835
	bool "Broadcom BCM2835"

endchoice # BCM2708 Configuration Option

menu "BCM2708 Peripheral Selections"

config BCM2708_MINI_UART
	bool "Mini-UART"

config BCM2708_PL011_UART
	bool "PL011 UART"

config BCM2708_SPI1
	bool "SPI1"

config BCM2708_SPI2
	bool "SPI2"

endmenu # BCM2708 Peripheral Selections

menu "BCM2708 UART Configuration"
	depends on BCM2708_MINI_UART || BCM2708_PL011_UART

menu "BCM2708 Mini-UART Configuration"
	depends on BCM2708_MINI_UART

config BCM2708_MINI_UART_RXBUFSIZE
	int "Receive buffer size"
	default 256
	---help---
		Characters are buffered as they are received. This specifies
		the size of the receive buffer.

config BCM2708_MINI_UART_TXBUFSIZE
	int "Transmit buffer size"
	default 256
	---help---
		Characters are buffered before being sent.  This specifies
		the size of the transmit buffer.

config BCM2708_MINI_UART_BAUD
	int "BAUD rate"
	default 115200
	---help---
		The configured BAUD of the UART.

config BCM2708_MINI_UART_BITS
	int "Character size"
	default 8
	---help---
		The number of bits.  Must be either 7 or 8.

config BCM2708_MINI_UART_PARITY
	int "Parity setting"
	range 0 2
	default 0
	---help---
		0=no parity, 1=odd parity, 2=even parity

config BCM2708_MINI_UART_2STOP
	int "use 2 stop bits"
	default 0
	---help---
		1=Two stop bits

config BCM2708_MINI_UART_IFLOWCONTROL
	bool "Mini-UART RTS flow control"
	default n
	select SERIAL_IFLOWCONTROL
	---help---
		Enable BCM2708_MINI_UART RTS flow control

config BCM2708_MINI_UART_OFLOWCONTROL
	bool "Mini-UART CTS flow control"
	default n
	select SERIAL_OFLOWCONTROL
	---help---
		Enable BCM2708_MINI_UART CTS flow control

config BCM2708_MINI_UART_BREAKS
	bool "Break support"
	default n
	---help---
		Support BSD style BREAK IOCTL commands

endmenu # BCM2708 Mini-UART Configuration

menu "BCM2708 PL011 UART Configuration"
	depends on BCM2708_PL011_UART

config BCM2708_PL011_UART_RXBUFSIZE
	int "Receive buffer size"
	default 256
	---help---
		Characters are buffered as they are received. This specifies
		the size of the receive buffer.

config BCM2708_PL011_UART_TXBUFSIZE
	int "Transmit buffer size"
	default 256
	---help---
		Characters are buffered before being sent.  This specifies
		the size of the transmit buffer.

config BCM2708_PL011_UART_BAUD
	int "BAUD rate"
	default 115200
	---help---
		The configured BAUD of the UART.

config BCM2708_PL011_UART_BITS
	int "Character size"
	default 8
	---help---
		The number of bits.  Must be either 7 or 8.

config BCM2708_PL011_UART_PARITY
	int "Parity setting"
	range 0 2
	default 0
	---help---
		0=no parity, 1=odd parity, 2=even parity

config BCM2708_PL011_UART_2STOP
	int "use 2 stop bits"
	default 0
	---help---
		1=Two stop bits

config BCM2708_PL011_UART_IFLOWCONTROL
	bool "UART RTS flow control"
	default n
	select SERIAL_IFLOWCONTROL
	---help---
		Enable UART RTS flow control. CD, DSR, DTR, and RI are not supported.

config BCM2708_PL011_UART_OFLOWCONTROL
	bool "UART CTS flow control"
	default n
	select SERIAL_OFLOWCONTROL
	---help---
		Enable UART CTS flow control. CD, DSR, DTR, and RI are not supported.

endmenu # BCM2708 PL011 UART Configuration

choice
	prompt "BCM2708 Serial Console"
	default BCM2708_NO_SERIAL_CONSOLE
	depends on DEV_CONSOLE

config BCM2708_MINI_UART_SERIAL_CONSOLE
	bool "Use Mini-UART as the serial console"
	depends on BCM2708_MINI_UART
	select OTHER_SERIAL_CONSOLE
	---help---
		Use the Mini-UART as the serial console

config BCM2708_PL011_UART_SERIAL_CONSOLE
	bool "Use PO011 UART as the serial console"
	depends on BCM2708_PL011_UART
	select OTHER_SERIAL_CONSOLE
	---help---
		Use the PO011 UART as the serial console

config BCM2708_NO_SERIAL_CONSOLE
	bool "No serial console"
	---help---
		No serial based console

endchoice # BCM2708 Serial Console
endmenu # BCM2708 UART Configuration

config BCM2708_GPIO_IRQ
	bool "GPIO pin interrupts"
	---help---
		Enable support for interrupting GPIO pins

endif # ARCH_CHIP_BCM2708
