linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* few patches for PhyCARD-S board(pca100) with mx27 SOC
@ 2010-06-03 13:55 Luotao Fu
  2010-06-03 13:55 ` [PATCH 1/2] ARM/MX2: add framebuffer device support and TFT to pca100 board Luotao Fu
  2010-06-03 13:55 ` [PATCH 2/2] ARM/MX2: clean up GPIO pin multiplexing for " Luotao Fu
  0 siblings, 2 replies; 6+ messages in thread
From: Luotao Fu @ 2010-06-03 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

in following two patches for the phyCARD-S (pca100) board.

cheers
Luotao Fu

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

* [PATCH 1/2] ARM/MX2: add framebuffer device support and TFT to pca100 board
  2010-06-03 13:55 few patches for PhyCARD-S board(pca100) with mx27 SOC Luotao Fu
@ 2010-06-03 13:55 ` Luotao Fu
  2010-06-03 13:55 ` [PATCH 2/2] ARM/MX2: clean up GPIO pin multiplexing for " Luotao Fu
  1 sibling, 0 replies; 6+ messages in thread
From: Luotao Fu @ 2010-06-03 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

this one adds the frambuffer device and a TFT panel to the PhyCard-S
(pca100) board.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
---
 arch/arm/mach-mx2/mach-pca100.c |   68 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx2/mach-pca100.c b/arch/arm/mach-mx2/mach-pca100.c
index 778fff2..cf3d57b 100644
--- a/arch/arm/mach-mx2/mach-pca100.c
+++ b/arch/arm/mach-mx2/mach-pca100.c
@@ -49,6 +49,7 @@
 #include <mach/mmc.h>
 #include <mach/mxc_ehci.h>
 #include <mach/ulpi.h>
+#include <mach/imxfb.h>
 
 #include "devices.h"
 
@@ -131,6 +132,32 @@ static int pca100_pins[] = {
 	PD23_AF_USBH2_DATA2,
 	PD24_AF_USBH2_DATA1,
 	PD26_AF_USBH2_DATA5,
+	/* display */
+	PA5_PF_LSCLK,
+	PA6_PF_LD0,
+	PA7_PF_LD1,
+	PA8_PF_LD2,
+	PA9_PF_LD3,
+	PA10_PF_LD4,
+	PA11_PF_LD5,
+	PA12_PF_LD6,
+	PA13_PF_LD7,
+	PA14_PF_LD8,
+	PA15_PF_LD9,
+	PA16_PF_LD10,
+	PA17_PF_LD11,
+	PA18_PF_LD12,
+	PA19_PF_LD13,
+	PA20_PF_LD14,
+	PA21_PF_LD15,
+	PA22_PF_LD16,
+	PA23_PF_LD17,
+	PA26_PF_PS,
+	PA28_PF_HSYNC,
+	PA29_PF_VSYNC,
+	PA31_PF_OE_ACD,
+	/* LVDS Transceiver */
+	LVDS_PWR_DWN_GPIO | GPIO_GPIO | GPIO_IN,
 };
 
 static struct imxuart_platform_data uart_pdata = {
@@ -296,6 +323,45 @@ static int __init pca100_otg_mode(char *options)
 }
 __setup("otg_mode=", pca100_otg_mode);
 
+/* framebuffer info */
+static struct imx_fb_videomode pca100_fb_modes[] = {
+	{
+		.mode = {
+			.name		= "EMERGING-ETV570G0DHU",
+			.refresh	= 60,
+			.xres		= 640,
+			.yres		= 480,
+			.pixclock	= 39722, /* in ps (25.175 MHz) */
+			.hsync_len	= 30,
+			.left_margin	= 114,
+			.right_margin	= 16,
+			.vsync_len	= 3,
+			.upper_margin	= 32,
+			.lower_margin	= 0,
+		},
+		/*
+		 * TFT
+		 * Pixel pol active high
+		 * HSYNC active low
+		 * VSYNC active low
+		 * use HSYNC for ACD count
+		 * line clock disable while idle
+		 * always enable line clock even if no data
+		 */
+		.pcr = 0xf0c08080,
+		.bpp = 16,
+	},
+};
+
+static struct imx_fb_platform_data pca100_fb_data = {
+	.mode = pca100_fb_modes,
+	.num_modes = ARRAY_SIZE(pca100_fb_modes),
+
+	.pwmr		= 0x00A903FF,
+	.lscr1		= 0x00120300,
+	.dmacr		= 0x00020010,
+};
+
 static void __init pca100_init(void)
 {
 	int ret;
@@ -371,6 +437,8 @@ static void __init pca100_init(void)
 		mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);
 	}
 
+	mxc_register_device(&mxc_fb_device, &pca100_fb_data);
+
 	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 }
 
