linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/3] ARM: i.MX53: add IOMUX pad for ecspi
@ 2011-01-13  3:39 yong.shen at freescale.com
  2011-01-13  3:39 ` [PATCH v4 2/3] ARM: i.MX53 EVK: add ecspi IOMUX setting yong.shen at freescale.com
  2011-01-13  3:39 ` [PATCH v4 3/3] ARM: i.MX53 EVK: add spi nor device yong.shen at freescale.com
  0 siblings, 2 replies; 4+ messages in thread
From: yong.shen at freescale.com @ 2011-01-13  3:39 UTC (permalink / raw)
  To: linux-arm-kernel

From: Yong Shen <yong.shen@freescale.com>

Add IOMUX pad entry for ecspi

Signed-off-by: Yong Shen <yong.shen@freescale.com>
---
 arch/arm/plat-mxc/include/mach/iomux-mx53.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h
index 2673007..68e11d7 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h
@@ -134,6 +134,9 @@ typedef enum iomux_config {
 #define MX53_PAD_EIM_D16__GPIO_3_16		IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
 #define MX53_PAD_EIM_D17__GPIO_3_17		IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
 #define MX53_PAD_EIM_D18__GPIO_3_18		IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
+#define MX53_PAD_EIM_D16__CSPI1_SCLK		IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT4, 0x79c, 3, NO_PAD_CTRL)
+#define MX53_PAD_EIM_D17__CSPI1_MISO		IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT4, 0x7a0, 3, NO_PAD_CTRL)
+#define MX53_PAD_EIM_D18__CSPI1_MOSI		IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT4, 0x7a4, 3, NO_PAD_CTRL)
 #define MX53_PAD_EIM_D19__GPIO_3_19		IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
 #define MX53_PAD_EIM_D20__GPIO_3_20		IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
 #define MX53_PAD_EIM_D21__GPIO_3_21		IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 2/3] ARM: i.MX53 EVK: add ecspi IOMUX setting
  2011-01-13  3:39 [PATCH v4 1/3] ARM: i.MX53: add IOMUX pad for ecspi yong.shen at freescale.com
@ 2011-01-13  3:39 ` yong.shen at freescale.com
  2011-01-13  3:48   ` Yong Shen
  2011-01-13  3:39 ` [PATCH v4 3/3] ARM: i.MX53 EVK: add spi nor device yong.shen at freescale.com
  1 sibling, 1 reply; 4+ messages in thread
From: yong.shen at freescale.com @ 2011-01-13  3:39 UTC (permalink / raw)
  To: linux-arm-kernel

From: Yong Shen <yong.shen@freescale.com>

add ecspi IOMUX setting, also fix a bug of chip select pin order

Signed-off-by: Yong Shen <yong.shen@freescale.com>
---
 arch/arm/mach-mx5/board-mx53_evk.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
index 8017d68..2cb4415 100644
--- a/arch/arm/mach-mx5/board-mx53_evk.c
+++ b/arch/arm/mach-mx5/board-mx53_evk.c
@@ -33,8 +33,8 @@
 #include <mach/iomux-mx53.h>
 
 #define SMD_FEC_PHY_RST		IMX_GPIO_NR(7, 6)
-#define EVK_ECSPI1_CS0		IMX_GPIO_NR(3, 19)
-#define EVK_ECSPI1_CS1		IMX_GPIO_NR(2, 30)
+#define EVK_ECSPI1_CS0		IMX_GPIO_NR(2, 30)
+#define EVK_ECSPI1_CS1		IMX_GPIO_NR(3, 19)
 
 #include "crm_regs.h"
 #include "devices-imx53.h"
@@ -54,6 +54,14 @@ static iomux_v3_cfg_t mx53_evk_pads[] = {
 	MX53_PAD_ATA_CS_1__UART3_RXD,
 	MX53_PAD_ATA_DA_1__UART3_CTS,
 	MX53_PAD_ATA_DA_2__UART3_RTS,
+
+	MX53_PAD_EIM_D16__CSPI1_SCLK,
+	MX53_PAD_EIM_D17__CSPI1_MISO,
+	MX53_PAD_EIM_D18__CSPI1_MOSI,
+
+	/* ecspi chip select lines */
+	MX53_PAD_EIM_EB2__GPIO_2_30,
+	MX53_PAD_EIM_D19__GPIO_3_19,
 };
 
 static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 3/3] ARM: i.MX53 EVK: add spi nor device
  2011-01-13  3:39 [PATCH v4 1/3] ARM: i.MX53: add IOMUX pad for ecspi yong.shen at freescale.com
  2011-01-13  3:39 ` [PATCH v4 2/3] ARM: i.MX53 EVK: add ecspi IOMUX setting yong.shen at freescale.com
@ 2011-01-13  3:39 ` yong.shen at freescale.com
  1 sibling, 0 replies; 4+ messages in thread
From: yong.shen at freescale.com @ 2011-01-13  3:39 UTC (permalink / raw)
  To: linux-arm-kernel

From: Yong Shen <yong.shen@freescale.com>

add spi board information for spi nor device

Signed-off-by: Yong Shen <yong.shen@freescale.com>
---
 arch/arm/mach-mx5/board-mx53_evk.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
index 2cb4415..caee04c 100644
--- a/arch/arm/mach-mx5/board-mx53_evk.c
+++ b/arch/arm/mach-mx5/board-mx53_evk.c
@@ -24,6 +24,8 @@
 #include <linux/fec.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
+#include <linux/spi/flash.h>
+#include <linux/spi/spi.h>
 #include <mach/common.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -99,6 +101,17 @@ static struct fec_platform_data mx53_evk_fec_pdata = {
 	.phy = PHY_INTERFACE_MODE_RMII,
 };
 
+static struct spi_board_info mx53_evk_spi_board_info[] __initdata = {
+	{
+		.modalias = "mtd_dataflash",
+		.max_speed_hz = 25000000,
+		.bus_num = 0,
+		.chip_select = 1,
+		.mode = SPI_MODE_0,
+		.platform_data = NULL,
+	},
+};
+
 static int mx53_evk_spi_cs[] = {
 	EVK_ECSPI1_CS0,
 	EVK_ECSPI1_CS1,
@@ -123,6 +136,8 @@ static void __init mx53_evk_board_init(void)
 	imx53_add_sdhci_esdhc_imx(0, NULL);
 	imx53_add_sdhci_esdhc_imx(1, NULL);
 
+	spi_register_board_info(mx53_evk_spi_board_info,
+		ARRAY_SIZE(mx53_evk_spi_board_info));
 	imx53_add_ecspi(0, &mx53_evk_spi_data);
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 2/3] ARM: i.MX53 EVK: add ecspi IOMUX setting
  2011-01-13  3:39 ` [PATCH v4 2/3] ARM: i.MX53 EVK: add ecspi IOMUX setting yong.shen at freescale.com
@ 2011-01-13  3:48   ` Yong Shen
  0 siblings, 0 replies; 4+ messages in thread
From: Yong Shen @ 2011-01-13  3:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi there,

Since some code are already in the tree, this patch set are based on
the latest code and reflect some comments from Uwe.

Yong

On Thu, Jan 13, 2011 at 11:39 AM,  <yong.shen@freescale.com> wrote:
> From: Yong Shen <yong.shen@freescale.com>
>
> add ecspi IOMUX setting, also fix a bug of chip select pin order
>
> Signed-off-by: Yong Shen <yong.shen@freescale.com>
> ---
> ?arch/arm/mach-mx5/board-mx53_evk.c | ? 12 ++++++++++--
> ?1 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
> index 8017d68..2cb4415 100644
> --- a/arch/arm/mach-mx5/board-mx53_evk.c
> +++ b/arch/arm/mach-mx5/board-mx53_evk.c
> @@ -33,8 +33,8 @@
> ?#include <mach/iomux-mx53.h>
>
> ?#define SMD_FEC_PHY_RST ? ? ? ? ? ? ? ?IMX_GPIO_NR(7, 6)
> -#define EVK_ECSPI1_CS0 ? ? ? ? IMX_GPIO_NR(3, 19)
> -#define EVK_ECSPI1_CS1 ? ? ? ? IMX_GPIO_NR(2, 30)
> +#define EVK_ECSPI1_CS0 ? ? ? ? IMX_GPIO_NR(2, 30)
> +#define EVK_ECSPI1_CS1 ? ? ? ? IMX_GPIO_NR(3, 19)
>
> ?#include "crm_regs.h"
> ?#include "devices-imx53.h"
> @@ -54,6 +54,14 @@ static iomux_v3_cfg_t mx53_evk_pads[] = {
> ? ? ? ?MX53_PAD_ATA_CS_1__UART3_RXD,
> ? ? ? ?MX53_PAD_ATA_DA_1__UART3_CTS,
> ? ? ? ?MX53_PAD_ATA_DA_2__UART3_RTS,
> +
> + ? ? ? MX53_PAD_EIM_D16__CSPI1_SCLK,
> + ? ? ? MX53_PAD_EIM_D17__CSPI1_MISO,
> + ? ? ? MX53_PAD_EIM_D18__CSPI1_MOSI,
> +
> + ? ? ? /* ecspi chip select lines */
> + ? ? ? MX53_PAD_EIM_EB2__GPIO_2_30,
> + ? ? ? MX53_PAD_EIM_D19__GPIO_3_19,
> ?};
>
> ?static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = {
> --
> 1.7.1
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-13  3:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13  3:39 [PATCH v4 1/3] ARM: i.MX53: add IOMUX pad for ecspi yong.shen at freescale.com
2011-01-13  3:39 ` [PATCH v4 2/3] ARM: i.MX53 EVK: add ecspi IOMUX setting yong.shen at freescale.com
2011-01-13  3:48   ` Yong Shen
2011-01-13  3:39 ` [PATCH v4 3/3] ARM: i.MX53 EVK: add spi nor device yong.shen at freescale.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).