arm: tegra: cardhu: Support for PM305
Laxman Dewangan [Tue, 30 Aug 2011 09:41:20 +0000 (14:41 +0530)]
Adding support for PM305.

bug 846246

Original-Change-Id: Ib036c67c12984668e0b7153f76a1a1d44c5be14f
Reviewed-on: http://git-master/r/49820
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

Rebase-Id: R9e9eb93ddcea487159854533eead3fe8eb74e42b

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 96e9543..88ea6f9 100644 (file)
@@ -113,7 +113,8 @@ int __init cardhu_kbc_init(void)
                        (board_info.board_id == BOARD_E1291))
                return 0;
 
-       if (board_info.board_id == BOARD_PM269) {
+       if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_PM305)) {
                cardhu_kbc_platform_data.plain_keycode = plain_kbd_keycode_pm269;
                row_count = CARDHU_PM269_ROW_COUNT;
                col_count = CARDHU_PM269_COL_COUNT;
@@ -260,6 +261,7 @@ int __init cardhu_keys_init(void)
        tegra_get_board_info(&board_info);
        if (!((board_info.board_id == BOARD_E1198) ||
                (board_info.board_id == BOARD_E1291) ||
+               (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM269)))
                return 0;
 
@@ -272,7 +274,8 @@ int __init cardhu_keys_init(void)
 
                platform_device_register(&cardhu_keys_e1291_device);
                platform_device_register(&cardhu_int_keys_e1291_device);
-       } else if (board_info.board_id == BOARD_PM269) {
+       } else if ((board_info.board_id == BOARD_PM269)  ||
+                       (board_info.board_id == BOARD_PM305)) {
                platform_device_register(&cardhu_int_keys_pm269_device);
        } else {
                /* For E1198 */
index 6aff0f0..885392f 100644 (file)
@@ -2534,6 +2534,7 @@ 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));
index 528e44d..910a0c1 100644 (file)
@@ -265,7 +265,8 @@ static int cardhu_panel_enable(void)
                else
                        regulator_enable(cardhu_lvds_vdd_panel);
        }
-       if (board_info.board_id == BOARD_PM269)
+       if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_PM305))
                gpio_set_value(pm269_lvds_shutdown, 1);
        else
                gpio_set_value(cardhu_lvds_shutdown, 1);
@@ -286,7 +287,8 @@ static int cardhu_panel_disable(void)
        regulator_disable(cardhu_lvds_vdd_panel);
        regulator_put(cardhu_lvds_vdd_panel);
        cardhu_lvds_vdd_panel= NULL;
-       if (board_info.board_id == BOARD_PM269)
+       if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_PM305))
                gpio_set_value(pm269_lvds_shutdown, 0);
        else
                gpio_set_value(cardhu_lvds_shutdown, 0);
@@ -991,7 +993,8 @@ int __init cardhu_panel_init(void)
                cardhu_disp1_out.n_modes = ARRAY_SIZE(cardhu_panel_modes_55hz);
        }
 
-       if (board_info.board_id == BOARD_PM269) {
+       if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_PM305)) {
                gpio_request(pm269_lvds_shutdown, "lvds_shutdown");
                gpio_direction_output(pm269_lvds_shutdown, 1);
                tegra_gpio_enable(pm269_lvds_shutdown);
index 907b76a..d77c169 100644 (file)
@@ -544,6 +544,7 @@ int __init cardhu_pinmux_init(void)
                break;
 
        case BOARD_PM269:
+       case BOARD_PM305:
                tegra_pinmux_config_table(cardhu_pinmux_e118x,
                                        ARRAY_SIZE(cardhu_pinmux_e118x));
                tegra_pinmux_config_table(unused_pins_lowpower,
@@ -649,7 +650,8 @@ int __init cardhu_pins_state_init(void)
                        set_unused_pin_gpio(&pin_lpm_cardhu_common[0],
                                        ARRAY_SIZE(pin_lpm_cardhu_common));
 
-       if (board_info.board_id == BOARD_PM269)
+       if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_PM305))
                set_unused_pin_gpio(&vddio_gmi_pins_pm269[0],
                                ARRAY_SIZE(vddio_gmi_pins_pm269));
        return 0;
index 7f2a0dc..a8d5e40 100644 (file)
@@ -934,6 +934,7 @@ int __init cardhu_gpio_switch_regulator_init(void)
                break;
 
        case BOARD_PM269:
+       case BOARD_PM305:
                gswitch_pdata.num_subdevs = ARRAY_SIZE(gswitch_subdevs_pm269);
                gswitch_pdata.subdevs = gswitch_subdevs_pm269;
                break;
@@ -1002,6 +1003,7 @@ int __init cardhu_suspend_init(void)
                break;
        case BOARD_E1198:
        case BOARD_PM269:
+       case BOARD_PM305:
                break;
        case BOARD_E1187:
        case BOARD_E1186:
index cee4b61..80bc3c8 100644 (file)
@@ -216,7 +216,8 @@ int __init cardhu_sdhci_init(void)
        unsigned int rc = 0;
        struct board_info board_info;
        tegra_get_board_info(&board_info);
-       if (board_info.board_id == BOARD_PM269) {
+       if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_PM305)) {
                tegra_sdhci_platform_data2.max_clk = 12000000;
                rc = pm269_sd_wp_gpio_init();
                if (!rc) {
index 705cae8..cc8f8fe 100644 (file)
@@ -593,7 +593,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_PM269) ||
+               (board_info.board_id == BOARD_PM305)) {
                nct1008_port = TEGRA_GPIO_PCC2;
        } else if ((board_info.board_id == BOARD_E1186) ||
                (board_info.board_id == BOARD_E1187) ||
index 41ed592..e8c6dcf 100644 (file)
@@ -34,6 +34,7 @@
 #define BOARD_PM267   0x0243
 #define BOARD_PM269   0x0245
 #define BOARD_E1208   0x0C08
+#define BOARD_PM305   0x0305
 
 /* SKU Information */
 #define SKU_DCDC_TPS62361_SUPPORT      0x1