-- 
1.7.1

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

* [PATCH 2/2] ARM/MX2: clean up GPIO pin multiplexing for pca100 board
  2010-06-03 13:55 few patches for PhyCARD-S board(pca100) with mx27 SOC Luotao Fu
  2010-06-03 13:55 ` [PATCH 1/2] ARM/MX2: add framebuffer device support and TFT to pca100 board Luotao Fu
@ 2010-06-03 13:55 ` Luotao Fu
  2010-06-18  7:23   ` pca100 patches [V2] Luotao Fu
                     ` (2 more replies)
  1 sibling, 3 replies; 6+ messages in thread
From: Luotao Fu @ 2010-06-03 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

cleaned up some duplicated mxc_gpio_mode calls and move the correpsonding
pin multiplexing either into the initial pin config table or ifdef blocks.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
---
 arch/arm/mach-mx2/mach-pca100.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-mx2/mach-pca100.c b/arch/arm/mach-mx2/mach-pca100.c
index cf3d57b..dcd6555 100644
--- a/arch/arm/mach-mx2/mach-pca100.c
+++ b/arch/arm/mach-mx2/mach-pca100.c
@@ -55,6 +55,9 @@
 
 #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23)
 #define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24)
+#define SPI1_SS0 (GPIO_PORTD + 28)
+#define SPI1_SS1 (GPIO_PORTD + 27)
+#define SD2_CD (GPIO_PORTC + 29)
 
 static int pca100_pins[] = {
 	/* UART1 */
@@ -69,6 +72,7 @@ static int pca100_pins[] = {
 	PB7_PF_SD2_D3,
 	PB8_PF_SD2_CMD,
 	PB9_PF_SD2_CLK,
+	SD2_CD | GPIO_GPIO | GPIO_IN,
 	/* FEC */
 	PD0_AIN_FEC_TXD0,
 	PD1_AIN_FEC_TXD1,
@@ -158,6 +162,10 @@ static int pca100_pins[] = {
 	PA31_PF_OE_ACD,
 	/* LVDS Transceiver */
 	LVDS_PWR_DWN_GPIO | GPIO_GPIO | GPIO_IN,
+	/* free GPIO */
+	GPIO_PORTC | 31 | GPIO_GPIO | GPIO_IN, /* GPIO0_IRQ */
+	GPIO_PORTC | 25 | GPIO_GPIO | GPIO_IN, /* GPIO1_IRQ */
+	GPIO_PORTE | 5 | GPIO_GPIO | GPIO_IN, /* GPIO2_IRQ */
 };
 
 static struct imxuart_platform_data uart_pdata = {
@@ -215,7 +223,7 @@ static struct spi_board_info pca100_spi_board_info[] __initdata = {
 	},
 };
 
-static int pca100_spi_cs[] = {GPIO_PORTD + 28, GPIO_PORTD + 27};
+static int pca100_spi_cs[] = {SPI1_SS0, SPI1_SS1};
 
 static struct spi_imx_master pca100_spi_0_data = {
 	.chipselect	= pca100_spi_cs,
@@ -387,7 +395,6 @@ static void __init pca100_init(void)
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
 
-	mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN);
 	mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata);
 
 	mxc_register_device(&imx27_nand_device, &pca100_nand_board_info);
@@ -398,17 +405,9 @@ static void __init pca100_init(void)
 
 	mxc_register_device(&mxc_i2c_device1, &pca100_i2c_1_data);
 
-	mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
-	mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_OUT);
-
-	/* GPIO0_IRQ */
-	mxc_gpio_mode(GPIO_PORTC | 31 | GPIO_GPIO | GPIO_IN);
-	/* GPIO1_IRQ */
-	mxc_gpio_mode(GPIO_PORTC | 25 | GPIO_GPIO | GPIO_IN);
-	/* GPIO2_IRQ */
-	mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_IN);
-
 #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
+	mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN);
+	mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN);
 	spi_register_board_info(pca100_spi_board_info,
 				ARRAY_SIZE(pca100_spi_board_info));
 	mxc_register_device(&mxc_spi_device0, &pca100_spi_0_data);
-- 
1.7.1

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

* pca100 patches [V2]
  2010-06-03 13:55 ` [PATCH 2/2] ARM/MX2: clean up GPIO pin multiplexing for " Luotao Fu
@ 2010-06-18  7:23   ` Luotao Fu
  2010-06-18  7:23   ` [PATCH 1/2 V2] pca100: add framebuffer device support and TFT Luotao Fu
  2010-06-18  7:23   ` [PATCH 2/2 V2] pca100: clean up GPIO pin multiplexing Luotao Fu
  2 siblings, 0 replies; 6+ messages in thread
