2 * arch/arm/mach-tegra/board-ardbeg.c
4 * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved.
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.
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
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.
20 #include <linux/kernel.h>
21 #include <linux/init.h>
22 #include <linux/slab.h>
23 #include <linux/ctype.h>
24 #include <linux/platform_device.h>
25 #include <linux/clk.h>
26 #include <linux/serial_8250.h>
27 #include <linux/i2c.h>
28 #include <linux/i2c/i2c-hid.h>
29 #include <linux/dma-mapping.h>
30 #include <linux/delay.h>
31 #include <linux/i2c-tegra.h>
32 #include <linux/gpio.h>
33 #include <linux/input.h>
34 #include <linux/platform_data/tegra_usb.h>
35 #include <linux/spi/spi.h>
36 #include <linux/spi/rm31080a_ts.h>
37 #include <linux/maxim_sti.h>
38 #include <linux/memblock.h>
39 #include <linux/spi/spi-tegra.h>
40 #include <linux/nfc/pn544.h>
41 #include <linux/rfkill-gpio.h>
42 #include <linux/skbuff.h>
43 #include <linux/ti_wilink_st.h>
44 #include <linux/regulator/consumer.h>
45 #include <linux/smb349-charger.h>
46 #include <linux/max17048_battery.h>
47 #include <linux/leds.h>
48 #include <linux/i2c/at24.h>
49 #include <linux/of_platform.h>
50 #include <linux/i2c.h>
51 #include <linux/i2c-tegra.h>
52 #include <linux/platform_data/serial-tegra.h>
53 #include <linux/edp.h>
54 #include <linux/usb/tegra_usb_phy.h>
55 #include <linux/mfd/palmas.h>
56 #include <linux/clk/tegra.h>
57 #include <media/tegra_dtv.h>
58 #include <linux/clocksource.h>
59 #include <linux/irqchip.h>
60 #include <linux/irqchip/tegra.h>
61 #include <linux/tegra-soc.h>
62 #include <linux/tegra_fiq_debugger.h>
63 #include <linux/platform_data/tegra_usb_modem_power.h>
64 #include <linux/platform_data/tegra_ahci.h>
65 #include <linux/irqchip/tegra.h>
66 #include <sound/max98090.h>
68 #include <mach/irqs.h>
69 #include <mach/pinmux.h>
70 #include <mach/pinmux-t12.h>
71 #include <mach/io_dpd.h>
73 #include <mach/isomgr.h>
74 #include <mach/tegra_asoc_pdata.h>
76 #include <mach/tegra_usb_pad_ctrl.h>
78 #include <asm/mach-types.h>
79 #include <asm/mach/arch.h>
80 #include <mach/gpio-tegra.h>
81 #include <mach/xusb.h>
84 #include "board-ardbeg.h"
85 #include "board-common.h"
86 #include "board-touch-raydium.h"
87 #include "board-touch-maxim_sti.h"
91 #include "gpio-names.h"
94 #include "tegra-board-id.h"
95 #include "tegra-of-dev-auxdata.h"
97 static struct board_info board_info, display_board_info;
99 static struct resource ardbeg_bluedroid_pm_resources[] = {
101 .name = "shutdown_gpio",
102 .start = TEGRA_GPIO_PR1,
103 .end = TEGRA_GPIO_PR1,
104 .flags = IORESOURCE_IO,
108 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
111 .name = "gpio_ext_wake",
112 .start = TEGRA_GPIO_PEE1,
113 .end = TEGRA_GPIO_PEE1,
114 .flags = IORESOURCE_IO,
117 .name = "gpio_host_wake",
118 .start = TEGRA_GPIO_PU6,
119 .end = TEGRA_GPIO_PU6,
120 .flags = IORESOURCE_IO,
123 .name = "reset_gpio",
124 .start = TEGRA_GPIO_PX1,
125 .end = TEGRA_GPIO_PX1,
126 .flags = IORESOURCE_IO,
130 static struct platform_device ardbeg_bluedroid_pm_device = {
131 .name = "bluedroid_pm",
133 .num_resources = ARRAY_SIZE(ardbeg_bluedroid_pm_resources),
134 .resource = ardbeg_bluedroid_pm_resources,
137 static noinline void __init ardbeg_setup_bluedroid_pm(void)
139 ardbeg_bluedroid_pm_resources[1].start =
140 ardbeg_bluedroid_pm_resources[1].end =
141 gpio_to_irq(TEGRA_GPIO_PU6);
142 platform_device_register(&ardbeg_bluedroid_pm_device);
145 static struct i2c_board_info __initdata rt5639_board_info = {
146 I2C_BOARD_INFO("rt5639", 0x1c),
149 static struct max98090_eq_cfg max98090_eq_cfg[] = {
152 static struct max98090_pdata norrin_max98090_pdata = {
153 /* Equalizer Configuration */
154 .eq_cfg = max98090_eq_cfg,
155 .eq_cfgcnt = ARRAY_SIZE(max98090_eq_cfg),
157 /* Microphone Configuration */
158 .digmic_left_mode = 1,
159 .digmic_right_mode = 1,
162 static struct i2c_board_info __initdata max98090_board_info = {
163 I2C_BOARD_INFO("max98090", 0x10),
164 .platform_data = &norrin_max98090_pdata,
167 static __initdata struct tegra_clk_init_table ardbeg_clk_init_table[] = {
168 /* name parent rate enabled */
169 { "pll_m", NULL, 0, false},
170 { "hda", "pll_p", 108000000, false},
171 { "hda2codec_2x", "pll_p", 48000000, false},
172 { "pwm", "pll_p", 48000000, false},
173 { "i2s1", "pll_a_out0", 0, false},
174 { "i2s3", "pll_a_out0", 0, false},
175 { "i2s4", "pll_a_out0", 0, false},
176 { "spdif_out", "pll_a_out0", 0, false},
177 { "d_audio", "clk_m", 12000000, false},
178 { "dam0", "clk_m", 12000000, false},
179 { "dam1", "clk_m", 12000000, false},
180 { "dam2", "clk_m", 12000000, false},
181 { "audio1", "i2s1_sync", 0, false},
182 { "audio3", "i2s3_sync", 0, false},
183 { "vi_sensor", "pll_p", 150000000, false},
184 { "vi_sensor2", "pll_p", 150000000, false},
185 { "cilab", "pll_p", 150000000, false},
186 { "cilcd", "pll_p", 150000000, false},
187 { "cile", "pll_p", 150000000, false},
188 { "i2c1", "pll_p", 3200000, false},
189 { "i2c2", "pll_p", 3200000, false},
190 { "i2c3", "pll_p", 3200000, false},
191 { "i2c4", "pll_p", 3200000, false},
192 { "i2c5", "pll_p", 3200000, false},
193 { "sbc1", "pll_p", 25000000, false},
194 { "sbc2", "pll_p", 25000000, false},
195 { "sbc3", "pll_p", 25000000, false},
196 { "sbc4", "pll_p", 25000000, false},
197 { "sbc5", "pll_p", 25000000, false},
198 { "sbc6", "pll_p", 25000000, false},
199 { "uarta", "pll_p", 408000000, false},
200 { "uartb", "pll_p", 408000000, false},
201 { "uartc", "pll_p", 408000000, false},
202 { "uartd", "pll_p", 408000000, false},
206 static struct i2c_hid_platform_data i2c_keyboard_pdata = {
207 .hid_descriptor_address = 0x0,
210 static struct i2c_board_info __initdata i2c_keyboard_board_info = {
211 I2C_BOARD_INFO("hid", 0x3B),
212 .platform_data = &i2c_keyboard_pdata,
215 static struct i2c_hid_platform_data i2c_touchpad_pdata = {
216 .hid_descriptor_address = 0x20,
219 static struct i2c_board_info __initdata i2c_touchpad_board_info = {
220 I2C_BOARD_INFO("hid", 0x2C),
221 .platform_data = &i2c_touchpad_pdata,
224 static void ardbeg_i2c_init(void)
226 struct board_info board_info;
227 tegra_get_board_info(&board_info);
229 if (board_info.board_id == BOARD_PM374) {
230 i2c_register_board_info(0, &max98090_board_info, 1);
231 } else if (board_info.board_id != BOARD_PM359)
232 i2c_register_board_info(0, &rt5639_board_info, 1);
234 if (board_info.board_id == BOARD_PM359 ||
235 board_info.board_id == BOARD_PM358 ||
236 board_info.board_id == BOARD_PM363 ||
237 board_info.board_id == BOARD_PM374) {
238 i2c_keyboard_board_info.irq = gpio_to_irq(I2C_KB_IRQ);
239 i2c_register_board_info(1, &i2c_keyboard_board_info , 1);
241 i2c_touchpad_board_info.irq = gpio_to_irq(I2C_TP_IRQ);
242 i2c_register_board_info(1, &i2c_touchpad_board_info , 1);
246 #ifndef CONFIG_USE_OF
247 static struct platform_device *ardbeg_uart_devices[] __initdata = {
253 static struct tegra_serial_platform_data ardbeg_uarta_pdata = {
254 .dma_req_selector = 8,
255 .modem_interrupt = false,
258 static struct tegra_serial_platform_data ardbeg_uartb_pdata = {
259 .dma_req_selector = 9,
260 .modem_interrupt = false,
263 static struct tegra_serial_platform_data ardbeg_uartc_pdata = {
264 .dma_req_selector = 10,
265 .modem_interrupt = false,
269 static struct tegra_serial_platform_data ardbeg_uartd_pdata = {
270 .dma_req_selector = 19,
271 .modem_interrupt = false,
274 static struct tegra_asoc_platform_data ardbeg_audio_pdata_rt5639 = {
275 .gpio_hp_det = TEGRA_GPIO_HP_DET,
276 .gpio_ldo1_en = TEGRA_GPIO_LDO_EN,
278 .gpio_int_mic_en = -1,
279 .gpio_ext_mic_en = -1,
284 .i2s_param[HIFI_CODEC] = {
287 .i2s_mode = TEGRA_DAIFMT_I2S,
292 .i2s_param[BT_SCO] = {
295 .i2s_mode = TEGRA_DAIFMT_DSP_A,
297 .i2s_param[BASEBAND] = {
300 .i2s_mode = TEGRA_DAIFMT_I2S,
308 static struct tegra_asoc_platform_data norrin_audio_pdata_max98090 = {
309 .gpio_hp_det = NORRIN_GPIO_HP_DET,
310 .gpio_ext_mic_en = TEGRA_GPIO_HP_DET,
313 .edp_states = {1080, 842, 0},
314 .i2s_param[HIFI_CODEC] = {
317 .i2s_mode = TEGRA_DAIFMT_I2S,
322 .i2s_param[BT_SCO] = {
325 .i2s_mode = TEGRA_DAIFMT_DSP_A,
332 static void ardbeg_audio_init(void)
334 struct board_info board_info;
335 tegra_get_board_info(&board_info);
336 if (board_info.board_id == BOARD_PM359 ||
337 board_info.board_id == BOARD_PM358 ||
338 board_info.board_id == BOARD_PM370 ||
339 board_info.board_id == BOARD_PM374 ||
340 board_info.board_id == BOARD_PM375 ||
341 board_info.board_id == BOARD_PM363) {
343 ardbeg_audio_pdata_rt5639.gpio_hp_det = TEGRA_GPIO_HP_DET;
344 ardbeg_audio_pdata_rt5639.gpio_hp_det_active_high = 1;
345 if (board_info.board_id != BOARD_PM363)
346 ardbeg_audio_pdata_rt5639.gpio_ldo1_en = -1;
350 if (board_info.board_id == BOARD_E1762 ||
351 board_info.board_id == BOARD_P1761 ||
352 board_info.board_id == BOARD_E1922) {
353 ardbeg_audio_pdata_rt5639.gpio_hp_det =
355 ardbeg_audio_pdata_rt5639.use_codec_jd_irq = true;
357 ardbeg_audio_pdata_rt5639.gpio_hp_det =
359 ardbeg_audio_pdata_rt5639.use_codec_jd_irq = false;
361 ardbeg_audio_pdata_rt5639.gpio_hp_det_active_high = 0;
362 ardbeg_audio_pdata_rt5639.gpio_ldo1_en = TEGRA_GPIO_LDO_EN;
365 if (board_info.board_id == BOARD_E1971) {
366 ardbeg_audio_pdata_rt5639.gpio_hp_det = TEGRA_GPIO_CDC_IRQ;
367 ardbeg_audio_pdata_rt5639.use_codec_jd_irq = true;
368 ardbeg_audio_pdata_rt5639.gpio_hp_det_active_high = 0;
369 ardbeg_audio_pdata_rt5639.gpio_ldo1_en = TEGRA_GPIO_LDO_EN;
372 ardbeg_audio_pdata_rt5639.codec_name = "rt5639.0-001c";
373 ardbeg_audio_pdata_rt5639.codec_dai_name = "rt5639-aif1";
375 norrin_audio_pdata_max98090.codec_name = "max98090.0-0010";
376 norrin_audio_pdata_max98090.codec_dai_name = "HiFi";
379 static struct platform_device ardbeg_audio_device_rt5639 = {
380 .name = "tegra-snd-rt5639",
383 .platform_data = &ardbeg_audio_pdata_rt5639,
387 static struct platform_device norrin_audio_device_max98090 = {
388 .name = "tegra-snd-max98090",
391 .platform_data = &norrin_audio_pdata_max98090,
395 static void __init ardbeg_uart_init(void)
398 #ifndef CONFIG_USE_OF
399 tegra_uarta_device.dev.platform_data = &ardbeg_uarta_pdata;
400 tegra_uartb_device.dev.platform_data = &ardbeg_uartb_pdata;
401 tegra_uartc_device.dev.platform_data = &ardbeg_uartc_pdata;
402 platform_add_devices(ardbeg_uart_devices,
403 ARRAY_SIZE(ardbeg_uart_devices));
405 tegra_uartd_device.dev.platform_data = &ardbeg_uartd_pdata;
406 if (!is_tegra_debug_uartport_hs()) {
407 int debug_port_id = uart_console_debug_init(3);
408 if (debug_port_id < 0)
411 #ifdef CONFIG_TEGRA_FIQ_DEBUGGER
412 tegra_serial_debug_init(TEGRA_UARTD_BASE, INT_WDT_CPU, NULL, -1, -1);
414 platform_device_register(uart_console_debug_device);
417 tegra_uartd_device.dev.platform_data = &ardbeg_uartd_pdata;
418 platform_device_register(&tegra_uartd_device);
422 static struct resource tegra_rtc_resources[] = {
424 .start = TEGRA_RTC_BASE,
425 .end = TEGRA_RTC_BASE + TEGRA_RTC_SIZE - 1,
426 .flags = IORESOURCE_MEM,
431 .flags = IORESOURCE_IRQ,
435 static struct platform_device tegra_rtc_device = {
438 .resource = tegra_rtc_resources,
439 .num_resources = ARRAY_SIZE(tegra_rtc_resources),
442 static struct platform_device *ardbeg_devices[] __initdata = {
445 #if defined(CONFIG_TEGRA_WAKEUP_MONITOR)
446 &tegratab_tegra_wakeup_monitor_device,
449 #if defined(CONFIG_TEGRA_WATCHDOG)
452 #if defined(CONFIG_TEGRA_AVP)
455 #if defined(CONFIG_CRYPTO_DEV_TEGRA_SE) && !defined(CONFIG_USE_OF)
468 &bluetooth_dit_device,
469 &baseband_dit_device,
471 &tegra_offload_device,
472 &tegra30_avp_audio_device,
473 #if defined(CONFIG_CRYPTO_DEV_TEGRA_AES)
476 &tegra_hier_ictlr_device,
479 static struct tegra_usb_platform_data tegra_udc_pdata = {
482 .unaligned_dma_buf_supported = false,
483 .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
484 .op_mode = TEGRA_USB_OPMODE_DEVICE,
488 .charging_supported = true,
489 .remote_wakeup_supported = false,
492 .hssync_start_delay = 0,
494 .idle_wait_delay = 17,
499 .xcvr_setup_offset = 0,
504 static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
507 .unaligned_dma_buf_supported = true,
508 .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
509 .op_mode = TEGRA_USB_OPMODE_HOST,
513 .remote_wakeup_supported = true,
514 .power_off_on_suspend = true,
517 .hssync_start_delay = 0,
519 .idle_wait_delay = 17,
524 .xcvr_setup_offset = 0,
527 .xcvr_hsslew_lsb = 2,
531 static struct tegra_usb_platform_data tegra_ehci2_utmi_pdata = {
534 .unaligned_dma_buf_supported = true,
535 .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
536 .op_mode = TEGRA_USB_OPMODE_HOST,
540 .remote_wakeup_supported = true,
541 .power_off_on_suspend = true,
544 .hssync_start_delay = 0,
546 .idle_wait_delay = 17,
551 .xcvr_setup_offset = 0,
557 static struct tegra_usb_platform_data tegra_ehci3_utmi_pdata = {
560 .unaligned_dma_buf_supported = true,
561 .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
562 .op_mode = TEGRA_USB_OPMODE_HOST,
566 .remote_wakeup_supported = true,
567 .power_off_on_suspend = true,
570 .hssync_start_delay = 0,
572 .idle_wait_delay = 17,
577 .xcvr_setup_offset = 0,
583 static struct gpio modem_gpios[] = { /* Bruce modem */
584 {MODEM_EN, GPIOF_OUT_INIT_HIGH, "MODEM EN"},
585 {MDM_RST, GPIOF_OUT_INIT_LOW, "MODEM RESET"},
586 {MDM_SAR0, GPIOF_OUT_INIT_LOW, "MODEM SAR0"},
589 static struct tegra_usb_platform_data tegra_ehci2_hsic_baseband_pdata = {
592 .unaligned_dma_buf_supported = true,
593 .phy_intf = TEGRA_USB_PHY_INTF_HSIC,
594 .op_mode = TEGRA_USB_OPMODE_HOST,
598 .remote_wakeup_supported = true,
599 .power_off_on_suspend = true,
603 static struct tegra_usb_platform_data tegra_ehci2_hsic_smsc_hub_pdata = {
606 .unaligned_dma_buf_supported = true,
607 .phy_intf = TEGRA_USB_PHY_INTF_HSIC,
608 .op_mode = TEGRA_USB_OPMODE_HOST,
612 .remote_wakeup_supported = true,
613 .power_off_on_suspend = true,
618 static struct tegra_usb_otg_data tegra_otg_pdata = {
619 .ehci_device = &tegra_ehci1_device,
620 .ehci_pdata = &tegra_ehci1_utmi_pdata,
623 static void ardbeg_usb_init(void)
625 int usb_port_owner_info = tegra_get_usb_port_owner_info();
626 int modem_id = tegra_get_modem_id();
627 struct board_info bi;
628 tegra_get_pmu_board_info(&bi);
630 if (board_info.sku == 1100 || board_info.board_id == BOARD_P1761 ||
631 board_info.board_id == BOARD_E1784)
632 tegra_ehci1_utmi_pdata.u_data.host.turn_off_vbus_on_lp0 = true;
634 if (board_info.board_id == BOARD_PM359 ||
635 board_info.board_id == BOARD_PM358 ||
636 board_info.board_id == BOARD_PM370 ||
637 board_info.board_id == BOARD_PM374 ||
638 board_info.board_id == BOARD_PM375 ||
639 board_info.board_id == BOARD_PM363) {
641 /* Host cable is detected through AMS PMU Interrupt */
642 tegra_udc_pdata.id_det_type = TEGRA_USB_PMU_ID;
643 tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_PMU_ID;
644 tegra_ehci1_utmi_pdata.id_extcon_dev_name = "as3722-extcon";
649 * TN8 supports vbus changing and it can handle
650 * vbus voltages larger then 5V. Enable this.
652 if (board_info.board_id == BOARD_P1761 ||
653 board_info.board_id == BOARD_E1784 ||
654 board_info.board_id == BOARD_E1780) {
657 * Set the maximum voltage that can be supplied
658 * over USB vbus that the board supports if we use
659 * a quick charge 2 wall charger.
661 tegra_udc_pdata.qc2_voltage = TEGRA_USB_QC2_9V;
662 tegra_udc_pdata.u_data.dev.qc2_current_limit_ma = 1200;
664 /* charger needs to be set to 2A - h/w will do 1.8A */
665 tegra_udc_pdata.u_data.dev.dcp_current_limit_ma = 2000;
668 switch (bi.board_id) {
670 /* Host cable is detected through PMU Interrupt */
671 tegra_udc_pdata.id_det_type = TEGRA_USB_PMU_ID;
672 tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_PMU_ID;
673 tegra_ehci1_utmi_pdata.id_extcon_dev_name =
681 /* Device cable is detected through PMU Interrupt */
682 tegra_udc_pdata.support_pmu_vbus = true;
683 tegra_udc_pdata.vbus_extcon_dev_name = "palmas-extcon";
684 tegra_ehci1_utmi_pdata.support_pmu_vbus = true;
685 tegra_ehci1_utmi_pdata.vbus_extcon_dev_name =
687 /* Host cable is detected through PMU Interrupt */
688 tegra_udc_pdata.id_det_type = TEGRA_USB_PMU_ID;
689 tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_PMU_ID;
690 tegra_ehci1_utmi_pdata.id_extcon_dev_name =
695 if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB)) {
696 tegra_otg_pdata.is_xhci = false;
697 tegra_udc_pdata.u_data.dev.is_xhci = false;
699 tegra_otg_pdata.is_xhci = true;
700 tegra_udc_pdata.u_data.dev.is_xhci = true;
702 tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
703 platform_device_register(&tegra_otg_device);
704 /* Setup the udc platform data */
705 tegra_udc_device.dev.platform_data = &tegra_udc_pdata;
707 if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB)) {
709 if ((bi.board_id != BOARD_P1761) &&
710 (bi.board_id != BOARD_E1922) &&
711 (bi.board_id != BOARD_E1784)) {
712 tegra_ehci2_device.dev.platform_data =
713 &tegra_ehci2_utmi_pdata;
714 platform_device_register(&tegra_ehci2_device);
719 if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB)) {
720 if ((bi.board_id != BOARD_P1761) &&
721 (bi.board_id != BOARD_E1922) &&
722 (bi.board_id != BOARD_E1784)) {
723 tegra_ehci3_device.dev.platform_data =
724 &tegra_ehci3_utmi_pdata;
725 platform_device_register(&tegra_ehci3_device);
731 static struct tegra_xusb_platform_data xusb_pdata = {
732 .portmap = TEGRA_XUSB_SS_P0 | TEGRA_XUSB_USB2_P0 | TEGRA_XUSB_SS_P1 |
733 TEGRA_XUSB_USB2_P1 | TEGRA_XUSB_USB2_P2,
736 #ifdef CONFIG_TEGRA_XUSB_PLATFORM
737 static void ardbeg_xusb_init(void)
739 int usb_port_owner_info = tegra_get_usb_port_owner_info();
741 xusb_pdata.lane_owner = (u8) tegra_get_lane_owner_info();
743 if (board_info.board_id == BOARD_PM359 ||
744 board_info.board_id == BOARD_PM358 ||
745 board_info.board_id == BOARD_PM374 ||
746 board_info.board_id == BOARD_PM375 ||
747 board_info.board_id == BOARD_PM370 ||
748 board_info.board_id == BOARD_PM363) {
749 if (board_info.board_id == BOARD_PM374 ||
750 board_info.board_id == BOARD_PM370)
751 pr_info("Norrin. 0x%x\n", board_info.board_id);
753 pr_info("Laguna. 0x%x\n", board_info.board_id);
755 if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB))
756 xusb_pdata.portmap &= ~(TEGRA_XUSB_USB2_P0 |
759 if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB))
760 xusb_pdata.portmap &= ~(TEGRA_XUSB_USB2_P1 |
761 TEGRA_XUSB_SS_P1 | TEGRA_XUSB_USB2_P2);
763 /* FIXME Add for UTMIP2 when have odmdata assigend */
766 if (board_info.board_id == BOARD_E1781) {
767 pr_info("Shield ERS-S. 0x%x\n", board_info.board_id);
769 if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB))
770 xusb_pdata.portmap &= ~(TEGRA_XUSB_USB2_P0);
772 if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB))
773 xusb_pdata.portmap &= ~(
774 TEGRA_XUSB_USB2_P1 | TEGRA_XUSB_SS_P0 |
775 TEGRA_XUSB_USB2_P2 | TEGRA_XUSB_SS_P1);
777 pr_info("Shield ERS 0x%x\n", board_info.board_id);
779 if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB))
780 xusb_pdata.portmap &= ~(TEGRA_XUSB_USB2_P0 |
783 if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB))
784 xusb_pdata.portmap &= ~(TEGRA_XUSB_USB2_P1 |
785 TEGRA_XUSB_USB2_P2 | TEGRA_XUSB_SS_P1);
787 /* FIXME Add for UTMIP2 when have odmdata assigend */
790 if (usb_port_owner_info & HSIC1_PORT_OWNER_XUSB)
791 xusb_pdata.portmap |= TEGRA_XUSB_HSIC_P0;
793 if (usb_port_owner_info & HSIC2_PORT_OWNER_XUSB)
794 xusb_pdata.portmap |= TEGRA_XUSB_HSIC_P1;
798 static int baseband_init(void)
802 ret = gpio_request_array(modem_gpios, ARRAY_SIZE(modem_gpios));
804 pr_warn("%s:gpio request failed\n", __func__);
808 /* enable pull-down for MDM_COLD_BOOT */
809 tegra_pinmux_set_pullupdown(TEGRA_PINGROUP_ULPI_DATA4,
810 TEGRA_PUPD_PULL_DOWN);
812 /* Release modem reset to start boot */
813 gpio_set_value(MDM_RST, 1);
815 /* export GPIO for user space access through sysfs */
816 gpio_export(MDM_RST, false);
817 gpio_export(MDM_SAR0, false);
822 static const struct tegra_modem_operations baseband_operations = {
823 .init = baseband_init,
826 static struct tegra_usb_modem_power_platform_data baseband_pdata = {
827 .ops = &baseband_operations,
828 .regulator_name = "vdd_wwan_mdm",
830 .boot_gpio = MDM_COLDBOOT,
831 .boot_irq_flags = IRQF_TRIGGER_RISING |
832 IRQF_TRIGGER_FALLING |
834 .autosuspend_delay = 2000,
835 .short_autosuspend_delay = 50,
836 .tegra_ehci_device = &tegra_ehci2_device,
837 .tegra_ehci_pdata = &tegra_ehci2_hsic_baseband_pdata,
838 .mdm_power_report_gpio = MDM_POWER_REPORT,
839 .mdm_power_irq_flags = IRQF_TRIGGER_RISING |
840 IRQF_TRIGGER_FALLING |
844 static struct platform_device icera_bruce_device = {
845 .name = "tegra_usb_modem_power",
848 .platform_data = &baseband_pdata,
852 static void ardbeg_modem_init(void)
854 int modem_id = tegra_get_modem_id();
855 struct board_info board_info;
856 struct board_info pmu_board_info;
857 int usb_port_owner_info = tegra_get_usb_port_owner_info();
859 tegra_get_board_info(&board_info);
860 tegra_get_pmu_board_info(&pmu_board_info);
861 pr_info("%s: modem_id = %d\n", __func__, modem_id);
865 if (!(usb_port_owner_info & HSIC1_PORT_OWNER_XUSB)) {
866 /* Set specific USB wake source for Ardbeg */
867 if (board_info.board_id == BOARD_E1780)
868 tegra_set_wake_source(42, INT_USB2);
869 if (pmu_board_info.board_id == BOARD_E1736 ||
870 pmu_board_info.board_id == BOARD_E1769 ||
871 pmu_board_info.board_id == BOARD_E1936)
872 baseband_pdata.regulator_name = NULL;
873 platform_device_register(&icera_bruce_device);
876 case TEGRA_BB_HSIC_HUB: /* HSIC hub */
877 if (!(usb_port_owner_info & HSIC1_PORT_OWNER_XUSB)) {
878 tegra_ehci2_device.dev.platform_data =
879 &tegra_ehci2_hsic_smsc_hub_pdata;
880 /* Set specific USB wake source for Ardbeg */
881 if (board_info.board_id == BOARD_E1780)
882 tegra_set_wake_source(42, INT_USB2);
883 platform_device_register(&tegra_ehci2_device);
885 xusb_pdata.pretend_connect_0 = true;
893 static struct of_dev_auxdata ardbeg_auxdata_lookup[] __initdata = {
894 T124_SPI_OF_DEV_AUXDATA,
895 OF_DEV_AUXDATA("nvidia,tegra124-apbdma", 0x60020000, "tegra-apbdma",
897 OF_DEV_AUXDATA("nvidia,tegra124-se", 0x70012000, "tegra12-se", NULL),
898 OF_DEV_AUXDATA("nvidia,tegra124-host1x", TEGRA_HOST1X_BASE, "host1x",
900 OF_DEV_AUXDATA("nvidia,tegra124-gk20a", TEGRA_GK20A_BAR0_BASE,
902 #ifdef CONFIG_ARCH_TEGRA_VIC
903 OF_DEV_AUXDATA("nvidia,tegra124-vic", TEGRA_VIC_BASE, "vic03.0", NULL),
905 OF_DEV_AUXDATA("nvidia,tegra124-msenc", TEGRA_MSENC_BASE, "msenc",
907 OF_DEV_AUXDATA("nvidia,tegra124-vi", TEGRA_VI_BASE, "vi.0", NULL),
908 OF_DEV_AUXDATA("nvidia,tegra124-isp", TEGRA_ISP_BASE, "isp.0", NULL),
909 OF_DEV_AUXDATA("nvidia,tegra124-isp", TEGRA_ISPB_BASE, "isp.1", NULL),
910 OF_DEV_AUXDATA("nvidia,tegra124-tsec", TEGRA_TSEC_BASE, "tsec", NULL),
911 OF_DEV_AUXDATA("nvidia,tegra114-hsuart", 0x70006000, "serial-tegra.0",
913 OF_DEV_AUXDATA("nvidia,tegra114-hsuart", 0x70006040, "serial-tegra.1",
915 OF_DEV_AUXDATA("nvidia,tegra114-hsuart", 0x70006200, "serial-tegra.2",
917 T124_I2C_OF_DEV_AUXDATA,
918 OF_DEV_AUXDATA("nvidia,tegra124-xhci", 0x70090000, "tegra-xhci",
920 OF_DEV_AUXDATA("nvidia,tegra124-dc", TEGRA_DISPLAY_BASE, "tegradc.0",
922 OF_DEV_AUXDATA("nvidia,tegra124-dc", TEGRA_DISPLAY2_BASE, "tegradc.1",
924 OF_DEV_AUXDATA("nvidia,tegra124-nvavp", 0x60001000, "nvavp",
926 OF_DEV_AUXDATA("nvidia,tegra124-pwm", 0x7000a000, "tegra-pwm", NULL),
927 OF_DEV_AUXDATA("nvidia,tegra124-dfll", 0x70110000, "tegra_cl_dvfs",
929 OF_DEV_AUXDATA("nvidia,tegra132-dfll", 0x70040084, "tegra_cl_dvfs",
931 OF_DEV_AUXDATA("nvidia,tegra124-efuse", TEGRA_FUSE_BASE, "tegra-fuse",
933 OF_DEV_AUXDATA("nvidia,tegra124-camera", 0, "pcl-generic",
935 OF_DEV_AUXDATA("nvidia,tegra114-ahci-sata", 0x70027000, "tegra-sata.0",
941 struct maxim_sti_pdata maxim_sti_pdata = {
942 .touch_fusion = "/vendor/bin/touch_fusion",
943 .config_file = "/vendor/firmware/touch_fusion.cfg",
944 .fw_name = "maxim_fp35.bin",
945 .nl_family = TF_FAMILY_NAME,
947 .chip_access_method = 2,
948 .default_reset_state = 0,
951 .gpio_reset = TOUCH_GPIO_RST_MAXIM_STI_SPI,
952 .gpio_irq = TOUCH_GPIO_IRQ_MAXIM_STI_SPI
955 struct maxim_sti_pdata maxim_sti_pdata_rd = {
956 .touch_fusion = "/vendor/bin/touch_fusion_rd",
957 .config_file = "/vendor/firmware/touch_fusion.cfg",
958 .fw_name = "maxim_fp35.bin",
959 .nl_family = TF_FAMILY_NAME,
961 .chip_access_method = 2,
962 .default_reset_state = 0,
965 .gpio_reset = TOUCH_GPIO_RST_MAXIM_STI_SPI,
966 .gpio_irq = TOUCH_GPIO_IRQ_MAXIM_STI_SPI
969 static struct tegra_spi_device_controller_data maxim_dev_cdata = {
970 .rx_clk_tap_delay = 0,
971 .is_hw_based_cs = true,
972 .tx_clk_tap_delay = 0,
975 struct spi_board_info maxim_sti_spi_board = {
976 .modalias = MAXIM_STI_NAME,
977 .bus_num = TOUCH_SPI_ID,
978 .chip_select = TOUCH_SPI_CS,
979 .max_speed_hz = 12 * 1000 * 1000,
981 .platform_data = &maxim_sti_pdata,
982 .controller_data = &maxim_dev_cdata,
985 static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
986 /* name parent rate enabled */
987 { "extern2", "pll_p", 41000000, false},
988 { "clk_out_2", "extern2", 40800000, false},
992 static struct rm_spi_ts_platform_data rm31080ts_ardbeg_data = {
993 .gpio_reset = TOUCH_GPIO_RST_RAYDIUM_SPI,
995 .platform_id = RM_PLATFORM_A010,
996 .name_of_clock = "clk_out_2",
997 .name_of_clock_con = "extern2",
1000 static struct rm_spi_ts_platform_data rm31080ts_tn8_data = {
1001 .gpio_reset = TOUCH_GPIO_RST_RAYDIUM_SPI,
1003 .platform_id = RM_PLATFORM_T008,
1004 .name_of_clock = "clk_out_2",
1005 .name_of_clock_con = "extern2",
1008 static struct rm_spi_ts_platform_data rm31080ts_norrin_data = {
1009 .gpio_reset = TOUCH_GPIO_RST_RAYDIUM_SPI,
1011 .platform_id = RM_PLATFORM_P140,
1012 .name_of_clock = "clk_out_2",
1013 .name_of_clock_con = "extern2",
1016 struct rm_spi_ts_platform_data rm31080ts_t132loki_data = {
1017 .gpio_reset = TOUCH_GPIO_RST_RAYDIUM_SPI,
1019 .platform_id = RM_PLATFORM_L005,
1020 .name_of_clock = "clk_out_2",
1021 .name_of_clock_con = "extern2",
1024 struct rm_spi_ts_platform_data rm31080ts_t132loki_data_jdi_5 = {
1025 .gpio_reset = TOUCH_GPIO_RST_RAYDIUM_SPI,
1027 .platform_id = RM_PLATFORM_L005,
1028 .name_of_clock = "clk_out_2",
1029 .name_of_clock_con = "extern2",
1030 .gpio_sensor_select0 = false,
1031 .gpio_sensor_select1 = true,
1033 static struct tegra_spi_device_controller_data dev_cdata = {
1034 .rx_clk_tap_delay = 0,
1035 .tx_clk_tap_delay = 16,
1038 static struct spi_board_info rm31080a_ardbeg_spi_board[1] = {
1040 .modalias = "rm_ts_spidev",
1041 .bus_num = TOUCH_SPI_ID,
1042 .chip_select = TOUCH_SPI_CS,
1043 .max_speed_hz = 12 * 1000 * 1000,
1045 .controller_data = &dev_cdata,
1046 .platform_data = &rm31080ts_ardbeg_data,
1050 static struct spi_board_info rm31080a_tn8_spi_board[1] = {
1052 .modalias = "rm_ts_spidev",
1053 .bus_num = TOUCH_SPI_ID,
1054 .chip_select = TOUCH_SPI_CS,
1055 .max_speed_hz = 12 * 1000 * 1000,
1057 .controller_data = &dev_cdata,
1058 .platform_data = &rm31080ts_tn8_data,
1062 static struct spi_board_info rm31080a_norrin_spi_board[1] = {
1064 .modalias = "rm_ts_spidev",
1065 .bus_num = NORRIN_TOUCH_SPI_ID,
1066 .chip_select = NORRIN_TOUCH_SPI_CS,
1067 .max_speed_hz = 12 * 1000 * 1000,
1069 .controller_data = &dev_cdata,
1070 .platform_data = &rm31080ts_norrin_data,
1074 static int __init ardbeg_touch_init(void)
1076 tegra_get_board_info(&board_info);
1078 if (tegra_get_touch_vendor_id() == MAXIM_TOUCH) {
1079 pr_info("%s init maxim touch\n", __func__);
1080 #if defined(CONFIG_TOUCHSCREEN_MAXIM_STI) || \
1081 defined(CONFIG_TOUCHSCREEN_MAXIM_STI_MODULE)
1082 if (tegra_get_touch_panel_id() == TOUCHPANEL_TN7)
1083 maxim_sti_spi_board.platform_data = &maxim_sti_pdata_rd;
1084 (void)touch_init_maxim_sti(&maxim_sti_spi_board);
1086 } else if (tegra_get_touch_vendor_id() == RAYDIUM_TOUCH) {
1087 pr_info("%s init raydium touch\n", __func__);
1088 tegra_clk_init_from_table(touch_clk_init_table);
1089 if (board_info.board_id == BOARD_PM374) {
1090 rm31080a_norrin_spi_board[0].irq =
1091 gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
1092 touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
1093 TOUCH_GPIO_RST_RAYDIUM_SPI,
1094 &rm31080ts_norrin_data,
1095 &rm31080a_norrin_spi_board[0],
1096 ARRAY_SIZE(rm31080a_norrin_spi_board));
1097 } else if ((board_info.board_id == BOARD_P2530) ||
1098 (board_info.board_id == BOARD_E2548)) {
1099 if (board_info.sku == BOARD_SKU_FOSTER)
1101 if (tegra_get_touch_panel_id() == TOUCHPANEL_LOKI_JDI5)
1102 rm31080a_ardbeg_spi_board[0].platform_data =
1103 &rm31080ts_t132loki_data_jdi_5;
1105 rm31080a_ardbeg_spi_board[0].platform_data =
1106 &rm31080ts_t132loki_data;
1107 if (board_info.fab >= 0xa3) {
1108 rm31080ts_t132loki_data.name_of_clock = NULL;
1109 rm31080ts_t132loki_data.name_of_clock_con = NULL;
1111 tegra_clk_init_from_table(touch_clk_init_table);
1112 rm31080a_ardbeg_spi_board[0].irq =
1113 gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
1114 touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
1115 TOUCH_GPIO_RST_RAYDIUM_SPI,
1116 &rm31080ts_t132loki_data,
1117 &rm31080a_ardbeg_spi_board[0],
1118 ARRAY_SIZE(rm31080a_ardbeg_spi_board));
1119 } else if (board_info.board_id == BOARD_P1761) {
1120 rm31080a_ardbeg_spi_board[0].irq =
1121 gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
1122 touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
1123 TOUCH_GPIO_RST_RAYDIUM_SPI,
1124 &rm31080ts_tn8_data,
1125 &rm31080a_tn8_spi_board[0],
1126 ARRAY_SIZE(rm31080a_tn8_spi_board));
1128 rm31080a_ardbeg_spi_board[0].irq =
1129 gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
1130 touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
1131 TOUCH_GPIO_RST_RAYDIUM_SPI,
1132 &rm31080ts_ardbeg_data,
1133 &rm31080a_ardbeg_spi_board[0],
1134 ARRAY_SIZE(rm31080a_ardbeg_spi_board));
1140 static void __init ardbeg_sysedp_init(void)
1142 struct board_info bi;
1144 tegra_get_board_info(&bi);
1146 switch (bi.board_id) {
1148 if (bi.sku == 1100) {
1149 tn8_new_sysedp_init();
1152 shield_new_sysedp_init();
1158 tn8_new_sysedp_init();
1168 static void __init ardbeg_sysedp_dynamic_capping_init(void)
1170 struct board_info bi;
1172 tegra_get_board_info(&bi);
1174 switch (bi.board_id) {
1177 tn8_sysedp_dynamic_capping_init();
1179 shield_sysedp_dynamic_capping_init();
1185 tn8_sysedp_dynamic_capping_init();
1195 static void __init ardbeg_sysedp_batmon_init(void)
1197 struct board_info bi;
1199 if (!IS_ENABLED(CONFIG_SYSEDP_FRAMEWORK))
1202 tegra_get_board_info(&bi);
1204 switch (bi.board_id) {
1207 shield_sysedp_batmon_init();
1219 static void __init edp_init(void)
1221 struct board_info bi;
1223 tegra_get_board_info(&bi);
1225 switch (bi.board_id) {
1250 static void __init tegra_ardbeg_early_init(void)
1252 ardbeg_sysedp_init();
1253 tegra_clk_init_from_table(ardbeg_clk_init_table);
1254 tegra_clk_verify_parents();
1255 if (of_machine_is_compatible("nvidia,laguna"))
1256 tegra_soc_device_init("laguna");
1257 else if (of_machine_is_compatible("nvidia,tn8"))
1258 tegra_soc_device_init("tn8");
1259 else if (of_machine_is_compatible("nvidia,ardbeg_sata"))
1260 tegra_soc_device_init("ardbeg_sata");
1261 else if (of_machine_is_compatible("nvidia,norrin"))
1262 tegra_soc_device_init("norrin");
1263 else if (of_machine_is_compatible("nvidia,bowmore"))
1264 tegra_soc_device_init("bowmore");
1265 else if (of_machine_is_compatible("nvidia,t132loki"))
1266 tegra_soc_device_init("t132loki");
1268 tegra_soc_device_init("ardbeg");
1271 static struct tegra_dtv_platform_data ardbeg_dtv_pdata = {
1272 .dma_req_selector = 11,
1275 static void __init ardbeg_dtv_init(void)
1277 tegra_dtv_device.dev.platform_data = &ardbeg_dtv_pdata;
1278 platform_device_register(&tegra_dtv_device);
1281 static struct tegra_io_dpd pexbias_io = {
1283 .io_dpd_reg_index = 0,
1286 static struct tegra_io_dpd pexclk1_io = {
1288 .io_dpd_reg_index = 0,
1291 static struct tegra_io_dpd pexclk2_io = {
1293 .io_dpd_reg_index = 0,
1297 static void __init tegra_ardbeg_late_init(void)
1299 struct board_info board_info;
1300 tegra_get_board_info(&board_info);
1301 pr_info("board_info: id:sku:fab:major:minor = 0x%04x:0x%04x:0x%02x:0x%02x:0x%02x\n",
1302 board_info.board_id, board_info.sku,
1303 board_info.fab, board_info.major_revision,
1304 board_info.minor_revision);
1306 if (board_info.board_id == BOARD_E2548 ||
1307 board_info.board_id == BOARD_P2530)
1309 #ifndef CONFIG_MACH_EXUMA
1310 ardbeg_display_init();
1314 ardbeg_modem_init();
1315 #ifdef CONFIG_TEGRA_XUSB_PLATFORM
1319 ardbeg_audio_init();
1320 platform_add_devices(ardbeg_devices, ARRAY_SIZE(ardbeg_devices));
1321 if (board_info.board_id == BOARD_PM374) /* Norrin ERS */
1322 platform_device_register(&norrin_audio_device_max98090);
1323 else if (board_info.board_id != BOARD_PM359)
1324 platform_device_register(&ardbeg_audio_device_rt5639);
1325 tegra_io_dpd_init();
1326 if (board_info.board_id == BOARD_E2548 ||
1327 board_info.board_id == BOARD_P2530)
1330 ardbeg_sdhci_init();
1331 if (board_info.board_id == BOARD_PM359 ||
1332 board_info.board_id == BOARD_PM358 ||
1333 board_info.board_id == BOARD_PM370 ||
1334 board_info.board_id == BOARD_PM363)
1335 laguna_regulator_init();
1336 else if (board_info.board_id == BOARD_PM374)
1337 norrin_regulator_init();
1338 else if (board_info.board_id == BOARD_E2548 ||
1339 board_info.board_id == BOARD_P2530)
1340 loki_regulator_init();
1342 ardbeg_regulator_init();
1344 ardbeg_suspend_init();
1346 if ((board_info.board_id == BOARD_PM374) ||
1347 (board_info.board_id == BOARD_E1971) ||
1348 (board_info.board_id == BOARD_E1973))
1350 else if (board_info.board_id == BOARD_E2548 ||
1351 board_info.board_id == BOARD_P2530)
1358 ardbeg_touch_init();
1359 if (board_info.board_id == BOARD_E2548 ||
1360 board_info.board_id == BOARD_P2530)
1363 ardbeg_panel_init();
1365 /* put PEX pads into DPD mode to save additional power */
1366 tegra_io_dpd_enable(&pexbias_io);
1367 tegra_io_dpd_enable(&pexclk1_io);
1368 tegra_io_dpd_enable(&pexclk2_io);
1370 if (board_info.board_id == BOARD_E2548 ||
1371 board_info.board_id == BOARD_P2530)
1374 #ifdef CONFIG_TEGRA_WDT_RECOVERY
1375 tegra_wdt_recovery_init();
1379 if (board_info.board_id == BOARD_PM374 ||
1380 board_info.board_id == BOARD_PM359 ||
1381 board_info.board_id == BOARD_PM358 ||
1382 board_info.board_id == BOARD_PM370 ||
1383 board_info.board_id == BOARD_PM375 ||
1384 board_info.board_id == BOARD_PM363) {
1385 ardbeg_sensors_init();
1386 norrin_soctherm_init();
1387 } else if (board_info.board_id == BOARD_E2548 ||
1388 board_info.board_id == BOARD_P2530) {
1389 loki_sensors_init();
1391 loki_soctherm_init();
1393 ardbeg_sensors_init();
1394 ardbeg_soctherm_init();
1397 ardbeg_setup_bluedroid_pm();
1398 ardbeg_sysedp_dynamic_capping_init();
1399 ardbeg_sysedp_batmon_init();
1402 static void __init tegra_ardbeg_init_early(void)
1404 tegra_get_board_info(&board_info);
1405 if (board_info.board_id == BOARD_E2548 ||
1406 board_info.board_id == BOARD_P2530)
1407 loki_rail_alignment_init();
1409 ardbeg_rail_alignment_init();
1410 tegra12x_init_early();
1413 static void __init tegra_ardbeg_dt_init(void)
1415 tegra_get_board_info(&board_info);
1416 tegra_get_display_board_info(&display_board_info);
1418 tegra_ardbeg_early_init();
1419 #ifdef CONFIG_NVMAP_USE_CMA_FOR_CARVEOUT
1420 carveout_linear_set(&tegra_generic_cma_dev);
1421 carveout_linear_set(&tegra_vpr_cma_dev);
1423 #ifdef CONFIG_USE_OF
1424 ardbeg_camera_auxdata(ardbeg_auxdata_lookup);
1425 of_platform_populate(NULL,
1426 of_default_bus_match_table, ardbeg_auxdata_lookup,
1430 tegra_ardbeg_late_init();
1433 static void __init tegra_ardbeg_reserve(void)
1435 #if defined(CONFIG_NVMAP_CONVERT_CARVEOUT_TO_IOVMM) || \
1436 defined(CONFIG_TEGRA_NO_CARVEOUT)
1437 /* 1920*1200*4*2 = 18432000 bytes */
1438 tegra_reserve4(0, SZ_16M + SZ_2M, SZ_16M, 186 * SZ_1M);
1440 tegra_reserve4(SZ_1G, SZ_16M + SZ_2M, SZ_4M, 186 * SZ_1M);
1444 static const char * const ardbeg_dt_board_compat[] = {
1449 static const char * const laguna_dt_board_compat[] = {
1454 static const char * const tn8_dt_board_compat[] = {
1459 static const char * const ardbeg_sata_dt_board_compat[] = {
1460 "nvidia,ardbeg_sata",
1464 static const char * const norrin_dt_board_compat[] = {
1469 static const char * const bowmore_dt_board_compat[] = {
1474 static const char * const loki_dt_board_compat[] = {
1479 #ifdef CONFIG_ARCH_TEGRA_13x_SOC
1480 DT_MACHINE_START(LOKI, "t132loki")
1481 .atag_offset = 0x100,
1482 .smp = smp_ops(tegra_smp_ops),
1483 .map_io = tegra_map_common_io,
1484 .reserve = tegra_ardbeg_reserve,
1485 .init_early = tegra_ardbeg_init_early,
1486 .init_irq = irqchip_init,
1487 .init_time = clocksource_of_init,
1488 .init_machine = tegra_ardbeg_dt_init,
1489 .restart = tegra_assert_system_reset,
1490 .dt_compat = loki_dt_board_compat,
1491 .init_late = tegra_init_late
1495 DT_MACHINE_START(LAGUNA, "laguna")
1496 .atag_offset = 0x100,
1497 .smp = smp_ops(tegra_smp_ops),
1498 .map_io = tegra_map_common_io,
1499 .reserve = tegra_ardbeg_reserve,
1500 .init_early = tegra_ardbeg_init_early,
1501 .init_irq = irqchip_init,
1502 .init_time = clocksource_of_init,
1503 .init_machine = tegra_ardbeg_dt_init,
1504 .restart = tegra_assert_system_reset,
1505 .dt_compat = laguna_dt_board_compat,
1506 .init_late = tegra_init_late
1509 DT_MACHINE_START(TN8, "tn8")
1510 .atag_offset = 0x100,
1511 .smp = smp_ops(tegra_smp_ops),
1512 .map_io = tegra_map_common_io,
1513 .reserve = tegra_ardbeg_reserve,
1514 .init_early = tegra_ardbeg_init_early,
1515 .init_irq = irqchip_init,
1516 .init_time = clocksource_of_init,
1517 .init_machine = tegra_ardbeg_dt_init,
1518 .restart = tegra_assert_system_reset,
1519 .dt_compat = tn8_dt_board_compat,
1520 .init_late = tegra_init_late
1523 DT_MACHINE_START(NORRIN, "norrin")
1524 .atag_offset = 0x100,
1525 .smp = smp_ops(tegra_smp_ops),
1526 .map_io = tegra_map_common_io,
1527 .reserve = tegra_ardbeg_reserve,
1528 .init_early = tegra_ardbeg_init_early,
1529 .init_irq = irqchip_init,
1530 .init_time = clocksource_of_init,
1531 .init_machine = tegra_ardbeg_dt_init,
1532 .restart = tegra_assert_system_reset,
1533 .dt_compat = norrin_dt_board_compat,
1534 .init_late = tegra_init_late
1537 DT_MACHINE_START(BOWMORE, "bowmore")
1538 .atag_offset = 0x100,
1539 .smp = smp_ops(tegra_smp_ops),
1540 .map_io = tegra_map_common_io,
1541 .reserve = tegra_ardbeg_reserve,
1542 .init_early = tegra_ardbeg_init_early,
1543 .init_irq = irqchip_init,
1544 .init_time = clocksource_of_init,
1545 .init_machine = tegra_ardbeg_dt_init,
1546 .restart = tegra_assert_system_reset,
1547 .dt_compat = bowmore_dt_board_compat,
1548 .init_late = tegra_init_late
1551 DT_MACHINE_START(ARDBEG, "ardbeg")
1552 .atag_offset = 0x100,
1553 .smp = smp_ops(tegra_smp_ops),
1554 .map_io = tegra_map_common_io,
1555 .reserve = tegra_ardbeg_reserve,
1556 .init_early = tegra_ardbeg_init_early,
1557 .init_irq = irqchip_init,
1558 .init_time = clocksource_of_init,
1559 .init_machine = tegra_ardbeg_dt_init,
1560 .restart = tegra_assert_system_reset,
1561 .dt_compat = ardbeg_dt_board_compat,
1562 .init_late = tegra_init_late
1565 DT_MACHINE_START(ARDBEG_SATA, "ardbeg_sata")
1566 .atag_offset = 0x100,
1567 .smp = smp_ops(tegra_smp_ops),
1568 .map_io = tegra_map_common_io,
1569 .reserve = tegra_ardbeg_reserve,
1570 .init_early = tegra_ardbeg_init_early,
1571 .init_irq = irqchip_init,
1572 .init_time = clocksource_of_init,
1573 .init_machine = tegra_ardbeg_dt_init,
1574 .restart = tegra_assert_system_reset,
1575 .dt_compat = ardbeg_sata_dt_board_compat,
1576 .init_late = tegra_init_late