diff options
author | Vinay Simha BN <simhavcs@gmail.com> | 2017-08-16 02:02:17 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-08-31 05:32:19 -0400 |
commit | 2c7710847c444d22e0dd7f843fdbf892304e1cae (patch) | |
tree | c79146e5a866388605dcdcc5987f6272a52f569f | |
parent | 41d32cfce1ae616413761d07986e1fb4b907e808 (diff) |
pinctrl: qcom: General Purpose clocks for apq8064
Add support for general purpose (GP) clocks
for apq8064
DT binding documentation updated for
qcom,apq8064-pinctrl general purpose (GP) clocks.
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt | 3 | ||||
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-apq8064.c | 42 |
2 files changed, 38 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt index a7bde64798c7..a752a4716486 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt | |||
@@ -46,7 +46,8 @@ Valid values for pins are: | |||
46 | gpio0-gpio89 | 46 | gpio0-gpio89 |
47 | 47 | ||
48 | Valid values for function are: | 48 | Valid values for function are: |
49 | cam_mclk, codec_mic_i2s, codec_spkr_i2s, gpio, gsbi1, gsbi2, gsbi3, gsbi4, | 49 | cam_mclk, codec_mic_i2s, codec_spkr_i2s, gp_clk_0a, gp_clk_0b, gp_clk_1a, |
50 | gp_clk_1b, gp_clk_2a, gp_clk_2b, gpio, gsbi1, gsbi2, gsbi3, gsbi4, | ||
50 | gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, | 51 | gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, |
51 | gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1, | 52 | gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1, |
52 | gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm, | 53 | gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm, |
diff --git a/drivers/pinctrl/qcom/pinctrl-apq8064.c b/drivers/pinctrl/qcom/pinctrl-apq8064.c index cd96699b1929..bcf9e615ff61 100644 --- a/drivers/pinctrl/qcom/pinctrl-apq8064.c +++ b/drivers/pinctrl/qcom/pinctrl-apq8064.c | |||
@@ -295,6 +295,12 @@ enum apq8064_functions { | |||
295 | APQ_MUX_cam_mclk, | 295 | APQ_MUX_cam_mclk, |
296 | APQ_MUX_codec_mic_i2s, | 296 | APQ_MUX_codec_mic_i2s, |
297 | APQ_MUX_codec_spkr_i2s, | 297 | APQ_MUX_codec_spkr_i2s, |
298 | APQ_MUX_gp_clk_0a, | ||
299 | APQ_MUX_gp_clk_0b, | ||
300 | APQ_MUX_gp_clk_1a, | ||
301 | APQ_MUX_gp_clk_1b, | ||
302 | APQ_MUX_gp_clk_2a, | ||
303 | APQ_MUX_gp_clk_2b, | ||
298 | APQ_MUX_gpio, | 304 | APQ_MUX_gpio, |
299 | APQ_MUX_gsbi1, | 305 | APQ_MUX_gsbi1, |
300 | APQ_MUX_gsbi2, | 306 | APQ_MUX_gsbi2, |
@@ -354,6 +360,24 @@ static const char * const gpio_groups[] = { | |||
354 | "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", | 360 | "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", |
355 | "gpio85", "gpio86", "gpio87", "gpio88", "gpio89" | 361 | "gpio85", "gpio86", "gpio87", "gpio88", "gpio89" |
356 | }; | 362 | }; |
363 | static const char * const gp_clk_0a_groups[] = { | ||
364 | "gpio3" | ||
365 | }; | ||
366 | static const char * const gp_clk_0b_groups[] = { | ||
367 | "gpio34" | ||
368 | }; | ||
369 | static const char * const gp_clk_1a_groups[] = { | ||
370 | "gpio4" | ||
371 | }; | ||
372 | static const char * const gp_clk_1b_groups[] = { | ||
373 | "gpio50" | ||
374 | }; | ||
375 | static const char * const gp_clk_2a_groups[] = { | ||
376 | "gpio32" | ||
377 | }; | ||
378 | static const char * const gp_clk_2b_groups[] = { | ||
379 | "gpio25" | ||
380 | }; | ||
357 | static const char * const ps_hold_groups[] = { | 381 | static const char * const ps_hold_groups[] = { |
358 | "gpio78" | 382 | "gpio78" |
359 | }; | 383 | }; |
@@ -452,6 +476,12 @@ static const struct msm_function apq8064_functions[] = { | |||
452 | FUNCTION(cam_mclk), | 476 | FUNCTION(cam_mclk), |
453 | FUNCTION(codec_mic_i2s), | 477 | FUNCTION(codec_mic_i2s), |
454 | FUNCTION(codec_spkr_i2s), | 478 | FUNCTION(codec_spkr_i2s), |
479 | FUNCTION(gp_clk_0a), | ||
480 | FUNCTION(gp_clk_0b), | ||
481 | FUNCTION(gp_clk_1a), | ||
482 | FUNCTION(gp_clk_1b), | ||
483 | FUNCTION(gp_clk_2a), | ||
484 | FUNCTION(gp_clk_2b), | ||
455 | FUNCTION(gpio), | 485 | FUNCTION(gpio), |
456 | FUNCTION(gsbi1), | 486 | FUNCTION(gsbi1), |
457 | FUNCTION(gsbi2), | 487 | FUNCTION(gsbi2), |
@@ -490,8 +520,8 @@ static const struct msm_pingroup apq8064_groups[] = { | |||
490 | PINGROUP(0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 520 | PINGROUP(0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
491 | PINGROUP(1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 521 | PINGROUP(1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
492 | PINGROUP(2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 522 | PINGROUP(2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
493 | PINGROUP(3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 523 | PINGROUP(3, NA, gp_clk_0a, NA, NA, NA, NA, NA, NA, NA, NA), |
494 | PINGROUP(4, NA, NA, cam_mclk, NA, NA, NA, NA, NA, NA, NA), | 524 | PINGROUP(4, NA, NA, cam_mclk, gp_clk_1a, NA, NA, NA, NA, NA, NA), |
495 | PINGROUP(5, NA, cam_mclk, NA, NA, NA, NA, NA, NA, NA, NA), | 525 | PINGROUP(5, NA, cam_mclk, NA, NA, NA, NA, NA, NA, NA, NA), |
496 | PINGROUP(6, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 526 | PINGROUP(6, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
497 | PINGROUP(7, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 527 | PINGROUP(7, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
@@ -512,16 +542,16 @@ static const struct msm_pingroup apq8064_groups[] = { | |||
512 | PINGROUP(22, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 542 | PINGROUP(22, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
513 | PINGROUP(23, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 543 | PINGROUP(23, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
514 | PINGROUP(24, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 544 | PINGROUP(24, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
515 | PINGROUP(25, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 545 | PINGROUP(25, gsbi2, gp_clk_2b, NA, NA, NA, NA, NA, NA, NA, NA), |
516 | PINGROUP(26, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 546 | PINGROUP(26, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
517 | PINGROUP(27, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 547 | PINGROUP(27, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
518 | PINGROUP(28, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 548 | PINGROUP(28, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
519 | PINGROUP(29, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 549 | PINGROUP(29, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
520 | PINGROUP(30, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 550 | PINGROUP(30, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
521 | PINGROUP(31, mi2s, NA, gsbi5_spi_cs2, gsbi6_spi_cs2, gsbi7_spi_cs2, NA, NA, NA, NA, NA), | 551 | PINGROUP(31, mi2s, NA, gsbi5_spi_cs2, gsbi6_spi_cs2, gsbi7_spi_cs2, NA, NA, NA, NA, NA), |
522 | PINGROUP(32, mi2s, NA, NA, NA, NA, gsbi5_spi_cs3, gsbi6_spi_cs3, gsbi7_spi_cs3, NA, NA), | 552 | PINGROUP(32, mi2s, gp_clk_2a, NA, NA, NA, gsbi5_spi_cs3, gsbi6_spi_cs3, gsbi7_spi_cs3, NA, NA), |
523 | PINGROUP(33, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 553 | PINGROUP(33, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
524 | PINGROUP(34, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 554 | PINGROUP(34, codec_mic_i2s, gp_clk_0b, NA, NA, NA, NA, NA, NA, NA, NA), |
525 | PINGROUP(35, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 555 | PINGROUP(35, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
526 | PINGROUP(36, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 556 | PINGROUP(36, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
527 | PINGROUP(37, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 557 | PINGROUP(37, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
@@ -537,7 +567,7 @@ static const struct msm_pingroup apq8064_groups[] = { | |||
537 | PINGROUP(47, spkr_i2s, gsbi5_spi_cs1, gsbi6_spi_cs1, gsbi7_spi_cs1, NA, NA, NA, NA, NA, NA), | 567 | PINGROUP(47, spkr_i2s, gsbi5_spi_cs1, gsbi6_spi_cs1, gsbi7_spi_cs1, NA, NA, NA, NA, NA, NA), |
538 | PINGROUP(48, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 568 | PINGROUP(48, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
539 | PINGROUP(49, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 569 | PINGROUP(49, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), |
540 | PINGROUP(50, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), | 570 | PINGROUP(50, spkr_i2s, gp_clk_1b, NA, NA, NA, NA, NA, NA, NA, NA), |
541 | PINGROUP(51, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), | 571 | PINGROUP(51, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), |
542 | PINGROUP(52, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), | 572 | PINGROUP(52, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), |
543 | PINGROUP(53, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), | 573 | PINGROUP(53, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), |