diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-11 17:07:05 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-11 17:07:05 -0400 |
commit | 5ae794735c96f7be21a49c4e57fb8579174132be (patch) | |
tree | 40943996be636bde6875b7988760ba1a5c644013 /arch/arm/mach-shmobile | |
parent | b315ec06e0590ca0aa60a856420d6b698ab896b1 (diff) | |
parent | 8778b8f46a7c567fc5b19b0eb4a47f51e5064e3c (diff) |
Merge branch 'renesas-ap4evb' into renesas-board
* renesas-ap4evb:
ARM: mach-shmobile: add fixed voltage regulators to ap4evb
ARM: shmobile: use common extra gpio functions on ap4evb
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 7cac1df3085c..f172ca85905c 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include <linux/i2c/tsc2007.h> | 35 | #include <linux/i2c/tsc2007.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | #include <linux/regulator/fixed.h> | ||
38 | #include <linux/regulator/machine.h> | ||
37 | #include <linux/smsc911x.h> | 39 | #include <linux/smsc911x.h> |
38 | #include <linux/sh_intc.h> | 40 | #include <linux/sh_intc.h> |
39 | #include <linux/sh_clk.h> | 41 | #include <linux/sh_clk.h> |
@@ -159,6 +161,27 @@ | |||
159 | * CN12: 3.3v | 161 | * CN12: 3.3v |
160 | */ | 162 | */ |
161 | 163 | ||
164 | /* Dummy supplies, where voltage doesn't matter */ | ||
165 | static struct regulator_consumer_supply fixed1v8_power_consumers[] = | ||
166 | { | ||
167 | /* J22 default position: 1.8V */ | ||
168 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), | ||
169 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), | ||
170 | REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), | ||
171 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"), | ||
172 | }; | ||
173 | |||
174 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = | ||
175 | { | ||
176 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | ||
177 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | ||
178 | }; | ||
179 | |||
180 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
181 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
182 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
183 | }; | ||
184 | |||
162 | /* MTD */ | 185 | /* MTD */ |
163 | static struct mtd_partition nor_flash_partitions[] = { | 186 | static struct mtd_partition nor_flash_partitions[] = { |
164 | { | 187 | { |
@@ -1138,21 +1161,6 @@ static void __init fsi_init_pm_clock(void) | |||
1138 | clk_put(fsia_ick); | 1161 | clk_put(fsia_ick); |
1139 | } | 1162 | } |
1140 | 1163 | ||
1141 | /* | ||
1142 | * FIXME !! | ||
1143 | * | ||
1144 | * gpio_no_direction | ||
1145 | * are quick_hack. | ||
1146 | * | ||
1147 | * current gpio frame work doesn't have | ||
1148 | * the method to control only pull up/down/free. | ||
1149 | * this function should be replaced by correct gpio function | ||
1150 | */ | ||
1151 | static void __init gpio_no_direction(u32 addr) | ||
1152 | { | ||
1153 | __raw_writeb(0x00, addr); | ||
1154 | } | ||
1155 | |||
1156 | /* TouchScreen */ | 1164 | /* TouchScreen */ |
1157 | #ifdef CONFIG_AP4EVB_QHD | 1165 | #ifdef CONFIG_AP4EVB_QHD |
1158 | # define GPIO_TSC_IRQ GPIO_FN_IRQ28_123 | 1166 | # define GPIO_TSC_IRQ GPIO_FN_IRQ28_123 |
@@ -1224,6 +1232,12 @@ static void __init ap4evb_init(void) | |||
1224 | u32 srcr4; | 1232 | u32 srcr4; |
1225 | struct clk *clk; | 1233 | struct clk *clk; |
1226 | 1234 | ||
1235 | regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers, | ||
1236 | ARRAY_SIZE(fixed1v8_power_consumers), 1800000); | ||
1237 | regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers, | ||
1238 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | ||
1239 | regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
1240 | |||
1227 | /* External clock source */ | 1241 | /* External clock source */ |
1228 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | 1242 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); |
1229 | 1243 | ||
@@ -1302,8 +1316,8 @@ static void __init ap4evb_init(void) | |||
1302 | 1316 | ||
1303 | gpio_request(GPIO_PORT9, NULL); | 1317 | gpio_request(GPIO_PORT9, NULL); |
1304 | gpio_request(GPIO_PORT10, NULL); | 1318 | gpio_request(GPIO_PORT10, NULL); |
1305 | gpio_no_direction(GPIO_PORT9CR); /* FSIAOBT needs no direction */ | 1319 | gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */ |
1306 | gpio_no_direction(GPIO_PORT10CR); /* FSIAOLR needs no direction */ | 1320 | gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */ |
1307 | 1321 | ||
1308 | /* card detect pin for MMC slot (CN7) */ | 1322 | /* card detect pin for MMC slot (CN7) */ |
1309 | gpio_request(GPIO_PORT41, NULL); | 1323 | gpio_request(GPIO_PORT41, NULL); |