All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] MXC: mach-mx31_3ds: Patch series that enable the support for Freescale i.MX31 3-Stack development board.
@ 2010-03-23 18:42 Alberto Panizzo
  2010-03-23 18:45 ` Alberto Panizzo
  2010-03-23 18:46 ` [PATCH 1/8] MXC: mach-mx31_3ds: Update variable names over recent mach name modification Alberto Panizzo
  0 siblings, 2 replies; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:42 UTC (permalink / raw)
  To: linux-arm-kernel

This series build the mainline architecture support for the Freescale i.MX31 3-Stack 
development board since all the drivers needed are merged in mainline from
the first 2.6.34 release candidate.

[PATCH 1/8] MXC: mach-mx31_3ds: Update variable names over recent mach name modification.

[PATCH 2/8] MXC: mach-mx31_3ds: Add support for on board NAND Flash.

[PATCH 3/8] MXC: mach-mx31_3ds: Add SPI1 device support.

[PATCH 4/8] MXC: mach-mx31_3ds: add support for freescale mc13783 power management device.

[PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board.

[PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd.

[PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad.

[PATCH 8/8] MXC: mach-mx31_3ds: enable mc13783 touchscreen interface.

Comments and/or suggestion are welcome.

Best Regards,

-- 
Alberto!

        Be Persistent!
                - Greg Kroah-Hartman (FOSDEM 2010)

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

* [PATCH 0/8] MXC: mach-mx31_3ds: Patch series that enable the support for Freescale i.MX31 3-Stack development board.
  2010-03-23 18:42 [PATCH 0/8] MXC: mach-mx31_3ds: Patch series that enable the support for Freescale i.MX31 3-Stack development board Alberto Panizzo
@ 2010-03-23 18:45 ` Alberto Panizzo
  2010-03-23 18:47   ` Alberto Panizzo
  2010-03-23 18:46 ` [PATCH 1/8] MXC: mach-mx31_3ds: Update variable names over recent mach name modification Alberto Panizzo
  1 sibling, 1 reply; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:45 UTC (permalink / raw)
  To: linux-arm-kernel

>From c6d0b6f134ea1d78f782a2057f17315e6fd6b5d1 Mon Sep 17 00:00:00 2001
From: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Date: Tue, 19 Jan 2010 16:43:45 +0100
Subject: [PATCH 1/8] MXC: mach-mx31_3ds: Update variable names over recent mach name modification.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/mach-mx31_3ds.c               |   38 +++++++-------
 arch/arm/plat-mxc/include/mach/board-mx31_3ds.h |   59 +++++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/board-mx31pdk.h  |   59 -----------------------
 3 files changed, 78 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/plat-mxc/include/mach/board-mx31_3ds.h
 delete mode 100644 arch/arm/plat-mxc/include/mach/board-mx31pdk.h

diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index b88c18a..4a94c3c 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -31,20 +31,20 @@
 #include <asm/memory.h>
 #include <asm/mach/map.h>
 #include <mach/common.h>
-#include <mach/board-mx31pdk.h>
+#include <mach/board-mx31_3ds.h>
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
 #include "devices.h"
 
 /*!
- * @file mx31pdk.c
+ * @file mx31_3ds.c
  *
  * @brief This file contains the board-specific initialization routines.
  *
  * @ingroup System
  */
 
-static int mx31pdk_pins[] = {
+static int mx31_3ds_pins[] = {
 	/* UART1 */
 	MX31_PIN_CTS1__CTS1,
 	MX31_PIN_RTS1__RTS1,
@@ -95,7 +95,7 @@ static struct platform_device smsc911x_device = {
  * LEDs, switches, interrupts for Ethernet.
  */
 
-static void mx31pdk_expio_irq_handler(uint32_t irq, struct irq_desc *desc)
+static void mx31_3ds_expio_irq_handler(uint32_t irq, struct irq_desc *desc)
 {
 	uint32_t imr_val;
 	uint32_t int_valid;
@@ -163,7 +163,7 @@ static struct irq_chip expio_irq_chip = {
 	.unmask = expio_unmask_irq,
 };
 
-static int __init mx31pdk_init_expio(void)
+static int __init mx31_3ds_init_expio(void)
 {
 	int i;
 	int ret;
@@ -176,7 +176,7 @@ static int __init mx31pdk_init_expio(void)
 		return -ENODEV;
 	}
 
-	pr_info("i.MX31PDK Debug board detected, rev = 0x%04X\n",
+	pr_info("i.MX31 3DS Debug board detected, rev = 0x%04X\n",
 		__raw_readw(CPLD_CODE_VER_REG));
 
 	/*
@@ -201,7 +201,7 @@ static int __init mx31pdk_init_expio(void)
 		set_irq_flags(i, IRQF_VALID);
 	}
 	set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW);
-	set_irq_chained_handler(EXPIO_PARENT_INT, mx31pdk_expio_irq_handler);
+	set_irq_chained_handler(EXPIO_PARENT_INT, mx31_3ds_expio_irq_handler);
 
 	return 0;
 }
@@ -209,7 +209,7 @@ static int __init mx31pdk_init_expio(void)
 /*
  * This structure defines the MX31 memory map.
  */
-static struct map_desc mx31pdk_io_desc[] __initdata = {
+static struct map_desc mx31_3ds_io_desc[] __initdata = {
 	{
 		.virtual = MX31_CS5_BASE_ADDR_VIRT,
 		.pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR),
@@ -221,10 +221,10 @@ static struct map_desc mx31pdk_io_desc[] __initdata = {
 /*
  * Set up static virtual mappings.
  */
-static void __init mx31pdk_map_io(void)
+static void __init mx31_3ds_map_io(void)
 {
 	mx31_map_io();
-	iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc));
+	iotable_init(mx31_3ds_io_desc, ARRAY_SIZE(mx31_3ds_io_desc));
 }
 
 /*!
@@ -232,35 +232,35 @@ static void __init mx31pdk_map_io(void)
  */
 static void __init mxc_board_init(void)
 {
-	mxc_iomux_setup_multiple_pins(mx31pdk_pins, ARRAY_SIZE(mx31pdk_pins),
-				      "mx31pdk");
+	mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins),
+				      "mx31_3ds");
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
 
-	if (!mx31pdk_init_expio())
+	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
 }
 
-static void __init mx31pdk_timer_init(void)
+static void __init mx31_3ds_timer_init(void)
 {
 	mx31_clocks_init(26000000);
 }
 
-static struct sys_timer mx31pdk_timer = {
-	.init	= mx31pdk_timer_init,
+static struct sys_timer mx31_3ds_timer = {
+	.init	= mx31_3ds_timer_init,
 };
 
 /*
  * The following uses standard kernel macros defined in arch.h in order to
- * initialize __mach_desc_MX31PDK data structure.
+ * initialize __mach_desc_MX31_3DS data structure.
  */
 MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
 	/* Maintainer: Freescale Semiconductor, Inc. */
 	.phys_io	= MX31_AIPS1_BASE_ADDR,
 	.io_pg_offst	= (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
 	.boot_params    = MX3x_PHYS_OFFSET + 0x100,
-	.map_io         = mx31pdk_map_io,
+	.map_io         = mx31_3ds_map_io,
 	.init_irq       = mx31_init_irq,
 	.init_machine   = mxc_board_init,
-	.timer          = &mx31pdk_timer,
+	.timer          = &mx31_3ds_timer,
 MACHINE_END
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h
new file mode 100644
index 0000000..da92933
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2008 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 version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARCH_MXC_BOARD_MX31_3DS_H__
+#define __ASM_ARCH_MXC_BOARD_MX31_3DS_H__
+
+/* Definitions for components on the Debug board */
+
+/* Base address of CPLD controller on the Debug board */
+#define DEBUG_BASE_ADDRESS		CS5_IO_ADDRESS(CS5_BASE_ADDR)
+
+/* LAN9217 ethernet base address */
+#define LAN9217_BASE_ADDR		CS5_BASE_ADDR
+
+/* CPLD config and interrupt base address */
+#define CPLD_ADDR			(DEBUG_BASE_ADDRESS + 0x20000)
+
+/* LED switchs */
+#define CPLD_LED_REG			(CPLD_ADDR + 0x00)
+/* buttons */
+#define CPLD_SWITCH_BUTTONS_REG	(EXPIO_ADDR + 0x08)
+/* status, interrupt */
+#define CPLD_INT_STATUS_REG		(CPLD_ADDR + 0x10)
+#define CPLD_INT_MASK_REG		(CPLD_ADDR + 0x38)
+#define CPLD_INT_RESET_REG		(CPLD_ADDR + 0x20)
+/* magic word for debug CPLD */
+#define CPLD_MAGIC_NUMBER1_REG		(CPLD_ADDR + 0x40)
+#define CPLD_MAGIC_NUMBER2_REG		(CPLD_ADDR + 0x48)
+/* CPLD code version */
+#define CPLD_CODE_VER_REG		(CPLD_ADDR + 0x50)
+/* magic word for debug CPLD */
+#define CPLD_MAGIC_NUMBER3_REG		(CPLD_ADDR + 0x58)
+/* module reset register */
+#define CPLD_MODULE_RESET_REG		(CPLD_ADDR + 0x60)
+/* CPU ID and Personality ID */
+#define CPLD_MCU_BOARD_ID_REG		(CPLD_ADDR + 0x68)
+
+/* CPLD IRQ line for external uart, external ethernet etc */
+#define EXPIO_PARENT_INT	IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
+
+#define MXC_EXP_IO_BASE		(MXC_BOARD_IRQ_START)
+#define MXC_IRQ_TO_EXPIO(irq)	((irq) - MXC_EXP_IO_BASE)
+
+#define EXPIO_INT_ENET		(MXC_EXP_IO_BASE + 0)
+#define EXPIO_INT_XUART_A	(MXC_EXP_IO_BASE + 1)
+#define EXPIO_INT_XUART_B	(MXC_EXP_IO_BASE + 2)
+#define EXPIO_INT_BUTTON_A	(MXC_EXP_IO_BASE + 3)
+#define EXPIO_INT_BUTTON_B	(MXC_EXP_IO_BASE + 4)
+
+#define MXC_MAX_EXP_IO_LINES	16
+
+#endif /* __ASM_ARCH_MXC_BOARD_MX31_3DS_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h b/arch/arm/plat-mxc/include/mach/board-mx31pdk.h
deleted file mode 100644
index 2bbd6ed..0000000
--- a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2008 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 version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__
-#define __ASM_ARCH_MXC_BOARD_MX31PDK_H__
-
-/* Definitions for components on the Debug board */
-
-/* Base address of CPLD controller on the Debug board */
-#define DEBUG_BASE_ADDRESS		CS5_IO_ADDRESS(CS5_BASE_ADDR)
-
-/* LAN9217 ethernet base address */
-#define LAN9217_BASE_ADDR		CS5_BASE_ADDR
-
-/* CPLD config and interrupt base address */
-#define CPLD_ADDR			(DEBUG_BASE_ADDRESS + 0x20000)
-
-/* LED switchs */
-#define CPLD_LED_REG			(CPLD_ADDR + 0x00)
-/* buttons */
-#define CPLD_SWITCH_BUTTONS_REG	(EXPIO_ADDR + 0x08)
-/* status, interrupt */
-#define CPLD_INT_STATUS_REG		(CPLD_ADDR + 0x10)
-#define CPLD_INT_MASK_REG		(CPLD_ADDR + 0x38)
-#define CPLD_INT_RESET_REG		(CPLD_ADDR + 0x20)
-/* magic word for debug CPLD */
-#define CPLD_MAGIC_NUMBER1_REG		(CPLD_ADDR + 0x40)
-#define CPLD_MAGIC_NUMBER2_REG		(CPLD_ADDR + 0x48)
-/* CPLD code version */
-#define CPLD_CODE_VER_REG		(CPLD_ADDR + 0x50)
-/* magic word for debug CPLD */
-#define CPLD_MAGIC_NUMBER3_REG		(CPLD_ADDR + 0x58)
-/* module reset register */
-#define CPLD_MODULE_RESET_REG		(CPLD_ADDR + 0x60)
-/* CPU ID and Personality ID */
-#define CPLD_MCU_BOARD_ID_REG		(CPLD_ADDR + 0x68)
-
-/* CPLD IRQ line for external uart, external ethernet etc */
-#define EXPIO_PARENT_INT	IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
-
-#define MXC_EXP_IO_BASE		(MXC_BOARD_IRQ_START)
-#define MXC_IRQ_TO_EXPIO(irq)	((irq) - MXC_EXP_IO_BASE)
-
-#define EXPIO_INT_ENET		(MXC_EXP_IO_BASE + 0)
-#define EXPIO_INT_XUART_A	(MXC_EXP_IO_BASE + 1)
-#define EXPIO_INT_XUART_B	(MXC_EXP_IO_BASE + 2)
-#define EXPIO_INT_BUTTON_A	(MXC_EXP_IO_BASE + 3)
-#define EXPIO_INT_BUTTON_B	(MXC_EXP_IO_BASE + 4)
-
-#define MXC_MAX_EXP_IO_LINES	16
-
-#endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */
-- 
1.6.3.3

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

* [PATCH 1/8] MXC: mach-mx31_3ds: Update variable names over recent mach name modification.
  2010-03-23 18:42 [PATCH 0/8] MXC: mach-mx31_3ds: Patch series that enable the support for Freescale i.MX31 3-Stack development board Alberto Panizzo
  2010-03-23 18:45 ` Alberto Panizzo
@ 2010-03-23 18:46 ` Alberto Panizzo
  2010-03-23 18:49   ` [PATCH 2/8] MXC: mach-mx31_3ds: Add support for on board NAND Flash Alberto Panizzo
  1 sibling, 1 reply; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:46 UTC (permalink / raw)
  To: linux-arm-kernel



Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/mach-mx31_3ds.c               |   38 +++++++-------
 arch/arm/plat-mxc/include/mach/board-mx31_3ds.h |   59 +++++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/board-mx31pdk.h  |   59 -----------------------
 3 files changed, 78 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/plat-mxc/include/mach/board-mx31_3ds.h
 delete mode 100644 arch/arm/plat-mxc/include/mach/board-mx31pdk.h

diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index b88c18a..4a94c3c 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -31,20 +31,20 @@
 #include <asm/memory.h>
 #include <asm/mach/map.h>
 #include <mach/common.h>
-#include <mach/board-mx31pdk.h>
+#include <mach/board-mx31_3ds.h>
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
 #include "devices.h"
 
 /*!
- * @file mx31pdk.c
+ * @file mx31_3ds.c
  *
  * @brief This file contains the board-specific initialization routines.
  *
  * @ingroup System
  */
 
-static int mx31pdk_pins[] = {
+static int mx31_3ds_pins[] = {
 	/* UART1 */
 	MX31_PIN_CTS1__CTS1,
 	MX31_PIN_RTS1__RTS1,
@@ -95,7 +95,7 @@ static struct platform_device smsc911x_device = {
  * LEDs, switches, interrupts for Ethernet.
  */
 
-static void mx31pdk_expio_irq_handler(uint32_t irq, struct irq_desc *desc)
+static void mx31_3ds_expio_irq_handler(uint32_t irq, struct irq_desc *desc)
 {
 	uint32_t imr_val;
 	uint32_t int_valid;
@@ -163,7 +163,7 @@ static struct irq_chip expio_irq_chip = {
 	.unmask = expio_unmask_irq,
 };
 
-static int __init mx31pdk_init_expio(void)
+static int __init mx31_3ds_init_expio(void)
 {
 	int i;
 	int ret;
@@ -176,7 +176,7 @@ static int __init mx31pdk_init_expio(void)
 		return -ENODEV;
 	}
 
-	pr_info("i.MX31PDK Debug board detected, rev = 0x%04X\n",
+	pr_info("i.MX31 3DS Debug board detected, rev = 0x%04X\n",
 		__raw_readw(CPLD_CODE_VER_REG));
 
 	/*
@@ -201,7 +201,7 @@ static int __init mx31pdk_init_expio(void)
 		set_irq_flags(i, IRQF_VALID);
 	}
 	set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW);
-	set_irq_chained_handler(EXPIO_PARENT_INT, mx31pdk_expio_irq_handler);
+	set_irq_chained_handler(EXPIO_PARENT_INT, mx31_3ds_expio_irq_handler);
 
 	return 0;
 }
@@ -209,7 +209,7 @@ static int __init mx31pdk_init_expio(void)
 /*
  * This structure defines the MX31 memory map.
  */
-static struct map_desc mx31pdk_io_desc[] __initdata = {
+static struct map_desc mx31_3ds_io_desc[] __initdata = {
 	{
 		.virtual = MX31_CS5_BASE_ADDR_VIRT,
 		.pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR),
@@ -221,10 +221,10 @@ static struct map_desc mx31pdk_io_desc[] __initdata = {
 /*
  * Set up static virtual mappings.
  */
-static void __init mx31pdk_map_io(void)
+static void __init mx31_3ds_map_io(void)
 {
 	mx31_map_io();
-	iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc));
+	iotable_init(mx31_3ds_io_desc, ARRAY_SIZE(mx31_3ds_io_desc));
 }
 
 /*!
@@ -232,35 +232,35 @@ static void __init mx31pdk_map_io(void)
  */
 static void __init mxc_board_init(void)
 {
-	mxc_iomux_setup_multiple_pins(mx31pdk_pins, ARRAY_SIZE(mx31pdk_pins),
-				      "mx31pdk");
+	mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins),
+				      "mx31_3ds");
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
 
-	if (!mx31pdk_init_expio())
+	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
 }
 
-static void __init mx31pdk_timer_init(void)
+static void __init mx31_3ds_timer_init(void)
 {
 	mx31_clocks_init(26000000);
 }
 
-static struct sys_timer mx31pdk_timer = {
-	.init	= mx31pdk_timer_init,
+static struct sys_timer mx31_3ds_timer = {
+	.init	= mx31_3ds_timer_init,
 };
 
 /*
  * The following uses standard kernel macros defined in arch.h in order to
- * initialize __mach_desc_MX31PDK data structure.
+ * initialize __mach_desc_MX31_3DS data structure.
  */
 MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
 	/* Maintainer: Freescale Semiconductor, Inc. */
 	.phys_io	= MX31_AIPS1_BASE_ADDR,
 	.io_pg_offst	= (MX31_AIPS1_BASE_ADDR_VIRT >> 18) & 0xfffc,
 	.boot_params    = MX3x_PHYS_OFFSET + 0x100,
-	.map_io         = mx31pdk_map_io,
+	.map_io         = mx31_3ds_map_io,
 	.init_irq       = mx31_init_irq,
 	.init_machine   = mxc_board_init,
-	.timer          = &mx31pdk_timer,
+	.timer          = &mx31_3ds_timer,
 MACHINE_END
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h
new file mode 100644
index 0000000..da92933
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2008 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 version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARCH_MXC_BOARD_MX31_3DS_H__
+#define __ASM_ARCH_MXC_BOARD_MX31_3DS_H__
+
+/* Definitions for components on the Debug board */
+
+/* Base address of CPLD controller on the Debug board */
+#define DEBUG_BASE_ADDRESS		CS5_IO_ADDRESS(CS5_BASE_ADDR)
+
+/* LAN9217 ethernet base address */
+#define LAN9217_BASE_ADDR		CS5_BASE_ADDR
+
+/* CPLD config and interrupt base address */
+#define CPLD_ADDR			(DEBUG_BASE_ADDRESS + 0x20000)
+
+/* LED switchs */
+#define CPLD_LED_REG			(CPLD_ADDR + 0x00)
+/* buttons */
+#define CPLD_SWITCH_BUTTONS_REG	(EXPIO_ADDR + 0x08)
+/* status, interrupt */
+#define CPLD_INT_STATUS_REG		(CPLD_ADDR + 0x10)
+#define CPLD_INT_MASK_REG		(CPLD_ADDR + 0x38)
+#define CPLD_INT_RESET_REG		(CPLD_ADDR + 0x20)
+/* magic word for debug CPLD */
+#define CPLD_MAGIC_NUMBER1_REG		(CPLD_ADDR + 0x40)
+#define CPLD_MAGIC_NUMBER2_REG		(CPLD_ADDR + 0x48)
+/* CPLD code version */
+#define CPLD_CODE_VER_REG		(CPLD_ADDR + 0x50)
+/* magic word for debug CPLD */
+#define CPLD_MAGIC_NUMBER3_REG		(CPLD_ADDR + 0x58)
+/* module reset register */
+#define CPLD_MODULE_RESET_REG		(CPLD_ADDR + 0x60)
+/* CPU ID and Personality ID */
+#define CPLD_MCU_BOARD_ID_REG		(CPLD_ADDR + 0x68)
+
+/* CPLD IRQ line for external uart, external ethernet etc */
+#define EXPIO_PARENT_INT	IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
+
+#define MXC_EXP_IO_BASE		(MXC_BOARD_IRQ_START)
+#define MXC_IRQ_TO_EXPIO(irq)	((irq) - MXC_EXP_IO_BASE)
+
+#define EXPIO_INT_ENET		(MXC_EXP_IO_BASE + 0)
+#define EXPIO_INT_XUART_A	(MXC_EXP_IO_BASE + 1)
+#define EXPIO_INT_XUART_B	(MXC_EXP_IO_BASE + 2)
+#define EXPIO_INT_BUTTON_A	(MXC_EXP_IO_BASE + 3)
+#define EXPIO_INT_BUTTON_B	(MXC_EXP_IO_BASE + 4)
+
+#define MXC_MAX_EXP_IO_LINES	16
+
+#endif /* __ASM_ARCH_MXC_BOARD_MX31_3DS_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h b/arch/arm/plat-mxc/include/mach/board-mx31pdk.h
deleted file mode 100644
index 2bbd6ed..0000000
--- a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2008 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 version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__
-#define __ASM_ARCH_MXC_BOARD_MX31PDK_H__
-
-/* Definitions for components on the Debug board */
-
-/* Base address of CPLD controller on the Debug board */
-#define DEBUG_BASE_ADDRESS		CS5_IO_ADDRESS(CS5_BASE_ADDR)
-
-/* LAN9217 ethernet base address */
-#define LAN9217_BASE_ADDR		CS5_BASE_ADDR
-
-/* CPLD config and interrupt base address */
-#define CPLD_ADDR			(DEBUG_BASE_ADDRESS + 0x20000)
-
-/* LED switchs */
-#define CPLD_LED_REG			(CPLD_ADDR + 0x00)
-/* buttons */
-#define CPLD_SWITCH_BUTTONS_REG	(EXPIO_ADDR + 0x08)
-/* status, interrupt */
-#define CPLD_INT_STATUS_REG		(CPLD_ADDR + 0x10)
-#define CPLD_INT_MASK_REG		(CPLD_ADDR + 0x38)
-#define CPLD_INT_RESET_REG		(CPLD_ADDR + 0x20)
-/* magic word for debug CPLD */
-#define CPLD_MAGIC_NUMBER1_REG		(CPLD_ADDR + 0x40)
-#define CPLD_MAGIC_NUMBER2_REG		(CPLD_ADDR + 0x48)
-/* CPLD code version */
-#define CPLD_CODE_VER_REG		(CPLD_ADDR + 0x50)
-/* magic word for debug CPLD */
-#define CPLD_MAGIC_NUMBER3_REG		(CPLD_ADDR + 0x58)
-/* module reset register */
-#define CPLD_MODULE_RESET_REG		(CPLD_ADDR + 0x60)
-/* CPU ID and Personality ID */
-#define CPLD_MCU_BOARD_ID_REG		(CPLD_ADDR + 0x68)
-
-/* CPLD IRQ line for external uart, external ethernet etc */
-#define EXPIO_PARENT_INT	IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
-
-#define MXC_EXP_IO_BASE		(MXC_BOARD_IRQ_START)
-#define MXC_IRQ_TO_EXPIO(irq)	((irq) - MXC_EXP_IO_BASE)
-
-#define EXPIO_INT_ENET		(MXC_EXP_IO_BASE + 0)
-#define EXPIO_INT_XUART_A	(MXC_EXP_IO_BASE + 1)
-#define EXPIO_INT_XUART_B	(MXC_EXP_IO_BASE + 2)
-#define EXPIO_INT_BUTTON_A	(MXC_EXP_IO_BASE + 3)
-#define EXPIO_INT_BUTTON_B	(MXC_EXP_IO_BASE + 4)
-
-#define MXC_MAX_EXP_IO_LINES	16
-
-#endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */
-- 
1.6.3.3

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

* [PATCH 0/8] MXC: mach-mx31_3ds: Patch series that enable the support for Freescale i.MX31 3-Stack development board.
  2010-03-23 18:45 ` Alberto Panizzo
@ 2010-03-23 18:47   ` Alberto Panizzo
  0 siblings, 0 replies; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:47 UTC (permalink / raw)
  To: linux-arm-kernel

junk

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

* [PATCH 2/8] MXC: mach-mx31_3ds: Add support for on board NAND Flash.
  2010-03-23 18:46 ` [PATCH 1/8] MXC: mach-mx31_3ds: Update variable names over recent mach name modification Alberto Panizzo
@ 2010-03-23 18:49   ` Alberto Panizzo
  2010-03-23 18:50     ` [PATCH 3/8] MXC: mach-mx31_3ds: Add SPI1 device support Alberto Panizzo
  0 siblings, 1 reply; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:49 UTC (permalink / raw)
  To: linux-arm-kernel

Since the using of Bad Block Table is not constantly a good behave
I had made it configurable.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/Kconfig         |    9 +++++++++
 arch/arm/mach-mx3/mach-mx31_3ds.c |   13 +++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 3872af1..9a2911e 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -62,6 +62,15 @@ config MACH_MX31_3DS
 	  Include support for MX31PDK (3DS) platform. This includes specific
 	  configurations for the board and its peripherals.
 
+config MACH_MX31_3DS_MXC_NAND_USE_BBT
+	bool "Make the MXC NAND driver use the in flash Bad Block Table"
+	depends on MACH_MX31_3DS
+	depends on MTD_NAND_MXC
+	help
+	  Enable this if you want that the MXC NAND driver uses the in flash
+	  Bad Block Table to know what blocks are bad instead of scanning the
+	  entire flash looking for bad block markers.
+
 config MACH_MX31MOBOARD
 	bool "Support mx31moboard platforms (EPFL Mobots group)"
 	select ARCH_MX31
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 4a94c3c..bf1f54a 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -34,6 +34,7 @@
 #include <mach/board-mx31_3ds.h>
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
+#include <mach/mxc_nand.h>
 #include "devices.h"
 
 /*!
@@ -53,6 +54,17 @@ static int mx31_3ds_pins[] = {
 	IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO),
 };
 
+/*
+ * NAND Flash
+ */
+static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = {
+	.width		= 1,
+	.hw_ecc		= 1,
+#ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT
+	.flash_bbt	= 1,
+#endif
+};
+
 static struct imxuart_platform_data uart_pdata = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
@@ -236,6 +248,7 @@ static void __init mxc_board_init(void)
 				      "mx31_3ds");
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
+	mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata);
 
 	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
-- 
1.6.3.3

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

* [PATCH 3/8] MXC: mach-mx31_3ds: Add SPI1 device support.
  2010-03-23 18:49   ` [PATCH 2/8] MXC: mach-mx31_3ds: Add support for on board NAND Flash Alberto Panizzo
@ 2010-03-23 18:50     ` Alberto Panizzo
  2010-03-23 18:51       ` [PATCH 4/8] MXC: mach-mx31_3ds: add support for freescale mc13783 power management device Alberto Panizzo
  0 siblings, 1 reply; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:50 UTC (permalink / raw)
  To: linux-arm-kernel



Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/mach-mx31_3ds.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index bf1f54a..80179cf 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -35,6 +35,7 @@
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
 #include <mach/mxc_nand.h>
+#include <mach/spi.h>
 #include "devices.h"
 
 /*!
@@ -52,6 +53,24 @@ static int mx31_3ds_pins[] = {
 	MX31_PIN_TXD1__TXD1,
 	MX31_PIN_RXD1__RXD1,
 	IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO),
+	/* SPI 1 */
+	MX31_PIN_CSPI2_SCLK__SCLK,
+	MX31_PIN_CSPI2_MOSI__MOSI,
+	MX31_PIN_CSPI2_MISO__MISO,
+	MX31_PIN_CSPI2_SPI_RDY__SPI_RDY,
+	MX31_PIN_CSPI2_SS0__SS0,
+	MX31_PIN_CSPI2_SS2__SS2, /*CS for MC13783 */
+};
+
+/* SPI */
+static int spi1_internal_chipselect[] = {
+	MXC_SPI_CS(0),
+	MXC_SPI_CS(2),
+};
+
+static struct spi_imx_master spi1_pdata = {
+	.chipselect	= spi1_internal_chipselect,
+	.num_chipselect	= ARRAY_SIZE(spi1_internal_chipselect),
 };
 
 /*
@@ -249,6 +268,7 @@ static void __init mxc_board_init(void)
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
 	mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata);
+	mxc_register_device(&mxc_spi_device1, &spi1_pdata);
 
 	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
-- 
1.6.3.3

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

* [PATCH 4/8] MXC: mach-mx31_3ds: add support for freescale mc13783 power management device.
  2010-03-23 18:50     ` [PATCH 3/8] MXC: mach-mx31_3ds: Add SPI1 device support Alberto Panizzo
@ 2010-03-23 18:51       ` Alberto Panizzo
  2010-03-23 18:53         ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Alberto Panizzo
  0 siblings, 1 reply; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:51 UTC (permalink / raw)
  To: linux-arm-kernel

Power Gates must to be always enabled.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/mach-mx31_3ds.c |   45 +++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 80179cf..f54af1e 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -23,6 +23,9 @@
 #include <linux/gpio.h>
 #include <linux/smsc911x.h>
 #include <linux/platform_device.h>
+#include <linux/mfd/mc13783.h>
+#include <linux/spi/spi.h>
+#include <linux/regulator/machine.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -60,6 +63,33 @@ static int mx31_3ds_pins[] = {
 	MX31_PIN_CSPI2_SPI_RDY__SPI_RDY,
 	MX31_PIN_CSPI2_SS0__SS0,
 	MX31_PIN_CSPI2_SS2__SS2, /*CS for MC13783 */
+	/* MC13783 IRQ */
+	IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO),
+};
+
+/* Regulators */
+static struct regulator_init_data pwgtx_init = {
+	.constraints = {
+		.boot_on	= 1,
+		.always_on	= 1,
+	},
+};
+
+static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
+	{
+		.id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */
+		.init_data = &pwgtx_init,
+	}, {
+		.id = MC13783_REGU_PWGT2SPI, /* Power Gate for L2 Cache. */
+		.init_data = &pwgtx_init,
+	},
+};
+
+/* MC13783 */
+static struct mc13783_platform_data mc13783_pdata __initdata = {
+	.regulators = mx31_3ds_regulators,
+	.num_regulators = ARRAY_SIZE(mx31_3ds_regulators),
+	.flags  = MC13783_USE_REGULATOR,
 };
 
 /* SPI */
@@ -73,6 +103,18 @@ static struct spi_imx_master spi1_pdata = {
 	.num_chipselect	= ARRAY_SIZE(spi1_internal_chipselect),
 };
 
+static struct spi_board_info mx31_3ds_spi_devs[] __initdata = {
+	{
+		.modalias	= "mc13783",
+		.max_speed_hz	= 1000000,
+		.bus_num	= 1,
+		.chip_select	= 1, /* SS2 */
+		.platform_data	= &mc13783_pdata,
+		.irq		= IOMUX_TO_IRQ(MX31_PIN_GPIO1_3),
+		.mode = SPI_CS_HIGH,
+	},
+};
+
 /*
  * NAND Flash
  */
@@ -268,7 +310,10 @@ static void __init mxc_board_init(void)
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
 	mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata);
+
 	mxc_register_device(&mxc_spi_device1, &spi1_pdata);
+	spi_register_board_info(mx31_3ds_spi_devs,
+						ARRAY_SIZE(mx31_3ds_spi_devs));
 
 	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
-- 
1.6.3.3

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

* [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board.
  2010-03-23 18:51       ` [PATCH 4/8] MXC: mach-mx31_3ds: add support for freescale mc13783 power management device Alberto Panizzo
@ 2010-03-23 18:53         ` Alberto Panizzo
  2010-03-23 18:54           ` [PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd Alberto Panizzo
                             ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

The lock detection goes through the pmic and need to be implemented.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/mach-mx31_3ds.c |  164 +++++++++++++++++++++++++++++++++++++
 1 files changed, 164 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index f54af1e..51e060c 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -26,6 +26,9 @@
 #include <linux/mfd/mc13783.h>
 #include <linux/spi/spi.h>
 #include <linux/regulator/machine.h>
+#include <linux/regulator/consumer.h>
+#include <linux/log2.h>
+#include <linux/err.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -39,6 +42,7 @@
 #include <mach/iomux-mx3.h>
 #include <mach/mxc_nand.h>
 #include <mach/spi.h>
+#include <mach/mmc.h>
 #include "devices.h"
 
 /*!
@@ -65,6 +69,112 @@ static int mx31_3ds_pins[] = {
 	MX31_PIN_CSPI2_SS2__SS2, /*CS for MC13783 */
 	/* MC13783 IRQ */
 	IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO),
+	/* SDHC1 */
+	MX31_PIN_SD1_DATA3__SD1_DATA3,
+	MX31_PIN_SD1_DATA2__SD1_DATA2,
+	MX31_PIN_SD1_DATA1__SD1_DATA1,
+	MX31_PIN_SD1_DATA0__SD1_DATA0,
+	MX31_PIN_SD1_CLK__SD1_CLK,
+	MX31_PIN_SD1_CMD__SD1_CMD,
+	MX31_PIN_GPIO3_0__GPIO3_0, /*OE*/
+};
+
+/*
+ * Support for SD card slot in personality board
+ */
+static struct regulator *vmmc_reg;
+
+static int mx31_3ds_sd1_init(struct device *dev,
+				   irq_handler_t detect_irq, void *data)
+{
+	int ret;
+	int gpio_det, gpio_bus_en;
+
+	gpio_det = IOMUX_TO_GPIO(MX31_PIN_GPIO3_1);
+	gpio_bus_en = IOMUX_TO_GPIO(MX31_PIN_GPIO3_0);
+
+	ret = gpio_request(gpio_det, "sd1-card-detect");
+	if (ret) {
+		pr_warning("Unable to request sd card detect gpio.\n");
+		return ret;
+	}
+
+	ret = gpio_request(gpio_bus_en, "sd1-bus-enable");
+	if (ret) {
+		pr_warning("Unable to request sd card bus enable gpio.\n");
+		goto gpio_free;
+	}
+
+	gpio_direction_input(gpio_det);
+	ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
+			  detect_irq, IRQF_DISABLED |
+			  IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+			  "sd1-detect", data);
+
+	if (ret) {
+		pr_warning("Unable to request sd card detect irq.\n");
+		goto gpio_free_all;
+	}
+
+	vmmc_reg = regulator_get(dev, "sd1_vdd");
+
+	if (IS_ERR(vmmc_reg)) {
+		pr_err("%s: Unable to get VMMC2 regulator\n", __func__);
+		goto gpio_free_all;
+	}
+
+	return 0;
+
+gpio_free_all:
+	gpio_free(gpio_bus_en);
+gpio_free:
+	gpio_free(gpio_det);
+	return ret;
+}
+
+static void mx31_3ds_sd1_exit(struct device *dev, void *data)
+{
+	/* Free SD regulator, CardDetect irq and gpio */
+	regulator_put(vmmc_reg);
+	free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), data);
+	gpio_free(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1));
+	gpio_free(IOMUX_TO_GPIO(MX31_PIN_GPIO3_0));
+}
+
+static void mx31_3ds_setpower(struct device *dev, unsigned int vdd)
+{
+	int voltage = 0;
+
+	if (vdd <= ilog2(MMC_VDD_165_195))
+		voltage = 1800000;
+	else if (vdd == ilog2(MMC_VDD_20_21))
+		voltage = 2000000;
+	else
+		voltage = 2000000 + (vdd - 7) * 100000;
+
+	pr_debug("%s: vdd = %d -> REGU_VMMC2 = %d\n", __func__, vdd, voltage);
+
+	regulator_set_voltage(vmmc_reg, voltage, voltage);
+
+	/*
+	 * Active the Buffer Enable Pin only if there is
+	 * a card in slot.
+	 * To fix the card voltage issue caused by
+	 * bi-directional chip TXB0108 on 3Stack
+	 */
+	if (voltage > 1800000)
+		gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_GPIO3_0), 1);
+	else
+		gpio_set_value(IOMUX_TO_GPIO(MX31_PIN_GPIO3_0), 0);
+}
+
+static struct imxmmc_platform_data sdhc1_pdata = {
+	.init	= mx31_3ds_sd1_init,
+	.exit	= mx31_3ds_sd1_exit,
+	.ocr_avail = MMC_VDD_165_195 | MMC_VDD_20_21 | MMC_VDD_25_26 |
+		     MMC_VDD_26_27 | MMC_VDD_27_28 | MMC_VDD_28_29 |
+		     MMC_VDD_29_30,
+	.setpower = mx31_3ds_setpower,
 };
 
 /* Regulators */
@@ -75,6 +185,46 @@ static struct regulator_init_data pwgtx_init = {
 	},
 };
 
+static struct regulator_init_data gpo1_init = {
+	.constraints = {
+		.boot_on	= 1,
+		.always_on	= 1,
+	},
+};
+
+static struct regulator_consumer_supply gpo3_consumers[] = {
+	{
+		.dev	= &mxcsdhc_device0.dev,
+		.supply	= "vdd_sd1_io",
+	},
+};
+
+static struct regulator_init_data gpo3_init = {
+	.constraints = {
+		.boot_on	= 1,
+		.always_on	= 1,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(gpo3_consumers),
+	.consumer_supplies = gpo3_consumers,
+};
+
+static struct regulator_consumer_supply vmmc2_consumers[] = {
+	{
+		.dev	= &mxcsdhc_device0.dev,
+		.supply	= "sd1_vdd",
+	},
+};
+
+static struct regulator_init_data vmmc2_init = {
+	.constraints = {
+		.min_uV = 1600000,
+		.max_uV = 3000000,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(vmmc2_consumers),
+	.consumer_supplies = vmmc2_consumers,
+};
+
 static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
 	{
 		.id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */
@@ -82,6 +232,18 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
 	}, {
 		.id = MC13783_REGU_PWGT2SPI, /* Power Gate for L2 Cache. */
 		.init_data = &pwgtx_init,
+	}, {
+		.id = MC13783_REGU_GPO1, /* GPO1 -> enables 3v
+					  * for personality. */
+		.init_data = &gpo1_init,
+	}, {
+		.id = MC13783_REGU_GPO3, /* GPO3 -> enables SW2B 1.8V out
+					  * this becomes 1V8 on personality
+					  * board. */
+		.init_data = &gpo3_init,
+	}, {
+		.id = MC13783_REGU_VMMC2,
+		.init_data = &vmmc2_init,
 	},
 };
 
@@ -315,6 +477,8 @@ static void __init mxc_board_init(void)
 	spi_register_board_info(mx31_3ds_spi_devs,
 						ARRAY_SIZE(mx31_3ds_spi_devs));
 
+	mxc_register_device(&mxcsdhc_device0, &sdhc1_pdata);
+
 	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
 }
-- 
1.6.3.3

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

* [PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd.
  2010-03-23 18:53         ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Alberto Panizzo
@ 2010-03-23 18:54           ` Alberto Panizzo
  2010-03-23 18:57             ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Alberto Panizzo
  2010-03-24 13:26           ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Mark Brown
  2010-03-25  7:27           ` Sascha Hauer
  2 siblings, 1 reply; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:54 UTC (permalink / raw)
  To: linux-arm-kernel



Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/mach-mx31_3ds.c |  130 +++++++++++++++++++++++++++++++++++++
 1 files changed, 130 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 51e060c..46ccb6c 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -25,6 +25,7 @@
 #include <linux/platform_device.h>
 #include <linux/mfd/mc13783.h>
 #include <linux/spi/spi.h>
+#include <linux/spi/l4f00242t03.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/consumer.h>
 #include <linux/log2.h>
@@ -43,6 +44,8 @@
 #include <mach/mxc_nand.h>
 #include <mach/spi.h>
 #include <mach/mmc.h>
+#include <mach/ipu.h>
+#include <mach/mx3fb.h>
 #include "devices.h"
 
 /*!
@@ -60,6 +63,12 @@ static int mx31_3ds_pins[] = {
 	MX31_PIN_TXD1__TXD1,
 	MX31_PIN_RXD1__RXD1,
 	IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO),
+	/*SPI0*/
+	MX31_PIN_CSPI1_SCLK__SCLK,
+	MX31_PIN_CSPI1_MOSI__MOSI,
+	MX31_PIN_CSPI1_MISO__MISO,
+	MX31_PIN_CSPI1_SPI_RDY__SPI_RDY,
+	MX31_PIN_CSPI1_SS2__SS2, /*CS for LCD */
 	/* SPI 1 */
 	MX31_PIN_CSPI2_SCLK__SCLK,
 	MX31_PIN_CSPI2_MOSI__MOSI,
@@ -77,6 +86,70 @@ static int mx31_3ds_pins[] = {
 	MX31_PIN_SD1_CLK__SD1_CLK,
 	MX31_PIN_SD1_CMD__SD1_CMD,
 	MX31_PIN_GPIO3_0__GPIO3_0, /*OE*/
+	/* Framebuffer */
+	MX31_PIN_LD0__LD0,
+	MX31_PIN_LD1__LD1,
+	MX31_PIN_LD2__LD2,
+	MX31_PIN_LD3__LD3,
+	MX31_PIN_LD4__LD4,
+	MX31_PIN_LD5__LD5,
+	MX31_PIN_LD6__LD6,
+	MX31_PIN_LD7__LD7,
+	MX31_PIN_LD8__LD8,
+	MX31_PIN_LD9__LD9,
+	MX31_PIN_LD10__LD10,
+	MX31_PIN_LD11__LD11,
+	MX31_PIN_LD12__LD12,
+	MX31_PIN_LD13__LD13,
+	MX31_PIN_LD14__LD14,
+	MX31_PIN_LD15__LD15,
+	MX31_PIN_LD16__LD16,
+	MX31_PIN_LD17__LD17,
+	MX31_PIN_VSYNC3__VSYNC3,
+	MX31_PIN_HSYNC__HSYNC,
+	MX31_PIN_FPSHIFT__FPSHIFT,
+	MX31_PIN_CONTRAST__CONTRAST,
+};
+
+/*
+ * FB support
+ */
+static const struct fb_videomode fb_modedb[] = {
+	{	/* 480x640 @ 60 Hz */
+		.name		= "Epson-VGA",
+		.refresh	= 60,
+		.xres		= 480,
+		.yres		= 640,
+		.pixclock	= 41701,
+		.left_margin	= 20,
+		.right_margin	= 41,
+		.upper_margin	= 10,
+		.lower_margin	= 5,
+		.hsync_len	= 20,
+		.vsync_len	= 10,
+		.sync		= FB_SYNC_OE_ACT_HIGH | FB_SYNC_CLK_INVERT,
+		.vmode		= FB_VMODE_NONINTERLACED,
+		.flag		= 0,
+	},
+};
+
+static struct ipu_platform_data mx3_ipu_data = {
+	.irq_base = MXC_IPU_IRQ_START,
+};
+
+static struct mx3fb_platform_data mx3fb_pdata = {
+	.dma_dev	= &mx3_ipu.dev,
+	.name		= "Epson-VGA",
+	.mode		= fb_modedb,
+	.num_modes	= ARRAY_SIZE(fb_modedb),
+};
+
+/* LCD */
+static struct l4f00242t03_pdata mx31_3ds_l4f00242t03_pdata = {
+	.reset_gpio =		IOMUX_TO_GPIO(MX31_PIN_LCS1),
+	.data_enable_gpio =	IOMUX_TO_GPIO(MX31_PIN_SER_RS),
+	.core_supply =		"lcd_2v8",
+	.io_supply =		"vdd_lcdio",
 };
 
 /*
@@ -225,6 +298,38 @@ static struct regulator_init_data vmmc2_init = {
 	.consumer_supplies = vmmc2_consumers,
 };
 
+static struct regulator_consumer_supply vmmc1_consumers[] = {
+	{
+		.supply	= "lcd_2v8",
+	},
+};
+
+static struct regulator_init_data vmmc1_init = {
+	.constraints = {
+		.min_uV = 2800000,
+		.max_uV = 2800000,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers),
+	.consumer_supplies = vmmc1_consumers,
+};
+
+static struct regulator_consumer_supply vgen_consumers[] = {
+	{
+		.supply	= "vdd_lcdio",
+	},
+};
+
+static struct regulator_init_data vgen_init = {
+	.constraints = {
+		.min_uV = 1800000,
+		.max_uV = 1800000,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(vgen_consumers),
+	.consumer_supplies = vgen_consumers,
+};
+
 static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
 	{
 		.id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */
@@ -244,6 +349,12 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
 	}, {
 		.id = MC13783_REGU_VMMC2,
 		.init_data = &vmmc2_init,
+	}, {
+		.id = MC13783_REGU_VMMC1,
+		.init_data = &vmmc1_init,
+	}, {
+		.id = MC13783_REGU_VGEN,
+		.init_data = &vgen_init,
 	},
 };
 
@@ -255,6 +366,15 @@ static struct mc13783_platform_data mc13783_pdata __initdata = {
 };
 
 /* SPI */
+static int spi0_internal_chipselect[] = {
+	MXC_SPI_CS(2),
+};
+
+static struct spi_imx_master spi0_pdata = {
+	.chipselect	= spi0_internal_chipselect,
+	.num_chipselect	= ARRAY_SIZE(spi0_internal_chipselect),
+};
+
 static int spi1_internal_chipselect[] = {
 	MXC_SPI_CS(0),
 	MXC_SPI_CS(2),
@@ -274,6 +394,12 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = {
 		.platform_data	= &mc13783_pdata,
 		.irq		= IOMUX_TO_IRQ(MX31_PIN_GPIO1_3),
 		.mode = SPI_CS_HIGH,
+	}, {
+		.modalias	= "l4f00242t03",
+		.max_speed_hz	= 5000000,
+		.bus_num	= 0,
+		.chip_select	= 0, /* SS2 */
+		.platform_data	= &mx31_3ds_l4f00242t03_pdata,
 	},
 };
 
@@ -479,6 +605,10 @@ static void __init mxc_board_init(void)
 
 	mxc_register_device(&mxcsdhc_device0, &sdhc1_pdata);
 
+	mxc_register_device(&mxc_spi_device0, &spi0_pdata);
+	mxc_register_device(&mx3_ipu, &mx3_ipu_data);
+	mxc_register_device(&mx3_fb, &mx3fb_pdata);
+
 	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
 }
-- 
1.6.3.3

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

* [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad.
  2010-03-23 18:54           ` [PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd Alberto Panizzo
@ 2010-03-23 18:57             ` Alberto Panizzo
  2010-03-23 18:58               ` [PATCH 8/8] MXC: mach-mx31_3ds: enable mc13783 touchscreen interface Alberto Panizzo
  2010-05-14 12:32               ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Magnus Lilja
  0 siblings, 2 replies; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:57 UTC (permalink / raw)
  To: linux-arm-kernel

The kpp device is not a board private one, so it have to be defined
in devices.c

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/devices.c       |   19 +++++++++++++++++++
 arch/arm/mach-mx3/devices.h       |    1 +
 arch/arm/mach-mx3/mach-mx31_3ds.c |   32 ++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index 6adb586..539a08d 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -575,6 +575,25 @@ struct platform_device imx_ssi_device1 = {
 	.resource = imx_ssi_resources1,
 };
 
+static struct resource imx_kpp_resources[] = {
+	{
+		.start	= MX3x_KPP_BASE_ADDR,
+		.end	= MX3x_KPP_BASE_ADDR + 0xf,
+		.flags	= IORESOURCE_MEM
+	}, {
+		.start	= MX3x_INT_KPP,
+		.end	= MX3x_INT_KPP,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+struct platform_device imx_kpp_device = {
+	.name = "imx-keypad",
+	.id = -1,
+	.num_resources = ARRAY_SIZE(imx_kpp_resources),
+	.resource = imx_kpp_resources,
+};
+
 static int mx3_devices_init(void)
 {
 	if (cpu_is_mx31()) {
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index 42cf175..4ca2a18 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -25,4 +25,5 @@ extern struct platform_device mxc_spi_device1;
 extern struct platform_device mxc_spi_device2;
 extern struct platform_device imx_ssi_device0;
 extern struct platform_device imx_ssi_device1;
+extern struct platform_device imx_kpp_device;
 
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 46ccb6c..258e8d1 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -30,6 +30,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/log2.h>
 #include <linux/err.h>
+#include <linux/input/matrix_keypad.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -109,6 +110,35 @@ static int mx31_3ds_pins[] = {
 	MX31_PIN_HSYNC__HSYNC,
 	MX31_PIN_FPSHIFT__FPSHIFT,
 	MX31_PIN_CONTRAST__CONTRAST,
+	/*Keyboard*/
+	IOMUX_MODE(MX31_PIN_KEY_ROW0, IOMUX_CONFIG_FUNC),
+	IOMUX_MODE(MX31_PIN_KEY_ROW1, IOMUX_CONFIG_FUNC),
+	IOMUX_MODE(MX31_PIN_KEY_ROW2, IOMUX_CONFIG_FUNC),
+	IOMUX_MODE(MX31_PIN_KEY_COL0, IOMUX_CONFIG_FUNC),
+	IOMUX_MODE(MX31_PIN_KEY_COL1, IOMUX_CONFIG_FUNC),
+	IOMUX_MODE(MX31_PIN_KEY_COL2, IOMUX_CONFIG_FUNC),
+	IOMUX_MODE(MX31_PIN_KEY_COL3, IOMUX_CONFIG_FUNC),
+};
+
+/*
+ * Matrix keyboard
+ */
+
+static const uint32_t mx31_3ds_keymap[] = {
+	KEY(0, 0, KEY_UP),
+	KEY(0, 1, KEY_DOWN),
+	KEY(1, 0, KEY_RIGHT),
+	KEY(1, 1, KEY_LEFT),
+	KEY(1, 2, KEY_ENTER),
+	KEY(2, 0, KEY_F6),
+	KEY(2, 1, KEY_F8),
+	KEY(2, 2, KEY_F9),
+	KEY(2, 3, KEY_F10),
+};
+
+static struct matrix_keymap_data mx31_3ds_keymap_data = {
+	.keymap		= mx31_3ds_keymap,
+	.keymap_size	= ARRAY_SIZE(mx31_3ds_keymap),
 };
 
 /*
@@ -609,6 +639,8 @@ static void __init mxc_board_init(void)
 	mxc_register_device(&mx3_ipu, &mx3_ipu_data);
 	mxc_register_device(&mx3_fb, &mx3fb_pdata);
 
+	mxc_register_device(&imx_kpp_device, &mx31_3ds_keymap_data);
+
 	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
 }
-- 
1.6.3.3

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

* [PATCH 8/8] MXC: mach-mx31_3ds: enable mc13783 touchscreen interface.
  2010-03-23 18:57             ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Alberto Panizzo
@ 2010-03-23 18:58               ` Alberto Panizzo
  2010-05-14 12:32               ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Magnus Lilja
  1 sibling, 0 replies; 18+ messages in thread
From: Alberto Panizzo @ 2010-03-23 18:58 UTC (permalink / raw)
  To: linux-arm-kernel


Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/mach-mx31_3ds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 258e8d1..a430b5b 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -392,7 +392,7 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
 static struct mc13783_platform_data mc13783_pdata __initdata = {
 	.regulators = mx31_3ds_regulators,
 	.num_regulators = ARRAY_SIZE(mx31_3ds_regulators),
-	.flags  = MC13783_USE_REGULATOR,
+	.flags  = MC13783_USE_REGULATOR | MC13783_USE_TOUCHSCREEN,
 };
 
 /* SPI */
-- 
1.6.3.3

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

* [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board.
  2010-03-23 18:53         ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Alberto Panizzo
  2010-03-23 18:54           ` [PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd Alberto Panizzo
@ 2010-03-24 13:26           ` Mark Brown
  2010-03-25  7:27           ` Sascha Hauer
  2 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2010-03-24 13:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 23, 2010 at 07:53:58PM +0100, Alberto Panizzo wrote:

> +static void mx31_3ds_setpower(struct device *dev, unsigned int vdd)
> +{
> +	int voltage = 0;
> +
> +	if (vdd <= ilog2(MMC_VDD_165_195))
> +		voltage = 1800000;
> +	else if (vdd == ilog2(MMC_VDD_20_21))
> +		voltage = 2000000;
> +	else
> +		voltage = 2000000 + (vdd - 7) * 100000;
> +
> +	pr_debug("%s: vdd = %d -> REGU_VMMC2 = %d\n", __func__, vdd, voltage);
> +
> +	regulator_set_voltage(vmmc_reg, voltage, voltage);

This code looks wrong - the MMC core is requesting voltage ranges but
these are being non-linearly translated into specific voltages.  I
rather suspect that the standard mmc_regulator_set_ocr() function ought
to be able to cope with this, in conjunction with a regulator constraint
limiting the minimum voltage to 1.8V.  If not, some comments explaining
what's going on would really help.

> +static struct regulator_consumer_supply gpo3_consumers[] = {
> +	{
> +		.dev	= &mxcsdhc_device0.dev,

Use dev_name, not dev.

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

* [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board.
  2010-03-23 18:53         ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Alberto Panizzo
  2010-03-23 18:54           ` [PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd Alberto Panizzo
  2010-03-24 13:26           ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Mark Brown
@ 2010-03-25  7:27           ` Sascha Hauer
  2 siblings, 0 replies; 18+ messages in thread
From: Sascha Hauer @ 2010-03-25  7:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 23, 2010 at 07:53:58PM +0100, Alberto Panizzo wrote:
> The lock detection goes through the pmic and need to be implemented.
> 
> Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
> ---
>  arch/arm/mach-mx3/mach-mx31_3ds.c |  164 +++++++++++++++++++++++++++++++++++++
>  1 files changed, 164 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
> index f54af1e..51e060c 100644
> --- a/arch/arm/mach-mx3/mach-mx31_3ds.c
> +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
> @@ -26,6 +26,9 @@
>  #include <linux/mfd/mc13783.h>
>  #include <linux/spi/spi.h>
>  #include <linux/regulator/machine.h>
> +#include <linux/regulator/consumer.h>
> +#include <linux/log2.h>
> +#include <linux/err.h>
>  
>  #include <mach/hardware.h>
>  #include <asm/mach-types.h>
> @@ -39,6 +42,7 @@
>  #include <mach/iomux-mx3.h>
>  #include <mach/mxc_nand.h>
>  #include <mach/spi.h>
> +#include <mach/mmc.h>
>  #include "devices.h"
>  
>  /*!
> @@ -65,6 +69,112 @@ static int mx31_3ds_pins[] = {
>  	MX31_PIN_CSPI2_SS2__SS2, /*CS for MC13783 */
>  	/* MC13783 IRQ */
>  	IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO),
> +	/* SDHC1 */
> +	MX31_PIN_SD1_DATA3__SD1_DATA3,
> +	MX31_PIN_SD1_DATA2__SD1_DATA2,
> +	MX31_PIN_SD1_DATA1__SD1_DATA1,
> +	MX31_PIN_SD1_DATA0__SD1_DATA0,
> +	MX31_PIN_SD1_CLK__SD1_CLK,
> +	MX31_PIN_SD1_CMD__SD1_CMD,
> +	MX31_PIN_GPIO3_0__GPIO3_0, /*OE*/
> +};
> +
> +/*
> + * Support for SD card slot in personality board
> + */
> +static struct regulator *vmmc_reg;
> +
> +static int mx31_3ds_sd1_init(struct device *dev,
> +				   irq_handler_t detect_irq, void *data)
> +{
> +	int ret;
> +	int gpio_det, gpio_bus_en;
> +
> +	gpio_det = IOMUX_TO_GPIO(MX31_PIN_GPIO3_1);
> +	gpio_bus_en = IOMUX_TO_GPIO(MX31_PIN_GPIO3_0);
> +
> +	ret = gpio_request(gpio_det, "sd1-card-detect");
> +	if (ret) {
> +		pr_warning("Unable to request sd card detect gpio.\n");
> +		return ret;
> +	}
> +
> +	ret = gpio_request(gpio_bus_en, "sd1-bus-enable");
> +	if (ret) {
> +		pr_warning("Unable to request sd card bus enable gpio.\n");
> +		goto gpio_free;
> +	}
> +
> +	gpio_direction_input(gpio_det);
> +	ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
> +			  detect_irq, IRQF_DISABLED |
> +			  IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
> +			  "sd1-detect", data);
> +
> +	if (ret) {
> +		pr_warning("Unable to request sd card detect irq.\n");
> +		goto gpio_free_all;
> +	}
> +
> +	vmmc_reg = regulator_get(dev, "sd1_vdd");

I think the driver should handle the regulator stuff, not the platform.
drivers/mmc/host/pxamci.c looks like a good example.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad.
  2010-03-23 18:57             ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Alberto Panizzo
  2010-03-23 18:58               ` [PATCH 8/8] MXC: mach-mx31_3ds: enable mc13783 touchscreen interface Alberto Panizzo
@ 2010-05-14 12:32               ` Magnus Lilja
  2010-05-14 18:12                 ` Alberto Panizzo
  2010-05-17  9:43                 ` Sascha Hauer
  1 sibling, 2 replies; 18+ messages in thread
From: Magnus Lilja @ 2010-05-14 12:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi


Sascha, perhaps it's time to apply this patch now? I was very close to submit a very similar patch a few moments ago (based on the current Linus git tree) but found this post in the archive.


Regrds, Magnus

On 2010-03-23 19:57, Alberto Panizzo wrote:
> The kpp device is not a board private one, so it have to be defined
> in devices.c
> 
> Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
> ---
>  arch/arm/mach-mx3/devices.c       |   19 +++++++++++++++++++
>  arch/arm/mach-mx3/devices.h       |    1 +
>  arch/arm/mach-mx3/mach-mx31_3ds.c |   32 ++++++++++++++++++++++++++++++++
>  3 files changed, 52 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
> index 6adb586..539a08d 100644
> --- a/arch/arm/mach-mx3/devices.c
> +++ b/arch/arm/mach-mx3/devices.c
> @@ -575,6 +575,25 @@ struct platform_device imx_ssi_device1 = {
>  	.resource = imx_ssi_resources1,
>  };
>  
> +static struct resource imx_kpp_resources[] = {
> +	{
> +		.start	= MX3x_KPP_BASE_ADDR,
> +		.end	= MX3x_KPP_BASE_ADDR + 0xf,
> +		.flags	= IORESOURCE_MEM
> +	}, {
> +		.start	= MX3x_INT_KPP,
> +		.end	= MX3x_INT_KPP,
> +		.flags	= IORESOURCE_IRQ,
> +	},
> +};
> +
> +struct platform_device imx_kpp_device = {
> +	.name = "imx-keypad",
> +	.id = -1,
> +	.num_resources = ARRAY_SIZE(imx_kpp_resources),
> +	.resource = imx_kpp_resources,
> +};
> +
>  static int mx3_devices_init(void)
>  {
>  	if (cpu_is_mx31()) {
> diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
> index 42cf175..4ca2a18 100644
> --- a/arch/arm/mach-mx3/devices.h
> +++ b/arch/arm/mach-mx3/devices.h
> @@ -25,4 +25,5 @@ extern struct platform_device mxc_spi_device1;
>  extern struct platform_device mxc_spi_device2;
>  extern struct platform_device imx_ssi_device0;
>  extern struct platform_device imx_ssi_device1;
> +extern struct platform_device imx_kpp_device;
>  
> diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
> index 46ccb6c..258e8d1 100644
> --- a/arch/arm/mach-mx3/mach-mx31_3ds.c
> +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
> @@ -30,6 +30,7 @@
>  #include <linux/regulator/consumer.h>
>  #include <linux/log2.h>
>  #include <linux/err.h>
> +#include <linux/input/matrix_keypad.h>
>  
>  #include <mach/hardware.h>
>  #include <asm/mach-types.h>
> @@ -109,6 +110,35 @@ static int mx31_3ds_pins[] = {
>  	MX31_PIN_HSYNC__HSYNC,
>  	MX31_PIN_FPSHIFT__FPSHIFT,
>  	MX31_PIN_CONTRAST__CONTRAST,
> +	/*Keyboard*/
> +	IOMUX_MODE(MX31_PIN_KEY_ROW0, IOMUX_CONFIG_FUNC),
> +	IOMUX_MODE(MX31_PIN_KEY_ROW1, IOMUX_CONFIG_FUNC),
> +	IOMUX_MODE(MX31_PIN_KEY_ROW2, IOMUX_CONFIG_FUNC),
> +	IOMUX_MODE(MX31_PIN_KEY_COL0, IOMUX_CONFIG_FUNC),
> +	IOMUX_MODE(MX31_PIN_KEY_COL1, IOMUX_CONFIG_FUNC),
> +	IOMUX_MODE(MX31_PIN_KEY_COL2, IOMUX_CONFIG_FUNC),
> +	IOMUX_MODE(MX31_PIN_KEY_COL3, IOMUX_CONFIG_FUNC),
> +};
> +
> +/*
> + * Matrix keyboard
> + */
> +
> +static const uint32_t mx31_3ds_keymap[] = {
> +	KEY(0, 0, KEY_UP),
> +	KEY(0, 1, KEY_DOWN),
> +	KEY(1, 0, KEY_RIGHT),
> +	KEY(1, 1, KEY_LEFT),
> +	KEY(1, 2, KEY_ENTER),
> +	KEY(2, 0, KEY_F6),
> +	KEY(2, 1, KEY_F8),
> +	KEY(2, 2, KEY_F9),
> +	KEY(2, 3, KEY_F10),
> +};
> +
> +static struct matrix_keymap_data mx31_3ds_keymap_data = {
> +	.keymap		= mx31_3ds_keymap,
> +	.keymap_size	= ARRAY_SIZE(mx31_3ds_keymap),
>  };
>  
>  /*
> @@ -609,6 +639,8 @@ static void __init mxc_board_init(void)
>  	mxc_register_device(&mx3_ipu, &mx3_ipu_data);
>  	mxc_register_device(&mx3_fb, &mx3fb_pdata);
>  
> +	mxc_register_device(&imx_kpp_device, &mx31_3ds_keymap_data);
> +
>  	if (!mx31_3ds_init_expio())
>  		platform_device_register(&smsc911x_device);
>  }

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

* [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad.
  2010-05-14 12:32               ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Magnus Lilja
@ 2010-05-14 18:12                 ` Alberto Panizzo
  2010-05-14 18:56                   ` Magnus Lilja
  2010-05-17  9:43                 ` Sascha Hauer
  1 sibling, 1 reply; 18+ messages in thread
From: Alberto Panizzo @ 2010-05-14 18:12 UTC (permalink / raw)
  To: linux-arm-kernel

On ven, 2010-05-14 at 14:32 +0200, Magnus Lilja wrote:
> Hi
> 
> 
> Sascha, perhaps it's time to apply this patch now? I was very close to submit a very similar patch a few moments ago (based on the current Linus git tree) but found this post in the archive.
> 
> 
> Regrds, Magnus

I apologize for my delay in serving the issues raised in this thread.
Mangus, if you solve the problem (regulators handling support in imxmmc
as pxamci do) you could then post an acceptable version of this patch.
It is easy, really a bit of lines, but I do not have time now...

Then the rest of the thread can be rebased and applied.

Regards,
Alberto!

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

* [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad.
  2010-05-14 18:12                 ` Alberto Panizzo
@ 2010-05-14 18:56                   ` Magnus Lilja
  0 siblings, 0 replies; 18+ messages in thread
From: Magnus Lilja @ 2010-05-14 18:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi

On 2010-05-14 20:12, Alberto Panizzo wrote:
> On ven, 2010-05-14 at 14:32 +0200, Magnus Lilja wrote:
>> Hi
>>
>>
>> Sascha, perhaps it's time to apply this patch now? I was very close to submit a very similar patch a few moments ago (based on the current Linus git tree) but found this post in the archive.
>>
>>
>> Regrds, Magnus
> 
> I apologize for my delay in serving the issues raised in this thread.
> Mangus, if you solve the problem (regulators handling support in imxmmc
> as pxamci do) you could then post an acceptable version of this patch.
> It is easy, really a bit of lines, but I do not have time now...


I had only the keypad-patch in mind, I have not worked with, or plan to do so, with SD-card or MMC.
The keypad patch should be ready to be appled, I didn't see any comments on that.

Regards, Magnus

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

* [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad.
  2010-05-14 12:32               ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Magnus Lilja
  2010-05-14 18:12                 ` Alberto Panizzo
@ 2010-05-17  9:43                 ` Sascha Hauer
  2010-05-17 17:42                   ` Alberto Panizzo
  1 sibling, 1 reply; 18+ messages in thread
From: Sascha Hauer @ 2010-05-17  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 14, 2010 at 02:32:42PM +0200, Magnus Lilja wrote:
> Hi
> 
> 
> Sascha, perhaps it's time to apply this patch now? I was very close to
> submit a very similar patch a few moments ago (based on the current
> Linus git tree) but found this post in the archive.

This patch combines 3ds platform support with the mx3 support. Can you
please send a patch with mx3 support only?

Sascha


> 
> 
> Regrds, Magnus
> 
> On 2010-03-23 19:57, Alberto Panizzo wrote:
> > The kpp device is not a board private one, so it have to be defined
> > in devices.c
> > 
> > Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
> > ---
> >  arch/arm/mach-mx3/devices.c       |   19 +++++++++++++++++++
> >  arch/arm/mach-mx3/devices.h       |    1 +
> >  arch/arm/mach-mx3/mach-mx31_3ds.c |   32 ++++++++++++++++++++++++++++++++
> >  3 files changed, 52 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
> > index 6adb586..539a08d 100644
> > --- a/arch/arm/mach-mx3/devices.c
> > +++ b/arch/arm/mach-mx3/devices.c
> > @@ -575,6 +575,25 @@ struct platform_device imx_ssi_device1 = {
> >  	.resource = imx_ssi_resources1,
> >  };
> >  
> > +static struct resource imx_kpp_resources[] = {
> > +	{
> > +		.start	= MX3x_KPP_BASE_ADDR,
> > +		.end	= MX3x_KPP_BASE_ADDR + 0xf,
> > +		.flags	= IORESOURCE_MEM
> > +	}, {
> > +		.start	= MX3x_INT_KPP,
> > +		.end	= MX3x_INT_KPP,
> > +		.flags	= IORESOURCE_IRQ,
> > +	},
> > +};
> > +
> > +struct platform_device imx_kpp_device = {
> > +	.name = "imx-keypad",
> > +	.id = -1,
> > +	.num_resources = ARRAY_SIZE(imx_kpp_resources),
> > +	.resource = imx_kpp_resources,
> > +};
> > +
> >  static int mx3_devices_init(void)
> >  {
> >  	if (cpu_is_mx31()) {
> > diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
> > index 42cf175..4ca2a18 100644
> > --- a/arch/arm/mach-mx3/devices.h
> > +++ b/arch/arm/mach-mx3/devices.h
> > @@ -25,4 +25,5 @@ extern struct platform_device mxc_spi_device1;
> >  extern struct platform_device mxc_spi_device2;
> >  extern struct platform_device imx_ssi_device0;
> >  extern struct platform_device imx_ssi_device1;
> > +extern struct platform_device imx_kpp_device;
> >  
> > diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
> > index 46ccb6c..258e8d1 100644
> > --- a/arch/arm/mach-mx3/mach-mx31_3ds.c
> > +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
> > @@ -30,6 +30,7 @@
> >  #include <linux/regulator/consumer.h>
> >  #include <linux/log2.h>
> >  #include <linux/err.h>
> > +#include <linux/input/matrix_keypad.h>
> >  
> >  #include <mach/hardware.h>
> >  #include <asm/mach-types.h>
> > @@ -109,6 +110,35 @@ static int mx31_3ds_pins[] = {
> >  	MX31_PIN_HSYNC__HSYNC,
> >  	MX31_PIN_FPSHIFT__FPSHIFT,
> >  	MX31_PIN_CONTRAST__CONTRAST,
> > +	/*Keyboard*/
> > +	IOMUX_MODE(MX31_PIN_KEY_ROW0, IOMUX_CONFIG_FUNC),
> > +	IOMUX_MODE(MX31_PIN_KEY_ROW1, IOMUX_CONFIG_FUNC),
> > +	IOMUX_MODE(MX31_PIN_KEY_ROW2, IOMUX_CONFIG_FUNC),
> > +	IOMUX_MODE(MX31_PIN_KEY_COL0, IOMUX_CONFIG_FUNC),
> > +	IOMUX_MODE(MX31_PIN_KEY_COL1, IOMUX_CONFIG_FUNC),
> > +	IOMUX_MODE(MX31_PIN_KEY_COL2, IOMUX_CONFIG_FUNC),
> > +	IOMUX_MODE(MX31_PIN_KEY_COL3, IOMUX_CONFIG_FUNC),
> > +};
> > +
> > +/*
> > + * Matrix keyboard
> > + */
> > +
> > +static const uint32_t mx31_3ds_keymap[] = {
> > +	KEY(0, 0, KEY_UP),
> > +	KEY(0, 1, KEY_DOWN),
> > +	KEY(1, 0, KEY_RIGHT),
> > +	KEY(1, 1, KEY_LEFT),
> > +	KEY(1, 2, KEY_ENTER),
> > +	KEY(2, 0, KEY_F6),
> > +	KEY(2, 1, KEY_F8),
> > +	KEY(2, 2, KEY_F9),
> > +	KEY(2, 3, KEY_F10),
> > +};
> > +
> > +static struct matrix_keymap_data mx31_3ds_keymap_data = {
> > +	.keymap		= mx31_3ds_keymap,
> > +	.keymap_size	= ARRAY_SIZE(mx31_3ds_keymap),
> >  };
> >  
> >  /*
> > @@ -609,6 +639,8 @@ static void __init mxc_board_init(void)
> >  	mxc_register_device(&mx3_ipu, &mx3_ipu_data);
> >  	mxc_register_device(&mx3_fb, &mx3fb_pdata);
> >  
> > +	mxc_register_device(&imx_kpp_device, &mx31_3ds_keymap_data);
> > +
> >  	if (!mx31_3ds_init_expio())
> >  		platform_device_register(&smsc911x_device);
> >  }
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad.
  2010-05-17  9:43                 ` Sascha Hauer
@ 2010-05-17 17:42                   ` Alberto Panizzo
  0 siblings, 0 replies; 18+ messages in thread
From: Alberto Panizzo @ 2010-05-17 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

On lun, 2010-05-17 at 11:43 +0200, Sascha Hauer wrote:
> This patch combines 3ds platform support with the mx3 support. Can you
> please send a patch with mx3 support only?
> 
> Sascha
> 
> 
Sorry for overlaps.
Soon the two divided patches.

-- 
Alberto!

        Be Persistent!
                - Greg Kroah-Hartman (FOSDEM 2010)

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

end of thread, other threads:[~2010-05-17 17:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23 18:42 [PATCH 0/8] MXC: mach-mx31_3ds: Patch series that enable the support for Freescale i.MX31 3-Stack development board Alberto Panizzo
2010-03-23 18:45 ` Alberto Panizzo
2010-03-23 18:47   ` Alberto Panizzo
2010-03-23 18:46 ` [PATCH 1/8] MXC: mach-mx31_3ds: Update variable names over recent mach name modification Alberto Panizzo
2010-03-23 18:49   ` [PATCH 2/8] MXC: mach-mx31_3ds: Add support for on board NAND Flash Alberto Panizzo
2010-03-23 18:50     ` [PATCH 3/8] MXC: mach-mx31_3ds: Add SPI1 device support Alberto Panizzo
2010-03-23 18:51       ` [PATCH 4/8] MXC: mach-mx31_3ds: add support for freescale mc13783 power management device Alberto Panizzo
2010-03-23 18:53         ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Alberto Panizzo
2010-03-23 18:54           ` [PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd Alberto Panizzo
2010-03-23 18:57             ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Alberto Panizzo
2010-03-23 18:58               ` [PATCH 8/8] MXC: mach-mx31_3ds: enable mc13783 touchscreen interface Alberto Panizzo
2010-05-14 12:32               ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Magnus Lilja
2010-05-14 18:12                 ` Alberto Panizzo
2010-05-14 18:56                   ` Magnus Lilja
2010-05-17  9:43                 ` Sascha Hauer
2010-05-17 17:42                   ` Alberto Panizzo
2010-03-24 13:26           ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Mark Brown
2010-03-25  7:27           ` Sascha Hauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.