* arch/arm/mach-tegra/board-cardhu.c
*
* Copyright (c) 2011-2012, NVIDIA Corporation. All rights reserved.
+ * 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 as published by
#include <linux/nfc/pn544.h>
#include <linux/rfkill-gpio.h>
+
#include <sound/wm8903.h>
#include <sound/max98095.h>
#include <media/tegra_dtv.h>
#include <asm/hardware/gic.h>
+#include <mach/edp.h>
#include <mach/clk.h>
#include <mach/iomap.h>
#include <mach/irqs.h>
#include <mach/pci.h>
#include <mach/gpio-tegra.h>
#include <mach/tegra_fiq_debugger.h>
+#include <linux/thermal.h>
#include <asm/hardware/gic.h>
#include <asm/mach-types.h>
#include "common.h"
static struct balanced_throttle throttle_list[] = {
-#ifdef CONFIG_TEGRA_THERMAL_THROTTLE
{
- .id = BALANCED_THROTTLE_ID_TJ,
+ .tegra_cdev = {
+ .id = CDEV_BTHROT_ID_TJ,
+ },
.throt_tab_size = 10,
.throt_tab = {
{ 0, 1000 },
{1000000, 1100 },
},
},
-#endif
#ifdef CONFIG_TEGRA_SKIN_THROTTLE
{
- .id = BALANCED_THROTTLE_ID_SKIN,
+ .tegra_cdev = {
+ .id = CDEV_BTHROT_ID_SKIN,
+ },
.throt_tab_size = 6,
.throt_tab = {
{ 640000, 1200 },
/* All units are in millicelsius */
static struct tegra_thermal_data thermal_data = {
- .shutdown_device_id = THERMAL_DEVICE_ID_NCT_EXT,
- .temp_shutdown = 90000,
-
-#if defined(CONFIG_TEGRA_EDP_LIMITS) || defined(CONFIG_TEGRA_THERMAL_THROTTLE)
.throttle_edp_device_id = THERMAL_DEVICE_ID_NCT_EXT,
-#endif
#ifdef CONFIG_TEGRA_EDP_LIMITS
.edp_offset = TDIODE_OFFSET, /* edp based on tdiode */
.hysteresis_edp = 3000,
#endif
-#ifdef CONFIG_TEGRA_THERMAL_THROTTLE
.temp_throttle = 85000,
- .tc1 = 0,
- .tc2 = 1,
- .passive_delay = 2000,
+ .binds = {
+ /* Thermal Throttling */
+ {
+ .tdev_id = THERMAL_DEVICE_ID_NCT_EXT,
+ .cdev_id = CDEV_BTHROT_ID_TJ,
+ .type = THERMAL_TRIP_PASSIVE,
+ .passive = {
+ .trip_temp = 85000,
+ .tc1 = 0,
+ .tc2 = 1,
+ .passive_delay = 2000,
+ }
+ },
+ /* EDP Capping */
+ {
+ .tdev_id = THERMAL_DEVICE_ID_NCT_EXT,
+ .cdev_id = CDEV_EDPTABLE_ID_EDP,
+ .type = THERMAL_TRIP_ACTIVE,
+ .get_trip_temp = tegra_edp_get_trip_temp,
+ .get_trip_size = tegra_edp_get_trip_size,
+ },
+#ifdef CONFIG_TEGRA_SKIN_THROTTLE
+ /* Skin Thermal Throttling */
+ {
+ .tdev_id = THERMAL_DEVICE_ID_SKIN,
+ .cdev_id = CDEV_BTHROT_ID_SKIN,
+ .type = THERMAL_TRIP_PASSIVE,
+ .passive = {
+ .trip_temp = 43000,
+ .tc1 = 10,
+ .tc2 = 1,
+ .passive_delay = 15000,
+ }
+ },
#endif
+ {
+ .tdev_id = THERMAL_DEVICE_ID_NULL,
+ },
+ },
+};
+
+static struct tegra_skin_data skin_data = {
#ifdef CONFIG_TEGRA_SKIN_THROTTLE
- .skin_device_id = THERMAL_DEVICE_ID_SKIN,
+ .skin_device_id = THERMAL_DEVICE_ID_THERM_EST_SKIN,
.temp_throttle_skin = 43000,
- .tc1_skin = 0,
- .tc2_skin = 1,
- .passive_delay_skin = 5000,
-
.skin_temp_offset = 9793,
.skin_period = 1100,
.skin_devs_size = 2,
}
},
},
+#else
+ .skin_device_id = THERMAL_DEVICE_ID_NULL,
#endif
};
+
static struct rfkill_gpio_platform_data cardhu_bt_rfkill_pdata[] = {
{
.name = "bt_rfkill",
.num_resources = ARRAY_SIZE(tegra_rtc_resources),
};
-static struct tegra_wm8903_platform_data cardhu_audio_wm8903_pdata = {
+static struct tegra_asoc_platform_data cardhu_audio_wm8903_pdata = {
.gpio_spkr_en = TEGRA_GPIO_SPKR_EN,
.gpio_hp_det = TEGRA_GPIO_HP_DET,
.gpio_hp_mute = -1,
.gpio_int_mic_en = -1,
.gpio_ext_mic_en = -1,
+ .i2s_param[HIFI_CODEC] = {
+ .audio_port_id = 0,
+ .is_i2s_master = 1,
+ .i2s_mode = TEGRA_DAIFMT_I2S,
+ },
+ .i2s_param[BASEBAND] = {
+ .audio_port_id = -1,
+ },
+ .i2s_param[BT_SCO] = {
+ .audio_port_id = 3,
+ .is_i2s_master = 1,
+ .i2s_mode = TEGRA_DAIFMT_DSP_A,
+ },
};
static struct tegra_asoc_platform_data cardhu_audio_max98095_pdata = {
.gpio_hp_mute = -1,
.gpio_int_mic_en = -1,
.gpio_ext_mic_en = -1,
+ .i2s_param[HIFI_CODEC] = {
+ .audio_port_id = 0,
+ .is_i2s_master = 1,
+ .i2s_mode = TEGRA_DAIFMT_I2S,
+ },
+ .i2s_param[BASEBAND] = {
+ .audio_port_id = -1,
+ },
+ .i2s_param[BT_SCO] = {
+ .audio_port_id = 3,
+ .is_i2s_master = 1,
+ .i2s_mode = TEGRA_DAIFMT_DSP_A,
+ },
};
static struct platform_device cardhu_audio_wm8903_device = {
.gpio_int_mic_en = -1,
.gpio_ext_mic_en = -1,
/*defaults for Verbier-Cardhu board with TI AIC326X codec*/
- .audio_port_id = {
- [HIFI_CODEC] = 0,
- [BASEBAND] = -1,
- [BT_SCO] = 3,
+ .i2s_param[HIFI_CODEC] = {
+ .audio_port_id = 0,
+ .is_i2s_master = 1,
+ .i2s_mode = TEGRA_DAIFMT_I2S,
+ .sample_size = 16,
},
- .baseband_param = {
- .rate = -1,
- .channels = -1,
+ .i2s_param[BT_SCO] = {
+ .sample_size = 16,
+ .audio_port_id = 3,
+ .is_i2s_master = 1,
+ .i2s_mode = TEGRA_DAIFMT_DSP_A,
},
};
static void __init tegra_cardhu_init(void)
{
tegra_thermal_init(&thermal_data,
+ &skin_data,
throttle_list,
ARRAY_SIZE(throttle_list));
tegra_clk_init_from_table(cardhu_clk_init_table);