diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 20:34:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 20:34:48 -0400 |
commit | f1d2c07d331f717da79a42952be7dc1c0d35f846 (patch) | |
tree | 5bc98d2d63a37b688b40a4641855c512b385d0ae /arch/arm/mach-omap2 | |
parent | a17f29a5e98c0a32a900a773083c719e27f4bc0e (diff) | |
parent | d003e09891fdc0c170b99328eba7ed004809ef5a (diff) |
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc board specific updates from Arnd Bergmann:
"These changes are all for individual board files. In the long run,
those files will largely go away, and the amount of changes appears to
be continuously decreasing, which is a good sign. This time around,
changes are focused on tegra, omap and samsung."
Fix conflicts in arch/arm/mach-{omap2/common-board-devices.c,tegra/Makefile.boot}
as per the 'for-linus' branch.
* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (39 commits)
ARM: EXYNOS: Add leds status1 and status2 on Origen board
ARM: S3C64XX: Mark most Cragganmore initdata devinitdata
ARM: EXYNOS: Add missing .reserve field to SMDKC210
ARM: EXYNOS: Add DRM device to SMDK4X12 board
ARM: S3C64XX: Clean up after SPI driver platform data updates
ARM: SAMSUNG: no need to set the value for clk_xusbxti when it is 24Mhz
ARM: EXYNOS: Add framebuffer support for SMDK4X12
ARM: EXYNOS: Add HSOTG support to SMDK4X12
ARM: S5PV210: Add audio platform device in Goni board
ARM: S5PV210: Add audio platform device in Aquila board
ARM: EXYNOS: Add audio platform device in SMDKV310 board
ARM: S3C64XX: Don't specify an irq_base for WM1192-EV1 board
ARM: OMAP3: Fix omap3evm randconfig error introduced by VBUS support
ARM: OMAP: board-omap4panda: MUX configuration for sys_nirq2
ARM: OMAP: board-4430sdp: MUX configuration for sys_nirq2
ARM: OMAP3530evm: set pendown_state and debounce time for ads7846
ARM: omap3evm: enable VBUS switch for EHCI tranceiver
ARM: OMAP3EVM: Adding USB internal LDOs board file
ARM: OMAP3EVM: Add NAND flash definition
ARM: OMAP3: cm-t35: add tvp5150 decoder support
...
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 89 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 78 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/common-board-devices.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap2/common-board-devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/drm.c | 61 |
8 files changed, 249 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index b779ddd86fa..19b771d0c0d 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -217,6 +217,10 @@ endif | |||
217 | # OMAP2420 MSDI controller integration support ("MMC") | 217 | # OMAP2420 MSDI controller integration support ("MMC") |
218 | obj-$(CONFIG_SOC_OMAP2420) += msdi.o | 218 | obj-$(CONFIG_SOC_OMAP2420) += msdi.o |
219 | 219 | ||
220 | ifneq ($(CONFIG_DRM_OMAP),) | ||
221 | obj-y += drm.o | ||
222 | endif | ||
223 | |||
220 | # Specific board support | 224 | # Specific board support |
221 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | 225 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o |
222 | obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o | 226 | obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 8e17284a803..ad8a7d94afc 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -821,6 +821,9 @@ static void __init omap_4430sdp_display_init(void) | |||
821 | #ifdef CONFIG_OMAP_MUX | 821 | #ifdef CONFIG_OMAP_MUX |
822 | static struct omap_board_mux board_mux[] __initdata = { | 822 | static struct omap_board_mux board_mux[] __initdata = { |
823 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 823 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
824 | /* NIRQ2 for twl6040 */ | ||
825 | OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 | | ||
826 | OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE), | ||
824 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 827 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
825 | }; | 828 | }; |
826 | 829 | ||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index ded100c80a9..97d719047af 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -490,6 +490,71 @@ static struct twl4030_platform_data cm_t35_twldata = { | |||
490 | .power = &cm_t35_power_data, | 490 | .power = &cm_t35_power_data, |
491 | }; | 491 | }; |
492 | 492 | ||
493 | #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) | ||
494 | #include <media/omap3isp.h> | ||
495 | #include "devices.h" | ||
496 | |||
497 | static struct i2c_board_info cm_t35_isp_i2c_boardinfo[] = { | ||
498 | { | ||
499 | I2C_BOARD_INFO("mt9t001", 0x5d), | ||
500 | }, | ||
501 | { | ||
502 | I2C_BOARD_INFO("tvp5150", 0x5c), | ||
503 | }, | ||
504 | }; | ||
505 | |||
506 | static struct isp_subdev_i2c_board_info cm_t35_isp_primary_subdevs[] = { | ||
507 | { | ||
508 | .board_info = &cm_t35_isp_i2c_boardinfo[0], | ||
509 | .i2c_adapter_id = 3, | ||
510 | }, | ||
511 | { NULL, 0, }, | ||
512 | }; | ||
513 | |||
514 | static struct isp_subdev_i2c_board_info cm_t35_isp_secondary_subdevs[] = { | ||
515 | { | ||
516 | .board_info = &cm_t35_isp_i2c_boardinfo[1], | ||
517 | .i2c_adapter_id = 3, | ||
518 | }, | ||
519 | { NULL, 0, }, | ||
520 | }; | ||
521 | |||
522 | static struct isp_v4l2_subdevs_group cm_t35_isp_subdevs[] = { | ||
523 | { | ||
524 | .subdevs = cm_t35_isp_primary_subdevs, | ||
525 | .interface = ISP_INTERFACE_PARALLEL, | ||
526 | .bus = { | ||
527 | .parallel = { | ||
528 | .clk_pol = 1, | ||
529 | }, | ||
530 | }, | ||
531 | }, | ||
532 | { | ||
533 | .subdevs = cm_t35_isp_secondary_subdevs, | ||
534 | .interface = ISP_INTERFACE_PARALLEL, | ||
535 | .bus = { | ||
536 | .parallel = { | ||
537 | .clk_pol = 0, | ||
538 | }, | ||
539 | }, | ||
540 | }, | ||
541 | { NULL, 0, }, | ||
542 | }; | ||
543 | |||
544 | static struct isp_platform_data cm_t35_isp_pdata = { | ||
545 | .subdevs = cm_t35_isp_subdevs, | ||
546 | }; | ||
547 | |||
548 | static void __init cm_t35_init_camera(void) | ||
549 | { | ||
550 | if (omap3_init_camera(&cm_t35_isp_pdata) < 0) | ||
551 | pr_warn("CM-T3x: Failed registering camera device!\n"); | ||
552 | } | ||
553 | |||
554 | #else | ||
555 | static inline void cm_t35_init_camera(void) {} | ||
556 | #endif /* CONFIG_VIDEO_OMAP3 */ | ||
557 | |||
493 | static void __init cm_t35_init_i2c(void) | 558 | static void __init cm_t35_init_i2c(void) |
494 | { | 559 | { |
495 | omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, | 560 | omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, |
@@ -497,6 +562,8 @@ static void __init cm_t35_init_i2c(void) | |||
497 | TWL_COMMON_PDATA_AUDIO); | 562 | TWL_COMMON_PDATA_AUDIO); |
498 | 563 | ||
499 | omap3_pmic_init("tps65930", &cm_t35_twldata); | 564 | omap3_pmic_init("tps65930", &cm_t35_twldata); |
565 | |||
566 | omap_register_i2c_bus(3, 400, NULL, 0); | ||
500 | } | 567 | } |
501 | 568 | ||
502 | #ifdef CONFIG_OMAP_MUX | 569 | #ifdef CONFIG_OMAP_MUX |
@@ -574,6 +641,27 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
574 | OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 641 | OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
575 | OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 642 | OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
576 | 643 | ||
644 | /* Camera */ | ||
645 | OMAP3_MUX(CAM_HS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
646 | OMAP3_MUX(CAM_VS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
647 | OMAP3_MUX(CAM_XCLKA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
648 | OMAP3_MUX(CAM_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
649 | OMAP3_MUX(CAM_FLD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
650 | OMAP3_MUX(CAM_D0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
651 | OMAP3_MUX(CAM_D1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
652 | OMAP3_MUX(CAM_D2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
653 | OMAP3_MUX(CAM_D3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
654 | OMAP3_MUX(CAM_D4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
655 | OMAP3_MUX(CAM_D5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
656 | OMAP3_MUX(CAM_D6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
657 | OMAP3_MUX(CAM_D7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
658 | OMAP3_MUX(CAM_D8, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | ||
659 | OMAP3_MUX(CAM_D9, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN), | ||
660 | OMAP3_MUX(CAM_STROBE, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | ||
661 | |||
662 | OMAP3_MUX(CAM_D10, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLDOWN), | ||
663 | OMAP3_MUX(CAM_D11, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLDOWN), | ||
664 | |||
577 | /* display controls */ | 665 | /* display controls */ |
578 | OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 666 | OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
579 | OMAP3_MUX(GPMC_NCS7, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 667 | OMAP3_MUX(GPMC_NCS7, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
@@ -646,6 +734,7 @@ static void __init cm_t3x_common_init(void) | |||
646 | 734 | ||
647 | usb_musb_init(NULL); | 735 | usb_musb_init(NULL); |
648 | cm_t35_init_usbh(); | 736 | cm_t35_init_usbh(); |
737 | cm_t35_init_camera(); | ||
649 | } | 738 | } |
650 | 739 | ||
651 | static void __init cm_t35_init(void) | 740 | static void __init cm_t35_init(void) |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 639bd07ea38..ef230a0eb5e 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -24,6 +24,10 @@ | |||
24 | #include <linux/leds.h> | 24 | #include <linux/leds.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | 26 | ||
27 | #include <linux/mtd/mtd.h> | ||
28 | #include <linux/mtd/partitions.h> | ||
29 | #include <linux/mtd/nand.h> | ||
30 | |||
27 | #include <linux/spi/spi.h> | 31 | #include <linux/spi/spi.h> |
28 | #include <linux/spi/ads7846.h> | 32 | #include <linux/spi/ads7846.h> |
29 | #include <linux/i2c/twl.h> | 33 | #include <linux/i2c/twl.h> |
@@ -43,6 +47,7 @@ | |||
43 | 47 | ||
44 | #include <plat/board.h> | 48 | #include <plat/board.h> |
45 | #include <plat/usb.h> | 49 | #include <plat/usb.h> |
50 | #include <plat/nand.h> | ||
46 | #include "common.h" | 51 | #include "common.h" |
47 | #include <plat/mcspi.h> | 52 | #include <plat/mcspi.h> |
48 | #include <video/omapdss.h> | 53 | #include <video/omapdss.h> |
@@ -53,7 +58,6 @@ | |||
53 | #include "hsmmc.h" | 58 | #include "hsmmc.h" |
54 | #include "common-board-devices.h" | 59 | #include "common-board-devices.h" |
55 | 60 | ||
56 | #define OMAP3_EVM_TS_GPIO 175 | ||
57 | #define OMAP3_EVM_EHCI_VBUS 22 | 61 | #define OMAP3_EVM_EHCI_VBUS 22 |
58 | #define OMAP3_EVM_EHCI_SELECT 61 | 62 | #define OMAP3_EVM_EHCI_SELECT 61 |
59 | 63 | ||
@@ -355,6 +359,19 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
355 | 359 | ||
356 | platform_device_register(&leds_gpio); | 360 | platform_device_register(&leds_gpio); |
357 | 361 | ||
362 | /* Enable VBUS switch by setting TWL4030.GPIO2DIR as output | ||
363 | * for starting USB tranceiver | ||
364 | */ | ||
365 | #ifdef CONFIG_TWL4030_CORE | ||
366 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { | ||
367 | u8 val; | ||
368 | |||
369 | twl_i2c_read_u8(TWL4030_MODULE_GPIO, &val, REG_GPIODATADIR1); | ||
370 | val |= 0x04; /* TWL4030.GPIO2DIR BIT at GPIODATADIR1(0x9B) */ | ||
371 | twl_i2c_write_u8(TWL4030_MODULE_GPIO, val, REG_GPIODATADIR1); | ||
372 | } | ||
373 | #endif | ||
374 | |||
358 | return 0; | 375 | return 0; |
359 | } | 376 | } |
360 | 377 | ||
@@ -461,6 +478,28 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | |||
461 | }; | 478 | }; |
462 | #endif | 479 | #endif |
463 | 480 | ||
481 | /* VAUX2 for USB */ | ||
482 | static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = { | ||
483 | REGULATOR_SUPPLY("VDD_CSIPHY1", "omap3isp"), /* OMAP ISP */ | ||
484 | REGULATOR_SUPPLY("VDD_CSIPHY2", "omap3isp"), /* OMAP ISP */ | ||
485 | REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"), | ||
486 | REGULATOR_SUPPLY("vaux2", NULL), | ||
487 | }; | ||
488 | |||
489 | static struct regulator_init_data omap3evm_vaux2 = { | ||
490 | .constraints = { | ||
491 | .min_uV = 2800000, | ||
492 | .max_uV = 2800000, | ||
493 | .apply_uV = true, | ||
494 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
495 | | REGULATOR_MODE_STANDBY, | ||
496 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
497 | | REGULATOR_CHANGE_STATUS, | ||
498 | }, | ||
499 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vaux2_supplies), | ||
500 | .consumer_supplies = omap3evm_vaux2_supplies, | ||
501 | }; | ||
502 | |||
464 | static struct twl4030_platform_data omap3evm_twldata = { | 503 | static struct twl4030_platform_data omap3evm_twldata = { |
465 | /* platform_data for children goes here */ | 504 | /* platform_data for children goes here */ |
466 | .keypad = &omap3evm_kp_data, | 505 | .keypad = &omap3evm_kp_data, |
@@ -607,6 +646,37 @@ static struct regulator_consumer_supply dummy_supplies[] = { | |||
607 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | 646 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), |
608 | }; | 647 | }; |
609 | 648 | ||
649 | static struct mtd_partition omap3evm_nand_partitions[] = { | ||
650 | /* All the partition sizes are listed in terms of NAND block size */ | ||
651 | { | ||
652 | .name = "X-Loader", | ||
653 | .offset = 0, | ||
654 | .size = 4*(SZ_128K), | ||
655 | .mask_flags = MTD_WRITEABLE | ||
656 | }, | ||
657 | { | ||
658 | .name = "U-Boot", | ||
659 | .offset = MTDPART_OFS_APPEND, | ||
660 | .size = 14*(SZ_128K), | ||
661 | .mask_flags = MTD_WRITEABLE | ||
662 | }, | ||
663 | { | ||
664 | .name = "U-Boot Env", | ||
665 | .offset = MTDPART_OFS_APPEND, | ||
666 | .size = 2*(SZ_128K) | ||
667 | }, | ||
668 | { | ||
669 | .name = "Kernel", | ||
670 | .offset = MTDPART_OFS_APPEND, | ||
671 | .size = 40*(SZ_128K) | ||
672 | }, | ||
673 | { | ||
674 | .name = "File system", | ||
675 | .size = MTDPART_SIZ_FULL, | ||
676 | .offset = MTDPART_OFS_APPEND, | ||
677 | }, | ||
678 | }; | ||
679 | |||
610 | static void __init omap3_evm_init(void) | 680 | static void __init omap3_evm_init(void) |
611 | { | 681 | { |
612 | struct omap_board_mux *obm; | 682 | struct omap_board_mux *obm; |
@@ -623,6 +693,9 @@ static void __init omap3_evm_init(void) | |||
623 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); | 693 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); |
624 | omap_hsmmc_init(mmc); | 694 | omap_hsmmc_init(mmc); |
625 | 695 | ||
696 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | ||
697 | omap3evm_twldata.vaux2 = &omap3evm_vaux2; | ||
698 | |||
626 | omap3_evm_i2c_init(); | 699 | omap3_evm_i2c_init(); |
627 | 700 | ||
628 | omap_display_init(&omap3_evm_dss_data); | 701 | omap_display_init(&omap3_evm_dss_data); |
@@ -656,6 +729,9 @@ static void __init omap3_evm_init(void) | |||
656 | } | 729 | } |
657 | usb_musb_init(&musb_board_data); | 730 | usb_musb_init(&musb_board_data); |
658 | usbhs_init(&usbhs_bdata); | 731 | usbhs_init(&usbhs_bdata); |
732 | omap_nand_flash_init(NAND_BUSWIDTH_16, omap3evm_nand_partitions, | ||
733 | ARRAY_SIZE(omap3evm_nand_partitions)); | ||
734 | |||
659 | omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); | 735 | omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); |
660 | omap3evm_init_smsc911x(); | 736 | omap3evm_init_smsc911x(); |
661 | omap3_evm_display_init(); | 737 | omap3_evm_display_init(); |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 982fb2622ab..b627cdc12b8 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -379,6 +379,9 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
379 | OMAP4_MUX(DPM_EMU18, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | 379 | OMAP4_MUX(DPM_EMU18, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
380 | /* dispc2_data0 */ | 380 | /* dispc2_data0 */ |
381 | OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), | 381 | OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5), |
382 | /* NIRQ2 for twl6040 */ | ||
383 | OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 | | ||
384 | OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE), | ||
382 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 385 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
383 | }; | 386 | }; |
384 | 387 | ||
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index c1875862679..14734746457 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c | |||
@@ -35,6 +35,16 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = { | |||
35 | .turbo_mode = 0, | 35 | .turbo_mode = 0, |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* | ||
39 | * ADS7846 driver maybe request a gpio according to the value | ||
40 | * of pdata->get_pendown_state, but we have done this. So set | ||
41 | * get_pendown_state to avoid twice gpio requesting. | ||
42 | */ | ||
43 | static int omap3_get_pendown_state(void) | ||
44 | { | ||
45 | return !gpio_get_value(OMAP3_EVM_TS_GPIO); | ||
46 | } | ||
47 | |||
38 | static struct ads7846_platform_data ads7846_config = { | 48 | static struct ads7846_platform_data ads7846_config = { |
39 | .x_max = 0x0fff, | 49 | .x_max = 0x0fff, |
40 | .y_max = 0x0fff, | 50 | .y_max = 0x0fff, |
@@ -45,6 +55,7 @@ static struct ads7846_platform_data ads7846_config = { | |||
45 | .debounce_rep = 1, | 55 | .debounce_rep = 1, |
46 | .gpio_pendown = -EINVAL, | 56 | .gpio_pendown = -EINVAL, |
47 | .keep_vref_on = 1, | 57 | .keep_vref_on = 1, |
58 | .get_pendown_state = &omap3_get_pendown_state, | ||
48 | }; | 59 | }; |
49 | 60 | ||
50 | static struct spi_board_info ads7846_spi_board_info __initdata = { | 61 | static struct spi_board_info ads7846_spi_board_info __initdata = { |
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index a0b4a42836a..4c4ef6a6166 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include "twl-common.h" | 4 | #include "twl-common.h" |
5 | 5 | ||
6 | #define NAND_BLOCK_SIZE SZ_128K | 6 | #define NAND_BLOCK_SIZE SZ_128K |
7 | #define OMAP3_EVM_TS_GPIO 175 | ||
7 | 8 | ||
8 | struct mtd_partition; | 9 | struct mtd_partition; |
9 | struct ads7846_platform_data; | 10 | struct ads7846_platform_data; |
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c new file mode 100644 index 00000000000..72e0f01b715 --- /dev/null +++ b/arch/arm/mach-omap2/drm.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * DRM/KMS device registration for TI OMAP platforms | ||
3 | * | ||
4 | * Copyright (C) 2012 Texas Instruments | ||
5 | * Author: Rob Clark <rob.clark@linaro.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along with | ||
17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #include <linux/module.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/mm.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/dma-mapping.h> | ||
26 | |||
27 | #include <plat/omap_device.h> | ||
28 | #include <plat/omap_hwmod.h> | ||
29 | |||
30 | #if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) | ||
31 | |||
32 | static struct platform_device omap_drm_device = { | ||
33 | .dev = { | ||
34 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
35 | }, | ||
36 | .name = "omapdrm", | ||
37 | .id = 0, | ||
38 | }; | ||
39 | |||
40 | static int __init omap_init_drm(void) | ||
41 | { | ||
42 | struct omap_hwmod *oh = NULL; | ||
43 | struct platform_device *pdev; | ||
44 | |||
45 | /* lookup and populate the DMM information, if present - OMAP4+ */ | ||
46 | oh = omap_hwmod_lookup("dmm"); | ||
47 | |||
48 | if (oh) { | ||
49 | pdev = omap_device_build(oh->name, -1, oh, NULL, 0, NULL, 0, | ||
50 | false); | ||
51 | WARN(IS_ERR(pdev), "Could not build omap_device for %s\n", | ||
52 | oh->name); | ||
53 | } | ||
54 | |||
55 | return platform_device_register(&omap_drm_device); | ||
56 | |||
57 | } | ||
58 | |||
59 | arch_initcall(omap_init_drm); | ||
60 | |||
61 | #endif | ||