aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenhael Goavec-Merou <gwenhael.goavec-merou@armadeus.com>2012-11-02 14:01:48 -0400
committerShawn Guo <shawn.guo@linaro.org>2012-11-04 21:36:32 -0500
commita4dabca8b474aa5cf7ec1bec5bc1904a5e18f642 (patch)
tree35651d6e5cc01cff9bb315dab0b01b98d43ff87a
parent24acd6bf1d18636344e7f58a69294c2ce7c10a9e (diff)
ARM: mxs: apf28dev: Add LCD and backlight support
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@armadeus.com> Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r--arch/arm/boot/dts/imx28-apf28dev.dts28
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c24
2 files changed, 52 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/imx28-apf28dev.dts b/arch/arm/boot/dts/imx28-apf28dev.dts
index 8e765aef0a0..1643d2593bc 100644
--- a/arch/arm/boot/dts/imx28-apf28dev.dts
+++ b/arch/arm/boot/dts/imx28-apf28dev.dts
@@ -46,6 +46,26 @@
46 fsl,voltage = <1>; 46 fsl,voltage = <1>;
47 fsl,pull-up = <0>; 47 fsl,pull-up = <0>;
48 }; 48 };
49
50 lcdif_pins_apf28dev: lcdif-apf28dev@0 {
51 reg = <0>;
52 fsl,pinmux-ids = <
53 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */
54 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */
55 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */
56 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */
57 >;
58 fsl,drive-strength = <0>;
59 fsl,voltage = <1>;
60 fsl,pull-up = <0>;
61 };
62 };
63
64 lcdif@80030000 {
65 pinctrl-names = "default";
66 pinctrl-0 = <&lcdif_16bit_pins_a
67 &lcdif_pins_apf28dev>;
68 status = "okay";
49 }; 69 };
50 }; 70 };
51 71
@@ -110,4 +130,12 @@
110 linux,default-trigger = "heartbeat"; 130 linux,default-trigger = "heartbeat";
111 }; 131 };
112 }; 132 };
133
134 backlight {
135 compatible = "pwm-backlight";
136
137 pwms = <&pwm 3 191000>;
138 brightness-levels = <0 4 8 16 32 64 128 255>;
139 default-brightness-level = <6>;
140 };
113}; 141};
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 48c2eba37b8..67ef3550609 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -100,6 +100,25 @@ static struct fb_videomode apx4devkit_video_modes[] = {
100 }, 100 },
101}; 101};
102 102
103static struct fb_videomode apf28dev_video_modes[] = {
104 {
105 .name = "LW700",
106 .refresh = 60,
107 .xres = 800,
108 .yres = 480,
109 .pixclock = 30303, /* picosecond */
110 .left_margin = 96,
111 .right_margin = 96, /* at least 3 & 1 */
112 .upper_margin = 0x14,
113 .lower_margin = 0x15,
114 .hsync_len = 64,
115 .vsync_len = 4,
116 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT |
117 FB_SYNC_DATA_ENABLE_HIGH_ACT |
118 FB_SYNC_DOTCLK_FAILING_ACT,
119 },
120};
121
103static struct mxsfb_platform_data mxsfb_pdata __initdata; 122static struct mxsfb_platform_data mxsfb_pdata __initdata;
104 123
105/* 124/*
@@ -374,6 +393,11 @@ static void __init cfa10049_init(void)
374static void __init apf28_init(void) 393static void __init apf28_init(void)
375{ 394{
376 enable_clk_enet_out(); 395 enable_clk_enet_out();
396
397 mxsfb_pdata.mode_list = apf28dev_video_modes;
398 mxsfb_pdata.mode_count = ARRAY_SIZE(apf28dev_video_modes);
399 mxsfb_pdata.default_bpp = 16;
400 mxsfb_pdata.ld_intf_width = STMLCDIF_16BIT;
377} 401}
378 402
379static void __init mxs_machine_init(void) 403static void __init mxs_machine_init(void)