aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-02-09 21:29:33 -0500
committerOlof Johansson <olof@lixom.net>2013-02-09 21:29:33 -0500
commitdd8b5c8dac143f2898def5bd49b651c81fad776b (patch)
tree74d150b1deeeed83e4242ae512475b5a4fbfe619
parent93ce285503e375a4a751b632dd7b93291629c5cd (diff)
parent0943b96058c4262b4e4cd05398f42e8730d5ee08 (diff)
Merge tag 'mxs-dt-3.9' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/dt
From Shawn Guo: mxs device tree changes for 3.9 - Mostly cfa100xx related device tree source updates * tag 'mxs-dt-3.9' of git://git.linaro.org/people/shawnguo/linux-2.6: ARM: mxs: dts: Add rotary encoder to the CFA-10049 ARM: mxs: dts: Add gpio-keys for the rotary to the CFA-10049 ARM: dts: mxs: Add the LCD to the 10049 board ARM: dts: mxs: Add muxing options for the third PWM ARM: dts: cfa10049: Change the SPI3 bus to spi-gpio ARM: mxs: dt: Add Crystalfontz CFA-10037 device tree support ARM: mxs: Enable touchscreen on m28evk ARM: dts: cfa10049: Add PCA9555 GPIO expander to the device tree
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/imx28-cfa10037.dts77
-rw-r--r--arch/arm/boot/dts/imx28-cfa10049.dts214
-rw-r--r--arch/arm/boot/dts/imx28-m28evk.dts1
-rw-r--r--arch/arm/boot/dts/imx28.dtsi10
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c30
6 files changed, 302 insertions, 31 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index b1f2ab9cda6e..43c044b86e13 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -96,6 +96,7 @@ dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \
96 imx28-apf28dev.dtb \ 96 imx28-apf28dev.dtb \
97 imx28-apx4devkit.dtb \ 97 imx28-apx4devkit.dtb \
98 imx28-cfa10036.dtb \ 98 imx28-cfa10036.dtb \
99 imx28-cfa10037.dtb \
99 imx28-cfa10049.dtb \ 100 imx28-cfa10049.dtb \
100 imx28-evk.dtb \ 101 imx28-evk.dtb \
101 imx28-m28evk.dtb \ 102 imx28-m28evk.dtb \
diff --git a/arch/arm/boot/dts/imx28-cfa10037.dts b/arch/arm/boot/dts/imx28-cfa10037.dts
new file mode 100644
index 000000000000..c2ef3a3d655e
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-cfa10037.dts
@@ -0,0 +1,77 @@
1/*
2 * Copyright 2012 Free Electrons
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/*
13 * The CFA-10049 is an expansion board for the CFA-10036 module, thus we
14 * need to include the CFA-10036 DTS.
15 */
16/include/ "imx28-cfa10036.dts"
17
18/ {
19 model = "Crystalfontz CFA-10037 Board";
20 compatible = "crystalfontz,cfa10037", "crystalfontz,cfa10036", "fsl,imx28";
21
22 apb@80000000 {
23 apbh@80000000 {
24 pinctrl@80018000 {
25 pinctrl-names = "default", "default";
26 pinctrl-1 = <&hog_pins_cfa10037>;
27
28 hog_pins_cfa10037: hog-10037@0 {
29 reg = <0>;
30 fsl,pinmux-ids = <
31 0x0073 /* MX28_PAD_GPMI_D7__GPIO_0_7 */
32 0x2153 /* MX28_PAD_SSP2_D5__GPIO_2_21 */
33 >;
34 fsl,drive-strength = <0>;
35 fsl,voltage = <1>;
36 fsl,pull-up = <0>;
37 };
38 };
39 };
40
41 apbx@80040000 {
42 usbphy1: usbphy@8007e000 {
43 status = "okay";
44 };
45 };
46 };
47
48 ahb@80080000 {
49 usb1: usb@80090000 {
50 vbus-supply = <&reg_usb1_vbus>;
51 pinctrl-0 = <&usbphy1_pins_a>;
52 pinctrl-names = "default";
53 status = "okay";
54 };
55
56 mac0: ethernet@800f0000 {
57 phy-mode = "rmii";
58 pinctrl-names = "default";
59 pinctrl-0 = <&mac0_pins_a>;
60 phy-reset-gpios = <&gpio2 21 0>;
61 phy-reset-duration = <100>;
62 status = "okay";
63 };
64 };
65
66 regulators {
67 compatible = "simple-bus";
68
69 reg_usb1_vbus: usb1_vbus {
70 compatible = "regulator-fixed";
71 regulator-name = "usb1_vbus";
72 regulator-min-microvolt = <5000000>;
73 regulator-max-microvolt = <5000000>;
74 gpio = <&gpio0 7 1>;
75 };
76 };
77};
diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts
index bdc80a4453dd..a0d3e9f1738e 100644
--- a/arch/arm/boot/dts/imx28-cfa10049.dts
+++ b/arch/arm/boot/dts/imx28-cfa10049.dts
@@ -23,69 +23,120 @@
23 apbh@80000000 { 23 apbh@80000000 {
24 pinctrl@80018000 { 24 pinctrl@80018000 {
25 pinctrl-names = "default", "default"; 25 pinctrl-names = "default", "default";
26 pinctrl-1 = <&hog_pins_cfa10049>; 26 pinctrl-1 = <&hog_pins_cfa10049
27 &hog_pins_cfa10049_pullup>;
27 28
28 hog_pins_cfa10049: hog-10049@0 { 29 hog_pins_cfa10049: hog-10049@0 {
29 reg = <0>; 30 reg = <0>;
30 fsl,pinmux-ids = < 31 fsl,pinmux-ids = <
31 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 */
32 0x1163 /* MX28_PAD_LCD_D22__GPIO_1_22 */ 34 0x1163 /* MX28_PAD_LCD_D22__GPIO_1_22 */
33 0x1173 /* MX28_PAD_LCD_D22__GPIO_1_23 */ 35 0x1173 /* MX28_PAD_LCD_D22__GPIO_1_23 */
34 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 */
35 >; 38 >;
36 fsl,drive-strength = <0>; 39 fsl,drive-strength = <0>;
37 fsl,voltage = <1>; 40 fsl,voltage = <1>;
38 fsl,pull-up = <0>; 41 fsl,pull-up = <0>;
39 }; 42 };
40 43
41 spi3_pins_cfa10049: spi3-cfa10049@0 { 44 hog_pins_cfa10049_pullup: hog-10049-pullup@0 {
42 reg = <0>; 45 reg = <0>;
43 fsl,pinmux-ids = < 46 fsl,pinmux-ids = <
44 0x0181 /* MX28_PAD_GPMI_RDN__SSP3_SCK */ 47 0x2133 /* MX28_PAD_SSP2_D3__GPIO_2_19 */
45 0x01c1 /* MX28_PAD_GPMI_RESETN__SSP3_CMD */ 48 0x3183 /* MX28_PAD_I2C0_SCL__GPIO_3_24 */
46 0x0111 /* MX28_PAD_GPMI_CE1N__SSP3_D3 */ 49 0x3193 /* MX28_PAD_I2C0_SDA__GPIO_3_25 */
47 0x01a2 /* MX28_PAD_GPMI_ALE__SSP3_D4 */ 50 0x31a3 /* MX28_PAD_SAIF_SDATA0__GPIO_3_26 */
48 0x01b2 /* MX28_PAD_GPMI_CLE__SSP3_D5 */ 51 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */
49 >; 52 >;
50 fsl,drive-strength = <1>; 53 fsl,drive-strength = <0>;
51 fsl,voltage = <1>; 54 fsl,voltage = <1>;
52 fsl,pull-up = <1>; 55 fsl,pull-up = <1>;
53 }; 56 };
54 };
55 57
56 ssp3: ssp@80016000 { 58 spi2_pins_cfa10049: spi2-cfa10049@0 {
57 compatible = "fsl,imx28-spi"; 59 reg = <0>;
58 pinctrl-names = "default"; 60 fsl,pinmux-ids = <
59 pinctrl-0 = <&spi3_pins_cfa10049>; 61 0x2103 /* MX28_PAD_SSP2_SCK__GPIO_2_16 */
60 status = "okay"; 62 0x2113 /* MX28_PAD_SSP2_CMD__GPIO_2_17 */
63 0x2123 /* MX28_PAD_SSP2_D0__GPIO_2_18 */
64 >;
65 fsl,drive-strength = <1>;
66 fsl,voltage = <1>;
67 fsl,pull-up = <1>;
68 };
61 69
62 gpio5: gpio5@0 { 70 spi3_pins_cfa10049: spi3-cfa10049@0 {
63 compatible = "fairchild,74hc595";
64 gpio-controller;
65 #gpio-cells = <2>;
66 reg = <0>; 71 reg = <0>;
67 registers-number = <2>; 72 fsl,pinmux-ids = <
68 spi-max-frequency = <100000>; 73 0x0183 /* MX28_PAD_GPMI_RDN__GPIO_0_24 */
74 0x01c3 /* MX28_PAD_GPMI_RESETN__GPIO_0_28 */
75 0x0113 /* MX28_PAD_GPMI_CE1N__GPIO_0_17 */
76 0x01a3 /* MX28_PAD_GPMI_ALE__GPIO_0_26 */
77 0x01b3 /* MX28_PAD_GPMI_CLE__GPIO_0_27 */
78 >;
79 fsl,drive-strength = <1>;
80 fsl,voltage = <1>;
81 fsl,pull-up = <1>;
69 }; 82 };
70 83
71 gpio6: gpio6@1 { 84 lcdif_18bit_pins_cfa10049: lcdif-18bit@0 {
72 compatible = "fairchild,74hc595"; 85 reg = <0>;
73 gpio-controller; 86 fsl,pinmux-ids = <
74 #gpio-cells = <2>; 87 0x1000 /* MX28_PAD_LCD_D00__LCD_D0 */
75 reg = <1>; 88 0x1010 /* MX28_PAD_LCD_D01__LCD_D1 */
76 registers-number = <4>; 89 0x1020 /* MX28_PAD_LCD_D02__LCD_D2 */
77 spi-max-frequency = <100000>; 90 0x1030 /* MX28_PAD_LCD_D03__LCD_D3 */
91 0x1040 /* MX28_PAD_LCD_D04__LCD_D4 */
92 0x1050 /* MX28_PAD_LCD_D05__LCD_D5 */
93 0x1060 /* MX28_PAD_LCD_D06__LCD_D6 */
94 0x1070 /* MX28_PAD_LCD_D07__LCD_D7 */
95 0x1080 /* MX28_PAD_LCD_D08__LCD_D8 */
96 0x1090 /* MX28_PAD_LCD_D09__LCD_D9 */
97 0x10a0 /* MX28_PAD_LCD_D10__LCD_D10 */
98 0x10b0 /* MX28_PAD_LCD_D11__LCD_D11 */
99 0x10c0 /* MX28_PAD_LCD_D12__LCD_D12 */
100 0x10d0 /* MX28_PAD_LCD_D13__LCD_D13 */
101 0x10e0 /* MX28_PAD_LCD_D14__LCD_D14 */
102 0x10f0 /* MX28_PAD_LCD_D15__LCD_D15 */
103 0x1100 /* MX28_PAD_LCD_D16__LCD_D16 */
104 0x1110 /* MX28_PAD_LCD_D17__LCD_D17 */
105 >;
106 fsl,drive-strength = <0>;
107 fsl,voltage = <1>;
108 fsl,pull-up = <0>;
78 }; 109 };
79 110
80 dac0: dh2228@2 { 111 lcdif_pins_cfa10049: lcdif-evk@0 {
81 compatible = "rohm,dh2228fv"; 112 reg = <0>;
82 reg = <2>; 113 fsl,pinmux-ids = <
83 spi-max-frequency = <100000>; 114 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */
115 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */
116 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */
117 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */
118 >;
119 fsl,drive-strength = <0>;
120 fsl,voltage = <1>;
121 fsl,pull-up = <0>;
84 }; 122 };
85 }; 123 };
124
125 lcdif@80030000 {
126 pinctrl-names = "default";
127 pinctrl-0 = <&lcdif_18bit_pins_cfa10049
128 &lcdif_pins_cfa10049>;
129 status = "okay";
130 };
86 }; 131 };
87 132
88 apbx@80040000 { 133 apbx@80040000 {
134 pwm: pwm@80064000 {
135 pinctrl-names = "default", "default";
136 pinctrl-1 = <&pwm3_pins_b>;
137 status = "okay";
138 };
139
89 i2c1: i2c@8005a000 { 140 i2c1: i2c@8005a000 {
90 pinctrl-names = "default"; 141 pinctrl-names = "default";
91 pinctrl-0 = <&i2c1_pins_a>; 142 pinctrl-0 = <&i2c1_pins_a>;
@@ -113,6 +164,19 @@
113 164
114 i2c@3 { 165 i2c@3 {
115 reg = <3>; 166 reg = <3>;
167 #address-cells = <1>;
168 #size-cells = <0>;
169
170 pca9555: pca9555@20 {
171 compatible = "nxp,pca9555";
172 interrupt-parent = <&gpio2>;
173 interrupts = <19 0x2>;
174 gpio-controller;
175 #gpio-cells = <2>;
176 interrupt-controller;
177 #interrupt-cells = <2>;
178 reg = <0x20>;
179 };
116 }; 180 };
117 }; 181 };
118 182
@@ -153,4 +217,92 @@
153 status = "okay"; 217 status = "okay";
154 }; 218 };
155 }; 219 };
220
221 spi2 {
222 compatible = "spi-gpio";
223 pinctrl-names = "default";
224 pinctrl-0 = <&spi2_pins_cfa10049>;
225 status = "okay";
226 gpio-sck = <&gpio2 16 0>;
227 gpio-mosi = <&gpio2 17 0>;
228 gpio-miso = <&gpio2 18 0>;
229 cs-gpios = <&gpio3 23 0>;
230 num-chipselects = <1>;
231 #address-cells = <1>;
232 #size-cells = <0>;
233
234 hx8357: hx8357@0 {
235 compatible = "himax,hx8357b", "himax,hx8357";
236 reg = <0>;
237 spi-max-frequency = <100000>;
238 spi-cpol;
239 spi-cpha;
240 gpios-reset = <&gpio3 30 0>;
241 im-gpios = <&gpio5 4 0 &gpio5 5 0 &gpio5 6 0>;
242 };
243 };
244
245 spi3 {
246 compatible = "spi-gpio";
247 pinctrl-names = "default";
248 pinctrl-0 = <&spi3_pins_cfa10049>;
249 status = "okay";
250 gpio-sck = <&gpio0 24 0>;
251 gpio-mosi = <&gpio0 28 0>;
252 cs-gpios = <&gpio0 17 0 &gpio0 26 0 &gpio0 27 0>;
253 num-chipselects = <3>;
254 #address-cells = <1>;
255 #size-cells = <0>;
256
257 gpio5: gpio5@0 {
258 compatible = "fairchild,74hc595";
259 gpio-controller;
260 #gpio-cells = <2>;
261 reg = <0>;
262 registers-number = <2>;
263 spi-max-frequency = <100000>;
264 };
265
266 gpio6: gpio6@1 {
267 compatible = "fairchild,74hc595";
268 gpio-controller;
269 #gpio-cells = <2>;
270 reg = <1>;
271 registers-number = <4>;
272 spi-max-frequency = <100000>;
273 };
274
275 dac0: dh2228@2 {
276 compatible = "rohm,dh2228fv";
277 reg = <2>;
278 spi-max-frequency = <100000>;
279 };
280 };
281
282 gpio_keys {
283 compatible = "gpio-keys";
284 #address-cells = <1>;
285 #size-cells = <0>;
286
287 rotary_button {
288 label = "rotary_button";
289 gpios = <&gpio3 26 1>;
290 debounce-interval = <10>;
291 linux,code = <28>;
292 };
293 };
294
295 rotary {
296 compatible = "rotary-encoder";
297 gpios = <&gpio3 24 1>, <&gpio3 25 1>;
298 linux,axis = <1>; /* REL_Y */
299 rotary-encoder,relative-axis;
300 };
301
302 backlight {
303 compatible = "pwm-backlight";
304 pwms = <&pwm 3 5000000>;
305 brightness-levels = <0 4 8 16 32 64 128 255>;
306 default-brightness-level = <6>;
307 };
156}; 308};
diff --git a/arch/arm/boot/dts/imx28-m28evk.dts b/arch/arm/boot/dts/imx28-m28evk.dts
index 3bab6b00c52d..6ce3d17c3a29 100644
--- a/arch/arm/boot/dts/imx28-m28evk.dts
+++ b/arch/arm/boot/dts/imx28-m28evk.dts
@@ -177,6 +177,7 @@
177 177
178 lradc@80050000 { 178 lradc@80050000 {
179 status = "okay"; 179 status = "okay";
180 fsl,lradc-touchscreen-wires = <4>;
180 }; 181 };
181 182
182 duart: serial@80074000 { 183 duart: serial@80074000 {
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 13b7053d799e..7ba49662b9bc 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -502,6 +502,16 @@
502 fsl,pull-up = <0>; 502 fsl,pull-up = <0>;
503 }; 503 };
504 504
505 pwm3_pins_b: pwm3@1 {
506 reg = <1>;
507 fsl,pinmux-ids = <
508 0x3141 /* MX28_PAD_SAIF0_MCLK__PWM3 */
509 >;
510 fsl,drive-strength = <0>;
511 fsl,voltage = <1>;
512 fsl,pull-up = <0>;
513 };
514
505 pwm4_pins_a: pwm4@0 { 515 pwm4_pins_a: pwm4@0 {
506 reg = <0>; 516 reg = <0>;
507 fsl,pinmux-ids = < 517 fsl,pinmux-ids = <
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 5fad7cefe8aa..052186713347 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/*
@@ -387,6 +404,17 @@ static void __init cfa10049_init(void)
387 update_fec_mac_prop(OUI_CRYSTALFONTZ); 404 update_fec_mac_prop(OUI_CRYSTALFONTZ);
388} 405}
389 406
407static void __init cfa10037_init(void)
408{
409 enable_clk_enet_out();
410 update_fec_mac_prop(OUI_CRYSTALFONTZ);
411
412 mxsfb_pdata.mode_list = cfa10049_video_modes;
413 mxsfb_pdata.mode_count = ARRAY_SIZE(cfa10049_video_modes);
414 mxsfb_pdata.default_bpp = 32;
415 mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT;
416}
417
390static void __init apf28_init(void) 418static void __init apf28_init(void)
391{ 419{
392 enable_clk_enet_out(); 420 enable_clk_enet_out();
@@ -407,6 +435,8 @@ static void __init mxs_machine_init(void)
407 m28evk_init(); 435 m28evk_init();
408 else if (of_machine_is_compatible("bluegiga,apx4devkit")) 436 else if (of_machine_is_compatible("bluegiga,apx4devkit"))
409 apx4devkit_init(); 437 apx4devkit_init();
438 else if (of_machine_is_compatible("crystalfontz,cfa10037"))
439 cfa10037_init();
410 else if (of_machine_is_compatible("crystalfontz,cfa10049")) 440 else if (of_machine_is_compatible("crystalfontz,cfa10049"))
411 cfa10049_init(); 441 cfa10049_init();
412 else if (of_machine_is_compatible("armadeus,imx28-apf28")) 442 else if (of_machine_is_compatible("armadeus,imx28-apf28"))