1c0718df4SPaul Walmsley /* 2c0718df4SPaul Walmsley * OMAP4 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 21c0718df4SPaul Walmsley #include <plat/common.h> 22c0718df4SPaul Walmsley 23c0718df4SPaul Walmsley #include "prm44xx.h" 24c0718df4SPaul Walmsley #include "prm-regbits-44xx.h" 25c0718df4SPaul Walmsley #include "voltage.h" 26c0718df4SPaul Walmsley 27c0718df4SPaul Walmsley #include "vc.h" 28c0718df4SPaul Walmsley 29c0718df4SPaul Walmsley /* 30c0718df4SPaul Walmsley * VC data common to 44xx chips 31c0718df4SPaul Walmsley * XXX This stuff presumably belongs in the vc3xxx.c or vc.c file. 32c0718df4SPaul Walmsley */ 33d84adcf4SKevin Hilman static const struct omap_vc_common omap4_vc_common = { 34a7460dafSKevin Hilman .prm_mod = OMAP4430_PRM_DEVICE_INST, 35c0718df4SPaul Walmsley .smps_sa_reg = OMAP4_PRM_VC_SMPS_SA_OFFSET, 36c0718df4SPaul Walmsley .smps_volra_reg = OMAP4_PRM_VC_VAL_SMPS_RA_VOL_OFFSET, 37c0718df4SPaul Walmsley .bypass_val_reg = OMAP4_PRM_VC_VAL_BYPASS_OFFSET, 38c0718df4SPaul Walmsley .data_shift = OMAP4430_DATA_SHIFT, 39c0718df4SPaul Walmsley .slaveaddr_shift = OMAP4430_SLAVEADDR_SHIFT, 40c0718df4SPaul Walmsley .regaddr_shift = OMAP4430_REGADDR_SHIFT, 41c0718df4SPaul Walmsley .valid = OMAP4430_VALID_MASK, 42c0718df4SPaul Walmsley .cmd_on_shift = OMAP4430_ON_SHIFT, 43c0718df4SPaul Walmsley .cmd_on_mask = OMAP4430_ON_MASK, 44c0718df4SPaul Walmsley .cmd_onlp_shift = OMAP4430_ONLP_SHIFT, 45c0718df4SPaul Walmsley .cmd_ret_shift = OMAP4430_RET_SHIFT, 46c0718df4SPaul Walmsley .cmd_off_shift = OMAP4430_OFF_SHIFT, 47c0718df4SPaul Walmsley }; 48c0718df4SPaul Walmsley 49c0718df4SPaul Walmsley /* VC instance data for each controllable voltage line */ 50d84adcf4SKevin Hilman struct omap_vc_channel omap4_vc_mpu = { 51d84adcf4SKevin Hilman .common = &omap4_vc_common, 52c0718df4SPaul Walmsley .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_MPU_L_OFFSET, 53c0718df4SPaul Walmsley .smps_sa_shift = OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_SHIFT, 54c0718df4SPaul Walmsley .smps_sa_mask = OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK, 55c0718df4SPaul Walmsley .smps_volra_shift = OMAP4430_VOLRA_VDD_MPU_L_SHIFT, 56c0718df4SPaul Walmsley .smps_volra_mask = OMAP4430_VOLRA_VDD_MPU_L_MASK, 57c0718df4SPaul Walmsley }; 58c0718df4SPaul Walmsley 59d84adcf4SKevin Hilman struct omap_vc_channel omap4_vc_iva = { 60d84adcf4SKevin Hilman .common = &omap4_vc_common, 61c0718df4SPaul Walmsley .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_IVA_L_OFFSET, 62c0718df4SPaul Walmsley .smps_sa_shift = OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_SHIFT, 63c0718df4SPaul Walmsley .smps_sa_mask = OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK, 64c0718df4SPaul Walmsley .smps_volra_shift = OMAP4430_VOLRA_VDD_IVA_L_SHIFT, 65c0718df4SPaul Walmsley .smps_volra_mask = OMAP4430_VOLRA_VDD_IVA_L_MASK, 66c0718df4SPaul Walmsley }; 67c0718df4SPaul Walmsley 68d84adcf4SKevin Hilman struct omap_vc_channel omap4_vc_core = { 69d84adcf4SKevin Hilman .common = &omap4_vc_common, 70c0718df4SPaul Walmsley .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_CORE_L_OFFSET, 71c0718df4SPaul Walmsley .smps_sa_shift = OMAP4430_SA_VDD_CORE_L_0_6_SHIFT, 72c0718df4SPaul Walmsley .smps_sa_mask = OMAP4430_SA_VDD_CORE_L_0_6_MASK, 73c0718df4SPaul Walmsley .smps_volra_shift = OMAP4430_VOLRA_VDD_CORE_L_SHIFT, 74c0718df4SPaul Walmsley .smps_volra_mask = OMAP4430_VOLRA_VDD_CORE_L_MASK, 75c0718df4SPaul Walmsley }; 76c0718df4SPaul Walmsley 77