aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Lilly <brian@crystalfontz.com>2013-06-13 09:43:44 -0400
committerShawn Guo <shawn.guo@linaro.org>2013-06-17 03:43:31 -0400
commited138c368d95095de522db98b8b6929874bed403 (patch)
tree26414623cc9bd88167e5a83e1d2d488666621a02
parent65bc642f1b76442e8242a79fa0e48d49fda98ba8 (diff)
ARM: mxs: dt: Add the Crystalfontz CFA-10055 device tree
The CFA-10055 is yet another breakout board for the CFA-10036, and is basically a CFA-10037, with the screen and LCD controller found on the CFA-10049. Signed-off-by: Brian Lilly <brian@crystalfontz.com> 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/Makefile1
-rw-r--r--arch/arm/boot/dts/imx28-cfa10055.dts179
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c15
3 files changed, 185 insertions, 10 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f0895c581a89..c80151331f4f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -130,6 +130,7 @@ dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \
130 imx28-cfa10036.dtb \ 130 imx28-cfa10036.dtb \
131 imx28-cfa10037.dtb \ 131 imx28-cfa10037.dtb \
132 imx28-cfa10049.dtb \ 132 imx28-cfa10049.dtb \
133 imx28-cfa10055.dtb \
133 imx28-evk.dtb \ 134 imx28-evk.dtb \
134 imx28-m28evk.dtb \ 135 imx28-m28evk.dtb \
135 imx28-sps1.dtb \ 136 imx28-sps1.dtb \
diff --git a/arch/arm/boot/dts/imx28-cfa10055.dts b/arch/arm/boot/dts/imx28-cfa10055.dts
new file mode 100644
index 000000000000..158111244122
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-cfa10055.dts
@@ -0,0 +1,179 @@
1/*
2 * Copyright 2013 Crystalfontz America, Inc.
3 * Free Electrons
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13/*
14 * The CFA-10055 is an expansion board for the CFA-10036 module and
15 * CFA-10037, thus we need to include the CFA-10037 DTS.
16 */
17/include/ "imx28-cfa10037.dts"
18
19/ {
20 model = "Crystalfontz CFA-10055 Board";
21 compatible = "crystalfontz,cfa10055", "crystalfontz,cfa10037", "crystalfontz,cfa10036", "fsl,imx28";
22
23 apb@80000000 {
24 apbh@80000000 {
25 pinctrl@80018000 {
26 pinctrl-names = "default", "default";
27 pinctrl-1 = <&hog_pins_cfa10055
28 &hog_pins_cfa10055_pullup>;
29
30 hog_pins_cfa10055: hog-10055@0 {
31 reg = <0>;
32 fsl,pinmux-ids = <
33 0x3053 /* MX28_PAD_AUART1_TX__GPIO_3_5 */
34 >;
35 fsl,drive-strength = <0>;
36 fsl,voltage = <1>;
37 fsl,pull-up = <0>;
38 };
39
40 hog_pins_cfa10055_pullup: hog-10055-pullup@0 {
41 reg = <0>;
42 fsl,pinmux-ids = <
43 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */
44 >;
45 fsl,drive-strength = <0>;
46 fsl,voltage = <1>;
47 fsl,pull-up = <1>;
48 };
49
50 spi2_pins_cfa10055: spi2-cfa10055@0 {
51 reg = <0>;
52 fsl,pinmux-ids = <
53 0x2103 /* MX28_PAD_SSP2_SCK__GPIO_2_16 */
54 0x2113 /* MX28_PAD_SSP2_CMD__GPIO_2_17 */
55 0x2123 /* MX28_PAD_SSP2_D0__GPIO_2_18 */
56 >;
57 fsl,drive-strength = <1>;
58 fsl,voltage = <1>;
59 fsl,pull-up = <1>;
60 };
61
62 lcdif_18bit_pins_cfa10055: lcdif-18bit@0 {
63 reg = <0>;
64 fsl,pinmux-ids = <
65 0x1000 /* MX28_PAD_LCD_D00__LCD_D0 */
66 0x1010 /* MX28_PAD_LCD_D01__LCD_D1 */
67 0x1020 /* MX28_PAD_LCD_D02__LCD_D2 */
68 0x1030 /* MX28_PAD_LCD_D03__LCD_D3 */
69 0x1040 /* MX28_PAD_LCD_D04__LCD_D4 */
70 0x1050 /* MX28_PAD_LCD_D05__LCD_D5 */
71 0x1060 /* MX28_PAD_LCD_D06__LCD_D6 */
72 0x1070 /* MX28_PAD_LCD_D07__LCD_D7 */
73 0x1080 /* MX28_PAD_LCD_D08__LCD_D8 */
74 0x1090 /* MX28_PAD_LCD_D09__LCD_D9 */
75 0x10a0 /* MX28_PAD_LCD_D10__LCD_D10 */
76 0x10b0 /* MX28_PAD_LCD_D11__LCD_D11 */
77 0x10c0 /* MX28_PAD_LCD_D12__LCD_D12 */
78 0x10d0 /* MX28_PAD_LCD_D13__LCD_D13 */
79 0x10e0 /* MX28_PAD_LCD_D14__LCD_D14 */
80 0x10f0 /* MX28_PAD_LCD_D15__LCD_D15 */
81 0x1100 /* MX28_PAD_LCD_D16__LCD_D16 */
82 0x1110 /* MX28_PAD_LCD_D17__LCD_D17 */
83 >;
84 fsl,drive-strength = <0>;
85 fsl,voltage = <1>;
86 fsl,pull-up = <0>;
87 };
88
89 lcdif_pins_cfa10055: lcdif-evk@0 {
90 reg = <0>;
91 fsl,pinmux-ids = <
92 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */
93 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */
94 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */
95 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */
96 >;
97 fsl,drive-strength = <0>;
98 fsl,voltage = <1>;
99 fsl,pull-up = <0>;
100 };
101 };
102
103 lcdif@80030000 {
104 pinctrl-names = "default";
105 pinctrl-0 = <&lcdif_18bit_pins_cfa10055
106 &lcdif_pins_cfa10055>;
107 display = <&display>;
108 status = "okay";
109
110 display: display {
111 bits-per-pixel = <32>;
112 bus-width = <18>;
113
114 display-timings {
115 native-mode = <&timing0>;
116 timing0: timing0 {
117 clock-frequency = <9216000>;
118 hactive = <320>;
119 vactive = <480>;
120 hback-porch = <2>;
121 hfront-porch = <2>;
122 vback-porch = <2>;
123 vfront-porch = <2>;
124 hsync-len = <15>;
125 vsync-len = <15>;
126 hsync-active = <0>;
127 vsync-active = <0>;
128 de-active = <1>;
129 pixelclk-active = <1>;
130 };
131 };
132 };
133 };
134 };
135
136 apbx@80040000 {
137 lradc@80050000 {
138 fsl,lradc-touchscreen-wires = <4>;
139 status = "okay";
140 };
141
142 pwm: pwm@80064000 {
143 pinctrl-names = "default";
144 pinctrl-0 = <&pwm3_pins_b>;
145 status = "okay";
146 };
147 };
148 };
149
150 spi2 {
151 compatible = "spi-gpio";
152 pinctrl-names = "default";
153 pinctrl-0 = <&spi2_pins_cfa10055>;
154 status = "okay";
155 gpio-sck = <&gpio2 16 0>;
156 gpio-mosi = <&gpio2 17 0>;
157 gpio-miso = <&gpio2 18 0>;
158 cs-gpios = <&gpio3 5 0>;
159 num-chipselects = <1>;
160 #address-cells = <1>;
161 #size-cells = <0>;
162
163 hx8357: hx8357@0 {
164 compatible = "himax,hx8357b", "himax,hx8357";
165 reg = <0>;
166 spi-max-frequency = <100000>;
167 spi-cpol;
168 spi-cpha;
169 gpios-reset = <&gpio3 30 0>;
170 };
171 };
172
173 backlight {
174 compatible = "pwm-backlight";
175 pwms = <&pwm 3 5000000>;
176 brightness-levels = <0 4 8 16 32 64 128 255>;
177 default-brightness-level = <6>;
178 };
179};
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index f0bf6076fa32..f9fe0c539031 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -368,12 +368,7 @@ static void __init tx28_post_init(void)
368 pinctrl_put(pctl); 368 pinctrl_put(pctl);
369} 369}
370 370
371static void __init cfa10049_init(void) 371static void __init crystalfontz_init(void)
372{
373 update_fec_mac_prop(OUI_CRYSTALFONTZ);
374}
375
376static void __init cfa10037_init(void)
377{ 372{
378 update_fec_mac_prop(OUI_CRYSTALFONTZ); 373 update_fec_mac_prop(OUI_CRYSTALFONTZ);
379} 374}
@@ -482,10 +477,10 @@ static void __init mxs_machine_init(void)
482 imx28_evk_init(); 477 imx28_evk_init();
483 else if (of_machine_is_compatible("bluegiga,apx4devkit")) 478 else if (of_machine_is_compatible("bluegiga,apx4devkit"))
484 apx4devkit_init(); 479 apx4devkit_init();
485 else if (of_machine_is_compatible("crystalfontz,cfa10037")) 480 else if (of_machine_is_compatible("crystalfontz,cfa10037") ||
486 cfa10037_init(); 481 of_machine_is_compatible("crystalfontz,cfa10049") ||
487 else if (of_machine_is_compatible("crystalfontz,cfa10049")) 482 of_machine_is_compatible("crystalfontz,cfa10055"))
488 cfa10049_init(); 483 crystalfontz_init();
489 484
490 of_platform_populate(NULL, of_default_bus_match_table, 485 of_platform_populate(NULL, of_default_bus_match_table,
491 mxs_auxdata_lookup, parent); 486 mxs_auxdata_lookup, parent);