6f9dcf91f9f0113f40b2e19c9d7c7690f471a2ee
[linux-2.6.git] / arch / arm / mach-tegra / board-enterprise.c
1 /*
2  * arch/arm/mach-tegra/board-enterprise.c
3  *
4  * Copyright (c) 2011-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 as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  */
20
21 #include <linux/kernel.h>
22 #include <linux/init.h>
23 #include <linux/slab.h>
24 #include <linux/ctype.h>
25 #include <linux/platform_device.h>
26 #include <linux/clk.h>
27 #include <linux/serial_8250.h>
28 #include <linux/i2c.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/tegra_uart.h>
37 #include <linux/fsl_devices.h>
38 #include <linux/i2c/atmel_mxt_ts.h>
39 #include <linux/memblock.h>
40 #include <linux/rfkill-gpio.h>
41 #include <linux/mfd/tlv320aic3262-registers.h>
42 #include <linux/mfd/tlv320aic3xxx-core.h>
43
44 #include <linux/nfc/pn544.h>
45 #include <linux/of_platform.h>
46 #include <linux/skbuff.h>
47 #include <linux/ti_wilink_st.h>
48
49 #include <sound/max98088.h>
50
51 #include <asm/hardware/gic.h>
52
53 #include <mach/clk.h>
54 #include <mach/iomap.h>
55 #include <mach/irqs.h>
56 #include <mach/pinmux.h>
57 #include <mach/iomap.h>
58 #include <mach/io.h>
59 #include <mach/io_dpd.h>
60 #include <mach/usb_phy.h>
61 #include <mach/i2s.h>
62 #include <mach/tegra_asoc_pdata.h>
63 #include <mach/tegra-bb-power.h>
64 #include <mach/gpio-tegra.h>
65 #include <mach/tegra_fiq_debugger.h>
66
67 #include <asm/mach-types.h>
68 #include <asm/hardware/gic.h>
69 #include <asm/mach/arch.h>
70
71 #include "board.h"
72 #include "board-common.h"
73 #include "clock.h"
74 #include "board-enterprise.h"
75 #include "baseband-xmm-power.h"
76 #include "devices.h"
77 #include "gpio-names.h"
78 #include "fuse.h"
79 #include "pm.h"
80 #include "common.h"
81
82 /* wl128x BT, FM, GPS connectivity chip */
83 struct ti_st_plat_data enterprise_wilink_pdata = {
84        .nshutdown_gpio = TEGRA_GPIO_PE6,
85        .dev_name = BLUETOOTH_UART_DEV_NAME,
86        .flow_cntrl = 1,
87        .baud_rate = 3000000,
88 };
89
90 static struct platform_device wl128x_device = {
91        .name           = "kim",
92        .id             = -1,
93        .dev.platform_data = &enterprise_wilink_pdata,
94 };
95
96 static struct platform_device btwilink_device = {
97        .name = "btwilink",
98        .id = -1,
99 };
100
101 static noinline void __init enterprise_bt_st(void)
102 {
103        pr_info("enterprise_bt_st");
104
105        platform_device_register(&wl128x_device);
106        platform_device_register(&btwilink_device);
107 }
108
109 #ifdef CONFIG_BT_BLUESLEEP
110 static struct rfkill_gpio_platform_data enterprise_bt_rfkill_pdata[] = {
111         {
112                 .name           = "bt_rfkill",
113                 .shutdown_gpio  = TEGRA_GPIO_PE6,
114                 .reset_gpio     = TEGRA_GPIO_INVALID,
115                 .type           = RFKILL_TYPE_BLUETOOTH,
116         },
117 };
118
119 static struct platform_device enterprise_bt_rfkill_device = {
120         .name = "rfkill_gpio",
121         .id             = -1,
122         .dev = {
123                 .platform_data = &enterprise_bt_rfkill_pdata,
124         },
125 };
126 static struct resource enterprise_ti_bluesleep_resources[] = {
127         [0] = {
128                 .name = "gpio_host_wake",
129                         .start  = TEGRA_GPIO_PS2,
130                         .end    = TEGRA_GPIO_PS2,
131                         .flags  = IORESOURCE_IO,
132         },
133         [1] = {
134                 .name = "host_wake",
135                         .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
136         },
137 };
138 static struct resource enterprise_brcm_bluesleep_resources[] = {
139         [0] = {
140                 .name = "gpio_host_wake",
141                         .start  = TEGRA_GPIO_PS2,
142                         .end    = TEGRA_GPIO_PS2,
143                         .flags  = IORESOURCE_IO,
144         },
145         [1] = {
146                 .name = "gpio_ext_wake",
147                         .start  = TEGRA_GPIO_PE7,
148                         .end    = TEGRA_GPIO_PE7,
149                         .flags  = IORESOURCE_IO,
150         },
151         [2] = {
152                 .name = "host_wake",
153                         .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
154         },
155 };
156
157 static struct platform_device enterprise_ti_bluesleep_device = {
158         .name           = "bluesleep",
159         .id             = -1,
160         .num_resources  = ARRAY_SIZE(enterprise_ti_bluesleep_resources),
161         .resource       = enterprise_ti_bluesleep_resources,
162 };
163
164 static struct platform_device enterprise_brcm_bluesleep_device = {
165         .name           = "bluesleep",
166         .id             = -1,
167         .num_resources  = ARRAY_SIZE(enterprise_brcm_bluesleep_resources),
168         .resource       = enterprise_brcm_bluesleep_resources,
169 };
170 static void __init enterprise_bt_rfkill(void)
171 {
172         platform_device_register(&enterprise_bt_rfkill_device);
173         return;
174 }
175 static void __init enterprise_setup_bluesleep(void)
176 {
177         if (tegra_get_commchip_id() == COMMCHIP_TI_WL18XX) {
178                 enterprise_ti_bluesleep_resources[1].start =
179                 enterprise_ti_bluesleep_resources[1].end =
180                         gpio_to_irq(TEGRA_GPIO_PS2);
181                 platform_device_register(&enterprise_ti_bluesleep_device);
182         }
183         else {
184                 enterprise_brcm_bluesleep_resources[2].start =
185                 enterprise_brcm_bluesleep_resources[2].end =
186                         gpio_to_irq(TEGRA_GPIO_PS2);
187                 platform_device_register(&enterprise_brcm_bluesleep_device);
188         }
189         return;
190 }
191 #elif defined CONFIG_BLUEDROID_PM
192 static struct resource enterprise_bluedroid_pm_resources[] = {
193         [0] = {
194                 .name   = "shutdown_gpio",
195                 .start  = TEGRA_GPIO_PE6,
196                 .end    = TEGRA_GPIO_PE6,
197                 .flags  = IORESOURCE_IO,
198         },
199         [1] = {
200                 .name = "host_wake",
201                 .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
202         },
203         [2] = {
204                 .name = "gpio_ext_wake",
205                 .start  = TEGRA_GPIO_PE7,
206                 .end    = TEGRA_GPIO_PE7,
207                 .flags  = IORESOURCE_IO,
208         },
209         [3] = {
210                 .name = "gpio_host_wake",
211                 .start  = TEGRA_GPIO_PS2,
212                 .end    = TEGRA_GPIO_PS2,
213                 .flags  = IORESOURCE_IO,
214         },
215 };
216
217 static struct platform_device enterprise_bluedroid_pm_device = {
218         .name = "bluedroid_pm",
219         .id             = 0,
220         .num_resources  = ARRAY_SIZE(enterprise_bluedroid_pm_resources),
221         .resource       = enterprise_bluedroid_pm_resources,
222 };
223
224 static void __init enterprise_bluedroid_pm(void)
225 {
226         struct board_info board_info;
227         tegra_get_board_info(&board_info);
228
229         enterprise_bluedroid_pm_resources[1].start =
230                 enterprise_bluedroid_pm_resources[1].end =
231                                 gpio_to_irq(TEGRA_GPIO_PS2);
232         if (board_info.board_id == BOARD_E1239)
233                 enterprise_bluedroid_pm_resources[1].start =
234                         enterprise_bluedroid_pm_resources[1].end =
235                                                         TEGRA_GPIO_PF4;
236         platform_device_register(&enterprise_bluedroid_pm_device);
237         return;
238 }
239 #endif
240 static __initdata struct tegra_clk_init_table enterprise_clk_init_table[] = {
241         /* name         parent          rate            enabled */
242         { "pll_m",      NULL,           0,              false},
243         { "hda",        "pll_p",        108000000,      false},
244         { "hda2codec_2x","pll_p",       48000000,       false},
245         { "pwm",        "pll_p",        3187500,        false},
246         { "blink",      "clk_32k",      32768,          true},
247         { "i2s0",       "pll_a_out0",   0,              false},
248         { "i2s1",       "pll_a_out0",   0,              false},
249         { "i2s3",       "pll_a_out0",   0,              false},
250         { "spdif_out",  "pll_a_out0",   0,              false},
251         { "d_audio",    "clk_m",        13000000,       false},
252         { "dam0",       "clk_m",        13000000,       false},
253         { "dam1",       "clk_m",        13000000,       false},
254         { "dam2",       "clk_m",        13000000,       false},
255         { "audio0",     "i2s0_sync",    0,              false},
256         { "audio1",     "i2s1_sync",    0,              false},
257         { "audio2",     "i2s2_sync",    0,              false},
258         { "audio3",     "i2s3_sync",    0,              false},
259         { "audio4",     "i2s4_sync",    0,              false},
260         { "vi",         "pll_p",        0,              false},
261         { "vi_sensor",  "pll_p",        0,              false},
262         { "i2c5",       "pll_p",        3200000,        false},
263         { NULL,         NULL,           0,              0},
264 };
265
266 static __initdata struct tegra_clk_init_table enterprise_clk_i2s2_table[] = {
267         /* name         parent          rate            enabled */
268         { "i2s2",       "pll_a_out0",   0,              false},
269         { NULL,         NULL,           0,              0},
270 };
271
272 static __initdata struct tegra_clk_init_table enterprise_clk_i2s4_table[] = {
273         /* name         parent          rate            enabled */
274         { "i2s4",       "pll_a_out0",   0,              false},
275         { NULL,         NULL,           0,              0},
276 };
277
278 static struct aic3262_gpio_setup aic3262_gpio[] = {
279         /* GPIO 1*/
280         {
281                 .used           = 1,
282                 .in             = 0,
283                 .value          = AIC3262_GPIO1_FUNC_INT1_OUTPUT ,
284         },
285         /* GPIO 2*/
286         {
287                 .used           = 1,
288                 .in             = 0,
289                 .value          = AIC3262_GPIO2_FUNC_ADC_MOD_CLK_OUTPUT,
290         },
291         /* GPIO 1 */
292         {
293                 .used           = 0,
294         },
295         {// GPI2
296                 .used           = 1,
297                 .in             = 1,
298                 .in_reg         = AIC3262_DMIC_INPUT_CNTL,
299                 .in_reg_bitmask = AIC3262_DMIC_CONFIGURE_MASK,
300                 .in_reg_shift   = AIC3262_DMIC_CONFIGURE_SHIFT,
301                 .value          = AIC3262_DMIC_GPI2_LEFT_GPI2_RIGHT,
302         },
303         {// GPO1
304                 .used           = 0,
305                 .value          = AIC3262_GPO1_FUNC_DISABLED,
306         },
307 };
308
309 static struct aic3xxx_pdata aic3262_codec_pdata = {
310         .gpio_irq       = 1,
311         .gpio_reset     = TEGRA_GPIO_CODEC_RST,
312         .gpio           = aic3262_gpio,
313         .naudint_irq    = TEGRA_GPIO_HP_DET,
314         .irq_base       = AIC3262_CODEC_IRQ_BASE,
315 };
316
317 static struct tegra_i2c_platform_data enterprise_i2c1_platform_data = {
318         .adapter_nr     = 0,
319         .bus_count      = 1,
320         .bus_clk_rate   = { 100000, 0 },
321         .scl_gpio               = {TEGRA_GPIO_PC4, 0},
322         .sda_gpio               = {TEGRA_GPIO_PC5, 0},
323         .arb_recovery = arb_lost_recovery,
324 };
325
326 static struct tegra_i2c_platform_data enterprise_i2c2_platform_data = {
327         .adapter_nr     = 1,
328         .bus_count      = 1,
329         .bus_clk_rate   = { 400000, 0 },
330         .is_clkon_always = true,
331         .scl_gpio               = {TEGRA_GPIO_PT5, 0},
332         .sda_gpio               = {TEGRA_GPIO_PT6, 0},
333         .arb_recovery = arb_lost_recovery,
334 };
335
336 static struct tegra_i2c_platform_data enterprise_i2c3_platform_data = {
337         .adapter_nr     = 2,
338         .bus_count      = 1,
339         .bus_clk_rate   = { 271000, 0 },
340         .scl_gpio               = {TEGRA_GPIO_PBB1, 0},
341         .sda_gpio               = {TEGRA_GPIO_PBB2, 0},
342         .arb_recovery = arb_lost_recovery,
343 };
344
345 static struct tegra_i2c_platform_data enterprise_i2c4_platform_data = {
346         .adapter_nr     = 3,
347         .bus_count      = 1,
348         .bus_clk_rate   = { 10000, 0 },
349         .scl_gpio               = {TEGRA_GPIO_PV4, 0},
350         .sda_gpio               = {TEGRA_GPIO_PV5, 0},
351         .arb_recovery = arb_lost_recovery,
352 };
353
354 static struct tegra_i2c_platform_data enterprise_i2c5_platform_data = {
355         .adapter_nr     = 4,
356         .bus_count      = 1,
357         .bus_clk_rate   = { 390000, 0 },
358         .scl_gpio               = {TEGRA_GPIO_PZ6, 0},
359         .sda_gpio               = {TEGRA_GPIO_PZ7, 0},
360         .arb_recovery = arb_lost_recovery,
361 };
362
363 /* Equalizer filter coefs generated from the MAXIM MAX98088
364  * evkit software tool */
365 static struct max98088_eq_cfg max98088_eq_cfg[] = {
366         {
367                 .name = "FLAT",
368                 .rate = 44100,
369                 .band1 = {0x2000, 0xC002, 0x4000, 0x00E9, 0x0000},
370                 .band2 = {0x2000, 0xC00F, 0x4000, 0x02BC, 0x0000},
371                 .band3 = {0x2000, 0xC0A7, 0x4000, 0x0916, 0x0000},
372                 .band4 = {0x2000, 0xC5C2, 0x4000, 0x1A87, 0x0000},
373                 .band5 = {0x2000, 0xF6B0, 0x4000, 0x3F51, 0x0000},
374         },
375         {
376                 .name = "LOWPASS1K",
377                 .rate = 44100,
378                 .band1 = {0x205D, 0xC001, 0x3FEF, 0x002E, 0x02E0},
379                 .band2 = {0x5B9A, 0xC093, 0x3AB2, 0x088B, 0x1981},
380                 .band3 = {0x0D22, 0xC170, 0x26EA, 0x0D79, 0x32CF},
381                 .band4 = {0x0894, 0xC612, 0x01B3, 0x1B34, 0x3FFA},
382                 .band5 = {0x0815, 0x3FFF, 0xCF78, 0x0000, 0x29B7},
383         },
384         { /* BASS=-12dB, TREBLE=+9dB, Fc=5KHz */
385                 .name = "HIBOOST",
386                 .rate = 44100,
387                 .band1 = {0x0815, 0xC001, 0x3AA4, 0x0003, 0x19A2},
388                 .band2 = {0x0815, 0xC103, 0x092F, 0x0B55, 0x3F56},
389                 .band3 = {0x0E0A, 0xC306, 0x1E5C, 0x136E, 0x3856},
390                 .band4 = {0x2459, 0xF665, 0x0CAA, 0x3F46, 0x3EBB},
391                 .band5 = {0x5BBB, 0x3FFF, 0xCEB0, 0x0000, 0x28CA},
392         },
393         { /* BASS=12dB, TREBLE=+12dB */
394                 .name = "LOUD12DB",
395                 .rate = 44100,
396                 .band1 = {0x7FC1, 0xC001, 0x3EE8, 0x0020, 0x0BC7},
397                 .band2 = {0x51E9, 0xC016, 0x3C7C, 0x033F, 0x14E9},
398                 .band3 = {0x1745, 0xC12C, 0x1680, 0x0C2F, 0x3BE9},
399                 .band4 = {0x4536, 0xD7E2, 0x0ED4, 0x31DD, 0x3E42},
400                 .band5 = {0x7FEF, 0x3FFF, 0x0BAB, 0x0000, 0x3EED},
401         },
402         {
403                 .name = "FLAT",
404                 .rate = 16000,
405                 .band1 = {0x2000, 0xC004, 0x4000, 0x0141, 0x0000},
406                 .band2 = {0x2000, 0xC033, 0x4000, 0x0505, 0x0000},
407                 .band3 = {0x2000, 0xC268, 0x4000, 0x115F, 0x0000},
408                 .band4 = {0x2000, 0xDA62, 0x4000, 0x33C6, 0x0000},
409                 .band5 = {0x2000, 0x4000, 0x4000, 0x0000, 0x0000},
410         },
411         {
412                 .name = "LOWPASS1K",
413                 .rate = 16000,
414                 .band1 = {0x2000, 0xC004, 0x4000, 0x0141, 0x0000},
415                 .band2 = {0x5BE8, 0xC3E0, 0x3307, 0x15ED, 0x26A0},
416                 .band3 = {0x0F71, 0xD15A, 0x08B3, 0x2BD0, 0x3F67},
417                 .band4 = {0x0815, 0x3FFF, 0xCF78, 0x0000, 0x29B7},
418                 .band5 = {0x0815, 0x3FFF, 0xCF78, 0x0000, 0x29B7},
419         },
420         { /* BASS=-12dB, TREBLE=+9dB, Fc=2KHz */
421                 .name = "HIBOOST",
422                 .rate = 16000,
423                 .band1 = {0x0815, 0xC001, 0x3BD2, 0x0009, 0x16BF},
424                 .band2 = {0x080E, 0xC17E, 0xF653, 0x0DBD, 0x3F43},
425                 .band3 = {0x0F80, 0xDF45, 0xEE33, 0x36FE, 0x3D79},
426                 .band4 = {0x590B, 0x3FF0, 0xE882, 0x02BD, 0x3B87},
427                 .band5 = {0x4C87, 0xF3D0, 0x063F, 0x3ED4, 0x3FB1},
428         },
429         { /* BASS=12dB, TREBLE=+12dB */
430                 .name = "LOUD12DB",
431                 .rate = 16000,
432                 .band1 = {0x7FC1, 0xC001, 0x3D07, 0x0058, 0x1344},
433                 .band2 = {0x2DA6, 0xC013, 0x3CF1, 0x02FF, 0x138B},
434                 .band3 = {0x18F1, 0xC08E, 0x244D, 0x0863, 0x34B5},
435                 .band4 = {0x2BE0, 0xF385, 0x04FD, 0x3EC5, 0x3FCE},
436                 .band5 = {0x7FEF, 0x4000, 0x0BAB, 0x0000, 0x3EED},
437         },
438 };
439
440
441 static struct max98088_pdata enterprise_max98088_pdata = {
442         /* equalizer configuration */
443         .eq_cfg = max98088_eq_cfg,
444         .eq_cfgcnt = ARRAY_SIZE(max98088_eq_cfg),
445
446         /* debounce time */
447         .debounce_time_ms = 200,
448
449         /* microphone configuration */
450         .digmic_left_mode = 1,
451         .digmic_right_mode = 1,
452
453         /* receiver output configuration */
454         .receiver_mode = 0,     /* 0 = amplifier, 1 = line output */
455 };
456
457 static struct pn544_i2c_platform_data nfc_pdata = {
458                 .irq_gpio = TEGRA_GPIO_PS4,
459                 .ven_gpio = TEGRA_GPIO_PM6,
460                 .firm_gpio = 0,
461 };
462
463
464 static struct i2c_board_info __initdata max98088_board_info = {
465         I2C_BOARD_INFO("max98088", 0x10),
466         .platform_data = &enterprise_max98088_pdata,
467         .irq = TEGRA_GPIO_HP_DET,
468 };
469
470 static struct i2c_board_info __initdata enterprise_codec_aic326x_info = {
471         I2C_BOARD_INFO("tlv320aic3262", 0x18),
472         .platform_data = &aic3262_codec_pdata,
473         .irq = TEGRA_GPIO_HP_DET,
474 };
475
476 static struct i2c_board_info __initdata nfc_board_info = {
477         I2C_BOARD_INFO("pn544", 0x28),
478         .platform_data = &nfc_pdata,
479 };
480
481 static void enterprise_i2c_init(void)
482 {
483         tegra_i2c_device1.dev.platform_data = &enterprise_i2c1_platform_data;
484         tegra_i2c_device2.dev.platform_data = &enterprise_i2c2_platform_data;
485         tegra_i2c_device3.dev.platform_data = &enterprise_i2c3_platform_data;
486         tegra_i2c_device4.dev.platform_data = &enterprise_i2c4_platform_data;
487         tegra_i2c_device5.dev.platform_data = &enterprise_i2c5_platform_data;
488
489         platform_device_register(&tegra_i2c_device5);
490         platform_device_register(&tegra_i2c_device4);
491         platform_device_register(&tegra_i2c_device3);
492         platform_device_register(&tegra_i2c_device2);
493         platform_device_register(&tegra_i2c_device1);
494
495         i2c_register_board_info(0, &max98088_board_info, 1);
496         i2c_register_board_info(0, &enterprise_codec_aic326x_info, 1);
497         nfc_board_info.irq = gpio_to_irq(TEGRA_GPIO_PS4);
498         i2c_register_board_info(0, &nfc_board_info, 1);
499 }
500
501 static struct platform_device *enterprise_uart_devices[] __initdata = {
502         &tegra_uarta_device,
503         &tegra_uartb_device,
504         &tegra_uartc_device,
505         &tegra_uartd_device,
506         &tegra_uarte_device,
507 };
508
509 static struct uart_clk_parent uart_parent_clk[] = {
510         [0] = {.name = "clk_m"},
511         [1] = {.name = "pll_p"},
512 #ifndef CONFIG_TEGRA_PLLM_RESTRICTED
513         [2] = {.name = "pll_m"},
514 #endif
515 };
516 static struct tegra_uart_platform_data enterprise_uart_pdata;
517 static struct tegra_uart_platform_data enterprise_loopback_uart_pdata;
518
519 static void __init uart_debug_init(void)
520 {
521         int debug_port_id;
522
523         /* UARTD is the debug port. */
524         pr_info("Selecting UARTD as the debug console\n");
525         debug_port_id = uart_console_debug_init(3);
526         if (debug_port_id < 0)
527                 return;
528
529         enterprise_uart_devices[debug_port_id] = uart_console_debug_device;
530 }
531
532 static void __init enterprise_uart_init(void)
533 {
534         int i;
535         struct clk *c;
536
537         for (i = 0; i < ARRAY_SIZE(uart_parent_clk); ++i) {
538                 c = tegra_get_clock_by_name(uart_parent_clk[i].name);
539                 if (IS_ERR_OR_NULL(c)) {
540                         pr_err("Not able to get the clock for %s\n",
541                                                 uart_parent_clk[i].name);
542                         continue;
543                 }
544                 uart_parent_clk[i].parent_clk = c;
545                 uart_parent_clk[i].fixed_clk_rate = clk_get_rate(c);
546         }
547         enterprise_uart_pdata.parent_clk_list = uart_parent_clk;
548         enterprise_uart_pdata.parent_clk_count = ARRAY_SIZE(uart_parent_clk);
549         enterprise_loopback_uart_pdata.parent_clk_list = uart_parent_clk;
550         enterprise_loopback_uart_pdata.parent_clk_count =
551                                                 ARRAY_SIZE(uart_parent_clk);
552         enterprise_loopback_uart_pdata.is_loopback = true;
553         tegra_uarta_device.dev.platform_data = &enterprise_uart_pdata;
554         tegra_uartb_device.dev.platform_data = &enterprise_uart_pdata;
555         tegra_uartc_device.dev.platform_data = &enterprise_uart_pdata;
556         tegra_uartd_device.dev.platform_data = &enterprise_uart_pdata;
557         /* UARTE is used for loopback test purpose */
558         tegra_uarte_device.dev.platform_data = &enterprise_loopback_uart_pdata;
559
560         /* Register low speed only if it is selected */
561         if (!is_tegra_debug_uartport_hs())
562                 uart_debug_init();
563
564         platform_add_devices(enterprise_uart_devices,
565                                 ARRAY_SIZE(enterprise_uart_devices));
566 }
567 /* add vibrator for enterprise */
568 static struct platform_device vibrator_device = {
569         .name = "tegra-vibrator",
570         .id = -1,
571 };
572
573 static noinline void __init enterprise_vibrator_init(void)
574 {
575         platform_device_register(&vibrator_device);
576 }
577
578
579 static struct resource tegra_rtc_resources[] = {
580         [0] = {
581                 .start = TEGRA_RTC_BASE,
582                 .end = TEGRA_RTC_BASE + TEGRA_RTC_SIZE - 1,
583                 .flags = IORESOURCE_MEM,
584         },
585         [1] = {
586                 .start = INT_RTC,
587                 .end = INT_RTC,
588                 .flags = IORESOURCE_IRQ,
589         },
590 };
591
592 static struct platform_device tegra_rtc_device = {
593         .name = "tegra_rtc",
594         .id   = -1,
595         .resource = tegra_rtc_resources,
596         .num_resources = ARRAY_SIZE(tegra_rtc_resources),
597 };
598
599 static struct tegra_asoc_platform_data enterprise_audio_pdata = {
600         .gpio_spkr_en           = -1,
601         .gpio_hp_det            = TEGRA_GPIO_HP_DET,
602         .gpio_hp_mute           = -1,
603         .gpio_int_mic_en        = -1,
604         .gpio_ext_mic_en        = -1,
605         .debounce_time_hp       = -1,
606         /*defaults for Enterprise board*/
607         .i2s_param[HIFI_CODEC]  = {
608                 .audio_port_id  = 0,
609                 .is_i2s_master  = 0,
610                 .i2s_mode       = TEGRA_DAIFMT_I2S,
611                 .sample_size    = 16,
612                 .channels           = 2,
613         },
614         .i2s_param[BASEBAND]    = {
615                 .audio_port_id  = 2,
616                 .is_i2s_master  = 1,
617                 .i2s_mode       = TEGRA_DAIFMT_DSP_A,
618                 .sample_size    = 16,
619                 .rate           = 8000,
620                 .channels       = 1,
621                 .bit_clk    = 2048000,
622         },
623         .i2s_param[BT_SCO]      = {
624                 .audio_port_id  = 3,
625                 .is_i2s_master  = 1,
626                 .i2s_mode       = TEGRA_DAIFMT_DSP_A,
627                 .sample_size    = 16,
628         },
629 };
630
631 static struct platform_device enterprise_audio_device = {
632         .name   = "tegra-snd-max98088",
633         .id     = 0,
634         .dev    = {
635                 .platform_data  = &enterprise_audio_pdata,
636         },
637 };
638
639 static struct tegra_asoc_platform_data enterprise_audio_aic326x_pdata = {
640         .gpio_spkr_en           = -1,
641         .gpio_hp_det            = TEGRA_GPIO_HP_DET,
642         .gpio_hp_mute           = -1,
643         .gpio_int_mic_en        = -1,
644         .gpio_ext_mic_en        = -1,
645         /*defaults for Verbier-Enterprise (E1197) board with TI AIC326X codec*/
646         .i2s_param[HIFI_CODEC]  = {
647                 .audio_port_id  = 0,
648                 .is_i2s_master  = 1,
649                 .i2s_mode       = TEGRA_DAIFMT_I2S,
650                 .sample_size    = 16,
651         },
652         .i2s_param[BASEBAND]    = {
653                 .audio_port_id  = 2,
654                 .is_i2s_master  = 1,
655                 .i2s_mode       = TEGRA_DAIFMT_DSP_A,
656                 .sample_size    = 16,
657                 .rate           = 8000,
658                 .channels       = 1,
659         },
660         .i2s_param[BT_SCO]      = {
661                 .sample_size    = 16,
662                 .audio_port_id  = 3,
663                 .is_i2s_master  = 1,
664                 .i2s_mode       = TEGRA_DAIFMT_DSP_A,
665         },
666         .i2s_param[VOICE_CODEC] = {
667                 .audio_port_id  = 1,
668                 .is_i2s_master  = 1,
669                 .i2s_mode       = TEGRA_DAIFMT_I2S,
670                 .sample_size    = 16,
671                 .rate           = 8000,
672                 .channels       = 2,
673         },
674 };
675
676 static struct platform_device enterprise_audio_aic326x_device = {
677         .name   = "tegra-snd-aic326x",
678         .id     = 0,
679         .dev    = {
680                 .platform_data  = &enterprise_audio_aic326x_pdata,
681         },
682 };
683
684 static struct platform_device *enterprise_devices[] __initdata = {
685         &tegra_pmu_device,
686         &tegra_rtc_device,
687         &tegra_udc_device,
688         &tegra_wdt0_device,
689 #if defined(CONFIG_TEGRA_AVP)
690         &tegra_avp_device,
691 #endif
692         &tegra_spi_device4,
693         &tegra_hda_device,
694 #if defined(CONFIG_CRYPTO_DEV_TEGRA_SE)
695         &tegra_se_device,
696 #endif
697 #if defined(CONFIG_CRYPTO_DEV_TEGRA_AES)
698         &tegra_aes_device,
699 #endif
700 };
701
702 #define MXT_CFG_NAME            "Android_Enterprise_2012-01-31.cfg"
703 static u8 read_chg(void)
704 {
705         return gpio_get_value(TEGRA_GPIO_PH6);
706 }
707
708 static struct mxt_platform_data atmel_mxt_info = {
709         .irqflags       = IRQF_TRIGGER_FALLING,
710         .read_chg       = &read_chg,
711         .mxt_cfg_name   = MXT_CFG_NAME,
712 };
713
714 static struct i2c_board_info __initdata atmel_i2c_info[] = {
715         {
716                 I2C_BOARD_INFO("atmel_mxt_ts", MXT224_I2C_ADDR1),
717                 .flags = I2C_CLIENT_WAKE,
718                 .platform_data = &atmel_mxt_info,
719         }
720 };
721
722 static int __init enterprise_touch_init(void)
723 {
724         int ret;
725         ret = gpio_request(TEGRA_GPIO_PH6, "atmel-irq");
726         if (ret < 0) {
727                 pr_err("%s: gpio_request failed %d\n", __func__, ret);
728                 return ret;
729         }
730         ret = gpio_direction_input(TEGRA_GPIO_PH6);
731         if (ret < 0) {
732                 pr_err("%s: gpio_direction_input failed %d\n",
733                         __func__, ret);
734                 gpio_free(TEGRA_GPIO_PH6);
735                 return ret;
736         }
737         ret = gpio_request(TEGRA_GPIO_PF5, "atmel-reset");
738         if (ret < 0) {
739                 pr_err("%s: gpio_request failed %d\n", __func__, ret);
740                 return ret;
741         }
742         ret = gpio_direction_output(TEGRA_GPIO_PF5, 0);
743         if (ret < 0) {
744                 pr_err("%s: gpio_direction_ouput failed %d\n",
745                         __func__, ret);
746                 gpio_free(TEGRA_GPIO_PF5);
747                 return ret;
748         }
749         msleep(1);
750         gpio_set_value(TEGRA_GPIO_PF5, 1);
751         msleep(100);
752
753         atmel_i2c_info[0].irq = gpio_to_irq(TEGRA_GPIO_PH6);
754         i2c_register_board_info(1, atmel_i2c_info, 1);
755
756         return 0;
757 }
758
759 static void enterprise_usb_hsic_postsupend(void)
760 {
761         pr_debug("%s\n", __func__);
762 #ifdef CONFIG_TEGRA_BB_XMM_POWER
763         baseband_xmm_set_power_status(BBXMM_PS_L2);
764 #endif
765 }
766
767 static void enterprise_usb_hsic_preresume(void)
768 {
769         pr_debug("%s\n", __func__);
770 #ifdef CONFIG_TEGRA_BB_XMM_POWER
771         baseband_xmm_set_power_status(BBXMM_PS_L2TOL0);
772 #endif
773 }
774
775 static void enterprise_usb_hsic_post_resume(void)
776 {
777         pr_debug("%s\n", __func__);
778 #ifdef CONFIG_TEGRA_BB_XMM_POWER
779         baseband_xmm_set_power_status(BBXMM_PS_L0);
780 #endif
781 }
782
783 static void enterprise_usb_hsic_phy_power(void)
784 {
785         pr_debug("%s\n", __func__);
786 #ifdef CONFIG_TEGRA_BB_XMM_POWER
787         baseband_xmm_set_power_status(BBXMM_PS_L0);
788 #endif
789 }
790
791 static void enterprise_usb_hsic_post_phy_off(void)
792 {
793         pr_debug("%s\n", __func__);
794 #ifdef CONFIG_TEGRA_BB_XMM_POWER
795         baseband_xmm_set_power_status(BBXMM_PS_L2);
796 #endif
797 }
798
799 static struct tegra_usb_phy_platform_ops hsic_xmm_plat_ops = {
800         .post_suspend = enterprise_usb_hsic_postsupend,
801         .pre_resume = enterprise_usb_hsic_preresume,
802         .port_power = enterprise_usb_hsic_phy_power,
803         .post_resume = enterprise_usb_hsic_post_resume,
804         .post_phy_off = enterprise_usb_hsic_post_phy_off,
805 };
806
807 static struct tegra_usb_platform_data tegra_ehci2_hsic_xmm_pdata = {
808         .port_otg = false,
809         .has_hostpc = true,
810         .phy_intf = TEGRA_USB_PHY_INTF_HSIC,
811         .op_mode        = TEGRA_USB_OPMODE_HOST,
812         .u_data.host = {
813                 .vbus_gpio = -1,
814                 .hot_plug = false,
815                 .remote_wakeup_supported = false,
816                 .power_off_on_suspend = false,
817         },
818         .ops = &hsic_xmm_plat_ops,
819 };
820
821 static struct tegra_usb_platform_data tegra_udc_pdata = {
822         .port_otg = true,
823         .has_hostpc = true,
824         .id_det_type = TEGRA_USB_VIRTUAL_ID,
825         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
826         .op_mode = TEGRA_USB_OPMODE_DEVICE,
827         .u_data.dev = {
828                 .vbus_pmu_irq = ENT_TPS80031_IRQ_BASE +
829                                 TPS80031_INT_VBUS_DET,
830                 .vbus_gpio = -1,
831                 .charging_supported = false,
832                 .remote_wakeup_supported = false,
833         },
834         .u_cfg.utmi = {
835                 .hssync_start_delay = 0,
836                 .elastic_limit = 16,
837                 .idle_wait_delay = 17,
838                 .term_range_adj = 6,
839                 .xcvr_setup = 8,
840                 .xcvr_lsfslew = 2,
841                 .xcvr_lsrslew = 2,
842                 .xcvr_setup_offset = 0,
843                 .xcvr_use_fuses = 1,
844         },
845 };
846
847 static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
848         .port_otg = true,
849         .has_hostpc = true,
850         .id_det_type = TEGRA_USB_VIRTUAL_ID,
851         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
852         .op_mode = TEGRA_USB_OPMODE_HOST,
853         .u_data.host = {
854                 .vbus_gpio = -1,
855                 .hot_plug = true,
856                 .remote_wakeup_supported = true,
857                 .power_off_on_suspend = true,
858         },
859         .u_cfg.utmi = {
860                 .hssync_start_delay = 0,
861                 .elastic_limit = 16,
862                 .idle_wait_delay = 17,
863                 .term_range_adj = 6,
864                 .xcvr_setup = 15,
865                 .xcvr_lsfslew = 2,
866                 .xcvr_lsrslew = 2,
867                 .xcvr_setup_offset = 0,
868                 .xcvr_use_fuses = 1,
869         },
870 };
871
872 static struct tegra_usb_otg_data tegra_otg_pdata = {
873         .ehci_device = &tegra_ehci1_device,
874         .ehci_pdata = &tegra_ehci1_utmi_pdata,
875 };
876
877 static struct platform_device *
878 tegra_usb_hsic_host_register(struct platform_device *ehci_dev)
879 {
880         struct platform_device *pdev;
881         int val;
882
883         pdev = platform_device_alloc(ehci_dev->name, ehci_dev->id);
884         if (!pdev)
885                 return NULL;
886
887         val = platform_device_add_resources(pdev, ehci_dev->resource,
888                                                 ehci_dev->num_resources);
889         if (val)
890                 goto error;
891
892         pdev->dev.dma_mask =  ehci_dev->dev.dma_mask;
893         pdev->dev.coherent_dma_mask = ehci_dev->dev.coherent_dma_mask;
894
895         val = platform_device_add_data(pdev, &tegra_ehci2_hsic_xmm_pdata,
896                         sizeof(struct tegra_usb_platform_data));
897         if (val)
898                 goto error;
899
900         val = platform_device_add(pdev);
901         if (val)
902                 goto error;
903
904         return pdev;
905
906 error:
907         pr_err("%s: failed to add the host contoller device\n", __func__);
908         platform_device_put(pdev);
909         return NULL;
910 }
911
912 void tegra_usb_hsic_host_unregister(struct platform_device **platdev)
913 {
914         struct platform_device *pdev = *platdev;
915
916         if (pdev && &pdev->dev) {
917                 platform_device_unregister(pdev);
918                 *platdev = NULL;
919         } else
920                 pr_err("%s: no platform device\n", __func__);
921 }
922
923 static void enterprise_usb_init(void)
924 {
925         tegra_udc_device.dev.platform_data = &tegra_udc_pdata;
926
927         tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
928         platform_device_register(&tegra_otg_device);
929 }
930
931 static struct platform_device *enterprise_audio_devices[] __initdata = {
932         &tegra_ahub_device,
933         &tegra_dam_device0,
934         &tegra_dam_device1,
935         &tegra_dam_device2,
936         &tegra_i2s_device0,
937         &tegra_i2s_device1,
938         &tegra_i2s_device3,
939         &tegra_spdif_device,
940         &spdif_dit_device,
941         &bluetooth_dit_device,
942         &baseband_dit_device,
943         &tegra_pcm_device,
944         &enterprise_audio_device,
945         &enterprise_audio_aic326x_device,
946 };
947
948 static void enterprise_audio_init(void)
949 {
950         struct board_info board_info;
951
952         tegra_get_board_info(&board_info);
953
954         if (board_info.board_id == BOARD_E1239) {
955                 enterprise_audio_aic326x_pdata.i2s_param[BASEBAND].
956                                         audio_port_id = 4;
957                 enterprise_audio_aic326x_pdata.i2s_param[BASEBAND].
958                                         i2s_mode        = TEGRA_DAIFMT_I2S;
959                 enterprise_audio_aic326x_pdata.i2s_param[BASEBAND].
960                                         channels        = 2;
961                 platform_device_register(&tegra_i2s_device4);
962         } else {
963                 if (board_info.board_id == BOARD_E1197)
964                         enterprise_audio_pdata.i2s_param[HIFI_CODEC].
965                                         audio_port_id = 1;
966                 else if (board_info.fab == BOARD_FAB_A04) {
967                         enterprise_audio_pdata.i2s_param[BASEBAND].
968                                         audio_port_id = 4;
969                         platform_device_register(&tegra_i2s_device4);
970                 } else {
971                         enterprise_audio_pdata.i2s_param[BASEBAND].
972                                         audio_port_id = 2;
973                         platform_device_register(&tegra_i2s_device2);
974                 }
975
976         }
977         platform_add_devices(enterprise_audio_devices,
978                 ARRAY_SIZE(enterprise_audio_devices));
979 }
980
981 static struct baseband_power_platform_data tegra_baseband_power_data = {
982         .baseband_type = BASEBAND_XMM,
983         .modem = {
984                 .xmm = {
985                         .bb_rst = XMM_GPIO_BB_RST,
986                         .bb_on = XMM_GPIO_BB_ON,
987                         .ipc_bb_wake = XMM_GPIO_IPC_BB_WAKE,
988                         .ipc_ap_wake = XMM_GPIO_IPC_AP_WAKE,
989                         .ipc_hsic_active = XMM_GPIO_IPC_HSIC_ACTIVE,
990                         .ipc_hsic_sus_req = XMM_GPIO_IPC_HSIC_SUS_REQ,
991                 },
992         },
993 };
994
995 static struct platform_device tegra_baseband_power_device = {
996         .name = "baseband_xmm_power",
997         .id = -1,
998         .dev = {
999                 .platform_data = &tegra_baseband_power_data,
1000         },
1001 };
1002
1003 static struct platform_device tegra_baseband_power2_device = {
1004         .name = "baseband_xmm_power2",
1005         .id = -1,
1006         .dev = {
1007                 .platform_data = &tegra_baseband_power_data,
1008         },
1009 };
1010
1011 #ifdef CONFIG_TEGRA_BB_M7400
1012 static union tegra_bb_gpio_id m7400_gpio_id = {
1013         .m7400 = {
1014                 .pwr_status = GPIO_BB_RESET,
1015                 .pwr_on = GPIO_BB_PWRON,
1016                 .uart_awr = GPIO_BB_APACK,
1017                 .uart_cwr = GPIO_BB_CPACK,
1018                 .usb_awr = GPIO_BB_APACK2,
1019                 .usb_cwr = GPIO_BB_CPACK2,
1020                 .service = GPIO_BB_RSVD2,
1021                 .resout2 = GPIO_BB_RSVD1,
1022         },
1023 };
1024
1025 static struct tegra_bb_pdata m7400_pdata = {
1026         .id = &m7400_gpio_id,
1027         .device = &tegra_ehci2_device,
1028         .ehci_register = tegra_usb_hsic_host_register,
1029         .ehci_unregister = tegra_usb_hsic_host_unregister,
1030         .bb_id = TEGRA_BB_M7400,
1031 };
1032
1033 static struct platform_device tegra_baseband_m7400_device = {
1034         .name = "tegra_baseband_power",
1035         .id = -1,
1036         .dev = {
1037                 .platform_data = &m7400_pdata,
1038         },
1039 };
1040 #endif
1041
1042 static void enterprise_baseband_init(void)
1043 {
1044         struct board_info board_info;
1045
1046         int modem_id = tegra_get_modem_id();
1047
1048         tegra_get_board_info(&board_info);
1049
1050         switch (modem_id) {
1051         case TEGRA_BB_PH450: /* PH450 ULPI */
1052                 enterprise_modem_init();
1053                 break;
1054         case TEGRA_BB_XMM6260: /* XMM6260 HSIC */
1055                 /* baseband-power.ko will register ehci2 device */
1056                 tegra_ehci2_device.dev.platform_data =
1057                                         &tegra_ehci2_hsic_xmm_pdata;
1058                 tegra_baseband_power_data.hsic_register =
1059                                                 &tegra_usb_hsic_host_register;
1060                 tegra_baseband_power_data.hsic_unregister =
1061                                                 &tegra_usb_hsic_host_unregister;
1062                 tegra_baseband_power_data.ehci_device =
1063                                         &tegra_ehci2_device;
1064                 if ((board_info.board_id == BOARD_E1239) &&
1065                         (board_info.fab <= BOARD_FAB_A02)) {
1066                         tegra_baseband_power_data.modem.
1067                                 xmm.ipc_hsic_active  = BB_GPIO_LCD_PWR2;
1068                         tegra_baseband_power_data.modem.
1069                                 xmm.ipc_hsic_sus_req = BB_GPIO_LCD_PWR1;
1070                 }
1071                 platform_device_register(&tegra_baseband_power_device);
1072                 platform_device_register(&tegra_baseband_power2_device);
1073                 break;
1074 #ifdef CONFIG_TEGRA_BB_M7400
1075         case TEGRA_BB_M7400: /* M7400 HSIC */
1076                 tegra_ehci2_hsic_xmm_pdata.u_data.host.power_off_on_suspend = 0;
1077                 tegra_ehci2_device.dev.platform_data
1078                         = &tegra_ehci2_hsic_xmm_pdata;
1079                 platform_device_register(&tegra_baseband_m7400_device);
1080                 break;
1081 #endif
1082         }
1083 }
1084 static void enterprise_nfc_init(void)
1085 {
1086         struct board_info bi;
1087
1088         /* Enable firmware GPIO PX7 for board E1205 */
1089         tegra_get_board_info(&bi);
1090         if (bi.board_id == BOARD_E1205 && bi.fab >= BOARD_FAB_A03) {
1091                 nfc_pdata.firm_gpio = TEGRA_GPIO_PX7;
1092         } else if (bi.board_id == BOARD_E1239) {
1093                 nfc_pdata.firm_gpio = TEGRA_GPIO_PN6;
1094         }
1095 }
1096
1097 static void __init tegra_enterprise_init(void)
1098 {
1099         struct board_info board_info;
1100         tegra_get_board_info(&board_info);
1101         if (board_info.fab == BOARD_FAB_A04)
1102                 tegra_clk_init_from_table(enterprise_clk_i2s4_table);
1103         else
1104                 tegra_clk_init_from_table(enterprise_clk_i2s2_table);
1105
1106         tegra_clk_init_from_table(enterprise_clk_init_table);
1107         tegra_enable_pinmux();
1108         tegra_smmu_init();
1109         tegra_soc_device_init("tegra_enterprise");
1110         enterprise_pinmux_init();
1111         enterprise_i2c_init();
1112         enterprise_uart_init();
1113         enterprise_usb_init();
1114 #ifdef CONFIG_BT_BLUESLEEP
1115         if (board_info.board_id == BOARD_E1239)
1116                 enterprise_bt_rfkill_pdata[0].shutdown_gpio = TEGRA_GPIO_PF4;
1117 #endif
1118         platform_add_devices(enterprise_devices, ARRAY_SIZE(enterprise_devices));
1119         tegra_ram_console_debug_init();
1120         enterprise_regulator_init();
1121         tegra_io_dpd_init();
1122         enterprise_sdhci_init();
1123 #ifdef CONFIG_TEGRA_EDP_LIMITS
1124         enterprise_edp_init();
1125 #endif
1126         enterprise_kbc_init();
1127         enterprise_nfc_init();
1128         enterprise_touch_init();
1129         enterprise_audio_init();
1130         enterprise_baseband_init();
1131         enterprise_panel_init();
1132         if (tegra_get_commchip_id() == COMMCHIP_TI_WL18XX)
1133                 enterprise_bt_st();
1134         else
1135 #ifdef CONFIG_BT_BLUESLEEP
1136                 enterprise_bt_rfkill();
1137         enterprise_setup_bluesleep();
1138 #elif defined CONFIG_BLUEDROID_PM
1139                 enterprise_bluedroid_pm();
1140 #endif
1141         enterprise_emc_init();
1142         enterprise_sensors_init();
1143         enterprise_suspend_init();
1144         enterprise_bpc_mgmt_init();
1145         tegra_release_bootloader_fb();
1146         tegra_serial_debug_init(TEGRA_UARTD_BASE, INT_WDT_CPU, NULL, -1, -1);
1147         enterprise_vibrator_init();
1148         tegra_register_fuse();
1149 }
1150
1151 static void __init tegra_enterprise_dt_init(void)
1152 {
1153         tegra_enterprise_init();
1154
1155 #ifdef CONFIG_USE_OF
1156         of_platform_populate(NULL,
1157                 of_default_bus_match_table, NULL, NULL);
1158 #endif
1159 }
1160
1161 static void __init tegra_enterprise_reserve(void)
1162 {
1163 #if defined(CONFIG_NVMAP_CONVERT_CARVEOUT_TO_IOVMM)
1164         tegra_reserve(0, SZ_4M, SZ_8M);
1165 #else
1166         tegra_reserve(SZ_128M, SZ_4M, SZ_8M);
1167 #endif
1168         tegra_ram_console_debug_reserve(SZ_1M);
1169 }
1170
1171 static const char *enterprise_dt_board_compat[] = {
1172         "nvidia,enterprise",
1173         NULL
1174 };
1175
1176 static const char *tai_dt_board_compat[] = {
1177         "nvidia,tai",
1178         NULL
1179 };
1180
1181 MACHINE_START(TEGRA_ENTERPRISE, "tegra_enterprise")
1182         .atag_offset    = 0x100,
1183         .soc            = &tegra_soc_desc,
1184         .map_io         = tegra_map_common_io,
1185         .reserve        = tegra_enterprise_reserve,
1186         .init_early     = tegra30_init_early,
1187         .init_irq       = tegra_init_irq,
1188         .handle_irq     = gic_handle_irq,
1189         .timer          = &tegra_timer,
1190         .init_machine   = tegra_enterprise_dt_init,
1191         .restart        = tegra_assert_system_reset,
1192         .dt_compat      = enterprise_dt_board_compat,
1193 MACHINE_END
1194
1195 MACHINE_START(TAI, "tai")
1196         .atag_offset    = 0x100,
1197         .soc            = &tegra_soc_desc,
1198         .map_io         = tegra_map_common_io,
1199         .reserve        = tegra_enterprise_reserve,
1200         .init_early     = tegra30_init_early,
1201         .init_irq       = tegra_init_irq,
1202         .handle_irq     = gic_handle_irq,
1203         .timer          = &tegra_timer,
1204         .init_machine   = tegra_enterprise_dt_init,
1205         .restart        = tegra_assert_system_reset,
1206         .dt_compat      = tai_dt_board_compat,
1207 MACHINE_END