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