| .. | .. |
|---|
| 1 | | -/* |
|---|
| 2 | | - * Copyright (C) 2016-2017 Socionext Inc. |
|---|
| 3 | | - * Author: Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 7 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | | - * (at your option) any later version. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - */ |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 2 | +// |
|---|
| 3 | +// Copyright (C) 2016-2017 Socionext Inc. |
|---|
| 4 | +// Author: Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|
| 15 | 5 | |
|---|
| 16 | 6 | #include <linux/kernel.h> |
|---|
| 17 | 7 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 554 | 544 | |
|---|
| 555 | 545 | static const unsigned aout1_pins[] = {137, 138, 139, 140, 141, 142}; |
|---|
| 556 | 546 | static const int aout1_muxvals[] = {0, 0, 0, 0, 0, 0}; |
|---|
| 547 | +static const unsigned aout1b_pins[] = {150, 151, 152, 153, 154, 155, 156}; |
|---|
| 548 | +static const int aout1b_muxvals[] = {1, 1, 1, 1, 1, 1, 1}; |
|---|
| 557 | 549 | static const unsigned aoutiec1_pins[] = {135, 136}; |
|---|
| 558 | 550 | static const int aoutiec1_muxvals[] = {0, 0}; |
|---|
| 559 | 551 | static const unsigned int emmc_pins[] = {19, 20, 21, 22, 23, 24, 25}; |
|---|
| .. | .. |
|---|
| 584 | 576 | static const int hscin2_s_muxvals[] = {3, 3, 3, 3}; |
|---|
| 585 | 577 | static const unsigned hscin3_s_pins[] = {129, 130, 131, 132}; |
|---|
| 586 | 578 | static const int hscin3_s_muxvals[] = {3, 3, 3, 3}; |
|---|
| 579 | +static const unsigned hscin4_s_pins[] = {80, 81, 82, 83}; |
|---|
| 580 | +static const int hscin4_s_muxvals[] = {3, 3, 3, 3}; |
|---|
| 587 | 581 | static const unsigned hscout0_ci_pins[] = {113, 114, 115, 116, 117, 118, 119, |
|---|
| 588 | 582 | 120, 121, 122, 123}; |
|---|
| 589 | 583 | static const int hscout0_ci_muxvals[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; |
|---|
| .. | .. |
|---|
| 629 | 623 | static const int uart2_muxvals[] = {1, 1}; |
|---|
| 630 | 624 | static const unsigned uart3_pins[] = {94, 95}; |
|---|
| 631 | 625 | static const int uart3_muxvals[] = {1, 1}; |
|---|
| 632 | | -static const unsigned uart3_ctsrts_pins[] = {96, 97, 98, 99, 100, 101}; |
|---|
| 633 | | -static const int uart3_ctsrts_muxvals[] = {1, 1, 1, 1, 1, 1}; |
|---|
| 626 | +static const unsigned uart3_ctsrts_pins[] = {96, 98}; |
|---|
| 627 | +static const int uart3_ctsrts_muxvals[] = {1, 1}; |
|---|
| 628 | +static const unsigned uart3_modem_pins[] = {97, 99, 100, 101}; |
|---|
| 629 | +static const int uart3_modem_muxvals[] = {1, 1, 1, 1}; |
|---|
| 634 | 630 | static const unsigned usb0_pins[] = {46, 47}; |
|---|
| 635 | 631 | static const int usb0_muxvals[] = {0, 0}; |
|---|
| 636 | 632 | static const unsigned usb1_pins[] = {48, 49}; |
|---|
| .. | .. |
|---|
| 672 | 668 | |
|---|
| 673 | 669 | static const struct uniphier_pinctrl_group uniphier_ld20_groups[] = { |
|---|
| 674 | 670 | UNIPHIER_PINCTRL_GROUP(aout1), |
|---|
| 671 | + UNIPHIER_PINCTRL_GROUP(aout1b), |
|---|
| 675 | 672 | UNIPHIER_PINCTRL_GROUP(aoutiec1), |
|---|
| 676 | 673 | UNIPHIER_PINCTRL_GROUP(emmc), |
|---|
| 677 | 674 | UNIPHIER_PINCTRL_GROUP(emmc_dat8), |
|---|
| .. | .. |
|---|
| 684 | 681 | UNIPHIER_PINCTRL_GROUP(hscin1_s), |
|---|
| 685 | 682 | UNIPHIER_PINCTRL_GROUP(hscin2_s), |
|---|
| 686 | 683 | UNIPHIER_PINCTRL_GROUP(hscin3_s), |
|---|
| 684 | + UNIPHIER_PINCTRL_GROUP(hscin4_s), |
|---|
| 687 | 685 | UNIPHIER_PINCTRL_GROUP(hscout0_ci), |
|---|
| 688 | 686 | UNIPHIER_PINCTRL_GROUP(hscout0_p), |
|---|
| 689 | 687 | UNIPHIER_PINCTRL_GROUP(hscout0_s), |
|---|
| .. | .. |
|---|
| 705 | 703 | UNIPHIER_PINCTRL_GROUP(uart2), |
|---|
| 706 | 704 | UNIPHIER_PINCTRL_GROUP(uart3), |
|---|
| 707 | 705 | UNIPHIER_PINCTRL_GROUP(uart3_ctsrts), |
|---|
| 706 | + UNIPHIER_PINCTRL_GROUP(uart3_modem), |
|---|
| 708 | 707 | UNIPHIER_PINCTRL_GROUP(usb0), |
|---|
| 709 | 708 | UNIPHIER_PINCTRL_GROUP(usb1), |
|---|
| 710 | 709 | UNIPHIER_PINCTRL_GROUP(usb2), |
|---|
| .. | .. |
|---|
| 714 | 713 | UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range2), |
|---|
| 715 | 714 | }; |
|---|
| 716 | 715 | |
|---|
| 717 | | -static const char * const aout1_groups[] = {"aout1"}; |
|---|
| 716 | +static const char * const aout1_groups[] = {"aout1", "aout1b"}; |
|---|
| 718 | 717 | static const char * const aoutiec1_groups[] = {"aoutiec1"}; |
|---|
| 719 | 718 | static const char * const emmc_groups[] = {"emmc", "emmc_dat8"}; |
|---|
| 720 | 719 | static const char * const ether_rgmii_groups[] = {"ether_rgmii"}; |
|---|
| .. | .. |
|---|
| 725 | 724 | static const char * const hscin1_groups[] = {"hscin1_p", "hscin1_s"}; |
|---|
| 726 | 725 | static const char * const hscin2_groups[] = {"hscin2_s"}; |
|---|
| 727 | 726 | static const char * const hscin3_groups[] = {"hscin3_s"}; |
|---|
| 727 | +static const char * const hscin4_groups[] = {"hscin4_s"}; |
|---|
| 728 | 728 | static const char * const hscout0_groups[] = {"hscout0_ci", |
|---|
| 729 | 729 | "hscout0_p", |
|---|
| 730 | 730 | "hscout0_s"}; |
|---|
| .. | .. |
|---|
| 744 | 744 | static const char * const uart0_groups[] = {"uart0"}; |
|---|
| 745 | 745 | static const char * const uart1_groups[] = {"uart1"}; |
|---|
| 746 | 746 | static const char * const uart2_groups[] = {"uart2"}; |
|---|
| 747 | | -static const char * const uart3_groups[] = {"uart3", "uart3_ctsrts"}; |
|---|
| 747 | +static const char * const uart3_groups[] = {"uart3", "uart3_ctsrts", |
|---|
| 748 | + "uart3_modem"}; |
|---|
| 748 | 749 | static const char * const usb0_groups[] = {"usb0"}; |
|---|
| 749 | 750 | static const char * const usb1_groups[] = {"usb1"}; |
|---|
| 750 | 751 | static const char * const usb2_groups[] = {"usb2"}; |
|---|
| .. | .. |
|---|
| 760 | 761 | UNIPHIER_PINMUX_FUNCTION(hscin1), |
|---|
| 761 | 762 | UNIPHIER_PINMUX_FUNCTION(hscin2), |
|---|
| 762 | 763 | UNIPHIER_PINMUX_FUNCTION(hscin3), |
|---|
| 764 | + UNIPHIER_PINMUX_FUNCTION(hscin4), |
|---|
| 763 | 765 | UNIPHIER_PINMUX_FUNCTION(hscout0), |
|---|
| 764 | 766 | UNIPHIER_PINMUX_FUNCTION(hscout1), |
|---|
| 765 | 767 | UNIPHIER_PINMUX_FUNCTION(i2c0), |
|---|
| .. | .. |
|---|
| 795 | 797 | return 15; |
|---|
| 796 | 798 | } |
|---|
| 797 | 799 | |
|---|
| 798 | | -static struct uniphier_pinctrl_socdata uniphier_ld20_pindata = { |
|---|
| 800 | +static const struct uniphier_pinctrl_socdata uniphier_ld20_pindata = { |
|---|
| 799 | 801 | .pins = uniphier_ld20_pins, |
|---|
| 800 | 802 | .npins = ARRAY_SIZE(uniphier_ld20_pins), |
|---|
| 801 | 803 | .groups = uniphier_ld20_groups, |
|---|