1*d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only 2c0718df4SPaul Walmsley /* 3c0718df4SPaul Walmsley * OMAP3 Voltage Processor (VP) data 4c0718df4SPaul Walmsley * 5c0718df4SPaul Walmsley * Copyright (C) 2007, 2010 Texas Instruments, Inc. 6c0718df4SPaul Walmsley * Rajendra Nayak <rnayak@ti.com> 7c0718df4SPaul Walmsley * Lesly A M <x0080970@ti.com> 8c0718df4SPaul Walmsley * Thara Gopinath <thara@ti.com> 9c0718df4SPaul Walmsley * 10c0718df4SPaul Walmsley * Copyright (C) 2008, 2011 Nokia Corporation 11c0718df4SPaul Walmsley * Kalle Jokiniemi 12c0718df4SPaul Walmsley * Paul Walmsley 13c0718df4SPaul Walmsley */ 14c0718df4SPaul Walmsley 15c0718df4SPaul Walmsley #include <linux/io.h> 16c0718df4SPaul Walmsley #include <linux/err.h> 17c0718df4SPaul Walmsley #include <linux/init.h> 18c0718df4SPaul Walmsley 194e65331cSTony Lindgren #include "common.h" 20c0718df4SPaul Walmsley 21c0718df4SPaul Walmsley #include "prm-regbits-34xx.h" 22c0718df4SPaul Walmsley #include "voltage.h" 23c0718df4SPaul Walmsley 24c0718df4SPaul Walmsley #include "vp.h" 2558aaa599SKevin Hilman #include "prm2xxx_3xxx.h" 2658aaa599SKevin Hilman 2758aaa599SKevin Hilman static const struct omap_vp_ops omap3_vp_ops = { 28e9f1ddcdSTero Kristo .check_txdone = omap_prm_vp_check_txdone, 29e9f1ddcdSTero Kristo .clear_txdone = omap_prm_vp_clear_txdone, 3058aaa599SKevin Hilman }; 31c0718df4SPaul Walmsley 32c0718df4SPaul Walmsley /* 33c0718df4SPaul Walmsley * VP data common to 34xx/36xx chips 34c0718df4SPaul Walmsley * XXX This stuff presumably belongs in the vp3xxx.c or vp.c file. 35c0718df4SPaul Walmsley */ 36b7ea803eSKevin Hilman static const struct omap_vp_common omap3_vp_common = { 370ec3041eSKevin Hilman .vpconfig_erroroffset_mask = OMAP3430_ERROROFFSET_MASK, 38c0718df4SPaul Walmsley .vpconfig_errorgain_mask = OMAP3430_ERRORGAIN_MASK, 39c0718df4SPaul Walmsley .vpconfig_initvoltage_mask = OMAP3430_INITVOLTAGE_MASK, 40c0718df4SPaul Walmsley .vpconfig_timeouten = OMAP3430_TIMEOUTEN_MASK, 41c0718df4SPaul Walmsley .vpconfig_initvdd = OMAP3430_INITVDD_MASK, 42c0718df4SPaul Walmsley .vpconfig_forceupdate = OMAP3430_FORCEUPDATE_MASK, 43c0718df4SPaul Walmsley .vpconfig_vpenable = OMAP3430_VPENABLE_MASK, 44c0718df4SPaul Walmsley .vstepmin_smpswaittimemin_shift = OMAP3430_SMPSWAITTIMEMIN_SHIFT, 45c0718df4SPaul Walmsley .vstepmax_smpswaittimemax_shift = OMAP3430_SMPSWAITTIMEMAX_SHIFT, 46c0718df4SPaul Walmsley .vstepmin_stepmin_shift = OMAP3430_VSTEPMIN_SHIFT, 47c0718df4SPaul Walmsley .vstepmax_stepmax_shift = OMAP3430_VSTEPMAX_SHIFT, 48c0718df4SPaul Walmsley .vlimitto_vddmin_shift = OMAP3430_VDDMIN_SHIFT, 49c0718df4SPaul Walmsley .vlimitto_vddmax_shift = OMAP3430_VDDMAX_SHIFT, 50c0718df4SPaul Walmsley .vlimitto_timeout_shift = OMAP3430_TIMEOUT_SHIFT, 51bea30ed6STodd Poynor .vpvoltage_mask = OMAP3430_VPVOLTAGE_MASK, 52bea30ed6STodd Poynor 5358aaa599SKevin Hilman .ops = &omap3_vp_ops, 54c0718df4SPaul Walmsley }; 55c0718df4SPaul Walmsley 56b7ea803eSKevin Hilman struct omap_vp_instance omap3_vp_mpu = { 5758aaa599SKevin Hilman .id = OMAP3_VP_VDD_MPU_ID, 58b7ea803eSKevin Hilman .common = &omap3_vp_common, 59c0718df4SPaul Walmsley .vpconfig = OMAP3_PRM_VP1_CONFIG_OFFSET, 60c0718df4SPaul Walmsley .vstepmin = OMAP3_PRM_VP1_VSTEPMIN_OFFSET, 61c0718df4SPaul Walmsley .vstepmax = OMAP3_PRM_VP1_VSTEPMAX_OFFSET, 62c0718df4SPaul Walmsley .vlimitto = OMAP3_PRM_VP1_VLIMITTO_OFFSET, 63c0718df4SPaul Walmsley .vstatus = OMAP3_PRM_VP1_STATUS_OFFSET, 64c0718df4SPaul Walmsley .voltage = OMAP3_PRM_VP1_VOLTAGE_OFFSET, 65c0718df4SPaul Walmsley }; 66c0718df4SPaul Walmsley 67b7ea803eSKevin Hilman struct omap_vp_instance omap3_vp_core = { 6858aaa599SKevin Hilman .id = OMAP3_VP_VDD_CORE_ID, 69b7ea803eSKevin Hilman .common = &omap3_vp_common, 70c0718df4SPaul Walmsley .vpconfig = OMAP3_PRM_VP2_CONFIG_OFFSET, 71c0718df4SPaul Walmsley .vstepmin = OMAP3_PRM_VP2_VSTEPMIN_OFFSET, 72c0718df4SPaul Walmsley .vstepmax = OMAP3_PRM_VP2_VSTEPMAX_OFFSET, 73c0718df4SPaul Walmsley .vlimitto = OMAP3_PRM_VP2_VLIMITTO_OFFSET, 74c0718df4SPaul Walmsley .vstatus = OMAP3_PRM_VP2_STATUS_OFFSET, 75c0718df4SPaul Walmsley .voltage = OMAP3_PRM_VP2_VOLTAGE_OFFSET, 76c0718df4SPaul Walmsley }; 778b5d8c0dSTero Kristo 788b5d8c0dSTero Kristo struct omap_vp_param omap3_mpu_vp_data = { 798b5d8c0dSTero Kristo .vddmin = OMAP3430_VP1_VLIMITTO_VDDMIN, 808b5d8c0dSTero Kristo .vddmax = OMAP3430_VP1_VLIMITTO_VDDMAX, 818b5d8c0dSTero Kristo }; 828b5d8c0dSTero Kristo 838b5d8c0dSTero Kristo struct omap_vp_param omap3_core_vp_data = { 848b5d8c0dSTero Kristo .vddmin = OMAP3430_VP2_VLIMITTO_VDDMIN, 858b5d8c0dSTero Kristo .vddmax = OMAP3430_VP2_VLIMITTO_VDDMAX, 868b5d8c0dSTero Kristo }; 87