hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/pinctrl/meson/pinctrl-meson8b.c
....@@ -1,15 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Pin controller and GPIO driver for Amlogic Meson8b.
34 *
45 * Copyright (C) 2015 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/meson8b-gpio.h>
....@@ -239,6 +233,8 @@
239233 static const unsigned int hdmi_cec_0_pins[] = { GPIOH_3 };
240234 static const unsigned int eth_txd1_0_pins[] = { GPIOH_5 };
241235 static const unsigned int eth_txd0_0_pins[] = { GPIOH_6 };
236
+static const unsigned int eth_rxd3_h_pins[] = { GPIOH_5 };
237
+static const unsigned int eth_rxd2_h_pins[] = { GPIOH_6 };
242238 static const unsigned int clk_24m_out_pins[] = { GPIOH_9 };
243239
244240 static const unsigned int spi_ss1_pins[] = { GPIOH_0 };
....@@ -405,6 +401,34 @@
405401 GPIO_GROUP(GPIOH_8),
406402 GPIO_GROUP(GPIOH_9),
407403
404
+ GPIO_GROUP(CARD_0),
405
+ GPIO_GROUP(CARD_1),
406
+ GPIO_GROUP(CARD_2),
407
+ GPIO_GROUP(CARD_3),
408
+ GPIO_GROUP(CARD_4),
409
+ GPIO_GROUP(CARD_5),
410
+ GPIO_GROUP(CARD_6),
411
+
412
+ GPIO_GROUP(BOOT_0),
413
+ GPIO_GROUP(BOOT_1),
414
+ GPIO_GROUP(BOOT_2),
415
+ GPIO_GROUP(BOOT_3),
416
+ GPIO_GROUP(BOOT_4),
417
+ GPIO_GROUP(BOOT_5),
418
+ GPIO_GROUP(BOOT_6),
419
+ GPIO_GROUP(BOOT_7),
420
+ GPIO_GROUP(BOOT_8),
421
+ GPIO_GROUP(BOOT_9),
422
+ GPIO_GROUP(BOOT_10),
423
+ GPIO_GROUP(BOOT_11),
424
+ GPIO_GROUP(BOOT_12),
425
+ GPIO_GROUP(BOOT_13),
426
+ GPIO_GROUP(BOOT_14),
427
+ GPIO_GROUP(BOOT_15),
428
+ GPIO_GROUP(BOOT_16),
429
+ GPIO_GROUP(BOOT_17),
430
+ GPIO_GROUP(BOOT_18),
431
+
408432 GPIO_GROUP(DIF_0_P),
409433 GPIO_GROUP(DIF_0_N),
410434 GPIO_GROUP(DIF_1_P),
....@@ -513,6 +537,8 @@
513537 GROUP(spi_miso_1, 9, 12),
514538 GROUP(spi_mosi_1, 9, 11),
515539 GROUP(spi_sclk_1, 9, 10),
540
+ GROUP(eth_rxd3_h, 6, 15),
541
+ GROUP(eth_rxd2_h, 6, 14),
516542 GROUP(eth_txd3, 6, 13),
517543 GROUP(eth_txd2, 6, 12),
518544 GROUP(eth_tx_clk, 6, 11),
....@@ -626,7 +652,7 @@
626652 GROUP(i2s_lr_clk_in, 0, 14),
627653 };
628654
629
-static const char * const gpio_groups[] = {
655
+static const char * const gpio_periphs_groups[] = {
630656 "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4",
631657 "GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9",
632658 "GPIOX_10", "GPIOX_11", "GPIOX_16", "GPIOX_17", "GPIOX_18",
....@@ -724,7 +750,8 @@
724750 "eth_tx_clk", "eth_tx_en", "eth_txd1_0", "eth_txd1_1",
725751 "eth_txd0_0", "eth_txd0_1", "eth_rx_clk", "eth_rx_dv",
726752 "eth_rxd1", "eth_rxd0", "eth_mdio_en", "eth_mdc", "eth_ref_clk",
727
- "eth_txd2", "eth_txd3", "eth_rxd3", "eth_rxd2"
753
+ "eth_txd2", "eth_txd3", "eth_rxd3", "eth_rxd2",
754
+ "eth_rxd3_h", "eth_rxd2_h"
728755 };
729756
730757 static const char * const i2c_a_groups[] = {
....@@ -843,7 +870,7 @@
843870 };
844871
845872 static struct meson_pmx_func meson8b_cbus_functions[] = {
846
- FUNCTION(gpio),
873
+ FUNCTION(gpio_periphs),
847874 FUNCTION(sd_a),
848875 FUNCTION(sdxc_a),
849876 FUNCTION(pcm_a),
....@@ -940,6 +967,7 @@
940967 .num_funcs = ARRAY_SIZE(meson8b_aobus_functions),
941968 .num_banks = ARRAY_SIZE(meson8b_aobus_banks),
942969 .pmx_ops = &meson8_pmx_ops,
970
+ .parse_dt = &meson8_aobus_parse_dt_extra,
943971 };
944972
945973 static const struct of_device_id meson8b_pinctrl_dt_match[] = {