aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sirf
diff options
context:
space:
mode:
authorRongjun Ying <rongjun.ying@csr.com>2014-01-30 00:54:24 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-02-10 04:13:08 -0500
commit58ffe7a02583bd19bb83c8bc7e277705625316a2 (patch)
treeb90cdd0d276daa627c8a2aa241cb35250f7f5256 /drivers/pinctrl/sirf
parent4bd7547756af5c71d55e4d77f41db3d06c18b3e0 (diff)
pinctrl: sirf: add pin group for USP0 for atlas6
USP0 has multiple functions, and has RX and TX frame sync signals, for some scenarios like audio PCM, we don't need both of them. so here we add two possibilities for USP0 only holding one of TX and RX frame sync. commit 8385af02bad only added this group for prima2, and missed atlas6. This patch fixes it. Signed-off-by: Rongjun Ying <rongjun.ying@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sirf')
-rw-r--r--drivers/pinctrl/sirf/pinctrl-atlas6.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/pinctrl/sirf/pinctrl-atlas6.c b/drivers/pinctrl/sirf/pinctrl-atlas6.c
index 2b9f32065920..09211fbeda9d 100644
--- a/drivers/pinctrl/sirf/pinctrl-atlas6.c
+++ b/drivers/pinctrl/sirf/pinctrl-atlas6.c
@@ -529,6 +529,40 @@ static const struct sirfsoc_padmux usp0_padmux = {
529 529
530static const unsigned usp0_pins[] = { 51, 52, 53, 54, 55 }; 530static const unsigned usp0_pins[] = { 51, 52, 53, 54, 55 };
531 531
532static const struct sirfsoc_muxmask usp0_only_utfs_muxmask[] = {
533 {
534 .group = 1,
535 .mask = BIT(19) | BIT(20) | BIT(21) | BIT(22),
536 },
537};
538
539static const struct sirfsoc_padmux usp0_only_utfs_padmux = {
540 .muxmask_counts = ARRAY_SIZE(usp0_only_utfs_muxmask),
541 .muxmask = usp0_only_utfs_muxmask,
542 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
543 .funcmask = BIT(1) | BIT(2) | BIT(6),
544 .funcval = 0,
545};
546
547static const unsigned usp0_only_utfs_pins[] = { 51, 52, 53, 54 };
548
549static const struct sirfsoc_muxmask usp0_only_urfs_muxmask[] = {
550 {
551 .group = 1,
552 .mask = BIT(19) | BIT(20) | BIT(21) | BIT(23),
553 },
554};
555
556static const struct sirfsoc_padmux usp0_only_urfs_padmux = {
557 .muxmask_counts = ARRAY_SIZE(usp0_only_urfs_muxmask),
558 .muxmask = usp0_only_urfs_muxmask,
559 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
560 .funcmask = BIT(1) | BIT(2) | BIT(9),
561 .funcval = 0,
562};
563
564static const unsigned usp0_only_urfs_pins[] = { 51, 52, 53, 55 };
565
532static const struct sirfsoc_muxmask usp0_uart_nostreamctrl_muxmask[] = { 566static const struct sirfsoc_muxmask usp0_uart_nostreamctrl_muxmask[] = {
533 { 567 {
534 .group = 1, 568 .group = 1,
@@ -905,6 +939,8 @@ static const struct sirfsoc_pin_group sirfsoc_pin_groups[] = {
905 SIRFSOC_PIN_GROUP("usp0grp", usp0_pins), 939 SIRFSOC_PIN_GROUP("usp0grp", usp0_pins),
906 SIRFSOC_PIN_GROUP("usp0_uart_nostreamctrl_grp", 940 SIRFSOC_PIN_GROUP("usp0_uart_nostreamctrl_grp",
907 usp0_uart_nostreamctrl_pins), 941 usp0_uart_nostreamctrl_pins),
942 SIRFSOC_PIN_GROUP("usp0_only_utfs_grp", usp0_only_utfs_pins),
943 SIRFSOC_PIN_GROUP("usp0_only_urfs_grp", usp0_only_urfs_pins),
908 SIRFSOC_PIN_GROUP("usp1grp", usp1_pins), 944 SIRFSOC_PIN_GROUP("usp1grp", usp1_pins),
909 SIRFSOC_PIN_GROUP("usp1_uart_nostreamctrl_grp", 945 SIRFSOC_PIN_GROUP("usp1_uart_nostreamctrl_grp",
910 usp1_uart_nostreamctrl_pins), 946 usp1_uart_nostreamctrl_pins),
@@ -953,6 +989,9 @@ static const char * const uart2_nostreamctrlgrp[] = { "uart2_nostreamctrlgrp" };
953static const char * const usp0_uart_nostreamctrl_grp[] = { 989static const char * const usp0_uart_nostreamctrl_grp[] = {
954 "usp0_uart_nostreamctrl_grp" }; 990 "usp0_uart_nostreamctrl_grp" };
955static const char * const usp0grp[] = { "usp0grp" }; 991static const char * const usp0grp[] = { "usp0grp" };
992static const char * const usp0_only_utfs_grp[] = { "usp0_only_utfs_grp" };
993static const char * const usp0_only_urfs_grp[] = { "usp0_only_urfs_grp" };
994
956static const char * const usp1grp[] = { "usp1grp" }; 995static const char * const usp1grp[] = { "usp1grp" };
957static const char * const usp1_uart_nostreamctrl_grp[] = { 996static const char * const usp1_uart_nostreamctrl_grp[] = {
958 "usp1_uart_nostreamctrl_grp" }; 997 "usp1_uart_nostreamctrl_grp" };
@@ -1003,6 +1042,10 @@ static const struct sirfsoc_pmx_func sirfsoc_pmx_functions[] = {
1003 SIRFSOC_PMX_FUNCTION("usp0_uart_nostreamctrl", 1042 SIRFSOC_PMX_FUNCTION("usp0_uart_nostreamctrl",
1004 usp0_uart_nostreamctrl_grp, 1043 usp0_uart_nostreamctrl_grp,
1005 usp0_uart_nostreamctrl_padmux), 1044 usp0_uart_nostreamctrl_padmux),
1045 SIRFSOC_PMX_FUNCTION("usp0_only_utfs", usp0_only_utfs_grp,
1046 usp0_only_utfs_padmux),
1047 SIRFSOC_PMX_FUNCTION("usp0_only_urfs", usp0_only_urfs_grp,
1048 usp0_only_urfs_padmux),
1006 SIRFSOC_PMX_FUNCTION("usp1", usp1grp, usp1_padmux), 1049 SIRFSOC_PMX_FUNCTION("usp1", usp1grp, usp1_padmux),
1007 SIRFSOC_PMX_FUNCTION("usp1_uart_nostreamctrl", 1050 SIRFSOC_PMX_FUNCTION("usp1_uart_nostreamctrl",
1008 usp1_uart_nostreamctrl_grp, 1051 usp1_uart_nostreamctrl_grp,