ARM: tegra12: set CPU rate to 2.2GHz for sku 0x87
[linux-3.10.git] / arch / arm / mach-tegra / board-roth-powermon.c
1 /*
2  * arch/arm/mach-tegra/board-roth-powermon.c
3  *
4  * Copyright (c) 2011-2013, NVIDIA CORPORATION. All Rights Reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #include <linux/i2c.h>
20 #include <linux/ina3221.h>
21
22 #include "board.h"
23 #include "board-roth.h"
24
25 enum {
26         VDD_DDR_CORE_CPU,
27 };
28
29 static struct ina3221_platform_data power_mon_info[] = {
30         [VDD_DDR_CORE_CPU] = {
31                 .rail_name = {"VDD_SYS_DDR_IN", "VDD_SYS_SOC_IN",
32                                                         "VDD_SYS_CPU_IN"},
33                 .shunt_resistor = {10, 10, 10},
34                 .cont_conf_data = INA3221_CONT_CONFIG_DATA,
35                 .trig_conf_data = INA3221_TRIG_CONFIG_DATA,
36         },
37 };
38
39 enum {
40         INA_I2C_ADDR_40,
41 };
42
43 static struct i2c_board_info roth_i2c1_ina3221_board_info[] = {
44         [INA_I2C_ADDR_40] = {
45                 I2C_BOARD_INFO("ina3221", 0x40),
46                 .platform_data = &power_mon_info[VDD_DDR_CORE_CPU],
47                 .irq = -1,
48         },
49 };
50
51 int __init roth_pmon_init(void)
52 {
53         pr_info("INA3221: registering device\n");
54         i2c_register_board_info(1, roth_i2c1_ina3221_board_info,
55                 ARRAY_SIZE(roth_i2c1_ina3221_board_info));
56
57         return 0;
58 }