.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Pin controller and GPIO driver for Amlogic Meson8b. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 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/meson8b-gpio.h> |
---|
.. | .. |
---|
239 | 233 | static const unsigned int hdmi_cec_0_pins[] = { GPIOH_3 }; |
---|
240 | 234 | static const unsigned int eth_txd1_0_pins[] = { GPIOH_5 }; |
---|
241 | 235 | 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 }; |
---|
242 | 238 | static const unsigned int clk_24m_out_pins[] = { GPIOH_9 }; |
---|
243 | 239 | |
---|
244 | 240 | static const unsigned int spi_ss1_pins[] = { GPIOH_0 }; |
---|
.. | .. |
---|
405 | 401 | GPIO_GROUP(GPIOH_8), |
---|
406 | 402 | GPIO_GROUP(GPIOH_9), |
---|
407 | 403 | |
---|
| 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 | + |
---|
408 | 432 | GPIO_GROUP(DIF_0_P), |
---|
409 | 433 | GPIO_GROUP(DIF_0_N), |
---|
410 | 434 | GPIO_GROUP(DIF_1_P), |
---|
.. | .. |
---|
513 | 537 | GROUP(spi_miso_1, 9, 12), |
---|
514 | 538 | GROUP(spi_mosi_1, 9, 11), |
---|
515 | 539 | GROUP(spi_sclk_1, 9, 10), |
---|
| 540 | + GROUP(eth_rxd3_h, 6, 15), |
---|
| 541 | + GROUP(eth_rxd2_h, 6, 14), |
---|
516 | 542 | GROUP(eth_txd3, 6, 13), |
---|
517 | 543 | GROUP(eth_txd2, 6, 12), |
---|
518 | 544 | GROUP(eth_tx_clk, 6, 11), |
---|
.. | .. |
---|
626 | 652 | GROUP(i2s_lr_clk_in, 0, 14), |
---|
627 | 653 | }; |
---|
628 | 654 | |
---|
629 | | -static const char * const gpio_groups[] = { |
---|
| 655 | +static const char * const gpio_periphs_groups[] = { |
---|
630 | 656 | "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4", |
---|
631 | 657 | "GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9", |
---|
632 | 658 | "GPIOX_10", "GPIOX_11", "GPIOX_16", "GPIOX_17", "GPIOX_18", |
---|
.. | .. |
---|
724 | 750 | "eth_tx_clk", "eth_tx_en", "eth_txd1_0", "eth_txd1_1", |
---|
725 | 751 | "eth_txd0_0", "eth_txd0_1", "eth_rx_clk", "eth_rx_dv", |
---|
726 | 752 | "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" |
---|
728 | 755 | }; |
---|
729 | 756 | |
---|
730 | 757 | static const char * const i2c_a_groups[] = { |
---|
.. | .. |
---|
843 | 870 | }; |
---|
844 | 871 | |
---|
845 | 872 | static struct meson_pmx_func meson8b_cbus_functions[] = { |
---|
846 | | - FUNCTION(gpio), |
---|
| 873 | + FUNCTION(gpio_periphs), |
---|
847 | 874 | FUNCTION(sd_a), |
---|
848 | 875 | FUNCTION(sdxc_a), |
---|
849 | 876 | FUNCTION(pcm_a), |
---|
.. | .. |
---|
940 | 967 | .num_funcs = ARRAY_SIZE(meson8b_aobus_functions), |
---|
941 | 968 | .num_banks = ARRAY_SIZE(meson8b_aobus_banks), |
---|
942 | 969 | .pmx_ops = &meson8_pmx_ops, |
---|
| 970 | + .parse_dt = &meson8_aobus_parse_dt_extra, |
---|
943 | 971 | }; |
---|
944 | 972 | |
---|
945 | 973 | static const struct of_device_id meson8b_pinctrl_dt_match[] = { |
---|