aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c153
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.h19
-rw-r--r--arch/arm/mach-ux500/board-mop500.c3
3 files changed, 96 insertions, 79 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 1187f1fc2e5..533967c2d09 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -3,99 +3,94 @@
3 * 3 *
4 * License Terms: GNU General Public License v2 4 * License Terms: GNU General Public License v2
5 * 5 *
6 * Author: Sundar Iyer <sundar.iyer@stericsson.com> 6 * Authors: Sundar Iyer <sundar.iyer@stericsson.com>
7 * Bengt Jonsson <bengt.g.jonsson@stericsson.com>
7 * 8 *
8 * MOP500 board specific initialization for regulators 9 * MOP500 board specific initialization for regulators
9 */ 10 */
10#include <linux/kernel.h> 11#include <linux/kernel.h>
11#include <linux/regulator/machine.h> 12#include <linux/regulator/machine.h>
13#include <linux/regulator/ab8500.h>
12 14
13/* supplies to the display/camera */ 15/* AB8500 regulators */
14static struct regulator_init_data ab8500_vaux1_regulator = { 16struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
15 .constraints = { 17 /* supplies to the display/camera */
16 .name = "V-DISPLAY", 18 [AB8500_LDO_AUX1] = {
17 .min_uV = 2500000, 19 .constraints = {
18 .max_uV = 2900000, 20 .name = "V-DISPLAY",
19 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| 21 .min_uV = 2500000,
20 REGULATOR_CHANGE_STATUS, 22 .max_uV = 2900000,
23 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
24 REGULATOR_CHANGE_STATUS,
25 },
21 }, 26 },
22}; 27 /* supplies to the on-board eMMC */
23 28 [AB8500_LDO_AUX2] = {
24/* supplies to the on-board eMMC */ 29 .constraints = {
25static struct regulator_init_data ab8500_vaux2_regulator = { 30 .name = "V-eMMC1",
26 .constraints = { 31 .min_uV = 1100000,
27 .name = "V-eMMC1", 32 .max_uV = 3300000,
28 .min_uV = 1100000, 33 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
29 .max_uV = 3300000, 34 REGULATOR_CHANGE_STATUS,
30 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| 35 },
31 REGULATOR_CHANGE_STATUS,
32 }, 36 },
33}; 37 /* supply for VAUX3, supplies to SDcard slots */
34 38 [AB8500_LDO_AUX3] = {
35/* supply for VAUX3, supplies to SDcard slots */ 39 .constraints = {
36static struct regulator_init_data ab8500_vaux3_regulator = { 40 .name = "V-MMC-SD",
37 .constraints = { 41 .min_uV = 1100000,
38 .name = "V-MMC-SD", 42 .max_uV = 3300000,
39 .min_uV = 1100000, 43 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
40 .max_uV = 3300000, 44 REGULATOR_CHANGE_STATUS,
41 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| 45 },
42 REGULATOR_CHANGE_STATUS,
43 }, 46 },
44}; 47 /* supply for tvout, gpadc, TVOUT LDO */
45 48 [AB8500_LDO_TVOUT] = {
46/* supply for tvout, gpadc, TVOUT LDO */ 49 .constraints = {
47static struct regulator_init_data ab8500_vtvout_init = { 50 .name = "V-TVOUT",
48 .constraints = { 51 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
49 .name = "V-TVOUT", 52 },
50 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
51 }, 53 },
52}; 54 /* supply for ab8500-vaudio, VAUDIO LDO */
53 55 [AB8500_LDO_AUDIO] = {
54/* supply for ab8500-vaudio, VAUDIO LDO */ 56 .constraints = {
55static struct regulator_init_data ab8500_vaudio_init = { 57 .name = "V-AUD",
56 .constraints = { 58 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
57 .name = "V-AUD", 59 },
58 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
59 }, 60 },
60}; 61 /* supply for v-anamic1 VAMic1-LDO */
61 62 [AB8500_LDO_ANAMIC1] = {
62/* supply for v-anamic1 VAMic1-LDO */ 63 .constraints = {
63static struct regulator_init_data ab8500_vamic1_init = { 64 .name = "V-AMIC1",
64 .constraints = { 65 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
65 .name = "V-AMIC1", 66 },
66 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
67 }, 67 },
68}; 68 /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
69 69 [AB8500_LDO_ANAMIC2] = {
70/* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */ 70 .constraints = {
71static struct regulator_init_data ab8500_vamic2_init = { 71 .name = "V-AMIC2",
72 .constraints = { 72 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
73 .name = "V-AMIC2", 73 },
74 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
75 }, 74 },
76}; 75 /* supply for v-dmic, VDMIC LDO */
77 76 [AB8500_LDO_DMIC] = {
78/* supply for v-dmic, VDMIC LDO */ 77 .constraints = {
79static struct regulator_init_data ab8500_vdmic_init = { 78 .name = "V-DMIC",
80 .constraints = { 79 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
81 .name = "V-DMIC", 80 },
82 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
83 }, 81 },
84}; 82 /* supply for v-intcore12, VINTCORE12 LDO */
85 83 [AB8500_LDO_INTCORE] = {
86/* supply for v-intcore12, VINTCORE12 LDO */ 84 .constraints = {
87static struct regulator_init_data ab8500_vintcore_init = { 85 .name = "V-INTCORE",
88 .constraints = { 86 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
89 .name = "V-INTCORE", 87 },
90 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
91 }, 88 },
92}; 89 /* supply for U8500 CSI/DSI, VANA LDO */
93 90 [AB8500_LDO_ANA] = {
94/* supply for U8500 CSI/DSI, VANA LDO */ 91 .constraints = {
95static struct regulator_init_data ab8500_vana_init = { 92 .name = "V-CSI/DSI",
96 .constraints = { 93 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
97 .name = "V-CSI/DSI", 94 },
98 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
99 }, 95 },
100}; 96};
101
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h
new file mode 100644
index 00000000000..2675fae5253
--- /dev/null
+++ b/arch/arm/mach-ux500/board-mop500-regulators.h
@@ -0,0 +1,19 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License v2
5 *
6 * Author: Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
7 *
8 * MOP500 board specific initialization for regulators
9 */
10
11#ifndef __BOARD_MOP500_REGULATORS_H
12#define __BOARD_MOP500_REGULATORS_H
13
14#include <linux/regulator/machine.h>
15#include <linux/regulator/ab8500.h>
16
17extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
18
19#endif
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index a1c9ea1a66d..a393f57ed2a 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -35,6 +35,7 @@
35#include "devices-db8500.h" 35#include "devices-db8500.h"
36#include "pins-db8500.h" 36#include "pins-db8500.h"
37#include "board-mop500.h" 37#include "board-mop500.h"
38#include "board-mop500-regulators.h"
38 39
39static pin_cfg_t mop500_pins[] = { 40static pin_cfg_t mop500_pins[] = {
40 /* SSP0 */ 41 /* SSP0 */
@@ -80,6 +81,8 @@ static pin_cfg_t mop500_pins[] = {
80 81
81static struct ab8500_platform_data ab8500_platdata = { 82static struct ab8500_platform_data ab8500_platdata = {
82 .irq_base = MOP500_AB8500_IRQ_BASE, 83 .irq_base = MOP500_AB8500_IRQ_BASE,
84 .regulator = ab8500_regulators,
85 .num_regulator = ARRAY_SIZE(ab8500_regulators),
83}; 86};
84 87
85static struct resource ab8500_resources[] = { 88static struct resource ab8500_resources[] = {