1 // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 3 * OMAP3 Voltage Controller (VC) data 4 * 5 * Copyright (C) 2007, 2010 Texas Instruments, 6 * Rajendra Nayak <rnayak@ti.com> 7 * Lesly A M <x0080970@ti.com> 8 * Thara Gopinath <thara@ti.com> 9 * 10 * Copyright (C) 2008, 2011 Nokia Corporation 11 * Kalle Jokiniemi 12 * Paul Walmsley 13 */ 14 #include <linux/io.h> 15 #include <linux/err.h> 16 #include <linux/init.h> 17 18 #include "common.h" 19 20 #include "prm-regbits-34xx.h" 21 #include "voltage.h" 22 23 #include "vc.h" 24 25 /* 26 * VC data common to 34xx/36xx chips 27 * XXX This stuff presumably belongs in the vc 28 */ 29 static struct omap_vc_common omap3_vc_common = 30 .bypass_val_reg = OMAP3_PRM_VC_BYPASS 31 .data_shift = OMAP3430_DATA_SHIFT 32 .slaveaddr_shift = OMAP3430_SLAVEADDR_ 33 .regaddr_shift = OMAP3430_REGADDR_SH 34 .valid = OMAP3430_VALID_MASK 35 .cmd_on_shift = OMAP3430_VC_CMD_ON_ 36 .cmd_on_mask = OMAP3430_VC_CMD_ON_ 37 .cmd_onlp_shift = OMAP3430_VC_CMD_ONL 38 .cmd_ret_shift = OMAP3430_VC_CMD_RET 39 .cmd_off_shift = OMAP3430_VC_CMD_OFF 40 .i2c_cfg_clear_mask = OMAP3430_SREN_MA 41 .i2c_cfg_hsen_mask = OMAP3430_HSEN_MAS 42 .i2c_cfg_reg = OMAP3_PRM_VC_I2C_CF 43 .i2c_mcode_mask = OMAP3430_MCODE_MASK 44 }; 45 46 struct omap_vc_channel omap3_vc_mpu = { 47 .flags = OMAP_VC_CHANNEL_DEFAULT, 48 .common = &omap3_vc_common, 49 .smps_sa_reg = OMAP3_PRM_VC_SMPS_S 50 .smps_volra_reg = OMAP3_PRM_VC_SMPS_V 51 .smps_cmdra_reg = OMAP3_PRM_VC_SMPS_C 52 .cfg_channel_reg = OMAP3_PRM_VC_CH_CON 53 .cmdval_reg = OMAP3_PRM_VC_CMD_VAL_0_O 54 .smps_sa_mask = OMAP3430_PRM_VC_SMPS_S 55 .smps_volra_mask = OMAP3430_VOLRA0_MAS 56 .smps_cmdra_mask = OMAP3430_CMDRA0_MAS 57 .cfg_channel_sa_shift = OMAP3430_PRM_V 58 }; 59 60 struct omap_vc_channel omap3_vc_core = { 61 .common = &omap3_vc_common, 62 .smps_sa_reg = OMAP3_PRM_VC_SMPS_S 63 .smps_volra_reg = OMAP3_PRM_VC_SMPS_V 64 .smps_cmdra_reg = OMAP3_PRM_VC_SMPS_C 65 .cfg_channel_reg = OMAP3_PRM_VC_CH_CON 66 .cmdval_reg = OMAP3_PRM_VC_CMD_VAL_1_O 67 .smps_sa_mask = OMAP3430_PRM_VC_SMPS_S 68 .smps_volra_mask = OMAP3430_VOLRA1_MAS 69 .smps_cmdra_mask = OMAP3430_CMDRA1_MAS 70 .cfg_channel_sa_shift = OMAP3430_PRM_V 71 }; 72 73 /* 74 * Voltage levels for different operating mode 75 */ 76 #define OMAP3_ON_VOLTAGE_UV 120000 77 #define OMAP3_ONLP_VOLTAGE_UV 100000 78 #define OMAP3_RET_VOLTAGE_UV 975000 79 #define OMAP3_OFF_VOLTAGE_UV 600000 80 81 struct omap_vc_param omap3_mpu_vc_data = { 82 .on = OMAP3_ON_VOLTAGE_UV, 83 .onlp = OMAP3_ONLP_VOLTAGE_U 84 .ret = OMAP3_RET_VOLTAGE_UV 85 .off = OMAP3_OFF_VOLTAGE_UV 86 }; 87 88 struct omap_vc_param omap3_core_vc_data = { 89 .on = OMAP3_ON_VOLTAGE_UV, 90 .onlp = OMAP3_ONLP_VOLTAGE_U 91 .ret = OMAP3_RET_VOLTAGE_UV 92 .off = OMAP3_OFF_VOLTAGE_UV 93 }; 94
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.