diff options
Diffstat (limited to 'arch/arm/mach-mx6/board-mx6q_phytec-nand.c')
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_phytec-nand.c | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/arch/arm/mach-mx6/board-mx6q_phytec-nand.c b/arch/arm/mach-mx6/board-mx6q_phytec-nand.c index c0ab4b3f1254..96647fc4aaf8 100644 --- a/arch/arm/mach-mx6/board-mx6q_phytec-nand.c +++ b/arch/arm/mach-mx6/board-mx6q_phytec-nand.c @@ -26,8 +26,14 @@ #include "crm_regs.h" #include "cpu_op-mx6.h" #include "board-mx6q_phytec-nand.h" +#include "board-mx6q_phytec-common.h" -/* The GPMI is conflicted with SD3, so init this in the driver. */ +extern int module_rev; + +/* + * The GPMI is conflicted with SD3, so init this in the driver. + * This iomux array is for phyFLEX-i.MX6 modules Rev. 1 +*/ static iomux_v3_cfg_t mx6q_gpmi_nand[] __initdata = { MX6Q_PAD_NANDF_CLE__RAWNAND_CLE, MX6Q_PAD_NANDF_ALE__RAWNAND_ALE, @@ -50,15 +56,42 @@ static iomux_v3_cfg_t mx6q_gpmi_nand[] __initdata = { MX6Q_PAD_SD4_DAT1__RAWNAND_D9, MX6Q_PAD_SD4_DAT2__RAWNAND_D10, MX6Q_PAD_SD4_DAT3__RAWNAND_D11, - MX6Q_PAD_SD4_DAT4__RAWNAND_D12, - MX6Q_PAD_SD4_DAT5__RAWNAND_D13, - MX6Q_PAD_SD4_DAT6__RAWNAND_D14, - MX6Q_PAD_SD4_DAT7__RAWNAND_D15, +}; + +/* This iomux array is for phyFLEX-i.MX6 modules Rev. 2 */ +static iomux_v3_cfg_t mx6q_gpmi_nand_rev2[] __initdata = { + MX6Q_PAD_NANDF_CLE__RAWNAND_CLE, + MX6Q_PAD_NANDF_ALE__RAWNAND_ALE, + MX6Q_PAD_NANDF_CS0__RAWNAND_CE0N, + MX6Q_PAD_NANDF_CS1__RAWNAND_CE1N, + MX6Q_PAD_NANDF_CS3__RAWNAND_CE3N, + MX6Q_PAD_NANDF_RB0__RAWNAND_READY0, + MX6Q_PAD_NANDF_D0__RAWNAND_D0, + MX6Q_PAD_NANDF_D1__RAWNAND_D1, + MX6Q_PAD_NANDF_D2__RAWNAND_D2, + MX6Q_PAD_NANDF_D3__RAWNAND_D3, + MX6Q_PAD_NANDF_D4__RAWNAND_D4, + MX6Q_PAD_NANDF_D5__RAWNAND_D5, + MX6Q_PAD_NANDF_D6__RAWNAND_D6, + MX6Q_PAD_NANDF_D7__RAWNAND_D7, + MX6Q_PAD_SD4_CLK__RAWNAND_WRN, + MX6Q_PAD_NANDF_WP_B__RAWNAND_RESETN, + MX6Q_PAD_SD4_DAT0__RAWNAND_DQS, }; static int __init gpmi_nand_platform_init(void) { - return mxc_iomux_v3_setup_multiple_pads(mx6q_gpmi_nand, ARRAY_SIZE(mx6q_gpmi_nand)); + int ret; + + if (module_rev == PHYFLEX_MODULE_REV_1) { + ret = mxc_iomux_v3_setup_multiple_pads(mx6q_gpmi_nand, + ARRAY_SIZE(mx6q_gpmi_nand)); + } else { + ret = mxc_iomux_v3_setup_multiple_pads(mx6q_gpmi_nand_rev2, + ARRAY_SIZE(mx6q_gpmi_nand_rev2)); + } + + return ret; } static const struct gpmi_nand_platform_data mx6_gpmi_nand_platform_data __initconst = { |