.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Pin controller and GPIO driver for Amlogic Meson GXBB. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2016 Endless Mobile, Inc. |
---|
5 | 6 | * Author: Carlo Caione <carlo@endlessm.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or |
---|
8 | | - * modify it under the terms of the GNU General Public License |
---|
9 | | - * version 2 as published by the Free Software Foundation. |
---|
10 | | - * |
---|
11 | | - * You should have received a copy of the GNU General Public License |
---|
12 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
13 | 7 | */ |
---|
14 | 8 | |
---|
15 | 9 | #include <dt-bindings/gpio/meson-gxbb-gpio.h> |
---|
.. | .. |
---|
237 | 231 | static const unsigned int hdmi_sda_pins[] = { GPIOH_1 }; |
---|
238 | 232 | static const unsigned int hdmi_scl_pins[] = { GPIOH_2 }; |
---|
239 | 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 }; |
---|
240 | 243 | static const unsigned int i2s_out_ch23_y_pins[] = { GPIOY_8 }; |
---|
241 | 244 | static const unsigned int i2s_out_ch45_y_pins[] = { GPIOY_9 }; |
---|
242 | 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 }; |
---|
243 | 251 | |
---|
244 | 252 | static const unsigned int spdif_out_y_pins[] = { GPIOY_12 }; |
---|
245 | 253 | |
---|
.. | .. |
---|
443 | 451 | GROUP(pwm_a_x, 3, 17), |
---|
444 | 452 | GROUP(pwm_e, 2, 30), |
---|
445 | 453 | GROUP(pwm_f_x, 3, 18), |
---|
| 454 | + GROUP(tsin_b_d_valid, 3, 9), |
---|
| 455 | + GROUP(tsin_b_sop, 3, 8), |
---|
| 456 | + GROUP(tsin_b_clk, 3, 10), |
---|
| 457 | + GROUP(tsin_b_d0, 3, 7), |
---|
446 | 458 | |
---|
447 | 459 | /* Bank Y */ |
---|
448 | 460 | GROUP(uart_cts_c, 1, 17), |
---|
449 | 461 | GROUP(uart_rts_c, 1, 16), |
---|
450 | 462 | GROUP(uart_tx_c, 1, 19), |
---|
451 | 463 | GROUP(uart_rx_c, 1, 18), |
---|
| 464 | + GROUP(tsin_a_fail, 3, 3), |
---|
| 465 | + GROUP(tsin_a_d_valid, 3, 2), |
---|
| 466 | + GROUP(tsin_a_sop, 3, 1), |
---|
| 467 | + GROUP(tsin_a_clk, 3, 0), |
---|
| 468 | + GROUP(tsin_a_d0, 3, 4), |
---|
| 469 | + GROUP(tsin_a_dp, 3, 5), |
---|
452 | 470 | GROUP(pwm_a_y, 1, 21), |
---|
453 | 471 | GROUP(pwm_f_y, 1, 20), |
---|
454 | 472 | GROUP(i2s_out_ch23_y, 1, 5), |
---|
.. | .. |
---|
605 | 623 | "GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14", |
---|
606 | 624 | "GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19", |
---|
607 | 625 | "GPIOX_20", "GPIOX_21", "GPIOX_22", |
---|
| 626 | +}; |
---|
| 627 | + |
---|
| 628 | +static const char * const tsin_a_groups[] = { |
---|
| 629 | + "tsin_a_clk", "tsin_a_sop", "tsin_a_d_valid", "tsin_a_d0", |
---|
| 630 | + "tsin_a_dp", "tsin_a_fail", |
---|
| 631 | +}; |
---|
| 632 | + |
---|
| 633 | +static const char * const tsin_b_groups[] = { |
---|
| 634 | + "tsin_b_clk", "tsin_b_sop", "tsin_b_d_valid", "tsin_b_d0", |
---|
608 | 635 | }; |
---|
609 | 636 | |
---|
610 | 637 | static const char * const emmc_groups[] = { |
---|
.. | .. |
---|
798 | 825 | FUNCTION(i2s_out), |
---|
799 | 826 | FUNCTION(spdif_out), |
---|
800 | 827 | FUNCTION(gen_clk_out), |
---|
| 828 | + FUNCTION(tsin_a), |
---|
| 829 | + FUNCTION(tsin_b), |
---|
801 | 830 | }; |
---|
802 | 831 | |
---|
803 | 832 | static struct meson_pmx_func meson_gxbb_aobus_functions[] = { |
---|
.. | .. |
---|
857 | 886 | .num_funcs = ARRAY_SIZE(meson_gxbb_aobus_functions), |
---|
858 | 887 | .num_banks = ARRAY_SIZE(meson_gxbb_aobus_banks), |
---|
859 | 888 | .pmx_ops = &meson8_pmx_ops, |
---|
| 889 | + .parse_dt = meson8_aobus_parse_dt_extra, |
---|
860 | 890 | }; |
---|
861 | 891 | |
---|
862 | 892 | static const struct of_device_id meson_gxbb_pinctrl_dt_match[] = { |
---|
.. | .. |
---|
870 | 900 | }, |
---|
871 | 901 | { }, |
---|
872 | 902 | }; |
---|
| 903 | +MODULE_DEVICE_TABLE(of, meson_gxbb_pinctrl_dt_match); |
---|
873 | 904 | |
---|
874 | 905 | static struct platform_driver meson_gxbb_pinctrl_driver = { |
---|
875 | 906 | .probe = meson_pinctrl_probe, |
---|
.. | .. |
---|
878 | 909 | .of_match_table = meson_gxbb_pinctrl_dt_match, |
---|
879 | 910 | }, |
---|
880 | 911 | }; |
---|
881 | | -builtin_platform_driver(meson_gxbb_pinctrl_driver); |
---|
| 912 | +module_platform_driver(meson_gxbb_pinctrl_driver); |
---|
| 913 | +MODULE_LICENSE("GPL v2"); |
---|