xref: /linux/arch/arm/mach-omap2/vc3xxx_data.c (revision f9d29f1617eb1b2f1fd41622bd1a0fc51658d2f0)
1c0718df4SPaul Walmsley /*
2c0718df4SPaul Walmsley  * OMAP3 Voltage Controller (VC) data
3c0718df4SPaul Walmsley  *
4c0718df4SPaul Walmsley  * Copyright (C) 2007, 2010 Texas Instruments, Inc.
5c0718df4SPaul Walmsley  * Rajendra Nayak <rnayak@ti.com>
6c0718df4SPaul Walmsley  * Lesly A M <x0080970@ti.com>
7c0718df4SPaul Walmsley  * Thara Gopinath <thara@ti.com>
8c0718df4SPaul Walmsley  *
9c0718df4SPaul Walmsley  * Copyright (C) 2008, 2011 Nokia Corporation
10c0718df4SPaul Walmsley  * Kalle Jokiniemi
11c0718df4SPaul Walmsley  * Paul Walmsley
12c0718df4SPaul Walmsley  *
13c0718df4SPaul Walmsley  * This program is free software; you can redistribute it and/or modify
14c0718df4SPaul Walmsley  * it under the terms of the GNU General Public License version 2 as
15c0718df4SPaul Walmsley  * published by the Free Software Foundation.
16c0718df4SPaul Walmsley  */
17c0718df4SPaul Walmsley #include <linux/io.h>
18c0718df4SPaul Walmsley #include <linux/err.h>
19c0718df4SPaul Walmsley #include <linux/init.h>
20c0718df4SPaul Walmsley 
214e65331cSTony Lindgren #include "common.h"
22c0718df4SPaul Walmsley 
23c0718df4SPaul Walmsley #include "prm-regbits-34xx.h"
24c0718df4SPaul Walmsley #include "voltage.h"
25c0718df4SPaul Walmsley 
26c0718df4SPaul Walmsley #include "vc.h"
27c0718df4SPaul Walmsley 
28c0718df4SPaul Walmsley /*
29c0718df4SPaul Walmsley  * VC data common to 34xx/36xx chips
30c0718df4SPaul Walmsley  * XXX This stuff presumably belongs in the vc3xxx.c or vc.c file.
31c0718df4SPaul Walmsley  */
32d84adcf4SKevin Hilman static struct omap_vc_common omap3_vc_common = {
33c0718df4SPaul Walmsley 	.bypass_val_reg	 = OMAP3_PRM_VC_BYPASS_VAL_OFFSET,
34c0718df4SPaul Walmsley 	.data_shift	 = OMAP3430_DATA_SHIFT,
35c0718df4SPaul Walmsley 	.slaveaddr_shift = OMAP3430_SLAVEADDR_SHIFT,
36c0718df4SPaul Walmsley 	.regaddr_shift	 = OMAP3430_REGADDR_SHIFT,
37c0718df4SPaul Walmsley 	.valid		 = OMAP3430_VALID_MASK,
38c0718df4SPaul Walmsley 	.cmd_on_shift	 = OMAP3430_VC_CMD_ON_SHIFT,
39c0718df4SPaul Walmsley 	.cmd_on_mask	 = OMAP3430_VC_CMD_ON_MASK,
40c0718df4SPaul Walmsley 	.cmd_onlp_shift	 = OMAP3430_VC_CMD_ONLP_SHIFT,
41c0718df4SPaul Walmsley 	.cmd_ret_shift	 = OMAP3430_VC_CMD_RET_SHIFT,
42c0718df4SPaul Walmsley 	.cmd_off_shift	 = OMAP3430_VC_CMD_OFF_SHIFT,
43f5395480SKevin Hilman 	.i2c_cfg_hsen_mask = OMAP3430_HSEN_MASK,
44f5395480SKevin Hilman 	.i2c_cfg_reg	 = OMAP3_PRM_VC_I2C_CFG_OFFSET,
45f5395480SKevin Hilman 	.i2c_mcode_mask	 = OMAP3430_MCODE_MASK,
46c0718df4SPaul Walmsley };
47c0718df4SPaul Walmsley 
48d84adcf4SKevin Hilman struct omap_vc_channel omap3_vc_mpu = {
49*f9d29f16STero Kristo 	.flags = OMAP_VC_CHANNEL_DEFAULT,
50d84adcf4SKevin Hilman 	.common = &omap3_vc_common,
515876c940SKevin Hilman 	.smps_sa_reg	 = OMAP3_PRM_VC_SMPS_SA_OFFSET,
525876c940SKevin Hilman 	.smps_volra_reg	 = OMAP3_PRM_VC_SMPS_VOL_RA_OFFSET,
535876c940SKevin Hilman 	.smps_cmdra_reg	 = OMAP3_PRM_VC_SMPS_CMD_RA_OFFSET,
545876c940SKevin Hilman 	.cfg_channel_reg = OMAP3_PRM_VC_CH_CONF_OFFSET,
55c0718df4SPaul Walmsley 	.cmdval_reg = OMAP3_PRM_VC_CMD_VAL_0_OFFSET,
56c0718df4SPaul Walmsley 	.smps_sa_mask = OMAP3430_PRM_VC_SMPS_SA_SA0_MASK,
57c0718df4SPaul Walmsley 	.smps_volra_mask = OMAP3430_VOLRA0_MASK,
58e4e021c5SKevin Hilman 	.smps_cmdra_mask = OMAP3430_CMDRA0_MASK,
5924d3194aSKevin Hilman 	.cfg_channel_sa_shift = OMAP3430_PRM_VC_SMPS_SA_SA0_SHIFT,
60c0718df4SPaul Walmsley };
61c0718df4SPaul Walmsley 
62d84adcf4SKevin Hilman struct omap_vc_channel omap3_vc_core = {
63d84adcf4SKevin Hilman 	.common = &omap3_vc_common,
645876c940SKevin Hilman 	.smps_sa_reg	 = OMAP3_PRM_VC_SMPS_SA_OFFSET,
655876c940SKevin Hilman 	.smps_volra_reg	 = OMAP3_PRM_VC_SMPS_VOL_RA_OFFSET,
665876c940SKevin Hilman 	.smps_cmdra_reg	 = OMAP3_PRM_VC_SMPS_CMD_RA_OFFSET,
675876c940SKevin Hilman 	.cfg_channel_reg = OMAP3_PRM_VC_CH_CONF_OFFSET,
68c0718df4SPaul Walmsley 	.cmdval_reg = OMAP3_PRM_VC_CMD_VAL_1_OFFSET,
69c0718df4SPaul Walmsley 	.smps_sa_mask = OMAP3430_PRM_VC_SMPS_SA_SA1_MASK,
70c0718df4SPaul Walmsley 	.smps_volra_mask = OMAP3430_VOLRA1_MASK,
71e4e021c5SKevin Hilman 	.smps_cmdra_mask = OMAP3430_CMDRA1_MASK,
7224d3194aSKevin Hilman 	.cfg_channel_sa_shift = OMAP3430_PRM_VC_SMPS_SA_SA1_SHIFT,
73c0718df4SPaul Walmsley };
74