ARM: DT: Add DT entry for PWMs and Backlight
[linux-3.10.git] / arch / arm / mach-tegra / board-loki.c
index ecfc61b..9ba061a 100644 (file)
 #include <linux/mfd/palmas.h>
 #include <linux/usb/tegra_usb_phy.h>
 #include <linux/clk/tegra.h>
+#include <linux/clocksource.h>
+#include <linux/platform_data/tegra_usb_modem_power.h>
+#include <linux/irqchip.h>
 
 #include <mach/irqs.h>
-#include <mach/pci.h>
 #include <mach/tegra_fiq_debugger.h>
 
 #include <mach/pinmux.h>
@@ -70,6 +72,7 @@
 #include <mach/tegra_fiq_debugger.h>
 #include <mach/xusb.h>
 #include <linux/platform_data/tegra_usb_modem_power.h>
+#include <linux/irqchip/tegra.h>
 
 #include "board-touch-raydium.h"
 #include "board.h"
@@ -78,9 +81,7 @@
 #include "board-loki.h"
 #include "devices.h"
 #include "gpio-names.h"
-#include "fuse.h"
 #include "pm.h"
-#include "pm-irq.h"
 #include "common.h"
 #include "tegra-board-id.h"
 #include "iomap.h"
@@ -302,6 +303,9 @@ static struct platform_device *loki_devices[] __initdata = {
        &tegra_pmu_device,
        &tegra_rtc_device,
        &tegra_udc_device,
+#if defined(CONFIG_TEGRA_WATCHDOG)
+       &tegra_wdt0_device,
+#endif
 #if defined(CONFIG_TEGRA_AVP)
        &tegra_avp_device,
 #endif
@@ -722,6 +726,10 @@ struct of_dev_auxdata loki_auxdata_lookup[] __initdata = {
                                NULL),
        OF_DEV_AUXDATA("nvidia,tegra124-i2c", 0x7000d100, "tegra12-i2c.5",
                                NULL),
+       OF_DEV_AUXDATA("nvidia,tegra124-pwm", TEGRA_PWFM_BASE, "tegra-pwm",
+                               NULL),
+       OF_DEV_AUXDATA("pwm-backlight", NULL, "pwm-backlight",
+                               NULL),
        {}
 };
 #endif
@@ -736,13 +744,13 @@ static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
 struct rm_spi_ts_platform_data rm31080ts_loki_data = {
        .gpio_reset = TOUCH_GPIO_RST_RAYDIUM_SPI,
        .config = 0,
-       .platform_id = RM_PLATFORM_R005,
+       .platform_id = RM_PLATFORM_L005,
        .name_of_clock = "clk_out_2",
        .name_of_clock_con = "extern2",
 };
 
 static struct tegra_spi_device_controller_data dev_cdata = {
-       .rx_clk_tap_delay = 16,
+       .rx_clk_tap_delay = 0,
        .tx_clk_tap_delay = 16,
 };
 
@@ -760,6 +768,8 @@ struct spi_board_info rm31080a_loki_spi_board[1] = {
 
 static int __init loki_touch_init(void)
 {
+       if (tegra_get_touch_panel_id() == TOUCH_PANEL_THOR_WINTEK)
+               rm31080ts_loki_data.platform_id = RM_PLATFORM_R005;
        tegra_clk_init_from_table(touch_clk_init_table);
        rm31080a_loki_spi_board[0].irq =
                gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
@@ -870,9 +880,10 @@ DT_MACHINE_START(LOKI, "loki")
        .map_io         = tegra_map_common_io,
        .reserve        = tegra_loki_reserve,
        .init_early     = tegra_loki_init_early,
-       .init_irq       = tegra_dt_init_irq,
-       .init_time      = tegra_init_timer,
+       .init_irq       = irqchip_init,
+       .init_time      = clocksource_of_init,
        .init_machine   = tegra_loki_dt_init,
        .restart        = tegra_assert_system_reset,
        .dt_compat      = loki_dt_board_compat,
+       .init_late      = tegra_init_late
 MACHINE_END