aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-nomadik-db8500.c
diff options
context:
space:
mode:
authorJean-Nicolas Graux <jean-nicolas.graux@stericsson.com>2012-10-05 10:18:39 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-10-28 16:18:33 -0400
commitd3cd8d0caaf86e5d67e13f4a1d8626963ad07161 (patch)
treeb2544a8a77f21c6a4eacb59f32a71294c705d489 /drivers/pinctrl/pinctrl-nomadik-db8500.c
parent287f121c8b9535a124397ee880f1dc493a88746a (diff)
pinctrl/nomadik: update other alternate-C functions on DB8500
In pinctrl-nomadik-db8500.c, add missing definitions that deal with other alternate-C functions. Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-nomadik-db8500.c')
-rw-r--r--drivers/pinctrl/pinctrl-nomadik-db8500.c101
1 files changed, 96 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-nomadik-db8500.c b/drivers/pinctrl/pinctrl-nomadik-db8500.c
index debaa75b0552..ef6f26d6ab71 100644
--- a/drivers/pinctrl/pinctrl-nomadik-db8500.c
+++ b/drivers/pinctrl/pinctrl-nomadik-db8500.c
@@ -600,14 +600,66 @@ static const unsigned usbsim_c_2_pins[] = { DB8500_PIN_AF8 };
600static const unsigned i2c3_c_2_pins[] = { DB8500_PIN_AG7, DB8500_PIN_AF7 }; 600static const unsigned i2c3_c_2_pins[] = { DB8500_PIN_AG7, DB8500_PIN_AF7 };
601 601
602/* Other C1 column */ 602/* Other C1 column */
603static const unsigned u2rx_oc1_1_pins[] = { DB8500_PIN_AB2 };
604static const unsigned stmape_oc1_1_pins[] = { DB8500_PIN_AA4, DB8500_PIN_Y4,
605 DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
606static const unsigned remap0_oc1_1_pins[] = { DB8500_PIN_E1 };
607static const unsigned remap1_oc1_1_pins[] = { DB8500_PIN_E2 };
608static const unsigned ptma9_oc1_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
609 DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H2,
610 DB8500_PIN_J2, DB8500_PIN_H1 };
603static const unsigned kp_oc1_1_pins[] = { DB8500_PIN_C6, DB8500_PIN_B3, 611static const unsigned kp_oc1_1_pins[] = { DB8500_PIN_C6, DB8500_PIN_B3,
604 DB8500_PIN_C4, DB8500_PIN_E6, DB8500_PIN_A3, DB8500_PIN_B6, 612 DB8500_PIN_C4, DB8500_PIN_E6, DB8500_PIN_A3, DB8500_PIN_B6,
605 DB8500_PIN_D6, DB8500_PIN_B7 }; 613 DB8500_PIN_D6, DB8500_PIN_B7 };
614static const unsigned rf_oc1_1_pins[] = { DB8500_PIN_D8, DB8500_PIN_D9 };
615static const unsigned hxclk_oc1_1_pins[] = { DB8500_PIN_D16 };
616static const unsigned uartmodrx_oc1_1_pins[] = { DB8500_PIN_B17 };
617static const unsigned uartmodtx_oc1_1_pins[] = { DB8500_PIN_C16 };
618static const unsigned stmmod_oc1_1_pins[] = { DB8500_PIN_C19, DB8500_PIN_C17,
619 DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19 };
620static const unsigned hxgpio_oc1_1_pins[] = { DB8500_PIN_D21, DB8500_PIN_D20,
621 DB8500_PIN_C20, DB8500_PIN_B21, DB8500_PIN_C21, DB8500_PIN_A22,
622 DB8500_PIN_B24, DB8500_PIN_C22 };
623static const unsigned rf_oc1_2_pins[] = { DB8500_PIN_C23, DB8500_PIN_D23 };
606static const unsigned spi2_oc1_1_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AG12, 624static const unsigned spi2_oc1_1_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AG12,
607 DB8500_PIN_AH12, DB8500_PIN_AH11 }; 625 DB8500_PIN_AH12, DB8500_PIN_AH11 };
608static const unsigned spi2_oc1_2_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AH12, 626static const unsigned spi2_oc1_2_pins[] = { DB8500_PIN_AH13, DB8500_PIN_AH12,
609 DB8500_PIN_AH11 }; 627 DB8500_PIN_AH11 };
610 628
629/* Other C2 column */
630static const unsigned sbag_oc2_1_pins[] = { DB8500_PIN_AA4, DB8500_PIN_AB2,
631 DB8500_PIN_Y4, DB8500_PIN_Y2, DB8500_PIN_AA2, DB8500_PIN_AA1 };
632static const unsigned etmr4_oc2_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
633 DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H2,
634 DB8500_PIN_J2, DB8500_PIN_H1 };
635static const unsigned ptma9_oc2_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
636 DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
637 DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
638 DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
639 DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
640
641/* Other C3 column */
642static const unsigned stmmod_oc3_1_pins[] = { DB8500_PIN_AB2, DB8500_PIN_W2,
643 DB8500_PIN_W3, DB8500_PIN_V3, DB8500_PIN_V2 };
644static const unsigned stmmod_oc3_2_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
645 DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3 };
646static const unsigned uartmodrx_oc3_1_pins[] = { DB8500_PIN_H2 };
647static const unsigned uartmodtx_oc3_1_pins[] = { DB8500_PIN_J2 };
648static const unsigned etmr4_oc3_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
649 DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
650 DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
651 DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
652 DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
653
654/* Other C4 column */
655static const unsigned sbag_oc4_1_pins[] = { DB8500_PIN_G5, DB8500_PIN_G4,
656 DB8500_PIN_H4, DB8500_PIN_H3, DB8500_PIN_J3, DB8500_PIN_H1 };
657static const unsigned hwobs_oc4_1_pins[] = { DB8500_PIN_D17, DB8500_PIN_D16,
658 DB8500_PIN_B17, DB8500_PIN_C16, DB8500_PIN_C19, DB8500_PIN_C17,
659 DB8500_PIN_A18, DB8500_PIN_C18, DB8500_PIN_B19, DB8500_PIN_B20,
660 DB8500_PIN_D21, DB8500_PIN_D20, DB8500_PIN_C20, DB8500_PIN_B21,
661 DB8500_PIN_C21, DB8500_PIN_A22, DB8500_PIN_B24, DB8500_PIN_C22 };
662
611#define DB8500_PIN_GROUP(a,b) { .name = #a, .pins = a##_pins, \ 663#define DB8500_PIN_GROUP(a,b) { .name = #a, .pins = a##_pins, \
612 .npins = ARRAY_SIZE(a##_pins), .altsetting = b } 664 .npins = ARRAY_SIZE(a##_pins), .altsetting = b }
613 665
@@ -726,9 +778,34 @@ static const struct nmk_pingroup nmk_db8500_groups[] = {
726 DB8500_PIN_GROUP(usbsim_c_2, NMK_GPIO_ALT_C), 778 DB8500_PIN_GROUP(usbsim_c_2, NMK_GPIO_ALT_C),
727 DB8500_PIN_GROUP(i2c3_c_2, NMK_GPIO_ALT_C), 779 DB8500_PIN_GROUP(i2c3_c_2, NMK_GPIO_ALT_C),
728 /* Other alt C1 column */ 780 /* Other alt C1 column */
781 DB8500_PIN_GROUP(u2rx_oc1_1, NMK_GPIO_ALT_C1),
782 DB8500_PIN_GROUP(stmape_oc1_1, NMK_GPIO_ALT_C1),
783 DB8500_PIN_GROUP(remap0_oc1_1, NMK_GPIO_ALT_C1),
784 DB8500_PIN_GROUP(remap1_oc1_1, NMK_GPIO_ALT_C1),
785 DB8500_PIN_GROUP(ptma9_oc1_1, NMK_GPIO_ALT_C1),
729 DB8500_PIN_GROUP(kp_oc1_1, NMK_GPIO_ALT_C1), 786 DB8500_PIN_GROUP(kp_oc1_1, NMK_GPIO_ALT_C1),
787 DB8500_PIN_GROUP(rf_oc1_1, NMK_GPIO_ALT_C1),
788 DB8500_PIN_GROUP(hxclk_oc1_1, NMK_GPIO_ALT_C1),
789 DB8500_PIN_GROUP(uartmodrx_oc1_1, NMK_GPIO_ALT_C1),
790 DB8500_PIN_GROUP(uartmodtx_oc1_1, NMK_GPIO_ALT_C1),
791 DB8500_PIN_GROUP(stmmod_oc1_1, NMK_GPIO_ALT_C1),
792 DB8500_PIN_GROUP(hxgpio_oc1_1, NMK_GPIO_ALT_C1),
793 DB8500_PIN_GROUP(rf_oc1_2, NMK_GPIO_ALT_C1),
730 DB8500_PIN_GROUP(spi2_oc1_1, NMK_GPIO_ALT_C1), 794 DB8500_PIN_GROUP(spi2_oc1_1, NMK_GPIO_ALT_C1),
731 DB8500_PIN_GROUP(spi2_oc1_2, NMK_GPIO_ALT_C1), 795 DB8500_PIN_GROUP(spi2_oc1_2, NMK_GPIO_ALT_C1),
796 /* Other alt C2 column */
797 DB8500_PIN_GROUP(sbag_oc2_1, NMK_GPIO_ALT_C2),
798 DB8500_PIN_GROUP(etmr4_oc2_1, NMK_GPIO_ALT_C2),
799 DB8500_PIN_GROUP(ptma9_oc2_1, NMK_GPIO_ALT_C2),
800 /* Other alt C3 column */
801 DB8500_PIN_GROUP(stmmod_oc3_1, NMK_GPIO_ALT_C3),
802 DB8500_PIN_GROUP(stmmod_oc3_2, NMK_GPIO_ALT_C3),
803 DB8500_PIN_GROUP(uartmodrx_oc3_1, NMK_GPIO_ALT_C3),
804 DB8500_PIN_GROUP(uartmodtx_oc3_1, NMK_GPIO_ALT_C3),
805 DB8500_PIN_GROUP(etmr4_oc3_1, NMK_GPIO_ALT_C3),
806 /* Other alt C4 column */
807 DB8500_PIN_GROUP(sbag_oc4_1, NMK_GPIO_ALT_C4),
808 DB8500_PIN_GROUP(hwobs_oc4_1, NMK_GPIO_ALT_C4),
732}; 809};
733 810
734/* We use this macro to define the groups applicable to a function */ 811/* We use this macro to define the groups applicable to a function */
@@ -742,7 +819,7 @@ DB8500_FUNC_GROUPS(u1, "u1rxtx_a_1", "u1ctsrts_a_1");
742 * only available on two pins in alternative function C 819 * only available on two pins in alternative function C
743 */ 820 */
744DB8500_FUNC_GROUPS(u2, "u2rxtx_b_1", "u2rxtx_c_1", "u2ctsrts_c_1", 821DB8500_FUNC_GROUPS(u2, "u2rxtx_b_1", "u2rxtx_c_1", "u2ctsrts_c_1",
745 "u2rxtx_c_2", "u2rxtx_c_3"); 822 "u2rxtx_c_2", "u2rxtx_c_3", "u2rx_oc1_1");
746DB8500_FUNC_GROUPS(ipi2c, "ipi2c_a_1", "ipi2c_a_2"); 823DB8500_FUNC_GROUPS(ipi2c, "ipi2c_a_1", "ipi2c_a_2");
747/* 824/*
748 * MSP0 can only be on a certain set of pins, but the TX/RX pins can be 825 * MSP0 can only be on a certain set of pins, but the TX/RX pins can be
@@ -784,8 +861,10 @@ DB8500_FUNC_GROUPS(i2c2, "i2c2_b_1", "i2c2_b_2");
784 * so select one of each. 861 * so select one of each.
785 */ 862 */
786DB8500_FUNC_GROUPS(uartmod, "uartmodtx_b_1", "uartmodrx_b_1", "uartmodrx_b_2", 863DB8500_FUNC_GROUPS(uartmod, "uartmodtx_b_1", "uartmodrx_b_1", "uartmodrx_b_2",
787 "uartmodrx_c_1", "uartmod_tx_c_1"); 864 "uartmodrx_c_1", "uartmod_tx_c_1", "uartmodrx_oc1_1",
788DB8500_FUNC_GROUPS(stmmod, "stmmod_b_1", "stmmod_c_1"); 865 "uartmodtx_oc1_1", "uartmodrx_oc3_1", "uartmodtx_oc3_1");
866DB8500_FUNC_GROUPS(stmmod, "stmmod_b_1", "stmmod_c_1", "stmmod_oc1_1",
867 "stmmod_oc3_1", "stmmod_oc3_2");
789DB8500_FUNC_GROUPS(spi3, "spi3_b_1"); 868DB8500_FUNC_GROUPS(spi3, "spi3_b_1");
790/* Select between CS0 on alt B or PS1 on alt C */ 869/* Select between CS0 on alt B or PS1 on alt C */
791DB8500_FUNC_GROUPS(sm, "sm_b_1", "smcs0_b_1", "smcs1_b_1", "smcleale_c_1", 870DB8500_FUNC_GROUPS(sm, "sm_b_1", "smcs0_b_1", "smcs1_b_1", "smcleale_c_1",
@@ -799,13 +878,19 @@ DB8500_FUNC_GROUPS(ipjtag, "ipjtag_c_1");
799DB8500_FUNC_GROUPS(slim0, "slim0_c_1"); 878DB8500_FUNC_GROUPS(slim0, "slim0_c_1");
800DB8500_FUNC_GROUPS(ms, "ms_c_1"); 879DB8500_FUNC_GROUPS(ms, "ms_c_1");
801DB8500_FUNC_GROUPS(iptrigout, "iptrigout_c_1"); 880DB8500_FUNC_GROUPS(iptrigout, "iptrigout_c_1");
802DB8500_FUNC_GROUPS(stmape, "stmape_c_1", "stmape_c_2"); 881DB8500_FUNC_GROUPS(stmape, "stmape_c_1", "stmape_c_2", "stmape_oc1_1");
803DB8500_FUNC_GROUPS(mc5, "mc5_c_1"); 882DB8500_FUNC_GROUPS(mc5, "mc5_c_1");
804DB8500_FUNC_GROUPS(usbsim, "usbsim_c_1", "usbsim_c_2"); 883DB8500_FUNC_GROUPS(usbsim, "usbsim_c_1", "usbsim_c_2");
805DB8500_FUNC_GROUPS(i2c3, "i2c3_c_1", "i2c3_c_2"); 884DB8500_FUNC_GROUPS(i2c3, "i2c3_c_1", "i2c3_c_2");
806DB8500_FUNC_GROUPS(spi0, "spi0_c_1"); 885DB8500_FUNC_GROUPS(spi0, "spi0_c_1");
807DB8500_FUNC_GROUPS(spi2, "spi2_oc1_1", "spi2_oc1_2"); 886DB8500_FUNC_GROUPS(spi2, "spi2_oc1_1", "spi2_oc1_2");
808 887DB8500_FUNC_GROUPS(remap, "remap0_oc1_1", "remap1_oc1_1");
888DB8500_FUNC_GROUPS(sbag, "sbag_oc2_1", "sbag_oc4_1");
889DB8500_FUNC_GROUPS(ptm, "ptma9_oc1_1", "ptma9_oc2_1");
890DB8500_FUNC_GROUPS(rf, "rf_oc1_1", "rf_oc1_2");
891DB8500_FUNC_GROUPS(hx, "hxclk_oc1_1", "hxgpio_oc1_1");
892DB8500_FUNC_GROUPS(etm, "etmr4_oc2_1", "etmr4_oc3_1");
893DB8500_FUNC_GROUPS(hwobs, "hwobs_oc4_1");
809#define FUNCTION(fname) \ 894#define FUNCTION(fname) \
810 { \ 895 { \
811 .name = #fname, \ 896 .name = #fname, \
@@ -858,6 +943,12 @@ static const struct nmk_function nmk_db8500_functions[] = {
858 FUNCTION(i2c3), 943 FUNCTION(i2c3),
859 FUNCTION(spi0), 944 FUNCTION(spi0),
860 FUNCTION(spi2), 945 FUNCTION(spi2),
946 FUNCTION(remap),
947 FUNCTION(ptm),
948 FUNCTION(rf),
949 FUNCTION(hx),
950 FUNCTION(etm),
951 FUNCTION(hwobs),
861}; 952};
862 953
863static const struct prcm_gpiocr_altcx_pin_desc db8500_altcx_pins[] = { 954static const struct prcm_gpiocr_altcx_pin_desc db8500_altcx_pins[] = {