static int csi_enabled;
+#define SXSDMAN_BLUETOOTH_ENABLE
+
static iomux_v3_cfg_t mx6sl_brd_csi_enable_pads[] = {
MX6SL_PAD_EPDC_GDRL__CSI_MCLK,
MX6SL_PAD_EPDC_SDCE3__I2C3_SDA,
MX6SL_PAD_EPDC_SDOE__GPIO_1_25, /* CMOS_PWDN GPIO */
};
+#ifdef SXSDMAN_BLUETOOTH_ENABLE
+static iomux_v3_cfg_t mx6sl_uart4_pads[] = {
+ MX6SL_PAD_SD1_DAT4__UART4_RXD,
+ MX6SL_PAD_SD1_DAT5__UART4_TXD,
+ MX6SL_PAD_SD1_DAT6__UART4_RTS,
+ MX6SL_PAD_SD1_DAT7__UART4_CTS,
+ /* gpio for reset */
+ MX6SL_PAD_SD1_DAT0__GPIO_5_11,
+};
+#else
/* uart2 pins */
static iomux_v3_cfg_t mx6sl_uart2_pads[] = {
MX6SL_PAD_SD2_DAT5__UART2_TXD,
MX6SL_PAD_SD2_DAT6__UART2_RTS,
MX6SL_PAD_SD2_DAT7__UART2_CTS,
};
+#endif
enum sd_pad_mode {
SD_PAD_MODE_LOW_SPEED,
void __init early_console_setup(unsigned long base, struct clk *clk);
+#ifdef SXSDMAN_BLUETOOTH_ENABLE
+static const struct imxuart_platform_data mx6sl_evk_uart4_data __initconst = {
+ .flags = IMXUART_HAVE_RTSCTS,
+ .dma_req_rx = MX6Q_DMA_REQ_UART4_RX,
+ .dma_req_tx = MX6Q_DMA_REQ_UART4_TX,
+};
+#else
static const struct imxuart_platform_data mx6sl_evk_uart1_data __initconst = {
.flags = IMXUART_HAVE_RTSCTS | IMXUART_SDMA,
.dma_req_rx = MX6Q_DMA_REQ_UART2_RX,
.dma_req_tx = MX6Q_DMA_REQ_UART2_TX,
};
+#endif
static inline void mx6_evk_init_uart(void)
{
writel(value | 0x60, mx6_snvs_base + SNVS_LPCR);
}
+#ifdef SXSDMAN_BLUETOOTH_ENABLE
+static int uart4_enabled;
+static int __init uart4_setup(char * __unused)
+{
+ uart4_enabled = 1;
+ return 1;
+}
+__setup("bluetooth", uart4_setup);
+
+static void __init uart4_init(void)
+{
+ mxc_iomux_v3_setup_multiple_pads(mx6sl_uart4_pads,
+ ARRAY_SIZE(mx6sl_uart4_pads));
+ imx6sl_add_imx_uart(3, &mx6sl_evk_uart4_data);
+}
+#else
static int uart2_enabled;
static int __init uart2_setup(char * __unused)
{
ARRAY_SIZE(mx6sl_uart2_pads));
imx6sl_add_imx_uart(1, &mx6sl_evk_uart1_data);
}
+#endif
static void mx6sl_evk_bt_reset(void)
{
imx6q_init_audio();
/* uart2 for bluetooth */
+#ifdef SXSDMAN_BLUETOOTH_ENABLE
+ if (uart4_enabled)
+ uart4_init();
+#else
if (uart2_enabled)
uart2_init();
+#endif
mxc_register_device(&mxc_bt_rfkill, &mxc_bt_rfkill_data);