aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2013-01-25 03:54:07 -0500
committerShawn Guo <shawn.guo@linaro.org>2013-01-29 05:23:25 -0500
commit1fe42740450e0ac5a63125ed1fdb618a422f85f8 (patch)
treeb8c4d9333bf778e04e13ce07ca69faf293cb9901
parentd248620c9a9a67e587949bb699d230cde88685ea (diff)
ARM: dts: mxs: Add the LCD to the 10049 board
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r--arch/arm/boot/dts/imx28-cfa10049.dts99
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c22
2 files changed, 121 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts
index dd91244d139c..cabc33a770ca 100644
--- a/arch/arm/boot/dts/imx28-cfa10049.dts
+++ b/arch/arm/boot/dts/imx28-cfa10049.dts
@@ -30,9 +30,11 @@
30 reg = <0>; 30 reg = <0>;
31 fsl,pinmux-ids = < 31 fsl,pinmux-ids = <
32 0x0073 /* MX28_PAD_GPMI_D7__GPIO_0_7 */ 32 0x0073 /* MX28_PAD_GPMI_D7__GPIO_0_7 */
33 0x1153 /* MX28_PAD_LCD_D22__GPIO_1_21 */
33 0x1163 /* MX28_PAD_LCD_D22__GPIO_1_22 */ 34 0x1163 /* MX28_PAD_LCD_D22__GPIO_1_22 */
34 0x1173 /* MX28_PAD_LCD_D22__GPIO_1_23 */ 35 0x1173 /* MX28_PAD_LCD_D22__GPIO_1_23 */
35 0x2153 /* MX28_PAD_SSP2_D5__GPIO_2_21 */ 36 0x2153 /* MX28_PAD_SSP2_D5__GPIO_2_21 */
37 0x3173 /* MX28_PAD_LCD_RESET__GPIO_3_23 */
36 >; 38 >;
37 fsl,drive-strength = <0>; 39 fsl,drive-strength = <0>;
38 fsl,voltage = <1>; 40 fsl,voltage = <1>;
@@ -43,12 +45,25 @@
43 reg = <0>; 45 reg = <0>;
44 fsl,pinmux-ids = < 46 fsl,pinmux-ids = <
45 0x2133 /* MX28_PAD_SSP2_D3__GPIO_2_19 */ 47 0x2133 /* MX28_PAD_SSP2_D3__GPIO_2_19 */
48 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */
46 >; 49 >;
47 fsl,drive-strength = <0>; 50 fsl,drive-strength = <0>;
48 fsl,voltage = <1>; 51 fsl,voltage = <1>;
49 fsl,pull-up = <1>; 52 fsl,pull-up = <1>;
50 }; 53 };
51 54
55 spi2_pins_cfa10049: spi2-cfa10049@0 {
56 reg = <0>;
57 fsl,pinmux-ids = <
58 0x2103 /* MX28_PAD_SSP2_SCK__GPIO_2_16 */
59 0x2113 /* MX28_PAD_SSP2_CMD__GPIO_2_17 */
60 0x2123 /* MX28_PAD_SSP2_D0__GPIO_2_18 */
61 >;
62 fsl,drive-strength = <1>;
63 fsl,voltage = <1>;
64 fsl,pull-up = <1>;
65 };
66
52 spi3_pins_cfa10049: spi3-cfa10049@0 { 67 spi3_pins_cfa10049: spi3-cfa10049@0 {
53 reg = <0>; 68 reg = <0>;
54 fsl,pinmux-ids = < 69 fsl,pinmux-ids = <
@@ -62,10 +77,63 @@
62 fsl,voltage = <1>; 77 fsl,voltage = <1>;
63 fsl,pull-up = <1>; 78 fsl,pull-up = <1>;
64 }; 79 };
80
81 lcdif_18bit_pins_cfa10049: lcdif-18bit@0 {
82 reg = <0>;
83 fsl,pinmux-ids = <
84 0x1000 /* MX28_PAD_LCD_D00__LCD_D0 */
85 0x1010 /* MX28_PAD_LCD_D01__LCD_D1 */
86 0x1020 /* MX28_PAD_LCD_D02__LCD_D2 */
87 0x1030 /* MX28_PAD_LCD_D03__LCD_D3 */
88 0x1040 /* MX28_PAD_LCD_D04__LCD_D4 */
89 0x1050 /* MX28_PAD_LCD_D05__LCD_D5 */
90 0x1060 /* MX28_PAD_LCD_D06__LCD_D6 */
91 0x1070 /* MX28_PAD_LCD_D07__LCD_D7 */
92 0x1080 /* MX28_PAD_LCD_D08__LCD_D8 */
93 0x1090 /* MX28_PAD_LCD_D09__LCD_D9 */
94 0x10a0 /* MX28_PAD_LCD_D10__LCD_D10 */
95 0x10b0 /* MX28_PAD_LCD_D11__LCD_D11 */
96 0x10c0 /* MX28_PAD_LCD_D12__LCD_D12 */
97 0x10d0 /* MX28_PAD_LCD_D13__LCD_D13 */
98 0x10e0 /* MX28_PAD_LCD_D14__LCD_D14 */
99 0x10f0 /* MX28_PAD_LCD_D15__LCD_D15 */
100 0x1100 /* MX28_PAD_LCD_D16__LCD_D16 */
101 0x1110 /* MX28_PAD_LCD_D17__LCD_D17 */
102 >;
103 fsl,drive-strength = <0>;
104 fsl,voltage = <1>;
105 fsl,pull-up = <0>;
106 };
107
108 lcdif_pins_cfa10049: lcdif-evk@0 {
109 reg = <0>;
110 fsl,pinmux-ids = <
111 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */
112 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */
113 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */
114 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */
115 >;
116 fsl,drive-strength = <0>;
117 fsl,voltage = <1>;
118 fsl,pull-up = <0>;
119 };
120 };
121
122 lcdif@80030000 {
123 pinctrl-names = "default";
124 pinctrl-0 = <&lcdif_18bit_pins_cfa10049
125 &lcdif_pins_cfa10049>;
126 status = "okay";
65 }; 127 };
66 }; 128 };
67 129
68 apbx@80040000 { 130 apbx@80040000 {
131 pwm: pwm@80064000 {
132 pinctrl-names = "default", "default";
133 pinctrl-1 = <&pwm3_pins_b>;
134 status = "okay";
135 };
136
69 i2c1: i2c@8005a000 { 137 i2c1: i2c@8005a000 {
70 pinctrl-names = "default"; 138 pinctrl-names = "default";
71 pinctrl-0 = <&i2c1_pins_a>; 139 pinctrl-0 = <&i2c1_pins_a>;
@@ -147,6 +215,30 @@
147 }; 215 };
148 }; 216 };
149 217
218 spi2 {
219 compatible = "spi-gpio";
220 pinctrl-names = "default";
221 pinctrl-0 = <&spi2_pins_cfa10049>;
222 status = "okay";
223 gpio-sck = <&gpio2 16 0>;
224 gpio-mosi = <&gpio2 17 0>;
225 gpio-miso = <&gpio2 18 0>;
226 cs-gpios = <&gpio3 23 0>;
227 num-chipselects = <1>;
228 #address-cells = <1>;
229 #size-cells = <0>;
230
231 hx8357: hx8357@0 {
232 compatible = "himax,hx8357b", "himax,hx8357";
233 reg = <0>;
234 spi-max-frequency = <100000>;
235 spi-cpol;
236 spi-cpha;
237 gpios-reset = <&gpio3 30 0>;
238 im-gpios = <&gpio5 4 0 &gpio5 5 0 &gpio5 6 0>;
239 };
240 };
241
150 spi3 { 242 spi3 {
151 compatible = "spi-gpio"; 243 compatible = "spi-gpio";
152 pinctrl-names = "default"; 244 pinctrl-names = "default";
@@ -183,4 +275,11 @@
183 spi-max-frequency = <100000>; 275 spi-max-frequency = <100000>;
184 }; 276 };
185 }; 277 };
278
279 backlight {
280 compatible = "pwm-backlight";
281 pwms = <&pwm 3 5000000>;
282 brightness-levels = <0 4 8 16 32 64 128 255>;
283 default-brightness-level = <6>;
284 };
186}; 285};
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 19c5aeb20b89..7147dfc9ab71 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -119,6 +119,23 @@ static struct fb_videomode apf28dev_video_modes[] = {
119 }, 119 },
120}; 120};
121 121
122static struct fb_videomode cfa10049_video_modes[] = {
123 {
124 .name = "Himax HX8357-B",
125 .refresh = 60,
126 .xres = 320,
127 .yres = 480,
128 .pixclock = 108506, /* picosecond (9.216 MHz) */
129 .left_margin = 2,
130 .right_margin = 2,
131 .upper_margin = 2,
132 .lower_margin = 2,
133 .hsync_len = 15,
134 .vsync_len = 15,
135 .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT
136 },
137};
138
122static struct mxsfb_platform_data mxsfb_pdata __initdata; 139static struct mxsfb_platform_data mxsfb_pdata __initdata;
123 140
124/* 141/*
@@ -399,6 +416,11 @@ static void __init cfa10037_init(void)
399{ 416{
400 enable_clk_enet_out(); 417 enable_clk_enet_out();
401 update_fec_mac_prop(OUI_CRYSTALFONTZ); 418 update_fec_mac_prop(OUI_CRYSTALFONTZ);
419
420 mxsfb_pdata.mode_list = cfa10049_video_modes;
421 mxsfb_pdata.mode_count = ARRAY_SIZE(cfa10049_video_modes);
422 mxsfb_pdata.default_bpp = 32;
423 mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT;
402} 424}
403 425
404static void __init apf28_init(void) 426static void __init apf28_init(void)