diff options
Diffstat (limited to 'arch/arm/mach-shmobile/board-ap4evb.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 62 |
1 files changed, 38 insertions, 24 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index ace60246a5df..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); |
@@ -1447,14 +1461,14 @@ static void __init ap4evb_init(void) | |||
1447 | 1461 | ||
1448 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); | 1462 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); |
1449 | 1463 | ||
1450 | sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc1_device); | 1464 | rmobile_add_device_to_domain(&sh7372_pd_a4lc, &lcdc1_device); |
1451 | sh7372_add_device_to_domain(&sh7372_a4lc, &lcdc_device); | 1465 | rmobile_add_device_to_domain(&sh7372_pd_a4lc, &lcdc_device); |
1452 | sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device); | 1466 | rmobile_add_device_to_domain(&sh7372_pd_a4mp, &fsi_device); |
1453 | 1467 | ||
1454 | sh7372_add_device_to_domain(&sh7372_a3sp, &sh_mmcif_device); | 1468 | rmobile_add_device_to_domain(&sh7372_pd_a3sp, &sh_mmcif_device); |
1455 | sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi0_device); | 1469 | rmobile_add_device_to_domain(&sh7372_pd_a3sp, &sdhi0_device); |
1456 | sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi1_device); | 1470 | rmobile_add_device_to_domain(&sh7372_pd_a3sp, &sdhi1_device); |
1457 | sh7372_add_device_to_domain(&sh7372_a4r, &ceu_device); | 1471 | rmobile_add_device_to_domain(&sh7372_pd_a4r, &ceu_device); |
1458 | 1472 | ||
1459 | hdmi_init_pm_clock(); | 1473 | hdmi_init_pm_clock(); |
1460 | fsi_init_pm_clock(); | 1474 | fsi_init_pm_clock(); |