diff options
author | Jason Liu <r64343@freescale.com> | 2010-08-04 10:26:55 +0800 |
---|---|---|
committer | Alan Tull <r80115@freescale.com> | 2010-09-25 09:50:16 -0500 |
commit | 414fae9358a40bac378572b5763132f3931b1dc8 (patch) | |
tree | 3cd4b9bf321ea5e3dc879983cc881c7dd27c3aec /arch/arm/mach-mx5/mx50_arm2.c | |
parent | ba96caa1e7b13ee6005273c1d7d4f777752eb716 (diff) |
ENGR00125860-1 MX50:Add GPMI-RAW-NAND mach support
Add GPMI-RAW-NAND mach support
Signed-off-by: Jason Liu <r64343@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx5/mx50_arm2.c')
-rw-r--r-- | arch/arm/mach-mx5/mx50_arm2.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/mx50_arm2.c b/arch/arm/mach-mx5/mx50_arm2.c index 7e3b3c162960..440cbd8b5d1a 100644 --- a/arch/arm/mach-mx5/mx50_arm2.c +++ b/arch/arm/mach-mx5/mx50_arm2.c @@ -44,6 +44,7 @@ #include <linux/videodev2.h> #include <linux/mxcfb.h> #include <linux/fec.h> +#include <linux/gpmi-nfc.h> #include <asm/irq.h> #include <asm/setup.h> #include <asm/mach-types.h> @@ -226,6 +227,28 @@ static struct pad_desc mx50_armadillo2[] = { MX50_PAD_CSPI_MISO__CSPI_MISO, }; +static struct pad_desc mx50_gpmi_nand[] = { + MX50_PIN_EIM_DA8__NANDF_CLE, + MX50_PIN_EIM_DA9__NANDF_ALE, + MX50_PIN_EIM_DA10__NANDF_CE0, + MX50_PIN_EIM_DA11__NANDF_CE1, + MX50_PIN_EIM_DA12__NANDF_CE2, + MX50_PIN_EIM_DA13__NANDF_CE3, + MX50_PIN_EIM_DA14__NANDF_READY, + MX50_PIN_EIM_DA15__NANDF_DQS, + MX50_PIN_SD3_D4__NANDF_D0, + MX50_PIN_SD3_D5__NANDF_D1, + MX50_PIN_SD3_D6__NANDF_D2, + MX50_PIN_SD3_D7__NANDF_D3, + MX50_PIN_SD3_D0__NANDF_D4, + MX50_PIN_SD3_D1__NANDF_D5, + MX50_PIN_SD3_D2__NANDF_D6, + MX50_PIN_SD3_D3__NANDF_D7, + MX50_PIN_SD3_CLK__NANDF_RDN, + MX50_PIN_SD3_CMD__NANDF_WRN, + MX50_PIN_SD3_WP__NANDF_RESETN, +}; + /* working point(wp): 0 - 800MHz; 1 - 166.25MHz; */ static struct cpu_wp cpu_wp_auto[] = { { @@ -643,11 +666,46 @@ static int __init w1_setup(char *__unused) __setup("w1", w1_setup); +int enable_gpmi_nand = { 0 }; +static int __init gpmi_nand_setup(char *__unused) +{ + enable_gpmi_nand = 1; + return 1; +} + +__setup("gpmi:nand", gpmi_nand_setup); + static struct mxs_dma_plat_data dma_apbh_data = { .chan_base = MXS_DMA_CHANNEL_AHB_APBH, .chan_num = MXS_MAX_DMA_CHANNELS, }; +static int gpmi_nfc_platform_init(unsigned int max_chip_count) +{ + return !enable_gpmi_nand; +} + +static void gpmi_nfc_platform_exit(unsigned int max_chip_count) +{ +} + +static const char *gpmi_nfc_partition_source_types[] = { "cmdlinepart", 0 }; + +static struct gpmi_nfc_platform_data gpmi_nfc_platform_data = { + .nfc_version = 2, + .boot_rom_version = 1, + .clock_name = "gpmi-nfc", + .platform_init = gpmi_nfc_platform_init, + .platform_exit = gpmi_nfc_platform_exit, + .min_prop_delay_in_ns = 5, + .max_prop_delay_in_ns = 9, + .max_chip_count = 2, + .boot_area_size_in_bytes = 20 * SZ_1M, + .partition_source_types = gpmi_nfc_partition_source_types, + .partitions = 0, + .partition_count = 0, +}; + /*! * Board specific fixup function. It is called by \b setup_arch() in * setup.c file very early on during kernel starts. It allows the user to @@ -717,6 +775,10 @@ static void __init mx50_arm2_io_init(void) struct pad_desc one_wire = MX50_PAD_OWIRE__OWIRE; mxc_iomux_v3_setup_pad(&one_wire); } + + if (enable_gpmi_nand) + mxc_iomux_v3_setup_multiple_pads(mx50_gpmi_nand, \ + ARRAY_SIZE(mx50_gpmi_nand)); } /*! @@ -781,6 +843,7 @@ static void __init mxc_board_init(void) pm_power_off = mxc_power_off; */ mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); + mxc_register_device(&gpmi_nfc_device, &gpmi_nfc_platform_data); mx5_usb_dr_init(); mx5_usbh1_init(); } |