22168856fabf348260bd7c4f41e2538896f2940e
[linux-3.10.git] / arch / arm / mach-tegra / board-loki.c
1 /*
2  * arch/arm/mach-tegra/board-loki.c
3  *
4  * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
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  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19
20 #include <linux/kernel.h>
21 #include <linux/init.h>
22 #include <linux/slab.h>
23 #include <linux/ctype.h>
24 #include <linux/platform_device.h>
25 #include <linux/clk.h>
26 #include <linux/serial_8250.h>
27 #include <linux/i2c.h>
28 #include <linux/i2c/i2c-hid.h>
29 #include <linux/dma-mapping.h>
30 #include <linux/delay.h>
31 #include <linux/i2c-tegra.h>
32 #include <linux/gpio.h>
33 #include <linux/input.h>
34 #include <linux/platform_data/tegra_usb.h>
35 #include <linux/spi/spi.h>
36 #include <linux/spi/rm31080a_ts.h>
37 #include <linux/tegra_uart.h>
38 #include <linux/memblock.h>
39 #include <linux/spi/spi-tegra.h>
40 #include <linux/nfc/pn544.h>
41 #include <linux/rfkill-gpio.h>
42 #include <linux/skbuff.h>
43 #include <linux/ti_wilink_st.h>
44 #include <linux/regulator/consumer.h>
45 #include <linux/smb349-charger.h>
46 #include <linux/max17048_battery.h>
47 #include <linux/leds.h>
48 #include <linux/i2c/at24.h>
49 #include <linux/of_platform.h>
50 #include <linux/i2c.h>
51 #include <linux/i2c-tegra.h>
52 #include <linux/tegra_uart.h>
53 #include <linux/serial_tegra.h>
54 #include <linux/edp.h>
55 #include <linux/mfd/palmas.h>
56 #include <linux/usb/tegra_usb_phy.h>
57
58 #include <mach/clk.h>
59 #include <mach/irqs.h>
60 #include <mach/pci.h>
61 #include <mach/tegra_fiq_debugger.h>
62
63 #include <mach/pinmux.h>
64 #include <mach/pinmux-t12.h>
65 #include <mach/io_dpd.h>
66 #include <mach/i2s.h>
67 #include <mach/isomgr.h>
68 #include <mach/tegra_asoc_pdata.h>
69 #include <asm/mach-types.h>
70 #include <asm/mach/arch.h>
71 #include <mach/gpio-tegra.h>
72 #include <mach/tegra_fiq_debugger.h>
73 #include <mach/xusb.h>
74 #include <linux/platform_data/tegra_usb_modem_power.h>
75
76 #include "board-touch-raydium.h"
77 #include "board.h"
78 #include "board-common.h"
79 #include "clock.h"
80 #include "board-loki.h"
81 #include "devices.h"
82 #include "gpio-names.h"
83 #include "fuse.h"
84 #include "pm.h"
85 #include "pm-irq.h"
86 #include "common.h"
87 #include "tegra-board-id.h"
88 #include "iomap.h"
89
90 static struct board_info board_info, display_board_info;
91
92 static struct resource loki_bluedroid_pm_resources[] = {
93         [0] = {
94                 .name   = "shutdown_gpio",
95                 .start  = TEGRA_GPIO_PR1,
96                 .end    = TEGRA_GPIO_PR1,
97                 .flags  = IORESOURCE_IO,
98         },
99         [1] = {
100                 .name = "host_wake",
101                 .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
102         },
103         [2] = {
104                 .name = "gpio_ext_wake",
105                 .start  = TEGRA_GPIO_PEE1,
106                 .end    = TEGRA_GPIO_PEE1,
107                 .flags  = IORESOURCE_IO,
108         },
109         [3] = {
110                 .name = "gpio_host_wake",
111                 .start  = TEGRA_GPIO_PU0,
112                 .end    = TEGRA_GPIO_PU0,
113                 .flags  = IORESOURCE_IO,
114         },
115         [4] = {
116                 .name = "reset_gpio",
117                 .start  = TEGRA_GPIO_PQ6,
118                 .end    = TEGRA_GPIO_PQ6,
119                 .flags  = IORESOURCE_IO,
120         },
121 };
122
123 static struct platform_device loki_bluedroid_pm_device = {
124         .name = "bluedroid_pm",
125         .id             = 0,
126         .num_resources  = ARRAY_SIZE(loki_bluedroid_pm_resources),
127         .resource       = loki_bluedroid_pm_resources,
128 };
129
130 static noinline void __init loki_setup_bluedroid_pm(void)
131 {
132         loki_bluedroid_pm_resources[1].start =
133                 loki_bluedroid_pm_resources[1].end =
134                                 gpio_to_irq(TEGRA_GPIO_PU0);
135         platform_device_register(&loki_bluedroid_pm_device);
136 }
137
138 /*use board file for T12x*/
139 #if defined(CONFIG_ARCH_TEGRA_12x_SOC) || !defined(CONFIG_USE_OF)
140 static struct i2c_board_info __initdata rt5639_board_info = {
141         I2C_BOARD_INFO("rt5639", 0x1c),
142 };
143 static struct i2c_board_info __initdata rt5645_board_info = {
144         I2C_BOARD_INFO("rt5645", 0x1a),
145 };
146 #endif
147
148 static __initdata struct tegra_clk_init_table loki_clk_init_table[] = {
149         /* name         parent          rate            enabled */
150         { "pll_m",      NULL,           0,              false},
151         { "hda",        "pll_p",        108000000,      false},
152         { "hda2codec_2x", "pll_p",      48000000,       false},
153         { "pwm",        "pll_p",        3187500,        false},
154         { "i2s1",       "pll_a_out0",   0,              false},
155         { "i2s3",       "pll_a_out0",   0,              false},
156         { "i2s4",       "pll_a_out0",   0,              false},
157         { "spdif_out",  "pll_a_out0",   0,              false},
158         { "d_audio",    "clk_m",        12000000,       false},
159         { "dam0",       "clk_m",        12000000,       false},
160         { "dam1",       "clk_m",        12000000,       false},
161         { "dam2",       "clk_m",        12000000,       false},
162         { "audio1",     "i2s1_sync",    0,              false},
163         { "audio3",     "i2s3_sync",    0,              false},
164         { "vi_sensor",  "pll_p",        150000000,      false},
165         { "vi_sensor2", "pll_p",        150000000,      false},
166         { "cilab",      "pll_p",        150000000,      false},
167         { "cilcd",      "pll_p",        150000000,      false},
168         { "cile",       "pll_p",        150000000,      false},
169         { "i2c1",       "pll_p",        3200000,        false},
170         { "i2c2",       "pll_p",        3200000,        false},
171         { "i2c3",       "pll_p",        3200000,        false},
172         { "i2c4",       "pll_p",        3200000,        false},
173         { "i2c5",       "pll_p",        3200000,        false},
174         { "sbc1",       "pll_p",        25000000,       false},
175         { "sbc2",       "pll_p",        25000000,       false},
176         { "sbc3",       "pll_p",        25000000,       false},
177         { "sbc4",       "pll_p",        25000000,       false},
178         { "sbc5",       "pll_p",        25000000,       false},
179         { "sbc6",       "pll_p",        25000000,       false},
180         { "uarta",      "pll_p",        408000000,      false},
181         { "uartb",      "pll_p",        408000000,      false},
182         { "uartc",      "pll_p",        408000000,      false},
183         { "uartd",      "pll_p",        408000000,      false},
184         { NULL,         NULL,           0,              0},
185 };
186
187 #if defined(CONFIG_ARCH_TEGRA_12x_SOC) || !defined(CONFIG_USE_OF)
188 static struct tegra_i2c_platform_data loki_i2c1_platform_data = {
189         .bus_clk_rate   = 100000,
190         .scl_gpio       = TEGRA_GPIO_I2C1_SCL,
191         .sda_gpio       = TEGRA_GPIO_I2C1_SDA,
192 };
193
194 static struct tegra_i2c_platform_data loki_i2c2_platform_data = {
195         .bus_clk_rate   = 100000,
196         .is_clkon_always = true,
197         .scl_gpio       = TEGRA_GPIO_I2C2_SCL,
198         .sda_gpio       = TEGRA_GPIO_I2C2_SDA,
199 };
200
201 static struct tegra_i2c_platform_data loki_i2c3_platform_data = {
202         .bus_clk_rate   = 400000,
203         .scl_gpio       = TEGRA_GPIO_I2C3_SCL,
204         .sda_gpio       = TEGRA_GPIO_I2C3_SDA,
205 };
206
207 static struct tegra_i2c_platform_data loki_i2c4_platform_data = {
208         .bus_clk_rate   = 10000,
209         .scl_gpio       = TEGRA_GPIO_I2C4_SCL,
210         .sda_gpio       = TEGRA_GPIO_I2C4_SDA,
211 };
212
213 static struct tegra_i2c_platform_data loki_i2c5_platform_data = {
214         .bus_clk_rate   = 400000,
215         .scl_gpio       = TEGRA_GPIO_I2C5_SCL,
216         .sda_gpio       = TEGRA_GPIO_I2C5_SDA,
217         .needs_cl_dvfs_clock = true,
218 };
219 #endif
220
221 static struct i2c_hid_platform_data i2c_keyboard_pdata = {
222         .hid_descriptor_address = 0x0,
223 };
224
225 static struct i2c_board_info __initdata i2c_keyboard_board_info = {
226         I2C_BOARD_INFO("hid", 0x3B),
227         .platform_data  = &i2c_keyboard_pdata,
228 };
229
230 static struct i2c_hid_platform_data i2c_touchpad_pdata = {
231         .hid_descriptor_address = 0x20,
232 };
233
234 static struct i2c_board_info __initdata i2c_touchpad_board_info = {
235         I2C_BOARD_INFO("hid", 0x2C),
236         .platform_data  = &i2c_touchpad_pdata,
237 };
238
239 static void loki_i2c_init(void)
240 {
241         struct board_info board_info;
242         tegra_get_board_info(&board_info);
243 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
244 #ifndef CONFIG_USE_OF
245         tegra11_i2c_device1.dev.platform_data = &loki_i2c1_platform_data;
246         tegra11_i2c_device2.dev.platform_data = &loki_i2c2_platform_data;
247         tegra11_i2c_device3.dev.platform_data = &loki_i2c3_platform_data;
248         tegra11_i2c_device4.dev.platform_data = &loki_i2c4_platform_data;
249         tegra11_i2c_device5.dev.platform_data = &loki_i2c5_platform_data;
250
251         platform_device_register(&tegra11_i2c_device5);
252         platform_device_register(&tegra11_i2c_device4);
253         platform_device_register(&tegra11_i2c_device3);
254         platform_device_register(&tegra11_i2c_device2);
255         platform_device_register(&tegra11_i2c_device1);
256 #endif
257 #else
258         /* T124 does not use device tree as of now */
259         tegra14_i2c_device1.dev.platform_data = &loki_i2c1_platform_data;
260         tegra14_i2c_device2.dev.platform_data = &loki_i2c2_platform_data;
261         tegra14_i2c_device3.dev.platform_data = &loki_i2c3_platform_data;
262         tegra14_i2c_device4.dev.platform_data = &loki_i2c4_platform_data;
263         tegra14_i2c_device5.dev.platform_data = &loki_i2c5_platform_data;
264
265         platform_device_register(&tegra14_i2c_device5);
266         platform_device_register(&tegra14_i2c_device4);
267         platform_device_register(&tegra14_i2c_device3);
268         platform_device_register(&tegra14_i2c_device2);
269         platform_device_register(&tegra14_i2c_device1);
270 #endif
271
272 #if defined(CONFIG_ARCH_TEGRA_12x_SOC) || !defined(CONFIG_USE_OF)
273         i2c_register_board_info(0, &rt5639_board_info, 1);
274         i2c_register_board_info(0, &rt5645_board_info, 1);
275 #endif
276
277         if (board_info.board_id == BOARD_PM359 ||
278                         board_info.board_id == BOARD_PM358 ||
279                         board_info.board_id == BOARD_PM363) {
280                 i2c_keyboard_board_info.irq = gpio_to_irq(I2C_KB_IRQ);
281                 i2c_register_board_info(1, &i2c_keyboard_board_info , 1);
282
283                 i2c_touchpad_board_info.irq = gpio_to_irq(I2C_TP_IRQ);
284                 i2c_register_board_info(1, &i2c_touchpad_board_info , 1);
285         }
286 }
287
288 #ifndef CONFIG_USE_OF
289 static struct platform_device *loki_uart_devices[] __initdata = {
290         &tegra_uarta_device,
291         &tegra_uartb_device,
292         &tegra_uartc_device,
293 };
294
295 static struct tegra_serial_platform_data loki_uarta_pdata = {
296         .dma_req_selector = 8,
297         .modem_interrupt = false,
298 };
299
300 static struct tegra_serial_platform_data loki_uartb_pdata = {
301         .dma_req_selector = 9,
302         .modem_interrupt = false,
303 };
304
305 static struct tegra_serial_platform_data loki_uartc_pdata = {
306         .dma_req_selector = 10,
307         .modem_interrupt = false,
308 };
309 #endif
310
311 static struct tegra_serial_platform_data loki_uartd_pdata = {
312         .dma_req_selector = 19,
313         .modem_interrupt = false,
314 };
315
316 /*use board file for T12x*/
317 #if defined(CONFIG_ARCH_TEGRA_12x_SOC) || !defined(CONFIG_USE_OF)
318 static struct tegra_asoc_platform_data loki_audio_pdata_rt5639 = {
319         .gpio_hp_det = TEGRA_GPIO_HP_DET,
320         .gpio_ldo1_en = TEGRA_GPIO_LDO_EN,
321         .gpio_spkr_en = -1,
322         .gpio_int_mic_en = -1,
323         .gpio_ext_mic_en = -1,
324         .gpio_hp_mute = -1,
325         .gpio_codec1 = -1,
326         .gpio_codec2 = -1,
327         .gpio_codec3 = -1,
328         .i2s_param[HIFI_CODEC]       = {
329                 .audio_port_id = 1,
330                 .is_i2s_master = 0,
331                 .i2s_mode = TEGRA_DAIFMT_I2S,
332         },
333         .i2s_param[BT_SCO] = {
334                 .audio_port_id = 3,
335                 .is_i2s_master = 1,
336                 .i2s_mode = TEGRA_DAIFMT_DSP_A,
337         },
338 };
339
340 static struct tegra_asoc_platform_data loki_audio_pdata_rt5645 = {
341         .gpio_hp_det = TEGRA_GPIO_HP_DET,
342         .gpio_ldo1_en = TEGRA_GPIO_LDO_EN,
343         .gpio_spkr_en = -1,
344         .gpio_int_mic_en = -1,
345         .gpio_ext_mic_en = -1,
346         .gpio_hp_mute = -1,
347         .gpio_codec1 = -1,
348         .gpio_codec2 = -1,
349         .gpio_codec3 = -1,
350         .i2s_param[HIFI_CODEC]       = {
351                 .audio_port_id = 1,
352                 .is_i2s_master = 0,
353                 .i2s_mode = TEGRA_DAIFMT_I2S,
354         },
355         .i2s_param[BT_SCO] = {
356                 .audio_port_id = 3,
357                 .is_i2s_master = 1,
358                 .i2s_mode = TEGRA_DAIFMT_DSP_A,
359         },
360 };
361
362 static void loki_audio_init(void)
363 {
364         struct board_info board_info;
365         tegra_get_board_info(&board_info);
366         if (board_info.board_id == BOARD_PM359 ||
367                         board_info.board_id == BOARD_PM358 ||
368                         board_info.board_id == BOARD_PM363) {
369                 /*Laguna*/
370                 loki_audio_pdata_rt5645.gpio_hp_det =
371                         TEGRA_GPIO_HP_DET;
372                 loki_audio_pdata_rt5645.gpio_hp_det_active_high = 1;
373                 loki_audio_pdata_rt5645.gpio_ldo1_en = -1;
374         } else {
375                 /*Loki*/
376                 loki_audio_pdata_rt5645.gpio_hp_det =
377                         TEGRA_GPIO_HP_DET;
378                 loki_audio_pdata_rt5645.gpio_hp_det_active_high = 0;
379                 loki_audio_pdata_rt5645.gpio_ldo1_en =
380                         TEGRA_GPIO_LDO_EN;
381         }
382
383         loki_audio_pdata_rt5639.gpio_hp_det =
384                 loki_audio_pdata_rt5645.gpio_hp_det;
385
386         loki_audio_pdata_rt5639.gpio_hp_det_active_high =
387                 loki_audio_pdata_rt5645.gpio_hp_det_active_high;
388
389         loki_audio_pdata_rt5639.gpio_ldo1_en =
390                 loki_audio_pdata_rt5645.gpio_ldo1_en;
391
392         loki_audio_pdata_rt5639.codec_name = "rt5639.0-001c";
393         loki_audio_pdata_rt5639.codec_dai_name = "rt5639-aif1";
394         loki_audio_pdata_rt5645.codec_name = "rt5645.0-001a";
395         loki_audio_pdata_rt5645.codec_dai_name = "rt5645-aif1";
396 }
397
398 static struct platform_device loki_audio_device_rt5645 = {
399         .name = "tegra-snd-rt5645",
400         .id = 0,
401         .dev = {
402                 .platform_data = &loki_audio_pdata_rt5645,
403         },
404 };
405
406 static struct platform_device loki_audio_device_rt5639 = {
407         .name = "tegra-snd-rt5639",
408         .id = 0,
409         .dev = {
410                 .platform_data = &loki_audio_pdata_rt5639,
411         },
412 };
413
414 #endif
415
416 static void __init loki_uart_init(void)
417 {
418         int debug_port_id;
419
420 #ifndef CONFIG_USE_OF
421         tegra_uarta_device.dev.platform_data = &loki_uarta_pdata;
422         tegra_uartb_device.dev.platform_data = &loki_uartb_pdata;
423         tegra_uartc_device.dev.platform_data = &loki_uartc_pdata;
424         platform_add_devices(loki_uart_devices,
425                         ARRAY_SIZE(loki_uart_devices));
426 #endif
427         tegra_uartd_device.dev.platform_data = &loki_uartd_pdata;
428         if (!is_tegra_debug_uartport_hs()) {
429                 debug_port_id = uart_console_debug_init(3);
430                 if (debug_port_id < 0)
431                         return;
432
433                 platform_device_register(uart_console_debug_device);
434         } else {
435                 tegra_uartd_device.dev.platform_data = &loki_uartd_pdata;
436                 platform_device_register(&tegra_uartd_device);
437         }
438
439 }
440
441 static struct resource tegra_rtc_resources[] = {
442         [0] = {
443                 .start = TEGRA_RTC_BASE,
444                 .end = TEGRA_RTC_BASE + TEGRA_RTC_SIZE - 1,
445                 .flags = IORESOURCE_MEM,
446         },
447         [1] = {
448                 .start = INT_RTC,
449                 .end = INT_RTC,
450                 .flags = IORESOURCE_IRQ,
451         },
452 };
453
454 static struct platform_device tegra_rtc_device = {
455         .name = "tegra_rtc",
456         .id   = -1,
457         .resource = tegra_rtc_resources,
458         .num_resources = ARRAY_SIZE(tegra_rtc_resources),
459 };
460
461 static struct platform_device *loki_devices[] __initdata = {
462         &tegra_pmu_device,
463         &tegra_rtc_device,
464         &tegra_udc_device,
465 #if defined(CONFIG_TEGRA_AVP)
466         &tegra_avp_device,
467 #endif
468 #if defined(CONFIG_CRYPTO_DEV_TEGRA_SE)
469 #ifdef CONFIG_ARCH_TEGRA_12x_SOC
470         &tegra12_se_device,
471 #endif
472 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
473         &tegra11_se_device,
474 #endif
475 #endif
476 /*use board file for T12x*/
477 #if defined(CONFIG_ARCH_TEGRA_12x_SOC) || !defined(CONFIG_USE_OF)
478         &tegra_ahub_device,
479         &tegra_dam_device0,
480         &tegra_dam_device1,
481         &tegra_dam_device2,
482         &tegra_i2s_device1,
483         &tegra_i2s_device3,
484         &tegra_i2s_device4,
485         &loki_audio_device_rt5639,
486         &tegra_spdif_device,
487 #endif
488         &spdif_dit_device,
489         &bluetooth_dit_device,
490         &tegra_hda_device,
491 #if defined(CONFIG_CRYPTO_DEV_TEGRA_AES)
492         &tegra_aes_device,
493 #endif
494 };
495
496 static struct tegra_usb_platform_data tegra_udc_pdata = {
497         .port_otg = true,
498         .has_hostpc = true,
499         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
500         .op_mode = TEGRA_USB_OPMODE_DEVICE,
501         .u_data.dev = {
502                 .vbus_pmu_irq = 0,
503                 .vbus_gpio = -1,
504                 .charging_supported = false,
505                 .remote_wakeup_supported = false,
506         },
507         .u_cfg.utmi = {
508                 .hssync_start_delay = 0,
509                 .elastic_limit = 16,
510                 .idle_wait_delay = 17,
511                 .term_range_adj = 6,
512                 .xcvr_setup = 8,
513                 .xcvr_lsfslew = 2,
514                 .xcvr_lsrslew = 2,
515                 .xcvr_setup_offset = 0,
516                 .xcvr_use_fuses = 1,
517         },
518 };
519
520 static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
521         .port_otg = true,
522         .has_hostpc = true,
523         .unaligned_dma_buf_supported = true,
524         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
525         .op_mode = TEGRA_USB_OPMODE_HOST,
526         .u_data.host = {
527                 .vbus_gpio = -1,
528                 .hot_plug = false,
529                 .remote_wakeup_supported = true,
530                 .power_off_on_suspend = true,
531         },
532         .u_cfg.utmi = {
533                 .hssync_start_delay = 0,
534                 .elastic_limit = 16,
535                 .idle_wait_delay = 17,
536                 .term_range_adj = 6,
537                 .xcvr_setup = 15,
538                 .xcvr_lsfslew = 0,
539                 .xcvr_lsrslew = 3,
540                 .xcvr_setup_offset = 0,
541                 .xcvr_use_fuses = 0,
542                 .vbus_oc_map = 0x4,
543                 .xcvr_hsslew_lsb = 2,
544         },
545 };
546
547 #ifdef CONFIG_ARCH_TEGRA_12x_SOC
548 static struct tegra_usb_platform_data tegra_ehci2_utmi_pdata = {
549         .port_otg = false,
550         .has_hostpc = true,
551         .unaligned_dma_buf_supported = true,
552         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
553         .op_mode = TEGRA_USB_OPMODE_HOST,
554         .u_data.host = {
555                 .vbus_gpio = -1,
556                 .hot_plug = false,
557                 .remote_wakeup_supported = true,
558                 .power_off_on_suspend = true,
559         },
560         .u_cfg.utmi = {
561                 .hssync_start_delay = 0,
562                 .elastic_limit = 16,
563                 .idle_wait_delay = 17,
564                 .term_range_adj = 6,
565                 .xcvr_setup = 8,
566                 .xcvr_lsfslew = 2,
567                 .xcvr_lsrslew = 2,
568                 .xcvr_setup_offset = 0,
569                 .xcvr_use_fuses = 1,
570                 .vbus_oc_map = 0x5,
571         },
572 };
573 #endif
574
575 static struct tegra_usb_platform_data tegra_ehci3_utmi_pdata = {
576         .port_otg = false,
577         .has_hostpc = true,
578         .unaligned_dma_buf_supported = true,
579         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
580         .op_mode = TEGRA_USB_OPMODE_HOST,
581         .u_data.host = {
582                 .vbus_gpio = -1,
583                 .hot_plug = false,
584                 .remote_wakeup_supported = true,
585                 .power_off_on_suspend = true,
586         },
587         .u_cfg.utmi = {
588         .hssync_start_delay = 0,
589                 .elastic_limit = 16,
590                 .idle_wait_delay = 17,
591                 .term_range_adj = 6,
592                 .xcvr_setup = 8,
593                 .xcvr_lsfslew = 2,
594                 .xcvr_lsrslew = 2,
595                 .xcvr_setup_offset = 0,
596                 .xcvr_use_fuses = 1,
597                 .vbus_oc_map = 0x5,
598         },
599 };
600
601 static struct gpio modem_gpios[] = { /* Bruce modem */
602         {MODEM_EN, GPIOF_OUT_INIT_HIGH, "MODEM EN"},
603         {MDM_RST, GPIOF_OUT_INIT_LOW, "MODEM RESET"},
604 };
605
606 static struct tegra_usb_platform_data tegra_ehci2_hsic_baseband_pdata = {
607         .port_otg = false,
608         .has_hostpc = true,
609         .unaligned_dma_buf_supported = true,
610         .phy_intf = TEGRA_USB_PHY_INTF_HSIC,
611         .op_mode = TEGRA_USB_OPMODE_HOST,
612         .u_data.host = {
613                 .vbus_gpio = -1,
614                 .hot_plug = false,
615                 .remote_wakeup_supported = true,
616                 .power_off_on_suspend = true,
617         },
618 };
619
620 static struct tegra_usb_platform_data tegra_ehci2_hsic_smsc_hub_pdata = {
621         .port_otg = false,
622         .has_hostpc = true,
623         .unaligned_dma_buf_supported = true,
624         .phy_intf = TEGRA_USB_PHY_INTF_HSIC,
625         .op_mode        = TEGRA_USB_OPMODE_HOST,
626         .u_data.host = {
627                 .vbus_gpio = -1,
628                 .hot_plug = false,
629                 .remote_wakeup_supported = true,
630                 .power_off_on_suspend = true,
631         },
632 };
633
634
635 static struct tegra_usb_otg_data tegra_otg_pdata = {
636         .ehci_device = &tegra_ehci1_device,
637         .ehci_pdata = &tegra_ehci1_utmi_pdata,
638 };
639
640 static void loki_usb_init(void)
641 {
642         int usb_port_owner_info = tegra_get_usb_port_owner_info();
643         int modem_id = tegra_get_modem_id();
644         struct board_info bi;
645
646         tegra_get_pmu_board_info(&bi);
647
648         switch (bi.board_id) {
649         case BOARD_E1733:
650                 /* Host cable is detected through USB ID */
651                 tegra_udc_pdata.id_det_type = TEGRA_USB_ID;
652                 tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_ID;
653                 break;
654         case BOARD_E1735:
655                 /* Host cable is detected through PMU Interrupt */
656                 tegra_udc_pdata.id_det_type = TEGRA_USB_PMU_ID;
657                 tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_PMU_ID;
658                 tegra_otg_pdata.id_extcon_dev_name = "palmas-extcon";
659         }
660
661         if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB)) {
662                 tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
663                 platform_device_register(&tegra_otg_device);
664                 /* Setup the udc platform data */
665                 tegra_udc_device.dev.platform_data = &tegra_udc_pdata;
666         }
667 #ifdef CONFIG_ARCH_TEGRA_12x_SOC
668         if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB)) {
669                 if (!modem_id) {
670                         tegra_ehci2_device.dev.platform_data =
671                                 &tegra_ehci2_utmi_pdata;
672                         platform_device_register(&tegra_ehci2_device);
673                 }
674         }
675 #endif
676         if (!(usb_port_owner_info & UTMI3_PORT_OWNER_XUSB)) {
677                 tegra_ehci3_device.dev.platform_data = &tegra_ehci3_utmi_pdata;
678                 platform_device_register(&tegra_ehci3_device);
679         }
680 }
681
682 static struct tegra_xusb_board_data xusb_bdata = {
683 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
684         .portmap = TEGRA_XUSB_SS_P0 | TEGRA_XUSB_USB2_P0 | TEGRA_XUSB_USB2_P1,
685         .supply = {
686                 .s5p0v = "usb_vbus0",
687                 .s5p0v1 = "usb_vbus1",
688                 .s5p0v2 = "usb_vbus2",
689                 .s3p3v = "hvdd_usb",
690                 .s1p8v = "avdd_usb_pll",
691                 .s1p2v = "vddio_hsic",
692                 .s1p05v = "avddio_usb",
693         },
694 #else
695         .portmap = TEGRA_XUSB_SS_P0 | TEGRA_XUSB_USB2_P0 | TEGRA_XUSB_SS_P1 |
696                         TEGRA_XUSB_USB2_P1 | TEGRA_XUSB_USB2_P2,
697         .supply = {
698                 .s5p0v = "usb_vbus0",
699                 .s5p0v1 = "usb_vbus1",
700                 .s5p0v2 = "usb_vbus2",
701                 .s3p3v = "hvdd_usb",
702                 .s1p8v = "avdd_pll_utmip",
703                 .s1p2v = "vddio_hsic",
704                 .s1p05v = "avddio_usb",
705         },
706 #endif
707         .uses_external_pmic = false,
708         .uses_different_vbus_per_port = true,
709 };
710
711 static void loki_xusb_init(void)
712 {
713         int usb_port_owner_info = tegra_get_usb_port_owner_info();
714
715         xusb_bdata.lane_owner = (u8) tegra_get_lane_owner_info();
716
717         if (board_info.board_id == BOARD_PM359 ||
718                         board_info.board_id == BOARD_PM358 ||
719                         board_info.board_id == BOARD_PM363) {
720                 /* Laguna */
721                 xusb_bdata.gpio_controls_muxed_ss_lanes = true;
722                 /* D[0:15] = gpio number and D[16:31] = output value*/
723                 xusb_bdata.gpio_ss1_sata = PMU_TCA6416_GPIO(11) | (0 << 16);
724                 xusb_bdata.ss_portmap = (TEGRA_XUSB_SS_PORT_MAP_USB2_P0 << 0) |
725                         (TEGRA_XUSB_SS_PORT_MAP_USB2_P1 << 4);
726
727                 if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB))
728                         xusb_bdata.portmap &= ~(TEGRA_XUSB_USB2_P0 |
729                                 TEGRA_XUSB_SS_P0);
730
731                 if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB))
732                         xusb_bdata.portmap &= ~(TEGRA_XUSB_USB2_P1 |
733                                 TEGRA_XUSB_SS_P1);
734
735                 /* FIXME Add for UTMIP2 when have odmdata assigend */
736         } else {
737                 /* Loki */
738                 xusb_bdata.gpio_controls_muxed_ss_lanes = false;
739
740                 if (board_info.board_id == BOARD_E1781) {
741                         pr_info("Shield ERS-S. 0x%x\n", board_info.board_id);
742                         /* Shield ERS-S */
743                         xusb_bdata.ss_portmap =
744                                 (TEGRA_XUSB_SS_PORT_MAP_USB2_P1 << 0) |
745                                 (TEGRA_XUSB_SS_PORT_MAP_USB2_P2 << 4);
746
747                         if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB))
748                                 xusb_bdata.portmap &= ~(TEGRA_XUSB_USB2_P0);
749
750                         if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB))
751                                 xusb_bdata.portmap &= ~(
752                                         TEGRA_XUSB_USB2_P1 | TEGRA_XUSB_SS_P0 |
753                                         TEGRA_XUSB_USB2_P2 | TEGRA_XUSB_SS_P1);
754                 } else {
755                         pr_info("Shield ERS 0x%x\n", board_info.board_id);
756                         /* Shield ERS */
757                         xusb_bdata.ss_portmap =
758                                 (TEGRA_XUSB_SS_PORT_MAP_USB2_P0 << 0) |
759                                 (TEGRA_XUSB_SS_PORT_MAP_USB2_P2 << 4);
760
761                         if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB))
762                                 xusb_bdata.portmap &= ~(TEGRA_XUSB_USB2_P0 |
763                                         TEGRA_XUSB_SS_P0);
764
765                         if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB))
766                                 xusb_bdata.portmap &= ~(TEGRA_XUSB_USB2_P1 |
767                                         TEGRA_XUSB_USB2_P2 | TEGRA_XUSB_SS_P1);
768                 }
769                 /* FIXME Add for UTMIP2 when have odmdata assigend */
770         }
771         if (xusb_bdata.portmap)
772                 tegra_xusb_init(&xusb_bdata);
773 }
774
775 static int baseband_init(void)
776 {
777         int ret;
778
779         ret = gpio_request_array(modem_gpios, ARRAY_SIZE(modem_gpios));
780         if (ret) {
781                 pr_warn("%s:gpio request failed\n", __func__);
782                 return ret;
783         }
784
785         /* enable pull-down for MDM_COLD_BOOT */
786         tegra_pinmux_set_pullupdown(TEGRA_PINGROUP_ULPI_DATA4,
787                                     TEGRA_PUPD_PULL_DOWN);
788
789         /* export GPIO for user space access through sysfs */
790         gpio_export(MDM_RST, false);
791
792         return 0;
793 }
794
795 static const struct tegra_modem_operations baseband_operations = {
796         .init = baseband_init,
797 };
798
799 static struct tegra_usb_modem_power_platform_data baseband_pdata = {
800         .ops = &baseband_operations,
801         .regulator_name = "vdd_wwan_mdm",
802         .wake_gpio = -1,
803         .boot_gpio = MDM_COLDBOOT,
804         .boot_irq_flags = IRQF_TRIGGER_RISING |
805                                     IRQF_TRIGGER_FALLING |
806                                     IRQF_ONESHOT,
807         .autosuspend_delay = 2000,
808         .short_autosuspend_delay = 50,
809         .tegra_ehci_device = &tegra_ehci2_device,
810         .tegra_ehci_pdata = &tegra_ehci2_hsic_baseband_pdata,
811 };
812
813 static struct platform_device icera_bruce_device = {
814         .name = "tegra_usb_modem_power",
815         .id = -1,
816         .dev = {
817                 .platform_data = &baseband_pdata,
818         },
819 };
820
821 static void loki_modem_init(void)
822 {
823         int modem_id = tegra_get_modem_id();
824         struct board_info board_info;
825         int usb_port_owner_info = tegra_get_usb_port_owner_info();
826
827         tegra_get_board_info(&board_info);
828         pr_info("%s: modem_id = %d\n", __func__, modem_id);
829
830         switch (modem_id) {
831         case TEGRA_BB_BRUCE:
832                 if (!(usb_port_owner_info & HSIC1_PORT_OWNER_XUSB))
833                         platform_device_register(&icera_bruce_device);
834                 break;
835         case TEGRA_BB_HSIC_HUB: /* HSIC hub */
836                 if (!(usb_port_owner_info & HSIC1_PORT_OWNER_XUSB)) {
837                         tegra_ehci2_device.dev.platform_data =
838                                 &tegra_ehci2_hsic_smsc_hub_pdata;
839                         platform_device_register(&tegra_ehci2_device);
840                 }
841                 break;
842         default:
843                 return;
844         }
845 }
846
847 #ifndef CONFIG_USE_OF
848 static struct platform_device *loki_spi_devices[] __initdata = {
849         &tegra11_spi_device1,
850         &tegra11_spi_device4,
851 };
852
853 static struct tegra_spi_platform_data loki_spi1_pdata = {
854         .dma_req_sel            = 15,
855         .spi_max_frequency      = 25000000,
856         .clock_always_on        = false,
857 };
858
859 static struct tegra_spi_platform_data loki_spi4_pdata = {
860         .dma_req_sel            = 18,
861         .spi_max_frequency      = 25000000,
862         .clock_always_on        = false,
863 };
864
865 static void __init loki_spi_init(void)
866 {
867         tegra11_spi_device1.dev.platform_data = &loki_spi1_pdata;
868         tegra11_spi_device4.dev.platform_data = &loki_spi4_pdata;
869         platform_add_devices(loki_spi_devices,
870                         ARRAY_SIZE(loki_spi_devices));
871 }
872 #else
873 static void __init loki_spi_init(void)
874 {
875 }
876 #endif
877
878 #ifdef CONFIG_USE_OF
879 struct of_dev_auxdata loki_auxdata_lookup[] __initdata = {
880 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
881         /* sdhci and i2c dt support not planned for bringup */
882         OF_DEV_AUXDATA("nvidia,tegra114-sdhci", 0x78000600, "sdhci-tegra.3",
883                                 NULL),
884         OF_DEV_AUXDATA("nvidia,tegra114-sdhci", 0x78000400, "sdhci-tegra.2",
885                                 NULL),
886 #if 0
887         OF_DEV_AUXDATA("nvidia,tegra114-sdhci", 0x78000000, "sdhci-tegra.0",
888                                 &loki_tegra_sdhci_platform_data0),
889 #endif
890         OF_DEV_AUXDATA("nvidia,tegra114-camera", 0x0, "tegra_camera",
891                                 NULL),
892         OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000c000, "tegra11-i2c.0",
893                                 NULL),
894         OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000c400, "tegra11-i2c.1",
895                                 NULL),
896         OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000c500, "tegra11-i2c.2",
897                                 NULL),
898         OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000c700, "tegra11-i2c.3",
899                                 NULL),
900         OF_DEV_AUXDATA("nvidia,tegra114-i2c", 0x7000d000, "tegra11-i2c.4",
901                                 NULL),
902 #endif
903         OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d400, "spi-tegra114.0",
904                                 NULL),
905         OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d600, "spi-tegra114.1",
906                                 NULL),
907         OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d800, "spi-tegra114.2",
908                                 NULL),
909         OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000da00, "spi-tegra114.3",
910                                 NULL),
911         OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000dc00, "spi-tegra114.4",
912                                 NULL),
913         OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000de00, "spi-tegra114.5",
914                                 NULL),
915 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
916         OF_DEV_AUXDATA("nvidia,tegra30-ahub", 0x70080000, "tegra30-ahub",
917                                 NULL),
918         OF_DEV_AUXDATA("nvidia,tegra-audio-rt5645", 0x0, "tegra-snd-rt5645",
919                                 NULL),
920         OF_DEV_AUXDATA("nvidia,tegra-audio-rt5639", 0x0, "tegra-snd-rt5639",
921                                 NULL),
922         OF_DEV_AUXDATA("nvidia,tegra114-apbdma", 0x6000a000, "tegra-apbdma",
923                                 NULL),
924         OF_DEV_AUXDATA("nvidia,tegra114-host1x", TEGRA_HOST1X_BASE, "host1x",
925                                 NULL),
926         OF_DEV_AUXDATA("nvidia,tegra114-gr3d", TEGRA_GR3D_BASE, "gr3d",
927                                 NULL),
928         OF_DEV_AUXDATA("nvidia,tegra114-gr2d", TEGRA_GR2D_BASE, "gr2d",
929                                 NULL),
930         OF_DEV_AUXDATA("nvidia,tegra114-msenc", TEGRA_MSENC_BASE, "msenc",
931                                 NULL),
932         OF_DEV_AUXDATA("nvidia,tegra114-vi", TEGRA_VI_BASE, "vi",
933                                 NULL),
934         OF_DEV_AUXDATA("nvidia,tegra114-isp", TEGRA_ISP_BASE, "isp",
935                                 NULL),
936         OF_DEV_AUXDATA("nvidia,tegra114-tsec", TEGRA_TSEC_BASE, "tsec",
937                                 NULL),
938 #else
939         OF_DEV_AUXDATA("nvidia,tegra124-apbdma", 0x60020000, "tegra-apbdma",
940                                 NULL),
941         OF_DEV_AUXDATA("nvidia,tegra124-host1x", TEGRA_HOST1X_BASE, "host1x",
942                 NULL),
943         OF_DEV_AUXDATA("nvidia,tegra124-gk20a", 0x538F0000, "gk20a", NULL),
944         OF_DEV_AUXDATA("nvidia,tegra124-vic", TEGRA_VIC_BASE, "vic03", NULL),
945         OF_DEV_AUXDATA("nvidia,tegra124-msenc", TEGRA_MSENC_BASE, "msenc",
946                 NULL),
947         OF_DEV_AUXDATA("nvidia,tegra124-vi", TEGRA_VI_BASE, "vi", NULL),
948         OF_DEV_AUXDATA("nvidia,tegra124-isp", TEGRA_ISP_BASE, "isp", NULL),
949         OF_DEV_AUXDATA("nvidia,tegra124-tsec", TEGRA_TSEC_BASE, "tsec", NULL),
950 #endif
951         OF_DEV_AUXDATA("nvidia,tegra114-hsuart", 0x70006000, "serial-tegra.0",
952                                 NULL),
953         OF_DEV_AUXDATA("nvidia,tegra114-hsuart", 0x70006040, "serial-tegra.1",
954                                 NULL),
955         OF_DEV_AUXDATA("nvidia,tegra114-hsuart", 0x70006200, "serial-tegra.2",
956                                 NULL),
957         {}
958 };
959 #endif
960
961 static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
962         /* name         parent          rate            enabled */
963         { "extern2",    "pll_p",        41000000,       false},
964         { "clk_out_2",  "extern2",      40800000,       false},
965         { NULL,         NULL,           0,              0},
966 };
967
968 struct rm_spi_ts_platform_data rm31080ts_loki_data = {
969         .gpio_reset = TOUCH_GPIO_RST_RAYDIUM_SPI,
970         .config = 0,
971         .platform_id = RM_PLATFORM_R005,
972         .name_of_clock = "clk_out_2",
973         .name_of_clock_con = "extern2",
974 };
975
976 static struct tegra_spi_device_controller_data dev_cdata = {
977         .rx_clk_tap_delay = 0,
978         .tx_clk_tap_delay = 16,
979 };
980
981 struct spi_board_info rm31080a_loki_spi_board[1] = {
982         {
983                 .modalias = "rm_ts_spidev",
984                 .bus_num = TOUCH_SPI_ID,
985                 .chip_select = TOUCH_SPI_CS,
986                 .max_speed_hz = 12 * 1000 * 1000,
987                 .mode = SPI_MODE_0,
988                 .controller_data = &dev_cdata,
989                 .platform_data = &rm31080ts_loki_data,
990         },
991 };
992
993 static int __init loki_touch_init(void)
994 {
995         tegra_clk_init_from_table(touch_clk_init_table);
996         rm31080a_loki_spi_board[0].irq =
997                 gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
998         touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
999                                 TOUCH_GPIO_RST_RAYDIUM_SPI,
1000                                 &rm31080ts_loki_data,
1001                                 &rm31080a_loki_spi_board[0],
1002                                 ARRAY_SIZE(rm31080a_loki_spi_board));
1003         return 0;
1004 }
1005
1006 static void __init tegra_loki_early_init(void)
1007 {
1008         tegra_clk_init_from_table(loki_clk_init_table);
1009         tegra_clk_verify_parents();
1010         tegra_soc_device_init("loki");
1011 }
1012
1013 static void __init tegra_loki_late_init(void)
1014 {
1015         struct board_info board_info;
1016         tegra_get_board_info(&board_info);
1017         pr_info("board_info: id:sku:fab:major:minor = 0x%04x:0x%04x:0x%02x:0x%02x:0x%02x\n",
1018                 board_info.board_id, board_info.sku,
1019                 board_info.fab, board_info.major_revision,
1020                 board_info.minor_revision);
1021         platform_device_register(&tegra_pinmux_device);
1022         loki_pinmux_init();
1023         loki_usb_init();
1024         loki_modem_init();
1025         loki_xusb_init();
1026         loki_i2c_init();
1027         loki_spi_init();
1028         loki_uart_init();
1029 /*use board file for T12x*/
1030 #if defined(CONFIG_ARCH_TEGRA_12x_SOC) || !defined(CONFIG_USE_OF)
1031         loki_audio_init();
1032 #endif
1033         platform_add_devices(loki_devices, ARRAY_SIZE(loki_devices));
1034         //tegra_ram_console_debug_init();
1035         tegra_io_dpd_init();
1036         loki_sdhci_init();
1037         loki_regulator_init();
1038         loki_suspend_init();
1039 #if 0
1040         loki_emc_init();
1041         loki_edp_init();
1042 #endif
1043         isomgr_init();
1044         loki_touch_init();
1045         loki_panel_init();
1046         loki_kbc_init();
1047         loki_pmon_init();
1048         tegra_release_bootloader_fb();
1049 #ifdef CONFIG_TEGRA_WDT_RECOVERY
1050         tegra_wdt_recovery_init();
1051 #endif
1052         tegra_serial_debug_init(TEGRA_UARTD_BASE, INT_WDT_CPU, NULL, -1, -1);
1053
1054         loki_sensors_init();
1055 #if 0
1056         loki_soctherm_init();
1057 #endif
1058         loki_setup_bluedroid_pm();
1059         tegra_register_fuse();
1060         tegra_serial_debug_init(TEGRA_UARTD_BASE, INT_WDT_CPU, NULL, -1, -1);
1061 }
1062
1063 static void __init loki_ramconsole_reserve(unsigned long size)
1064 {
1065         tegra_ram_console_debug_reserve(SZ_1M);
1066 }
1067
1068 static void __init tegra_loki_dt_init(void)
1069 {
1070         tegra_get_board_info(&board_info);
1071         tegra_get_display_board_info(&display_board_info);
1072
1073         tegra_loki_early_init();
1074 #ifdef CONFIG_USE_OF
1075         of_platform_populate(NULL,
1076                 of_default_bus_match_table, loki_auxdata_lookup,
1077                 &platform_bus);
1078         platform_device_register(&tegra_gpio_device);
1079 #endif
1080
1081         tegra_loki_late_init();
1082 }
1083
1084 static void __init tegra_loki_reserve(void)
1085 {
1086 #if defined(CONFIG_NVMAP_CONVERT_CARVEOUT_TO_IOVMM) || \
1087                 defined(CONFIG_TEGRA_NO_CARVEOUT)
1088         /* 1920*1200*4*2 = 18432000 bytes */
1089         tegra_reserve(0, SZ_16M + SZ_2M, SZ_16M);
1090 #else
1091         tegra_reserve(SZ_1G, SZ_16M + SZ_2M, SZ_4M);
1092 #endif
1093         loki_ramconsole_reserve(SZ_1M);
1094 }
1095
1096 static const char * const loki_dt_board_compat[] = {
1097         "nvidia,loki",
1098         NULL
1099 };
1100
1101 DT_MACHINE_START(LOKI, "loki")
1102         .atag_offset    = 0x100,
1103         .smp            = smp_ops(tegra_smp_ops),
1104         .map_io         = tegra_map_common_io,
1105         .reserve        = tegra_loki_reserve,
1106 #ifdef CONFIG_ARCH_TEGRA_12x_SOC
1107         .init_early     = tegra12x_init_early,
1108 #else
1109         .init_early     = tegra11x_init_early,
1110 #endif
1111         .init_irq       = tegra_dt_init_irq,
1112         .init_time      = tegra_init_timer,
1113         .init_machine   = tegra_loki_dt_init,
1114         .restart        = tegra_assert_system_reset,
1115         .dt_compat      = loki_dt_board_compat,
1116 MACHINE_END