diff options
author | Igor Grinberg <grinberg@compulab.co.il> | 2011-07-05 06:38:23 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-07-05 06:38:23 -0400 |
commit | c31469747854a1f1dcfd81a8fb1d9865c3ee58b9 (patch) | |
tree | 71b9f75eb15df72bddaa9b32501001a89b9702b9 /arch/arm/mach-omap2/board-cm-t35.c | |
parent | 5fe8b4c19dc24e3bb873daf9e96a2439a83bbd79 (diff) |
arm: omap3: cm-t35: add support for cm-t3730
cm-t3730 is basically the same board as cm-t35,
but has AM/DM3730 SoC assembled and therefore some changes are required.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Mike Rapoport <mike@compulab.co.il>
[tony@atomide.com: updated for init_irq cleanup as noted by khilman@ti.com]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t35.c')
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 77 |
1 files changed, 61 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 9d585ca3941d..fcd403224f98 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * board-cm-t35.c (CompuLab CM-T35 module) | 2 | * CompuLab CM-T35/CM-T3730 modules support |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 CompuLab, Ltd. | 4 | * Copyright (C) 2009-2011 CompuLab, Ltd. |
5 | * Authors: Mike Rapoport <mike@compulab.co.il> | 5 | * Authors: Mike Rapoport <mike@compulab.co.il> |
@@ -570,17 +570,11 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
570 | OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 570 | OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
571 | OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), | 571 | OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), |
572 | 572 | ||
573 | /* DSS */ | 573 | /* common DSS */ |
574 | OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 574 | OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
575 | OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 575 | OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
576 | OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 576 | OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
577 | OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 577 | OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
578 | OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
579 | OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
580 | OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
581 | OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
582 | OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
583 | OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
584 | OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 578 | OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
585 | OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 579 | OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
586 | OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 580 | OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
@@ -593,12 +587,6 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
593 | OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 587 | OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
594 | OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 588 | OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
595 | OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | 589 | OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), |
596 | OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
597 | OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
598 | OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
599 | OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
600 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
601 | OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
602 | 590 | ||
603 | /* display controls */ | 591 | /* display controls */ |
604 | OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 592 | OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
@@ -611,19 +599,53 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
611 | 599 | ||
612 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 600 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
613 | }; | 601 | }; |
602 | |||
603 | static void __init cm_t3x_common_dss_mux_init(int mux_mode) | ||
604 | { | ||
605 | omap_mux_init_signal("dss_data18", mux_mode); | ||
606 | omap_mux_init_signal("dss_data19", mux_mode); | ||
607 | omap_mux_init_signal("dss_data20", mux_mode); | ||
608 | omap_mux_init_signal("dss_data21", mux_mode); | ||
609 | omap_mux_init_signal("dss_data22", mux_mode); | ||
610 | omap_mux_init_signal("dss_data23", mux_mode); | ||
611 | } | ||
612 | |||
613 | static void __init cm_t35_init_mux(void) | ||
614 | { | ||
615 | omap_mux_init_signal("gpio_70", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | ||
616 | omap_mux_init_signal("gpio_71", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | ||
617 | omap_mux_init_signal("gpio_72", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | ||
618 | omap_mux_init_signal("gpio_73", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | ||
619 | omap_mux_init_signal("gpio_74", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | ||
620 | omap_mux_init_signal("gpio_75", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | ||
621 | cm_t3x_common_dss_mux_init(OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | ||
622 | } | ||
623 | |||
624 | static void __init cm_t3730_init_mux(void) | ||
625 | { | ||
626 | omap_mux_init_signal("sys_boot0", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | ||
627 | omap_mux_init_signal("sys_boot1", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | ||
628 | omap_mux_init_signal("sys_boot3", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | ||
629 | omap_mux_init_signal("sys_boot4", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | ||
630 | omap_mux_init_signal("sys_boot5", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | ||
631 | omap_mux_init_signal("sys_boot6", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | ||
632 | cm_t3x_common_dss_mux_init(OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | ||
633 | } | ||
634 | #else | ||
635 | static inline void cm_t35_init_mux(void) {} | ||
636 | static inline void cm_t3730_init_mux(void) {} | ||
614 | #endif | 637 | #endif |
615 | 638 | ||
616 | static struct omap_board_config_kernel cm_t35_config[] __initdata = { | 639 | static struct omap_board_config_kernel cm_t35_config[] __initdata = { |
617 | }; | 640 | }; |
618 | 641 | ||
619 | static void __init cm_t35_init(void) | 642 | static void __init cm_t3x_common_init(void) |
620 | { | 643 | { |
621 | omap_board_config = cm_t35_config; | 644 | omap_board_config = cm_t35_config; |
622 | omap_board_config_size = ARRAY_SIZE(cm_t35_config); | 645 | omap_board_config_size = ARRAY_SIZE(cm_t35_config); |
623 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); | 646 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); |
624 | omap_serial_init(); | 647 | omap_serial_init(); |
625 | cm_t35_init_i2c(); | 648 | cm_t35_init_i2c(); |
626 | cm_t35_init_nand(); | ||
627 | omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL); | 649 | omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL); |
628 | cm_t35_init_ethernet(); | 650 | cm_t35_init_ethernet(); |
629 | cm_t35_init_led(); | 651 | cm_t35_init_led(); |
@@ -633,6 +655,19 @@ static void __init cm_t35_init(void) | |||
633 | usbhs_init(&usbhs_bdata); | 655 | usbhs_init(&usbhs_bdata); |
634 | } | 656 | } |
635 | 657 | ||
658 | static void __init cm_t35_init(void) | ||
659 | { | ||
660 | cm_t3x_common_init(); | ||
661 | cm_t35_init_mux(); | ||
662 | cm_t35_init_nand(); | ||
663 | } | ||
664 | |||
665 | static void __init cm_t3730_init(void) | ||
666 | { | ||
667 | cm_t3x_common_init(); | ||
668 | cm_t3730_init_mux(); | ||
669 | } | ||
670 | |||
636 | MACHINE_START(CM_T35, "Compulab CM-T35") | 671 | MACHINE_START(CM_T35, "Compulab CM-T35") |
637 | .boot_params = 0x80000100, | 672 | .boot_params = 0x80000100, |
638 | .reserve = omap_reserve, | 673 | .reserve = omap_reserve, |
@@ -642,3 +677,13 @@ MACHINE_START(CM_T35, "Compulab CM-T35") | |||
642 | .init_machine = cm_t35_init, | 677 | .init_machine = cm_t35_init, |
643 | .timer = &omap3_timer, | 678 | .timer = &omap3_timer, |
644 | MACHINE_END | 679 | MACHINE_END |
680 | |||
681 | MACHINE_START(CM_T3730, "Compulab CM-T3730") | ||
682 | .boot_params = 0x80000100, | ||
683 | .reserve = omap_reserve, | ||
684 | .map_io = omap3_map_io, | ||
685 | .init_early = cm_t35_init_early, | ||
686 | .init_irq = omap3_init_irq, | ||
687 | .init_machine = cm_t3730_init, | ||
688 | .timer = &omap3_timer, | ||
689 | MACHINE_END | ||