1/*
2 * Common support for Siemens Draco SOM (AM335x based)
3 *
4 * Copyright (C) 2013,2014 - Stefan Roese <sr@denx.de>
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2.  This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11/ {
12	chosen {
13		stdout-path = &uart0;
14		tick-timer = &timer2;
15	};
16
17	memory {
18		device_type = "memory";
19		reg = <0x80000000 0x08000000>; /* 128 MB */
20	};
21
22	ocp {
23
24		i2c0: i2c@44e0b000 {
25			pinctrl-names = "default";
26			pinctrl-0 = <&i2c0_pins>;
27
28			status = "okay";
29			clock-frequency = <400000>;
30
31			eeprom: eeprom@50 {
32				compatible = "atmel,24c128";
33				reg = <0x50>;
34				pagesize = <64>;
35			};
36		};
37
38		musb: usb@47400000 {
39			status = "okay";
40
41			control@44e10620 {
42				status = "okay";
43			};
44
45			usb-phy@47401300 {
46				status = "okay";
47			};
48
49			usb-phy@47401b00 {
50				status = "okay";
51			};
52
53			usb@47401000 {
54				status = "okay";
55			};
56
57			usb@47401800 {
58				status = "okay";
59				dr_mode = "host";
60			};
61
62			dma-controller@47402000  {
63				status = "okay";
64			};
65		};
66	};
67};
68
69&am33xx_pinmux {
70		i2c0_pins: pinmux_i2c0_pins {
71			pinctrl-single,pins = <
72				0x188 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
73				0x18c (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
74			>;
75		};
76
77		uart0_pins: pinmux_uart0_pins {
78			pinctrl-single,pins = <
79				0x170 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
80				0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
81			>;
82		};
83
84		nandflash_pins: nandflash_pins {
85			pinctrl-single,pins = <
86				0x0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad0.gpmc_ad0 */
87				0x4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad1.gpmc_ad1 */
88				0x8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad2.gpmc_ad2 */
89				0xc (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad3.gpmc_ad3 */
90				0x10 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad4.gpmc_ad4 */
91				0x14 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad5.gpmc_ad5 */
92				0x18 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad6.gpmc_ad6 */
93				0x1c (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad7.gpmc_ad7 */
94				0x70 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_wait0.gpmc_wait0 */
95				0x74 (PIN_INPUT_PULLUP | MUX_MODE7)	/* gpmc_wpn.gpio0_30 */
96				0x7c (PIN_OUTPUT | MUX_MODE0)		/* gpmc_csn0.gpmc_csn0  */
97				0x90 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_advn_ale.gpmc_advn_ale */
98				0x94 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_oen_ren.gpmc_oen_ren */
99				0x98 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_wen.gpmc_wen */
100				0x9c (PIN_OUTPUT | MUX_MODE0)		/* gpmc_be0n_cle.gpmc_be0n_cle */
101			>;
102		};
103	};
104
105
106&timer3 {
107	status = "disabled";
108};
109
110&uart0 {
111	pinctrl-names = "default";
112	pinctrl-0 = <&uart0_pins>;
113	status = "okay";
114};
115
116&uart4 {
117	status = "disabled";
118};
119
120&elm {
121	status = "okay";
122};
123
124&gpmc {
125	status = "okay";
126	pinctrl-names = "default";
127	pinctrl-0 = <&nandflash_pins>;
128
129	ranges = <0 0 0x08000000 0x10000000>;	/* CS0: NAND */
130
131	nand@0,0 {
132		reg = <0 0 0>; /* CS0, offset 0 */
133		nand-bus-width = <8>;
134		ti,nand-ecc-opt = "bch8";
135		gpmc,device-nand = "true";
136		gpmc,device-width = <1>;
137		gpmc,sync-clk-ps = <0>;
138		gpmc,cs-on-ns = <0>;
139		gpmc,cs-rd-off-ns = <44>;
140		gpmc,cs-wr-off-ns = <44>;
141		gpmc,adv-on-ns = <6>;
142		gpmc,adv-rd-off-ns = <34>;
143		gpmc,adv-wr-off-ns = <44>;
144		gpmc,we-on-ns = <0>;
145		gpmc,we-off-ns = <40>;
146		gpmc,oe-on-ns = <0>;
147		gpmc,oe-off-ns = <54>;
148		gpmc,access-ns = <64>;
149		gpmc,rd-cycle-ns = <82>;
150		gpmc,wr-cycle-ns = <82>;
151		gpmc,wait-on-read = "true";
152		gpmc,wait-on-write = "true";
153		gpmc,bus-turnaround-ns = <0>;
154		gpmc,cycle2cycle-delay-ns = <0>;
155		gpmc,clk-activation-ns = <0>;
156		gpmc,wait-monitoring-ns = <0>;
157		gpmc,wr-access-ns = <40>;
158		gpmc,wr-data-mux-bus-ns = <0>;
159
160		#address-cells = <1>;
161		#size-cells = <1>;
162		elm_id = <&elm>;
163	};
164};
165
166/* disable the RTC node as its not accessible on the draco/dxr2 board */
167&rtc {
168	status = "disabled";
169	ti,hwmods = "disabled";
170};
171