aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-marzen.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 21:48:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 21:48:30 -0400
commit95360fd63606918167a5365b770a6d28d333f0ed (patch)
tree37b2d868fb70d3ef214345e56d7993a0c73a0ddc /arch/arm/mach-shmobile/board-marzen.c
parent8f446a7a069e0af0639385f67c78ee2279bca04c (diff)
parente6ca4ae895e9fbf8b96d3ee1dd44ea96e95babad (diff)
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc board specific updates from Olof Johansson: "Misc board updates: - Greg added a handful of boards to KS8695 (since he has stepped up to maintain it). - Qualcomm has added DT-only board support for a couple of their newer SoCs. - misc other updates for Samsung and Freescale boards." Fix up trivial conflict in arch/arm/mach-shmobile/board-armadillo800eva.c due to gpio device data being added next to hdmi device data that got moved. * tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: msm: Allow 8960 and 8660 to compile together ARM: msm: Allow msm_iomap-8x60 and msm_iomap-8960 to coexist ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 ARM: EXYNOS: Use generic pwm driver in Origen board ARM: shmobile: armadillo800eva: Add support RTC ARM: ks8695: add board support for the OpenGear boards based on the KS8695 ARM: ks8695: add board support for the SnapGear boards based on the KS8695 ARM: dts: Add heartbeat gpio-leds support to Origen ARM: dts: Use active low flag for gpio-keys on Origen ARM: shmobile: marzen: enable thermal sensor ARM: shmobile: marzen: fixup regulator id for smsc911x ARM: shmobile: marzen: add SDHI0 support ARM: mmp: enable debug uart port in defconfig ARM: mmp: implement DEBUG_LL port choice ARM: S3C64XX: Register audio platform devices for Bells on Cragganmore ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore ARM: mx27pdk: Add audio support ARM: ttc_dkb: add nand support
Diffstat (limited to 'arch/arm/mach-shmobile/board-marzen.c')
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c68
1 files changed, 67 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index fcf5a47f4772..4834bdd849cf 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -30,6 +30,8 @@
30#include <linux/regulator/fixed.h> 30#include <linux/regulator/fixed.h>
31#include <linux/regulator/machine.h> 31#include <linux/regulator/machine.h>
32#include <linux/smsc911x.h> 32#include <linux/smsc911x.h>
33#include <linux/mmc/sh_mobile_sdhi.h>
34#include <linux/mfd/tmio.h>
33#include <mach/hardware.h> 35#include <mach/hardware.h>
34#include <mach/r8a7779.h> 36#include <mach/r8a7779.h>
35#include <mach/common.h> 37#include <mach/common.h>
@@ -39,6 +41,12 @@
39#include <asm/hardware/gic.h> 41#include <asm/hardware/gic.h>
40#include <asm/traps.h> 42#include <asm/traps.h>
41 43
44/* Fixed 3.3V regulator to be used by SDHI0 */
45static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
46 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
47 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
48};
49
42/* Dummy supplies, where voltage doesn't matter */ 50/* Dummy supplies, where voltage doesn't matter */
43static struct regulator_consumer_supply dummy_supplies[] = { 51static struct regulator_consumer_supply dummy_supplies[] = {
44 REGULATOR_SUPPLY("vddvario", "smsc911x"), 52 REGULATOR_SUPPLY("vddvario", "smsc911x"),
@@ -75,13 +83,61 @@ static struct platform_device eth_device = {
75 .num_resources = ARRAY_SIZE(smsc911x_resources), 83 .num_resources = ARRAY_SIZE(smsc911x_resources),
76}; 84};
77 85
86static struct resource sdhi0_resources[] = {
87 [0] = {
88 .name = "sdhi0",
89 .start = 0xffe4c000,
90 .end = 0xffe4c0ff,
91 .flags = IORESOURCE_MEM,
92 },
93 [1] = {
94 .start = gic_spi(104),
95 .flags = IORESOURCE_IRQ,
96 },
97};
98
99static struct sh_mobile_sdhi_info sdhi0_platform_data = {
100 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
101 .tmio_caps = MMC_CAP_SD_HIGHSPEED,
102};
103
104static struct platform_device sdhi0_device = {
105 .name = "sh_mobile_sdhi",
106 .num_resources = ARRAY_SIZE(sdhi0_resources),
107 .resource = sdhi0_resources,
108 .id = 0,
109 .dev = {
110 .platform_data = &sdhi0_platform_data,
111 }
112};
113
114/* Thermal */
115static struct resource thermal_resources[] = {
116 [0] = {
117 .start = 0xFFC48000,
118 .end = 0xFFC48038 - 1,
119 .flags = IORESOURCE_MEM,
120 },
121};
122
123static struct platform_device thermal_device = {
124 .name = "rcar_thermal",
125 .resource = thermal_resources,
126 .num_resources = ARRAY_SIZE(thermal_resources),
127};
128
78static struct platform_device *marzen_devices[] __initdata = { 129static struct platform_device *marzen_devices[] __initdata = {
79 &eth_device, 130 &eth_device,
131 &sdhi0_device,
132 &thermal_device,
80}; 133};
81 134
82static void __init marzen_init(void) 135static void __init marzen_init(void)
83{ 136{
84 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); 137 regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
138 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
139 regulator_register_fixed(1, dummy_supplies,
140 ARRAY_SIZE(dummy_supplies));
85 141
86 r8a7779_pinmux_init(); 142 r8a7779_pinmux_init();
87 143
@@ -97,6 +153,16 @@ static void __init marzen_init(void)
97 gpio_request(GPIO_FN_EX_CS0, NULL); /* nCS */ 153 gpio_request(GPIO_FN_EX_CS0, NULL); /* nCS */
98 gpio_request(GPIO_FN_IRQ1_B, NULL); /* IRQ + PME */ 154 gpio_request(GPIO_FN_IRQ1_B, NULL); /* IRQ + PME */
99 155
156 /* SD0 (CN20) */
157 gpio_request(GPIO_FN_SD0_CLK, NULL);
158 gpio_request(GPIO_FN_SD0_CMD, NULL);
159 gpio_request(GPIO_FN_SD0_DAT0, NULL);
160 gpio_request(GPIO_FN_SD0_DAT1, NULL);
161 gpio_request(GPIO_FN_SD0_DAT2, NULL);
162 gpio_request(GPIO_FN_SD0_DAT3, NULL);
163 gpio_request(GPIO_FN_SD0_CD, NULL);
164 gpio_request(GPIO_FN_SD0_WP, NULL);
165
100 r8a7779_add_standard_devices(); 166 r8a7779_add_standard_devices();
101 platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); 167 platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
102} 168}