From: Luotao Fu @ 2010-06-18  7:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

this is the V2 of the pach serie for PhyCARD-S(pca100) Board. In the last patch
serie I brought in a regression by using an undefined macro..doh!. V2 fixed this
issue.

cheers
Luotao Fu

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

* [PATCH 1/2 V2] pca100: add framebuffer device support and TFT
  2010-06-03 13:55 ` [PATCH 2/2] ARM/MX2: clean up GPIO pin multiplexing for " Luotao Fu
  2010-06-18  7:23   ` pca100 patches [V2] Luotao Fu
@ 2010-06-18  7:23   ` Luotao Fu
  2010-06-18  7:23   ` [PATCH 2/2 V2] pca100: clean up GPIO pin multiplexing Luotao Fu
  2 siblings, 0 replies; 6+ messages in thread
From: Luotao Fu @ 2010-06-18  7:23 UTC (permalink / raw)
  To: linux-arm-kernel

this one adds the frambuffer device and a TFT panel to the PhyCard-S
(pca100) board.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>

---
V2 Changes: removed undefined LVDS_PWR macro.

 arch/arm/mach-mx2/mach-pca100.c |   66 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx2/mach-pca100.c b/arch/arm/mach-mx2/mach-pca100.c
index a87422e..47173d1 100644
--- a/arch/arm/mach-mx2/mach-pca100.c
+++ b/arch/arm/mach-mx2/mach-pca100.c
@@ -49,6 +49,7 @@
 #include <mach/mmc.h>
 #include <mach/mxc_ehci.h>
 #include <mach/ulpi.h>
+#include <mach/imxfb.h>
 
 #include "devices.h"
 
@@ -131,6 +132,30 @@ static int pca100_pins[] = {
 	PD23_AF_USBH2_DATA2,
 	PD24_AF_USBH2_DATA1,
 	PD26_AF_USBH2_DATA5,
+	/* display */
+	PA5_PF_LSCLK,
+	PA6_PF_LD0,
+	PA7_PF_LD1,
+	PA8_PF_LD2,
+	PA9_PF_LD3,
+	PA10_PF_LD4,
+	PA11_PF_LD5,
+	PA12_PF_LD6,
+	PA13_PF_LD7,
+	PA14_PF_LD8,
+	PA15_PF_LD9,
+	PA16_PF_LD10,
+	PA17_PF_LD11,
+	PA18_PF_LD12,
+	PA19_PF_LD13,
+	PA20_PF_LD14,
+	PA21_PF_LD15,
+	PA22_PF_LD16,
+	PA23_PF_LD17,
+	PA26_PF_PS,
+	PA28_PF_HSYNC,
+	PA29_PF_VSYNC,
+	PA31_PF_OE_ACD,
 };
 
 static struct imxuart_platform_data uart_pdata = {
@@ -297,6 +322,45 @@ static int __init pca100_otg_mode(char *options)
 }
 __setup("otg_mode=", pca100_otg_mode);
 
+/* framebuffer info */
+static struct imx_fb_videomode pca100_fb_modes[] = {
+	{
+		.mode = {
+			.name		= "EMERGING-ETV570G0DHU",
+			.refresh	= 60,
+			.xres		= 640,
+			.yres		= 480,
+			.pixclock	= 39722, /* in ps (25.175 MHz) */
+			.hsync_len	= 30,
+			.left_margin	= 114,
+			.right_margin	= 16,
+			.vsync_len	= 3,
+			.upper_margin	= 32,
+			.lower_margin	= 0,
+		},
+		/*
+		 * TFT
+		 * Pixel pol active high
+		 * HSYNC active low
+		 * VSYNC active low
+		 * use HSYNC for ACD count
+		 * line clock disable while idle
+		 * always enable line clock even if no data
+		 */
+		.pcr = 0xf0c08080,
+		.bpp = 16,
+	},
+};
+
+static struct imx_fb_platform_data pca100_fb_data = {
+	.mode = pca100_fb_modes,
+	.num_modes = ARRAY_SIZE(pca100_fb_modes),
+
+	.pwmr		= 0x00A903FF,
+	.lscr1		= 0x00120300,
+	.dmacr		= 0x00020010,
+};
+
 static void __init pca100_init(void)
 {
 	int ret;
@@ -372,6 +436,8 @@ static void __init pca100_init(void)
 		mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata);
 	}
 
+	mxc_register_device(&mxc_fb_device, &pca100_fb_data);
+
 	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 }
 
-- 
1.7.1

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

