From patchwork Wed Apr 13 06:24:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 103921 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 647D91007D2 for ; Sat, 9 Jul 2011 04:25:53 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QfFkH-00017D-QJ; Fri, 08 Jul 2011 18:25:45 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QfFkH-00028J-5y; Fri, 08 Jul 2011 18:25:45 +0000 Received: from mailrelay005.isp.belgacom.be ([195.238.6.171]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QfFj7-0001uv-AX; Fri, 08 Jul 2011 18:24:49 +0000 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmsJABZJF05bsyHL/2dsb2JhbABUMKcgeIh9wR6GOASHSoh4kls Received: from 203.33-179-91.adsl-dyn.isp.belgacom.be (HELO exchange.develtech.com) ([91.179.33.203]) by relay.skynet.be with ESMTP; 08 Jul 2011 20:24:15 +0200 Delivered-To: jcl@develtech.com X-SpamScore: 6 X-BigFish: VS6(zzc8kzz1202h1082kzz8275bhz2dh2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI From: Huang Shijie To: Subject: [PATCH v5 1/4] ARM: add GPMI support for imx23/imx28 Date: Wed, 13 Apr 2011 14:24:38 +0800 Message-ID: <1302675881-18862-2-git-send-email-b32955@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1302675881-18862-1-git-send-email-b32955@freescale.com> References: <1302675881-18862-1-git-send-email-b32955@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110413_021840_912431_EBF9D59E X-CRM114-Status: GOOD ( 20.98 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [65.55.88.13 listed in list.dnswl.org] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list X-Ovh-Tracer-Id: 4641803841540428091 X-Ovh-Remote: 18.85.46.34 (bombadil.infradead.org) X-Ovh-Local: 213.186.33.32 (mx0.ovh.net) X-Spam-Check: DONE|U 0.5/N /bin/ln: creating hard link `reaver_cache/prob_good/20110413_021840_912431_EBF9D59E': File exists X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110413_021840_912431_EBF9D59E X-CRM114-Status: GOOD ( 19.92 ) X-Spam-Score: 2.1 (++) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (2.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [195.238.6.171 listed in list.dnswl.org] 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date Cc: David.Woodhouse@intel.com, dedekind1@gmail.com, Huang Shijie , veli-pekka.peltola@bluegiga.com, ffainelli@freebox.fr, linux-mtd@lists.infradead.org, shijie8@gmail.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org add the clock and iomux initialization for GPMI in the imx23 and imx28. and register the gpmi driver. Signed-off-by: Huang Shijie --- arch/arm/mach-mxs/Kconfig | 2 + arch/arm/mach-mxs/clock-mx23.c | 3 + arch/arm/mach-mxs/clock-mx28.c | 3 + arch/arm/mach-mxs/devices-mx23.h | 3 + arch/arm/mach-mxs/devices-mx28.h | 3 + arch/arm/mach-mxs/devices/Kconfig | 3 + arch/arm/mach-mxs/devices/Makefile | 1 + arch/arm/mach-mxs/devices/platform-gpmi.c | 134 +++++++++++++++++++++++ arch/arm/mach-mxs/include/mach/devices-common.h | 4 + arch/arm/mach-mxs/include/mach/gpmi-nfc.h | 65 +++++++++++ arch/arm/mach-mxs/mach-mx23evk.c | 37 ++++++ arch/arm/mach-mxs/mach-mx28evk.c | 37 ++++++ 12 files changed, 295 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-mxs/devices/platform-gpmi.c create mode 100644 arch/arm/mach-mxs/include/mach/gpmi-nfc.h diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 4f6f174..e034666 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -22,6 +22,7 @@ config MACH_MX23EVK select SOC_IMX23 select MXS_HAVE_AMBA_DUART select MXS_HAVE_PLATFORM_AUART + select MXS_HAVE_PLATFORM_GPMI select MXS_HAVE_PLATFORM_MXSFB default y help @@ -35,6 +36,7 @@ config MACH_MX28EVK select MXS_HAVE_PLATFORM_AUART select MXS_HAVE_PLATFORM_FEC select MXS_HAVE_PLATFORM_FLEXCAN + select MXS_HAVE_PLATFORM_GPMI select MXS_HAVE_PLATFORM_MXSFB select MXS_OCOTP default y diff --git a/arch/arm/mach-mxs/clock-mx23.c b/arch/arm/mach-mxs/clock-mx23.c index d133c7f..f3c9653 100644 --- a/arch/arm/mach-mxs/clock-mx23.c +++ b/arch/arm/mach-mxs/clock-mx23.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "regs-clkctrl-mx23.h" @@ -442,6 +443,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("duart", "apb_pclk", xbus_clk) /* for amba-pl011 driver */ _REGISTER_CLOCK("duart", NULL, uart_clk) + _REGISTER_CLOCK(GPMI_NFC_DRIVER_MX23, NULL, gpmi_clk) _REGISTER_CLOCK("mxs-auart.0", NULL, uart_clk) _REGISTER_CLOCK("rtc", NULL, rtc_clk) _REGISTER_CLOCK("mxs-dma-apbh", NULL, hbus_clk) @@ -533,6 +535,7 @@ int __init mx23_clocks_init(void) clk_enable(&xbus_clk); clk_enable(&emi_clk); clk_enable(&uart_clk); + clk_enable(&gpmi_clk); clkdev_add_table(lookups, ARRAY_SIZE(lookups)); diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 5e489a2..7868d42 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "regs-clkctrl-mx28.h" @@ -607,6 +608,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("duart", "apb_pclk", xbus_clk) /* for amba-pl011 driver */ _REGISTER_CLOCK("duart", NULL, uart_clk) + _REGISTER_CLOCK(GPMI_NFC_DRIVER_MX28, NULL, gpmi_clk) _REGISTER_CLOCK("imx28-fec.0", NULL, fec_clk) _REGISTER_CLOCK("imx28-fec.1", NULL, fec_clk) _REGISTER_CLOCK("mxs-auart.0", NULL, uart_clk) @@ -749,6 +751,7 @@ int __init mx28_clocks_init(void) clk_enable(&xbus_clk); clk_enable(&emi_clk); clk_enable(&uart_clk); + clk_enable(&gpmi_clk); clk_set_parent(&lcdif_clk, &ref_pix_clk); diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h index c7e14f4..349fb1d 100644 --- a/arch/arm/mach-mxs/devices-mx23.h +++ b/arch/arm/mach-mxs/devices-mx23.h @@ -16,6 +16,9 @@ extern const struct amba_device mx23_duart_device __initconst; #define mx23_add_duart() \ mxs_add_duart(&mx23_duart_device) +extern const struct gpmi_nfc_platform_data gpmi_platform_data_imx23 __initconst; +#define mx23_add_gpmi() mxs_add_gpmi(&gpmi_platform_data_imx23) + extern const struct mxs_auart_data mx23_auart_data[] __initconst; #define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id]) #define mx23_add_auart0() mx23_add_auart(0) diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h index 9d08555..ed6427b 100644 --- a/arch/arm/mach-mxs/devices-mx28.h +++ b/arch/arm/mach-mxs/devices-mx28.h @@ -16,6 +16,9 @@ extern const struct amba_device mx28_duart_device __initconst; #define mx28_add_duart() \ mxs_add_duart(&mx28_duart_device) +extern const struct gpmi_nfc_platform_data gpmi_platform_data_imx28 __initconst; +#define mx28_add_gpmi() mxs_add_gpmi(&gpmi_platform_data_imx28) + extern const struct mxs_auart_data mx28_auart_data[] __initconst; #define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id]) #define mx28_add_auart0() mx28_add_auart(0) diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig index 1451ad0..81e99ce 100644 --- a/arch/arm/mach-mxs/devices/Kconfig +++ b/arch/arm/mach-mxs/devices/Kconfig @@ -5,6 +5,9 @@ config MXS_HAVE_AMBA_DUART config MXS_HAVE_PLATFORM_AUART bool +config MXS_HAVE_PLATFORM_GPMI + bool + config MXS_HAVE_PLATFORM_FEC bool diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile index 0d9bea3..8a7c2c8 100644 --- a/arch/arm/mach-mxs/devices/Makefile +++ b/arch/arm/mach-mxs/devices/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o obj-y += platform-dma.o obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o +obj-$(CONFIG_MXS_HAVE_PLATFORM_GPMI) += platform-gpmi.o obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o diff --git a/arch/arm/mach-mxs/devices/platform-gpmi.c b/arch/arm/mach-mxs/devices/platform-gpmi.c new file mode 100644 index 0000000..74ebe22 --- /dev/null +++ b/arch/arm/mach-mxs/devices/platform-gpmi.c @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +#include +#include +#include +#include +#include + +#ifdef CONFIG_SOC_IMX23 +const struct gpmi_nfc_platform_data gpmi_platform_data_imx23 __initconst = { + .min_prop_delay_in_ns = 5, + .max_prop_delay_in_ns = 9, + .max_chip_count = 1, +}; + +const struct resource res_imx23[] __initconst = { + { /* GPMI */ + .start = MX23_GPMI_BASE_ADDR, + .end = MX23_GPMI_BASE_ADDR + SZ_8K - 1, + .name = GPMI_NFC_GPMI_REGS_ADDR_RES_NAME, + .flags = IORESOURCE_MEM, + }, { + .start = MX23_INT_GPMI_ATTENTION, + .end = MX23_INT_GPMI_ATTENTION, + .name = GPMI_NFC_GPMI_INTERRUPT_RES_NAME, + .flags = IORESOURCE_IRQ, + }, { /* BCH */ + .start = MX23_BCH_BASE_ADDR, + .end = MX23_BCH_BASE_ADDR + SZ_8K - 1, + .name = GPMI_NFC_BCH_REGS_ADDR_RES_NAME, + .flags = IORESOURCE_MEM, + }, { + .start = MX23_INT_BCH, + .end = MX23_INT_BCH, + .name = GPMI_NFC_BCH_INTERRUPT_RES_NAME, + .flags = IORESOURCE_IRQ, + }, { /* DMA */ + .start = MX23_DMA_GPMI0, + .end = MX23_DMA_GPMI3, + .name = GPMI_NFC_DMA_CHANNELS_RES_NAME, + .flags = IORESOURCE_DMA, + }, { + .start = MX23_INT_GPMI_DMA, + .end = MX23_INT_GPMI_DMA, + .name = GPMI_NFC_DMA_INTERRUPT_RES_NAME, + .flags = IORESOURCE_IRQ, + }, +}; +#endif + +#ifdef CONFIG_SOC_IMX28 +const struct gpmi_nfc_platform_data gpmi_platform_data_imx28 __initconst = { + .min_prop_delay_in_ns = 5, + .max_prop_delay_in_ns = 9, + .max_chip_count = 1, +}; + +const struct resource res_imx28[] __initconst = { + { /* GPMI */ + .start = MX28_GPMI_BASE_ADDR, + .end = MX28_GPMI_BASE_ADDR + SZ_8K - 1, + .name = GPMI_NFC_GPMI_REGS_ADDR_RES_NAME, + .flags = IORESOURCE_MEM, + }, { + .start = MX28_INT_GPMI, + .end = MX28_INT_GPMI, + .name = GPMI_NFC_GPMI_INTERRUPT_RES_NAME, + .flags = IORESOURCE_IRQ, + }, { /* BCH */ + .start = MX28_BCH_BASE_ADDR, + .end = MX28_BCH_BASE_ADDR + SZ_8K - 1, + .name = GPMI_NFC_BCH_REGS_ADDR_RES_NAME, + .flags = IORESOURCE_MEM, + }, { + .start = MX28_INT_BCH, + .end = MX28_INT_BCH, + .name = GPMI_NFC_BCH_INTERRUPT_RES_NAME, + .flags = IORESOURCE_IRQ, + }, { /* DMA */ + .start = MX28_DMA_GPMI0, + .end = MX28_DMA_GPMI7, + .name = GPMI_NFC_DMA_CHANNELS_RES_NAME, + .flags = IORESOURCE_DMA, + }, { + .start = MX28_INT_GPMI_DMA, + .end = MX28_INT_GPMI_DMA, + .name = GPMI_NFC_DMA_INTERRUPT_RES_NAME, + .flags = IORESOURCE_IRQ, + }, +}; +#endif + +struct platform_device *__init +mxs_add_gpmi(const struct gpmi_nfc_platform_data *data) +{ + const struct resource *res; + int res_size; + const char *name = NULL; + +#ifdef CONFIG_SOC_IMX23 + if (cpu_is_mx23()) { + res_size = ARRAY_SIZE(res_imx23); + res = res_imx23; + name = GPMI_NFC_DRIVER_MX23; + } +#endif + +#ifdef CONFIG_SOC_IMX28 + if (cpu_is_mx28()) { + res_size = ARRAY_SIZE(res_imx28); + res = res_imx28; + name = GPMI_NFC_DRIVER_MX28; + } +#endif + + return mxs_add_platform_device_dmamask(name, -1, + res, res_size, + data, sizeof(*data), DMA_BIT_MASK(32)); +} diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h index 71f2448..1f05503 100644 --- a/arch/arm/mach-mxs/include/mach/devices-common.h +++ b/arch/arm/mach-mxs/include/mach/devices-common.h @@ -30,6 +30,10 @@ int __init mxs_add_amba_device(const struct amba_device *dev); /* duart */ int __init mxs_add_duart(const struct amba_device *dev); +/* GPMI */ +#include +struct platform_device *__init mxs_add_gpmi( + const struct gpmi_nfc_platform_data *data); /* auart */ struct mxs_auart_data { int id; diff --git a/arch/arm/mach-mxs/include/mach/gpmi-nfc.h b/arch/arm/mach-mxs/include/mach/gpmi-nfc.h new file mode 100644 index 0000000..cf8e8c3 --- /dev/null +++ b/arch/arm/mach-mxs/include/mach/gpmi-nfc.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef __INCLUDE_LINUX_DEVICE_H +#define __INCLUDE_LINUX_DEVICE_H + +#define GPMI_NFC_DRIVER_NAME "gpmi-nfc" +#define GPMI_NFC_DRIVER_MX23 "gpmi-nfc-mx23" +#define GPMI_NFC_DRIVER_MX28 "gpmi-nfc-mx28" +#define GPMI_NFC_DRIVER_MX50 "gpmi-nfc-mx508" + +/* Resource names for the GPMI NFC driver. */ +#define GPMI_NFC_GPMI_REGS_ADDR_RES_NAME "GPMI NFC GPMI Registers" +#define GPMI_NFC_GPMI_INTERRUPT_RES_NAME "GPMI NFC GPMI Interrupt" +#define GPMI_NFC_BCH_REGS_ADDR_RES_NAME "GPMI NFC BCH Registers" +#define GPMI_NFC_BCH_INTERRUPT_RES_NAME "GPMI NFC BCH Interrupt" +#define GPMI_NFC_DMA_CHANNELS_RES_NAME "GPMI NFC DMA Channels" +#define GPMI_NFC_DMA_INTERRUPT_RES_NAME "GPMI NFC DMA Interrupt" + +/** + * struct gpmi_nfc_platform_data - GPMI NFC driver platform data. + * + * This structure communicates platform-specific information to the GPMI NFC + * driver that can't be expressed as resources. + * + * @min_prop_delay_in_ns: Minimum propagation delay of GPMI signals to and + * from the NAND Flash device, in nanoseconds. + * @max_prop_delay_in_ns: Maximum propagation delay of GPMI signals to and + * from the NAND Flash device, in nanoseconds. + * @max_chip_count: The maximum number of chips for which the driver + * should configure the hardware. This value most + * likely reflects the number of pins that are + * connected to a NAND Flash device. If this is + * greater than the SoC hardware can support, the + * driver will print a message and fail to initialize. + * @partitions: An optional pointer to an array of partition + * descriptions. + * @partition_count: The number of elements in the partitions array. + */ +struct gpmi_nfc_platform_data { + /* NAND Flash information. */ + unsigned int min_prop_delay_in_ns; + unsigned int max_prop_delay_in_ns; + unsigned int max_chip_count; + + /* soc */ + struct mtd_partition *partitions; + unsigned partition_count; +}; +#endif diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c index a66994f..db715f9 100644 --- a/arch/arm/mach-mxs/mach-mx23evk.c +++ b/arch/arm/mach-mxs/mach-mx23evk.c @@ -34,6 +34,42 @@ static const iomux_cfg_t mx23evk_pads[] __initconst = { MX23_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, MX23_PAD_PWM1__DUART_TX | MXS_PAD_CTRL, + /* gpmi */ + MX23_PAD_GPMI_D00__GPMI_D00 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_D01__GPMI_D01 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_D02__GPMI_D02 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_D03__GPMI_D03 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_D04__GPMI_D04 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_D05__GPMI_D05 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_D06__GPMI_D06 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_D07__GPMI_D07 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_CLE__GPMI_CLE | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_ALE__GPMI_ALE | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_WPN__GPMI_WPN | + (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_WRN__GPMI_WRN | + (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_RDN__GPMI_RDN | + (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_RDY0__GPMI_RDY0 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_RDY1__GPMI_RDY1 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_CE0N__GPMI_CE0N | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX23_PAD_GPMI_CE1N__GPMI_CE1N | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + /* auart */ MX23_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL, MX23_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL, @@ -108,6 +144,7 @@ static void __init mx23evk_init(void) mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads)); mx23_add_duart(); + mx23_add_gpmi(); mx23_add_auart0(); ret = gpio_request_one(MX23EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index 08002d0..cf8ddcb 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c @@ -39,6 +39,42 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = { MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, MX28_PAD_PWM1__DUART_TX | MXS_PAD_CTRL, + /* gpmi */ + MX28_PAD_GPMI_D00__GPMI_D0 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_D01__GPMI_D1 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_D02__GPMI_D2 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_D03__GPMI_D3 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_D04__GPMI_D4 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_D05__GPMI_D5 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_D06__GPMI_D6 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_D07__GPMI_D7 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_CE0N__GPMI_CE0N | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_CE1N__GPMI_CE1N | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_RDY0__GPMI_READY0 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_RDY1__GPMI_READY1 | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_RDN__GPMI_RDN | + (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_WRN__GPMI_WRN | + (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_ALE__GPMI_ALE | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_CLE__GPMI_CLE | + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + MX28_PAD_GPMI_RESETN__GPMI_RESETN | + (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), + /* auart0 */ MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL, MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL, @@ -265,6 +301,7 @@ static void __init mx28evk_init(void) mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads)); mx28_add_duart(); + mx28_add_gpmi(); mx28_add_auart0(); mx28_add_auart3();