From: maramaopercheseimorto@gmail.com (Alberto Panizzo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd.
Date: Tue, 23 Mar 2010 19:54:59 +0100 [thread overview]
Message-ID: <1269370499.3276.174.camel@realization> (raw)
In-Reply-To: <1269370438.3276.173.camel@realization>
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
next prev parent reply other threads:[~2010-03-23 18:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Alberto Panizzo [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1269370499.3276.174.camel@realization \
--to=maramaopercheseimorto@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.