Commit | Line | Data |
---|---|---|
d2912cb1 | 1 | // SPDX-License-Identifier: GPL-2.0-only |
c0718df4 PW |
2 | /* |
3 | * OMAP3 Voltage Processor (VP) data | |
4 | * | |
5 | * Copyright (C) 2007, 2010 Texas Instruments, Inc. | |
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 | |
c0718df4 PW |
13 | */ |
14 | ||
15 | #include <linux/io.h> | |
16 | #include <linux/err.h> | |
17 | #include <linux/init.h> | |
18 | ||
4e65331c | 19 | #include "common.h" |
c0718df4 PW |
20 | |
21 | #include "prm-regbits-34xx.h" | |
22 | #include "voltage.h" | |
23 | ||
24 | #include "vp.h" | |
58aaa599 KH |
25 | #include "prm2xxx_3xxx.h" |
26 | ||
27 | static const struct omap_vp_ops omap3_vp_ops = { | |
e9f1ddcd TK |
28 | .check_txdone = omap_prm_vp_check_txdone, |
29 | .clear_txdone = omap_prm_vp_clear_txdone, | |
58aaa599 | 30 | }; |
c0718df4 PW |
31 | |
32 | /* | |
33 | * VP data common to 34xx/36xx chips | |
34 | * XXX This stuff presumably belongs in the vp3xxx.c or vp.c file. | |
35 | */ | |
b7ea803e | 36 | static const struct omap_vp_common omap3_vp_common = { |
0ec3041e | 37 | .vpconfig_erroroffset_mask = OMAP3430_ERROROFFSET_MASK, |
c0718df4 | 38 | .vpconfig_errorgain_mask = OMAP3430_ERRORGAIN_MASK, |
c0718df4 PW |
39 | .vpconfig_initvoltage_mask = OMAP3430_INITVOLTAGE_MASK, |
40 | .vpconfig_timeouten = OMAP3430_TIMEOUTEN_MASK, | |
41 | .vpconfig_initvdd = OMAP3430_INITVDD_MASK, | |
42 | .vpconfig_forceupdate = OMAP3430_FORCEUPDATE_MASK, | |
43 | .vpconfig_vpenable = OMAP3430_VPENABLE_MASK, | |
44 | .vstepmin_smpswaittimemin_shift = OMAP3430_SMPSWAITTIMEMIN_SHIFT, | |
45 | .vstepmax_smpswaittimemax_shift = OMAP3430_SMPSWAITTIMEMAX_SHIFT, | |
46 | .vstepmin_stepmin_shift = OMAP3430_VSTEPMIN_SHIFT, | |
47 | .vstepmax_stepmax_shift = OMAP3430_VSTEPMAX_SHIFT, | |
48 | .vlimitto_vddmin_shift = OMAP3430_VDDMIN_SHIFT, | |
49 | .vlimitto_vddmax_shift = OMAP3430_VDDMAX_SHIFT, | |
50 | .vlimitto_timeout_shift = OMAP3430_TIMEOUT_SHIFT, | |
bea30ed6 TP |
51 | .vpvoltage_mask = OMAP3430_VPVOLTAGE_MASK, |
52 | ||
58aaa599 | 53 | .ops = &omap3_vp_ops, |
c0718df4 PW |
54 | }; |
55 | ||
b7ea803e | 56 | struct omap_vp_instance omap3_vp_mpu = { |
58aaa599 | 57 | .id = OMAP3_VP_VDD_MPU_ID, |
b7ea803e | 58 | .common = &omap3_vp_common, |
c0718df4 PW |
59 | .vpconfig = OMAP3_PRM_VP1_CONFIG_OFFSET, |
60 | .vstepmin = OMAP3_PRM_VP1_VSTEPMIN_OFFSET, | |
61 | .vstepmax = OMAP3_PRM_VP1_VSTEPMAX_OFFSET, | |
62 | .vlimitto = OMAP3_PRM_VP1_VLIMITTO_OFFSET, | |
63 | .vstatus = OMAP3_PRM_VP1_STATUS_OFFSET, | |
64 | .voltage = OMAP3_PRM_VP1_VOLTAGE_OFFSET, | |
c0718df4 PW |
65 | }; |
66 | ||
b7ea803e | 67 | struct omap_vp_instance omap3_vp_core = { |
58aaa599 | 68 | .id = OMAP3_VP_VDD_CORE_ID, |
b7ea803e | 69 | .common = &omap3_vp_common, |
c0718df4 PW |
70 | .vpconfig = OMAP3_PRM_VP2_CONFIG_OFFSET, |
71 | .vstepmin = OMAP3_PRM_VP2_VSTEPMIN_OFFSET, | |
72 | .vstepmax = OMAP3_PRM_VP2_VSTEPMAX_OFFSET, | |
73 | .vlimitto = OMAP3_PRM_VP2_VLIMITTO_OFFSET, | |
74 | .vstatus = OMAP3_PRM_VP2_STATUS_OFFSET, | |
75 | .voltage = OMAP3_PRM_VP2_VOLTAGE_OFFSET, | |
c0718df4 | 76 | }; |
8b5d8c0d TK |
77 | |
78 | struct omap_vp_param omap3_mpu_vp_data = { | |
79 | .vddmin = OMAP3430_VP1_VLIMITTO_VDDMIN, | |
80 | .vddmax = OMAP3430_VP1_VLIMITTO_VDDMAX, | |
81 | }; | |
82 | ||
83 | struct omap_vp_param omap3_core_vp_data = { | |
84 | .vddmin = OMAP3430_VP2_VLIMITTO_VDDMIN, | |
85 | .vddmax = OMAP3430_VP2_VLIMITTO_VDDMAX, | |
86 | }; |