/*
* arch/arm/mach-tegra/board-cardhu-power.c
*
- * Copyright (C) 2011-2012 NVIDIA, Inc.
+ * Copyright (C) 2011-2012, NVIDIA Corporation.
*
* 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
#include "board.h"
#include "board-cardhu.h"
#include "pm.h"
-#include "wakeups-t3.h"
#include "tegra3_tsensor.h"
+#include "wakeups.h"
+#include "wakeups-t3.h"
#define PMC_CTRL 0x0
#define PMC_CTRL_INTR_LOW (1 << 17)
static struct regulator_consumer_supply fixed_reg_cam2_ldo_en_supply[] = {
REGULATOR_SUPPLY("vdd_2v8_cam2", NULL),
REGULATOR_SUPPLY("avdd", "7-0072"),
+ REGULATOR_SUPPLY("vdd", "7-000e"),
};
/* CAM3_LDO_EN from AP GPIO KB_ROW8 S00*/
REGULATOR_SUPPLY("dvdd", "6-0072"),
REGULATOR_SUPPLY("dvdd", "7-0072"),
REGULATOR_SUPPLY("vdd_i2c", "6-000e"),
+ REGULATOR_SUPPLY("vdd_i2c", "7-000e"),
REGULATOR_SUPPLY("vdd_i2c", "2-0033"),
};
/* Specific to pm269 */
FIXED_REG(4, en_vdd_bl_pm269, en_vdd_bl, NULL, 0, 0, TEGRA_GPIO_PH3, true, 1, 5000);
-#ifndef CONFIG_TEGRA_CARDHU_DSI
FIXED_REG(6, en_vdd_pnl1_pm269, en_vdd_pnl1, FIXED_SUPPLY(en_3v3_sys), 0, 0, TEGRA_GPIO_PW1, true, 1, 3300);
-#endif
FIXED_REG(9, en_3v3_fuse_pm269, en_3v3_fuse, FIXED_SUPPLY(en_3v3_sys), 0, 0, TEGRA_GPIO_PC1, true, 0, 3300);
FIXED_REG(12, en_3v3_pex_hvdd_pm269, en_3v3_pex_hvdd, FIXED_SUPPLY(en_3v3_sys), 0, 0, TEGRA_GPIO_PC6, true, 0, 3300);
ADD_FIXED_REG(en_3v3_pex_hvdd_pm269), \
ADD_FIXED_REG(en_1v8_cam), \
ADD_FIXED_REG(dis_5v_switch_e118x), \
+ ADD_FIXED_REG(en_vbrtr), \
ADD_FIXED_REG(en_usb1_vbus_oc_e118x), \
ADD_FIXED_REG(en_usb3_vbus_oc_e118x), \
ADD_FIXED_REG(en_vddio_vid_oc_pm269),
ADD_FIXED_REG(en_vddio_vid_oc_pm269),
-#ifndef CONFIG_TEGRA_CARDHU_DSI
#define E1247_DISPLAY_FIXED_REG \
ADD_FIXED_REG(en_vdd_bl_pm269), \
ADD_FIXED_REG(en_vdd_pnl1_pm269),
-#else
-#define E1247_DISPLAY_FIXED_REG \
+
+#define E1247_DSI_DISPLAY_FIXED_REG \
ADD_FIXED_REG(en_vdd_bl_pm269),
-#endif
#define PM313_DISPLAY_FIXED_REG \
ADD_FIXED_REG(en_vdd_bl_pm313), \
E1247_DISPLAY_FIXED_REG
};
+static struct platform_device *fixed_reg_devs_e118x_dsi[] = {
+ E118x_FIXED_REG
+ E1247_DSI_DISPLAY_FIXED_REG
+};
+
/* Fixed regulator devices for E1186/E1187/E1256 */
static struct platform_device *fixed_reg_devs_e118x_pm313[] = {
E118x_FIXED_REG
E1247_DISPLAY_FIXED_REG
};
+static struct platform_device *fixed_reg_devs_pm269_dsi[] = {
+ PM269_FIXED_REG
+ E1247_DSI_DISPLAY_FIXED_REG
+};
+
/* Fixed regulator devices for PM269 */
static struct platform_device *fixed_reg_devs_pm269_pm313[] = {
PM269_FIXED_REG
E1247_DISPLAY_FIXED_REG
};
+static struct platform_device *fixed_reg_devs_pm311_dsi[] = {
+ PM311_FIXED_REG
+ E1247_DSI_DISPLAY_FIXED_REG
+};
+
/* Fixed regulator devices for PM11 */
static struct platform_device *fixed_reg_devs_pm311_pm313[] = {
PM311_FIXED_REG
E1198_FIXED_REG
};
+static bool is_display_board_dsi(u16 display_board_id)
+{
+ return ((display_board_id == BOARD_DISPLAY_E1213) ||
+ (display_board_id == BOARD_DISPLAY_E1253) ||
+ (display_board_id == BOARD_DISPLAY_E1506));
+}
+
int __init cardhu_fixed_regulator_init(void)
{
- int i;
struct board_info board_info;
struct board_info pmu_board_info;
struct board_info display_board_info;
if (display_board_info.board_id == BOARD_DISPLAY_PM313) {
nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_pm311_pm313);
fixed_reg_devs = fixed_reg_devs_pm311_pm313;
+ } else if (is_display_board_dsi(display_board_info.board_id)) {
+ nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_pm311_dsi);
+ fixed_reg_devs = fixed_reg_devs_pm311_dsi;
}
break;
if (display_board_info.board_id == BOARD_DISPLAY_PM313) {
nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_pm269_pm313);
fixed_reg_devs = fixed_reg_devs_pm269_pm313;
+ } else if (is_display_board_dsi(display_board_info.board_id)) {
+ nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_pm269_dsi);
+ fixed_reg_devs = fixed_reg_devs_pm269_dsi;
} else {
nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_pm269);
fixed_reg_devs = fixed_reg_devs_pm269;
if (display_board_info.board_id == BOARD_DISPLAY_PM313) {
nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_e118x_pm313);
fixed_reg_devs = fixed_reg_devs_e118x_pm313;
+ } else if (is_display_board_dsi(display_board_info.board_id)) {
+ nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_e118x_dsi);
+ fixed_reg_devs = fixed_reg_devs_e118x_dsi;
} else {
nfixreg_devs = ARRAY_SIZE(fixed_reg_devs_e118x);
fixed_reg_devs = fixed_reg_devs_e118x;
/* CORE_PWR_REQ to be high for E1291-A03 */
if (board_info.fab == BOARD_FAB_A03)
cardhu_suspend_data.corereq_high = true;
+ if (board_info.fab < BOARD_FAB_A03)
+ /* post E1291-A02 revisions WAKE19/USB1-VBUS wake supported */
+ tegra_disable_wake_source(TEGRA_WAKE_USB1_VBUS);
break;
case BOARD_E1198:
+ if (board_info.fab < BOARD_FAB_A02)
+ /* post E1198-A01 revisions WAKE19/USB1-VBUS wake supported */
+ tegra_disable_wake_source(TEGRA_WAKE_USB1_VBUS);
+ break;
case BOARD_PM269:
case BOARD_PM305:
case BOARD_PM311: