提交 2d66c780 编写于 作者: E Eric Bénard 提交者: Sascha Hauer

cpuimx27 and mbimx27: allow fine control of UART4 and SDHC2 usage

Signed-off-by: NEric Bénard <eric@eukrea.com>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 a465242e
...@@ -67,9 +67,16 @@ config MACH_EUKREA_CPUIMX27_USESDHC2 ...@@ -67,9 +67,16 @@ config MACH_EUKREA_CPUIMX27_USESDHC2
bool "CPUIMX27 integrates SDHC2 module" bool "CPUIMX27 integrates SDHC2 module"
depends on MACH_CPUIMX27 depends on MACH_CPUIMX27
help help
This adds support for the internal SDHC2 used on CPUIMX27 used This adds support for the internal SDHC2 used on CPUIMX27
for wifi or eMMC. for wifi or eMMC.
config MACH_EUKREA_CPUIMX27_USEUART4
bool "CPUIMX27 integrates UART4 module"
depends on MACH_CPUIMX27
help
This adds support for the internal UART4 used on CPUIMX27
for bluetooth.
choice choice
prompt "Baseboard" prompt "Baseboard"
depends on MACH_CPUIMX27 depends on MACH_CPUIMX27
......
...@@ -50,10 +50,12 @@ static int eukrea_mbimx27_pins[] = { ...@@ -50,10 +50,12 @@ static int eukrea_mbimx27_pins[] = {
PE10_PF_UART3_CTS, PE10_PF_UART3_CTS,
PE11_PF_UART3_RTS, PE11_PF_UART3_RTS,
/* UART4 */ /* UART4 */
#if !defined(MACH_EUKREA_CPUIMX27_USEUART4)
PB26_AF_UART4_RTS, PB26_AF_UART4_RTS,
PB28_AF_UART4_TXD, PB28_AF_UART4_TXD,
PB29_AF_UART4_CTS, PB29_AF_UART4_CTS,
PB31_AF_UART4_RXD, PB31_AF_UART4_RXD,
#endif
/* SDHC1*/ /* SDHC1*/
PE18_PF_SD1_D0, PE18_PF_SD1_D0,
PE19_PF_SD1_D1, PE19_PF_SD1_D1,
...@@ -229,6 +231,9 @@ static struct imxuart_platform_data uart_pdata[] = { ...@@ -229,6 +231,9 @@ static struct imxuart_platform_data uart_pdata[] = {
{ {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}, },
{
.flags = IMXUART_HAVE_RTSCTS,
},
}; };
#if defined(CONFIG_TOUCHSCREEN_ADS7846) #if defined(CONFIG_TOUCHSCREEN_ADS7846)
...@@ -293,6 +298,9 @@ void __init eukrea_mbimx27_baseboard_init(void) ...@@ -293,6 +298,9 @@ void __init eukrea_mbimx27_baseboard_init(void)
mxc_register_device(&mxc_uart_device1, &uart_pdata[0]); mxc_register_device(&mxc_uart_device1, &uart_pdata[0]);
mxc_register_device(&mxc_uart_device2, &uart_pdata[1]); mxc_register_device(&mxc_uart_device2, &uart_pdata[1]);
#if !defined(MACH_EUKREA_CPUIMX27_USEUART4)
mxc_register_device(&mxc_uart_device3, &uart_pdata[2]);
#endif
mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data); mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data);
mxc_register_device(&mxc_sdhc_device0, NULL); mxc_register_device(&mxc_sdhc_device0, NULL);
......
...@@ -49,10 +49,12 @@ static int eukrea_cpuimx27_pins[] = { ...@@ -49,10 +49,12 @@ static int eukrea_cpuimx27_pins[] = {
PE14_PF_UART1_CTS, PE14_PF_UART1_CTS,
PE15_PF_UART1_RTS, PE15_PF_UART1_RTS,
/* UART4 */ /* UART4 */
#if defined(MACH_EUKREA_CPUIMX27_USEUART4)
PB26_AF_UART4_RTS, PB26_AF_UART4_RTS,
PB28_AF_UART4_TXD, PB28_AF_UART4_TXD,
PB29_AF_UART4_CTS, PB29_AF_UART4_CTS,
PB31_AF_UART4_RXD, PB31_AF_UART4_RXD,
#endif
/* FEC */ /* FEC */
PD0_AIN_FEC_TXD0, PD0_AIN_FEC_TXD0,
PD1_AIN_FEC_TXD1, PD1_AIN_FEC_TXD1,
...@@ -76,12 +78,14 @@ static int eukrea_cpuimx27_pins[] = { ...@@ -76,12 +78,14 @@ static int eukrea_cpuimx27_pins[] = {
PD17_PF_I2C_DATA, PD17_PF_I2C_DATA,
PD18_PF_I2C_CLK, PD18_PF_I2C_CLK,
/* SDHC2 */ /* SDHC2 */
#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2)
PB4_PF_SD2_D0, PB4_PF_SD2_D0,
PB5_PF_SD2_D1, PB5_PF_SD2_D1,
PB6_PF_SD2_D2, PB6_PF_SD2_D2,
PB7_PF_SD2_D3, PB7_PF_SD2_D3,
PB8_PF_SD2_CMD, PB8_PF_SD2_CMD,
PB9_PF_SD2_CLK, PB9_PF_SD2_CLK,
#endif
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
/* Quad UART's IRQ */ /* Quad UART's IRQ */
GPIO_PORTD | 22 | GPIO_GPIO | GPIO_IN, GPIO_PORTD | 22 | GPIO_GPIO | GPIO_IN,
...@@ -202,6 +206,8 @@ static void __init eukrea_cpuimx27_init(void) ...@@ -202,6 +206,8 @@ static void __init eukrea_cpuimx27_init(void)
#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2)
/* SDHC2 can be used for Wifi */ /* SDHC2 can be used for Wifi */
mxc_register_device(&mxc_sdhc_device1, NULL); mxc_register_device(&mxc_sdhc_device1, NULL);
#endif
#if defined(MACH_EUKREA_CPUIMX27_USEUART4)
/* in which case UART4 is also used for Bluetooth */ /* in which case UART4 is also used for Bluetooth */
mxc_register_device(&mxc_uart_device3, &uart_pdata[1]); mxc_register_device(&mxc_uart_device3, &uart_pdata[1]);
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册