ARM: tegra12: enable DT support for host1x
[linux-3.10.git] / arch / arm / mach-tegra / board-bonaire.c
1 /*
2  * arch/arm/mach-tegra/board-bonaire.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 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/spi/spi.h>
30 #include <linux/spi/spi-tegra.h>
31 #include <linux/i2c/panjit_ts.h>
32 #include <linux/dma-mapping.h>
33 #include <linux/delay.h>
34 #include <linux/i2c-tegra.h>
35 #include <linux/gpio.h>
36 #include <linux/gpio_keys.h>
37 #include <linux/input.h>
38 #include <linux/platform_data/tegra_usb.h>
39 #include <linux/platform_data/serial-tegra.h>
40 #include <linux/of_platform.h>
41 #include <linux/clk/tegra.h>
42 #include <linux/tegra-soc.h>
43 #include <linux/usb/tegra_usb_phy.h>
44 #include <linux/clocksource.h>
45 #include <linux/irqchip.h>
46 #include <linux/pci-tegra.h>
47
48 #include <mach/gpio-tegra.h>
49
50 #include <mach/io_dpd.h>
51
52 #include <mach/irqs.h>
53 #include <mach/pinmux.h>
54 #include <mach/i2s.h>
55 #include <mach/audio.h>
56 #include <mach/nand.h>
57
58 #include <asm/mach-types.h>
59 #include <asm/mach/arch.h>
60
61 #include "board.h"
62 #include "board-bonaire.h"
63 #include "clock.h"
64 #include "common.h"
65 #include "devices.h"
66 #include "gpio-names.h"
67 #include "iomap.h"
68
69 #define ENABLE_OTG 0
70 /*#define USB_HOST_ONLY*/
71
72 static struct plat_serial8250_port debug_uart_platform_data[] = {
73         {
74                 .membase        = IO_ADDRESS(TEGRA_UARTA_BASE),
75                 .mapbase        = TEGRA_UARTA_BASE,
76                 .irq            = INT_UARTA,
77                 .flags          = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
78                 .type           = PORT_TEGRA,
79                 .iotype         = UPIO_MEM,
80                 .regshift       = 2,
81                 .uartclk        = 13000000,
82         }, {
83                 .flags          = 0,
84         }
85 };
86
87 static struct platform_device debug_uart = {
88         .name = "serial8250",
89         .id = PLAT8250_DEV_PLATFORM,
90         .dev = {
91                 .platform_data = debug_uart_platform_data,
92         },
93 };
94
95 #ifdef CONFIG_BCM4329_RFKILL
96
97 static struct resource bonaire_bcm4329_rfkill_resources[] = {
98         {
99                 .name   = "bcm4329_nreset_gpio",
100                 .start  = TEGRA_GPIO_PU0,
101                 .end    = TEGRA_GPIO_PU0,
102                 .flags  = IORESOURCE_IO,
103         },
104         {
105                 .name   = "bcm4329_nshutdown_gpio",
106                 .start  = TEGRA_GPIO_PK2,
107                 .end    = TEGRA_GPIO_PK2,
108                 .flags  = IORESOURCE_IO,
109         },
110 };
111
112 static struct platform_device bonaire_bcm4329_rfkill_device = {
113         .name = "bcm4329_rfkill",
114         .id             = -1,
115         .num_resources  = ARRAY_SIZE(bonaire_bcm4329_rfkill_resources),
116         .resource       = bonaire_bcm4329_rfkill_resources,
117 };
118
119 static noinline void __init bonaire_bt_rfkill(void)
120 {
121         /*Add Clock Resource*/
122         clk_add_alias("bcm4329_32k_clk", bonaire_bcm4329_rfkill_device.name, \
123                                 "blink", NULL);
124
125         platform_device_register(&bonaire_bcm4329_rfkill_device);
126
127         return;
128 }
129 #else
130 static inline void bonaire_bt_rfkill(void) { }
131 #endif
132
133 static __initdata struct tegra_clk_init_table bonaire_clk_init_table[] = {
134         /* name         parent          rate            enabled */
135         { "uarta",      "clk_m",        13000000,       true},
136         { "uartb",      "clk_m",        13000000,       true},
137         { "uartc",      "clk_m",        13000000,       true},
138         { "uartd",      "clk_m",        13000000,       true},
139         { "uarte",      "clk_m",        13000000,       true},
140         { "sdmmc1",     "clk_m",        26000000,       false},
141         { "sdmmc3",     "clk_m",        26000000,       false},
142         { "sdmmc4",     "clk_m",        26000000,       false},
143         { "pll_m",      NULL,           0,              true},
144         { "blink",      "clk_32k",      32768,          false},
145         { "pll_p_out4", "pll_p",        24000000,       true },
146         { "pwm",        "clk_32k",      32768,          false},
147         { "blink",      "clk_32k",      32768,          false},
148         { "pll_a",      NULL,           56448000,       true},
149         { "pll_a_out0", NULL,           11289600,       true},
150         { "i2s1",       "pll_a_out0",   11289600,       true},
151         { "i2s2",       "pll_a_out0",   11289600,       true},
152         { "d_audio",    "pll_a_out0",   11289600,       false},
153         { "audio_2x",   "audio",        22579200,       true},
154         { NULL,         NULL,           0,              0},
155 };
156
157 static struct i2c_board_info __initdata bonaire_i2c_bus1_board_info[] = {
158         {
159                 I2C_BOARD_INFO("wm8903", 0x1a),
160         },
161 };
162
163 static struct tegra_i2c_platform_data bonaire_i2c1_platform_data = {
164         .bus_clk_rate   = 100000,
165 };
166
167 #if 0   /* !!!FIXME!!! THESE ARE VENTANA SETTINGS */
168 static const struct tegra_pingroup_config i2c2_ddc = {
169         .pingroup       = TEGRA_PINGROUP_DDC,
170         .func           = TEGRA_MUX_I2C2,
171 };
172
173 static const struct tegra_pingroup_config i2c2_gen2 = {
174         .pingroup       = TEGRA_PINGROUP_PTA,
175         .func           = TEGRA_MUX_I2C2,
176 };
177 #endif
178
179 static struct tegra_i2c_platform_data bonaire_i2c2_platform_data = {
180         .bus_clk_rate   = 100000,
181 #if 0   /* !!!FIXME!!!! TESE ARE VENTANA SETTINGS */
182         .bus_mux        = { &i2c2_ddc, &i2c2_gen2 },
183         .bus_mux_len    = { 1, 1 },
184 #endif
185 };
186
187 static struct tegra_i2c_platform_data bonaire_i2c3_platform_data = {
188         .bus_clk_rate   = 100000,
189 };
190
191 static struct tegra_i2c_platform_data bonaire_i2c4_platform_data = {
192         .bus_clk_rate   = 100000,
193 };
194
195 static struct tegra_i2c_platform_data bonaire_i2c5_platform_data = {
196         .bus_clk_rate   = 100000,
197 };
198
199 static struct tegra_i2c_platform_data bonaire_i2c6_platform_data = {
200         .bus_clk_rate   = 100000,
201 };
202
203 static void bonaire_i2c_init(void)
204 {
205         tegra12_i2c_device1.dev.platform_data = &bonaire_i2c1_platform_data;
206         tegra12_i2c_device2.dev.platform_data = &bonaire_i2c2_platform_data;
207         tegra12_i2c_device3.dev.platform_data = &bonaire_i2c3_platform_data;
208         tegra12_i2c_device4.dev.platform_data = &bonaire_i2c4_platform_data;
209         tegra12_i2c_device5.dev.platform_data = &bonaire_i2c5_platform_data;
210         tegra12_i2c_device6.dev.platform_data = &bonaire_i2c6_platform_data;
211
212         i2c_register_board_info(0, bonaire_i2c_bus1_board_info, 1);
213
214         platform_device_register(&tegra12_i2c_device6);
215         platform_device_register(&tegra12_i2c_device5);
216         platform_device_register(&tegra12_i2c_device4);
217         platform_device_register(&tegra12_i2c_device3);
218         platform_device_register(&tegra12_i2c_device2);
219         platform_device_register(&tegra12_i2c_device1);
220 }
221
222 static void bonaire_apbdma_init(void)
223 {
224         platform_device_register(&tegra_apbdma);
225 }
226
227 static struct platform_device *bonaire_spi_devices[] __initdata = {
228         &tegra11_spi_device4,
229 };
230
231 /* struct spi_clk_parent spi_parent_clk_bonaire[] = { */
232 /*      [0] = {.name = "pll_p"}, */
233 /* #ifndef CONFIG_TEGRA_PLLM_RESTRICTED */
234 /*      [1] = {.name = "pll_m"}, */
235 /*      [2] = {.name = "clk_m"}, */
236 /* #else */
237 /*      [1] = {.name = "clk_m"}, */
238 /* #endif */
239 /* }; */
240
241 /* static struct tegra_spi_platform_data bonaire_spi_pdata = { */
242 /*      .is_dma_based           = true, */
243 /*      .max_dma_buffer         = 16 * 1024, */
244 /*      .is_clkon_always        = false, */
245 /*      .max_rate               = 25000000, */
246 /* }; */
247
248 /* static void __init bonaire_spi_init(void) */
249 /* { */
250 /*      int i; */
251 /*      struct clk *c; */
252 /*      struct board_info board_info, display_board_info; */
253
254 /*      tegra_get_board_info(&board_info); */
255 /*      tegra_get_display_board_info(&display_board_info); */
256
257 /*      for (i = 0; i < ARRAY_SIZE(spi_parent_clk_bonaire); ++i) { */
258 /*              c = tegra_get_clock_by_name(spi_parent_clk_bonaire[i].name); */
259 /*              if (IS_ERR_OR_NULL(c)) { */
260 /*                      pr_err("Not able to get the clock for %s\n", */
261 /*                                      spi_parent_clk_bonaire[i].name); */
262 /*              continue; */
263 /*              } */
264 /*              spi_parent_clk_bonaire[i].parent_clk = c; */
265 /*              spi_parent_clk_bonaire[i].fixed_clk_rate = clk_get_rate(c); */
266 /*      } */
267 /*      bonaire_spi_pdata.parent_clk_list = spi_parent_clk_bonaire; */
268 /*      bonaire_spi_pdata.parent_clk_count = ARRAY_SIZE(spi_parent_clk_bonaire); */
269 /*      tegra11_spi_device4.dev.platform_data = &bonaire_spi_pdata; */
270 /*      platform_add_devices(bonaire_spi_devices, */
271 /*                      ARRAY_SIZE(bonaire_spi_devices)); */
272 /* } */
273
274 #define GPIO_KEY(_id, _gpio, _iswake)           \
275         {                                       \
276                 .code = _id,                    \
277                 .gpio = TEGRA_GPIO_##_gpio,     \
278                 .active_low = 1,                \
279                 .desc = #_id,                   \
280                 .type = EV_KEY,                 \
281                 .wakeup = _iswake,              \
282                 .debounce_interval = 10,        \
283         }
284
285 /* !!!FIXME!!! THESE ARE VENTANA DEFINITIONS */
286 static struct gpio_keys_button bonaire_keys[] = {
287         [0] = GPIO_KEY(KEY_MENU, PQ0, 0),
288         [1] = GPIO_KEY(KEY_HOME, PQ1, 0),
289         [2] = GPIO_KEY(KEY_BACK, PQ2, 0),
290         [3] = GPIO_KEY(KEY_VOLUMEUP, PQ3, 0),
291         [4] = GPIO_KEY(KEY_VOLUMEDOWN, PQ4, 0),
292         [5] = GPIO_KEY(KEY_POWER, PV2, 1),
293 };
294
295 static struct gpio_keys_platform_data bonaire_keys_platform_data = {
296         .buttons        = bonaire_keys,
297         .nbuttons       = ARRAY_SIZE(bonaire_keys),
298 };
299
300 static struct platform_device bonaire_keys_device = {
301         .name   = "gpio-keys",
302         .id     = 0,
303         .dev    = {
304                 .platform_data  = &bonaire_keys_platform_data,
305         },
306 };
307
308 static struct resource tegra_rtc_resources[] = {
309         [0] = {
310                 .start = TEGRA_RTC_BASE,
311                 .end = TEGRA_RTC_BASE + TEGRA_RTC_SIZE - 1,
312                 .flags = IORESOURCE_MEM,
313         },
314         [1] = {
315                 .start = INT_RTC,
316                 .end = INT_RTC,
317                 .flags = IORESOURCE_IRQ,
318         },
319 };
320
321 static struct platform_device tegra_rtc_device = {
322         .name = "tegra_rtc",
323         .id   = -1,
324         .resource = tegra_rtc_resources,
325         .num_resources = ARRAY_SIZE(tegra_rtc_resources),
326 };
327
328 #if defined(CONFIG_MTD_NAND_TEGRA)
329 static struct resource nand_resources[] = {
330         [0] = {
331                 .start = INT_NANDFLASH,
332                 .end   = INT_NANDFLASH,
333                 .flags = IORESOURCE_IRQ
334         },
335         [1] = {
336                 .start = TEGRA_NAND_BASE,
337                 .end = TEGRA_NAND_BASE + TEGRA_NAND_SIZE - 1,
338                 .flags = IORESOURCE_MEM
339         }
340 };
341
342 static struct tegra_nand_chip_parms nand_chip_parms[] = {
343         /* Samsung K5E2G1GACM */
344         [0] = {
345                 .vendor_id   = 0xEC,
346                 .device_id   = 0xAA,
347                 .capacity    = 256,
348                 .timing      = {
349                         .trp            = 21,
350                         .trh            = 15,
351                         .twp            = 21,
352                         .twh            = 15,
353                         .tcs            = 31,
354                         .twhr           = 60,
355                         .tcr_tar_trr    = 20,
356                         .twb            = 100,
357                         .trp_resp       = 30,
358                         .tadl           = 100,
359                 },
360         },
361         /* Hynix H5PS1GB3EFR */
362         [1] = {
363                 .vendor_id   = 0xAD,
364                 .device_id   = 0xDC,
365                 .capacity    = 512,
366                 .timing      = {
367                         .trp            = 12,
368                         .trh            = 10,
369                         .twp            = 12,
370                         .twh            = 10,
371                         .tcs            = 20,
372                         .twhr           = 80,
373                         .tcr_tar_trr    = 20,
374                         .twb            = 100,
375                         .trp_resp       = 20,
376                         .tadl           = 70,
377                 },
378         },
379 };
380
381 struct tegra_nand_platform nand_data = {
382         .max_chips      = 8,
383         .chip_parms     = nand_chip_parms,
384         .nr_chip_parms  = ARRAY_SIZE(nand_chip_parms),
385 };
386
387 struct platform_device tegra_nand_device = {
388         .name          = "tegra_nand",
389         .id            = -1,
390         .resource      = nand_resources,
391         .num_resources = ARRAY_SIZE(nand_resources),
392         .dev            = {
393                 .platform_data = &nand_data,
394         },
395 };
396 #endif
397
398 static struct platform_device *bonaire_devices[] __initdata = {
399 #if ENABLE_OTG
400         &tegra_otg_device,
401 #endif
402         &debug_uart,
403         &tegra_pmu_device,
404         &tegra_rtc_device,
405 #if !defined(USB_HOST_ONLY)
406         &tegra_udc_device,
407 #endif
408 #if defined(CONFIG_CRYPTO_DEV_TEGRA_SE)
409         &tegra12_se_device,
410 #endif
411         &bonaire_keys_device,
412 #if defined(CONFIG_SND_HDA_TEGRA)
413         &tegra_hda_device,
414 #endif
415         &tegra_avp_device,
416 #if defined(CONFIG_MTD_NAND_TEGRA)
417         &tegra_nand_device,
418 #endif
419 };
420
421 static int __init bonaire_touch_init(void)
422 {
423         return 0;
424 }
425
426 static struct tegra_usb_platform_data tegra_udc_pdata = {
427         .port_otg = false,
428         .has_hostpc = true,
429         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
430         .op_mode = TEGRA_USB_OPMODE_DEVICE,
431         .u_data.dev = {
432                 .vbus_pmu_irq = 0,
433                 .vbus_gpio = -1,
434                 .charging_supported = false,
435                 .remote_wakeup_supported = false,
436         },
437         .u_cfg.utmi = {
438                 .hssync_start_delay = 0,
439                 .elastic_limit = 16,
440                 .idle_wait_delay = 17,
441                 .term_range_adj = 6,
442                 .xcvr_setup = 8,
443                 .xcvr_lsfslew = 2,
444                 .xcvr_lsrslew = 2,
445                 .xcvr_setup_offset = 0,
446                 .xcvr_use_fuses = 1,
447         },
448 };
449
450 static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
451         .port_otg = false,
452         .has_hostpc = true,
453         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
454         .op_mode = TEGRA_USB_OPMODE_HOST,
455         .u_data.host = {
456                 .vbus_gpio = -1,
457                 /*.vbus_reg = "vdd_vbus_micro_usb",*/
458                 .hot_plug = true,
459                 .remote_wakeup_supported = true,
460                 .power_off_on_suspend = true,
461         },
462         .u_cfg.utmi = {
463                 .hssync_start_delay = 0,
464                 .elastic_limit = 16,
465                 .idle_wait_delay = 17,
466                 .term_range_adj = 6,
467                 .xcvr_setup = 15,
468                 .xcvr_lsfslew = 2,
469                 .xcvr_lsrslew = 2,
470                 .xcvr_setup_offset = 0,
471                 .xcvr_use_fuses = 1,
472         },
473 };
474
475 static struct tegra_usb_platform_data tegra_ehci2_utmi_pdata = {
476         .port_otg = false,
477         .has_hostpc = true,
478         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
479         .op_mode         = TEGRA_USB_OPMODE_HOST,
480         .u_data.host = {
481                 .vbus_gpio = -1,
482                 .hot_plug = true,
483                 .remote_wakeup_supported = true,
484                 .power_off_on_suspend = true,
485         },
486         .u_cfg.utmi = {
487                 .hssync_start_delay = 0,
488                 .elastic_limit = 16,
489                 .idle_wait_delay = 17,
490                 .term_range_adj = 6,
491                 .xcvr_setup = 15,
492                 .xcvr_lsfslew = 2,
493                 .xcvr_lsrslew = 2,
494                 .xcvr_setup_offset = 0,
495                 .xcvr_use_fuses = 1,
496         },
497 };
498
499 static struct tegra_usb_platform_data tegra_ehci3_utmi_pdata = {
500         .port_otg = false,
501         .has_hostpc = true,
502         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
503         .op_mode         = TEGRA_USB_OPMODE_HOST,
504         .u_data.host = {
505                 .vbus_gpio = -1,
506                 /*.vbus_reg = "vdd_vbus_typea_usb",*/
507                 .hot_plug = true,
508                 .remote_wakeup_supported = true,
509                 .power_off_on_suspend = true,
510         },
511         .u_cfg.utmi = {
512                 .hssync_start_delay = 0,
513                 .elastic_limit = 16,
514                 .idle_wait_delay = 17,
515                 .term_range_adj = 6,
516                 .xcvr_setup = 8,
517                 .xcvr_lsfslew = 2,
518                 .xcvr_lsrslew = 2,
519                 .xcvr_setup_offset = 0,
520                 .xcvr_use_fuses = 1,
521         },
522 };
523
524 static void bonaire_usb_init(void)
525 {
526 #if defined(USB_HOST_ONLY)
527         tegra_ehci1_device.dev.platform_data = &tegra_ehci1_utmi_pdata;
528         platform_device_register(&tegra_ehci1_device);
529 #else
530         /* setup the udc platform data */
531         tegra_udc_device.dev.platform_data = &tegra_udc_pdata;
532
533 #endif
534 }
535
536 static struct platform_device *bonaire_hs_uart_devices[] __initdata = {
537         &tegra_uartd_device, &tegra_uartb_device, &tegra_uartc_device,
538 };
539
540 static struct tegra_serial_platform_data bonaire_uartb_pdata = {
541         .dma_req_selector = 9,
542         .modem_interrupt = false,
543 };
544 static struct tegra_serial_platform_data bonaire_uartc_pdata = {
545         .dma_req_selector = 10,
546         .modem_interrupt = false,
547 };
548 static struct tegra_serial_platform_data bonaire_uartd_pdata = {
549         .dma_req_selector = 19,
550         .modem_interrupt = false,
551 };
552
553 static void __init bonaire_hs_uart_init(void)
554 {
555         tegra_uartb_device.dev.platform_data = &bonaire_uartb_pdata;
556         tegra_uartc_device.dev.platform_data = &bonaire_uartc_pdata;
557         tegra_uartd_device.dev.platform_data = &bonaire_uartd_pdata;
558         platform_add_devices(bonaire_hs_uart_devices,
559                         ARRAY_SIZE(bonaire_hs_uart_devices));
560 }
561
562 static struct tegra_pci_platform_data bonaire_pcie_platform_data = {
563         .port_status[0] = 1,
564         .port_status[1] = 1,
565         .use_dock_detect        = 1,
566         .gpio                   = TEGRA_GPIO_PO1,
567 };
568
569 static void bonaire_pcie_init(void)
570 {
571         tegra_pci_device.dev.platform_data = &bonaire_pcie_platform_data;
572         platform_device_register(&tegra_pci_device);
573 }
574
575 static void __init tegra_bonaire_init(void)
576 {
577         tegra_clk_init_from_table(bonaire_clk_init_table);
578         tegra_enable_pinmux();
579         bonaire_pinmux_init();
580         tegra_soc_device_init("bonaire");
581         bonaire_apbdma_init();
582
583         if (tegra_platform_is_fpga() && tegra_platform_is_qt())
584                 debug_uart_platform_data[0].uartclk =
585                                                 tegra_clk_measure_input_freq();
586
587         platform_add_devices(bonaire_devices, ARRAY_SIZE(bonaire_devices));
588
589         if (tegra_cpu_is_asim())
590                 bonaire_power_off_init();
591         tegra_io_dpd_init();
592         bonaire_hs_uart_init();
593         bonaire_sdhci_init();
594         bonaire_i2c_init();
595         /* bonaire_spi_init(); */
596         bonaire_regulator_init();
597         bonaire_suspend_init();
598         bonaire_touch_init();
599         bonaire_usb_init();
600         bonaire_panel_init();
601         bonaire_sensors_init();
602         bonaire_bt_rfkill();
603         bonaire_pcie_init();
604         tegra_register_fuse();
605 }
606
607 #ifdef CONFIG_USE_OF
608 struct of_dev_auxdata tegra_bonaire_auxdata_lookup[] __initdata = {
609         OF_DEV_AUXDATA("nvidia,tegra124-host1x", TEGRA_HOST1X_BASE, "host1x",
610                 NULL),
611         OF_DEV_AUXDATA("nvidia,tegra124-gk20a", TEGRA_GK20A_BAR0_BASE,
612                 "gk20a.0", NULL),
613         OF_DEV_AUXDATA("nvidia,tegra124-vic", TEGRA_VIC_BASE, "vic03.0", NULL),
614         OF_DEV_AUXDATA("nvidia,tegra124-msenc", TEGRA_MSENC_BASE, "msenc",
615                 NULL),
616         OF_DEV_AUXDATA("nvidia,tegra124-vi", TEGRA_VI_BASE, "vi.0", NULL),
617         OF_DEV_AUXDATA("nvidia,tegra124-isp", TEGRA_ISP_BASE, "isp.0", NULL),
618         OF_DEV_AUXDATA("nvidia,tegra124-isp", TEGRA_ISPB_BASE, "isp.1", NULL),
619         OF_DEV_AUXDATA("nvidia,tegra124-tsec", TEGRA_TSEC_BASE, "tsec", NULL),
620         {}
621 };
622 #endif
623
624 static void __init tegra_bonaire_dt_init(void)
625 {
626         of_platform_populate(NULL, of_default_bus_match_table,
627                 tegra_bonaire_auxdata_lookup, &platform_bus);
628
629         tegra_bonaire_init();
630 }
631
632 static void __init tegra_bonaire_reserve(void)
633 {
634 #if defined(CONFIG_NVMAP_CONVERT_CARVEOUT_TO_IOVMM)
635         tegra_reserve(0, SZ_16M + SZ_2M, SZ_16M);
636 #else
637         if (tegra_cpu_is_asim() && tegra_split_mem_active())
638                 tegra_reserve(0, 0, 0);
639         else
640                 tegra_reserve(SZ_128M, SZ_16M + SZ_2M, SZ_16M);
641 #endif
642 }
643
644 static const char * const bonaire_dt_board_compat[] = {
645         "nvidia,bonaire",
646         NULL
647 };
648
649 MACHINE_START(BONAIRE, "bonaire")
650         .atag_offset    = 0x80000100,
651         .map_io         = tegra_map_common_io,
652         .reserve        = tegra_bonaire_reserve,
653         .init_early     = tegra12x_init_early,
654         .init_irq       = irqchip_init,
655         .init_machine   = tegra_bonaire_dt_init,
656         .init_time      = clocksource_of_init,
657         .dt_compat      = bonaire_dt_board_compat,
658 MACHINE_END