* [PATCH 2/2 V2] pca100: clean up GPIO pin multiplexing
  2010-06-03 13:55 ` [PATCH 2/2] ARM/MX2: clean up GPIO pin multiplexing for " Luotao Fu
  2010-06-18  7:23   ` pca100 patches [V2] Luotao Fu
  2010-06-18  7:23   ` [PATCH 1/2 V2] pca100: add framebuffer device support and TFT Luotao Fu
@ 2010-06-18  7:23   ` Luotao Fu
  2 siblings, 0 replies; 6+ messages in thread
From: Luotao Fu @ 2010-06-18  7:23 UTC (permalink / raw)
  To: linux-arm-kernel

cleaned up some duplicated mxc_gpio_mode calls and move the correpsonding
pin multiplexing either into the initial pin config table or ifdef blocks.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
---
V2 Changes: removed undefined LVDS_PWR macro.

 arch/arm/mach-mx2/mach-pca100.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-mx2/mach-pca100.c b/arch/arm/mach-mx2/mach-pca100.c
index 47173d1..5357020 100644
--- a/arch/arm/mach-mx2/mach-pca100.c
+++ b/arch/arm/mach-mx2/mach-pca100.c
@@ -55,6 +55,9 @@
 
 #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23)
 #define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24)
+#define SPI1_SS0 (GPIO_PORTD + 28)
+#define SPI1_SS1 (GPIO_PORTD + 27)
+#define SD2_CD (GPIO_PORTC + 29)
 
 static int pca100_pins[] = {
 	/* UART1 */
@@ -69,6 +72,7 @@ static int pca100_pins[] = {
 	PB7_PF_SD2_D3,
 	PB8_PF_SD2_CMD,
 	PB9_PF_SD2_CLK,
+	SD2_CD | GPIO_GPIO | GPIO_IN,
 	/* FEC */
 	PD0_AIN_FEC_TXD0,
 	PD1_AIN_FEC_TXD1,
@@ -156,6 +160,10 @@ static int pca100_pins[] = {
 	PA28_PF_HSYNC,
 	PA29_PF_VSYNC,
 	PA31_PF_OE_ACD,
+	/* free GPIO */
+	GPIO_PORTC | 31 | GPIO_GPIO | GPIO_IN, /* GPIO0_IRQ */
+	GPIO_PORTC | 25 | GPIO_GPIO | GPIO_IN, /* GPIO1_IRQ */
+	GPIO_PORTE | 5 | GPIO_GPIO | GPIO_IN, /* GPIO2_IRQ */
 };
 
 static struct imxuart_platform_data uart_pdata = {
@@ -214,7 +222,7 @@ static struct spi_board_info pca100_spi_board_info[] __initdata = {
 	},
 };
 
-static int pca100_spi_cs[] = {GPIO_PORTD + 28, GPIO_PORTD + 27};
+static int pca100_spi_cs[] = {SPI1_SS0, SPI1_SS1};
 
 static struct spi_imx_master pca100_spi_0_data = {
 	.chipselect	= pca100_spi_cs,
@@ -386,7 +394,6 @@ static void __init pca100_init(void)
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
 
-	mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN);
 	mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata);
 
 	mxc_register_device(&imx27_nand_device, &pca100_nand_board_info);
@@ -397,17 +404,9 @@ static void __init pca100_init(void)
 
 	mxc_register_device(&mxc_i2c_device1, &pca100_i2c_1_data);
 
-	mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
-	mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_OUT);
-
-	/* GPIO0_IRQ */
-	mxc_gpio_mode(GPIO_PORTC | 31 | GPIO_GPIO | GPIO_IN);
-	/* GPIO1_IRQ */
-	mxc_gpio_mode(GPIO_PORTC | 25 | GPIO_GPIO | GPIO_IN);
-	/* GPIO2_IRQ */
-	mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_IN);
-
 #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
+	mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN);
+	mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN);
 	spi_register_board_info(pca100_spi_board_info,
 				ARRAY_SIZE(pca100_spi_board_info));
 	mxc_register_device(&mxc_spi_device0, &pca100_spi_0_data);
-- 
1.7.1

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

end of thread, other threads:[~2010-06-18  7:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-03 13:55 few patches for PhyCARD-S board(pca100) with mx27 SOC Luotao Fu
2010-06-03 13:55 ` [PATCH 1/2] ARM/MX2: add framebuffer device support and TFT to pca100 board Luotao Fu
2010-06-03 13:55 ` [PATCH 2/2] ARM/MX2: clean up GPIO pin multiplexing for " Luotao Fu
2010-06-18  7:23   ` pca100 patches [V2] Luotao Fu
2010-06-18  7:23   ` [PATCH 1/2 V2] pca100: add framebuffer device support and TFT Luotao Fu
2010-06-18  7:23   ` [PATCH 2/2 V2] pca100: clean up GPIO pin multiplexing Luotao Fu

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).