GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / omap3-n950.dts
1 /*
2  * omap3-n950.dts - Device Tree file for Nokia N950
3  *
4  * Written by: Aaro Koskinen <aaro.koskinen@iki.fi>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10
11 /dts-v1/;
12
13 #include "omap3-n950-n9.dtsi"
14 #include <dt-bindings/input/input.h>
15
16 / {
17         model = "Nokia N950";
18         compatible = "nokia,omap3-n950", "ti,omap36xx", "ti,omap3";
19
20         keys {
21                 compatible = "gpio-keys";
22
23                 keypad_slide {
24                         label = "Keypad Slide";
25                         gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; /* 109 */
26                         linux,input-type = <EV_SW>;
27                         linux,code = <SW_KEYPAD_SLIDE>;
28                         wakeup-source;
29                         pinctrl-names = "default";
30                         pinctrl-0 = <&keypad_slide_pins>;
31                 };
32         };
33 };
34
35 &omap3_pmx_core {
36         keypad_slide_pins: pinmux_debug_led_pins {
37                 pinctrl-single,pins = <
38                         OMAP3_CORE1_IOPAD(0x212a, PIN_INPUT | MUX_MODE4)       /* cam_d10.gpio_109 */
39                 >;
40         };
41 };
42
43 &omap3_pmx_core {
44         spi4_pins: pinmux_spi4_pins {
45                 pinctrl-single,pins = <
46                         OMAP3_CORE1_IOPAD(0x218c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_clk */
47                         OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE1) /* mcspi4_simo */
48                         OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_somi */
49                         OMAP3_CORE1_IOPAD(0x2196, PIN_OUTPUT | MUX_MODE1) /* mcspi4_cs0 */
50                 >;
51         };
52 };
53
54 &omap3_pmx_core {
55         dsi_pins: pinmux_dsi_pins {
56                 pinctrl-single,pins = <
57                         OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE1) /* dsi_dx0 - data0+ */
58                         OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT | MUX_MODE1) /* dsi_dy0 - data0- */
59                         OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT | MUX_MODE1) /* dsi_dx1 - clk+   */
60                         OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE1) /* dsi_dy1 - clk-   */
61                         OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE1) /* dsi_dx2 - data1+ */
62                         OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE1) /* dsi_dy2 - data1- */
63                 >;
64         };
65
66         display_pins: pinmux_display_pins {
67                 pinctrl-single,pins = <
68                         OMAP3_CORE1_IOPAD(0x20ca, PIN_INPUT | MUX_MODE4) /* gpio 62 - display te */
69                         OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE4) /* gpio 87 - display reset */
70                 >;
71         };
72 };
73
74 &i2c2 {
75         smia_1: camera@10 {
76                 compatible = "nokia,smia";
77                 reg = <0x10>;
78                 /* No reset gpio */
79                 vana-supply = <&vaux3>;
80                 clocks = <&isp 0>;
81                 clock-frequency = <9600000>;
82                 nokia,nvm-size = <(16 * 64)>;
83                 flash-leds = <&as3645a_flash &as3645a_indicator>;
84                 port {
85                         smia_1_1: endpoint {
86                                 link-frequencies = /bits/ 64 <210000000 333600000 398400000>;
87                                 clock-lanes = <0>;
88                                 data-lanes = <1 2>;
89                                 remote-endpoint = <&csi2a_ep>;
90                         };
91                 };
92         };
93 };
94
95 &isp {
96         vdd-csiphy1-supply = <&vaux2>;
97         vdd-csiphy2-supply = <&vaux2>;
98         ports {
99                 port@2 {
100                         reg = <2>;
101                         csi2a_ep: endpoint {
102                                 remote-endpoint = <&smia_1_1>;
103                                 clock-lanes = <2>;
104                                 data-lanes = <3 1>;
105                                 crc = <1>;
106                                 lane-polarities = <1 1 1>;
107                         };
108                 };
109         };
110 };
111
112 &mcspi4 {
113         status = "okay";
114         pinctrl-names = "default";
115         pinctrl-0 = <&spi4_pins>;
116
117         wlcore: wlcore@0 {
118                 compatible = "ti,wl1271";
119                 pinctrl-names = "default";
120                 pinctrl-0 = <&wlan_pins>;
121                 reg = <0>;
122                 spi-max-frequency = <48000000>;
123                 clock-xtal;
124                 ref-clock-frequency = <38400000>;
125                 interrupts-extended = <&gpio2 10 IRQ_TYPE_LEVEL_HIGH>; /* gpio 42 */
126                 vwlan-supply = <&vwlan_fixed>;
127         };
128 };
129
130 &modem {
131         compatible = "nokia,n950-modem";
132 };
133
134 &twl {
135         twl_audio: audio {
136                 compatible = "ti,twl4030-audio";
137                 ti,enable-vibra = <1>;
138         };
139 };
140
141 &twl_keypad {
142         linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_BACKSLASH)
143                          MATRIX_KEY(0x01, 0x00, KEY_LEFTSHIFT)
144                          MATRIX_KEY(0x02, 0x00, KEY_COMPOSE)
145                          MATRIX_KEY(0x03, 0x00, KEY_LEFTMETA)
146                          MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL)
147                          MATRIX_KEY(0x05, 0x00, KEY_BACKSPACE)
148                          MATRIX_KEY(0x06, 0x00, KEY_VOLUMEDOWN)
149                          MATRIX_KEY(0x07, 0x00, KEY_VOLUMEUP)
150
151                          MATRIX_KEY(0x03, 0x01, KEY_Z)
152                          MATRIX_KEY(0x04, 0x01, KEY_A)
153                          MATRIX_KEY(0x05, 0x01, KEY_Q)
154                          MATRIX_KEY(0x06, 0x01, KEY_W)
155                          MATRIX_KEY(0x07, 0x01, KEY_E)
156
157                          MATRIX_KEY(0x03, 0x02, KEY_X)
158                          MATRIX_KEY(0x04, 0x02, KEY_S)
159                          MATRIX_KEY(0x05, 0x02, KEY_D)
160                          MATRIX_KEY(0x06, 0x02, KEY_C)
161                          MATRIX_KEY(0x07, 0x02, KEY_V)
162
163                          MATRIX_KEY(0x03, 0x03, KEY_O)
164                          MATRIX_KEY(0x04, 0x03, KEY_I)
165                          MATRIX_KEY(0x05, 0x03, KEY_U)
166                          MATRIX_KEY(0x06, 0x03, KEY_L)
167                          MATRIX_KEY(0x07, 0x03, KEY_APOSTROPHE)
168
169                          MATRIX_KEY(0x03, 0x04, KEY_Y)
170                          MATRIX_KEY(0x04, 0x04, KEY_K)
171                          MATRIX_KEY(0x05, 0x04, KEY_J)
172                          MATRIX_KEY(0x06, 0x04, KEY_H)
173                          MATRIX_KEY(0x07, 0x04, KEY_G)
174
175                          MATRIX_KEY(0x03, 0x05, KEY_B)
176                          MATRIX_KEY(0x04, 0x05, KEY_COMMA)
177                          MATRIX_KEY(0x05, 0x05, KEY_M)
178                          MATRIX_KEY(0x06, 0x05, KEY_N)
179                          MATRIX_KEY(0x07, 0x05, KEY_DOT)
180
181                          MATRIX_KEY(0x00, 0x06, KEY_SPACE)
182                          MATRIX_KEY(0x03, 0x06, KEY_T)
183                          MATRIX_KEY(0x04, 0x06, KEY_UP)
184                          MATRIX_KEY(0x05, 0x06, KEY_LEFT)
185                          MATRIX_KEY(0x06, 0x06, KEY_RIGHT)
186                          MATRIX_KEY(0x07, 0x06, KEY_DOWN)
187
188                          MATRIX_KEY(0x03, 0x07, KEY_P)
189                          MATRIX_KEY(0x04, 0x07, KEY_ENTER)
190                          MATRIX_KEY(0x05, 0x07, KEY_SLASH)
191                          MATRIX_KEY(0x06, 0x07, KEY_F)
192                          MATRIX_KEY(0x07, 0x07, KEY_R)
193                          >;
194 };
195
196 &lis302 {
197         st,axis-x = <(-2)>; /* LIS3_INV_DEV_Y */
198         st,axis-y = <(-1)>; /* LIS3_INV_DEV_X */
199         st,axis-z = <(-3)>; /* LIS3_INV_DEV_Z */
200
201         st,min-limit-x = <(-32)>;
202         st,min-limit-y = <3>;
203         st,min-limit-z = <3>;
204
205         st,max-limit-x = <(-3)>;
206         st,max-limit-y = <32>;
207         st,max-limit-z = <32>;
208 };
209
210 &dss {
211         status = "ok";
212
213         vdda_video-supply = <&vdac>;
214 };
215
216 &dsi {
217         status = "ok";
218
219         pinctrl-names = "default";
220         pinctrl-0 = <&dsi_pins>;
221
222         vdd-supply = <&vpll2>;
223
224         port {
225                 dsi_out_ep: endpoint {
226                         remote-endpoint = <&lcd0_in>;
227                         lanes = <2 3 0 1 4 5>;
228                 };
229         };
230
231         lcd0: display {
232                 compatible = "nokia,himalaya", "panel-dsi-cm";
233                 label = "lcd0";
234
235                 pinctrl-names = "default";
236                 pinctrl-0 = <&display_pins>;
237
238                 vpnl-supply = <&vmmc2>;
239                 vddi-supply = <&vio>;
240
241                 reset-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;     /* 87 */
242                 te-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;        /* 62 */
243
244                 width-mm = <49>; /* 48.960 mm */
245                 height-mm = <88>; /* 88.128 mm */
246
247                 /* TODO:
248                  * - panel is upside-down
249                  * - top + bottom 5px are not visible
250                  */
251                 panel-timing {
252                         clock-frequency = <0>;          /* Calculated by dsi */
253
254                         hback-porch = <2>;
255                         hactive = <480>;
256                         hfront-porch = <0>;
257                         hsync-len = <2>;
258
259                         vback-porch = <1>;
260                         vactive = <864>;
261                         vfront-porch = <0>;
262                         vsync-len = <1>;
263
264                         hsync-active = <0>;
265                         vsync-active = <0>;
266                         de-active = <1>;
267                         pixelclk-active = <1>;
268                 };
269
270                 port {
271                         lcd0_in: endpoint {
272                                 remote-endpoint = <&dsi_out_ep>;
273                         };
274                 };
275         };
276 };