diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 18:33:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 18:33:45 -0500 |
commit | 6c5096e5538b455bc3bea2b02588c380f070d8c6 (patch) | |
tree | a2d08974a0c6a6fd19dff90bd3ab1827c23a5764 /arch/arm/mach-omap2 | |
parent | bab588fcfb6335c767d811a8955979f5440328e0 (diff) | |
parent | f628e3d92465303792d52c98fb0c95bef558f936 (diff) |
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board specific changes from Arnd Bergmann:
"These updates are all for board specific code, including
- defconfig updates for shmobile, davinci, bcm2835, imx, omap and
tegra
- SD/MMC and I2C support on bcm2835 (Raspberry PI)
- minor updates for PXA
- shmobile updates to GPIO usage in board files
- More things in OMAP board files are moved over to device tree
probing
- Better support for audio devices on some OMAP platforms"
* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (55 commits)
ARM: imx_v4_v5_defconfig: Add VPU support
ARM: imx: configs: enable netfilter support
ARM: OMAP2+: Fix twl section warnings related to omap_twl4030_audio_init
ARM: OMAP2+: omap2plus_defconfig: enable omap1 rtc
RX-51: Register twl4030-madc device
RX-51: Add leds lp5523 names from Maemo 5 2.6.28 kernel
ARM: OMAP2+: AM33XX: omap2plus_defconfig: Add support for few drivers
ARM: OMAP1: nokia770: enable CBUS/Retu
ARM: OMAP2+: omap2plus_defconfig: enable CMA allocator
ARM: OMAP2+: omap2plus_defconfig: enable TFP410 chip support
ARM: OMAP3: igep0020: simplify GPIO LEDs dependencies
ARM: OMAP2+: craneboard: support the TPS65910 PMU
ARM: OMAP2+: craneboard: support NAND device
ARM: OMAP3: cm-t3517: add MMC support
ARM: OMAP2+: Remove apollon board support
ARM: shmobile: armadillo800eva: set clock rates before timer init
ARM: tegra: defconfig updates
ARM: shmobile: mackerel: Use gpio_request_one()
ARM: shmobile: kzm9g: Use gpio_request_one()
ARM: shmobile: bonito: Use gpio_request_one()
...
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-am3517crane.c | 59 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-apollon.c | 342 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t3517.c | 27 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-devkit8000.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 41 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-peripherals.c | 39 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/twl-common.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-omap2/twl-common.h | 3 |
18 files changed, 234 insertions, 400 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index c3c033f283a9..22ad24e9496b 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -188,12 +188,6 @@ config MACH_OMAP_H4 | |||
188 | select OMAP_DEBUG_DEVICES | 188 | select OMAP_DEBUG_DEVICES |
189 | select OMAP_PACKAGE_ZAF | 189 | select OMAP_PACKAGE_ZAF |
190 | 190 | ||
191 | config MACH_OMAP_APOLLON | ||
192 | bool "OMAP 2420 Apollon board" | ||
193 | depends on SOC_OMAP2420 | ||
194 | default y | ||
195 | select OMAP_PACKAGE_ZAC | ||
196 | |||
197 | config MACH_OMAP_2430SDP | 191 | config MACH_OMAP_2430SDP |
198 | bool "OMAP 2430 SDP board" | 192 | bool "OMAP 2430 SDP board" |
199 | depends on SOC_OMAP2430 | 193 | depends on SOC_OMAP2430 |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 65fb6fb38caf..ff528df70119 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -223,7 +223,6 @@ endif | |||
223 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | 223 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o |
224 | obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o | 224 | obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o |
225 | obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o | 225 | obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o |
226 | obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o | ||
227 | obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o | 226 | obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o |
228 | obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o | 227 | obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o |
229 | obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o | 228 | obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 15a3914ab492..ce812decfaca 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/mmc/host.h> | 26 | #include <linux/mmc/host.h> |
27 | #include <linux/platform_data/spi-omap2-mcspi.h> | 27 | #include <linux/platform_data/spi-omap2-mcspi.h> |
28 | #include <linux/platform_data/omap-twl4030.h> | ||
28 | #include <linux/usb/phy.h> | 29 | #include <linux/usb/phy.h> |
29 | 30 | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
@@ -210,6 +211,19 @@ static struct omap2_hsmmc_info mmc[] = { | |||
210 | {} /* Terminator */ | 211 | {} /* Terminator */ |
211 | }; | 212 | }; |
212 | 213 | ||
214 | static struct omap_tw4030_pdata omap_twl4030_audio_data = { | ||
215 | .voice_connected = true, | ||
216 | .custom_routing = true, | ||
217 | |||
218 | .has_hs = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
219 | .has_hf = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
220 | |||
221 | .has_mainmic = true, | ||
222 | .has_submic = true, | ||
223 | .has_hsmic = true, | ||
224 | .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
225 | }; | ||
226 | |||
213 | static int sdp3430_twl_gpio_setup(struct device *dev, | 227 | static int sdp3430_twl_gpio_setup(struct device *dev, |
214 | unsigned gpio, unsigned ngpio) | 228 | unsigned gpio, unsigned ngpio) |
215 | { | 229 | { |
@@ -226,6 +240,9 @@ static int sdp3430_twl_gpio_setup(struct device *dev, | |||
226 | /* gpio + 15 is "sub_lcd_nRST" (output) */ | 240 | /* gpio + 15 is "sub_lcd_nRST" (output) */ |
227 | gpio_request_one(gpio + 15, GPIOF_OUT_INIT_LOW, "sub_lcd_nRST"); | 241 | gpio_request_one(gpio + 15, GPIOF_OUT_INIT_LOW, "sub_lcd_nRST"); |
228 | 242 | ||
243 | omap_twl4030_audio_data.jack_detect = gpio + 2; | ||
244 | omap_twl4030_audio_init("SDP3430", &omap_twl4030_audio_data); | ||
245 | |||
229 | return 0; | 246 | return 0; |
230 | } | 247 | } |
231 | 248 | ||
@@ -383,6 +400,9 @@ static int __init omap3430_i2c_init(void) | |||
383 | sdp3430_twldata.vpll2->constraints.apply_uV = true; | 400 | sdp3430_twldata.vpll2->constraints.apply_uV = true; |
384 | sdp3430_twldata.vpll2->constraints.name = "VDVI"; | 401 | sdp3430_twldata.vpll2->constraints.name = "VDVI"; |
385 | 402 | ||
403 | sdp3430_twldata.audio->codec->hs_extmute = 1; | ||
404 | sdp3430_twldata.audio->codec->hs_extmute_gpio = -EINVAL; | ||
405 | |||
386 | omap3_pmic_init("twl4030", &sdp3430_twldata); | 406 | omap3_pmic_init("twl4030", &sdp3430_twldata); |
387 | 407 | ||
388 | /* i2c2 on camera connector (for sensor control) and optional isp1301 */ | 408 | /* i2c2 on camera connector (for sensor control) and optional isp1301 */ |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 508e2752b7de..35f3ad0cb7c7 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -24,8 +24,10 @@ | |||
24 | #include <linux/gpio_keys.h> | 24 | #include <linux/gpio_keys.h> |
25 | #include <linux/regulator/machine.h> | 25 | #include <linux/regulator/machine.h> |
26 | #include <linux/regulator/fixed.h> | 26 | #include <linux/regulator/fixed.h> |
27 | #include <linux/pwm.h> | ||
27 | #include <linux/leds.h> | 28 | #include <linux/leds.h> |
28 | #include <linux/leds_pwm.h> | 29 | #include <linux/leds_pwm.h> |
30 | #include <linux/pwm_backlight.h> | ||
29 | #include <linux/irqchip/arm-gic.h> | 31 | #include <linux/irqchip/arm-gic.h> |
30 | #include <linux/platform_data/omap4-keypad.h> | 32 | #include <linux/platform_data/omap4-keypad.h> |
31 | #include <linux/usb/musb.h> | 33 | #include <linux/usb/musb.h> |
@@ -257,10 +259,20 @@ static struct gpio_led_platform_data sdp4430_led_data = { | |||
257 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), | 259 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), |
258 | }; | 260 | }; |
259 | 261 | ||
262 | static struct pwm_lookup sdp4430_pwm_lookup[] = { | ||
263 | PWM_LOOKUP("twl-pwm", 0, "leds_pwm", "omap4::keypad"), | ||
264 | PWM_LOOKUP("twl-pwm", 1, "pwm-backlight", NULL), | ||
265 | PWM_LOOKUP("twl-pwmled", 0, "leds_pwm", "omap4:green:chrg"), | ||
266 | }; | ||
267 | |||
260 | static struct led_pwm sdp4430_pwm_leds[] = { | 268 | static struct led_pwm sdp4430_pwm_leds[] = { |
261 | { | 269 | { |
270 | .name = "omap4::keypad", | ||
271 | .max_brightness = 127, | ||
272 | .pwm_period_ns = 7812500, | ||
273 | }, | ||
274 | { | ||
262 | .name = "omap4:green:chrg", | 275 | .name = "omap4:green:chrg", |
263 | .pwm_id = 1, | ||
264 | .max_brightness = 255, | 276 | .max_brightness = 255, |
265 | .pwm_period_ns = 7812500, | 277 | .pwm_period_ns = 7812500, |
266 | }, | 278 | }, |
@@ -279,6 +291,20 @@ static struct platform_device sdp4430_leds_pwm = { | |||
279 | }, | 291 | }, |
280 | }; | 292 | }; |
281 | 293 | ||
294 | static struct platform_pwm_backlight_data sdp4430_backlight_data = { | ||
295 | .max_brightness = 127, | ||
296 | .dft_brightness = 127, | ||
297 | .pwm_period_ns = 7812500, | ||
298 | }; | ||
299 | |||
300 | static struct platform_device sdp4430_backlight_pwm = { | ||
301 | .name = "pwm-backlight", | ||
302 | .id = -1, | ||
303 | .dev = { | ||
304 | .platform_data = &sdp4430_backlight_data, | ||
305 | }, | ||
306 | }; | ||
307 | |||
282 | static int omap_prox_activate(struct device *dev) | 308 | static int omap_prox_activate(struct device *dev) |
283 | { | 309 | { |
284 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); | 310 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); |
@@ -413,6 +439,7 @@ static struct platform_device *sdp4430_devices[] __initdata = { | |||
413 | &sdp4430_gpio_keys_device, | 439 | &sdp4430_gpio_keys_device, |
414 | &sdp4430_leds_gpio, | 440 | &sdp4430_leds_gpio, |
415 | &sdp4430_leds_pwm, | 441 | &sdp4430_leds_pwm, |
442 | &sdp4430_backlight_pwm, | ||
416 | &sdp4430_vbat, | 443 | &sdp4430_vbat, |
417 | &sdp4430_dmic_codec, | 444 | &sdp4430_dmic_codec, |
418 | &sdp4430_abe_audio, | 445 | &sdp4430_abe_audio, |
@@ -709,6 +736,7 @@ static void __init omap_4430sdp_init(void) | |||
709 | ARRAY_SIZE(sdp4430_spi_board_info)); | 736 | ARRAY_SIZE(sdp4430_spi_board_info)); |
710 | } | 737 | } |
711 | 738 | ||
739 | pwm_add_table(sdp4430_pwm_lookup, ARRAY_SIZE(sdp4430_pwm_lookup)); | ||
712 | status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data); | 740 | status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data); |
713 | if (status) | 741 | if (status) |
714 | pr_err("Keypad initialization failed: %d\n", status); | 742 | pr_err("Keypad initialization failed: %d\n", status); |
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 52cc2c597314..7d3358b2e593 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
@@ -20,12 +20,18 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/mfd/tps65910.h> | ||
24 | #include <linux/mtd/mtd.h> | ||
25 | #include <linux/mtd/nand.h> | ||
26 | #include <linux/mtd/partitions.h> | ||
23 | 27 | ||
24 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
27 | 31 | ||
28 | #include "common.h" | 32 | #include "common.h" |
33 | #include "common-board-devices.h" | ||
34 | #include "board-flash.h" | ||
29 | 35 | ||
30 | #include "am35xx-emac.h" | 36 | #include "am35xx-emac.h" |
31 | #include "mux.h" | 37 | #include "mux.h" |
@@ -36,6 +42,7 @@ | |||
36 | 42 | ||
37 | #ifdef CONFIG_OMAP_MUX | 43 | #ifdef CONFIG_OMAP_MUX |
38 | static struct omap_board_mux board_mux[] __initdata = { | 44 | static struct omap_board_mux board_mux[] __initdata = { |
45 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
39 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 46 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
40 | }; | 47 | }; |
41 | #endif | 48 | #endif |
@@ -51,6 +58,54 @@ static struct usbhs_omap_platform_data usbhs_bdata __initdata = { | |||
51 | .reset_gpio_port[2] = -EINVAL | 58 | .reset_gpio_port[2] = -EINVAL |
52 | }; | 59 | }; |
53 | 60 | ||
61 | static struct mtd_partition crane_nand_partitions[] = { | ||
62 | { | ||
63 | .name = "X-Loader", | ||
64 | .offset = 0, | ||
65 | .size = 4 * NAND_BLOCK_SIZE, | ||
66 | .mask_flags = MTD_WRITEABLE, | ||
67 | }, | ||
68 | { | ||
69 | .name = "U-Boot", | ||
70 | .offset = MTDPART_OFS_APPEND, | ||
71 | .size = 14 * NAND_BLOCK_SIZE, | ||
72 | .mask_flags = MTD_WRITEABLE, | ||
73 | }, | ||
74 | { | ||
75 | .name = "U-Boot Env", | ||
76 | .offset = MTDPART_OFS_APPEND, | ||
77 | .size = 2 * NAND_BLOCK_SIZE, | ||
78 | }, | ||
79 | { | ||
80 | .name = "Kernel", | ||
81 | .offset = MTDPART_OFS_APPEND, | ||
82 | .size = 40 * NAND_BLOCK_SIZE, | ||
83 | }, | ||
84 | { | ||
85 | .name = "File System", | ||
86 | .offset = MTDPART_OFS_APPEND, | ||
87 | .size = MTDPART_SIZ_FULL, | ||
88 | }, | ||
89 | }; | ||
90 | |||
91 | static struct tps65910_board tps65910_pdata = { | ||
92 | .irq = 7 + OMAP_INTC_START, | ||
93 | .en_ck32k_xtal = true, | ||
94 | }; | ||
95 | |||
96 | static struct i2c_board_info __initdata tps65910_board_info[] = { | ||
97 | { | ||
98 | I2C_BOARD_INFO("tps65910", 0x2d), | ||
99 | .platform_data = &tps65910_pdata, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | static void __init am3517_crane_i2c_init(void) | ||
104 | { | ||
105 | omap_register_i2c_bus(1, 2600, tps65910_board_info, | ||
106 | ARRAY_SIZE(tps65910_board_info)); | ||
107 | } | ||
108 | |||
54 | static void __init am3517_crane_init(void) | 109 | static void __init am3517_crane_init(void) |
55 | { | 110 | { |
56 | int ret; | 111 | int ret; |
@@ -58,6 +113,10 @@ static void __init am3517_crane_init(void) | |||
58 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 113 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
59 | omap_serial_init(); | 114 | omap_serial_init(); |
60 | omap_sdrc_init(NULL, NULL); | 115 | omap_sdrc_init(NULL, NULL); |
116 | board_nand_init(crane_nand_partitions, | ||
117 | ARRAY_SIZE(crane_nand_partitions), 0, | ||
118 | NAND_BUSWIDTH_16, NULL); | ||
119 | am3517_crane_i2c_init(); | ||
61 | 120 | ||
62 | /* Configure GPIO for EHCI port */ | 121 | /* Configure GPIO for EHCI port */ |
63 | if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { | 122 | if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c deleted file mode 100644 index 3a6ca74709ab..000000000000 --- a/arch/arm/mach-omap2/board-apollon.c +++ /dev/null | |||
@@ -1,342 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/board-apollon.c | ||
3 | * | ||
4 | * Copyright (C) 2005,2006 Samsung Electronics | ||
5 | * Author: Kyungmin Park <kyungmin.park@samsung.com> | ||
6 | * | ||
7 | * Modified from mach-omap/omap2/board-h4.c | ||
8 | * | ||
9 | * Code for apollon OMAP2 board. Should work on many OMAP2 systems where | ||
10 | * the bootloader passes the board-specific data to the kernel. | ||
11 | * Do not put any board specific code to this file; create a new machine | ||
12 | * type if you need custom low-level initializations. | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License version 2 as | ||
16 | * published by the Free Software Foundation. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/mtd/mtd.h> | ||
23 | #include <linux/mtd/partitions.h> | ||
24 | #include <linux/mtd/onenand.h> | ||
25 | #include <linux/delay.h> | ||
26 | #include <linux/leds.h> | ||
27 | #include <linux/err.h> | ||
28 | #include <linux/clk.h> | ||
29 | #include <linux/smc91x.h> | ||
30 | #include <linux/gpio.h> | ||
31 | #include <linux/platform_data/leds-omap.h> | ||
32 | |||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/flash.h> | ||
36 | |||
37 | #include "common.h" | ||
38 | #include "gpmc.h" | ||
39 | |||
40 | #include <video/omapdss.h> | ||
41 | #include <video/omap-panel-generic-dpi.h> | ||
42 | |||
43 | #include "mux.h" | ||
44 | #include "control.h" | ||
45 | |||
46 | /* LED & Switch macros */ | ||
47 | #define LED0_GPIO13 13 | ||
48 | #define LED1_GPIO14 14 | ||
49 | #define LED2_GPIO15 15 | ||
50 | #define SW_ENTER_GPIO16 16 | ||
51 | #define SW_UP_GPIO17 17 | ||
52 | #define SW_DOWN_GPIO58 58 | ||
53 | |||
54 | #define APOLLON_FLASH_CS 0 | ||
55 | #define APOLLON_ETH_CS 1 | ||
56 | #define APOLLON_ETHR_GPIO_IRQ 74 | ||
57 | |||
58 | static struct mtd_partition apollon_partitions[] = { | ||
59 | { | ||
60 | .name = "X-Loader + U-Boot", | ||
61 | .offset = 0, | ||
62 | .size = SZ_128K, | ||
63 | .mask_flags = MTD_WRITEABLE, | ||
64 | }, | ||
65 | { | ||
66 | .name = "params", | ||
67 | .offset = MTDPART_OFS_APPEND, | ||
68 | .size = SZ_128K, | ||
69 | }, | ||
70 | { | ||
71 | .name = "kernel", | ||
72 | .offset = MTDPART_OFS_APPEND, | ||
73 | .size = SZ_2M, | ||
74 | }, | ||
75 | { | ||
76 | .name = "rootfs", | ||
77 | .offset = MTDPART_OFS_APPEND, | ||
78 | .size = SZ_16M, | ||
79 | }, | ||
80 | { | ||
81 | .name = "filesystem00", | ||
82 | .offset = MTDPART_OFS_APPEND, | ||
83 | .size = SZ_32M, | ||
84 | }, | ||
85 | { | ||
86 | .name = "filesystem01", | ||
87 | .offset = MTDPART_OFS_APPEND, | ||
88 | .size = MTDPART_SIZ_FULL, | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | static struct onenand_platform_data apollon_flash_data = { | ||
93 | .parts = apollon_partitions, | ||
94 | .nr_parts = ARRAY_SIZE(apollon_partitions), | ||
95 | }; | ||
96 | |||
97 | static struct resource apollon_flash_resource[] = { | ||
98 | [0] = { | ||
99 | .flags = IORESOURCE_MEM, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | static struct platform_device apollon_onenand_device = { | ||
104 | .name = "onenand-flash", | ||
105 | .id = -1, | ||
106 | .dev = { | ||
107 | .platform_data = &apollon_flash_data, | ||
108 | }, | ||
109 | .num_resources = ARRAY_SIZE(apollon_flash_resource), | ||
110 | .resource = apollon_flash_resource, | ||
111 | }; | ||
112 | |||
113 | static void __init apollon_flash_init(void) | ||
114 | { | ||
115 | unsigned long base; | ||
116 | |||
117 | if (gpmc_cs_request(APOLLON_FLASH_CS, SZ_128K, &base) < 0) { | ||
118 | printk(KERN_ERR "Cannot request OneNAND GPMC CS\n"); | ||
119 | return; | ||
120 | } | ||
121 | apollon_flash_resource[0].start = base; | ||
122 | apollon_flash_resource[0].end = base + SZ_128K - 1; | ||
123 | } | ||
124 | |||
125 | static struct smc91x_platdata appolon_smc91x_info = { | ||
126 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
127 | .leda = RPC_LED_100_10, | ||
128 | .ledb = RPC_LED_TX_RX, | ||
129 | }; | ||
130 | |||
131 | static struct resource apollon_smc91x_resources[] = { | ||
132 | [0] = { | ||
133 | .flags = IORESOURCE_MEM, | ||
134 | }, | ||
135 | [1] = { | ||
136 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | ||
137 | }, | ||
138 | }; | ||
139 | |||
140 | static struct platform_device apollon_smc91x_device = { | ||
141 | .name = "smc91x", | ||
142 | .id = -1, | ||
143 | .dev = { | ||
144 | .platform_data = &appolon_smc91x_info, | ||
145 | }, | ||
146 | .num_resources = ARRAY_SIZE(apollon_smc91x_resources), | ||
147 | .resource = apollon_smc91x_resources, | ||
148 | }; | ||
149 | |||
150 | static struct omap_led_config apollon_led_config[] = { | ||
151 | { | ||
152 | .cdev = { | ||
153 | .name = "apollon:led0", | ||
154 | }, | ||
155 | .gpio = LED0_GPIO13, | ||
156 | }, | ||
157 | { | ||
158 | .cdev = { | ||
159 | .name = "apollon:led1", | ||
160 | }, | ||
161 | .gpio = LED1_GPIO14, | ||
162 | }, | ||
163 | { | ||
164 | .cdev = { | ||
165 | .name = "apollon:led2", | ||
166 | }, | ||
167 | .gpio = LED2_GPIO15, | ||
168 | }, | ||
169 | }; | ||
170 | |||
171 | static struct omap_led_platform_data apollon_led_data = { | ||
172 | .nr_leds = ARRAY_SIZE(apollon_led_config), | ||
173 | .leds = apollon_led_config, | ||
174 | }; | ||
175 | |||
176 | static struct platform_device apollon_led_device = { | ||
177 | .name = "omap-led", | ||
178 | .id = -1, | ||
179 | .dev = { | ||
180 | .platform_data = &apollon_led_data, | ||
181 | }, | ||
182 | }; | ||
183 | |||
184 | static struct platform_device *apollon_devices[] __initdata = { | ||
185 | &apollon_onenand_device, | ||
186 | &apollon_smc91x_device, | ||
187 | &apollon_led_device, | ||
188 | }; | ||
189 | |||
190 | static inline void __init apollon_init_smc91x(void) | ||
191 | { | ||
192 | unsigned long base; | ||
193 | |||
194 | unsigned int rate; | ||
195 | struct clk *gpmc_fck; | ||
196 | int eth_cs; | ||
197 | int err; | ||
198 | |||
199 | gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */ | ||
200 | if (IS_ERR(gpmc_fck)) { | ||
201 | WARN_ON(1); | ||
202 | return; | ||
203 | } | ||
204 | |||
205 | clk_prepare_enable(gpmc_fck); | ||
206 | rate = clk_get_rate(gpmc_fck); | ||
207 | |||
208 | eth_cs = APOLLON_ETH_CS; | ||
209 | |||
210 | /* Make sure CS1 timings are correct */ | ||
211 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200); | ||
212 | |||
213 | if (rate >= 160000000) { | ||
214 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01); | ||
215 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803); | ||
216 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a); | ||
217 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F); | ||
218 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4); | ||
219 | } else if (rate >= 130000000) { | ||
220 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00); | ||
221 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802); | ||
222 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09); | ||
223 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F); | ||
224 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4); | ||
225 | } else {/* rate = 100000000 */ | ||
226 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00); | ||
227 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802); | ||
228 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09); | ||
229 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x031A1F1F); | ||
230 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000003C2); | ||
231 | } | ||
232 | |||
233 | if (gpmc_cs_request(APOLLON_ETH_CS, SZ_16M, &base) < 0) { | ||
234 | printk(KERN_ERR "Failed to request GPMC CS for smc91x\n"); | ||
235 | goto out; | ||
236 | } | ||
237 | apollon_smc91x_resources[0].start = base + 0x300; | ||
238 | apollon_smc91x_resources[0].end = base + 0x30f; | ||
239 | udelay(100); | ||
240 | |||
241 | omap_mux_init_gpio(APOLLON_ETHR_GPIO_IRQ, 0); | ||
242 | err = gpio_request_one(APOLLON_ETHR_GPIO_IRQ, GPIOF_IN, "SMC91x irq"); | ||
243 | if (err) { | ||
244 | printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", | ||
245 | APOLLON_ETHR_GPIO_IRQ); | ||
246 | gpmc_cs_free(APOLLON_ETH_CS); | ||
247 | } | ||
248 | out: | ||
249 | clk_disable_unprepare(gpmc_fck); | ||
250 | clk_put(gpmc_fck); | ||
251 | } | ||
252 | |||
253 | static struct panel_generic_dpi_data apollon_panel_data = { | ||
254 | .name = "apollon", | ||
255 | }; | ||
256 | |||
257 | static struct omap_dss_device apollon_lcd_device = { | ||
258 | .name = "lcd", | ||
259 | .driver_name = "generic_dpi_panel", | ||
260 | .type = OMAP_DISPLAY_TYPE_DPI, | ||
261 | .phy.dpi.data_lines = 18, | ||
262 | .data = &apollon_panel_data, | ||
263 | }; | ||
264 | |||
265 | static struct omap_dss_device *apollon_dss_devices[] = { | ||
266 | &apollon_lcd_device, | ||
267 | }; | ||
268 | |||
269 | static struct omap_dss_board_info apollon_dss_data = { | ||
270 | .num_devices = ARRAY_SIZE(apollon_dss_devices), | ||
271 | .devices = apollon_dss_devices, | ||
272 | .default_device = &apollon_lcd_device, | ||
273 | }; | ||
274 | |||
275 | static struct gpio apollon_gpio_leds[] __initdata = { | ||
276 | { LED0_GPIO13, GPIOF_OUT_INIT_LOW, "LED0" }, /* LED0 - AA10 */ | ||
277 | { LED1_GPIO14, GPIOF_OUT_INIT_LOW, "LED1" }, /* LED1 - AA6 */ | ||
278 | { LED2_GPIO15, GPIOF_OUT_INIT_LOW, "LED2" }, /* LED2 - AA4 */ | ||
279 | }; | ||
280 | |||
281 | static void __init apollon_led_init(void) | ||
282 | { | ||
283 | omap_mux_init_signal("vlynq_clk.gpio_13", 0); | ||
284 | omap_mux_init_signal("vlynq_rx1.gpio_14", 0); | ||
285 | omap_mux_init_signal("vlynq_rx0.gpio_15", 0); | ||
286 | |||
287 | gpio_request_array(apollon_gpio_leds, ARRAY_SIZE(apollon_gpio_leds)); | ||
288 | } | ||
289 | |||
290 | #ifdef CONFIG_OMAP_MUX | ||
291 | static struct omap_board_mux board_mux[] __initdata = { | ||
292 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
293 | }; | ||
294 | #endif | ||
295 | |||
296 | static void __init omap_apollon_init(void) | ||
297 | { | ||
298 | u32 v; | ||
299 | |||
300 | omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); | ||
301 | |||
302 | apollon_init_smc91x(); | ||
303 | apollon_led_init(); | ||
304 | apollon_flash_init(); | ||
305 | |||
306 | /* REVISIT: where's the correct place */ | ||
307 | omap_mux_init_signal("sys_nirq", OMAP_PULL_ENA | OMAP_PULL_UP); | ||
308 | |||
309 | /* LCD PWR_EN */ | ||
310 | omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP); | ||
311 | |||
312 | /* Use Internal loop-back in MMC/SDIO Module Input Clock selection */ | ||
313 | v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
314 | v |= (1 << 24); | ||
315 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
316 | |||
317 | /* | ||
318 | * Make sure the serial ports are muxed on at this point. | ||
319 | * You have to mux them off in device drivers later on | ||
320 | * if not needed. | ||
321 | */ | ||
322 | apollon_smc91x_resources[1].start = gpio_to_irq(APOLLON_ETHR_GPIO_IRQ); | ||
323 | apollon_smc91x_resources[1].end = gpio_to_irq(APOLLON_ETHR_GPIO_IRQ); | ||
324 | platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); | ||
325 | omap_serial_init(); | ||
326 | omap_sdrc_init(NULL, NULL); | ||
327 | omap_display_init(&apollon_dss_data); | ||
328 | } | ||
329 | |||
330 | MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") | ||
331 | /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */ | ||
332 | .atag_offset = 0x100, | ||
333 | .reserve = omap_reserve, | ||
334 | .map_io = omap242x_map_io, | ||
335 | .init_early = omap2420_init_early, | ||
336 | .init_irq = omap2_init_irq, | ||
337 | .handle_irq = omap2_intc_handle_irq, | ||
338 | .init_machine = omap_apollon_init, | ||
339 | .init_late = omap2420_init_late, | ||
340 | .init_time = omap2_sync32k_timer_init, | ||
341 | .restart = omap2xxx_restart, | ||
342 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 10054e3c3482..af2bb219e214 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -723,7 +723,7 @@ static void __init cm_t3x_common_init(void) | |||
723 | cm_t35_init_ethernet(); | 723 | cm_t35_init_ethernet(); |
724 | cm_t35_init_led(); | 724 | cm_t35_init_led(); |
725 | cm_t35_init_display(); | 725 | cm_t35_init_display(); |
726 | omap_twl4030_audio_init("cm-t3x"); | 726 | omap_twl4030_audio_init("cm-t3x", NULL); |
727 | 727 | ||
728 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); | 728 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); |
729 | usb_musb_init(NULL); | 729 | usb_musb_init(NULL); |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 5e54f565a294..a66da808cc4a 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/mtd/mtd.h> | 32 | #include <linux/mtd/mtd.h> |
33 | #include <linux/mtd/nand.h> | 33 | #include <linux/mtd/nand.h> |
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/mmc/host.h> | ||
35 | #include <linux/can/platform/ti_hecc.h> | 36 | #include <linux/can/platform/ti_hecc.h> |
36 | 37 | ||
37 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
@@ -46,6 +47,7 @@ | |||
46 | 47 | ||
47 | #include "mux.h" | 48 | #include "mux.h" |
48 | #include "control.h" | 49 | #include "control.h" |
50 | #include "hsmmc.h" | ||
49 | #include "common-board-devices.h" | 51 | #include "common-board-devices.h" |
50 | #include "am35xx-emac.h" | 52 | #include "am35xx-emac.h" |
51 | #include "gpmc-nand.h" | 53 | #include "gpmc-nand.h" |
@@ -121,6 +123,26 @@ static void cm_t3517_init_hecc(void) | |||
121 | static inline void cm_t3517_init_hecc(void) {} | 123 | static inline void cm_t3517_init_hecc(void) {} |
122 | #endif | 124 | #endif |
123 | 125 | ||
126 | #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | ||
127 | static struct omap2_hsmmc_info cm_t3517_mmc[] = { | ||
128 | { | ||
129 | .mmc = 1, | ||
130 | .caps = MMC_CAP_4_BIT_DATA, | ||
131 | .gpio_cd = 144, | ||
132 | .gpio_wp = 59, | ||
133 | }, | ||
134 | { | ||
135 | .mmc = 2, | ||
136 | .caps = MMC_CAP_4_BIT_DATA, | ||
137 | .gpio_cd = -EINVAL, | ||
138 | .gpio_wp = -EINVAL, | ||
139 | }, | ||
140 | {} /* Terminator */ | ||
141 | }; | ||
142 | #else | ||
143 | #define cm_t3517_mmc NULL | ||
144 | #endif | ||
145 | |||
124 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) | 146 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) |
125 | #define RTC_IO_GPIO (153) | 147 | #define RTC_IO_GPIO (153) |
126 | #define RTC_WR_GPIO (154) | 148 | #define RTC_WR_GPIO (154) |
@@ -271,6 +293,10 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
271 | /* CM-T3517 USB HUB nRESET */ | 293 | /* CM-T3517 USB HUB nRESET */ |
272 | OMAP3_MUX(MCBSP4_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 294 | OMAP3_MUX(MCBSP4_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
273 | 295 | ||
296 | /* CD - GPIO144 and WP - GPIO59 for MMC1 - SB-T35 */ | ||
297 | OMAP3_MUX(UART2_CTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP), | ||
298 | OMAP3_MUX(GPMC_CLK, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP), | ||
299 | |||
274 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 300 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
275 | }; | 301 | }; |
276 | #endif | 302 | #endif |
@@ -286,6 +312,7 @@ static void __init cm_t3517_init(void) | |||
286 | cm_t3517_init_usbh(); | 312 | cm_t3517_init_usbh(); |
287 | cm_t3517_init_hecc(); | 313 | cm_t3517_init_hecc(); |
288 | am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1); | 314 | am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1); |
315 | omap_hsmmc_init(cm_t3517_mmc); | ||
289 | } | 316 | } |
290 | 317 | ||
291 | MACHINE_START(CM_T3517, "Compulab CM-T3517") | 318 | MACHINE_START(CM_T3517, "Compulab CM-T3517") |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 4dadb0b7b808..53056c3b0836 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -629,7 +629,7 @@ static void __init devkit8000_init(void) | |||
629 | board_nand_init(devkit8000_nand_partitions, | 629 | board_nand_init(devkit8000_nand_partitions, |
630 | ARRAY_SIZE(devkit8000_nand_partitions), NAND_CS, | 630 | ARRAY_SIZE(devkit8000_nand_partitions), NAND_CS, |
631 | NAND_BUSWIDTH_16, NULL); | 631 | NAND_BUSWIDTH_16, NULL); |
632 | omap_twl4030_audio_init("omap3beagle"); | 632 | omap_twl4030_audio_init("omap3beagle", NULL); |
633 | 633 | ||
634 | /* Ensure SDRC pins are mux'd for self-refresh */ | 634 | /* Ensure SDRC pins are mux'd for self-refresh */ |
635 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 635 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index c10738a067cd..bf92678a01d0 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -301,20 +301,20 @@ static struct omap2_hsmmc_info mmc[] = { | |||
301 | 301 | ||
302 | static struct gpio_led igep_gpio_leds[] = { | 302 | static struct gpio_led igep_gpio_leds[] = { |
303 | [0] = { | 303 | [0] = { |
304 | .name = "gpio-led:red:d0", | 304 | .name = "omap3:red:user0", |
305 | .default_trigger = "default-off" | 305 | .default_state = 0, |
306 | }, | 306 | }, |
307 | [1] = { | 307 | [1] = { |
308 | .name = "gpio-led:green:d0", | 308 | .name = "omap3:green:boot", |
309 | .default_trigger = "default-off", | 309 | .default_state = 1, |
310 | }, | 310 | }, |
311 | [2] = { | 311 | [2] = { |
312 | .name = "gpio-led:red:d1", | 312 | .name = "omap3:red:user1", |
313 | .default_trigger = "default-off", | 313 | .default_state = 0, |
314 | }, | 314 | }, |
315 | [3] = { | 315 | [3] = { |
316 | .name = "gpio-led:green:d1", | 316 | .name = "omap3:green:user1", |
317 | .default_trigger = "heartbeat", | 317 | .default_state = 0, |
318 | .gpio = -EINVAL, /* gets replaced */ | 318 | .gpio = -EINVAL, /* gets replaced */ |
319 | .active_low = 1, | 319 | .active_low = 1, |
320 | }, | 320 | }, |
@@ -631,7 +631,7 @@ static void __init igep_init(void) | |||
631 | 631 | ||
632 | igep_flash_init(); | 632 | igep_flash_init(); |
633 | igep_leds_init(); | 633 | igep_leds_init(); |
634 | omap_twl4030_audio_init("igep2"); | 634 | omap_twl4030_audio_init("igep2", NULL); |
635 | 635 | ||
636 | /* | 636 | /* |
637 | * WLAN-BT combo module from MuRata which has a Marvell WLAN | 637 | * WLAN-BT combo module from MuRata which has a Marvell WLAN |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 70bc1fc808c8..c3558f93d42c 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/leds.h> | 22 | #include <linux/leds.h> |
23 | #include <linux/pwm.h> | ||
24 | #include <linux/leds_pwm.h> | ||
23 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
24 | #include <linux/input.h> | 26 | #include <linux/input.h> |
25 | #include <linux/gpio_keys.h> | 27 | #include <linux/gpio_keys.h> |
@@ -56,6 +58,32 @@ | |||
56 | 58 | ||
57 | #define NAND_CS 0 | 59 | #define NAND_CS 0 |
58 | 60 | ||
61 | static struct pwm_lookup pwm_lookup[] = { | ||
62 | /* LEDB -> PMU_STAT */ | ||
63 | PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat"), | ||
64 | }; | ||
65 | |||
66 | static struct led_pwm pwm_leds[] = { | ||
67 | { | ||
68 | .name = "beagleboard::pmu_stat", | ||
69 | .max_brightness = 127, | ||
70 | .pwm_period_ns = 7812500, | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | static struct led_pwm_platform_data pwm_data = { | ||
75 | .num_leds = ARRAY_SIZE(pwm_leds), | ||
76 | .leds = pwm_leds, | ||
77 | }; | ||
78 | |||
79 | static struct platform_device leds_pwm = { | ||
80 | .name = "leds_pwm", | ||
81 | .id = -1, | ||
82 | .dev = { | ||
83 | .platform_data = &pwm_data, | ||
84 | }, | ||
85 | }; | ||
86 | |||
59 | /* | 87 | /* |
60 | * OMAP3 Beagle revision | 88 | * OMAP3 Beagle revision |
61 | * Run time detection of Beagle revision is done by reading GPIO. | 89 | * Run time detection of Beagle revision is done by reading GPIO. |
@@ -293,9 +321,6 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
293 | gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, | 321 | gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, |
294 | "nEN_USB_PWR"); | 322 | "nEN_USB_PWR"); |
295 | 323 | ||
296 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | ||
297 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | ||
298 | |||
299 | return 0; | 324 | return 0; |
300 | } | 325 | } |
301 | 326 | ||
@@ -377,11 +402,6 @@ static struct gpio_led gpio_leds[] = { | |||
377 | .default_trigger = "mmc0", | 402 | .default_trigger = "mmc0", |
378 | .gpio = 149, | 403 | .gpio = 149, |
379 | }, | 404 | }, |
380 | { | ||
381 | .name = "beagleboard::pmu_stat", | ||
382 | .gpio = -EINVAL, /* gets replaced */ | ||
383 | .active_low = true, | ||
384 | }, | ||
385 | }; | 405 | }; |
386 | 406 | ||
387 | static struct gpio_led_platform_data gpio_led_info = { | 407 | static struct gpio_led_platform_data gpio_led_info = { |
@@ -429,6 +449,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = { | |||
429 | &leds_gpio, | 449 | &leds_gpio, |
430 | &keys_gpio, | 450 | &keys_gpio, |
431 | &madc_hwmon, | 451 | &madc_hwmon, |
452 | &leds_pwm, | ||
432 | }; | 453 | }; |
433 | 454 | ||
434 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { | 455 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { |
@@ -526,7 +547,7 @@ static void __init omap3_beagle_init(void) | |||
526 | board_nand_init(omap3beagle_nand_partitions, | 547 | board_nand_init(omap3beagle_nand_partitions, |
527 | ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS, | 548 | ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS, |
528 | NAND_BUSWIDTH_16, NULL); | 549 | NAND_BUSWIDTH_16, NULL); |
529 | omap_twl4030_audio_init("omap3beagle"); | 550 | omap_twl4030_audio_init("omap3beagle", NULL); |
530 | 551 | ||
531 | /* Ensure msecure is mux'd to be able to set the RTC. */ | 552 | /* Ensure msecure is mux'd to be able to set the RTC. */ |
532 | omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); | 553 | omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); |
@@ -534,6 +555,8 @@ static void __init omap3_beagle_init(void) | |||
534 | /* Ensure SDRC pins are mux'd for self-refresh */ | 555 | /* Ensure SDRC pins are mux'd for self-refresh */ |
535 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 556 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
536 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | 557 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
558 | |||
559 | pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); | ||
537 | } | 560 | } |
538 | 561 | ||
539 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | 562 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 8258a78c3dfb..48789e0bb915 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -746,7 +746,7 @@ static void __init omap3_evm_init(void) | |||
746 | omap3evm_init_smsc911x(); | 746 | omap3evm_init_smsc911x(); |
747 | omap3_evm_display_init(); | 747 | omap3_evm_display_init(); |
748 | omap3_evm_wl12xx_init(); | 748 | omap3_evm_wl12xx_init(); |
749 | omap_twl4030_audio_init("omap3evm"); | 749 | omap_twl4030_audio_init("omap3evm", NULL); |
750 | } | 750 | } |
751 | 751 | ||
752 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") | 752 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 1bcf39671c35..86bab51154ee 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -508,7 +508,7 @@ static void __init overo_init(void) | |||
508 | overo_display_init(); | 508 | overo_display_init(); |
509 | overo_init_led(); | 509 | overo_init_led(); |
510 | overo_init_keys(); | 510 | overo_init_keys(); |
511 | omap_twl4030_audio_init("overo"); | 511 | omap_twl4030_audio_init("overo", NULL); |
512 | 512 | ||
513 | /* Ensure SDRC pins are mux'd for self-refresh */ | 513 | /* Ensure SDRC pins are mux'd for self-refresh */ |
514 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 514 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index f3d075baebb6..c26d441ca4fb 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -162,30 +162,39 @@ static struct tsl2563_platform_data rx51_tsl2563_platform_data = { | |||
162 | #if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE) | 162 | #if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE) |
163 | static struct lp5523_led_config rx51_lp5523_led_config[] = { | 163 | static struct lp5523_led_config rx51_lp5523_led_config[] = { |
164 | { | 164 | { |
165 | .name = "lp5523:kb1", | ||
165 | .chan_nr = 0, | 166 | .chan_nr = 0, |
166 | .led_current = 50, | 167 | .led_current = 50, |
167 | }, { | 168 | }, { |
169 | .name = "lp5523:kb2", | ||
168 | .chan_nr = 1, | 170 | .chan_nr = 1, |
169 | .led_current = 50, | 171 | .led_current = 50, |
170 | }, { | 172 | }, { |
173 | .name = "lp5523:kb3", | ||
171 | .chan_nr = 2, | 174 | .chan_nr = 2, |
172 | .led_current = 50, | 175 | .led_current = 50, |
173 | }, { | 176 | }, { |
177 | .name = "lp5523:kb4", | ||
174 | .chan_nr = 3, | 178 | .chan_nr = 3, |
175 | .led_current = 50, | 179 | .led_current = 50, |
176 | }, { | 180 | }, { |
181 | .name = "lp5523:b", | ||
177 | .chan_nr = 4, | 182 | .chan_nr = 4, |
178 | .led_current = 50, | 183 | .led_current = 50, |
179 | }, { | 184 | }, { |
185 | .name = "lp5523:g", | ||
180 | .chan_nr = 5, | 186 | .chan_nr = 5, |
181 | .led_current = 50, | 187 | .led_current = 50, |
182 | }, { | 188 | }, { |
189 | .name = "lp5523:r", | ||
183 | .chan_nr = 6, | 190 | .chan_nr = 6, |
184 | .led_current = 50, | 191 | .led_current = 50, |
185 | }, { | 192 | }, { |
193 | .name = "lp5523:kb5", | ||
186 | .chan_nr = 7, | 194 | .chan_nr = 7, |
187 | .led_current = 50, | 195 | .led_current = 50, |
188 | }, { | 196 | }, { |
197 | .name = "lp5523:kb6", | ||
189 | .chan_nr = 8, | 198 | .chan_nr = 8, |
190 | .led_current = 50, | 199 | .led_current = 50, |
191 | } | 200 | } |
@@ -1253,6 +1262,16 @@ static void __init rx51_init_lirc(void) | |||
1253 | } | 1262 | } |
1254 | #endif | 1263 | #endif |
1255 | 1264 | ||
1265 | static struct platform_device madc_hwmon = { | ||
1266 | .name = "twl4030_madc_hwmon", | ||
1267 | .id = -1, | ||
1268 | }; | ||
1269 | |||
1270 | static void __init rx51_init_twl4030_hwmon(void) | ||
1271 | { | ||
1272 | platform_device_register(&madc_hwmon); | ||
1273 | } | ||
1274 | |||
1256 | void __init rx51_peripherals_init(void) | 1275 | void __init rx51_peripherals_init(void) |
1257 | { | 1276 | { |
1258 | rx51_i2c_init(); | 1277 | rx51_i2c_init(); |
@@ -1272,5 +1291,6 @@ void __init rx51_peripherals_init(void) | |||
1272 | omap_hsmmc_init(mmc); | 1291 | omap_hsmmc_init(mmc); |
1273 | 1292 | ||
1274 | rx51_charger_init(); | 1293 | rx51_charger_init(); |
1294 | rx51_init_twl4030_hwmon(); | ||
1275 | } | 1295 | } |
1276 | 1296 | ||
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index dc5498b1b3a7..cdc0c1021863 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/wl12xx.h> | 20 | #include <linux/wl12xx.h> |
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/platform_data/gpio-omap.h> | 22 | #include <linux/platform_data/gpio-omap.h> |
23 | #include <linux/platform_data/omap-twl4030.h> | ||
23 | #include <linux/usb/phy.h> | 24 | #include <linux/usb/phy.h> |
24 | 25 | ||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
@@ -35,11 +36,9 @@ | |||
35 | #include "common-board-devices.h" | 36 | #include "common-board-devices.h" |
36 | 37 | ||
37 | #define OMAP_ZOOM_WLAN_PMENA_GPIO (101) | 38 | #define OMAP_ZOOM_WLAN_PMENA_GPIO (101) |
38 | #define ZOOM2_HEADSET_EXTMUTE_GPIO (153) | 39 | #define OMAP_ZOOM_TSC2004_IRQ_GPIO (153) |
39 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) | 40 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) |
40 | 41 | ||
41 | #define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) | ||
42 | |||
43 | /* Zoom2 has Qwerty keyboard*/ | 42 | /* Zoom2 has Qwerty keyboard*/ |
44 | static uint32_t board_keymap[] = { | 43 | static uint32_t board_keymap[] = { |
45 | KEY(0, 0, KEY_E), | 44 | KEY(0, 0, KEY_E), |
@@ -227,22 +226,31 @@ static struct omap2_hsmmc_info mmc[] = { | |||
227 | {} /* Terminator */ | 226 | {} /* Terminator */ |
228 | }; | 227 | }; |
229 | 228 | ||
229 | static struct omap_tw4030_pdata omap_twl4030_audio_data = { | ||
230 | .voice_connected = true, | ||
231 | .custom_routing = true, | ||
232 | |||
233 | .has_hs = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
234 | .has_hf = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
235 | |||
236 | .has_mainmic = true, | ||
237 | .has_submic = true, | ||
238 | .has_hsmic = true, | ||
239 | .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
240 | }; | ||
241 | |||
230 | static int zoom_twl_gpio_setup(struct device *dev, | 242 | static int zoom_twl_gpio_setup(struct device *dev, |
231 | unsigned gpio, unsigned ngpio) | 243 | unsigned gpio, unsigned ngpio) |
232 | { | 244 | { |
233 | int ret; | ||
234 | |||
235 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 245 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
236 | mmc[0].gpio_cd = gpio + 0; | 246 | mmc[0].gpio_cd = gpio + 0; |
237 | omap_hsmmc_late_init(mmc); | 247 | omap_hsmmc_late_init(mmc); |
238 | 248 | ||
239 | ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, | 249 | /* Audio setup */ |
240 | "lcd enable"); | 250 | omap_twl4030_audio_data.jack_detect = gpio + 2; |
241 | if (ret) | 251 | omap_twl4030_audio_init("Zoom2", &omap_twl4030_audio_data); |
242 | pr_err("Failed to get LCD_PANEL_ENABLE_GPIO (gpio%d).\n", | ||
243 | LCD_PANEL_ENABLE_GPIO); | ||
244 | 252 | ||
245 | return ret; | 253 | return 0; |
246 | } | 254 | } |
247 | 255 | ||
248 | static struct twl4030_gpio_platform_data zoom_gpio_data = { | 256 | static struct twl4030_gpio_platform_data zoom_gpio_data = { |
@@ -265,14 +273,9 @@ static int __init omap_i2c_init(void) | |||
265 | TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, | 273 | TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, |
266 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | 274 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); |
267 | 275 | ||
268 | if (machine_is_omap_zoom2()) { | 276 | if (machine_is_omap_zoom2()) |
269 | struct twl4030_codec_data *codec_data; | 277 | zoom_twldata.audio->codec->ramp_delay_value = 3; /* 161 ms */ |
270 | codec_data = zoom_twldata.audio->codec; | ||
271 | 278 | ||
272 | codec_data->ramp_delay_value = 3; /* 161 ms */ | ||
273 | codec_data->hs_extmute = 1; | ||
274 | codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO; | ||
275 | } | ||
276 | omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata); | 279 | omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata); |
277 | omap_register_i2c_bus(2, 400, NULL, 0); | 280 | omap_register_i2c_bus(2, 400, NULL, 0); |
278 | omap_register_i2c_bus(3, 400, NULL, 0); | 281 | omap_register_i2c_bus(3, 400, NULL, 0); |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 8d70bd03c5d8..e4b16c8efe8b 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -790,9 +790,6 @@ static int gpmc_mem_init(void) | |||
790 | * even if we didn't boot from ROM. | 790 | * even if we didn't boot from ROM. |
791 | */ | 791 | */ |
792 | boot_rom_space = BOOT_ROM_SPACE; | 792 | boot_rom_space = BOOT_ROM_SPACE; |
793 | /* In apollon the CS0 is mapped as 0x0000 0000 */ | ||
794 | if (machine_is_omap_apollon()) | ||
795 | boot_rom_space = 0; | ||
796 | gpmc_mem_root.start = GPMC_MEM_START + boot_rom_space; | 793 | gpmc_mem_root.start = GPMC_MEM_START + boot_rom_space; |
797 | gpmc_mem_root.end = GPMC_MEM_END; | 794 | gpmc_mem_root.end = GPMC_MEM_END; |
798 | 795 | ||
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 6a7aec6d1174..51e138cc5398 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -529,24 +529,29 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | |||
529 | defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030_MODULE) | 529 | defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030_MODULE) |
530 | #include <linux/platform_data/omap-twl4030.h> | 530 | #include <linux/platform_data/omap-twl4030.h> |
531 | 531 | ||
532 | /* Commonly used configuration */ | ||
532 | static struct omap_tw4030_pdata omap_twl4030_audio_data; | 533 | static struct omap_tw4030_pdata omap_twl4030_audio_data; |
533 | 534 | ||
534 | static struct platform_device audio_device = { | 535 | static struct platform_device audio_device = { |
535 | .name = "omap-twl4030", | 536 | .name = "omap-twl4030", |
536 | .id = -1, | 537 | .id = -1, |
537 | .dev = { | ||
538 | .platform_data = &omap_twl4030_audio_data, | ||
539 | }, | ||
540 | }; | 538 | }; |
541 | 539 | ||
542 | void __init omap_twl4030_audio_init(char *card_name) | 540 | void omap_twl4030_audio_init(char *card_name, |
541 | struct omap_tw4030_pdata *pdata) | ||
543 | { | 542 | { |
544 | omap_twl4030_audio_data.card_name = card_name; | 543 | if (!pdata) |
544 | pdata = &omap_twl4030_audio_data; | ||
545 | |||
546 | pdata->card_name = card_name; | ||
547 | |||
548 | audio_device.dev.platform_data = pdata; | ||
545 | platform_device_register(&audio_device); | 549 | platform_device_register(&audio_device); |
546 | } | 550 | } |
547 | 551 | ||
548 | #else /* SOC_OMAP_TWL4030 */ | 552 | #else /* SOC_OMAP_TWL4030 */ |
549 | void __init omap_twl4030_audio_init(char *card_name) | 553 | void omap_twl4030_audio_init(char *card_name, |
554 | struct omap_tw4030_pdata *pdata) | ||
550 | { | 555 | { |
551 | return; | 556 | return; |
552 | } | 557 | } |
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h index dcfbad5ac471..24b65d081b69 100644 --- a/arch/arm/mach-omap2/twl-common.h +++ b/arch/arm/mach-omap2/twl-common.h | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | struct twl4030_platform_data; | 33 | struct twl4030_platform_data; |
34 | struct twl6040_platform_data; | 34 | struct twl6040_platform_data; |
35 | struct omap_tw4030_pdata; | ||
35 | struct i2c_board_info; | 36 | struct i2c_board_info; |
36 | 37 | ||
37 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, | 38 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, |
@@ -60,6 +61,6 @@ void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | |||
60 | void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | 61 | void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, |
61 | u32 pdata_flags, u32 regulators_flags); | 62 | u32 pdata_flags, u32 regulators_flags); |
62 | 63 | ||
63 | void omap_twl4030_audio_init(char *card_name); | 64 | void omap_twl4030_audio_init(char *card_name, struct omap_tw4030_pdata *pdata); |
64 | 65 | ||
65 | #endif /* __OMAP_PMIC_COMMON__ */ | 66 | #endif /* __OMAP_PMIC_COMMON__ */ |