hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/pinctrl/meson/pinctrl-meson-gxl.c
....@@ -1,15 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Pin controller and GPIO driver for Amlogic Meson GXL.
34 *
45 * Copyright (C) 2016 Endless Mobile, Inc.
56 * 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/>.
137 */
148
159 #include <dt-bindings/gpio/meson-gxl-gpio.h>
....@@ -247,6 +241,17 @@
247241 GPIODV_1, GPIODV_2, GPIODV_3, GPIODV_4, GPIODV_5, GPIODV_6, GPIODV_7,
248242 };
249243
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
+
250255 static const struct pinctrl_pin_desc meson_gxl_aobus_pins[] = {
251256 MESON_PIN(GPIOAO_0),
252257 MESON_PIN(GPIOAO_1),
....@@ -444,6 +449,11 @@
444449 GROUP(eth_txd1, 4, 12),
445450 GROUP(eth_txd2, 4, 11),
446451 GROUP(eth_txd3, 4, 10),
452
+ GROUP(tsin_b_fail_z4, 3, 15),
453
+ GROUP(tsin_b_clk_z3, 3, 16),
454
+ GROUP(tsin_b_d0_z2, 3, 17),
455
+ GROUP(tsin_b_sop_z1, 3, 18),
456
+ GROUP(tsin_b_d_valid_z0, 3, 19),
447457 GROUP(pwm_c, 3, 20),
448458 GROUP(i2s_out_ch23_z, 3, 26),
449459 GROUP(i2s_out_ch45_z, 3, 25),
....@@ -460,6 +470,10 @@
460470 GROUP(i2s_out_lr_clk, 6, 24),
461471 GROUP(i2s_out_ch01, 6, 23),
462472 GROUP(spdif_out_h, 6, 28),
473
+ GROUP(tsin_b_d0, 6, 17),
474
+ GROUP(tsin_b_sop, 6, 18),
475
+ GROUP(tsin_b_d_valid, 6, 19),
476
+ GROUP(tsin_b_clk, 6, 20),
463477
464478 /* Bank DV */
465479 GROUP(uart_tx_b, 2, 16),
....@@ -695,6 +709,12 @@
695709 "tsin_a_dp", "tsin_a_fail",
696710 };
697711
712
+static const char * const tsin_b_groups[] = {
713
+ "tsin_b_clk", "tsin_b_sop", "tsin_b_d_valid", "tsin_b_d0",
714
+ "tsin_b_clk_z3", "tsin_b_sop_z1", "tsin_b_d_valid_z0", "tsin_b_d0_z2",
715
+ "tsin_b_fail_z4",
716
+};
717
+
698718 static const char * const gpio_aobus_groups[] = {
699719 "GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4",
700720 "GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9",
....@@ -770,6 +790,7 @@
770790 FUNCTION(spdif_out),
771791 FUNCTION(eth_led),
772792 FUNCTION(tsin_a),
793
+ FUNCTION(tsin_b),
773794 };
774795
775796 static struct meson_pmx_func meson_gxl_aobus_functions[] = {
....@@ -826,6 +847,7 @@
826847 .num_funcs = ARRAY_SIZE(meson_gxl_aobus_functions),
827848 .num_banks = ARRAY_SIZE(meson_gxl_aobus_banks),
828849 .pmx_ops = &meson8_pmx_ops,
850
+ .parse_dt = meson8_aobus_parse_dt_extra,
829851 };
830852
831853 static const struct of_device_id meson_gxl_pinctrl_dt_match[] = {
....@@ -839,6 +861,7 @@
839861 },
840862 { },
841863 };
864
+MODULE_DEVICE_TABLE(of, meson_gxl_pinctrl_dt_match);
842865
843866 static struct platform_driver meson_gxl_pinctrl_driver = {
844867 .probe = meson_pinctrl_probe,
....@@ -847,4 +870,5 @@
847870 .of_match_table = meson_gxl_pinctrl_dt_match,
848871 },
849872 };
850
-builtin_platform_driver(meson_gxl_pinctrl_driver);
873
+module_platform_driver(meson_gxl_pinctrl_driver);
874
+MODULE_LICENSE("GPL v2");