]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/am335x-cm-t335.dts
ARM: dts: cm-t335: add support for NAND flash
[karo-tx-linux.git] / arch / arm / boot / dts / am335x-cm-t335.dts
1 /*
2  * am335x-cm-t335.dts - Device Tree file for Compulab CM-T335
3  *
4  * Copyright (C) 2014 - 2015 CompuLab Ltd. - http://www.compulab.co.il/
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10
11 /dts-v1/;
12
13 #include "am33xx.dtsi"
14
15 / {
16         model = "CompuLab CM-T335";
17         compatible = "compulab,cm-t335", "ti,am33xx";
18
19         memory {
20                 device_type = "memory";
21                 reg = <0x80000000 0x8000000>;   /* 128 MB */
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26                 pinctrl-names = "default";
27                 pinctrl-0 = <&gpio_led_pins>;
28                 led@0 {
29                         label = "cm_t335:green";
30                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;     /* gpio2_0 */
31                         linux,default-trigger = "heartbeat";
32                 };
33         };
34 };
35
36 &am33xx_pinmux {
37         pinctrl-names = "default";
38         pinctrl-0 = <>;
39
40         i2c0_pins: pinmux_i2c0_pins {
41                 pinctrl-single,pins = <
42                         /* i2c0_sda.i2c0_sda */
43                         AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)
44                         /* i2c0_scl.i2c0_scl */
45                         AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)
46                 >;
47         };
48
49         i2c1_pins: pinmux_i2c1_pins {
50                 pinctrl-single,pins = <
51                         /* uart0_ctsn.i2c1_sda */
52                         AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE2)
53                         /* uart0_rtsn.i2c1_scl */
54                         AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE2)
55                 >;
56         };
57
58         gpio_led_pins: pinmux_gpio_led_pins {
59                 pinctrl-single,pins = <
60                         /* gpmc_csn3.gpio2_0 */
61                         AM33XX_IOPAD(0x888, PIN_OUTPUT | MUX_MODE7)
62                 >;
63         };
64
65         nandflash_pins: pinmux_nandflash_pins {
66                 pinctrl-single,pins = <
67                         /* gpmc_ad0.gpmc_ad0 */
68                         AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0)
69                         /* gpmc_ad1.gpmc_ad1 */
70                         AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0)
71                         /* gpmc_ad2.gpmc_ad2 */
72                         AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0)
73                         /* gpmc_ad3.gpmc_ad3 */
74                         AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0)
75                         /* gpmc_ad4.gpmc_ad4 */
76                         AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0)
77                         /* gpmc_ad5.gpmc_ad5 */
78                         AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0)
79                         /* gpmc_ad6.gpmc_ad6 */
80                         AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0)
81                         /* gpmc_ad7.gpmc_ad7 */
82                         AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0)
83                         /* gpmc_wait0.gpmc_wait0 */
84                         AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)
85                         /* gpmc_wpn.gpio0_30 */
86                         AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7)
87                         /* gpmc_csn0.gpmc_csn0  */
88                         AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)
89                         /* gpmc_advn_ale.gpmc_advn_ale */
90                         AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)
91                         /* gpmc_oen_ren.gpmc_oen_ren */
92                         AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)
93                         /* gpmc_wen.gpmc_wen */
94                         AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)
95                         /* gpmc_ben0_cle.gpmc_ben0_cle */
96                         AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)
97                 >;
98         };
99
100         uart0_pins: pinmux_uart0_pins {
101                 pinctrl-single,pins = <
102                         /* uart0_rxd.uart0_rxd */
103                         AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)
104                         /* uart0_txd.uart0_txd */
105                         AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
106                 >;
107         };
108 };
109
110 &uart0 {
111         pinctrl-names = "default";
112         pinctrl-0 = <&uart0_pins>;
113
114         status = "okay";
115 };
116
117 &i2c0 {
118         pinctrl-names = "default";
119         pinctrl-0 = <&i2c0_pins>;
120
121         status = "okay";
122         clock-frequency = <400000>;
123         /* CM-T335 board EEPROM */
124         eeprom: 24c02@50 {
125                 compatible = "atmel,24c02";
126                 reg = <0x50>;
127                 pagesize = <16>;
128         };
129         /* Real Time Clock */
130         ext_rtc: em3027@56 {
131                 compatible = "emmicro,em3027";
132                 reg = <0x56>;
133         };
134 };
135
136 &gpmc {
137         status = "okay";
138         pinctrl-names = "default";
139         pinctrl-0 = <&nandflash_pins>;
140         ranges = <0 0 0x08000000 0x10000000>;   /* CS0: NAND */
141         nand@0,0 {
142                 reg = <0 0 0>; /* CS0, offset 0 */
143                 ti,nand-ecc-opt = "bch8";
144                 ti,elm-id = <&elm>;
145                 nand-bus-width = <8>;
146                 gpmc,device-width = <1>;
147                 gpmc,sync-clk-ps = <0>;
148                 gpmc,cs-on-ns = <0>;
149                 gpmc,cs-rd-off-ns = <44>;
150                 gpmc,cs-wr-off-ns = <44>;
151                 gpmc,adv-on-ns = <6>;
152                 gpmc,adv-rd-off-ns = <34>;
153                 gpmc,adv-wr-off-ns = <44>;
154                 gpmc,we-on-ns = <0>;
155                 gpmc,we-off-ns = <40>;
156                 gpmc,oe-on-ns = <0>;
157                 gpmc,oe-off-ns = <54>;
158                 gpmc,access-ns = <64>;
159                 gpmc,rd-cycle-ns = <82>;
160                 gpmc,wr-cycle-ns = <82>;
161                 gpmc,wait-on-read = "true";
162                 gpmc,wait-on-write = "true";
163                 gpmc,bus-turnaround-ns = <0>;
164                 gpmc,cycle2cycle-delay-ns = <0>;
165                 gpmc,clk-activation-ns = <0>;
166                 gpmc,wait-monitoring-ns = <0>;
167                 gpmc,wr-access-ns = <40>;
168                 gpmc,wr-data-mux-bus-ns = <0>;
169                 /* MTD partition table */
170                 #address-cells = <1>;
171                 #size-cells = <1>;
172                 partition@0 {
173                         label = "spl";
174                         reg = <0x00000000 0x00200000>;
175                 };
176                 partition@1 {
177                         label = "uboot";
178                         reg = <0x00200000 0x00100000>;
179                 };
180                 partition@2 {
181                         label = "uboot environment";
182                         reg = <0x00300000 0x00100000>;
183                 };
184                 partition@3 {
185                         label = "dtb";
186                         reg = <0x00400000 0x00100000>;
187                 };
188                 partition@4 {
189                         label = "splash";
190                         reg = <0x00500000 0x00400000>;
191                 };
192                 partition@5 {
193                         label = "linux";
194                         reg = <0x00900000 0x00600000>;
195                 };
196                 partition@6 {
197                         label = "rootfs";
198                         reg = <0x00F00000 0>;
199                 };
200         };
201 };
202
203 &elm {
204         status = "okay";
205 };