summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeshagiri Holi <sholi@nvidia.com>2014-02-04 23:36:05 +0530
committerSandeep Trasi <strasi@nvidia.com>2014-03-26 01:58:38 -0700
commit91300aef2a8655f5d089ab659c67bd70e660ad32 (patch)
tree35808d03854188a49bfa95fc822ee9131cf9e75d
parent384175a39d5e1da9bb0dab62397dbca298f612c1 (diff)
arm: tegra: vcm30t124: Register SDMMC1 to platform
-Enabling SDMMC1 which is connected wifi device -Register broadcom WIFI device to platform device bug 1426936 Change-Id: I72c77ca231e57b2837d86f2d4a61c2e19b74c9fc Signed-off-by: Seshagiri Holi <sholi@nvidia.com> Reviewed-on: http://git-master/r/363373 Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board-vcm30_t124-power.c6
-rw-r--r--arch/arm/mach-tegra/board-vcm30_t124-sdhci.c62
2 files changed, 41 insertions, 27 deletions
diff --git a/arch/arm/mach-tegra/board-vcm30_t124-power.c b/arch/arm/mach-tegra/board-vcm30_t124-power.c
index 89ff605696f1..c6011fdac65c 100644
--- a/arch/arm/mach-tegra/board-vcm30_t124-power.c
+++ b/arch/arm/mach-tegra/board-vcm30_t124-power.c
@@ -397,6 +397,8 @@ int __init vcm30_t124_soctherm_init(void)
* WiFi stack.
*/
static struct gpio vcm30_t124_system_0_gpios[] = {
+ {MISCIO_WF_EN_GPIO, GPIOF_OUT_INIT_LOW, "wifi_en"},
+ {MISCIO_WF_RST_GPIO, GPIOF_OUT_INIT_LOW, "wifi_rst"},
{MISCIO_BT_WAKEUP_GPIO, GPIOF_OUT_INIT_HIGH, "bt_wk"},
{MISCIO_ABB_RST_GPIO, GPIOF_OUT_INIT_HIGH, "ebb_rst"},
{MISCIO_USER_LED2_GPIO, GPIOF_OUT_INIT_LOW, "usr_led2"},
@@ -426,9 +428,7 @@ static int __init vcm30_t124_system_0_gpio_init(void)
pr_err("%s gpio_request_array failed(%d)\r\n",
__func__, ret);
- /* Export the LED GPIOs to userland for any check */
- gpio_export(MISCIO_USER_LED2_GPIO, false);
- gpio_export(MISCIO_USER_LED1_GPIO, false);
+ gpio_free_array(gpios_info, pin_count);
return ret;
}
diff --git a/arch/arm/mach-tegra/board-vcm30_t124-sdhci.c b/arch/arm/mach-tegra/board-vcm30_t124-sdhci.c
index dc52329e700f..cb7b7b2888b9 100644
--- a/arch/arm/mach-tegra/board-vcm30_t124-sdhci.c
+++ b/arch/arm/mach-tegra/board-vcm30_t124-sdhci.c
@@ -92,9 +92,21 @@ static struct tegra_sdhci_platform_data tegra_sdhci_platform_data1 = {
.cd_gpio = -1,
.wp_gpio = -1,
.power_gpio = -1,
- .tap_delay = 0x0F,
- .ddr_clk_limit = 30000000,
+ .tap_delay = 0x5,
+ .trim_delay = 0x2,
.is_8bit = false,
+ .ddr_clk_limit = 30000000,
+ .max_clk_limit = 50000000,
+ /*
+ * FIXME: Wifi currently working on HS mode.
+ * enable SDR104, DDR50 and SDR50 mode for wifi using
+ * bug 1457466
+ */
+ .uhs_mask = MMC_UHS_MASK_SDR104 |
+ MMC_UHS_MASK_DDR50 | MMC_UHS_MASK_SDR50,
+ .calib_3v3_offsets = 0x7676,
+ .calib_1v8_offsets = 0x7676,
+ .disable_clock_gate = 1,
};
static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = {
@@ -171,14 +183,26 @@ static int vcm30_t124_wifi_set_carddetect(int val)
static int vcm30_t124_wifi_power(int on)
{
- gpio_set_value_cansleep(MISCIO_WF_EN_GPIO, on);
- mdelay(100);
- gpio_set_value_cansleep(MISCIO_WF_RST_GPIO, on);
- mdelay(200);
+ int ret;
+ /* Deassert WiFi RST GPIO */
+ ret = gpio_request(MISCIO_WF_EN_GPIO, "wifi_en");
+ if (ret < 0)
+ goto fail;
+ gpio_direction_output(MISCIO_WF_EN_GPIO, on);
+ gpio_free(MISCIO_WF_EN_GPIO);
+
+ ret = gpio_request(MISCIO_WF_RST_GPIO, "wifi_rst");
+ if (ret < 0)
+ goto fail;
+ gpio_direction_output(MISCIO_WF_RST_GPIO, on);
+ gpio_free(MISCIO_WF_RST_GPIO);
+ mdelay(100);
return 0;
+fail:
+ printk(KERN_ERR "%s: gpio_request failed(%d)\r\n", __func__, ret);
+ return ret;
}
-
static int vcm30_t124_wifi_reset(int on)
{
/*
@@ -189,17 +213,6 @@ static int vcm30_t124_wifi_reset(int on)
int __init vcm30_t124_wifi_init(void)
{
- gpio_request(MISCIO_WF_EN_GPIO, "wifi_en");
- gpio_request(MISCIO_WF_RST_GPIO, "wifi_rst");
-
-#ifdef CONFIG_TEGRA_PREPOWER_WIFI
- gpio_direction_output(MISCIO_WF_EN_GPIO, 1);
- gpio_direction_output(MISCIO_WF_RST_GPIO, 1);
-#else
- gpio_direction_output(MISCIO_WF_EN_GPIO, 0);
- gpio_direction_output(MISCIO_WF_RST_GPIO, 0);
-#endif
-
platform_device_register(&broadcom_wifi_device);
return 0;
}
@@ -211,15 +224,16 @@ int __init vcm30_t124_sdhci_init(void)
tegra_sdhci_device3.dev.platform_data = &tegra_sdhci_platform_data3;
tegra_sdhci_device4.dev.platform_data = &tegra_sdhci_platform_data4;
-/* FIXME: Enable this check after SKU support is working */
-/* is_e1860 = tegra_is_board(NULL, "61860", NULL, NULL, NULL);
- if (is_e1860)*/
- tegra_sdhci_platform_data3.mmc_data.ocr_mask = MMC_OCR_3V3_MASK;
+ /* FIXME: Enable this check after SKU support is working */
+ /* is_e1860 = tegra_is_board(NULL, "61860", NULL, NULL, NULL);
+ if (is_e1860)*/
+ tegra_sdhci_platform_data3.mmc_data.ocr_mask = MMC_OCR_3V3_MASK;
-/* platform_device_register(&tegra_sdhci_device1); */
-/* platform_device_register(&tegra_sdhci_device2); */
platform_device_register(&tegra_sdhci_device4);
platform_device_register(&tegra_sdhci_device3);
+ /* platform_device_register(&tegra_sdhci_device2); */
+ platform_device_register(&tegra_sdhci_device1);
+ vcm30_t124_wifi_init();
return 0;
}