diff options
author | Rongjun Ying <rongjun.ying@csr.com> | 2014-09-02 05:46:47 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-09-04 13:07:19 -0400 |
commit | c4edb116803933346d7ac5640a3f91c91158f9db (patch) | |
tree | a8300b14acafbbb3c2c7875fc03fb1c080405ac6 /drivers/pinctrl | |
parent | 0a5d667048ab3b22dff3c60561a79310981ee897 (diff) |
pinctrl: prima2: add I2S 2ch, 6ch, nodin, mclk groups
we have done that for atlas6 in commit ed36c1a, 086b8904 etc. here we
do same things for prima2.
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')
-rw-r--r-- | drivers/pinctrl/sirf/pinctrl-prima2.c | 88 |
1 files changed, 82 insertions, 6 deletions
diff --git a/drivers/pinctrl/sirf/pinctrl-prima2.c b/drivers/pinctrl/sirf/pinctrl-prima2.c index fda2547f205e..357678ee28e3 100644 --- a/drivers/pinctrl/sirf/pinctrl-prima2.c +++ b/drivers/pinctrl/sirf/pinctrl-prima2.c | |||
@@ -386,12 +386,44 @@ static const struct sirfsoc_padmux cko1_padmux = { | |||
386 | 386 | ||
387 | static const unsigned cko1_pins[] = { 42 }; | 387 | static const unsigned cko1_pins[] = { 42 }; |
388 | 388 | ||
389 | static const struct sirfsoc_muxmask i2s_mclk_muxmask[] = { | ||
390 | { | ||
391 | .group = 1, | ||
392 | .mask = BIT(10), | ||
393 | }, | ||
394 | }; | ||
395 | |||
396 | static const struct sirfsoc_padmux i2s_mclk_padmux = { | ||
397 | .muxmask_counts = ARRAY_SIZE(i2s_mclk_muxmask), | ||
398 | .muxmask = i2s_mclk_muxmask, | ||
399 | .ctrlreg = SIRFSOC_RSC_PIN_MUX, | ||
400 | .funcmask = BIT(3), | ||
401 | .funcval = BIT(3), | ||
402 | }; | ||
403 | |||
404 | static const unsigned i2s_mclk_pins[] = { 42 }; | ||
405 | |||
406 | static const struct sirfsoc_muxmask i2s_ext_clk_input_muxmask[] = { | ||
407 | { | ||
408 | .group = 1, | ||
409 | .mask = BIT(19), | ||
410 | }, | ||
411 | }; | ||
412 | |||
413 | static const struct sirfsoc_padmux i2s_ext_clk_input_padmux = { | ||
414 | .muxmask_counts = ARRAY_SIZE(i2s_ext_clk_input_muxmask), | ||
415 | .muxmask = i2s_ext_clk_input_muxmask, | ||
416 | .ctrlreg = SIRFSOC_RSC_PIN_MUX, | ||
417 | .funcmask = BIT(2), | ||
418 | .funcval = BIT(2), | ||
419 | }; | ||
420 | |||
421 | static const unsigned i2s_ext_clk_input_pins[] = { 51 }; | ||
422 | |||
389 | static const struct sirfsoc_muxmask i2s_muxmask[] = { | 423 | static const struct sirfsoc_muxmask i2s_muxmask[] = { |
390 | { | 424 | { |
391 | .group = 1, | 425 | .group = 1, |
392 | .mask = | 426 | .mask = BIT(11) | BIT(12) | BIT(13) | BIT(14), |
393 | BIT(10) | BIT(11) | BIT(12) | BIT(13) | BIT(14) | BIT(19) | ||
394 | | BIT(23) | BIT(28), | ||
395 | }, | 427 | }, |
396 | }; | 428 | }; |
397 | 429 | ||
@@ -399,11 +431,42 @@ static const struct sirfsoc_padmux i2s_padmux = { | |||
399 | .muxmask_counts = ARRAY_SIZE(i2s_muxmask), | 431 | .muxmask_counts = ARRAY_SIZE(i2s_muxmask), |
400 | .muxmask = i2s_muxmask, | 432 | .muxmask = i2s_muxmask, |
401 | .ctrlreg = SIRFSOC_RSC_PIN_MUX, | 433 | .ctrlreg = SIRFSOC_RSC_PIN_MUX, |
402 | .funcmask = BIT(3) | BIT(9), | ||
403 | .funcval = BIT(3), | ||
404 | }; | 434 | }; |
405 | 435 | ||
406 | static const unsigned i2s_pins[] = { 42, 43, 44, 45, 46, 51, 55, 60 }; | 436 | static const unsigned i2s_pins[] = { 43, 44, 45, 46 }; |
437 | |||
438 | static const struct sirfsoc_muxmask i2s_no_din_muxmask[] = { | ||
439 | { | ||
440 | .group = 1, | ||
441 | .mask = BIT(11) | BIT(12) | BIT(14), | ||
442 | }, | ||
443 | }; | ||
444 | |||
445 | static const struct sirfsoc_padmux i2s_no_din_padmux = { | ||
446 | .muxmask_counts = ARRAY_SIZE(i2s_no_din_muxmask), | ||
447 | .muxmask = i2s_no_din_muxmask, | ||
448 | .ctrlreg = SIRFSOC_RSC_PIN_MUX, | ||
449 | }; | ||
450 | |||
451 | static const unsigned i2s_no_din_pins[] = { 43, 44, 46 }; | ||
452 | |||
453 | static const struct sirfsoc_muxmask i2s_6chn_muxmask[] = { | ||
454 | { | ||
455 | .group = 1, | ||
456 | .mask = BIT(11) | BIT(12) | BIT(13) | BIT(14) | ||
457 | | BIT(23) | BIT(28), | ||
458 | }, | ||
459 | }; | ||
460 | |||
461 | static const struct sirfsoc_padmux i2s_6chn_padmux = { | ||
462 | .muxmask_counts = ARRAY_SIZE(i2s_6chn_muxmask), | ||
463 | .muxmask = i2s_6chn_muxmask, | ||
464 | .ctrlreg = SIRFSOC_RSC_PIN_MUX, | ||
465 | .funcmask = BIT(1) | BIT(9), | ||
466 | .funcval = BIT(1) | BIT(9), | ||
467 | }; | ||
468 | |||
469 | static const unsigned i2s_6chn_pins[] = { 43, 44, 45, 46, 55, 60 }; | ||
407 | 470 | ||
408 | static const struct sirfsoc_muxmask ac97_muxmask[] = { | 471 | static const struct sirfsoc_muxmask ac97_muxmask[] = { |
409 | { | 472 | { |
@@ -926,7 +989,11 @@ static const struct sirfsoc_pin_group sirfsoc_pin_groups[] = { | |||
926 | SIRFSOC_PIN_GROUP("usb1_dp_dngrp", usb1_dp_dn_pins), | 989 | SIRFSOC_PIN_GROUP("usb1_dp_dngrp", usb1_dp_dn_pins), |
927 | SIRFSOC_PIN_GROUP("uart1_route_io_usb1grp", uart1_route_io_usb1_pins), | 990 | SIRFSOC_PIN_GROUP("uart1_route_io_usb1grp", uart1_route_io_usb1_pins), |
928 | SIRFSOC_PIN_GROUP("pulse_countgrp", pulse_count_pins), | 991 | SIRFSOC_PIN_GROUP("pulse_countgrp", pulse_count_pins), |
992 | SIRFSOC_PIN_GROUP("i2smclkgrp", i2s_mclk_pins), | ||
993 | SIRFSOC_PIN_GROUP("i2s_ext_clk_inputgrp", i2s_ext_clk_input_pins), | ||
929 | SIRFSOC_PIN_GROUP("i2sgrp", i2s_pins), | 994 | SIRFSOC_PIN_GROUP("i2sgrp", i2s_pins), |
995 | SIRFSOC_PIN_GROUP("i2s_no_dingrp", i2s_no_din_pins), | ||
996 | SIRFSOC_PIN_GROUP("i2s_6chngrp", i2s_6chn_pins), | ||
930 | SIRFSOC_PIN_GROUP("ac97grp", ac97_pins), | 997 | SIRFSOC_PIN_GROUP("ac97grp", ac97_pins), |
931 | SIRFSOC_PIN_GROUP("nandgrp", nand_pins), | 998 | SIRFSOC_PIN_GROUP("nandgrp", nand_pins), |
932 | SIRFSOC_PIN_GROUP("spi0grp", spi0_pins), | 999 | SIRFSOC_PIN_GROUP("spi0grp", spi0_pins), |
@@ -980,7 +1047,11 @@ static const char * const usb1_dp_dngrp[] = { "usb1_dp_dngrp" }; | |||
980 | static const char * const | 1047 | static const char * const |
981 | uart1_route_io_usb1grp[] = { "uart1_route_io_usb1grp" }; | 1048 | uart1_route_io_usb1grp[] = { "uart1_route_io_usb1grp" }; |
982 | static const char * const pulse_countgrp[] = { "pulse_countgrp" }; | 1049 | static const char * const pulse_countgrp[] = { "pulse_countgrp" }; |
1050 | static const char * const i2smclkgrp[] = { "i2smclkgrp" }; | ||
1051 | static const char * const i2s_ext_clk_inputgrp[] = { "i2s_ext_clk_inputgrp" }; | ||
983 | static const char * const i2sgrp[] = { "i2sgrp" }; | 1052 | static const char * const i2sgrp[] = { "i2sgrp" }; |
1053 | static const char * const i2s_no_dingrp[] = { "i2s_no_dingrp" }; | ||
1054 | static const char * const i2s_6chngrp[] = { "i2s_6chngrp" }; | ||
984 | static const char * const ac97grp[] = { "ac97grp" }; | 1055 | static const char * const ac97grp[] = { "ac97grp" }; |
985 | static const char * const nandgrp[] = { "nandgrp" }; | 1056 | static const char * const nandgrp[] = { "nandgrp" }; |
986 | static const char * const spi0grp[] = { "spi0grp" }; | 1057 | static const char * const spi0grp[] = { "spi0grp" }; |
@@ -1037,7 +1108,12 @@ static const struct sirfsoc_pmx_func sirfsoc_pmx_functions[] = { | |||
1037 | SIRFSOC_PMX_FUNCTION("uart1_route_io_usb1", | 1108 | SIRFSOC_PMX_FUNCTION("uart1_route_io_usb1", |
1038 | uart1_route_io_usb1grp, uart1_route_io_usb1_padmux), | 1109 | uart1_route_io_usb1grp, uart1_route_io_usb1_padmux), |
1039 | SIRFSOC_PMX_FUNCTION("pulse_count", pulse_countgrp, pulse_count_padmux), | 1110 | SIRFSOC_PMX_FUNCTION("pulse_count", pulse_countgrp, pulse_count_padmux), |
1111 | SIRFSOC_PMX_FUNCTION("i2s_mclk", i2smclkgrp, i2s_mclk_padmux), | ||
1112 | SIRFSOC_PMX_FUNCTION("i2s_ext_clk_input", i2s_ext_clk_inputgrp, | ||
1113 | i2s_ext_clk_input_padmux), | ||
1040 | SIRFSOC_PMX_FUNCTION("i2s", i2sgrp, i2s_padmux), | 1114 | SIRFSOC_PMX_FUNCTION("i2s", i2sgrp, i2s_padmux), |
1115 | SIRFSOC_PMX_FUNCTION("i2s_no_din", i2s_no_dingrp, i2s_no_din_padmux), | ||
1116 | SIRFSOC_PMX_FUNCTION("i2s_6chn", i2s_6chngrp, i2s_6chn_padmux), | ||
1041 | SIRFSOC_PMX_FUNCTION("ac97", ac97grp, ac97_padmux), | 1117 | SIRFSOC_PMX_FUNCTION("ac97", ac97grp, ac97_padmux), |
1042 | SIRFSOC_PMX_FUNCTION("nand", nandgrp, nand_padmux), | 1118 | SIRFSOC_PMX_FUNCTION("nand", nandgrp, nand_padmux), |
1043 | SIRFSOC_PMX_FUNCTION("spi0", spi0grp, spi0_padmux), | 1119 | SIRFSOC_PMX_FUNCTION("spi0", spi0grp, spi0_padmux), |