ARM: dts: omap3: Fix NAND device nodes
[cascardo/linux.git] / arch / arm / boot / dts / logicpd-torpedo-som.dtsi
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License version 2 as
4  * published by the Free Software Foundation.
5  */
6
7 #include <dt-bindings/input/input.h>
8
9 / {
10         cpus {
11                 cpu@0 {
12                         cpu0-supply = <&vcc>;
13                 };
14         };
15
16         leds {
17                 compatible = "gpio-leds";
18                 user0 {
19                         label = "user0";
20                         gpios = <&twl_gpio 18 GPIO_ACTIVE_LOW>; /* LEDA */
21                         linux,default-trigger = "none";
22                 };
23         };
24
25         wl12xx_vmmc: wl12xx_vmmc {
26                 compatible = "regulator-fixed";
27                 regulator-name = "vwl1271";
28                 regulator-min-microvolt = <1800000>;
29                 regulator-max-microvolt = <1800000>;
30                 gpio = <&gpio5 29 0>;   /* gpio157 */
31                 startup-delay-us = <70000>;
32                 enable-active-high;
33                 vin-supply = <&vmmc2>;
34         };
35 };
36
37 &gpmc {
38         ranges = <0 0 0x30000000 0x1000000>;    /* CS0: 16MB for NAND */
39
40         nand@0,0 {
41                 compatible = "ti,omap2-nand";
42                 reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
43                 interrupt-parent = <&gpmc>;
44                 interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
45                              <1 IRQ_TYPE_NONE>; /* termcount */
46                 linux,mtd-name = "micron,mt29f4g16abbda3w";
47                 nand-bus-width = <16>;
48                 ti,nand-ecc-opt = "bch8";
49                 gpmc,sync-clk-ps = <0>;
50                 gpmc,cs-on-ns = <0>;
51                 gpmc,cs-rd-off-ns = <44>;
52                 gpmc,cs-wr-off-ns = <44>;
53                 gpmc,adv-on-ns = <6>;
54                 gpmc,adv-rd-off-ns = <34>;
55                 gpmc,adv-wr-off-ns = <44>;
56                 gpmc,we-off-ns = <40>;
57                 gpmc,oe-off-ns = <54>;
58                 gpmc,access-ns = <64>;
59                 gpmc,rd-cycle-ns = <82>;
60                 gpmc,wr-cycle-ns = <82>;
61                 gpmc,wr-access-ns = <40>;
62                 gpmc,wr-data-mux-bus-ns = <0>;
63                 gpmc,device-width = <2>;
64                 #address-cells = <1>;
65                 #size-cells = <1>;
66
67                 /* u-boot uses mtdparts=omap2-nand.0:512k(x-loader),1920k(u-boot),128k(u-boot-env),4m(kernel),-(fs) */
68
69                 x-loader@0 {
70                         label = "x-loader";
71                         reg = <0 0x80000>;
72                 };
73
74                 bootloaders@80000 {
75                         label = "u-boot";
76                         reg = <0x80000 0x1e0000>;
77                 };
78
79                 bootloaders_env@260000 {
80                         label = "u-boot-env";
81                         reg = <0x260000 0x20000>;
82                 };
83
84                 kernel@280000 {
85                         label = "kernel";
86                         reg = <0x280000 0x400000>;
87                 };
88
89                 filesystem@680000 {
90                         label = "fs";
91                         reg = <0x680000 0>;     /* 0 = MTDPART_SIZ_FULL */
92                 };
93         };
94 };
95
96 &i2c1 {
97         clock-frequency = <2600000>;
98
99         twl: twl@48 {
100                 reg = <0x48>;
101                 interrupts = <7>; /* SYS_NIRQ cascaded to intc */
102                 interrupt-parent = <&intc>;
103                 twl_audio: audio {
104                         compatible = "ti,twl4030-audio";
105                         codec {
106                         };
107                 };
108         };
109 };
110
111 &i2c2 {
112         clock-frequency = <400000>;
113 };
114
115 &i2c3 {
116         clock-frequency = <400000>;
117 };
118
119 &i2c2 {
120         clock-frequency = <400000>;
121 };
122
123 &i2c3 {
124         clock-frequency = <400000>;
125 };
126
127 /*
128  * Only found on the wireless SOM. For the SOM without wireless, the pins for
129  * MMC3 can be routed with jumpers to the second MMC slot on the devkit and
130  * gpio157 is not connected. So this should be OK to keep common for now,
131  * probably device tree overlays is the way to go with the various SOM and
132  * jumpering combinations for the long run.
133  */
134 &mmc3 {
135         interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>;
136         pinctrl-0 = <&mmc3_pins &mmc3_core2_pins>;
137         pinctrl-names = "default";
138         vmmc-supply = <&wl12xx_vmmc>;
139         non-removable;
140         bus-width = <4>;
141         cap-power-off-card;
142         #address-cells = <1>;
143         #size-cells = <0>;
144         wlcore: wlcore@2 {
145                 compatible = "ti,wl1283";
146                 reg = <2>;
147                 interrupt-parent = <&gpio5>;
148                 interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */
149                 ref-clock-frequency = <26000000>;
150         };
151 };
152
153 &omap3_pmx_core {
154         mmc3_pins: pinmux_mm3_pins {
155                 pinctrl-single,pins = <
156                         OMAP3_CORE1_IOPAD(0x2164, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat4.sdmmc3_dat0 */
157                         OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */
158                         OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */
159                         OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */
160                         OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLUP | MUX_MODE4) /* mcbsp4_clkx.gpio_152 */
161                         OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE4)       /* mcbsp1_fsr.gpio_157 */
162                 >;
163         };
164         mcbsp2_pins: pinmux_mcbsp2_pins {
165                 pinctrl-single,pins = <
166                         OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0)        /* mcbsp2_fsx */
167                         OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0)        /* mcbsp2_clkx */
168                         OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0)        /* mcbsp2_dr */
169                         OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0)       /* mcbsp2_dx */
170                 >;
171         };
172         uart2_pins: pinmux_uart2_pins {
173                 pinctrl-single,pins = <
174                         OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT | MUX_MODE0)        /* uart2_cts.uart2_cts */
175                         OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT | MUX_MODE0)       /* uart2_rts .uart2_rts*/
176                         OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0)       /* uart2_tx.uart2_tx */
177                         OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0)        /* uart2_rx.uart2_rx */
178                         OMAP3_CORE1_IOPAD(0x2198, PIN_OUTPUT | MUX_MODE4)       /* GPIO_162,BT_EN */
179                 >;
180         };
181 };
182
183 &uart2 {
184         interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
185         pinctrl-names = "default";
186         pinctrl-0 = <&uart2_pins>;
187 };
188
189 &omap3_pmx_core2 {
190         mmc3_core2_pins: pinmux_mmc3_core2_pins {
191                 pinctrl-single,pins = <
192                         OMAP3630_CORE2_IOPAD(0x25d8, PIN_INPUT_PULLUP | MUX_MODE2)   /* etk_clk.sdmmc3_clk */
193                         OMAP3630_CORE2_IOPAD(0x25da, PIN_INPUT_PULLUP | MUX_MODE2)   /* etk_ctl.sdmmc3_cmd */
194                 >;
195         };
196 };
197
198 #include "twl4030.dtsi"
199 #include "twl4030_omap3.dtsi"
200
201 &twl {
202         twl_power: power {
203                 compatible = "ti,twl4030-power-idle-osc-off", "ti,twl4030-power-idle";
204                 ti,use_poweroff;
205         };
206 };
207
208 &twl_gpio {
209         ti,use-leds;
210 };