aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2017-03-18 08:27:35 -0400
committerLinus Walleij <linus.walleij@linaro.org>2017-03-23 04:46:04 -0400
commitcc97a95f953be9a30c26982e39bfbce08ced3b9b (patch)
tree2463736499f04f54eb02e814cbd10adbb86b77e4
parentf658ed3642cd1872c536c820597b85a9da2ddded (diff)
pinctrl: meson: gxl: add the missing PWM pin definitions
This adds support for the missing PWM pins on Meson GXL SoCs, namely: - PWM_A - PWM_B - PWM_C - PWM_F (GPIOX_7 and GPIOCLK_1 can be selected as output) - PWM_AO_A (GPIOAO_3 and GPIOAO_8 can be selected as output) Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson-gxl.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
index 4ab94a85e306..a0a7936f8f0d 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
@@ -195,8 +195,19 @@ static const unsigned int eth_txd1_pins[] = { PIN(GPIOZ_11, EE_OFF) };
195static const unsigned int eth_txd2_pins[] = { PIN(GPIOZ_12, EE_OFF) }; 195static const unsigned int eth_txd2_pins[] = { PIN(GPIOZ_12, EE_OFF) };
196static const unsigned int eth_txd3_pins[] = { PIN(GPIOZ_13, EE_OFF) }; 196static const unsigned int eth_txd3_pins[] = { PIN(GPIOZ_13, EE_OFF) };
197 197
198static const unsigned int pwm_a_pins[] = { PIN(GPIOX_6, EE_OFF) };
199
200static const unsigned int pwm_b_pins[] = { PIN(GPIODV_29, EE_OFF) };
201
202static const unsigned int pwm_c_pins[] = { PIN(GPIOZ_15, EE_OFF) };
203
204static const unsigned int pwm_d_pins[] = { PIN(GPIODV_28, EE_OFF) };
205
198static const unsigned int pwm_e_pins[] = { PIN(GPIOX_16, EE_OFF) }; 206static const unsigned int pwm_e_pins[] = { PIN(GPIOX_16, EE_OFF) };
199 207
208static const unsigned int pwm_f_clk_pins[] = { PIN(GPIOCLK_1, EE_OFF) };
209static const unsigned int pwm_f_x_pins[] = { PIN(GPIOX_7, EE_OFF) };
210
200static const unsigned int hdmi_hpd_pins[] = { PIN(GPIOH_0, EE_OFF) }; 211static const unsigned int hdmi_hpd_pins[] = { PIN(GPIOH_0, EE_OFF) };
201static const unsigned int hdmi_sda_pins[] = { PIN(GPIOH_1, EE_OFF) }; 212static const unsigned int hdmi_sda_pins[] = { PIN(GPIOH_1, EE_OFF) };
202static const unsigned int hdmi_scl_pins[] = { PIN(GPIOH_2, EE_OFF) }; 213static const unsigned int hdmi_scl_pins[] = { PIN(GPIOH_2, EE_OFF) };
@@ -225,6 +236,9 @@ static const unsigned int uart_rts_ao_b_pins[] = { PIN(GPIOAO_3, 0) };
225 236
226static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) }; 237static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) };
227 238
239static const unsigned int pwm_ao_a_3_pins[] = { PIN(GPIOAO_3, 0) };
240static const unsigned int pwm_ao_a_8_pins[] = { PIN(GPIOAO_8, 0) };
241
228static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_9, 0) }; 242static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_9, 0) };
229 243
230static struct meson_pmx_group meson_gxl_periphs_groups[] = { 244static struct meson_pmx_group meson_gxl_periphs_groups[] = {
@@ -350,7 +364,9 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = {
350 GROUP(uart_rts_a, 5, 16), 364 GROUP(uart_rts_a, 5, 16),
351 GROUP(uart_tx_c, 5, 13), 365 GROUP(uart_tx_c, 5, 13),
352 GROUP(uart_rx_c, 5, 12), 366 GROUP(uart_rx_c, 5, 12),
367 GROUP(pwm_a, 5, 25),
353 GROUP(pwm_e, 5, 15), 368 GROUP(pwm_e, 5, 15),
369 GROUP(pwm_f_x, 5, 14),
354 370
355 /* Bank Z */ 371 /* Bank Z */
356 GROUP(eth_mdio, 4, 22), 372 GROUP(eth_mdio, 4, 22),
@@ -367,6 +383,7 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = {
367 GROUP(eth_txd1, 4, 12), 383 GROUP(eth_txd1, 4, 12),
368 GROUP(eth_txd2, 4, 11), 384 GROUP(eth_txd2, 4, 11),
369 GROUP(eth_txd3, 4, 10), 385 GROUP(eth_txd3, 4, 10),
386 GROUP(pwm_c, 3, 20),
370 387
371 /* Bank H */ 388 /* Bank H */
372 GROUP(hdmi_hpd, 6, 31), 389 GROUP(hdmi_hpd, 6, 31),
@@ -382,6 +399,8 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = {
382 GROUP(i2c_sda_b, 1, 12), 399 GROUP(i2c_sda_b, 1, 12),
383 GROUP(i2c_sck_c, 1, 11), 400 GROUP(i2c_sck_c, 1, 11),
384 GROUP(i2c_sda_c, 1, 10), 401 GROUP(i2c_sda_c, 1, 10),
402 GROUP(pwm_b, 2, 11),
403 GROUP(pwm_d, 2, 12),
385 404
386 /* Bank BOOT */ 405 /* Bank BOOT */
387 GROUP(emmc_nand_d07, 7, 31), 406 GROUP(emmc_nand_d07, 7, 31),
@@ -404,6 +423,9 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = {
404 GROUP(sdcard_d2, 6, 0), 423 GROUP(sdcard_d2, 6, 0),
405 GROUP(sdcard_cmd, 6, 2), 424 GROUP(sdcard_cmd, 6, 2),
406 GROUP(sdcard_clk, 6, 3), 425 GROUP(sdcard_clk, 6, 3),
426
427 /* Bank CLK */
428 GROUP(pwm_f_clk, 8, 30),
407}; 429};
408 430
409static struct meson_pmx_group meson_gxl_aobus_groups[] = { 431static struct meson_pmx_group meson_gxl_aobus_groups[] = {
@@ -428,6 +450,8 @@ static struct meson_pmx_group meson_gxl_aobus_groups[] = {
428 GROUP(uart_cts_ao_b, 0, 8), 450 GROUP(uart_cts_ao_b, 0, 8),
429 GROUP(uart_rts_ao_b, 0, 7), 451 GROUP(uart_rts_ao_b, 0, 7),
430 GROUP(remote_input_ao, 0, 0), 452 GROUP(remote_input_ao, 0, 0),
453 GROUP(pwm_ao_a_3, 0, 22),
454 GROUP(pwm_ao_a_8, 0, 17),
431 GROUP(pwm_ao_b, 0, 3), 455 GROUP(pwm_ao_b, 0, 3),
432}; 456};
433 457
@@ -513,10 +537,30 @@ static const char * const eth_groups[] = {
513 "eth_txd0", "eth_txd1", "eth_txd2", "eth_txd3", 537 "eth_txd0", "eth_txd1", "eth_txd2", "eth_txd3",
514}; 538};
515 539
540static const char * const pwm_a_groups[] = {
541 "pwm_a",
542};
543
544static const char * const pwm_b_groups[] = {
545 "pwm_b",
546};
547
548static const char * const pwm_c_groups[] = {
549 "pwm_c",
550};
551
552static const char * const pwm_d_groups[] = {
553 "pwm_d",
554};
555
516static const char * const pwm_e_groups[] = { 556static const char * const pwm_e_groups[] = {
517 "pwm_e", 557 "pwm_e",
518}; 558};
519 559
560static const char * const pwm_f_groups[] = {
561 "pwm_f_clk", "pwm_f_x",
562};
563
520static const char * const hdmi_hpd_groups[] = { 564static const char * const hdmi_hpd_groups[] = {
521 "hdmi_hpd", 565 "hdmi_hpd",
522}; 566};
@@ -542,6 +586,10 @@ static const char * const remote_input_ao_groups[] = {
542 "remote_input_ao", 586 "remote_input_ao",
543}; 587};
544 588
589static const char * const pwm_ao_a_groups[] = {
590 "pwm_ao_a_3", "pwm_ao_a_8",
591};
592
545static const char * const pwm_ao_b_groups[] = { 593static const char * const pwm_ao_b_groups[] = {
546 "pwm_ao_b", 594 "pwm_ao_b",
547}; 595};
@@ -559,7 +607,12 @@ static struct meson_pmx_func meson_gxl_periphs_functions[] = {
559 FUNCTION(i2c_b), 607 FUNCTION(i2c_b),
560 FUNCTION(i2c_c), 608 FUNCTION(i2c_c),
561 FUNCTION(eth), 609 FUNCTION(eth),
610 FUNCTION(pwm_a),
611 FUNCTION(pwm_b),
612 FUNCTION(pwm_c),
613 FUNCTION(pwm_d),
562 FUNCTION(pwm_e), 614 FUNCTION(pwm_e),
615 FUNCTION(pwm_f),
563 FUNCTION(hdmi_hpd), 616 FUNCTION(hdmi_hpd),
564 FUNCTION(hdmi_i2c), 617 FUNCTION(hdmi_i2c),
565}; 618};
@@ -569,6 +622,7 @@ static struct meson_pmx_func meson_gxl_aobus_functions[] = {
569 FUNCTION(uart_ao), 622 FUNCTION(uart_ao),
570 FUNCTION(uart_ao_b), 623 FUNCTION(uart_ao_b),
571 FUNCTION(remote_input_ao), 624 FUNCTION(remote_input_ao),
625 FUNCTION(pwm_ao_a),
572 FUNCTION(pwm_ao_b), 626 FUNCTION(pwm_ao_b),
573}; 627};
574 628