aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRongjun Ying <Rongjun.Ying@csr.com>2014-01-02 21:59:25 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-01-08 04:51:10 -0500
commit8385af02bad1724a720f6ba4c1ec590d4f082229 (patch)
treecfe7211ff40246dbd2dad5b13e2293baf1724bd5
parentcbc3b873c8a152fb76a0d4d5697319d9beda3d85 (diff)
pinctrl: sirf: add pin group for USP0 with only RX or TX frame sync
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. Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com> Signed-off-by: Barry Song <Barry.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/sirf/pinctrl-prima2.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/pinctrl/sirf/pinctrl-prima2.c b/drivers/pinctrl/sirf/pinctrl-prima2.c
index 97046410e0cf..37b42651d76a 100644
--- a/drivers/pinctrl/sirf/pinctrl-prima2.c
+++ b/drivers/pinctrl/sirf/pinctrl-prima2.c
@@ -497,6 +497,40 @@ static const struct sirfsoc_padmux usp0_padmux = {
497 497
498static const unsigned usp0_pins[] = { 51, 52, 53, 54, 55 }; 498static const unsigned usp0_pins[] = { 51, 52, 53, 54, 55 };
499 499
500static const struct sirfsoc_muxmask usp0_only_utfs_muxmask[] = {
501 {
502 .group = 1,
503 .mask = BIT(19) | BIT(20) | BIT(21) | BIT(22),
504 },
505};
506
507static const struct sirfsoc_padmux usp0_only_utfs_padmux = {
508 .muxmask_counts = ARRAY_SIZE(usp0_only_utfs_muxmask),
509 .muxmask = usp0_only_utfs_muxmask,
510 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
511 .funcmask = BIT(1) | BIT(2) | BIT(6),
512 .funcval = 0,
513};
514
515static const unsigned usp0_only_utfs_pins[] = { 51, 52, 53, 54 };
516
517static const struct sirfsoc_muxmask usp0_only_urfs_muxmask[] = {
518 {
519 .group = 1,
520 .mask = BIT(19) | BIT(20) | BIT(21) | BIT(23),
521 },
522};
523
524static const struct sirfsoc_padmux usp0_only_urfs_padmux = {
525 .muxmask_counts = ARRAY_SIZE(usp0_only_urfs_muxmask),
526 .muxmask = usp0_only_urfs_muxmask,
527 .ctrlreg = SIRFSOC_RSC_PIN_MUX,
528 .funcmask = BIT(1) | BIT(2) | BIT(9),
529 .funcval = 0,
530};
531
532static const unsigned usp0_only_urfs_pins[] = { 51, 52, 53, 55 };
533
500static const struct sirfsoc_muxmask usp0_uart_nostreamctrl_muxmask[] = { 534static const struct sirfsoc_muxmask usp0_uart_nostreamctrl_muxmask[] = {
501 { 535 {
502 .group = 1, 536 .group = 1,
@@ -853,6 +887,8 @@ static const struct sirfsoc_pin_group sirfsoc_pin_groups[] = {
853 SIRFSOC_PIN_GROUP("usp0grp", usp0_pins), 887 SIRFSOC_PIN_GROUP("usp0grp", usp0_pins),
854 SIRFSOC_PIN_GROUP("usp0_uart_nostreamctrl_grp", 888 SIRFSOC_PIN_GROUP("usp0_uart_nostreamctrl_grp",
855 usp0_uart_nostreamctrl_pins), 889 usp0_uart_nostreamctrl_pins),
890 SIRFSOC_PIN_GROUP("usp0_only_utfs_grp", usp0_only_utfs_pins),
891 SIRFSOC_PIN_GROUP("usp0_only_urfs_grp", usp0_only_urfs_pins),
856 SIRFSOC_PIN_GROUP("usp1grp", usp1_pins), 892 SIRFSOC_PIN_GROUP("usp1grp", usp1_pins),
857 SIRFSOC_PIN_GROUP("usp1_uart_nostreamctrl_grp", 893 SIRFSOC_PIN_GROUP("usp1_uart_nostreamctrl_grp",
858 usp1_uart_nostreamctrl_pins), 894 usp1_uart_nostreamctrl_pins),
@@ -901,6 +937,8 @@ static const char * const uart2_nostreamctrlgrp[] = { "uart2_nostreamctrlgrp" };
901static const char * const usp0grp[] = { "usp0grp" }; 937static const char * const usp0grp[] = { "usp0grp" };
902static const char * const usp0_uart_nostreamctrl_grp[] = 938static const char * const usp0_uart_nostreamctrl_grp[] =
903 { "usp0_uart_nostreamctrl_grp" }; 939 { "usp0_uart_nostreamctrl_grp" };
940static const char * const usp0_only_utfs_grp[] = { "usp0_only_utfs_grp" };
941static const char * const usp0_only_urfs_grp[] = { "usp0_only_urfs_grp" };
904static const char * const usp1grp[] = { "usp1grp" }; 942static const char * const usp1grp[] = { "usp1grp" };
905static const char * const usp1_uart_nostreamctrl_grp[] = 943static const char * const usp1_uart_nostreamctrl_grp[] =
906 { "usp1_uart_nostreamctrl_grp" }; 944 { "usp1_uart_nostreamctrl_grp" };
@@ -949,6 +987,8 @@ static const struct sirfsoc_pmx_func sirfsoc_pmx_functions[] = {
949 SIRFSOC_PMX_FUNCTION("usp0", usp0grp, usp0_padmux), 987 SIRFSOC_PMX_FUNCTION("usp0", usp0grp, usp0_padmux),
950 SIRFSOC_PMX_FUNCTION("usp0_uart_nostreamctrl", 988 SIRFSOC_PMX_FUNCTION("usp0_uart_nostreamctrl",
951 usp0_uart_nostreamctrl_grp, usp0_uart_nostreamctrl_padmux), 989 usp0_uart_nostreamctrl_grp, usp0_uart_nostreamctrl_padmux),
990 SIRFSOC_PMX_FUNCTION("usp0_only_utfs", usp0_only_utfs_grp, usp0_only_utfs_padmux),
991 SIRFSOC_PMX_FUNCTION("usp0_only_urfs", usp0_only_urfs_grp, usp0_only_urfs_padmux),
952 SIRFSOC_PMX_FUNCTION("usp1", usp1grp, usp1_padmux), 992 SIRFSOC_PMX_FUNCTION("usp1", usp1grp, usp1_padmux),
953 SIRFSOC_PMX_FUNCTION("usp1_uart_nostreamctrl", 993 SIRFSOC_PMX_FUNCTION("usp1_uart_nostreamctrl",
954 usp1_uart_nostreamctrl_grp, usp1_uart_nostreamctrl_padmux), 994 usp1_uart_nostreamctrl_grp, usp1_uart_nostreamctrl_padmux),