forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
....@@ -1,17 +1,7 @@
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>
155
166 #include <linux/kernel.h>
177 #include <linux/init.h>
....@@ -554,6 +544,8 @@
554544
555545 static const unsigned aout1_pins[] = {137, 138, 139, 140, 141, 142};
556546 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};
557549 static const unsigned aoutiec1_pins[] = {135, 136};
558550 static const int aoutiec1_muxvals[] = {0, 0};
559551 static const unsigned int emmc_pins[] = {19, 20, 21, 22, 23, 24, 25};
....@@ -584,6 +576,8 @@
584576 static const int hscin2_s_muxvals[] = {3, 3, 3, 3};
585577 static const unsigned hscin3_s_pins[] = {129, 130, 131, 132};
586578 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};
587581 static const unsigned hscout0_ci_pins[] = {113, 114, 115, 116, 117, 118, 119,
588582 120, 121, 122, 123};
589583 static const int hscout0_ci_muxvals[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
....@@ -629,8 +623,10 @@
629623 static const int uart2_muxvals[] = {1, 1};
630624 static const unsigned uart3_pins[] = {94, 95};
631625 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};
634630 static const unsigned usb0_pins[] = {46, 47};
635631 static const int usb0_muxvals[] = {0, 0};
636632 static const unsigned usb1_pins[] = {48, 49};
....@@ -672,6 +668,7 @@
672668
673669 static const struct uniphier_pinctrl_group uniphier_ld20_groups[] = {
674670 UNIPHIER_PINCTRL_GROUP(aout1),
671
+ UNIPHIER_PINCTRL_GROUP(aout1b),
675672 UNIPHIER_PINCTRL_GROUP(aoutiec1),
676673 UNIPHIER_PINCTRL_GROUP(emmc),
677674 UNIPHIER_PINCTRL_GROUP(emmc_dat8),
....@@ -684,6 +681,7 @@
684681 UNIPHIER_PINCTRL_GROUP(hscin1_s),
685682 UNIPHIER_PINCTRL_GROUP(hscin2_s),
686683 UNIPHIER_PINCTRL_GROUP(hscin3_s),
684
+ UNIPHIER_PINCTRL_GROUP(hscin4_s),
687685 UNIPHIER_PINCTRL_GROUP(hscout0_ci),
688686 UNIPHIER_PINCTRL_GROUP(hscout0_p),
689687 UNIPHIER_PINCTRL_GROUP(hscout0_s),
....@@ -705,6 +703,7 @@
705703 UNIPHIER_PINCTRL_GROUP(uart2),
706704 UNIPHIER_PINCTRL_GROUP(uart3),
707705 UNIPHIER_PINCTRL_GROUP(uart3_ctsrts),
706
+ UNIPHIER_PINCTRL_GROUP(uart3_modem),
708707 UNIPHIER_PINCTRL_GROUP(usb0),
709708 UNIPHIER_PINCTRL_GROUP(usb1),
710709 UNIPHIER_PINCTRL_GROUP(usb2),
....@@ -714,7 +713,7 @@
714713 UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range2),
715714 };
716715
717
-static const char * const aout1_groups[] = {"aout1"};
716
+static const char * const aout1_groups[] = {"aout1", "aout1b"};
718717 static const char * const aoutiec1_groups[] = {"aoutiec1"};
719718 static const char * const emmc_groups[] = {"emmc", "emmc_dat8"};
720719 static const char * const ether_rgmii_groups[] = {"ether_rgmii"};
....@@ -725,6 +724,7 @@
725724 static const char * const hscin1_groups[] = {"hscin1_p", "hscin1_s"};
726725 static const char * const hscin2_groups[] = {"hscin2_s"};
727726 static const char * const hscin3_groups[] = {"hscin3_s"};
727
+static const char * const hscin4_groups[] = {"hscin4_s"};
728728 static const char * const hscout0_groups[] = {"hscout0_ci",
729729 "hscout0_p",
730730 "hscout0_s"};
....@@ -744,7 +744,8 @@
744744 static const char * const uart0_groups[] = {"uart0"};
745745 static const char * const uart1_groups[] = {"uart1"};
746746 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"};
748749 static const char * const usb0_groups[] = {"usb0"};
749750 static const char * const usb1_groups[] = {"usb1"};
750751 static const char * const usb2_groups[] = {"usb2"};
....@@ -760,6 +761,7 @@
760761 UNIPHIER_PINMUX_FUNCTION(hscin1),
761762 UNIPHIER_PINMUX_FUNCTION(hscin2),
762763 UNIPHIER_PINMUX_FUNCTION(hscin3),
764
+ UNIPHIER_PINMUX_FUNCTION(hscin4),
763765 UNIPHIER_PINMUX_FUNCTION(hscout0),
764766 UNIPHIER_PINMUX_FUNCTION(hscout1),
765767 UNIPHIER_PINMUX_FUNCTION(i2c0),
....@@ -795,7 +797,7 @@
795797 return 15;
796798 }
797799
798
-static struct uniphier_pinctrl_socdata uniphier_ld20_pindata = {
800
+static const struct uniphier_pinctrl_socdata uniphier_ld20_pindata = {
799801 .pins = uniphier_ld20_pins,
800802 .npins = ARRAY_SIZE(uniphier_ld20_pins),
801803 .groups = uniphier_ld20_groups,