if ARCH_MXS

menu "Freescale i.MXS implementations"

choice
	prompt "Select i.MXS chip family"

config ARCH_MX28
	bool "Freescale MX28"
	select CPU_ARM926T
	select FIQ
	select MXS_ICOLL
	select MXS_DMA_ENGINE
	select MXS_AUART_DMA_SUPPORT
	select ARCH_HAS_CPUFREQ
	---help---
	 Support Freescale MX28 chips

config ARCH_MX23
	bool "Freescale MX23"
	select CPU_ARM926T
	select FIQ
	select ZONE_DMA
	select MXS_ICOLL
	select MXS_DMA_ENGINE
	select MXS_AUART_DMA_SUPPORT
	select ARCH_HAS_CPUFREQ
	---help---
	Support Freescale MX23 chips

endchoice

if ARCH_MX28
source arch/arm/mach-mx28/Kconfig
endif

if ARCH_MX23
source arch/arm/mach-mx23/Kconfig
endif

config DMA_ZONE
	bool "Add a DMA zone"
	default y
	select ZONE_DMA
	help
	  Create a zone to reserve memory for DMA.

config DMA_ZONE_SIZE
	int "DMA memory zone size"
	depends on ZONE_DMA
	range 0 32
	default 16
	help
	    This is the size in MB for the DMA zone. The DMA zone is used for
	    dedicated memory for large contiguous video buffers

config MXS_CONSISTENT_DMA_SIZE
	int "Consistent DMA memory size (MB)"
	range 2 32
	default 32
	help
	  Set the DMA consistent memory size according to your video
	  memory needs, for example if you want to use multiple planes.
	  The size must be 2MB aligned.

endmenu

config MXS_ICOLL
	bool

config MXS_EARLY_CONSOLE
	bool "Enable console early"
	default y
	help
	  Enable console early for kernel debug.

config MXS_DMA_ENGINE
	bool "Enable DMA ENGINE support"
	default y
	help
	  Support DMA controller on AHB-APBH and AHB-APBX Bridge

config MXS_LRADC
	bool "Low Resolution ADC support"
	default y
	depends on ARCH_MXS
	help
	  Enable LRADC support

config MXS_PWM_CHANNELS
	int
	default 8
	help
	  The number of pwm channel on Freescale MXS platform.

menu "Freescale Application UART"

config MXS_AUART_DMA_SUPPORT
	bool
	depends on MXS_DMA_ENGINE
	default y

config MXS_AUART_PORTS
	int
	default 5

config MXS_AUART0_DEVICE_ENABLE
	bool "Application uart 0 enabled"
	depends on !MODULE_CCARDXMX28 || BT
	default y
	help
	  Enable application uart 0

choice
	prompt "Select the mode:"
	default MXS_AUART0_2WIRE
	depends on MXS_AUART0_DEVICE_ENABLE

config MXS_AUART0_2WIRE
	bool "2 wire (RX, TX)"

config MXS_AUART0_4WIRE
	bool "4 wire (RX, TX, CTS, RTS)"
endchoice

config MXS_AUART0_GPIO_CTS_RTS
	bool "Application uart 0 CTS/RTS on GPIO pins"
	depends on MXS_AUART0_DEVICE_ENABLE && MXS_AUART0_4WIRE
	default n

config MXS_AUART0_GPIO_CTS_PIN
	int "Application uart 0 GPIO CTS pin"
	depends on MXS_AUART0_GPIO_CTS_RTS
	default -1
	help
	  The default pin is unconfigured.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART0_GPIO_RTS_PIN
	int "Application uart 0 GPIO RTS pin"
	depends on MXS_AUART0_GPIO_CTS_RTS
	default -1
	help
	  The default pin is unconfigured.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART0_DMA_ENABLE
	bool "Set application uart 0 to dma mode"
	default n
	depends on MXS_AUART_DMA_SUPPORT && MXS_AUART0_DEVICE_ENABLE
	help
	  Set application uart 0 to dma mode

config MXS_AUART1_DEVICE_ENABLE
	bool "Application uart 1 enabled"
	default y
	help
	  Enable application uart 1

choice
	prompt "Select the mode:"
	default MXS_AUART1_2WIRE
	depends on MXS_AUART1_DEVICE_ENABLE

config MXS_AUART1_2WIRE
	bool "2 wire (RX, TX)"

config MXS_AUART1_4WIRE
	bool "4 wire (RX, TX, CTS, RTS)"
endchoice

config MXS_AUART1_GPIO_CTS_RTS
	bool "Application uart 1 CTS/RTS on GPIO pins"
	depends on MXS_AUART1_DEVICE_ENABLE && MXS_AUART1_4WIRE
	default n

