ARM: roth: add leds-pwm
[linux-3.10.git] / arch / arm / mach-tegra / board-roth.c
1 /*
2  * arch/arm/mach-tegra/board-roth.c
3  *
4  * Copyright (c) 2012, 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/dma-mapping.h>
29 #include <linux/delay.h>
30 #include <linux/i2c-tegra.h>
31 #include <linux/gpio.h>
32 #include <linux/input.h>
33 #include <linux/platform_data/tegra_usb.h>
34 #include <linux/tegra_uart.h>
35 #include <linux/memblock.h>
36 #include <linux/rfkill-gpio.h>
37 #include <linux/skbuff.h>
38 #include <linux/ti_wilink_st.h>
39 #include <linux/regulator/consumer.h>
40 #include <linux/max17048_battery.h>
41 #include <linux/leds.h>
42 #include <linux/leds_pwm.h>
43 #include <linux/i2c/at24.h>
44 #include <linux/of_platform.h>
45 #include <asm/hardware/gic.h>
46
47 #include <mach/clk.h>
48 #include <mach/iomap.h>
49 #include <mach/irqs.h>
50 #include <mach/pinmux.h>
51 #include <mach/pinmux-tegra30.h>
52 #include <mach/iomap.h>
53 #include <mach/io.h>
54 #include <mach/io_dpd.h>
55 #include <mach/i2s.h>
56 #include <mach/isomgr.h>
57 #include <mach/tegra_asoc_pdata.h>
58 #include <asm/mach-types.h>
59 #include <asm/mach/arch.h>
60 #include <mach/usb_phy.h>
61 #include <mach/gpio-tegra.h>
62 #include <mach/tegra_fiq_debugger.h>
63 #include <mach/edp.h>
64
65 #include "board.h"
66 #include "board-common.h"
67 #include "clock.h"
68 #include "board-roth.h"
69 #include "devices.h"
70 #include "gpio-names.h"
71 #include "fuse.h"
72 #include "pm.h"
73 #include "common.h"
74 #include "tegra-board-id.h"
75
76 #ifdef CONFIG_BT_BLUESLEEP
77 static struct rfkill_gpio_platform_data roth_bt_rfkill_pdata = {
78                 .name           = "bt_rfkill",
79                 .shutdown_gpio  = TEGRA_GPIO_PQ7,
80                 .type           = RFKILL_TYPE_BLUETOOTH,
81 };
82
83 static struct platform_device roth_bt_rfkill_device = {
84         .name = "rfkill_gpio",
85         .id             = -1,
86         .dev = {
87                 .platform_data = &roth_bt_rfkill_pdata,
88         },
89 };
90
91 static struct resource roth_bluesleep_resources[] = {
92         [0] = {
93                 .name = "gpio_host_wake",
94                         .start  = TEGRA_GPIO_PU6,
95                         .end    = TEGRA_GPIO_PU6,
96                         .flags  = IORESOURCE_IO,
97         },
98         [1] = {
99                 .name = "gpio_ext_wake",
100                         .start  = TEGRA_GPIO_PEE1,
101                         .end    = TEGRA_GPIO_PEE1,
102                         .flags  = IORESOURCE_IO,
103         },
104         [2] = {
105                 .name = "host_wake",
106                         .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
107         },
108 };
109
110 static struct platform_device roth_bluesleep_device = {
111         .name           = "bluesleep",
112         .id             = -1,
113         .num_resources  = ARRAY_SIZE(roth_bluesleep_resources),
114         .resource       = roth_bluesleep_resources,
115 };
116
117 static noinline void __init roth_setup_bt_rfkill(void)
118 {
119                 roth_bt_rfkill_pdata.reset_gpio = TEGRA_GPIO_PQ6;
120         platform_device_register(&roth_bt_rfkill_device);
121 }
122
123 static noinline void __init roth_setup_bluesleep(void)
124 {
125         roth_bluesleep_resources[2].start =
126                 roth_bluesleep_resources[2].end =
127                         gpio_to_irq(TEGRA_GPIO_PU6);
128         platform_device_register(&roth_bluesleep_device);
129         return;
130 }
131 #elif defined CONFIG_BLUEDROID_PM
132 static struct resource roth_bluedroid_pm_resources[] = {
133         [0] = {
134                 .name   = "shutdown_gpio",
135                 .start  = TEGRA_GPIO_PQ7,
136                 .end    = TEGRA_GPIO_PQ7,
137                 .flags  = IORESOURCE_IO,
138         },
139         [1] = {
140                 .name = "host_wake",
141                 .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
142         },
143         [2] = {
144                 .name = "gpio_ext_wake",
145                 .start  = TEGRA_GPIO_PEE1,
146                 .end    = TEGRA_GPIO_PEE1,
147                 .flags  = IORESOURCE_IO,
148         },
149         [3] = {
150                 .name = "gpio_host_wake",
151                 .start  = TEGRA_GPIO_PU6,
152                 .end    = TEGRA_GPIO_PU6,
153                 .flags  = IORESOURCE_IO,
154         },
155 };
156
157 static struct platform_device roth_bluedroid_pm_device = {
158         .name = "bluedroid_pm",
159         .id             = 0,
160         .num_resources  = ARRAY_SIZE(roth_bluedroid_pm_resources),
161         .resource       = roth_bluedroid_pm_resources,
162 };
163
164 static noinline void __init roth_setup_bluedroid_pm(void)
165 {
166         roth_bluedroid_pm_resources[1].start =
167                 roth_bluedroid_pm_resources[1].end =
168                                 gpio_to_irq(TEGRA_GPIO_PU6);
169         platform_device_register(&roth_bluedroid_pm_device);
170 }
171 #endif
172 static __initdata struct tegra_clk_init_table roth_clk_init_table[] = {
173         /* name         parent          rate            enabled */
174         { "pll_m",      NULL,           0,              false},
175         { "hda",        "pll_p",        108000000,      false},
176         { "hda2codec_2x", "pll_p",      48000000,       false},
177         { "pwm",        "pll_p",        37000000,       false},
178         { "blink",      "clk_32k",      32768,          true},
179         { "i2s1",       "pll_a_out0",   0,              false},
180         { "i2s3",       "pll_a_out0",   0,              false},
181         { "i2s4",       "pll_a_out0",   0,              false},
182         { "spdif_out",  "pll_a_out0",   0,              false},
183         { "d_audio",    "clk_m",        12000000,       false},
184         { "dam0",       "clk_m",        12000000,       false},
185         { "dam1",       "clk_m",        12000000,       false},
186         { "dam2",       "clk_m",        12000000,       false},
187         { "audio1",     "i2s1_sync",    0,              false},
188         { "audio3",     "i2s3_sync",    0,              false},
189         /* Setting vi_sensor-clk to true for validation purpose, will imapact
190          * power, later set to be false.*/
191         { "vi_sensor",  "pll_p",        150000000,      false},
192         { "cilab",      "pll_p",        150000000,      false},
193         { "cilcd",      "pll_p",        150000000,      false},
194         { "cile",       "pll_p",        150000000,      false},
195         { "i2c1",       "pll_p",        3200000,        false},
196         { "i2c2",       "pll_p",        3200000,        false},
197         { "i2c3",       "pll_p",        3200000,        false},
198         { "i2c4",       "pll_p",        3200000,        false},
199         { "i2c5",       "pll_p",        3200000,        false},
200         { NULL,         NULL,           0,              0},
201 };
202
203 static struct tegra_i2c_platform_data roth_i2c1_platform_data = {
204         .bus_clk_rate   = 100000,
205         .scl_gpio       = TEGRA_GPIO_I2C1_SCL,
206         .sda_gpio       = TEGRA_GPIO_I2C1_SDA,
207 };
208
209 static struct tegra_i2c_platform_data roth_i2c2_platform_data = {
210         .bus_clk_rate   = 100000,
211         .is_clkon_always = true,
212         .scl_gpio       = TEGRA_GPIO_I2C2_SCL,
213         .sda_gpio       = TEGRA_GPIO_I2C2_SDA,
214 };
215
216 static struct tegra_i2c_platform_data roth_i2c3_platform_data = {
217         .bus_clk_rate   = 100000,
218         .scl_gpio       = TEGRA_GPIO_I2C3_SCL,
219         .sda_gpio       = TEGRA_GPIO_I2C3_SDA,
220 };
221
222 static struct tegra_i2c_platform_data roth_i2c4_platform_data = {
223         .bus_clk_rate   = 10000,
224         .scl_gpio       = TEGRA_GPIO_I2C4_SCL,
225         .sda_gpio       = TEGRA_GPIO_I2C4_SDA,
226 };
227
228 static struct tegra_i2c_platform_data roth_i2c5_platform_data = {
229         .bus_clk_rate   = 400000,
230         .scl_gpio       = TEGRA_GPIO_I2C5_SCL,
231         .sda_gpio       = TEGRA_GPIO_I2C5_SDA,
232 };
233
234 #if defined(CONFIG_ARCH_TEGRA_11x_SOC)
235 static struct i2c_board_info __initdata rt5640_board_info = {
236         I2C_BOARD_INFO("rt5640", 0x1c),
237 };
238
239 static struct i2c_board_info __initdata roth_codec_tfa9887R_info = {
240         I2C_BOARD_INFO("tfa9887R", 0x37),
241 };
242
243 static struct i2c_board_info __initdata roth_codec_tfa9887L_info = {
244         I2C_BOARD_INFO("tfa9887L", 0x34),
245 };
246
247 /* On A01, Left Speaker is moved to 0x34 */
248 static struct i2c_board_info __initdata roth_codec_tfa9887L_info_a01 = {
249         I2C_BOARD_INFO("tfa9887L", 0x34),
250 };
251 #endif
252
253 static void roth_i2c_init(void)
254 {
255         struct board_info board_info;
256
257         tegra_get_board_info(&board_info);
258
259         tegra11_i2c_device1.dev.platform_data = &roth_i2c1_platform_data;
260         tegra11_i2c_device2.dev.platform_data = &roth_i2c2_platform_data;
261         tegra11_i2c_device3.dev.platform_data = &roth_i2c3_platform_data;
262         tegra11_i2c_device4.dev.platform_data = &roth_i2c4_platform_data;
263         tegra11_i2c_device5.dev.platform_data = &roth_i2c5_platform_data;
264
265         platform_device_register(&tegra11_i2c_device5);
266         platform_device_register(&tegra11_i2c_device4);
267         platform_device_register(&tegra11_i2c_device3);
268         platform_device_register(&tegra11_i2c_device2);
269         platform_device_register(&tegra11_i2c_device1);
270
271         i2c_register_board_info(0, &rt5640_board_info, 1);
272         i2c_register_board_info(0, &roth_codec_tfa9887R_info, 1);
273
274         if (board_info.fab >= BOARD_FAB_A01)
275                 i2c_register_board_info(0, &roth_codec_tfa9887L_info_a01, 1);
276         else
277                 i2c_register_board_info(0, &roth_codec_tfa9887L_info, 1);
278 }
279
280 static struct platform_device *roth_uart_devices[] __initdata = {
281         &tegra_uarta_device,
282         &tegra_uartb_device,
283         &tegra_uartc_device,
284         &tegra_uartd_device,
285 };
286 static struct uart_clk_parent uart_parent_clk[] = {
287         [0] = {.name = "clk_m"},
288         [1] = {.name = "pll_p"},
289 #ifndef CONFIG_TEGRA_PLLM_RESTRICTED
290         [2] = {.name = "pll_m"},
291 #endif
292 };
293
294 static struct tegra_uart_platform_data roth_uart_pdata;
295 static struct tegra_uart_platform_data roth_loopback_uart_pdata;
296
297 static void __init uart_debug_init(void)
298 {
299         int debug_port_id;
300
301         debug_port_id = uart_console_debug_init(3);
302         if (debug_port_id < 0)
303                 return;
304
305         roth_uart_devices[debug_port_id] = uart_console_debug_device;
306 }
307
308 static void __init roth_uart_init(void)
309 {
310         struct clk *c;
311         int i;
312
313         for (i = 0; i < ARRAY_SIZE(uart_parent_clk); ++i) {
314                 c = tegra_get_clock_by_name(uart_parent_clk[i].name);
315                 if (IS_ERR_OR_NULL(c)) {
316                         pr_err("Not able to get the clock for %s\n",
317                                                 uart_parent_clk[i].name);
318                         continue;
319                 }
320                 uart_parent_clk[i].parent_clk = c;
321                 uart_parent_clk[i].fixed_clk_rate = clk_get_rate(c);
322         }
323         roth_uart_pdata.parent_clk_list = uart_parent_clk;
324         roth_uart_pdata.parent_clk_count = ARRAY_SIZE(uart_parent_clk);
325         roth_loopback_uart_pdata.parent_clk_list = uart_parent_clk;
326         roth_loopback_uart_pdata.parent_clk_count =
327                                                 ARRAY_SIZE(uart_parent_clk);
328         roth_loopback_uart_pdata.is_loopback = true;
329         tegra_uarta_device.dev.platform_data = &roth_uart_pdata;
330         tegra_uartb_device.dev.platform_data = &roth_uart_pdata;
331         tegra_uartc_device.dev.platform_data = &roth_uart_pdata;
332         tegra_uartd_device.dev.platform_data = &roth_uart_pdata;
333
334         /* Register low speed only if it is selected */
335         if (!is_tegra_debug_uartport_hs())
336                 uart_debug_init();
337
338         platform_add_devices(roth_uart_devices,
339                                 ARRAY_SIZE(roth_uart_devices));
340 }
341
342 static struct resource tegra_rtc_resources[] = {
343         [0] = {
344                 .start = TEGRA_RTC_BASE,
345                 .end = TEGRA_RTC_BASE + TEGRA_RTC_SIZE - 1,
346                 .flags = IORESOURCE_MEM,
347         },
348         [1] = {
349                 .start = INT_RTC,
350                 .end = INT_RTC,
351                 .flags = IORESOURCE_IRQ,
352         },
353 };
354
355 static struct platform_device tegra_rtc_device = {
356         .name = "tegra_rtc",
357         .id   = -1,
358         .resource = tegra_rtc_resources,
359         .num_resources = ARRAY_SIZE(tegra_rtc_resources),
360 };
361
362 static struct tegra_asoc_platform_data roth_audio_pdata = {
363         .gpio_spkr_en           = TEGRA_GPIO_SPKR_EN,
364         .gpio_hp_det            = TEGRA_GPIO_HP_DET,
365         .gpio_hp_mute           = -1,
366         .gpio_int_mic_en        = TEGRA_GPIO_INT_MIC_EN,
367         .gpio_ext_mic_en        = TEGRA_GPIO_EXT_MIC_EN,
368         .gpio_ldo1_en           = TEGRA_GPIO_LDO1_EN,
369         .gpio_codec1 = TEGRA_GPIO_CODEC1_EN,
370         .gpio_codec2 = TEGRA_GPIO_CODEC2_EN,
371         .gpio_codec3 = TEGRA_GPIO_CODEC3_EN,
372         .i2s_param[HIFI_CODEC]  = {
373                 .audio_port_id  = 1,
374                 .is_i2s_master  = 1,
375                 .i2s_mode       = TEGRA_DAIFMT_I2S,
376         },
377         .i2s_param[BT_SCO]      = {
378                 .audio_port_id  = 3,
379                 .is_i2s_master  = 1,
380                 .i2s_mode       = TEGRA_DAIFMT_DSP_A,
381         },
382 };
383
384 static struct platform_device roth_audio_device = {
385         .name   = "tegra-snd-rt5640",
386         .id     = 0,
387         .dev    = {
388                 .platform_data = &roth_audio_pdata,
389         },
390 };
391
392 static struct platform_device tegra_camera = {
393         .name = "tegra_camera",
394         .id = -1,
395 };
396
397 static struct led_pwm roth_led_info[] = {
398         {
399                 .name                   = "roth-led",
400                 .default_trigger        = "none",
401                 .pwm_id                 = 2,
402                 .active_low             = 0,
403                 .max_brightness         = 255,
404                 .pwm_period_ns          = 10000000,
405         },
406 };
407
408 static struct led_pwm_platform_data roth_leds_pdata = {
409         .leds           = roth_led_info,
410         .num_leds       = ARRAY_SIZE(roth_led_info),
411 };
412
413 static struct platform_device roth_leds_pwm_device = {
414         .name   = "leds_pwm",
415         .id     = -1,
416         .dev    = {
417                 .platform_data = &roth_leds_pdata,
418         },
419 };
420
421
422 static struct platform_device *roth_devices[] __initdata = {
423         &tegra_pmu_device,
424         &tegra_rtc_device,
425         &tegra_udc_device,
426 #if defined(CONFIG_TEGRA_AVP)
427         &tegra_avp_device,
428 #endif
429         &tegra_camera,
430 #if defined(CONFIG_CRYPTO_DEV_TEGRA_SE)
431         &tegra11_se_device,
432 #endif
433         &tegra_ahub_device,
434         &tegra_dam_device0,
435         &tegra_dam_device1,
436         &tegra_dam_device2,
437         &tegra_i2s_device1,
438         &tegra_i2s_device3,
439         &tegra_i2s_device4,
440         &tegra_spdif_device,
441         &spdif_dit_device,
442         &bluetooth_dit_device,
443         &roth_audio_device,
444         &tegra_hda_device,
445 #if defined(CONFIG_CRYPTO_DEV_TEGRA_AES)
446         &tegra_aes_device,
447 #endif
448
449         &tegra_pwfm_device,
450         &roth_leds_pwm_device,
451 };
452
453 #ifdef CONFIG_USB_SUPPORT
454 static struct tegra_usb_platform_data tegra_udc_pdata = {
455         .port_otg = true,
456         .has_hostpc = true,
457         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
458         .op_mode = TEGRA_USB_OPMODE_DEVICE,
459         .u_data.dev = {
460                 .vbus_pmu_irq = 0,
461                 .vbus_gpio = -1,
462                 .charging_supported = false,
463                 .remote_wakeup_supported = false,
464         },
465         .u_cfg.utmi = {
466                 .hssync_start_delay = 0,
467                 .elastic_limit = 16,
468                 .idle_wait_delay = 17,
469                 .term_range_adj = 6,
470                 .xcvr_setup = 8,
471                 .xcvr_lsfslew = 2,
472                 .xcvr_lsrslew = 2,
473                 .xcvr_setup_offset = 0,
474                 .xcvr_use_fuses = 1,
475         },
476 };
477
478 static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
479         .port_otg = true,
480         .has_hostpc = true,
481         .unaligned_dma_buf_supported = false,
482         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
483         .op_mode = TEGRA_USB_OPMODE_HOST,
484         .u_data.host = {
485                 .vbus_gpio = -1,
486                 .hot_plug = true,
487                 .remote_wakeup_supported = true,
488                 .power_off_on_suspend = false,
489         },
490         .u_cfg.utmi = {
491                 .hssync_start_delay = 0,
492                 .elastic_limit = 16,
493                 .idle_wait_delay = 17,
494                 .term_range_adj = 6,
495                 .xcvr_setup = 15,
496                 .xcvr_lsfslew = 2,
497                 .xcvr_lsrslew = 2,
498                 .xcvr_setup_offset = 0,
499                 .xcvr_use_fuses = 1,
500                 .vbus_oc_map = 0x4,
501         },
502 };
503
504 static struct tegra_usb_platform_data tegra_ehci3_utmi_pdata = {
505         .port_otg = false,
506         .has_hostpc = true,
507         .unaligned_dma_buf_supported = false,
508         .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
509         .op_mode = TEGRA_USB_OPMODE_HOST,
510         .u_data.host = {
511                 .vbus_gpio = -1,
512                 .hot_plug = true,
513                 .remote_wakeup_supported = true,
514                 .power_off_on_suspend = false,
515         },
516         .u_cfg.utmi = {
517         .hssync_start_delay = 0,
518                 .elastic_limit = 16,
519                 .idle_wait_delay = 17,
520                 .term_range_adj = 6,
521                 .xcvr_setup = 8,
522                 .xcvr_lsfslew = 2,
523                 .xcvr_lsrslew = 2,
524                 .xcvr_setup_offset = 0,
525                 .xcvr_use_fuses = 1,
526                 .vbus_oc_map = 0x5,
527         },
528 };
529
530 static struct tegra_usb_otg_data tegra_otg_pdata = {
531         .ehci_device = &tegra_ehci1_device,
532         .ehci_pdata = &tegra_ehci1_utmi_pdata,
533 };
534
535 static void roth_usb_init(void)
536 {
537         tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
538         platform_device_register(&tegra_otg_device);
539
540         /* Setup the udc platform data */
541         tegra_udc_device.dev.platform_data = &tegra_udc_pdata;
542
543         tegra_ehci3_device.dev.platform_data = &tegra_ehci3_utmi_pdata;
544         platform_device_register(&tegra_ehci3_device);
545 }
546
547 #else
548 static void roth_usb_init(void) { }
549 #endif
550
551 static void roth_audio_init(void)
552 {
553         struct board_info board_info;
554
555         tegra_get_board_info(&board_info);
556
557         roth_audio_pdata.codec_name = "rt5640.0-001c";
558         roth_audio_pdata.codec_dai_name = "rt5640-aif1";
559 }
560
561
562 static void __init tegra_roth_init(void)
563 {
564         tegra_clk_init_from_table(roth_clk_init_table);
565         tegra_clk_vefify_parents();
566         tegra_smmu_init();
567         tegra_soc_device_init("roth");
568         tegra_enable_pinmux();
569         roth_pinmux_init();
570         roth_i2c_init();
571         roth_usb_init();
572         roth_uart_init();
573         roth_audio_init();
574         platform_add_devices(roth_devices, ARRAY_SIZE(roth_devices));
575         //tegra_ram_console_debug_init();
576         tegra_io_dpd_init();
577         roth_regulator_init();
578         roth_sdhci_init();
579         roth_suspend_init();
580         roth_emc_init();
581         roth_edp_init();
582         isomgr_init();
583         roth_panel_init();
584         roth_kbc_init();
585         roth_pmon_init();
586 #ifdef CONFIG_BT_BLUESLEEP
587         roth_setup_bluesleep();
588         roth_setup_bt_rfkill();
589 #elif defined CONFIG_BLUEDROID_PM
590         roth_setup_bluedroid_pm();
591 #endif
592         tegra_release_bootloader_fb();
593 #ifdef CONFIG_TEGRA_WDT_RECOVERY
594         tegra_wdt_recovery_init();
595 #endif
596         tegra_serial_debug_init(TEGRA_UARTD_BASE, INT_WDT_CPU, NULL, -1, -1);
597         roth_sensors_init();
598         roth_soctherm_init();
599         roth_fan_init();
600         tegra_register_fuse();
601 }
602
603 static void __init roth_ramconsole_reserve(unsigned long size)
604 {
605         tegra_ram_console_debug_reserve(SZ_1M);
606 }
607
608 static void __init tegra_roth_dt_init(void)
609 {
610         tegra_roth_init();
611
612 #ifdef CONFIG_USE_OF
613         of_platform_populate(NULL,
614                 of_default_bus_match_table, NULL, NULL);
615 #endif
616 }
617
618 static void __init tegra_roth_reserve(void)
619 {
620 #if defined(CONFIG_NVMAP_CONVERT_CARVEOUT_TO_IOVMM)
621         /* 1920*1200*4*2 = 18432000 bytes */
622         tegra_reserve(0, SZ_16M + SZ_2M, SZ_4M);
623 #else
624         tegra_reserve(SZ_128M, SZ_16M + SZ_2M, SZ_4M);
625 #endif
626         roth_ramconsole_reserve(SZ_1M);
627 }
628
629 static const char * const roth_dt_board_compat[] = {
630         "nvidia,roth",
631         NULL
632 };
633
634 MACHINE_START(ROTH, "roth")
635         .atag_offset    = 0x100,
636         .smp            = smp_ops(tegra_smp_ops),
637         .map_io         = tegra_map_common_io,
638         .reserve        = tegra_roth_reserve,
639         .init_early     = tegra11x_init_early,
640         .init_irq       = tegra_dt_init_irq,
641         .handle_irq     = gic_handle_irq,
642         .timer          = &tegra_timer,
643         .init_machine   = tegra_roth_dt_init,
644         .restart        = tegra_assert_system_reset,
645         .dt_compat      = roth_dt_board_compat,
646 MACHINE_END