diff options
Diffstat (limited to 'arch/arm/mach-mmp/jasper.c')
-rw-r--r-- | arch/arm/mach-mmp/jasper.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c index cfd4d66ef800..d77dd41d60e1 100644 --- a/arch/arm/mach-mmp/jasper.c +++ b/arch/arm/mach-mmp/jasper.c | |||
@@ -15,12 +15,16 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/regulator/machine.h> | ||
19 | #include <linux/regulator/max8649.h> | ||
20 | #include <linux/mfd/max8925.h> | ||
18 | 21 | ||
19 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
20 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
21 | #include <mach/addr-map.h> | 24 | #include <mach/addr-map.h> |
22 | #include <mach/mfp-mmp2.h> | 25 | #include <mach/mfp-mmp2.h> |
23 | #include <mach/mmp2.h> | 26 | #include <mach/mmp2.h> |
27 | #include <mach/irqs.h> | ||
24 | 28 | ||
25 | #include "common.h" | 29 | #include "common.h" |
26 | 30 | ||
@@ -58,6 +62,63 @@ static unsigned long jasper_pin_config[] __initdata = { | |||
58 | GPIO149_ND_CLE, | 62 | GPIO149_ND_CLE, |
59 | GPIO112_ND_RDY0, | 63 | GPIO112_ND_RDY0, |
60 | GPIO160_ND_RDY1, | 64 | GPIO160_ND_RDY1, |
65 | |||
66 | /* PMIC */ | ||
67 | PMIC_PMIC_INT | MFP_LPM_EDGE_FALL, | ||
68 | }; | ||
69 | |||
70 | static struct regulator_consumer_supply max8649_supply[] = { | ||
71 | REGULATOR_SUPPLY("vcc_core", NULL), | ||
72 | }; | ||
73 | |||
74 | static struct regulator_init_data max8649_init_data = { | ||
75 | .constraints = { | ||
76 | .name = "vcc_core range", | ||
77 | .min_uV = 1150000, | ||
78 | .max_uV = 1280000, | ||
79 | .always_on = 1, | ||
80 | .boot_on = 1, | ||
81 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
82 | }, | ||
83 | .num_consumer_supplies = 1, | ||
84 | .consumer_supplies = &max8649_supply[0], | ||
85 | }; | ||
86 | |||
87 | static struct max8649_platform_data jasper_max8649_info = { | ||
88 | .mode = 2, /* VID1 = 1, VID0 = 0 */ | ||
89 | .extclk = 0, | ||
90 | .ramp_timing = MAX8649_RAMP_32MV, | ||
91 | .regulator = &max8649_init_data, | ||
92 | }; | ||
93 | |||
94 | static struct max8925_backlight_pdata jasper_backlight_data = { | ||
95 | .dual_string = 0, | ||
96 | }; | ||
97 | |||
98 | static struct max8925_power_pdata jasper_power_data = { | ||
99 | .batt_detect = 0, /* can't detect battery by ID pin */ | ||
100 | .topoff_threshold = MAX8925_TOPOFF_THR_10PER, | ||
101 | .fast_charge = MAX8925_FCHG_1000MA, | ||
102 | }; | ||
103 | |||
104 | static struct max8925_platform_data jasper_max8925_info = { | ||
105 | .backlight = &jasper_backlight_data, | ||
106 | .power = &jasper_power_data, | ||
107 | .irq_base = IRQ_BOARD_START, | ||
108 | }; | ||
109 | |||
110 | static struct i2c_board_info jasper_twsi1_info[] = { | ||
111 | [0] = { | ||
112 | .type = "max8649", | ||
113 | .addr = 0x60, | ||
114 | .platform_data = &jasper_max8649_info, | ||
115 | }, | ||
116 | [1] = { | ||
117 | .type = "max8925", | ||
118 | .addr = 0x3c, | ||
119 | .irq = IRQ_MMP2_PMIC, | ||
120 | .platform_data = &jasper_max8925_info, | ||
121 | }, | ||
61 | }; | 122 | }; |
62 | 123 | ||
63 | static void __init jasper_init(void) | 124 | static void __init jasper_init(void) |
@@ -67,6 +128,9 @@ static void __init jasper_init(void) | |||
67 | /* on-chip devices */ | 128 | /* on-chip devices */ |
68 | mmp2_add_uart(1); | 129 | mmp2_add_uart(1); |
69 | mmp2_add_uart(3); | 130 | mmp2_add_uart(3); |
131 | mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(jasper_twsi1_info)); | ||
132 | |||
133 | regulator_has_full_constraints(); | ||
70 | } | 134 | } |
71 | 135 | ||
72 | MACHINE_START(MARVELL_JASPER, "Jasper Development Platform") | 136 | MACHINE_START(MARVELL_JASPER, "Jasper Development Platform") |