config MXS_AUART1_GPIO_CTS_PIN
	int "Application uart 1 GPIO CTS pin"
	depends on MXS_AUART1_GPIO_CTS_RTS
	default 49
	help
	  The default pin is GPIO1_17.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART1_GPIO_RTS_PIN
	int "Application uart 1 GPIO RTS pin"
	depends on MXS_AUART1_GPIO_CTS_RTS
	default 54
	help
	  The default pin is GPIO1_22.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART1_DMA_ENABLE
	bool "Set application uart 1 to dma mode"
	default n
	depends on MXS_AUART_DMA_SUPPORT && MXS_AUART1_DEVICE_ENABLE
	help
	  Set application uart 1 to dma mode

config MXS_AUART2_DEVICE_ENABLE
	bool "Application uart 2 enabled"
	default y
	help
	  Enable application uart 2

choice
	prompt "Select the mode:"
	default MXS_AUART2_2WIRE
	depends on MXS_AUART2_DEVICE_ENABLE

config MXS_AUART2_2WIRE
	bool "2 wire (RX, TX)"

config MXS_AUART2_4WIRE
	bool "4 wire (RX, TX, CTS, RTS)"
endchoice

config MXS_AUART2_GPIO_CTS_RTS
	bool "Application uart 2 CTS/RTS on GPIO pins"
	depends on MXS_AUART2_DEVICE_ENABLE && MXS_AUART2_4WIRE
	default n

config MXS_AUART2_GPIO_CTS_PIN
	int "Application uart 2 GPIO CTS pin"
	depends on MXS_AUART2_GPIO_CTS_RTS
	default -1
	help
	  The default pin is unconfigured.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART2_GPIO_RTS_PIN
	int "Application uart 2 GPIO RTS pin"
	depends on MXS_AUART2_GPIO_CTS_RTS
	default -1
	help
	  The default pin is unconfigured.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART2_DMA_ENABLE
	bool "Set application uart 2 to dma mode"
	default n
	depends on MXS_AUART_DMA_SUPPORT && MXS_AUART2_DEVICE_ENABLE
	help
	  Set application uart 2 to dma mode

config MXS_AUART3_DEVICE_ENABLE
	bool "Application uart 3 enabled"
	default y
	help
	  Enable application uart 3

choice
	prompt "Select the mode:"
	default MXS_AUART3_2WIRE
	depends on MXS_AUART3_DEVICE_ENABLE

config MXS_AUART3_2WIRE
	bool "2 wire (RX, TX)"

config MXS_AUART3_4WIRE
	bool "4 wire (RX, TX, CTS, RTS)"
endchoice

config MXS_AUART3_GPIO_CTS_RTS
	bool "Application uart 3 CTS/RTS on GPIO pins"
	depends on MXS_AUART3_DEVICE_ENABLE && MXS_AUART3_4WIRE
	default n

config MXS_AUART3_GPIO_CTS_PIN
	int "Application uart 3 GPIO CTS pin"
	depends on MXS_AUART3_GPIO_CTS_RTS
	default 113
	help
	  The default pin is GPIO3_17.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART3_GPIO_RTS_PIN
	int "Application uart 3 GPIO RTS pin"
	depends on MXS_AUART3_GPIO_CTS_RTS
	default 98
	help
	  The default pin is GPIO3_2.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART3_DMA_ENABLE
	bool "Set application uart 3 to dma mode"
	default n
	depends on MXS_AUART_DMA_SUPPORT && MXS_AUART3_DEVICE_ENABLE
	help
	  Set application uart 3 to dma mode

config MXS_AUART4_DEVICE_ENABLE
	bool "Application uart 4 enabled"
	default y
	help
	  Enable application uart 4

choice
	prompt "Select the mode:"
	default MXS_AUART4_2WIRE
	depends on MXS_AUART4_DEVICE_ENABLE

config MXS_AUART4_2WIRE
	bool "2 wire (RX, TX)"

config MXS_AUART4_4WIRE
	bool "4 wire (RX, TX, CTS, RTS)"
endchoice

config MXS_AUART4_GPIO_CTS_RTS
	bool "Application uart 4 CTS/RTS on GPIO pins"
	depends on MXS_AUART4_DEVICE_ENABLE && MXS_AUART4_4WIRE
	default n

config MXS_AUART4_GPIO_CTS_PIN
	int "Application uart 4 GPIO CTS pin"
	depends on MXS_AUART4_GPIO_CTS_RTS
	default -1
	help
	  The default pin is unconfigured.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART4_GPIO_RTS_PIN
	int "Application uart 4 GPIO RTS pin"
	depends on MXS_AUART4_GPIO_CTS_RTS
	default -1
	help
	  The default pin is unconfigured.
	  Refer to arch/arm/plat-mxs/include/mach/pinctrl.h for pin mapping.

config MXS_AUART4_DMA_ENABLE
	bool "Set application uart 4 to dma mode"
	default n
	depends on MXS_AUART_DMA_SUPPORT && MXS_AUART4_DEVICE_ENABLE
	help
	  Set application uart 4 to dma mode

endmenu

endif
