GNU Linux-libre 4.9.331-gnu1
[releases.git] / arch / arm / boot / dts / omap4-var-om44customboard.dtsi
1 /*
2  * Copyright (C) 2014 Joachim Eastwood <manabian@gmail.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
9 #include <dt-bindings/input/input.h>
10
11 / {
12         aliases {
13                 display0 = &hdmi0;
14         };
15
16         leds {
17                 compatible = "gpio-leds";
18                 pinctrl-names = "default";
19                 pinctrl-0 = <&gpio_led_pins>;
20
21                 led0 {
22                         label = "var:green:led0";
23                         gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; /* gpio 173 */
24                         linux,default-trigger = "heartbeat";
25                 };
26
27                 led1 {
28                         label = "var:green:led1";
29                         gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; /* gpio 172 */
30                 };
31         };
32
33         gpio-keys {
34                 compatible = "gpio-keys";
35                 pinctrl-names = "default";
36                 pinctrl-0 = <&gpio_key_pins>;
37                 #address-cells = <1>;
38                 #size-cells = <0>;
39
40                 user-key@184 {
41                         label = "user";
42                         gpios = <&gpio6 24 GPIO_ACTIVE_HIGH>; /* gpio 184 */
43                         linux,code = <BTN_EXTRA>;
44                         wakeup-source;
45                 };
46         };
47
48         hdmi0: connector {
49                 compatible = "hdmi-connector";
50                 pinctrl-names = "default";
51                 pinctrl-0 = <&hdmi_hpd_pins>;
52                 label = "hdmi";
53                 type = "a";
54
55                 hpd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; /* gpio_63 */
56
57                 port {
58                         hdmi_connector_in: endpoint {
59                                 remote-endpoint = <&hdmi_out>;
60                         };
61                 };
62         };
63 };
64
65 &omap4_pmx_core {
66         uart1_pins: pinmux_uart1_pins {
67                 pinctrl-single,pins = <
68                         OMAP4_IOPAD(0x13c, PIN_INPUT_PULLUP | MUX_MODE1)        /* mcspi1_cs2.uart1_cts */
69                         OMAP4_IOPAD(0x13e, PIN_OUTPUT | MUX_MODE1)              /* mcspi1_cs3.uart1_rts */
70                         OMAP4_IOPAD(0x126, PIN_INPUT_PULLUP | MUX_MODE1)        /* i2c2_scl.uart1_rx */
71                         OMAP4_IOPAD(0x128, PIN_OUTPUT | MUX_MODE1)              /* i2c2_sda.uart1_tx */
72                 >;
73         };
74
75         mcspi1_pins: pinmux_mcspi1_pins {
76                 pinctrl-single,pins = <
77                         OMAP4_IOPAD(0x132, PIN_INPUT | MUX_MODE0)               /*  mcspi1_clk.mcspi1_clk */
78                         OMAP4_IOPAD(0x134, PIN_INPUT | MUX_MODE0)               /*  mcspi1_somi.mcspi1_somi */
79                         OMAP4_IOPAD(0x136, PIN_INPUT | MUX_MODE0)               /*  mcspi1_simo.mcspi1_simo */
80                         OMAP4_IOPAD(0x138, PIN_INPUT | MUX_MODE0)               /*  mcspi1_cs0.mcspi1_cs0 */
81                 >;
82         };
83
84         mcasp_pins: pinmux_mcsasp_pins {
85                 pinctrl-single,pins = <
86                         OMAP4_IOPAD(0x0f8, PIN_OUTPUT | MUX_MODE2)              /*  mcbsp2_dr.abe_mcasp_axr */
87                 >;
88         };
89
90         dss_dpi_pins: pinmux_dss_dpi_pins {
91                 pinctrl-single,pins = <
92                         OMAP4_IOPAD(0x162, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data23 */
93                         OMAP4_IOPAD(0x164, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data22 */
94                         OMAP4_IOPAD(0x166, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data21 */
95                         OMAP4_IOPAD(0x168, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data20 */
96                         OMAP4_IOPAD(0x16a, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data19 */
97                         OMAP4_IOPAD(0x16c, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data18 */
98                         OMAP4_IOPAD(0x16e, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data15 */
99                         OMAP4_IOPAD(0x170, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data14 */
100                         OMAP4_IOPAD(0x172, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data13 */
101                         OMAP4_IOPAD(0x174, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data12 */
102                         OMAP4_IOPAD(0x176, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data11 */
103                         OMAP4_IOPAD(0x1b4, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data10 */
104                         OMAP4_IOPAD(0x1b6, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data9 */
105                         OMAP4_IOPAD(0x1b8, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data16 */
106                         OMAP4_IOPAD(0x1ba, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data17 */
107                         OMAP4_IOPAD(0x1bc, PIN_OUTPUT | MUX_MODE5)              /* dispc2_hsync */
108                         OMAP4_IOPAD(0x1be, PIN_OUTPUT | MUX_MODE5)              /* dispc2_pclk */
109                         OMAP4_IOPAD(0x1c0, PIN_OUTPUT | MUX_MODE5)              /* dispc2_vsync */
110                         OMAP4_IOPAD(0x1c2, PIN_OUTPUT | MUX_MODE5)              /* dispc2_de */
111                         OMAP4_IOPAD(0x1c4, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data8 */
112                         OMAP4_IOPAD(0x1c6, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data7 */
113                         OMAP4_IOPAD(0x1c8, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data6 */
114                         OMAP4_IOPAD(0x1ca, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data5 */
115                         OMAP4_IOPAD(0x1cc, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data4 */
116                         OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data3 */
117                         OMAP4_IOPAD(0x1d0, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data2 */
118                         OMAP4_IOPAD(0x1d2, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data1 */
119                         OMAP4_IOPAD(0x1d4, PIN_OUTPUT | MUX_MODE5)              /* dispc2_data0 */
120                 >;
121         };
122
123         dss_hdmi_pins: pinmux_dss_hdmi_pins {
124                 pinctrl-single,pins = <
125                         OMAP4_IOPAD(0x09a, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_cec.hdmi_cec */
126                         OMAP4_IOPAD(0x09c, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_scl.hdmi_scl */
127                         OMAP4_IOPAD(0x09e, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_sda.hdmi_sda */
128                 >;
129         };
130
131         i2c4_pins: pinmux_i2c4_pins {
132                 pinctrl-single,pins = <
133                         OMAP4_IOPAD(0x12e, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c4_scl */
134                         OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c4_sda */
135                 >;
136         };
137
138         mmc5_pins: pinmux_mmc5_pins {
139                 pinctrl-single,pins = <
140                         OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE3)               /* abe_mcbsp2_clkx.gpio_110 */
141                         OMAP4_IOPAD(0x148, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_clk.sdmmc5_clk */
142                         OMAP4_IOPAD(0x14a, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_cmd.sdmmc5_cmd */
143                         OMAP4_IOPAD(0x14c, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat0.sdmmc5_dat0 */
144                         OMAP4_IOPAD(0x14e, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat1.sdmmc5_dat1 */
145                         OMAP4_IOPAD(0x150, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat2.sdmmc5_dat2 */
146                         OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat3.sdmmc5_dat3 */
147                 >;
148         };
149
150         gpio_led_pins: pinmux_gpio_led_pins {
151                 pinctrl-single,pins = <
152                         OMAP4_IOPAD(0x17e, PIN_OUTPUT | MUX_MODE3)              /* kpd_col4.gpio_172 */
153                         OMAP4_IOPAD(0x180, PIN_OUTPUT | MUX_MODE3)              /* kpd_col5.gpio_173 */
154                 >;
155         };
156
157         gpio_key_pins: pinmux_gpio_key_pins {
158                 pinctrl-single,pins = <
159                         OMAP4_IOPAD(0x1a2, PIN_INPUT | MUX_MODE3)               /* sys_boot0.gpio_184 */
160                 >;
161         };
162
163         ks8851_irq_pins: pinmux_ks8851_irq_pins {
164                 pinctrl-single,pins = <
165                         OMAP4_IOPAD(0x17c, PIN_INPUT_PULLUP | MUX_MODE3)        /* kpd_col3.gpio_171 */
166                 >;
167         };
168
169         hdmi_hpd_pins: pinmux_hdmi_hpd_pins {
170                 pinctrl-single,pins = <
171                         OMAP4_IOPAD(0x098, PIN_INPUT_PULLDOWN | MUX_MODE3)      /* hdmi_hpd.gpio_63 */
172                 >;
173         };
174
175         backlight_pins: pinmux_backlight_pins {
176                 pinctrl-single,pins = <
177                         OMAP4_IOPAD(0x116, PIN_OUTPUT | MUX_MODE3)              /* abe_dmic_din3.gpio_122 */
178                 >;
179         };
180 };
181
182 &i2c4 {
183         pinctrl-names = "default";
184         pinctrl-0 = <&i2c4_pins>;
185         clock-frequency = <400000>;
186         status = "okay";
187 };
188
189 &uart1 {
190         pinctrl-names = "default";
191         pinctrl-0 = <&uart1_pins>;
192         status = "okay";
193 };
194
195 &mcspi1 {
196         pinctrl-names = "default";
197         pinctrl-0 = <&mcspi1_pins>;
198         status = "okay";
199
200         eth@0 {
201                 compatible = "ks8851";
202                 pinctrl-names = "default";
203                 pinctrl-0 = <&ks8851_irq_pins>;
204                 spi-max-frequency = <24000000>;
205                 reg = <0>;
206                 interrupt-parent = <&gpio6>;
207                 interrupts = <11 IRQ_TYPE_LEVEL_LOW>; /* gpio 171 */
208         };
209 };
210
211 &mmc5 {
212         pinctrl-names = "default";
213         pinctrl-0 = <&mmc5_pins>;
214         vmmc-supply = <&vbat>;
215         bus-width = <4>;
216         cd-gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>; /* gpio 110 */
217         status = "okay";
218 };
219
220 &dss {
221         status = "okay";
222 };
223
224 &hdmi {
225         status = "okay";
226         pinctrl-names = "default";
227         pinctrl-0 = <&dss_hdmi_pins>;
228         vdda-supply = <&vdac>;
229
230         port {
231                 hdmi_out: endpoint {
232                         remote-endpoint = <&hdmi_connector_in>;
233                 };
234         };
235 };