touch: raydium: Update to board files
David Jung [Mon, 29 Oct 2012 19:51:10 +0000 (12:51 -0700)]
Nvidia updates to
add names for platform id, clocks to data
descriptors. Correct 1.8V and 3.3V names
for touch screen.

Bug 1054288
Bug 1165520

Change-Id: I0ea7c63775ae64b8ec8386f5fdbe7503787a1e8f
Signed-off-by: David Jung <djung@nvidia.com>
Reviewed-on: http://git-master/r/159599
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-dalmore-power.c
arch/arm/mach-tegra/board-dalmore.c
arch/arm/mach-tegra/board-kai-power.c
arch/arm/mach-tegra/board-kai.c
arch/arm/mach-tegra/board-pluto-power.c
arch/arm/mach-tegra/board-pluto.c
include/linux/spi/rm31080a_ts.h

index 80a4e85..9fc0d42 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/board-cardhu-power.c
  *
- * Copyright (C) 2011-2012, NVIDIA Corporation. All rights reserved.
+ * Copyright (c) 2011-2012, NVIDIA Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -111,6 +111,7 @@ static struct regulator_consumer_supply tps6591x_vio_supply_0[] = {
        REGULATOR_SUPPLY("avdd_ic_usb", NULL),
        REGULATOR_SUPPLY("vlogic", "2-0068"),
        REGULATOR_SUPPLY("vdd", "1-005a"),
+       REGULATOR_SUPPLY("dvdd", "spi0.0"),
 };
 
 static struct regulator_consumer_supply tps6591x_ldo1_supply_0[] = {
@@ -603,6 +604,7 @@ static struct regulator_consumer_supply fixed_reg_en_3v3_sys_supply[] = {
        REGULATOR_SUPPLY("vdd", "4-004c"),
        REGULATOR_SUPPLY("vdd", "2-0068"),
        REGULATOR_SUPPLY("avdd", "1-005a"),
+       REGULATOR_SUPPLY("avdd", "spi0.0"),
 };
 
 /* DIS_5V_SWITCH from AP SPI2_SCK X02 */
index bff1718..1cc4b9d 100644 (file)
@@ -811,6 +811,8 @@ static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
 struct rm_spi_ts_platform_data rm31080ts_cardhu_data = {
        .gpio_reset = 0,
        .config = 0,
+       .platform_id = RM_PLATFORM_C210,
+       .name_of_clock = "clk_out_3",
 };
 
 struct spi_board_info rm31080a_cardhu_spi_board[1] = {
@@ -836,7 +838,6 @@ static int __init cardhu_touch_init(void)
                tegra_clk_init_from_table(spi_clk_init_table);
                tegra_clk_init_from_table(touch_clk_init_table);
                clk_enable(tegra_get_clock_by_name("clk_out_3"));
-               rm31080ts_cardhu_data.platform_id = CARDHU_DT_PLATFORM;
                rm31080a_cardhu_spi_board[0].irq = gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
                touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
                                        TOUCH_GPIO_RST_RAYDIUM_SPI,
index b23e997..1a35943 100644 (file)
@@ -100,7 +100,7 @@ static struct regulator_consumer_supply tps65090_fet3_supply[] = {
 
 static struct regulator_consumer_supply tps65090_fet4_supply[] = {
        REGULATOR_SUPPLY("avdd_lcd", NULL),
-       REGULATOR_SUPPLY("vdd_ts_3v3", NULL),
+       REGULATOR_SUPPLY("avdd", "spi3.2"),
 };
 
 static struct regulator_consumer_supply tps65090_fet5_supply[] = {
@@ -220,7 +220,7 @@ static struct regulator_consumer_supply max77663_sd2_supply[] = {
        REGULATOR_SUPPLY("vdd_mic_1v8", NULL),
        REGULATOR_SUPPLY("vdd_nfc_1v8", NULL),
        REGULATOR_SUPPLY("vdd_ds_1v8", NULL),
-       REGULATOR_SUPPLY("vdd_ts_1v8", NULL),
+       REGULATOR_SUPPLY("dvdd", "spi3.2"),
        REGULATOR_SUPPLY("vdd_spi_1v8", NULL),
        REGULATOR_SUPPLY("dvdd_lcd", NULL),
        REGULATOR_SUPPLY("vdd_com_1v8", NULL),
index 84e5bff..9497f1b 100644 (file)
@@ -620,14 +620,16 @@ static void __init dalmore_spi_init(void)
 
 static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
        /* name         parent          rate            enabled */
-       { "extern2",    "pll_p",        41000000,       true},
-       { "clk_out_2",  "extern2",      40800000,       true},
+       { "extern2",    "pll_p",        41000000,       false},
+       { "clk_out_2",  "extern2",      40800000,       false},
        { NULL,         NULL,           0,              0},
 };
 
 struct rm_spi_ts_platform_data rm31080ts_dalmore_data = {
        .gpio_reset = 0,
        .config = 0,
+       .platform_id = RM_PLATFORM_D010,
+       .name_of_clock = "clk_out_2",
 };
 
 static struct tegra_spi_device_controller_data dev_cdata = {
@@ -658,6 +660,7 @@ static int __init dalmore_touch_init(void)
                rm31080ts_dalmore_data.platform_id = RM_PLATFORM_P005;
        else
                rm31080ts_dalmore_data.platform_id = RM_PLATFORM_D010;
+       mdelay(20);
        rm31080a_dalmore_spi_board[0].irq = gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
        touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
                                TOUCH_GPIO_RST_RAYDIUM_SPI,
index b35549e..76c5ba5 100644 (file)
@@ -82,6 +82,7 @@ static struct regulator_consumer_supply max77663_sd2_supply[] = {
        REGULATOR_SUPPLY("vcore_nand", NULL),
        REGULATOR_SUPPLY("pwrdet_nand", NULL),
        REGULATOR_SUPPLY("vlogic", "0-0068"),
+       REGULATOR_SUPPLY("dvdd", "spi0.0"),
 };
 
 static struct regulator_consumer_supply max77663_sd3_supply[] = {
@@ -379,6 +380,7 @@ static struct regulator_consumer_supply fixed_reg_en_vdd_pnl_supply[] = {
        REGULATOR_SUPPLY("vdd_lcd_panel", NULL),
        REGULATOR_SUPPLY("vdd_touch", NULL),
        REGULATOR_SUPPLY("vddio_ts", NULL),
+       REGULATOR_SUPPLY("avdd", "spi0.0"),
 };
 
 static struct regulator_consumer_supply fixed_reg_en_cam3_ldo_supply[] = {
index 8406c02..5cad31c 100644 (file)
@@ -557,9 +557,18 @@ static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
 };
 
 
-struct rm_spi_ts_platform_data rm31080ts_kai_data = {
+struct rm_spi_ts_platform_data rm31080ts_kai_007_data = {
        .gpio_reset = 0,
        .config = 0,
+       .platform_id = RM_PLATFORM_K007,
+       .name_of_clock = NULL,
+};
+
+struct rm_spi_ts_platform_data rm31080ts_kai_107_data = {
+       .gpio_reset = 0,
+       .config = 0,
+       .platform_id = RM_PLATFORM_K107,
+       .name_of_clock = "clk_out_3",
 };
 
 struct spi_board_info rm31080a_kai_spi_board[1] = {
@@ -569,7 +578,7 @@ struct spi_board_info rm31080a_kai_spi_board[1] = {
         .chip_select = 0,
         .max_speed_hz = 13 * 1000 * 1000,
         .mode = SPI_MODE_0,
-        .platform_data = &rm31080ts_kai_data,
+        .platform_data = &rm31080ts_kai_107_data,
         },
 };
 
@@ -620,11 +629,13 @@ static int __init kai_touch_init(void)
        case 0:
                pr_info("Raydium PCB based touch init\n");
                tegra_clk_init_from_table(spi_clk_init_table);
-               rm31080ts_kai_data.platform_id = RM_PLATFORM_K007;
-               rm31080a_kai_spi_board[0].irq = gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
+               rm31080a_kai_spi_board[0].platform_data =
+                       &rm31080ts_kai_007_data;
+               rm31080a_kai_spi_board[0].irq =
+                       gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
                touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
                                        TOUCH_GPIO_RST_RAYDIUM_SPI,
-                                       &rm31080ts_kai_data,
+                                       &rm31080ts_kai_007_data,
                                        &rm31080a_kai_spi_board[0],
                                        ARRAY_SIZE(rm31080a_kai_spi_board));
                break;
@@ -633,11 +644,13 @@ static int __init kai_touch_init(void)
                tegra_clk_init_from_table(spi_clk_init_table);
                tegra_clk_init_from_table(touch_clk_init_table);
                clk_enable(tegra_get_clock_by_name("clk_out_3"));
-               rm31080ts_kai_data.platform_id = RM_PLATFORM_K107;
-               rm31080a_kai_spi_board[0].irq = gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
+               rm31080a_kai_spi_board[0].platform_data =
+                       &rm31080ts_kai_107_data;
+               rm31080a_kai_spi_board[0].irq =
+                       gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
                touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
                                        TOUCH_GPIO_RST_RAYDIUM_SPI,
-                                       &rm31080ts_kai_data,
+                                       &rm31080ts_kai_107_data,
                                        &rm31080a_kai_spi_board[0],
                                        ARRAY_SIZE(rm31080a_kai_spi_board));
                break;
index 56614f1..96ca4e4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/board-pluto-power.c
  *
- * Copyright (C) 2012 NVIDIA Corporation.
+ * Copyright (C) 2012 NVIDIA Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -103,7 +103,7 @@ static struct regulator_consumer_supply palmas_smps8_supply[] = {
        REGULATOR_SUPPLY("avdd_audio", NULL),
        REGULATOR_SUPPLY("vdd_com_1v8", NULL),
        REGULATOR_SUPPLY("vdd_bt_1v8", NULL),
-       REGULATOR_SUPPLY("vdd_ts_1v8", NULL),
+       REGULATOR_SUPPLY("dvdd", "spi3.2"),
        REGULATOR_SUPPLY("avdd_pll_bb", NULL),
 };
 
@@ -170,6 +170,7 @@ static struct regulator_consumer_supply palmas_ldo6_supply[] = {
        REGULATOR_SUPPLY("vaux_3v3", NULL),
        REGULATOR_SUPPLY("vdd", "0-0044"),
        REGULATOR_SUPPLY("vdd", "0-004c"),
+       REGULATOR_SUPPLY("avdd", "spi3.2"),
 };
 
 static struct regulator_consumer_supply palmas_ldo7_supply[] = {
index 74a6a78..a108d8d 100644 (file)
@@ -798,6 +798,8 @@ static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
 struct rm_spi_ts_platform_data rm31080ts_pluto_data = {
        .gpio_reset = 0,
        .config = 0,
+       .platform_id = RM_PLATFORM_P005,
+       .name_of_clock = "clk_out_2",
 };
 
 static struct tegra_spi_device_controller_data dev_cdata = {
@@ -821,7 +823,7 @@ static int __init pluto_touch_init(void)
 {
        tegra_clk_init_from_table(touch_clk_init_table);
        clk_enable(tegra_get_clock_by_name("clk_out_2"));
-       rm31080ts_pluto_data.platform_id = RM_PLATFORM_P005;
+       mdelay(20);
        rm31080a_pluto_spi_board[0].irq = gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
        touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
                                TOUCH_GPIO_RST_RAYDIUM_SPI,
index 53eab5a..2b7d2c4 100644 (file)
@@ -115,8 +115,6 @@ struct rm_spi_ts_platform_data {
        unsigned char *config;
        int platform_id;
        unsigned char *name_of_clock;
-       unsigned char *name_of_3v3;
-       unsigned char *name_of_1v8;
 };
 
 int rm31080_spi_byte_write(unsigned char u8Addr, unsigned char u8Value);