blob: 59431b23594489dd3f211c0be1a93c031d3c0c46 [file] [log] [blame]
Marcin Niestroje0673792018-11-21 20:32:00 +01001/*
2 * Copyright (C) 2015 Jablotron s.r.o. -- http://www.jablotron.com/
3 * Author: Rostislav Lisovy <lisovy@jablotron.cz>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9/dts-v1/;
10#include "am335x-chilisom.dtsi"
11
12/ {
13 model = "AM335x Chiliboard";
14 compatible = "grinn,am335x-chiliboard", "grinn,am335x-chilisom",
15 "ti,am33xx";
16
17 leds {
18 compatible = "gpio-leds";
19 pinctrl-names = "default";
20 pinctrl-0 = <&led_gpio_pins>;
21
22 led0 {
23 label = "led0";
24 gpios = <&gpio3 7 GPIO_ACTIVE_LOW>;
25 default-state = "keep";
26 linux,default-trigger = "heartbeat";
27 };
28
29 led1 {
30 label = "led1";
31 gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
32 default-state = "keep";
33 };
34 };
35};
36
37&am33xx_pinmux {
38 uart0_pins: pinmux_uart0_pins {
39 pinctrl-single,pins = <
40 AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
41 AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
42 >;
43 };
44
45 cpsw_default: cpsw_default {
46 pinctrl-single,pins = <
47 /* Slave 1 */
48 AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs */
49 AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */
50 AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */
51 AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */
52 AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */
53 AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */
54 AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */
55 AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii_ref_clk */
56 >;
57 };
58
59 cpsw_sleep: cpsw_sleep {
60 pinctrl-single,pins = <
61 /* Slave 1 reset value */
62 AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
63 AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
64 AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
65 AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
66 AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
67 AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
68 AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
69 AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
70 AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
71 >;
72 };
73
74 davinci_mdio_default: davinci_mdio_default {
75 pinctrl-single,pins = <
76 /* mdio_data.mdio_data */
77 AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)
78 /* mdio_clk.mdio_clk */
79 AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)
80 >;
81 };
82
83 davinci_mdio_sleep: davinci_mdio_sleep {
84 pinctrl-single,pins = <
85 /* MDIO reset value */
86 AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
87 AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
88 >;
89 };
90
91 usb1_drvvbus: usb1_drvvbus {
92 pinctrl-single,pins = <
93 AM33XX_IOPAD(0xa34, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb1_drvvbus.usb1_drvvbus */
94 >;
95 };
96
97 sd_pins: pinmux_sd_card {
98 pinctrl-single,pins = <
99 AM33XX_IOPAD(0x8f0, PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
100 AM33XX_IOPAD(0x8f4, PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
101 AM33XX_IOPAD(0x8f8, PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
102 AM33XX_IOPAD(0x8fc, PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
103 AM33XX_IOPAD(0x900, PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
104 AM33XX_IOPAD(0x904, PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
105 AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
106 >;
107 };
108
109 led_gpio_pins: led_gpio_pins {
110 pinctrl-single,pins = <
111 AM33XX_IOPAD(0x9e4, PIN_OUTPUT | MUX_MODE7) /* emu0.gpio3_7 */
112 AM33XX_IOPAD(0x9e8, PIN_OUTPUT | MUX_MODE7) /* emu1.gpio3_8 */
113 >;
114 };
115};
116
117&uart0 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&uart0_pins>;
120
121 status = "okay";
122};
123
124&ldo4_reg {
125 regulator-min-microvolt = <3300000>;
126 regulator-max-microvolt = <3300000>;
127};
128
129/* Ethernet */
130&mac {
131 slaves = <1>;
132 pinctrl-names = "default", "sleep";
133 pinctrl-0 = <&cpsw_default>;
134 pinctrl-1 = <&cpsw_sleep>;
135 status = "okay";
136};
137
138&davinci_mdio {
139 pinctrl-names = "default", "sleep";
140 pinctrl-0 = <&davinci_mdio_default>;
141 pinctrl-1 = <&davinci_mdio_sleep>;
142 status = "okay";
143};
144
145&cpsw_emac0 {
146 phy_id = <&davinci_mdio>, <0>;
147 phy-mode = "rmii";
148};
149
150&phy_sel {
151 rmii-clock-ext;
152};
153
154/* USB */
155&usb {
156 status = "okay";
157};
158
159&usb_ctrl_mod {
160 status = "okay";
161};
162
163&usb1_phy {
164 status = "okay";
165};
166
167&usb1 {
168 pinctrl-names = "default";
169 pinctrl-0 = <&usb1_drvvbus>;
170
171 status = "okay";
172 dr_mode = "host";
173};
174
175&cppi41dma {
176 status = "okay";
177};
178
179/* microSD */
180&mmc1 {
181 pinctrl-names = "default";
182 pinctrl-0 = <&sd_pins>;
183 vmmc-supply = <&ldo4_reg>;
184 bus-width = <0x4>;
185 cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
186 status = "okay";
187};
188
189&tps {
190 interrupt-parent = <&intc>;
191 interrupts = <7>; /* NNMI */
192
193 charger {
194 status = "okay";
195 };
196
197 pwrbutton {
198 status = "okay";
199 };
200};