arm: tegra: cardhu: Support for PM311
Laxman Dewangan [Wed, 31 Aug 2011 06:16:43 +0000 (11:16 +0530)]
Adding support for PM311 based system.

bug 870139

Reviewed-on: http://git-master/r/50012
(cherry picked from commit d319d9980b6b225735ac97160fdee18fbabba2f0)

Change-Id: Iaa28921761e035e8fa29956b776f9379ae326b42
Reviewed-on: http://git-master/r/57251
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R50fc9a079bd46a050084afed2b0f460e2916ebc9

arch/arm/mach-tegra/board-cardhu-kbc.c
arch/arm/mach-tegra/board-cardhu-memory.c
arch/arm/mach-tegra/board-cardhu-panel.c
arch/arm/mach-tegra/board-cardhu-pinmux.c
arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-cardhu-sdhci.c
arch/arm/mach-tegra/board-cardhu-sensors.c
arch/arm/mach-tegra/board-cardhu.h

index 6668503..1408e59 100644 (file)
@@ -114,7 +114,8 @@ int __init cardhu_kbc_init(void)
                return 0;
 
        if ((board_info.board_id == BOARD_PM269) ||
-               (board_info.board_id == BOARD_PM305)) {
+               (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311)) {
                cardhu_kbc_platform_data.plain_keycode = plain_kbd_keycode_pm269;
                row_count = CARDHU_PM269_ROW_COUNT;
                col_count = CARDHU_PM269_COL_COUNT;
@@ -244,6 +245,7 @@ int __init cardhu_keys_init(void)
        if (!((board_info.board_id == BOARD_E1198) ||
                (board_info.board_id == BOARD_E1291) ||
                (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311) ||
                (board_info.board_id == BOARD_PM269)))
                return 0;
 
@@ -266,6 +268,7 @@ int __init cardhu_keys_init(void)
        /* Register on-key through pmu interrupt */
        if ((board_info.board_id == BOARD_E1291) ||
                (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311) ||
                (board_info.board_id == BOARD_PM269))
                platform_device_register(&cardhu_int_keys_device);
        return 0;
index 885392f..905c6f0 100644 (file)
@@ -2534,7 +2534,6 @@ int cardhu_emc_init(void)
 
        switch (board.board_id) {
        case BOARD_PM269:
-       case BOARD_PM305:
                if (MEMORY_TYPE(board.sku) == SKU_MEMORY_ELPIDA)
                        tegra_init_emc(cardhu_emc_tables_edb8132b2ma,
                                        ARRAY_SIZE(cardhu_emc_tables_edb8132b2ma));
@@ -2542,6 +2541,10 @@ int cardhu_emc_init(void)
                        tegra_init_emc(cardhu_emc_tables_k4p8g304eb,
                                        ARRAY_SIZE(cardhu_emc_tables_k4p8g304eb));
                break;
+
+       case BOARD_PM305:
+       case BOARD_PM311:
+               break;
        default:
                if (tegra_get_revision() == TEGRA_REVISION_A01)
                        tegra_init_emc(cardhu_emc_tables_h5tc2g,
index 0cd01cc..7597962 100644 (file)
@@ -266,7 +266,8 @@ static int cardhu_panel_enable(void)
                        regulator_enable(cardhu_lvds_vdd_panel);
        }
        if ((board_info.board_id == BOARD_PM269) ||
-               (board_info.board_id == BOARD_PM305))
+               (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311))
                gpio_set_value(pm269_lvds_shutdown, 1);
        else
                gpio_set_value(cardhu_lvds_shutdown, 1);
@@ -288,7 +289,8 @@ static int cardhu_panel_disable(void)
        regulator_put(cardhu_lvds_vdd_panel);
        cardhu_lvds_vdd_panel= NULL;
        if ((board_info.board_id == BOARD_PM269) ||
-               (board_info.board_id == BOARD_PM305))
+               (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311))
                gpio_set_value(pm269_lvds_shutdown, 0);
        else
                gpio_set_value(cardhu_lvds_shutdown, 0);
@@ -976,7 +978,8 @@ int __init cardhu_panel_init(void)
        }
 
        if ((board_info.board_id == BOARD_PM269) ||
-               (board_info.board_id == BOARD_PM305)) {
+               (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311)) {
                gpio_request(pm269_lvds_shutdown, "lvds_shutdown");
                gpio_direction_output(pm269_lvds_shutdown, 1);
                tegra_gpio_enable(pm269_lvds_shutdown);
index a478e0f..59e2e97 100644 (file)
@@ -552,6 +552,7 @@ int __init cardhu_pinmux_init(void)
 
        case BOARD_PM269:
        case BOARD_PM305:
+       case BOARD_PM311:
                tegra_pinmux_config_table(cardhu_pinmux_e118x,
                                        ARRAY_SIZE(cardhu_pinmux_e118x));
                tegra_pinmux_config_table(unused_pins_lowpower,
@@ -658,7 +659,8 @@ int __init cardhu_pins_state_init(void)
                                        ARRAY_SIZE(pin_lpm_cardhu_common));
 
        if ((board_info.board_id == BOARD_PM269) ||
-               (board_info.board_id == BOARD_PM305))
+               (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311))
                set_unused_pin_gpio(&vddio_gmi_pins_pm269[0],
                                ARRAY_SIZE(vddio_gmi_pins_pm269));
        return 0;
index 7fefda9..4df05f0 100644 (file)
@@ -937,6 +937,7 @@ int __init cardhu_gpio_switch_regulator_init(void)
 
        case BOARD_PM269:
        case BOARD_PM305:
+       case BOARD_PM311:
                gswitch_pdata.num_subdevs = ARRAY_SIZE(gswitch_subdevs_pm269);
                gswitch_pdata.subdevs = gswitch_subdevs_pm269;
                break;
@@ -1006,6 +1007,7 @@ int __init cardhu_suspend_init(void)
        case BOARD_E1198:
        case BOARD_PM269:
        case BOARD_PM305:
+       case BOARD_PM311:
                break;
        case BOARD_E1187:
        case BOARD_E1186:
index 1eb2801..5ed56d9 100644 (file)
@@ -218,7 +218,8 @@ int __init cardhu_sdhci_init(void)
        struct board_info board_info;
        tegra_get_board_info(&board_info);
        if ((board_info.board_id == BOARD_PM269) ||
-               (board_info.board_id == BOARD_PM305)) {
+               (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311)) {
                tegra_sdhci_platform_data2.max_clk = 12000000;
                rc = pm269_sd_wp_gpio_init();
                if (!rc) {
index d532f6b..9a87e67 100644 (file)
@@ -588,7 +588,8 @@ static int cardhu_nct1008_init(void)
        if ((board_info.board_id == BOARD_E1198) ||
                (board_info.board_id == BOARD_E1291) ||
                (board_info.board_id == BOARD_PM269) ||
-               (board_info.board_id == BOARD_PM305)) {
+               (board_info.board_id == BOARD_PM305) ||
+               (board_info.board_id == BOARD_PM311)) {
                nct1008_port = TEGRA_GPIO_PCC2;
        } else if ((board_info.board_id == BOARD_E1186) ||
                (board_info.board_id == BOARD_E1187) ||
index 09966e8..c414f9d 100644 (file)
@@ -35,6 +35,7 @@
 #define BOARD_PM269   0x0245
 #define BOARD_E1208   0x0C08
 #define BOARD_PM305   0x0305
+#define BOARD_PM311   0x030B
 
 /* SKU Information */
 #define SKU_DCDC_TPS62361_SUPPORT      0x1