ARM:tegra:tn7c:revise board id to P1988
Martin Chi [Mon, 30 Dec 2013 14:17:47 +0000 (22:17 +0800)]
Bug 1410152

Change-Id: I80c856966ebd97b911c5e555fbd7e6e79d276060
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/350633
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

arch/arm/mach-tegra/board-tegranote7c-kbc.c
arch/arm/mach-tegra/board-tegranote7c-memory.c
arch/arm/mach-tegra/board-tegranote7c-pinmux.c
arch/arm/mach-tegra/board-tegranote7c-power.c
arch/arm/mach-tegra/board-tegranote7c-powermon.c
arch/arm/mach-tegra/board-tegranote7c-sdhci.c
arch/arm/mach-tegra/board-tegranote7c-sensors.c
arch/arm/mach-tegra/board-tegranote7c.c
arch/arm/mach-tegra/board-tegranote7c.h
arch/arm/mach-tegra/tegra-board-id.h
arch/arm/mach-tegra/tegra11_emc.c

index ef0294a..85847ee 100644 (file)
@@ -114,7 +114,7 @@ int __init tegranote7c_kbc_init(void)
 
        tegra_get_board_info(&board_info);
 
-       if (board_info.board_id == BOARD_P1640) {
+       if (board_info.board_id == BOARD_P1988) {
                if (board_info.fab == BOARD_FAB_A00) {
                        tegranote7c_keys_pdata.buttons = tegranote7c_p1640_keys;
                        tegranote7c_keys_pdata.nbuttons =
index 94f91d8..430b78f 100644 (file)
@@ -4178,7 +4178,7 @@ static struct tegra11_emc_pdata *tegranote7c_get_emc_data(void)
 
        if (board_info.board_id == BOARD_E1569)
                return &e1569_mt41k128m16_125_pdata;
-       else if (board_info.board_id == BOARD_P1640)
+       else if (board_info.board_id == BOARD_P1988)
                return &p1640_mt41k128m16_125_pdata;
        else
                return NULL;
index 0c4333c..d8686bf 100644 (file)
@@ -78,7 +78,7 @@ static void __init tegranote7c_gpio_init_configure(void)
 
        tegra_get_board_info(&board_info);
 
-       if (board_info.board_id == BOARD_P1640) {
+       if (board_info.board_id == BOARD_P1988) {
                len = ARRAY_SIZE(init_gpio_mode_tegranote7c_ffd_common);
                pins_info = init_gpio_mode_tegranote7c_ffd_common;
        } else { /* ERS */
@@ -92,7 +92,7 @@ static void __init tegranote7c_gpio_init_configure(void)
                pins_info++;
        }
 
-       if (board_info.board_id == BOARD_P1640) {
+       if (board_info.board_id == BOARD_P1988) {
                len = ARRAY_SIZE(dvt_a00_manual_gpio_mode);
                pins_info = dvt_a00_manual_gpio_mode;
                for (i = 0; i < len; ++i) {
@@ -114,7 +114,7 @@ int __init tegranote7c_pinmux_init(void)
        tegra_drive_pinmux_config_table(tegranote7c_drive_pinmux,
                                        ARRAY_SIZE(tegranote7c_drive_pinmux));
 
-       if (board_info.board_id == BOARD_P1640) {
+       if (board_info.board_id == BOARD_P1988) {
                tegra_pinmux_config_table(tegranote7c_ffd_pinmux_common,
                                        ARRAY_SIZE(tegranote7c_ffd_pinmux_common));
                tegra_pinmux_config_table(ffd_unused_pins_lowpower,
index 5178a02..9ccc045 100644 (file)
@@ -603,7 +603,7 @@ FIXED_REG(7,        en_lcd_1v8,     en_lcd_1v8,
        ADD_FIXED_REG(dvdd_lcd_1v8),            \
        ADD_FIXED_REG(dvdd_ts),
 
-#define P1640_FIXED_REG                                \
+#define P1988_FIXED_REG                                \
        ADD_FIXED_REG(en_lcd_1v8),
 
 /* Gpio switch regulator platform data for TegraNote7C E1569 */
@@ -613,9 +613,9 @@ static struct platform_device *fixed_reg_devs_e1569[] = {
 };
 
 /* Gpio switch regulator platform data for Tegranote7c */
-static struct platform_device *fixed_reg_devs_p1640[] = {
+static struct platform_device *fixed_reg_devs_p1988[] = {
        TEGRANOTE7C_COMMON_FIXED_REG
-       P1640_FIXED_REG
+       P1988_FIXED_REG
 };
 
 int __init tegranote7c_palmas_regulator_init(void)
@@ -638,7 +638,7 @@ int __init tegranote7c_palmas_regulator_init(void)
 
        tegra_get_board_info(&board_info);
 
-       if (board_info.board_id == BOARD_P1640 &&
+       if (board_info.board_id == BOARD_P1988 &&
                        ((board_info.fab < BOARD_FAB_A04) ||
                        (board_info.fab >= BOARD_FAB_A04 &&
                        tegra_bct_strapping != 1))) {
@@ -653,7 +653,7 @@ int __init tegranote7c_palmas_regulator_init(void)
                                                                        1380000;
        }
 
-       if (board_info.board_id == BOARD_P1640 &&
+       if (board_info.board_id == BOARD_P1988 &&
                                board_info.fab >= BOARD_FAB_A01) {
                palmas_pdata.clk32k_init_data = tegranote7c_palmas_clk32k_idata;
                palmas_pdata.clk32k_init_data_size =
@@ -781,9 +781,9 @@ static int __init tegranote7c_fixed_regulator_init(void)
 
        tegra_get_board_info(&board_info);
 
-       if (board_info.board_id == BOARD_P1640)
-               ret = platform_add_devices(fixed_reg_devs_p1640,
-                                          ARRAY_SIZE(fixed_reg_devs_p1640));
+       if (board_info.board_id == BOARD_P1988)
+               ret = platform_add_devices(fixed_reg_devs_p1988,
+                                          ARRAY_SIZE(fixed_reg_devs_p1988));
        else
                ret = platform_add_devices(fixed_reg_devs_e1569,
                                           ARRAY_SIZE(fixed_reg_devs_e1569));
@@ -973,7 +973,7 @@ int __init tegranote7c_soctherm_init(void)
        tegra_get_board_info(&board_info);
 
        /*
-        * P1640 has oc4 from ina230. E1569 has oc4 from pmic powergood
+        * P1988 has oc4 from ina230. E1569 has oc4 from pmic powergood
         * Disable oc4 throttle for E1569
         */
        if (board_info.board_id == BOARD_E1569) {
@@ -992,7 +992,7 @@ int __init tegranote7c_soctherm_init(void)
                        &tegranote7c_soctherm_data.therm[THERM_CPU].num_trips);
 
        if (board_info.board_id != BOARD_E1569 &&
-                       (board_info.board_id == BOARD_P1640 &&
+                       (board_info.board_id == BOARD_P1988 &&
                        (board_info.fab != BOARD_FAB_A00 &&
                        board_info.fab != BOARD_FAB_A01))) {
                tegra_add_cdev_trips(
index dc4a1fe..9f907c1 100644 (file)
@@ -364,7 +364,7 @@ int __init tegranote7c_pmon_init(void)
                i2c_register_board_info(1, tegranote7c_i2c1_ina219_board_info,
                        ARRAY_SIZE(tegranote7c_i2c1_ina219_board_info));
 
-       /* Both E1569 and P1640 has ina230 for checking power at VDD_CELL */
+       /* Both E1569 and P1988 has ina230 for checking power at VDD_CELL */
        i2c_register_board_info(1, tegranote7c_i2c1_ina230_board_info,
                ARRAY_SIZE(tegranote7c_i2c1_ina230_board_info));
 
index 97c5704..a4c7e3e 100644 (file)
@@ -339,7 +339,7 @@ int __init tegranote7c_sdhci_init(void)
        }
 
        tegra_get_board_info(&board_info);
-       if (board_info.board_id == BOARD_P1640)
+       if (board_info.board_id == BOARD_P1988)
                tegra_sdhci_platform_data2.wp_gpio = -1;
        if ((tegra_sdhci_platform_data3.uhs_mask & MMC_MASK_HS200)
        && (!(tegra_sdhci_platform_data3.uhs_mask & MMC_UHS_MASK_DDR50)))
index c1e0c8b..c18c382 100644 (file)
@@ -439,7 +439,7 @@ static struct mpu_platform_data mpu6050_gyro_data_p1640_a01 = {
        .int_config     = 0x10,
        .level_shifter  = 0,
        /* Located in board_[platformname].h */
-       .orientation    = MPU_GYRO_ORIENTATION_P1640_A01,
+       .orientation    = MPU_GYRO_ORIENTATION_P1988_A01,
        .key            = {0x4E, 0xCC, 0x7E, 0xEB, 0xF6, 0x1E, 0x35, 0x22,
                           0x00, 0x34, 0x0D, 0x65, 0x32, 0xE9, 0x94, 0x89},
 };
@@ -498,7 +498,7 @@ static void mpuirq_init(void)
        if (board_info.board_id == BOARD_E1569)
                inv_mpu6050_i2c2_board_info[0].platform_data =
                        &mpu6050_gyro_data_e1569;
-       else if ((board_info.board_id == BOARD_P1640) &&
+       else if ((board_info.board_id == BOARD_P1988) &&
                        (board_info.fab <= BOARD_FAB_A01))
                inv_mpu6050_i2c2_board_info[0].platform_data =
                        &mpu6050_gyro_data_p1640_a01;
@@ -644,15 +644,15 @@ static int __init tegranote7c_skin_init(void)
        if (machine_is_tegranote7c()) {
                tegra_get_board_info(&board_info);
                if (board_info.board_id == BOARD_E1569 ||
-                       (board_info.board_id == BOARD_P1640 &&
+                       (board_info.board_id == BOARD_P1988 &&
                        (board_info.fab == BOARD_FAB_A00 ||
                        board_info.fab == BOARD_FAB_A01))) {
-                       /* Use this for E1569 and P1640 A00/A01 */
+                       /* Use this for E1569 and P1988 A00/A01 */
                        skin_data.toffset = 5588;
                        skin_data.ndevs = ARRAY_SIZE(skin_devs);
                        skin_data.devs = skin_devs;
                } else {
-                       /* Use this after P1640 A02. */
+                       /* Use this after P1988 A02. */
                        skin_data.toffset = 799;
                        skin_data.ndevs = ARRAY_SIZE(skin_devs_a02);
                        skin_data.devs = skin_devs_a02;
@@ -816,7 +816,7 @@ int __init tegranote7c_sensors_init(void)
        tegra_get_board_info(&board_info);
 
        if (board_info.board_id == BOARD_E1569 ||
-                       (board_info.board_id == BOARD_P1640 &&
+                       (board_info.board_id == BOARD_P1988 &&
                        (board_info.fab == BOARD_FAB_A00 ||
                        board_info.fab == BOARD_FAB_A01))) {
                err = tegranote7c_nct1008_init();
index e5ee8d4..347a03a 100644 (file)
@@ -116,7 +116,7 @@ static noinline void __init tegranote7c_bt_st(void)
        pr_info("tegranote7c_bt_st");
        tegra_get_board_info(&board_info);
 
-       if (board_info.board_id == BOARD_P1640)
+       if (board_info.board_id == BOARD_P1988)
                tegranote7c_wilink_pdata.nshutdown_gpio = TEGRA_GPIO_PR1;
 
        platform_device_register(&wl128x_device);
@@ -181,7 +181,7 @@ static __initdata struct tegra_clk_init_table e1569_wifi_clk_init_table[] = {
        { NULL,         NULL,           0,              0},
 };
 
-static __initdata struct tegra_clk_init_table P1640_wifi_clk_init_table[] = {
+static __initdata struct tegra_clk_init_table P1988_wifi_clk_init_table[] = {
        { "extern3",    "clk_32k",      32768,          true},
        { "clk_out_3",  "extern3",      32768,          true},
        { NULL,         NULL,           0,              0},
@@ -249,7 +249,7 @@ static void tegranote7c_i2c_init(void)
 
        tegra_get_board_info(&board_info);
 
-       if (board_info.board_id == BOARD_P1640)
+       if (board_info.board_id == BOARD_P1988)
                i2c_register_board_info(0, &rt5639_board_info, 1);
        else
                i2c_register_board_info(0, &rt5640_board_info, 1);
@@ -584,7 +584,7 @@ static void tegranote7c_audio_init(void)
 
        tegra_get_board_info(&board_info);
 
-       if (board_info.board_id == BOARD_P1640) {
+       if (board_info.board_id == BOARD_P1988) {
                tegranote7c_audio_pdata.codec_name = "rt5639.0-001c";
                tegranote7c_audio_pdata.codec_dai_name = "rt5639-aif1";
                if (board_info.fab == BOARD_FAB_A00)
@@ -726,9 +726,8 @@ static int __init tegranote7c_touch_init(void)
 
 #if defined(CONFIG_TOUCHSCREEN_MAXIM_STI) || \
        defined(CONFIG_TOUCHSCREEN_MAXIM_STI_MODULE)
-       if (board_info.board_id == BOARD_P1640) {
+       if (board_info.board_id == BOARD_P1988)
                (void)touch_init_maxim_sti(&maxim_sti_spi_board);
-       }
 #else
        tegra_clk_init_from_table(touch_clk_init_table);
        rm31080ts_tegranote7c_data.platform_id = RM_PLATFORM_D010;
@@ -753,9 +752,9 @@ static void __init tegra_tegranote7c_early_init(void)
        tegra_get_board_info(&board_info);
        if (board_info.board_id == BOARD_E1569)
                tegra_clk_init_from_table(e1569_wifi_clk_init_table);
-       else if (board_info.board_id == BOARD_P1640 &&
+       else if (board_info.board_id == BOARD_P1988 &&
                        board_info.fab == BOARD_FAB_A00)
-               tegra_clk_init_from_table(P1640_wifi_clk_init_table);
+               tegra_clk_init_from_table(P1988_wifi_clk_init_table);
        tegra_clk_verify_parents();
        tegra_soc_device_init("tegranote7c");
 #if defined(CONFIG_TEGRA_IOVMM_SMMU) || defined(CONFIG_TEGRA_IOMMU_SMMU)
index e464746..0b7cecd 100644 (file)
@@ -86,7 +86,7 @@
 #define MPU_GYRO_ADDR                 0x69
 #define MPU_GYRO_BUS_NUM              0
 #define MPU_GYRO_ORIENTATION_E1569    MTMAT_TOP_CCW_180
-#define MPU_GYRO_ORIENTATION_P1640_A01 MTMAT_TOP_CCW_0
+#define MPU_GYRO_ORIENTATION_P1988_A01 MTMAT_TOP_CCW_0
 #define MPU_GYRO_ORIENTATION          MTMAT_TOP_CCW_90
 #define MPU_COMPASS_NAME              "ak8975"
 #define MPU_COMPASS_IRQ_GPIO          0
index 549733e..067627f 100644 (file)
@@ -35,6 +35,7 @@
 #define BOARD_E1545   0x0609
 #define BOARD_E1569   0x0621
 #define BOARD_P1640   0x0668
+#define BOARD_P1988   0x07C4
 
 /* Board Fab version */
 #define BOARD_FAB_A00                  0x0
index 5d4c392..c2498bd 100644 (file)
@@ -1140,19 +1140,27 @@ static struct device_node *tegra_emc_ramcode_devnode(struct device_node *np)
        for_each_child_of_node(np, iter) {
                if (of_property_read_u32(iter, "nvidia,ram-code", &reg))
                        continue;
-#ifdef CONFIG_MACH_TEGRATAB
+#if defined(CONFIG_MACH_TEGRATAB) || defined(CONFIG_MACH_TEGRANOTE7C)
                {
                        struct board_info board_info;
                        tegra_get_board_info(&board_info);
 
                        if (board_info.board_id == BOARD_P1640 &&
-                                       board_info.fab >= BOARD_FAB_A04) {
+                           board_info.fab >= BOARD_FAB_A04) {
                                if (reg == tegra_bct_strapping)
                                        return of_node_get(iter);
                        } else if (board_info.board_id == BOARD_P1640) {
                                /* force select ram strapping 0x0 */
                                if (reg == 0x0)
                                        return of_node_get(iter);
+                       } else if (board_info.board_id == BOARD_P1988 &&
+                               board_info.fab >= BOARD_FAB_A04) {
+                               if (reg == tegra_bct_strapping)
+                                       return of_node_get(iter);
+                       } else if (board_info.board_id == BOARD_P1988) {
+                               /* force select ram strapping 0x0 */
+                               if (reg == 0x0)
+                                       return of_node_get(iter);
                        }
                }
 #else