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/board-omap3beagle.c | |
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/board-omap3beagle.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 41 |
1 files changed, 32 insertions, 9 deletions
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") |