Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: meson: add tsin pinctrl for meson gxbb/gxl/gxm

Add the tsin pinctrl definitions needed for integrated DVB hardware
support on Meson GXBB/GXL/GXM boards.

changes in v2
- fix ordering and numbering of uart_c ping flagged by Otto in [1]

[1] http://lists.infradead.org/pipermail/linux-amlogic/2020-March/015906.html

Signed-off-by: Igor Vavro <afl2001@gmail.com>
[updated commit message]
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/1583377666-13378-1-git-send-email-christianshewitt@gmail.com
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Igor Vavro and committed by
Linus Walleij
eaee5d9f 9eb81d69

+62
+35
drivers/pinctrl/meson/pinctrl-meson-gxbb.c
··· 231 231 static const unsigned int hdmi_sda_pins[] = { GPIOH_1 }; 232 232 static const unsigned int hdmi_scl_pins[] = { GPIOH_2 }; 233 233 234 + static const unsigned int tsin_a_d_valid_pins[] = { GPIOY_0 }; 235 + static const unsigned int tsin_a_sop_pins[] = { GPIOY_1 }; 236 + static const unsigned int tsin_a_clk_pins[] = { GPIOY_2 }; 237 + static const unsigned int tsin_a_d0_pins[] = { GPIOY_3 }; 238 + static const unsigned int tsin_a_dp_pins[] = { 239 + GPIOY_4, GPIOY_5, GPIOY_6, GPIOY_7, GPIOY_8, GPIOY_9, GPIOY_10 240 + }; 241 + 242 + static const unsigned int tsin_a_fail_pins[] = { GPIOY_11 }; 234 243 static const unsigned int i2s_out_ch23_y_pins[] = { GPIOY_8 }; 235 244 static const unsigned int i2s_out_ch45_y_pins[] = { GPIOY_9 }; 236 245 static const unsigned int i2s_out_ch67_y_pins[] = { GPIOY_10 }; 246 + 247 + static const unsigned int tsin_b_d_valid_pins[] = { GPIOX_6 }; 248 + static const unsigned int tsin_b_sop_pins[] = { GPIOX_7 }; 249 + static const unsigned int tsin_b_clk_pins[] = { GPIOX_8 }; 250 + static const unsigned int tsin_b_d0_pins[] = { GPIOX_9 }; 237 251 238 252 static const unsigned int spdif_out_y_pins[] = { GPIOY_12 }; 239 253 ··· 451 437 GROUP(pwm_a_x, 3, 17), 452 438 GROUP(pwm_e, 2, 30), 453 439 GROUP(pwm_f_x, 3, 18), 440 + GROUP(tsin_b_d_valid, 3, 9), 441 + GROUP(tsin_b_sop, 3, 8), 442 + GROUP(tsin_b_clk, 3, 10), 443 + GROUP(tsin_b_d0, 3, 7), 454 444 455 445 /* Bank Y */ 456 446 GROUP(uart_cts_c, 1, 17), 457 447 GROUP(uart_rts_c, 1, 16), 458 448 GROUP(uart_tx_c, 1, 19), 459 449 GROUP(uart_rx_c, 1, 18), 450 + GROUP(tsin_a_fail, 3, 3), 451 + GROUP(tsin_a_d_valid, 3, 2), 452 + GROUP(tsin_a_sop, 3, 1), 453 + GROUP(tsin_a_clk, 3, 0), 454 + GROUP(tsin_a_d0, 3, 4), 455 + GROUP(tsin_a_dp, 3, 5), 460 456 GROUP(pwm_a_y, 1, 21), 461 457 GROUP(pwm_f_y, 1, 20), 462 458 GROUP(i2s_out_ch23_y, 1, 5), ··· 623 599 "GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14", 624 600 "GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19", 625 601 "GPIOX_20", "GPIOX_21", "GPIOX_22", 602 + }; 603 + 604 + static const char * const tsin_a_groups[] = { 605 + "tsin_a_clk", "tsin_a_sop", "tsin_a_d_valid", "tsin_a_d0", 606 + "tsin_a_dp", "tsin_a_fail", 607 + }; 608 + 609 + static const char * const tsin_b_groups[] = { 610 + "tsin_b_clk", "tsin_b_sop", "tsin_b_d_valid", "tsin_b_d0", 626 611 }; 627 612 628 613 static const char * const emmc_groups[] = { ··· 825 792 FUNCTION(i2s_out), 826 793 FUNCTION(spdif_out), 827 794 FUNCTION(gen_clk_out), 795 + FUNCTION(tsin_a), 796 + FUNCTION(tsin_b), 828 797 }; 829 798 830 799 static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
+27
drivers/pinctrl/meson/pinctrl-meson-gxl.c
··· 241 241 GPIODV_1, GPIODV_2, GPIODV_3, GPIODV_4, GPIODV_5, GPIODV_6, GPIODV_7, 242 242 }; 243 243 244 + static const unsigned int tsin_b_clk_pins[] = { GPIOH_6 }; 245 + static const unsigned int tsin_b_d0_pins[] = { GPIOH_7 }; 246 + static const unsigned int tsin_b_sop_pins[] = { GPIOH_8 }; 247 + static const unsigned int tsin_b_d_valid_pins[] = { GPIOH_9 }; 248 + 249 + static const unsigned int tsin_b_fail_z4_pins[] = { GPIOZ_4 }; 250 + static const unsigned int tsin_b_clk_z3_pins[] = { GPIOZ_3 }; 251 + static const unsigned int tsin_b_d0_z2_pins[] = { GPIOZ_2 }; 252 + static const unsigned int tsin_b_sop_z1_pins[] = { GPIOZ_1 }; 253 + static const unsigned int tsin_b_d_valid_z0_pins[] = { GPIOZ_0 }; 254 + 244 255 static const struct pinctrl_pin_desc meson_gxl_aobus_pins[] = { 245 256 MESON_PIN(GPIOAO_0), 246 257 MESON_PIN(GPIOAO_1), ··· 449 438 GROUP(eth_txd1, 4, 12), 450 439 GROUP(eth_txd2, 4, 11), 451 440 GROUP(eth_txd3, 4, 10), 441 + GROUP(tsin_b_fail_z4, 3, 15), 442 + GROUP(tsin_b_clk_z3, 3, 16), 443 + GROUP(tsin_b_d0_z2, 3, 17), 444 + GROUP(tsin_b_sop_z1, 3, 18), 445 + GROUP(tsin_b_d_valid_z0, 3, 19), 452 446 GROUP(pwm_c, 3, 20), 453 447 GROUP(i2s_out_ch23_z, 3, 26), 454 448 GROUP(i2s_out_ch45_z, 3, 25), ··· 470 454 GROUP(i2s_out_lr_clk, 6, 24), 471 455 GROUP(i2s_out_ch01, 6, 23), 472 456 GROUP(spdif_out_h, 6, 28), 457 + GROUP(tsin_b_d0, 6, 17), 458 + GROUP(tsin_b_sop, 6, 18), 459 + GROUP(tsin_b_d_valid, 6, 19), 460 + GROUP(tsin_b_clk, 6, 20), 473 461 474 462 /* Bank DV */ 475 463 GROUP(uart_tx_b, 2, 16), ··· 709 689 "tsin_a_dp", "tsin_a_fail", 710 690 }; 711 691 692 + static const char * const tsin_b_groups[] = { 693 + "tsin_b_clk", "tsin_b_sop", "tsin_b_d_valid", "tsin_b_d0", 694 + "tsin_b_clk_z3", "tsin_b_sop_z1", "tsin_b_d_valid_z0", "tsin_b_d0_z2", 695 + "tsin_b_fail_z4", 696 + }; 697 + 712 698 static const char * const gpio_aobus_groups[] = { 713 699 "GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4", 714 700 "GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9", ··· 790 764 FUNCTION(spdif_out), 791 765 FUNCTION(eth_led), 792 766 FUNCTION(tsin_a), 767 + FUNCTION(tsin_b), 793 768 }; 794 769 795 770 static struct meson_pmx_func meson_gxl_aobus_functions[] = {