diff options
Diffstat (limited to 'arch/arm/mach-mx6/board-mx6sl_arm2.c')
-rwxr-xr-x | arch/arm/mach-mx6/board-mx6sl_arm2.c | 472 |
1 files changed, 208 insertions, 264 deletions
diff --git a/arch/arm/mach-mx6/board-mx6sl_arm2.c b/arch/arm/mach-mx6/board-mx6sl_arm2.c index 0c5166627320..8f05702e74aa 100755 --- a/arch/arm/mach-mx6/board-mx6sl_arm2.c +++ b/arch/arm/mach-mx6/board-mx6sl_arm2.c @@ -33,7 +33,6 @@ #include <linux/spi/flash.h> #include <linux/i2c.h> #include <linux/i2c/pca953x.h> -#include <linux/ata.h> #include <linux/mtd/mtd.h> #include <linux/mtd/map.h> #include <linux/mtd/partitions.h> @@ -71,67 +70,11 @@ #include "devices-imx6q.h" #include "crm_regs.h" #include "cpu_op-mx6.h" -#include "board-mx6sl_arm2.h" - -#define MX6_ARM2_USBOTG1_PWR IMX_GPIO_NR(4, 0) /* KEY_COL4 */ -#define MX6_ARM2_USBOTG2_PWR IMX_GPIO_NR(4, 2) /* KEY_COL5 */ -#define MX6_ARM2_LCD_PWR_EN IMX_GPIO_NR(4, 3) /* KEY_ROW5 */ -#define MX6_ARM2_SD1_WP IMX_GPIO_NR(4, 6) /* KEY_COL7 */ -#define MX6_ARM2_SD1_CD IMX_GPIO_NR(4, 7) /* KEY_ROW7 */ -#define MX6_ARM2_ECSPI1_CS0 IMX_GPIO_NR(4, 11) /* ECSPI1_SS0 */ -#define MX6_ARM2_HEADPHONE_DET IMX_GPIO_NR(4, 19) /* FEC_RX_ER */ -#define MX6_ARM2_SD2_WP IMX_GPIO_NR(4, 29) /* SD2_DAT6 */ -#define MX6_ARM2_SD2_CD IMX_GPIO_NR(5, 0) /* SD2_DAT7 */ -#define MX6_ARM2_SD3_CD IMX_GPIO_NR(3, 22) /* REF_CLK_32K */ -#define MX6_ARM2_FEC_PWR_EN IMX_GPIO_NR(4, 21) /* FEC_TX_CLK */ - -/* EPDC GPIO pins */ -#define MX6SL_ARM2_EPDC_SDDO_0 IMX_GPIO_NR(1, 7) -#define MX6SL_ARM2_EPDC_SDDO_1 IMX_GPIO_NR(1, 8) -#define MX6SL_ARM2_EPDC_SDDO_2 IMX_GPIO_NR(1, 9) -#define MX6SL_ARM2_EPDC_SDDO_3 IMX_GPIO_NR(1, 10) -#define MX6SL_ARM2_EPDC_SDDO_4 IMX_GPIO_NR(1, 11) -#define MX6SL_ARM2_EPDC_SDDO_5 IMX_GPIO_NR(1, 12) -#define MX6SL_ARM2_EPDC_SDDO_6 IMX_GPIO_NR(1, 13) -#define MX6SL_ARM2_EPDC_SDDO_7 IMX_GPIO_NR(1, 14) -#define MX6SL_ARM2_EPDC_SDDO_8 IMX_GPIO_NR(1, 15) -#define MX6SL_ARM2_EPDC_SDDO_9 IMX_GPIO_NR(1, 16) -#define MX6SL_ARM2_EPDC_SDDO_10 IMX_GPIO_NR(1, 17) -#define MX6SL_ARM2_EPDC_SDDO_11 IMX_GPIO_NR(1, 18) -#define MX6SL_ARM2_EPDC_SDDO_12 IMX_GPIO_NR(1, 19) -#define MX6SL_ARM2_EPDC_SDDO_13 IMX_GPIO_NR(1, 20) -#define MX6SL_ARM2_EPDC_SDDO_14 IMX_GPIO_NR(1, 21) -#define MX6SL_ARM2_EPDC_SDDO_15 IMX_GPIO_NR(1, 22) -#define MX6SL_ARM2_EPDC_GDCLK IMX_GPIO_NR(1, 31) -#define MX6SL_ARM2_EPDC_GDSP IMX_GPIO_NR(2, 2) -#define MX6SL_ARM2_EPDC_GDOE IMX_GPIO_NR(2, 0) -#define MX6SL_ARM2_EPDC_GDRL IMX_GPIO_NR(2, 1) -#define MX6SL_ARM2_EPDC_SDCLK IMX_GPIO_NR(1, 23) -#define MX6SL_ARM2_EPDC_SDOE IMX_GPIO_NR(1, 25) -#define MX6SL_ARM2_EPDC_SDLE IMX_GPIO_NR(1, 24) -#define MX6SL_ARM2_EPDC_SDSHR IMX_GPIO_NR(1, 26) -#define MX6SL_ARM2_EPDC_PWRCOM IMX_GPIO_NR(2, 11) -#define MX6SL_ARM2_EPDC_PWRSTAT IMX_GPIO_NR(2, 13) -#define MX6SL_ARM2_EPDC_PWRCTRL0 IMX_GPIO_NR(2, 7) -#define MX6SL_ARM2_EPDC_PWRCTRL1 IMX_GPIO_NR(2, 8) -#define MX6SL_ARM2_EPDC_PWRCTRL2 IMX_GPIO_NR(2, 9) -#define MX6SL_ARM2_EPDC_PWRCTRL3 IMX_GPIO_NR(2, 10) -#define MX6SL_ARM2_EPDC_BDR0 IMX_GPIO_NR(2, 5) -#define MX6SL_ARM2_EPDC_BDR1 IMX_GPIO_NR(2, 6) -#define MX6SL_ARM2_EPDC_SDCE0 IMX_GPIO_NR(1, 27) -#define MX6SL_ARM2_EPDC_SDCE1 IMX_GPIO_NR(1, 28) -#define MX6SL_ARM2_EPDC_SDCE2 IMX_GPIO_NR(1, 29) -#define MX6SL_ARM2_EPDC_SDCE3 IMX_GPIO_NR(1, 30) -#define MX6SL_ARM2_EPDC_PMIC_WAKE IMX_GPIO_NR(2, 14) /* EPDC_PWRWAKEUP */ -#define MX6SL_ARM2_EPDC_PMIC_INT IMX_GPIO_NR(2, 12) /* EPDC_PWRINT */ -#define MX6SL_ARM2_EPDC_VCOM IMX_GPIO_NR(2, 3) -#define MX6SL_ARM2_ELAN_CE IMX_GPIO_NR(2, 9) -#define MX6SL_ARM2_ELAN_INT IMX_GPIO_NR(2, 10) -#define MX6SL_ARM2_ELAN_RST IMX_GPIO_NR(4, 4) +#include "board-mx6sl_common.h" static int spdc_sel; static int max17135_regulator_init(struct max17135 *max17135); -struct clk *extern_audio_root; +static struct clk *extern_audio_root; extern char *gp_reg_id; extern char *soc_reg_id; @@ -215,8 +158,8 @@ static int plt_sd_pad_change(unsigned int index, int clock) } static const struct esdhc_platform_data mx6_arm2_sd1_data __initconst = { - .cd_gpio = MX6_ARM2_SD1_CD, - .wp_gpio = MX6_ARM2_SD1_WP, + .cd_gpio = MX6_BRD_SD1_CD, + .wp_gpio = MX6_BRD_SD1_WP, .support_8bit = 1, .support_18v = 1, .keep_power_at_suspend = 1, @@ -225,8 +168,8 @@ static const struct esdhc_platform_data mx6_arm2_sd1_data __initconst = { }; static const struct esdhc_platform_data mx6_arm2_sd2_data __initconst = { - .cd_gpio = MX6_ARM2_SD2_CD, - .wp_gpio = MX6_ARM2_SD2_WP, + .cd_gpio = MX6_BRD_SD2_CD, + .wp_gpio = MX6_BRD_SD2_WP, .keep_power_at_suspend = 1, .delay_line = 0, .support_18v = 1, @@ -234,7 +177,7 @@ static const struct esdhc_platform_data mx6_arm2_sd2_data __initconst = { }; static const struct esdhc_platform_data mx6_arm2_sd3_data __initconst = { - .cd_gpio = MX6_ARM2_SD3_CD, + .cd_gpio = MX6_BRD_SD3_CD, .wp_gpio = -1, .keep_power_at_suspend = 1, .delay_line = 0, @@ -377,11 +320,11 @@ static struct max17135_platform_data max17135_pdata __initdata = { .vpos_pwrdn = 2, .gvee_pwrdn = 1, .vneg_pwrdn = 1, - .gpio_pmic_pwrgood = MX6SL_ARM2_EPDC_PWRSTAT, - .gpio_pmic_vcom_ctrl = MX6SL_ARM2_EPDC_VCOM, - .gpio_pmic_wakeup = MX6SL_ARM2_EPDC_PMIC_WAKE, - .gpio_pmic_v3p3 = MX6SL_ARM2_EPDC_PWRCTRL0, - .gpio_pmic_intr = MX6SL_ARM2_EPDC_PMIC_INT, + .gpio_pmic_pwrgood = MX6SL_BRD_EPDC_PWRSTAT, + .gpio_pmic_vcom_ctrl = MX6SL_BRD_EPDC_VCOM, + .gpio_pmic_wakeup = MX6SL_BRD_EPDC_PMIC_WAKE, + .gpio_pmic_v3p3 = MX6SL_BRD_EPDC_PWRCTRL0, + .gpio_pmic_intr = MX6SL_BRD_EPDC_PMIC_INT, .regulator_init = max17135_init_data, .init = max17135_regulator_init, }; @@ -448,7 +391,7 @@ static int __init max17135_regulator_init(struct max17135 *max17135) } static int mx6_arm2_spi_cs[] = { - MX6_ARM2_ECSPI1_CS0, + MX6_BRD_ECSPI1_CS0, }; static const struct spi_imx_master mx6_arm2_spi_data __initconst = { @@ -551,7 +494,7 @@ static struct mxc_audio_platform_data wm8962_data = { .ssi_num = 1, .src_port = 2, .ext_port = 3, - .hp_gpio = MX6_ARM2_HEADPHONE_DET, + .hp_gpio = MX6_BRD_HEADPHONE_DET, .hp_active_low = 1, .mic_gpio = -1, .mic_active_low = 1, @@ -618,7 +561,7 @@ static struct i2c_board_info mxc_i2c0_board_info[] __initdata = { .platform_data = &max17135_pdata, }, { I2C_BOARD_INFO("elan-touch", 0x10), - .irq = gpio_to_irq(MX6SL_ARM2_ELAN_INT), + .irq = gpio_to_irq(MX6SL_BRD_ELAN_INT), }, }; @@ -679,11 +622,11 @@ static int mx6sl_arm2_fec_phy_init(struct phy_device *phydev) int val; /* power on FEC phy and reset phy */ - gpio_request(MX6_ARM2_FEC_PWR_EN, "fec-pwr"); - gpio_direction_output(MX6_ARM2_FEC_PWR_EN, 0); + gpio_request(MX6_BRD_FEC_PWR_EN, "fec-pwr"); + gpio_direction_output(MX6_BRD_FEC_PWR_EN, 0); /* wait RC ms for hw reset */ msleep(1); - gpio_direction_output(MX6_ARM2_FEC_PWR_EN, 1); + gpio_direction_output(MX6_BRD_FEC_PWR_EN, 1); /* check phy power */ val = phy_read(phydev, 0x0); @@ -704,109 +647,109 @@ static int epdc_get_pins(void) int ret = 0; /* Claim GPIOs for EPDC pins - used during power up/down */ - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_0, "epdc_d0"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_1, "epdc_d1"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_2, "epdc_d2"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_3, "epdc_d3"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_4, "epdc_d4"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_5, "epdc_d5"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_6, "epdc_d6"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_7, "epdc_d7"); - ret |= gpio_request(MX6SL_ARM2_EPDC_GDCLK, "epdc_gdclk"); - ret |= gpio_request(MX6SL_ARM2_EPDC_GDSP, "epdc_gdsp"); - ret |= gpio_request(MX6SL_ARM2_EPDC_GDOE, "epdc_gdoe"); - ret |= gpio_request(MX6SL_ARM2_EPDC_GDRL, "epdc_gdrl"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDCLK, "epdc_sdclk"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDOE, "epdc_sdoe"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDLE, "epdc_sdle"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDSHR, "epdc_sdshr"); - ret |= gpio_request(MX6SL_ARM2_EPDC_BDR0, "epdc_bdr0"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDCE0, "epdc_sdce0"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDCE1, "epdc_sdce1"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDCE2, "epdc_sdce2"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_0, "epdc_d0"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_1, "epdc_d1"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_2, "epdc_d2"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_3, "epdc_d3"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_4, "epdc_d4"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_5, "epdc_d5"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_6, "epdc_d6"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_7, "epdc_d7"); + ret |= gpio_request(MX6SL_BRD_EPDC_GDCLK, "epdc_gdclk"); + ret |= gpio_request(MX6SL_BRD_EPDC_GDSP, "epdc_gdsp"); + ret |= gpio_request(MX6SL_BRD_EPDC_GDOE, "epdc_gdoe"); + ret |= gpio_request(MX6SL_BRD_EPDC_GDRL, "epdc_gdrl"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDCLK, "epdc_sdclk"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDOE, "epdc_sdoe"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDLE, "epdc_sdle"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDSHR, "epdc_sdshr"); + ret |= gpio_request(MX6SL_BRD_EPDC_BDR0, "epdc_bdr0"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDCE0, "epdc_sdce0"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDCE1, "epdc_sdce1"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDCE2, "epdc_sdce2"); return ret; } static void epdc_put_pins(void) { - gpio_free(MX6SL_ARM2_EPDC_SDDO_0); - gpio_free(MX6SL_ARM2_EPDC_SDDO_1); - gpio_free(MX6SL_ARM2_EPDC_SDDO_2); - gpio_free(MX6SL_ARM2_EPDC_SDDO_3); - gpio_free(MX6SL_ARM2_EPDC_SDDO_4); - gpio_free(MX6SL_ARM2_EPDC_SDDO_5); - gpio_free(MX6SL_ARM2_EPDC_SDDO_6); - gpio_free(MX6SL_ARM2_EPDC_SDDO_7); - gpio_free(MX6SL_ARM2_EPDC_GDCLK); - gpio_free(MX6SL_ARM2_EPDC_GDSP); - gpio_free(MX6SL_ARM2_EPDC_GDOE); - gpio_free(MX6SL_ARM2_EPDC_GDRL); - gpio_free(MX6SL_ARM2_EPDC_SDCLK); - gpio_free(MX6SL_ARM2_EPDC_SDOE); - gpio_free(MX6SL_ARM2_EPDC_SDLE); - gpio_free(MX6SL_ARM2_EPDC_SDSHR); - gpio_free(MX6SL_ARM2_EPDC_BDR0); - gpio_free(MX6SL_ARM2_EPDC_SDCE0); - gpio_free(MX6SL_ARM2_EPDC_SDCE1); - gpio_free(MX6SL_ARM2_EPDC_SDCE2); + gpio_free(MX6SL_BRD_EPDC_SDDO_0); + gpio_free(MX6SL_BRD_EPDC_SDDO_1); + gpio_free(MX6SL_BRD_EPDC_SDDO_2); + gpio_free(MX6SL_BRD_EPDC_SDDO_3); + gpio_free(MX6SL_BRD_EPDC_SDDO_4); + gpio_free(MX6SL_BRD_EPDC_SDDO_5); + gpio_free(MX6SL_BRD_EPDC_SDDO_6); + gpio_free(MX6SL_BRD_EPDC_SDDO_7); + gpio_free(MX6SL_BRD_EPDC_GDCLK); + gpio_free(MX6SL_BRD_EPDC_GDSP); + gpio_free(MX6SL_BRD_EPDC_GDOE); + gpio_free(MX6SL_BRD_EPDC_GDRL); + gpio_free(MX6SL_BRD_EPDC_SDCLK); + gpio_free(MX6SL_BRD_EPDC_SDOE); + gpio_free(MX6SL_BRD_EPDC_SDLE); + gpio_free(MX6SL_BRD_EPDC_SDSHR); + gpio_free(MX6SL_BRD_EPDC_BDR0); + gpio_free(MX6SL_BRD_EPDC_SDCE0); + gpio_free(MX6SL_BRD_EPDC_SDCE1); + gpio_free(MX6SL_BRD_EPDC_SDCE2); } static void epdc_enable_pins(void) { /* Configure MUX settings to enable EPDC use */ - mxc_iomux_v3_setup_multiple_pads(mx6sl_arm2_epdc_enable_pads, \ - ARRAY_SIZE(mx6sl_arm2_epdc_enable_pads)); - - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_0); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_1); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_2); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_3); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_4); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_5); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_6); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_7); - gpio_direction_input(MX6SL_ARM2_EPDC_GDCLK); - gpio_direction_input(MX6SL_ARM2_EPDC_GDSP); - gpio_direction_input(MX6SL_ARM2_EPDC_GDOE); - gpio_direction_input(MX6SL_ARM2_EPDC_GDRL); - gpio_direction_input(MX6SL_ARM2_EPDC_SDCLK); - gpio_direction_input(MX6SL_ARM2_EPDC_SDOE); - gpio_direction_input(MX6SL_ARM2_EPDC_SDLE); - gpio_direction_input(MX6SL_ARM2_EPDC_SDSHR); - gpio_direction_input(MX6SL_ARM2_EPDC_BDR0); - gpio_direction_input(MX6SL_ARM2_EPDC_SDCE0); - gpio_direction_input(MX6SL_ARM2_EPDC_SDCE1); - gpio_direction_input(MX6SL_ARM2_EPDC_SDCE2); + mxc_iomux_v3_setup_multiple_pads(mx6sl_brd_epdc_enable_pads, \ + ARRAY_SIZE(mx6sl_brd_epdc_enable_pads)); + + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_0); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_1); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_2); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_3); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_4); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_5); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_6); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_7); + gpio_direction_input(MX6SL_BRD_EPDC_GDCLK); + gpio_direction_input(MX6SL_BRD_EPDC_GDSP); + gpio_direction_input(MX6SL_BRD_EPDC_GDOE); + gpio_direction_input(MX6SL_BRD_EPDC_GDRL); + gpio_direction_input(MX6SL_BRD_EPDC_SDCLK); + gpio_direction_input(MX6SL_BRD_EPDC_SDOE); + gpio_direction_input(MX6SL_BRD_EPDC_SDLE); + gpio_direction_input(MX6SL_BRD_EPDC_SDSHR); + gpio_direction_input(MX6SL_BRD_EPDC_BDR0); + gpio_direction_input(MX6SL_BRD_EPDC_SDCE0); + gpio_direction_input(MX6SL_BRD_EPDC_SDCE1); + gpio_direction_input(MX6SL_BRD_EPDC_SDCE2); } static void epdc_disable_pins(void) { /* Configure MUX settings for EPDC pins to * GPIO and drive to 0. */ - mxc_iomux_v3_setup_multiple_pads(mx6sl_arm2_epdc_disable_pads, \ - ARRAY_SIZE(mx6sl_arm2_epdc_disable_pads)); - - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_0, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_1, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_2, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_3, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_4, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_5, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_6, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_7, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_GDCLK, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_GDSP, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_GDOE, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_GDRL, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDCLK, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDOE, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDLE, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDSHR, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_BDR0, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDCE0, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDCE1, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDCE2, 0); + mxc_iomux_v3_setup_multiple_pads(mx6sl_brd_epdc_disable_pads, \ + ARRAY_SIZE(mx6sl_brd_epdc_disable_pads)); + + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_0, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_1, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_2, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_3, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_4, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_5, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_6, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_7, 0); + gpio_direction_output(MX6SL_BRD_EPDC_GDCLK, 0); + gpio_direction_output(MX6SL_BRD_EPDC_GDSP, 0); + gpio_direction_output(MX6SL_BRD_EPDC_GDOE, 0); + gpio_direction_output(MX6SL_BRD_EPDC_GDRL, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDCLK, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDOE, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDLE, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDSHR, 0); + gpio_direction_output(MX6SL_BRD_EPDC_BDR0, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDCE0, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDCE1, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDCE2, 0); } static struct fb_videomode e60_v110_mode = { @@ -946,108 +889,108 @@ static int spdc_get_pins(void) int ret = 0; /* Claim GPIOs for SPDC pins - used during power up/down */ - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_0, "SPDC_D0"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_1, "SPDC_D1"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_2, "SPDC_D2"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_3, "SPDC_D3"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_4, "SPDC_D4"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_5, "SPDC_D5"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_6, "SPDC_D6"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_7, "SPDC_D7"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_0, "SPDC_D0"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_1, "SPDC_D1"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_2, "SPDC_D2"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_3, "SPDC_D3"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_4, "SPDC_D4"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_5, "SPDC_D5"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_6, "SPDC_D6"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_7, "SPDC_D7"); - ret |= gpio_request(MX6SL_ARM2_EPDC_GDOE, "SIPIX_YOE"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_9, "SIPIX_PWR_RDY"); + ret |= gpio_request(MX6SL_BRD_EPDC_GDOE, "SIPIX_YOE"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_9, "SIPIX_PWR_RDY"); - ret |= gpio_request(MX6SL_ARM2_EPDC_GDSP, "SIPIX_YDIO"); + ret |= gpio_request(MX6SL_BRD_EPDC_GDSP, "SIPIX_YDIO"); - ret |= gpio_request(MX6SL_ARM2_EPDC_GDCLK, "SIPIX_YCLK"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDSHR, "SIPIX_XDIO"); + ret |= gpio_request(MX6SL_BRD_EPDC_GDCLK, "SIPIX_YCLK"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDSHR, "SIPIX_XDIO"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDLE, "SIPIX_LD"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDCE1, "SIPIX_SOE"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDLE, "SIPIX_LD"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDCE1, "SIPIX_SOE"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDCLK, "SIPIX_XCLK"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDDO_10, "SIPIX_SHD_N"); - ret |= gpio_request(MX6SL_ARM2_EPDC_SDCE0, "SIPIX2_CE"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDCLK, "SIPIX_XCLK"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDDO_10, "SIPIX_SHD_N"); + ret |= gpio_request(MX6SL_BRD_EPDC_SDCE0, "SIPIX2_CE"); return ret; } static void spdc_put_pins(void) { - gpio_free(MX6SL_ARM2_EPDC_SDDO_0); - gpio_free(MX6SL_ARM2_EPDC_SDDO_1); - gpio_free(MX6SL_ARM2_EPDC_SDDO_2); - gpio_free(MX6SL_ARM2_EPDC_SDDO_3); - gpio_free(MX6SL_ARM2_EPDC_SDDO_4); - gpio_free(MX6SL_ARM2_EPDC_SDDO_5); - gpio_free(MX6SL_ARM2_EPDC_SDDO_6); - gpio_free(MX6SL_ARM2_EPDC_SDDO_7); - - gpio_free(MX6SL_ARM2_EPDC_GDOE); - gpio_free(MX6SL_ARM2_EPDC_SDDO_9); - gpio_free(MX6SL_ARM2_EPDC_GDSP); - gpio_free(MX6SL_ARM2_EPDC_GDCLK); - gpio_free(MX6SL_ARM2_EPDC_SDSHR); - gpio_free(MX6SL_ARM2_EPDC_SDLE); - gpio_free(MX6SL_ARM2_EPDC_SDCE1); - gpio_free(MX6SL_ARM2_EPDC_SDCLK); - gpio_free(MX6SL_ARM2_EPDC_SDDO_10); - gpio_free(MX6SL_ARM2_EPDC_SDCE0); + gpio_free(MX6SL_BRD_EPDC_SDDO_0); + gpio_free(MX6SL_BRD_EPDC_SDDO_1); + gpio_free(MX6SL_BRD_EPDC_SDDO_2); + gpio_free(MX6SL_BRD_EPDC_SDDO_3); + gpio_free(MX6SL_BRD_EPDC_SDDO_4); + gpio_free(MX6SL_BRD_EPDC_SDDO_5); + gpio_free(MX6SL_BRD_EPDC_SDDO_6); + gpio_free(MX6SL_BRD_EPDC_SDDO_7); + + gpio_free(MX6SL_BRD_EPDC_GDOE); + gpio_free(MX6SL_BRD_EPDC_SDDO_9); + gpio_free(MX6SL_BRD_EPDC_GDSP); + gpio_free(MX6SL_BRD_EPDC_GDCLK); + gpio_free(MX6SL_BRD_EPDC_SDSHR); + gpio_free(MX6SL_BRD_EPDC_SDLE); + gpio_free(MX6SL_BRD_EPDC_SDCE1); + gpio_free(MX6SL_BRD_EPDC_SDCLK); + gpio_free(MX6SL_BRD_EPDC_SDDO_10); + gpio_free(MX6SL_BRD_EPDC_SDCE0); } static void spdc_enable_pins(void) { /* Configure MUX settings to enable SPDC use */ - mxc_iomux_v3_setup_multiple_pads(mx6sl_arm2_spdc_enable_pads, \ - ARRAY_SIZE(mx6sl_arm2_spdc_enable_pads)); - - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_0); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_1); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_2); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_3); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_4); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_5); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_6); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_7); - gpio_direction_input(MX6SL_ARM2_EPDC_GDOE); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_9); - gpio_direction_input(MX6SL_ARM2_EPDC_GDSP); - gpio_direction_input(MX6SL_ARM2_EPDC_GDCLK); - gpio_direction_input(MX6SL_ARM2_EPDC_SDSHR); - gpio_direction_input(MX6SL_ARM2_EPDC_SDLE); - gpio_direction_input(MX6SL_ARM2_EPDC_SDCE1); - gpio_direction_input(MX6SL_ARM2_EPDC_SDCLK); - gpio_direction_input(MX6SL_ARM2_EPDC_SDDO_10); - gpio_direction_input(MX6SL_ARM2_EPDC_SDCE0); + mxc_iomux_v3_setup_multiple_pads(mx6sl_brd_spdc_enable_pads, \ + ARRAY_SIZE(mx6sl_brd_spdc_enable_pads)); + + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_0); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_1); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_2); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_3); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_4); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_5); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_6); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_7); + gpio_direction_input(MX6SL_BRD_EPDC_GDOE); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_9); + gpio_direction_input(MX6SL_BRD_EPDC_GDSP); + gpio_direction_input(MX6SL_BRD_EPDC_GDCLK); + gpio_direction_input(MX6SL_BRD_EPDC_SDSHR); + gpio_direction_input(MX6SL_BRD_EPDC_SDLE); + gpio_direction_input(MX6SL_BRD_EPDC_SDCE1); + gpio_direction_input(MX6SL_BRD_EPDC_SDCLK); + gpio_direction_input(MX6SL_BRD_EPDC_SDDO_10); + gpio_direction_input(MX6SL_BRD_EPDC_SDCE0); } static void spdc_disable_pins(void) { /* Configure MUX settings for SPDC pins to * GPIO and drive to 0. */ - mxc_iomux_v3_setup_multiple_pads(mx6sl_arm2_spdc_disable_pads, \ - ARRAY_SIZE(mx6sl_arm2_spdc_disable_pads)); - - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_0, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_1, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_2, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_3, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_4, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_5, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_6, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_7, 0); - - gpio_direction_output(MX6SL_ARM2_EPDC_GDOE, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_9, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_GDSP, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_GDCLK, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDSHR, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDLE, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDCE1, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDCLK, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDDO_10, 0); - gpio_direction_output(MX6SL_ARM2_EPDC_SDCE0, 0); + mxc_iomux_v3_setup_multiple_pads(mx6sl_brd_spdc_disable_pads, \ + ARRAY_SIZE(mx6sl_brd_spdc_disable_pads)); + + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_0, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_1, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_2, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_3, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_4, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_5, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_6, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_7, 0); + + gpio_direction_output(MX6SL_BRD_EPDC_GDOE, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_9, 0); + gpio_direction_output(MX6SL_BRD_EPDC_GDSP, 0); + gpio_direction_output(MX6SL_BRD_EPDC_GDCLK, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDSHR, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDLE, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDCE1, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDCLK, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDDO_10, 0); + gpio_direction_output(MX6SL_BRD_EPDC_SDCE0, 0); } static struct imx_spdc_panel_init_set spdc_init_set = { @@ -1105,9 +1048,9 @@ static void setup_spdc(void) static void imx6_arm2_usbotg_vbus(bool on) { if (on) - gpio_set_value(MX6_ARM2_USBOTG1_PWR, 1); + gpio_set_value(MX6_BRD_USBOTG1_PWR, 1); else - gpio_set_value(MX6_ARM2_USBOTG1_PWR, 0); + gpio_set_value(MX6_BRD_USBOTG1_PWR, 0); } static void __init mx6_arm2_init_usb(void) @@ -1120,19 +1063,19 @@ static void __init mx6_arm2_init_usb(void) * or it will affect signal quality at dp. */ - ret = gpio_request(MX6_ARM2_USBOTG1_PWR, "usbotg-pwr"); + ret = gpio_request(MX6_BRD_USBOTG1_PWR, "usbotg-pwr"); if (ret) { - pr_err("failed to get GPIO MX6_ARM2_USBOTG1_PWR:%d\n", ret); + pr_err("failed to get GPIO MX6_BRD_USBOTG1_PWR:%d\n", ret); return; } - gpio_direction_output(MX6_ARM2_USBOTG1_PWR, 0); + gpio_direction_output(MX6_BRD_USBOTG1_PWR, 0); - ret = gpio_request(MX6_ARM2_USBOTG2_PWR, "usbh1-pwr"); + ret = gpio_request(MX6_BRD_USBOTG2_PWR, "usbh1-pwr"); if (ret) { - pr_err("failed to get GPIO MX6_ARM2_USBOTG2_PWR:%d\n", ret); + pr_err("failed to get GPIO MX6_BRD_USBOTG2_PWR:%d\n", ret); return; } - gpio_direction_output(MX6_ARM2_USBOTG2_PWR, 1); + gpio_direction_output(MX6_BRD_USBOTG2_PWR, 1); mx6_set_otghost_vbus_func(imx6_arm2_usbotg_vbus); mx6_usb_dr_init(); @@ -1197,23 +1140,23 @@ static const struct matrix_keymap_data mx6sl_arm2_map_data __initconst = { }; static void __init elan_ts_init(void) { - mxc_iomux_v3_setup_multiple_pads(mx6sl_arm2_elan_pads, - ARRAY_SIZE(mx6sl_arm2_elan_pads)); + mxc_iomux_v3_setup_multiple_pads(mx6sl_brd_elan_pads, + ARRAY_SIZE(mx6sl_brd_elan_pads)); /* ELAN Touchscreen */ - gpio_request(MX6SL_ARM2_ELAN_INT, "elan-interrupt"); - gpio_direction_input(MX6SL_ARM2_ELAN_INT); + gpio_request(MX6SL_BRD_ELAN_INT, "elan-interrupt"); + gpio_direction_input(MX6SL_BRD_ELAN_INT); - gpio_request(MX6SL_ARM2_ELAN_CE, "elan-cs"); - gpio_direction_output(MX6SL_ARM2_ELAN_CE, 1); - gpio_direction_output(MX6SL_ARM2_ELAN_CE, 0); + gpio_request(MX6SL_BRD_ELAN_CE, "elan-cs"); + gpio_direction_output(MX6SL_BRD_ELAN_CE, 1); + gpio_direction_output(MX6SL_BRD_ELAN_CE, 0); - gpio_request(MX6SL_ARM2_ELAN_RST, "elan-rst"); - gpio_direction_output(MX6SL_ARM2_ELAN_RST, 1); - gpio_direction_output(MX6SL_ARM2_ELAN_RST, 0); + gpio_request(MX6SL_BRD_ELAN_RST, "elan-rst"); + gpio_direction_output(MX6SL_BRD_ELAN_RST, 1); + gpio_direction_output(MX6SL_BRD_ELAN_RST, 0); mdelay(1); - gpio_direction_output(MX6SL_ARM2_ELAN_RST, 1); - gpio_direction_output(MX6SL_ARM2_ELAN_CE, 1); + gpio_direction_output(MX6SL_BRD_ELAN_RST, 1); + gpio_direction_output(MX6SL_BRD_ELAN_CE, 1); } #define SNVS_LPCR 0x38 @@ -1232,7 +1175,8 @@ static void mx6_snvs_poweroff(void) */ static void __init mx6_arm2_init(void) { - mxc_iomux_v3_setup_multiple_pads(mx6sl_arm2_pads, ARRAY_SIZE(mx6sl_arm2_pads)); + mxc_iomux_v3_setup_multiple_pads(mx6sl_brd_pads, + ARRAY_SIZE(mx6sl_brd_pads)); elan_ts_init(); @@ -1285,8 +1229,8 @@ static void __init mx6_arm2_init(void) imx6q_add_mxc_pwm_backlight(0, &mx6_arm2_pwm_backlight_data); imx6dl_add_imx_elcdif(&fb_data[0]); - gpio_request(MX6_ARM2_LCD_PWR_EN, "elcdif-power-on"); - gpio_direction_output(MX6_ARM2_LCD_PWR_EN, 1); + gpio_request(MX6_BRD_LCD_PWR_EN, "elcdif-power-on"); + gpio_direction_output(MX6_BRD_LCD_PWR_EN, 1); mxc_register_device(&lcd_wvga_device, NULL); imx6dl_add_imx_pxp(); |