forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
....@@ -1,17 +1,7 @@
1
-/*
2
- * Copyright (C) 2015-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 program5 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) 2015-2017 Socionext Inc.
4
+// Author: Masahiro Yamada <yamada.masahiro@socionext.com>
155
166 #include <linux/kernel.h>
177 #include <linux/init.h>
....@@ -817,7 +807,9 @@
817807 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
818808 static const unsigned nand_cs1_pins[] = {26, 27};
819809 static const int nand_cs1_muxvals[] = {0, 0};
820
-static const unsigned sd_pins[] = {250, 251, 252, 253, 254, 255, 256, 257, 258};
810
+static const unsigned pcie_pins[] = {109, 110, 111};
811
+static const int pcie_muxvals[] = {0, 0, 0};
812
+static const unsigned sd_pins[] = {247, 248, 249, 250, 251, 252, 253, 254, 255};
821813 static const int sd_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
822814 static const unsigned spi0_pins[] = {120, 121, 122, 123};
823815 static const int spi0_muxvals[] = {0, 0, 0, 0};
....@@ -849,8 +841,10 @@
849841 static const int uart0_muxvals[] = {0, 0};
850842 static const unsigned uart0b_pins[] = {227, 228};
851843 static const int uart0b_muxvals[] = {3, 3};
852
-static const unsigned uart0b_ctsrts_pins[] = {229, 230, 231, 232, 233, 234};
853
-static const int uart0b_ctsrts_muxvals[] = {3, 3, 3, 3, 3, 3};
844
+static const unsigned uart0b_ctsrts_pins[] = {232, 233};
845
+static const int uart0b_ctsrts_muxvals[] = {3, 3};
846
+static const unsigned uart0b_modem_pins[] = {229, 230, 231, 234};
847
+static const int uart0b_modem_muxvals[] = {3, 3, 3, 3};
854848 static const unsigned uart1_pins[] = {49, 50};
855849 static const int uart1_muxvals[] = {0, 0};
856850 static const unsigned uart2_pins[] = {51, 52};
....@@ -910,6 +904,7 @@
910904 UNIPHIER_PINCTRL_GROUP(i2c5b),
911905 UNIPHIER_PINCTRL_GROUP(i2c5c),
912906 UNIPHIER_PINCTRL_GROUP(i2c6),
907
+ UNIPHIER_PINCTRL_GROUP(pcie),
913908 UNIPHIER_PINCTRL_GROUP(sd),
914909 UNIPHIER_PINCTRL_GROUP(spi0),
915910 UNIPHIER_PINCTRL_GROUP(spi1),
....@@ -926,6 +921,7 @@
926921 UNIPHIER_PINCTRL_GROUP(uart0),
927922 UNIPHIER_PINCTRL_GROUP(uart0b),
928923 UNIPHIER_PINCTRL_GROUP(uart0b_ctsrts),
924
+ UNIPHIER_PINCTRL_GROUP(uart0b_modem),
929925 UNIPHIER_PINCTRL_GROUP(uart1),
930926 UNIPHIER_PINCTRL_GROUP(uart2),
931927 UNIPHIER_PINCTRL_GROUP(uart3),
....@@ -943,6 +939,7 @@
943939 static const char * const i2c5_groups[] = {"i2c5", "i2c5b", "i2c5c"};
944940 static const char * const i2c6_groups[] = {"i2c6"};
945941 static const char * const nand_groups[] = {"nand", "nand_cs1"};
942
+static const char * const pcie_groups[] = {"pcie"};
946943 static const char * const sd_groups[] = {"sd"};
947944 static const char * const spi0_groups[] = {"spi0"};
948945 static const char * const spi1_groups[] = {"spi1"};
....@@ -956,7 +953,8 @@
956953 "system_bus_cs5",
957954 "system_bus_cs6",
958955 "system_bus_cs7"};
959
-static const char * const uart0_groups[] = {"uart0", "uart0b", "uart0b_ctsrts"};
956
+static const char * const uart0_groups[] = {"uart0", "uart0b",
957
+ "uart0b_ctsrts", "uart0b_modem"};
960958 static const char * const uart1_groups[] = {"uart1"};
961959 static const char * const uart2_groups[] = {"uart2"};
962960 static const char * const uart3_groups[] = {"uart3"};
....@@ -973,6 +971,7 @@
973971 UNIPHIER_PINMUX_FUNCTION(i2c5),
974972 UNIPHIER_PINMUX_FUNCTION(i2c6),
975973 UNIPHIER_PINMUX_FUNCTION(nand),
974
+ UNIPHIER_PINMUX_FUNCTION(pcie),
976975 UNIPHIER_PINMUX_FUNCTION(sd),
977976 UNIPHIER_PINMUX_FUNCTION(spi0),
978977 UNIPHIER_PINMUX_FUNCTION(spi1),
....@@ -996,7 +995,7 @@
996995 return 15;
997996 }
998997
999
-static struct uniphier_pinctrl_socdata uniphier_pro5_pindata = {
998
+static const struct uniphier_pinctrl_socdata uniphier_pro5_pindata = {
1000999 .pins = uniphier_pro5_pins,
10011000 .npins = ARRAY_SIZE(uniphier_pro5_pins),
10021001 .groups = uniphier_pro5_groups,