GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / imx51-eukrea-mbimxsd51-baseboard.dts
1 /*
2  * Copyright 2013 EukrĂ©a Electromatique <denis@eukrea.com>
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16  * MA 02110-1301, USA.
17  */
18
19 /dts-v1/;
20 #include "imx51-eukrea-cpuimx51.dtsi"
21 #include <dt-bindings/gpio/gpio.h>
22
23 / {
24         model = "Eukrea CPUIMX51";
25         compatible = "eukrea,mbimxsd51","eukrea,cpuimx51", "fsl,imx51";
26
27         clocks {
28                 clk24M: can_clock {
29                         compatible = "fixed-clock";
30                         #clock-cells = <0>;
31                         clock-frequency = <24000000>;
32                 };
33         };
34
35         gpio_keys {
36                 compatible = "gpio-keys";
37                 pinctrl-names = "default";
38                 pinctrl-0 = <&pinctrl_gpiokeys_1>;
39
40                 button-1 {
41                         label = "BP1";
42                         gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
43                         linux,code = <256>;
44                         wakeup-source;
45                         linux,input-type = <1>;
46                 };
47         };
48
49         leds {
50                 compatible = "gpio-leds";
51                 pinctrl-names = "default";
52                 pinctrl-0 = <&pinctrl_gpioled>;
53
54                 led1 {
55                         label = "led1";
56                         gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
57                         linux,default-trigger = "heartbeat";
58                 };
59         };
60
61         regulators {
62                 compatible = "simple-bus";
63                 #address-cells = <1>;
64                 #size-cells = <0>;
65
66                 reg_can: regulator@0 {
67                         compatible = "regulator-fixed";
68                         reg = <0>;
69                         regulator-name = "CAN_RST";
70                         regulator-min-microvolt = <3300000>;
71                         regulator-max-microvolt = <3300000>;
72                         gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
73                         startup-delay-us = <20000>;
74                         enable-active-high;
75                 };
76         };
77
78         sound {
79                 compatible = "eukrea,asoc-tlv320";
80                 eukrea,model = "imx51-eukrea-tlv320aic23";
81                 ssi-controller = <&ssi2>;
82                 fsl,mux-int-port = <2>;
83                 fsl,mux-ext-port = <3>;
84         };
85
86         usbphy1: usbphy1 {
87                 compatible = "usb-nop-xceiv";
88                 clocks = <&clks IMX5_CLK_USB_PHY_GATE>;
89                 clock-names = "main_clk";
90                 clock-frequency = <19200000>;
91                 #phy-cells = <0>;
92         };
93 };
94
95 &audmux {
96         pinctrl-names = "default";
97         pinctrl-0 = <&pinctrl_audmux>;
98         status = "okay";
99 };
100
101 &esdhc1 {
102         pinctrl-names = "default";
103         pinctrl-0 = <&pinctrl_esdhc1 &pinctrl_esdhc1_cd>;
104         cd-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
105         status = "okay";
106 };
107
108 &ecspi1 {
109         pinctrl-names = "default";
110         pinctrl-0 = <&pinctrl_ecspi1>;
111         cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
112         status = "okay";
113
114         can0: can@0 {
115                 pinctrl-names = "default";
116                 pinctrl-0 = <&pinctrl_can>;
117                 compatible = "microchip,mcp2515";
118                 reg = <0>;
119                 clocks = <&clk24M>;
120                 spi-max-frequency = <10000000>;
121                 interrupt-parent = <&gpio1>;
122                 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
123                 vdd-supply = <&reg_can>;
124         };
125 };
126
127 &i2c1 {
128         tlv320aic23: codec@1a {
129                 compatible = "ti,tlv320aic23";
130                 reg = <0x1a>;
131         };
132 };
133
134 &iomuxc {
135         imx51-eukrea {
136                 pinctrl_audmux: audmuxgrp {
137                         fsl,pins = <
138                                 MX51_PAD_AUD3_BB_TXD__AUD3_TXD          0x80000000
139                                 MX51_PAD_AUD3_BB_RXD__AUD3_RXD          0x80000000
140                                 MX51_PAD_AUD3_BB_CK__AUD3_TXC           0x80000000
141                                 MX51_PAD_AUD3_BB_FS__AUD3_TXFS          0x80000000
142                         >;
143                 };
144
145
146                 pinctrl_can: cangrp {
147                         fsl,pins = <
148                                 MX51_PAD_CSI2_PIXCLK__GPIO4_15          0x80000000      /* nReset */
149                                 MX51_PAD_GPIO1_1__GPIO1_1               0x80000000      /* IRQ */
150                         >;
151                 };
152
153                 pinctrl_ecspi1: ecspi1grp {
154                         fsl,pins = <
155                                 MX51_PAD_CSPI1_MISO__ECSPI1_MISO        0x185
156                                 MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI        0x185
157                                 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK        0x185
158                                 MX51_PAD_CSPI1_SS0__GPIO4_24            0x80000000      /* CS0 */
159                         >;
160                 };
161
162                 pinctrl_esdhc1: esdhc1grp {
163                         fsl,pins = <
164                                 MX51_PAD_SD1_CMD__SD1_CMD               0x400020d5
165                                 MX51_PAD_SD1_CLK__SD1_CLK               0x20d5
166                                 MX51_PAD_SD1_DATA0__SD1_DATA0           0x20d5
167                                 MX51_PAD_SD1_DATA1__SD1_DATA1           0x20d5
168                                 MX51_PAD_SD1_DATA2__SD1_DATA2           0x20d5
169                                 MX51_PAD_SD1_DATA3__SD1_DATA3           0x20d5
170                         >;
171                 };
172
173                 pinctrl_uart1: uart1grp {
174                         fsl,pins = <
175                                 MX51_PAD_UART1_RXD__UART1_RXD           0x1c5
176                                 MX51_PAD_UART1_TXD__UART1_TXD           0x1c5
177                         >;
178                 };
179
180                 pinctrl_uart3: uart3grp {
181                         fsl,pins = <
182                                 MX51_PAD_UART3_RXD__UART3_RXD           0x1c5
183                                 MX51_PAD_UART3_TXD__UART3_TXD           0x1c5
184                         >;
185                 };
186
187                 pinctrl_uart3_rtscts: uart3rtsctsgrp {
188                         fsl,pins = <
189                                 MX51_PAD_KEY_COL4__UART3_RTS            0x1c5
190                                 MX51_PAD_KEY_COL5__UART3_CTS            0x1c5
191                         >;
192                 };
193
194                 pinctrl_backlight_1: backlightgrp-1 {
195                         fsl,pins = <
196                                 MX51_PAD_DI1_D1_CS__GPIO3_4 0x1f5
197                         >;
198                 };
199
200                 pinctrl_esdhc1_cd: esdhc1_cd {
201                         fsl,pins = <
202                                 MX51_PAD_GPIO1_0__GPIO1_0 0xd5
203                         >;
204                 };
205
206                 pinctrl_gpiokeys_1: gpiokeysgrp-1 {
207                         fsl,pins = <
208                                 MX51_PAD_NANDF_D9__GPIO3_31 0x1f5
209                         >;
210                 };
211
212                 pinctrl_gpioled: gpioledgrp-1 {
213                         fsl,pins = <
214                                 MX51_PAD_NANDF_D10__GPIO3_30 0x80000000
215                         >;
216                 };
217
218                 pinctrl_reg_lcd_3v3: reg_lcd_3v3 {
219                         fsl,pins = <
220                                 MX51_PAD_CSI1_D9__GPIO3_13 0x1f5
221                         >;
222                 };
223
224                 pinctrl_usbh1: usbh1grp {
225                         fsl,pins = <
226                                 MX51_PAD_USBH1_CLK__USBH1_CLK     0x1e5
227                                 MX51_PAD_USBH1_DIR__USBH1_DIR     0x1e5
228                                 MX51_PAD_USBH1_NXT__USBH1_NXT     0x1e5
229                                 MX51_PAD_USBH1_DATA0__USBH1_DATA0 0x1e5
230                                 MX51_PAD_USBH1_DATA1__USBH1_DATA1 0x1e5
231                                 MX51_PAD_USBH1_DATA2__USBH1_DATA2 0x1e5
232                                 MX51_PAD_USBH1_DATA3__USBH1_DATA3 0x1e5
233                                 MX51_PAD_USBH1_DATA4__USBH1_DATA4 0x1e5
234                                 MX51_PAD_USBH1_DATA5__USBH1_DATA5 0x1e5
235                                 MX51_PAD_USBH1_DATA6__USBH1_DATA6 0x1e5
236                                 MX51_PAD_USBH1_DATA7__USBH1_DATA7 0x1e5
237                                 MX51_PAD_USBH1_STP__USBH1_STP     0x1e5
238                         >;
239                 };
240
241                 pinctrl_usbh1_vbus: usbh1-vbusgrp {
242                         fsl,pins = <
243                                 MX51_PAD_EIM_CS3__GPIO2_28 0x1f5
244                         >;
245                 };
246         };
247 };
248
249 &ssi2 {
250         codec-handle = <&tlv320aic23>;
251         status = "okay";
252 };
253
254 &uart1 {
255         pinctrl-names = "default";
256         pinctrl-0 = <&pinctrl_uart1>;
257         uart-has-rtscts;
258         status = "okay";
259 };
260
261 &uart3 {
262         pinctrl-names = "default";
263         pinctrl-0 = <&pinctrl_uart3 &pinctrl_uart3_rtscts>;
264         uart-has-rtscts;
265         status = "okay";
266 };
267
268 &usbh1 {
269         pinctrl-names = "default";
270         pinctrl-0 = <&pinctrl_usbh1>;
271         fsl,usbphy = <&usbphy1>;
272         dr_mode = "host";
273         phy_type = "ulpi";
274         status = "okay";
275 };
276
277 &usbotg {
278         dr_mode = "otg";
279         phy_type = "utmi_wide";
280         status = "okay";
281 };
282
283 &usbphy0 {
284         pinctrl-names = "default";
285         pinctrl-0 = <&pinctrl_usbh1_vbus>;
286         reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
287 };