imx6: add Gateworks GW551x support
[openwrt.git] / target / linux / imx6 / patches-4.1 / 020-ARM-dts-Gateworks-GW5510-support-i.MX6.patch
1 From e9d6d6b62f306ba83e1441af5daf2809a6167474 Mon Sep 17 00:00:00 2001
2 From: Tim Harvey <tharvey@gateworks.com>
3 Date: Thu, 7 May 2015 08:38:00 -0700
4 Subject: [PATCH] ARM: dts: Gateworks GW5510 support (i.MX6)
5
6 Add support for the Gateworks GW5510 board featuring:
7  * i.MX6 SoC
8  * up to 512MB DDR3
9  * up to 2GB NAND flash
10  * 1x miniPCIe socket (with USB)
11  * HDMI out (micro-HDMI)
12  * HDMI in (micro-HDMI) (currently supported by only vendor kernel)
13  * TTL level I/O (supported by GW16111 breakout board):
14   * I2C
15   * 2x UART
16   * CAN
17   * 2x DIO (GPIO/PWM)
18   * USB OTG
19
20 For more details see:
21  http://www.gateworks.com/product/item/ventana-gw5510-single-board-computer
22
23 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
24 Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
25 Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
26 ---
27  arch/arm/boot/dts/Makefile            |   2 +
28  arch/arm/boot/dts/imx6dl-gw551x.dts   |  55 ++++++
29  arch/arm/boot/dts/imx6q-gw551x.dts    |  55 ++++++
30  arch/arm/boot/dts/imx6qdl-gw551x.dtsi | 314 ++++++++++++++++++++++++++++++++++
31  4 files changed, 426 insertions(+)
32  create mode 100644 arch/arm/boot/dts/imx6dl-gw551x.dts
33  create mode 100644 arch/arm/boot/dts/imx6q-gw551x.dts
34  create mode 100644 arch/arm/boot/dts/imx6qdl-gw551x.dtsi
35
36 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
37 index 86217db..8932e6e 100644
38 --- a/arch/arm/boot/dts/Makefile
39 +++ b/arch/arm/boot/dts/Makefile
40 @@ -262,6 +262,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
41         imx6dl-gw52xx.dtb \
42         imx6dl-gw53xx.dtb \
43         imx6dl-gw54xx.dtb \
44 +       imx6dl-gw551x.dtb \
45         imx6dl-gw552x.dtb \
46         imx6dl-hummingboard.dtb \
47         imx6dl-nitrogen6x.dtb \
48 @@ -288,6 +289,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
49         imx6q-gw53xx.dtb \
50         imx6q-gw5400-a.dtb \
51         imx6q-gw54xx.dtb \
52 +       imx6q-gw551x.dtb \
53         imx6q-gw552x.dtb \
54         imx6q-hummingboard.dtb \
55         imx6q-nitrogen6x.dtb \
56 diff --git a/arch/arm/boot/dts/imx6dl-gw551x.dts b/arch/arm/boot/dts/imx6dl-gw551x.dts
57 new file mode 100644
58 index 0000000..82d5f85
59 --- /dev/null
60 +++ b/arch/arm/boot/dts/imx6dl-gw551x.dts
61 @@ -0,0 +1,55 @@
62 +/*
63 + * Copyright 2014 Gateworks Corporation
64 + *
65 + * This file is dual-licensed: you can use it either under the terms
66 + * of the GPL or the X11 license, at your option. Note that this dual
67 + * licensing only applies to this file, and not this project as a
68 + * whole.
69 + *
70 + *  a) This file is free software; you can redistribute it and/or
71 + *     modify it under the terms of the GNU General Public License as
72 + *     published by the Free Software Foundation; either version 2 of
73 + *     the License, or (at your option) any later version.
74 + *
75 + *     This file is distributed in the hope that it will be useful,
76 + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
77 + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
78 + *     GNU General Public License for more details.
79 + *
80 + *     You should have received a copy of the GNU General Public
81 + *     License along with this file; if not, write to the Free
82 + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
83 + *     MA 02110-1301 USA
84 + *
85 + * Or, alternatively,
86 + *
87 + *  b) Permission is hereby granted, free of charge, to any person
88 + *     obtaining a copy of this software and associated documentation
89 + *     files (the "Software"), to deal in the Software without
90 + *     restriction, including without limitation the rights to use,
91 + *     copy, modify, merge, publish, distribute, sublicense, and/or
92 + *     sell copies of the Software, and to permit persons to whom the
93 + *     Software is furnished to do so, subject to the following
94 + *     conditions:
95 + *
96 + *     The above copyright notice and this permission notice shall be
97 + *     included in all copies or substantial portions of the Software.
98 + *
99 + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
100 + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
101 + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
102 + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
103 + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
104 + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
105 + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
106 + *     OTHER DEALINGS IN THE SOFTWARE.
107 + */
108 +
109 +/dts-v1/;
110 +#include "imx6dl.dtsi"
111 +#include "imx6qdl-gw551x.dtsi"
112 +
113 +/ {
114 +       model = "Gateworks Ventana i.MX6 DualLite/Solo GW551X";
115 +       compatible = "gw,imx6dl-gw551x", "gw,ventana", "fsl,imx6dl";
116 +};
117 diff --git a/arch/arm/boot/dts/imx6q-gw551x.dts b/arch/arm/boot/dts/imx6q-gw551x.dts
118 new file mode 100644
119 index 0000000..2c7feee
120 --- /dev/null
121 +++ b/arch/arm/boot/dts/imx6q-gw551x.dts
122 @@ -0,0 +1,55 @@
123 +/*
124 + * Copyright 2014 Gateworks Corporation
125 + *
126 + * This file is dual-licensed: you can use it either under the terms
127 + * of the GPL or the X11 license, at your option. Note that this dual
128 + * licensing only applies to this file, and not this project as a
129 + * whole.
130 + *
131 + *  a) This file is free software; you can redistribute it and/or
132 + *     modify it under the terms of the GNU General Public License as
133 + *     published by the Free Software Foundation; either version 2 of
134 + *     the License, or (at your option) any later version.
135 + *
136 + *     This file is distributed in the hope that it will be useful,
137 + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
138 + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
139 + *     GNU General Public License for more details.
140 + *
141 + *     You should have received a copy of the GNU General Public
142 + *     License along with this file; if not, write to the Free
143 + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
144 + *     MA 02110-1301 USA
145 + *
146 + * Or, alternatively,
147 + *
148 + *  b) Permission is hereby granted, free of charge, to any person
149 + *     obtaining a copy of this software and associated documentation
150 + *     files (the "Software"), to deal in the Software without
151 + *     restriction, including without limitation the rights to use,
152 + *     copy, modify, merge, publish, distribute, sublicense, and/or
153 + *     sell copies of the Software, and to permit persons to whom the
154 + *     Software is furnished to do so, subject to the following
155 + *     conditions:
156 + *
157 + *     The above copyright notice and this permission notice shall be
158 + *     included in all copies or substantial portions of the Software.
159 + *
160 + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
161 + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
162 + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
163 + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
164 + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
165 + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
166 + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
167 + *     OTHER DEALINGS IN THE SOFTWARE.
168 + */
169 +
170 +/dts-v1/;
171 +#include "imx6q.dtsi"
172 +#include "imx6qdl-gw551x.dtsi"
173 +
174 +/ {
175 +       model = "Gateworks Ventana i.MX6 Dual/Quad GW551X";
176 +       compatible = "gw,imx6q-gw551x", "gw,ventana", "fsl,imx6q";
177 +};
178 diff --git a/arch/arm/boot/dts/imx6qdl-gw551x.dtsi b/arch/arm/boot/dts/imx6qdl-gw551x.dtsi
179 new file mode 100644
180 index 0000000..d1866a0
181 --- /dev/null
182 +++ b/arch/arm/boot/dts/imx6qdl-gw551x.dtsi
183 @@ -0,0 +1,314 @@
184 +/*
185 + * Copyright 2014 Gateworks Corporation
186 + *
187 + * This file is dual-licensed: you can use it either under the terms
188 + * of the GPL or the X11 license, at your option. Note that this dual
189 + * licensing only applies to this file, and not this project as a
190 + * whole.
191 + *
192 + *  a) This file is free software; you can redistribute it and/or
193 + *     modify it under the terms of the GNU General Public License as
194 + *     published by the Free Software Foundation; either version 2 of
195 + *     the License, or (at your option) any later version.
196 + *
197 + *     This file is distributed in the hope that it will be useful,
198 + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
199 + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
200 + *     GNU General Public License for more details.
201 + *
202 + *     You should have received a copy of the GNU General Public
203 + *     License along with this file; if not, write to the Free
204 + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
205 + *     MA 02110-1301 USA
206 + *
207 + * Or, alternatively,
208 + *
209 + *  b) Permission is hereby granted, free of charge, to any person
210 + *     obtaining a copy of this software and associated documentation
211 + *     files (the "Software"), to deal in the Software without
212 + *     restriction, including without limitation the rights to use,
213 + *     copy, modify, merge, publish, distribute, sublicense, and/or
214 + *     sell copies of the Software, and to permit persons to whom the
215 + *     Software is furnished to do so, subject to the following
216 + *     conditions:
217 + *
218 + *     The above copyright notice and this permission notice shall be
219 + *     included in all copies or substantial portions of the Software.
220 + *
221 + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
222 + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
223 + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
224 + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
225 + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
226 + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
227 + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
228 + *     OTHER DEALINGS IN THE SOFTWARE.
229 + */
230 +
231 +#include <dt-bindings/gpio/gpio.h>
232 +
233 +/ {
234 +       /* these are used by bootloader for disabling nodes */
235 +       aliases {
236 +               led0 = &led0;
237 +               nand = &gpmi;
238 +               ssi0 = &ssi1;
239 +               usb0 = &usbh1;
240 +               usb1 = &usbotg;
241 +       };
242 +
243 +       chosen {
244 +               bootargs = "console=ttymxc1,115200";
245 +       };
246 +
247 +       leds {
248 +               compatible = "gpio-leds";
249 +               pinctrl-names = "default";
250 +               pinctrl-0 = <&pinctrl_gpio_leds>;
251 +
252 +               led0: user1 {
253 +                       label = "user1";
254 +                       gpios = <&gpio4 7 GPIO_ACTIVE_LOW>;
255 +                       default-state = "on";
256 +                       linux,default-trigger = "heartbeat";
257 +               };
258 +       };
259 +
260 +       memory {
261 +               reg = <0x10000000 0x20000000>;
262 +       };
263 +
264 +       regulators {
265 +               compatible = "simple-bus";
266 +               #address-cells = <1>;
267 +               #size-cells = <0>;
268 +
269 +               reg_5p0v: regulator@0 {
270 +                       compatible = "regulator-fixed";
271 +                       reg = <0>;
272 +                       regulator-name = "5P0V";
273 +                       regulator-min-microvolt = <5000000>;
274 +                       regulator-max-microvolt = <5000000>;
275 +               };
276 +
277 +               reg_usb_h1_vbus: regulator@1 {
278 +                       compatible = "regulator-fixed";
279 +                       reg = <1>;
280 +                       regulator-name = "usb_h1_vbus";
281 +                       regulator-min-microvolt = <5000000>;
282 +                       regulator-max-microvolt = <5000000>;
283 +               };
284 +
285 +               reg_usb_otg_vbus: regulator@2 {
286 +                       compatible = "regulator-fixed";
287 +                       reg = <2>;
288 +                       regulator-name = "usb_otg_vbus";
289 +                       regulator-min-microvolt = <5000000>;
290 +                       regulator-max-microvolt = <5000000>;
291 +               };
292 +       };
293 +};
294 +
295 +&can1 {
296 +       pinctrl-names = "default";
297 +       pinctrl-0 = <&pinctrl_flexcan1>;
298 +       status = "okay";
299 +};
300 +
301 +&gpmi {
302 +       pinctrl-names = "default";
303 +       pinctrl-0 = <&pinctrl_gpmi_nand>;
304 +       status = "okay";
305 +};
306 +
307 +&hdmi {
308 +       ddc-i2c-bus = <&i2c3>;
309 +       status = "okay";
310 +};
311 +
312 +&i2c1 {
313 +       clock-frequency = <100000>;
314 +       pinctrl-names = "default";
315 +       pinctrl-0 = <&pinctrl_i2c1>;
316 +       status = "okay";
317 +
318 +       eeprom1: eeprom@50 {
319 +               compatible = "atmel,24c02";
320 +               reg = <0x50>;
321 +               pagesize = <16>;
322 +       };
323 +
324 +       eeprom2: eeprom@51 {
325 +               compatible = "atmel,24c02";
326 +               reg = <0x51>;
327 +               pagesize = <16>;
328 +       };
329 +
330 +       eeprom3: eeprom@52 {
331 +               compatible = "atmel,24c02";
332 +               reg = <0x52>;
333 +               pagesize = <16>;
334 +       };
335 +
336 +       eeprom4: eeprom@53 {
337 +               compatible = "atmel,24c02";
338 +               reg = <0x53>;
339 +               pagesize = <16>;
340 +       };
341 +
342 +       gpio: pca9555@23 {
343 +               compatible = "nxp,pca9555";
344 +               reg = <0x23>;
345 +               gpio-controller;
346 +               #gpio-cells = <2>;
347 +       };
348 +
349 +       rtc: ds1672@68 {
350 +               compatible = "dallas,ds1672";
351 +               reg = <0x68>;
352 +       };
353 +};
354 +
355 +&i2c2 {
356 +       clock-frequency = <100000>;
357 +       pinctrl-names = "default";
358 +       pinctrl-0 = <&pinctrl_i2c2>;
359 +       status = "okay";
360 +};
361 +
362 +&i2c3 {
363 +       clock-frequency = <100000>;
364 +       pinctrl-names = "default";
365 +       pinctrl-0 = <&pinctrl_i2c3>;
366 +       status = "okay";
367 +
368 +       gpio_exp: pca9555@24 {
369 +               compatible = "nxp,pca9555";
370 +               reg = <0x24>;
371 +               gpio-controller;
372 +               #gpio-cells = <2>;
373 +       };
374 +
375 +};
376 +
377 +&pcie {
378 +       pinctrl-names = "default";
379 +       pinctrl-0 = <&pinctrl_pcie>;
380 +       reset-gpio = <&gpio1 0 GPIO_ACTIVE_LOW>;
381 +       status = "okay";
382 +};
383 +
384 +&ssi1 {
385 +       status = "okay";
386 +};
387 +
388 +&uart2 {
389 +       pinctrl-names = "default";
390 +       pinctrl-0 = <&pinctrl_uart2>;
391 +       status = "okay";
392 +};
393 +
394 +&uart3 {
395 +       pinctrl-names = "default";
396 +       pinctrl-0 = <&pinctrl_uart3>;
397 +       status = "okay";
398 +};
399 +
400 +&usbotg {
401 +       vbus-supply = <&reg_usb_otg_vbus>;
402 +       pinctrl-names = "default";
403 +       pinctrl-0 = <&pinctrl_usbotg>;
404 +       disable-over-current;
405 +       status = "okay";
406 +};
407 +
408 +&usbh1 {
409 +       vbus-supply = <&reg_usb_h1_vbus>;
410 +       status = "okay";
411 +};
412 +
413 +&iomuxc {
414 +       imx6qdl-gw51xx {
415 +               pinctrl_flexcan1: flexcan1grp {
416 +                       fsl,pins = <
417 +                               MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX        0x1b0b1
418 +                               MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX        0x1b0b1
419 +                               MX6QDL_PAD_GPIO_9__GPIO1_IO09           0x4001b0b0 /* CAN_STBY */
420 +                       >;
421 +               };
422 +
423 +               pinctrl_gpio_leds: gpioledsgrp {
424 +                       fsl,pins = <
425 +                               MX6QDL_PAD_KEY_ROW0__GPIO4_IO07   0x1b0b0
426 +                       >;
427 +               };
428 +
429 +               pinctrl_gpmi_nand: gpminandgrp {
430 +                       fsl,pins = <
431 +                               MX6QDL_PAD_NANDF_CLE__NAND_CLE          0xb0b1
432 +                               MX6QDL_PAD_NANDF_ALE__NAND_ALE          0xb0b1
433 +                               MX6QDL_PAD_NANDF_WP_B__NAND_WP_B        0xb0b1
434 +                               MX6QDL_PAD_NANDF_RB0__NAND_READY_B      0xb000
435 +                               MX6QDL_PAD_NANDF_CS0__NAND_CE0_B        0xb0b1
436 +                               MX6QDL_PAD_NANDF_CS1__NAND_CE1_B        0xb0b1
437 +                               MX6QDL_PAD_SD4_CMD__NAND_RE_B           0xb0b1
438 +                               MX6QDL_PAD_SD4_CLK__NAND_WE_B           0xb0b1
439 +                               MX6QDL_PAD_NANDF_D0__NAND_DATA00        0xb0b1
440 +                               MX6QDL_PAD_NANDF_D1__NAND_DATA01        0xb0b1
441 +                               MX6QDL_PAD_NANDF_D2__NAND_DATA02        0xb0b1
442 +                               MX6QDL_PAD_NANDF_D3__NAND_DATA03        0xb0b1
443 +                               MX6QDL_PAD_NANDF_D4__NAND_DATA04        0xb0b1
444 +                               MX6QDL_PAD_NANDF_D5__NAND_DATA05        0xb0b1
445 +                               MX6QDL_PAD_NANDF_D6__NAND_DATA06        0xb0b1
446 +                               MX6QDL_PAD_NANDF_D7__NAND_DATA07        0xb0b1
447 +                       >;
448 +               };
449 +
450 +               pinctrl_i2c1: i2c1grp {
451 +                       fsl,pins = <
452 +                               MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
453 +                               MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
454 +                       >;
455 +               };
456 +
457 +               pinctrl_i2c2: i2c2grp {
458 +                       fsl,pins = <
459 +                               MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
460 +                               MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
461 +                       >;
462 +               };
463 +
464 +               pinctrl_i2c3: i2c3grp {
465 +                       fsl,pins = <
466 +                               MX6QDL_PAD_GPIO_3__I2C3_SCL             0x4001b8b1
467 +                               MX6QDL_PAD_GPIO_6__I2C3_SDA             0x4001b8b1
468 +                       >;
469 +               };
470 +
471 +               pinctrl_pcie: pciegrp {
472 +                       fsl,pins = <
473 +                               MX6QDL_PAD_GPIO_0__GPIO1_IO00           0x1b0b0 /* PCIE RST */
474 +                       >;
475 +               };
476 +
477 +               pinctrl_uart2: uart2grp {
478 +                       fsl,pins = <
479 +                               MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA      0x1b0b1
480 +                               MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA      0x1b0b1
481 +                       >;
482 +               };
483 +
484 +               pinctrl_uart3: uart3grp {
485 +                       fsl,pins = <
486 +                               MX6QDL_PAD_EIM_D24__UART3_TX_DATA       0x1b0b1
487 +                               MX6QDL_PAD_EIM_D25__UART3_RX_DATA       0x1b0b1
488 +                       >;
489 +               };
490 +
491 +               pinctrl_usbotg: usbotggrp {
492 +                       fsl,pins = <
493 +                               MX6QDL_PAD_GPIO_1__USB_OTG_ID           0x17059
494 +                       >;
495 +               };
496 +       };
497 +};
498 -- 
499 2.5.1
500