1/*
2 * Copyright (C) 2014 NovaTech LLC - http://www.novatechweb.com
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8/dts-v1/;
9
10#include "am33xx.dtsi"
11
12/ {
13	model = "NovaTech OrionLXm";
14	compatible = "novatech,am335x-lxm", "ti,am33xx";
15
16	cpus {
17		cpu@0 {
18			cpu0-supply = <&vdd1_reg>;
19		};
20	};
21
22	memory {
23		device_type = "memory";
24		reg = <0x80000000 0x20000000>; /* 512 MB */
25	};
26
27	/* Power supply provides a fixed 5V @2A */
28	vbat: fixedregulator@0 {
29		compatible = "regulator-fixed";
30		regulator-name = "vbat";
31		regulator-min-microvolt = <5000000>;
32		regulator-max-microvolt = <5000000>;
33		regulator-boot-on;
34	};
35
36	/* Power supply provides a fixed 3.3V @3A */
37	vmmcsd_fixed: fixedregulator@1 {
38		compatible = "regulator-fixed";
39		regulator-name = "vmmcsd_fixed";
40		regulator-min-microvolt = <3300000>;
41		regulator-max-microvolt = <3300000>;
42		regulator-boot-on;
43	};
44};
45
46&am33xx_pinmux {
47	mmc1_pins: pinmux_mmc1_pins {
48		pinctrl-single,pins = <
49			0xf0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat3 */
50			0xf4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat2 */
51			0xf8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat1 */
52			0xfc (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat0 */
53			0x100 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_clk */
54			0x104 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_cmd */
55		>;
56	};
57
58	i2c0_pins: pinmux_i2c0_pins {
59		pinctrl-single,pins = <
60			0x188 (PIN_INPUT | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
61			0x18c (PIN_INPUT | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
62		>;
63	};
64
65	cpsw_default: cpsw_default {
66		pinctrl-single,pins = <
67			/* Slave 1 */
68			0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_int */
69			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* rmii1_crs_dv */
70			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* rmii1_rxer */
71			0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* rmii1_txen */
72			0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* rmii1_td1 */
73			0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* rmii1_td0 */
74			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* rmii1_rd1 */
75			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* rmii1_rd0 */
76			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* rmii1_refclk */
77
78			/* Slave 2 */
79			0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* rmii2_txen */
80			0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* rmii2_td1 */
81			0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* rmii2_td0 */
82			0x68 (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* rmii2_rd1 */
83			0x6c (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* rmii2_rd0 */
84			0x70 (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* rmii2_crs_dv */
85			0x74 (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* rmii2_rxer */
86			0x78 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_int */
87			0x108 (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* rmii2_refclk */
88		>;
89	};
90
91	cpsw_sleep: cpsw_sleep {
92		pinctrl-single,pins = <
93			/* Slave 1 reset value */
94			0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_int */
95			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_crs_dv */
96			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_rxer */
97			0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_txen */
98			0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_td1 */
99			0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_td0 */
100			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_rd1 */
101			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_rd0 */
102			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii1_refclk */
103
104			/* Slave 2 reset value*/
105			0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_txen */
106			0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_td1 */
107			0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_td0 */
108			0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_rd1 */
109			0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_rd0 */
110			0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_crs_dv */
111			0x74 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_rxer */
112			0x78 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_int */
113			0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* rmii2_refclk */
114		>;
115	};
116
117	davinci_mdio_default: davinci_mdio_default {
118		pinctrl-single,pins = <
119			/* MDIO */
120			0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
121			0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
122		>;
123	};
124
125	davinci_mdio_sleep: davinci_mdio_sleep {
126		pinctrl-single,pins = <
127			/* MDIO reset value */
128			0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
129			0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
130		>;
131	};
132
133	emmc_pins: pinmux_emmc_pins {
134		pinctrl-single,pins = <
135			0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
136			0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
137			0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
138			0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
139			0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
140			0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
141			0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
142			0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
143			0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
144			0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
145		>;
146	};
147
148	uart0_pins: pinmux_uart0_pins {
149		pinctrl-single,pins = <
150			0x170 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
151			0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
152		>;
153	};
154};
155
156&i2c0 {
157	pinctrl-names = "default";
158	pinctrl-0 = <&i2c0_pins>;
159
160	status = "okay";
161	clock-frequency = <400000>;
162
163	serial_config1: serial_config1@20 {
164		compatible = "nxp,pca9539";
165		reg = <0x20>;
166	};
167
168	serial_config2: serial_config2@21 {
169		compatible = "nxp,pca9539";
170		reg = <0x21>;
171	};
172
173	tps: tps@2d {
174		compatible = "ti,tps65910";
175		reg = <0x2d>;
176	};
177};
178
179/include/ "tps65910.dtsi"
180
181&tps {
182	vcc1-supply = <&vbat>;
183	vcc2-supply = <&vbat>;
184	vcc3-supply = <&vbat>;
185	vcc4-supply = <&vbat>;
186	vcc5-supply = <&vbat>;
187	vcc6-supply = <&vbat>;
188	vcc7-supply = <&vbat>;
189	vccio-supply = <&vbat>;
190
191	regulators {
192		/* vrtc - unused */
193
194		vio_reg: regulator@1 {
195			regulator-name = "vio_1v5,ddr";
196			regulator-min-microvolt = <1500000>;
197			regulator-max-microvolt = <1500000>;
198			regulator-boot-on;
199			regulator-always-on;
200		};
201
202		vdd1_reg: regulator@2 {
203			regulator-name = "vdd1,mpu";
204			regulator-min-microvolt = <600000>;
205			regulator-max-microvolt = <1500000>;
206			regulator-boot-on;
207			regulator-always-on;
208		};
209
210		vdd2_reg: regulator@3 {
211			regulator-name = "vdd2_1v1,core";
212			regulator-min-microvolt = <1100000>;
213			regulator-max-microvolt = <1100000>;
214			regulator-boot-on;
215			regulator-always-on;
216		};
217
218		/* vdd3 - unused */
219
220		/* vdig1 - unused */
221
222		vdig2_reg: regulator@6 {
223			regulator-name = "vdig2_1v8,vdds_pll";
224			regulator-min-microvolt = <1800000>;
225			regulator-max-microvolt = <1800000>;
226			regulator-boot-on;
227			regulator-always-on;
228		};
229
230		/* vpll - unused */
231
232		vdac_reg: regulator@8 {
233			regulator-name = "vdac_1v8,vdds";
234			regulator-min-microvolt = <1800000>;
235			regulator-max-microvolt = <1800000>;
236			regulator-boot-on;
237			regulator-always-on;
238		};
239
240		vaux1_reg: regulator@9 {
241			regulator-name = "vaux1_1v8,usb";
242			regulator-min-microvolt = <1800000>;
243			regulator-max-microvolt = <1800000>;
244			regulator-boot-on;
245			regulator-always-on;
246		};
247
248		vaux2_reg: regulator@10 {
249			regulator-name = "vaux2_3v3,io";
250			regulator-min-microvolt = <3300000>;
251			regulator-max-microvolt = <3300000>;
252			regulator-boot-on;
253			regulator-always-on;
254		};
255
256		vaux33_reg: regulator@11 {
257			regulator-name = "vaux33_3v3,usb";
258			regulator-min-microvolt = <3300000>;
259			regulator-max-microvolt = <3300000>;
260			regulator-boot-on;
261			regulator-always-on;
262		};
263
264		vmmc_reg: regulator@12 {
265			regulator-name = "vmmc_3v3,io";
266			regulator-min-microvolt = <3300000>;
267			regulator-max-microvolt = <3300000>;
268			regulator-boot-on;
269			regulator-always-on;
270		};
271	};
272};
273
274&sham {
275	status = "okay";
276};
277
278&aes {
279	status = "okay";
280};
281
282&uart0 {
283	pinctrl-names = "default";
284	pinctrl-0 = <&uart0_pins>;
285
286	status = "okay";
287};
288
289&usb {
290	status = "okay";
291};
292
293&usb_ctrl_mod {
294	status = "okay";
295};
296
297&usb0_phy {
298	status = "okay";
299};
300
301&usb1_phy {
302	status = "okay";
303};
304
305&usb0 {
306	status = "okay";
307	dr_mode = "host";
308};
309
310&usb1 {
311	status = "okay";
312	dr_mode = "host";
313};
314
315&cppi41dma  {
316	status = "okay";
317};
318
319&cpsw_emac0 {
320	phy_id = <&davinci_mdio>, <5>;
321	phy-mode = "rmii";
322	dual_emac_res_vlan = <2>;
323};
324
325&cpsw_emac1 {
326	phy_id = <&davinci_mdio>, <4>;
327	phy-mode = "rmii";
328	dual_emac_res_vlan = <3>;
329};
330
331&phy_sel {
332	rmii-clock-ext;
333};
334
335&mac {
336	pinctrl-names = "default", "sleep";
337	pinctrl-0 = <&cpsw_default>;
338	pinctrl-1 = <&cpsw_sleep>;
339	dual_emac = <1>;
340	status = "okay";
341};
342
343&davinci_mdio {
344	pinctrl-names = "default", "sleep";
345	pinctrl-0 = <&davinci_mdio_default>;
346	pinctrl-1 = <&davinci_mdio_sleep>;
347	status = "okay";
348};
349
350&mmc1 {
351	pinctrl-names = "default";
352	pinctrl-0 = <&mmc1_pins>;
353	vmmc-supply = <&vmmcsd_fixed>;
354	bus-width = <4>;
355	status = "okay";
356};
357
358&mmc2 {
359	pinctrl-names = "default";
360	pinctrl-0 = <&emmc_pins>;
361	vmmc-supply = <&vmmcsd_fixed>;
362	bus-width = <8>;
363	ti,non-removable;
364	status = "okay";
365};
366
367