root/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. uniphier_ld11_get_gpio_muxval
  2. uniphier_ld11_pinctrl_probe

   1 // SPDX-License-Identifier: GPL-2.0+
   2 //
   3 // Copyright (C) 2016-2017 Socionext Inc.
   4 //   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
   5 
   6 #include <linux/kernel.h>
   7 #include <linux/init.h>
   8 #include <linux/mod_devicetable.h>
   9 #include <linux/pinctrl/pinctrl.h>
  10 #include <linux/platform_device.h>
  11 
  12 #include "pinctrl-uniphier.h"
  13 
  14 static const struct pinctrl_pin_desc uniphier_ld11_pins[] = {
  15         UNIPHIER_PINCTRL_PIN(0, "XECS1", UNIPHIER_PIN_IECTRL_EXIST,
  16                              0, UNIPHIER_PIN_DRV_1BIT,
  17                              0, UNIPHIER_PIN_PULL_UP),
  18         UNIPHIER_PINCTRL_PIN(1, "ERXW", UNIPHIER_PIN_IECTRL_NONE,
  19                              1, UNIPHIER_PIN_DRV_1BIT,
  20                              1, UNIPHIER_PIN_PULL_UP),
  21         UNIPHIER_PINCTRL_PIN(2, "XERWE1", UNIPHIER_PIN_IECTRL_NONE,
  22                              2, UNIPHIER_PIN_DRV_1BIT,
  23                              2, UNIPHIER_PIN_PULL_UP),
  24         UNIPHIER_PINCTRL_PIN(3, "XNFWP", UNIPHIER_PIN_IECTRL_EXIST,
  25                              3, UNIPHIER_PIN_DRV_1BIT,
  26                              3, UNIPHIER_PIN_PULL_DOWN),
  27         UNIPHIER_PINCTRL_PIN(4, "XNFCE0", UNIPHIER_PIN_IECTRL_EXIST,
  28                              4, UNIPHIER_PIN_DRV_1BIT,
  29                              4, UNIPHIER_PIN_PULL_UP),
  30         UNIPHIER_PINCTRL_PIN(5, "NFRYBY0", UNIPHIER_PIN_IECTRL_EXIST,
  31                              5, UNIPHIER_PIN_DRV_1BIT,
  32                              5, UNIPHIER_PIN_PULL_UP),
  33         UNIPHIER_PINCTRL_PIN(6, "XNFRE", UNIPHIER_PIN_IECTRL_NONE,
  34                              6, UNIPHIER_PIN_DRV_1BIT,
  35                              6, UNIPHIER_PIN_PULL_UP),
  36         UNIPHIER_PINCTRL_PIN(7, "XNFWE", UNIPHIER_PIN_IECTRL_NONE,
  37                              7, UNIPHIER_PIN_DRV_1BIT,
  38                              7, UNIPHIER_PIN_PULL_UP),
  39         UNIPHIER_PINCTRL_PIN(8, "NFALE", UNIPHIER_PIN_IECTRL_NONE,
  40                              8, UNIPHIER_PIN_DRV_1BIT,
  41                              8, UNIPHIER_PIN_PULL_UP),
  42         UNIPHIER_PINCTRL_PIN(9, "NFCLE", UNIPHIER_PIN_IECTRL_NONE,
  43                              9, UNIPHIER_PIN_DRV_1BIT,
  44                              9, UNIPHIER_PIN_PULL_UP),
  45         UNIPHIER_PINCTRL_PIN(10, "NFD0", UNIPHIER_PIN_IECTRL_EXIST,
  46                              10, UNIPHIER_PIN_DRV_1BIT,
  47                              10, UNIPHIER_PIN_PULL_UP),
  48         UNIPHIER_PINCTRL_PIN(11, "NFD1", UNIPHIER_PIN_IECTRL_EXIST,
  49                              11, UNIPHIER_PIN_DRV_1BIT,
  50                              11, UNIPHIER_PIN_PULL_UP),
  51         UNIPHIER_PINCTRL_PIN(12, "NFD2", UNIPHIER_PIN_IECTRL_EXIST,
  52                              12, UNIPHIER_PIN_DRV_1BIT,
  53                              12, UNIPHIER_PIN_PULL_UP),
  54         UNIPHIER_PINCTRL_PIN(13, "NFD3", UNIPHIER_PIN_IECTRL_EXIST,
  55                              13, UNIPHIER_PIN_DRV_1BIT,
  56                              13, UNIPHIER_PIN_PULL_UP),
  57         UNIPHIER_PINCTRL_PIN(14, "NFD4", UNIPHIER_PIN_IECTRL_EXIST,
  58                              14, UNIPHIER_PIN_DRV_1BIT,
  59                              14, UNIPHIER_PIN_PULL_UP),
  60         UNIPHIER_PINCTRL_PIN(15, "NFD5", UNIPHIER_PIN_IECTRL_EXIST,
  61                              15, UNIPHIER_PIN_DRV_1BIT,
  62                              15, UNIPHIER_PIN_PULL_UP),
  63         UNIPHIER_PINCTRL_PIN(16, "NFD6", UNIPHIER_PIN_IECTRL_EXIST,
  64                              16, UNIPHIER_PIN_DRV_1BIT,
  65                              16, UNIPHIER_PIN_PULL_UP),
  66         UNIPHIER_PINCTRL_PIN(17, "NFD7", UNIPHIER_PIN_IECTRL_EXIST,
  67                              17, UNIPHIER_PIN_DRV_1BIT,
  68                              17, UNIPHIER_PIN_PULL_UP),
  69         UNIPHIER_PINCTRL_PIN(18, "XERST", UNIPHIER_PIN_IECTRL_EXIST,
  70                              0, UNIPHIER_PIN_DRV_2BIT,
  71                              18, UNIPHIER_PIN_PULL_UP),
  72         UNIPHIER_PINCTRL_PIN(19, "MMCCLK", UNIPHIER_PIN_IECTRL_EXIST,
  73                              1, UNIPHIER_PIN_DRV_2BIT,
  74                              19, UNIPHIER_PIN_PULL_UP),
  75         UNIPHIER_PINCTRL_PIN(20, "MMCCMD", UNIPHIER_PIN_IECTRL_EXIST,
  76                              2, UNIPHIER_PIN_DRV_2BIT,
  77                              20, UNIPHIER_PIN_PULL_UP),
  78         UNIPHIER_PINCTRL_PIN(21, "MMCDS", UNIPHIER_PIN_IECTRL_EXIST,
  79                              3, UNIPHIER_PIN_DRV_2BIT,
  80                              21, UNIPHIER_PIN_PULL_UP),
  81         UNIPHIER_PINCTRL_PIN(22, "MMCDAT0", UNIPHIER_PIN_IECTRL_EXIST,
  82                              4, UNIPHIER_PIN_DRV_2BIT,
  83                              22, UNIPHIER_PIN_PULL_UP),
  84         UNIPHIER_PINCTRL_PIN(23, "MMCDAT1", UNIPHIER_PIN_IECTRL_EXIST,
  85                              5, UNIPHIER_PIN_DRV_2BIT,
  86                              23, UNIPHIER_PIN_PULL_UP),
  87         UNIPHIER_PINCTRL_PIN(24, "MMCDAT2", UNIPHIER_PIN_IECTRL_EXIST,
  88                              6, UNIPHIER_PIN_DRV_2BIT,
  89                              24, UNIPHIER_PIN_PULL_UP),
  90         UNIPHIER_PINCTRL_PIN(25, "MMCDAT3", UNIPHIER_PIN_IECTRL_EXIST,
  91                              7, UNIPHIER_PIN_DRV_2BIT,
  92                              25, UNIPHIER_PIN_PULL_UP),
  93         UNIPHIER_PINCTRL_PIN(26, "MMCDAT4", UNIPHIER_PIN_IECTRL_EXIST,
  94                              8, UNIPHIER_PIN_DRV_2BIT,
  95                              26, UNIPHIER_PIN_PULL_UP),
  96         UNIPHIER_PINCTRL_PIN(27, "MMCDAT5", UNIPHIER_PIN_IECTRL_EXIST,
  97                              9, UNIPHIER_PIN_DRV_2BIT,
  98                              27, UNIPHIER_PIN_PULL_UP),
  99         UNIPHIER_PINCTRL_PIN(28, "MMCDAT6", UNIPHIER_PIN_IECTRL_EXIST,
 100                              10, UNIPHIER_PIN_DRV_2BIT,
 101                              28, UNIPHIER_PIN_PULL_UP),
 102         UNIPHIER_PINCTRL_PIN(29, "MMCDAT7", UNIPHIER_PIN_IECTRL_EXIST,
 103                              11, UNIPHIER_PIN_DRV_2BIT,
 104                              29, UNIPHIER_PIN_PULL_UP),
 105         UNIPHIER_PINCTRL_PIN(46, "USB0VBUS", UNIPHIER_PIN_IECTRL_EXIST,
 106                              46, UNIPHIER_PIN_DRV_1BIT,
 107                              46, UNIPHIER_PIN_PULL_DOWN),
 108         UNIPHIER_PINCTRL_PIN(47, "USB0OD", UNIPHIER_PIN_IECTRL_NONE,
 109                              47, UNIPHIER_PIN_DRV_1BIT,
 110                              47, UNIPHIER_PIN_PULL_UP),
 111         UNIPHIER_PINCTRL_PIN(48, "USB1VBUS", UNIPHIER_PIN_IECTRL_EXIST,
 112                              48, UNIPHIER_PIN_DRV_1BIT,
 113                              48, UNIPHIER_PIN_PULL_DOWN),
 114         UNIPHIER_PINCTRL_PIN(49, "USB1OD", UNIPHIER_PIN_IECTRL_EXIST,
 115                              49, UNIPHIER_PIN_DRV_1BIT,
 116                              49, UNIPHIER_PIN_PULL_UP),
 117         UNIPHIER_PINCTRL_PIN(50, "USB2VBUS", UNIPHIER_PIN_IECTRL_EXIST,
 118                              50, UNIPHIER_PIN_DRV_1BIT,
 119                              50, UNIPHIER_PIN_PULL_DOWN),
 120         UNIPHIER_PINCTRL_PIN(51, "USB2OD", UNIPHIER_PIN_IECTRL_EXIST,
 121                              51, UNIPHIER_PIN_DRV_1BIT,
 122                              51, UNIPHIER_PIN_PULL_UP),
 123         UNIPHIER_PINCTRL_PIN(54, "TXD0", UNIPHIER_PIN_IECTRL_EXIST,
 124                              54, UNIPHIER_PIN_DRV_1BIT,
 125                              54, UNIPHIER_PIN_PULL_UP),
 126         UNIPHIER_PINCTRL_PIN(55, "RXD0", UNIPHIER_PIN_IECTRL_EXIST,
 127                              55, UNIPHIER_PIN_DRV_1BIT,
 128                              55, UNIPHIER_PIN_PULL_UP),
 129         UNIPHIER_PINCTRL_PIN(56, "SPISYNC0", UNIPHIER_PIN_IECTRL_EXIST,
 130                              56, UNIPHIER_PIN_DRV_1BIT,
 131                              56, UNIPHIER_PIN_PULL_DOWN),
 132         UNIPHIER_PINCTRL_PIN(57, "SPISCLK0", UNIPHIER_PIN_IECTRL_EXIST,
 133                              57, UNIPHIER_PIN_DRV_1BIT,
 134                              57, UNIPHIER_PIN_PULL_DOWN),
 135         UNIPHIER_PINCTRL_PIN(58, "SPITXD0", UNIPHIER_PIN_IECTRL_EXIST,
 136                              58, UNIPHIER_PIN_DRV_1BIT,
 137                              58, UNIPHIER_PIN_PULL_DOWN),
 138         UNIPHIER_PINCTRL_PIN(59, "SPIRXD0", UNIPHIER_PIN_IECTRL_EXIST,
 139                              59, UNIPHIER_PIN_DRV_1BIT,
 140                              59, UNIPHIER_PIN_PULL_DOWN),
 141         UNIPHIER_PINCTRL_PIN(60, "AGCI", UNIPHIER_PIN_IECTRL_EXIST,
 142                              60, UNIPHIER_PIN_DRV_1BIT,
 143                              60, UNIPHIER_PIN_PULL_DOWN),
 144         UNIPHIER_PINCTRL_PIN(61, "DMDSDA0", UNIPHIER_PIN_IECTRL_EXIST,
 145                              -1, UNIPHIER_PIN_DRV_FIXED4,
 146                              -1, UNIPHIER_PIN_PULL_NONE),
 147         UNIPHIER_PINCTRL_PIN(62, "DMDSCL0", UNIPHIER_PIN_IECTRL_EXIST,
 148                              -1, UNIPHIER_PIN_DRV_FIXED4,
 149                              -1, UNIPHIER_PIN_PULL_NONE),
 150         UNIPHIER_PINCTRL_PIN(63, "SDA0", UNIPHIER_PIN_IECTRL_EXIST,
 151                              -1, UNIPHIER_PIN_DRV_FIXED4,
 152                              -1, UNIPHIER_PIN_PULL_NONE),
 153         UNIPHIER_PINCTRL_PIN(64, "SCL0", UNIPHIER_PIN_IECTRL_EXIST,
 154                              -1, UNIPHIER_PIN_DRV_FIXED4,
 155                              -1, UNIPHIER_PIN_PULL_NONE),
 156         UNIPHIER_PINCTRL_PIN(65, "SDA1", UNIPHIER_PIN_IECTRL_EXIST,
 157                              -1, UNIPHIER_PIN_DRV_FIXED4,
 158                              -1, UNIPHIER_PIN_PULL_NONE),
 159         UNIPHIER_PINCTRL_PIN(66, "SCL1", UNIPHIER_PIN_IECTRL_EXIST,
 160                              -1, UNIPHIER_PIN_DRV_FIXED4,
 161                              -1, UNIPHIER_PIN_PULL_NONE),
 162         UNIPHIER_PINCTRL_PIN(67, "HIN", UNIPHIER_PIN_IECTRL_EXIST,
 163                              -1, UNIPHIER_PIN_DRV_FIXED5,
 164                              -1, UNIPHIER_PIN_PULL_NONE),
 165         UNIPHIER_PINCTRL_PIN(68, "VIN", UNIPHIER_PIN_IECTRL_EXIST,
 166                              -1, UNIPHIER_PIN_DRV_FIXED5,
 167                              -1, UNIPHIER_PIN_PULL_NONE),
 168         UNIPHIER_PINCTRL_PIN(69, "PCA00", UNIPHIER_PIN_IECTRL_EXIST,
 169                              69, UNIPHIER_PIN_DRV_1BIT,
 170                              69, UNIPHIER_PIN_PULL_DOWN),
 171         UNIPHIER_PINCTRL_PIN(70, "PCA01", UNIPHIER_PIN_IECTRL_EXIST,
 172                              70, UNIPHIER_PIN_DRV_1BIT,
 173                              70, UNIPHIER_PIN_PULL_DOWN),
 174         UNIPHIER_PINCTRL_PIN(71, "PCA02", UNIPHIER_PIN_IECTRL_EXIST,
 175                              71, UNIPHIER_PIN_DRV_1BIT,
 176                              71, UNIPHIER_PIN_PULL_DOWN),
 177         UNIPHIER_PINCTRL_PIN(72, "PCA03", UNIPHIER_PIN_IECTRL_EXIST,
 178                              72, UNIPHIER_PIN_DRV_1BIT,
 179                              72, UNIPHIER_PIN_PULL_DOWN),
 180         UNIPHIER_PINCTRL_PIN(73, "PCA04", UNIPHIER_PIN_IECTRL_EXIST,
 181                              73, UNIPHIER_PIN_DRV_1BIT,
 182                              73, UNIPHIER_PIN_PULL_DOWN),
 183         UNIPHIER_PINCTRL_PIN(74, "PCA05", UNIPHIER_PIN_IECTRL_EXIST,
 184                              74, UNIPHIER_PIN_DRV_1BIT,
 185                              74, UNIPHIER_PIN_PULL_DOWN),
 186         UNIPHIER_PINCTRL_PIN(75, "PCA06", UNIPHIER_PIN_IECTRL_EXIST,
 187                              75, UNIPHIER_PIN_DRV_1BIT,
 188                              75, UNIPHIER_PIN_PULL_DOWN),
 189         UNIPHIER_PINCTRL_PIN(76, "PCA07", UNIPHIER_PIN_IECTRL_EXIST,
 190                              76, UNIPHIER_PIN_DRV_1BIT,
 191                              76, UNIPHIER_PIN_PULL_DOWN),
 192         UNIPHIER_PINCTRL_PIN(77, "PCA08", UNIPHIER_PIN_IECTRL_EXIST,
 193                              77, UNIPHIER_PIN_DRV_1BIT,
 194                              77, UNIPHIER_PIN_PULL_DOWN),
 195         UNIPHIER_PINCTRL_PIN(78, "PCA09", UNIPHIER_PIN_IECTRL_EXIST,
 196                              78, UNIPHIER_PIN_DRV_1BIT,
 197                              78, UNIPHIER_PIN_PULL_DOWN),
 198         UNIPHIER_PINCTRL_PIN(79, "PCA10", UNIPHIER_PIN_IECTRL_EXIST,
 199                              79, UNIPHIER_PIN_DRV_1BIT,
 200                              79, UNIPHIER_PIN_PULL_DOWN),
 201         UNIPHIER_PINCTRL_PIN(80, "PCA11", UNIPHIER_PIN_IECTRL_EXIST,
 202                              80, UNIPHIER_PIN_DRV_1BIT,
 203                              80, UNIPHIER_PIN_PULL_DOWN),
 204         UNIPHIER_PINCTRL_PIN(81, "PCA12", UNIPHIER_PIN_IECTRL_EXIST,
 205                              81, UNIPHIER_PIN_DRV_1BIT,
 206                              81, UNIPHIER_PIN_PULL_DOWN),
 207         UNIPHIER_PINCTRL_PIN(82, "PCA13", UNIPHIER_PIN_IECTRL_EXIST,
 208                              82, UNIPHIER_PIN_DRV_1BIT,
 209                              82, UNIPHIER_PIN_PULL_DOWN),
 210         UNIPHIER_PINCTRL_PIN(83, "PCA14", UNIPHIER_PIN_IECTRL_EXIST,
 211                              83, UNIPHIER_PIN_DRV_1BIT,
 212                              83, UNIPHIER_PIN_PULL_DOWN),
 213         UNIPHIER_PINCTRL_PIN(84, "PC0READY", UNIPHIER_PIN_IECTRL_EXIST,
 214                              84, UNIPHIER_PIN_DRV_1BIT,
 215                              84, UNIPHIER_PIN_PULL_DOWN),
 216         UNIPHIER_PINCTRL_PIN(85, "PC0CD1", UNIPHIER_PIN_IECTRL_EXIST,
 217                              85, UNIPHIER_PIN_DRV_1BIT,
 218                              85, UNIPHIER_PIN_PULL_DOWN),
 219         UNIPHIER_PINCTRL_PIN(86, "PC0CD2", UNIPHIER_PIN_IECTRL_EXIST,
 220                              86, UNIPHIER_PIN_DRV_1BIT,
 221                              86, UNIPHIER_PIN_PULL_DOWN),
 222         UNIPHIER_PINCTRL_PIN(87, "PC0WAIT", UNIPHIER_PIN_IECTRL_EXIST,
 223                              87, UNIPHIER_PIN_DRV_1BIT,
 224                              87, UNIPHIER_PIN_PULL_DOWN),
 225         UNIPHIER_PINCTRL_PIN(88, "PC0RESET", UNIPHIER_PIN_IECTRL_EXIST,
 226                              88, UNIPHIER_PIN_DRV_1BIT,
 227                              88, UNIPHIER_PIN_PULL_DOWN),
 228         UNIPHIER_PINCTRL_PIN(89, "PC0CE1", UNIPHIER_PIN_IECTRL_EXIST,
 229                              89, UNIPHIER_PIN_DRV_1BIT,
 230                              89, UNIPHIER_PIN_PULL_DOWN),
 231         UNIPHIER_PINCTRL_PIN(90, "PC0WE", UNIPHIER_PIN_IECTRL_EXIST,
 232                              90, UNIPHIER_PIN_DRV_1BIT,
 233                              90, UNIPHIER_PIN_PULL_DOWN),
 234         UNIPHIER_PINCTRL_PIN(91, "PC0OE", UNIPHIER_PIN_IECTRL_EXIST,
 235                              91, UNIPHIER_PIN_DRV_1BIT,
 236                              91, UNIPHIER_PIN_PULL_DOWN),
 237         UNIPHIER_PINCTRL_PIN(92, "PC0IOWR", UNIPHIER_PIN_IECTRL_EXIST,
 238                              92, UNIPHIER_PIN_DRV_1BIT,
 239                              92, UNIPHIER_PIN_PULL_DOWN),
 240         UNIPHIER_PINCTRL_PIN(93, "PC0IORD", UNIPHIER_PIN_IECTRL_EXIST,
 241                              93, UNIPHIER_PIN_DRV_1BIT,
 242                              93, UNIPHIER_PIN_PULL_DOWN),
 243         UNIPHIER_PINCTRL_PIN(94, "PCD00", UNIPHIER_PIN_IECTRL_EXIST,
 244                              94, UNIPHIER_PIN_DRV_1BIT,
 245                              94, UNIPHIER_PIN_PULL_DOWN),
 246         UNIPHIER_PINCTRL_PIN(95, "PCD01", UNIPHIER_PIN_IECTRL_EXIST,
 247                              95, UNIPHIER_PIN_DRV_1BIT,
 248                              95, UNIPHIER_PIN_PULL_DOWN),
 249         UNIPHIER_PINCTRL_PIN(96, "PCD02", UNIPHIER_PIN_IECTRL_EXIST,
 250                              96, UNIPHIER_PIN_DRV_1BIT,
 251                              96, UNIPHIER_PIN_PULL_DOWN),
 252         UNIPHIER_PINCTRL_PIN(97, "PCD03", UNIPHIER_PIN_IECTRL_EXIST,
 253                              97, UNIPHIER_PIN_DRV_1BIT,
 254                              97, UNIPHIER_PIN_PULL_DOWN),
 255         UNIPHIER_PINCTRL_PIN(98, "PCD04", UNIPHIER_PIN_IECTRL_EXIST,
 256                              98, UNIPHIER_PIN_DRV_1BIT,
 257                              98, UNIPHIER_PIN_PULL_DOWN),
 258         UNIPHIER_PINCTRL_PIN(99, "PCD05", UNIPHIER_PIN_IECTRL_EXIST,
 259                              99, UNIPHIER_PIN_DRV_1BIT,
 260                              99, UNIPHIER_PIN_PULL_DOWN),
 261         UNIPHIER_PINCTRL_PIN(100, "PCD06", UNIPHIER_PIN_IECTRL_EXIST,
 262                              100, UNIPHIER_PIN_DRV_1BIT,
 263                              100, UNIPHIER_PIN_PULL_DOWN),
 264         UNIPHIER_PINCTRL_PIN(101, "PCD07", UNIPHIER_PIN_IECTRL_EXIST,
 265                              101, UNIPHIER_PIN_DRV_1BIT,
 266                              101, UNIPHIER_PIN_PULL_DOWN),
 267         UNIPHIER_PINCTRL_PIN(102, "HS0BCLKIN", UNIPHIER_PIN_IECTRL_EXIST,
 268                              102, UNIPHIER_PIN_DRV_1BIT,
 269                              102, UNIPHIER_PIN_PULL_DOWN),
 270         UNIPHIER_PINCTRL_PIN(103, "HS0SYNCIN", UNIPHIER_PIN_IECTRL_EXIST,
 271                              103, UNIPHIER_PIN_DRV_1BIT,
 272                              103, UNIPHIER_PIN_PULL_DOWN),
 273         UNIPHIER_PINCTRL_PIN(104, "HS0VALIN", UNIPHIER_PIN_IECTRL_EXIST,
 274                              104, UNIPHIER_PIN_DRV_1BIT,
 275                              104, UNIPHIER_PIN_PULL_DOWN),
 276         UNIPHIER_PINCTRL_PIN(105, "HS0DIN0", UNIPHIER_PIN_IECTRL_EXIST,
 277                              105, UNIPHIER_PIN_DRV_1BIT,
 278                              105, UNIPHIER_PIN_PULL_DOWN),
 279         UNIPHIER_PINCTRL_PIN(106, "HS0DIN1", UNIPHIER_PIN_IECTRL_EXIST,
 280                              106, UNIPHIER_PIN_DRV_1BIT,
 281                              106, UNIPHIER_PIN_PULL_DOWN),
 282         UNIPHIER_PINCTRL_PIN(107, "HS0DIN2", UNIPHIER_PIN_IECTRL_EXIST,
 283                              107, UNIPHIER_PIN_DRV_1BIT,
 284                              107, UNIPHIER_PIN_PULL_DOWN),
 285         UNIPHIER_PINCTRL_PIN(108, "HS0DIN3", UNIPHIER_PIN_IECTRL_EXIST,
 286                              108, UNIPHIER_PIN_DRV_1BIT,
 287                              108, UNIPHIER_PIN_PULL_DOWN),
 288         UNIPHIER_PINCTRL_PIN(109, "HS0DIN4", UNIPHIER_PIN_IECTRL_EXIST,
 289                              109, UNIPHIER_PIN_DRV_1BIT,
 290                              109, UNIPHIER_PIN_PULL_DOWN),
 291         UNIPHIER_PINCTRL_PIN(110, "HS0DIN5", UNIPHIER_PIN_IECTRL_EXIST,
 292                              110, UNIPHIER_PIN_DRV_1BIT,
 293                              110, UNIPHIER_PIN_PULL_DOWN),
 294         UNIPHIER_PINCTRL_PIN(111, "HS0DIN6", UNIPHIER_PIN_IECTRL_EXIST,
 295                              111, UNIPHIER_PIN_DRV_1BIT,
 296                              111, UNIPHIER_PIN_PULL_DOWN),
 297         UNIPHIER_PINCTRL_PIN(112, "HS0DIN7", UNIPHIER_PIN_IECTRL_EXIST,
 298                              112, UNIPHIER_PIN_DRV_1BIT,
 299                              112, UNIPHIER_PIN_PULL_DOWN),
 300         UNIPHIER_PINCTRL_PIN(113, "HS0BCLKOUT", UNIPHIER_PIN_IECTRL_EXIST,
 301                              113, UNIPHIER_PIN_DRV_1BIT,
 302                              113, UNIPHIER_PIN_PULL_DOWN),
 303         UNIPHIER_PINCTRL_PIN(114, "HS0SYNCOUT", UNIPHIER_PIN_IECTRL_EXIST,
 304                              114, UNIPHIER_PIN_DRV_1BIT,
 305                              114, UNIPHIER_PIN_PULL_DOWN),
 306         UNIPHIER_PINCTRL_PIN(115, "HS0VALOUT", UNIPHIER_PIN_IECTRL_EXIST,
 307                              115, UNIPHIER_PIN_DRV_1BIT,
 308                              115, UNIPHIER_PIN_PULL_DOWN),
 309         UNIPHIER_PINCTRL_PIN(116, "HS0DOUT0", UNIPHIER_PIN_IECTRL_EXIST,
 310                              116, UNIPHIER_PIN_DRV_1BIT,
 311                              116, UNIPHIER_PIN_PULL_DOWN),
 312         UNIPHIER_PINCTRL_PIN(117, "HS0DOUT1", UNIPHIER_PIN_IECTRL_EXIST,
 313                              117, UNIPHIER_PIN_DRV_1BIT,
 314                              117, UNIPHIER_PIN_PULL_DOWN),
 315         UNIPHIER_PINCTRL_PIN(118, "HS0DOUT2", UNIPHIER_PIN_IECTRL_EXIST,
 316                              118, UNIPHIER_PIN_DRV_1BIT,
 317                              118, UNIPHIER_PIN_PULL_DOWN),
 318         UNIPHIER_PINCTRL_PIN(119, "HS0DOUT3", UNIPHIER_PIN_IECTRL_EXIST,
 319                              119, UNIPHIER_PIN_DRV_1BIT,
 320                              119, UNIPHIER_PIN_PULL_DOWN),
 321         UNIPHIER_PINCTRL_PIN(120, "HS0DOUT4", UNIPHIER_PIN_IECTRL_EXIST,
 322                              120, UNIPHIER_PIN_DRV_1BIT,
 323                              120, UNIPHIER_PIN_PULL_DOWN),
 324         UNIPHIER_PINCTRL_PIN(121, "HS0DOUT5", UNIPHIER_PIN_IECTRL_EXIST,
 325                              121, UNIPHIER_PIN_DRV_1BIT,
 326                              121, UNIPHIER_PIN_PULL_DOWN),
 327         UNIPHIER_PINCTRL_PIN(122, "HS0DOUT6", UNIPHIER_PIN_IECTRL_EXIST,
 328                              122, UNIPHIER_PIN_DRV_1BIT,
 329                              122, UNIPHIER_PIN_PULL_DOWN),
 330         UNIPHIER_PINCTRL_PIN(123, "HS0DOUT7", UNIPHIER_PIN_IECTRL_EXIST,
 331                              123, UNIPHIER_PIN_DRV_1BIT,
 332                              123, UNIPHIER_PIN_PULL_DOWN),
 333         UNIPHIER_PINCTRL_PIN(124, "HS1BCLKIN", UNIPHIER_PIN_IECTRL_EXIST,
 334                              124, UNIPHIER_PIN_DRV_1BIT,
 335                              124, UNIPHIER_PIN_PULL_DOWN),
 336         UNIPHIER_PINCTRL_PIN(125, "HS1SYNCIN", UNIPHIER_PIN_IECTRL_EXIST,
 337                              125, UNIPHIER_PIN_DRV_1BIT,
 338                              125, UNIPHIER_PIN_PULL_DOWN),
 339         UNIPHIER_PINCTRL_PIN(126, "HS1VALIN", UNIPHIER_PIN_IECTRL_EXIST,
 340                              126, UNIPHIER_PIN_DRV_1BIT,
 341                              126, UNIPHIER_PIN_PULL_DOWN),
 342         UNIPHIER_PINCTRL_PIN(127, "HS1DIN0", UNIPHIER_PIN_IECTRL_EXIST,
 343                              127, UNIPHIER_PIN_DRV_1BIT,
 344                              127, UNIPHIER_PIN_PULL_DOWN),
 345         UNIPHIER_PINCTRL_PIN(128, "HS1DIN1", UNIPHIER_PIN_IECTRL_EXIST,
 346                              128, UNIPHIER_PIN_DRV_1BIT,
 347                              128, UNIPHIER_PIN_PULL_DOWN),
 348         UNIPHIER_PINCTRL_PIN(129, "HS1DIN2", UNIPHIER_PIN_IECTRL_EXIST,
 349                              129, UNIPHIER_PIN_DRV_1BIT,
 350                              129, UNIPHIER_PIN_PULL_DOWN),
 351         UNIPHIER_PINCTRL_PIN(130, "HS1DIN3", UNIPHIER_PIN_IECTRL_EXIST,
 352                              130, UNIPHIER_PIN_DRV_1BIT,
 353                              130, UNIPHIER_PIN_PULL_DOWN),
 354         UNIPHIER_PINCTRL_PIN(131, "HS1DIN4", UNIPHIER_PIN_IECTRL_EXIST,
 355                              131, UNIPHIER_PIN_DRV_1BIT,
 356                              131, UNIPHIER_PIN_PULL_DOWN),
 357         UNIPHIER_PINCTRL_PIN(132, "HS1DIN5", UNIPHIER_PIN_IECTRL_EXIST,
 358                              132, UNIPHIER_PIN_DRV_1BIT,
 359                              132, UNIPHIER_PIN_PULL_DOWN),
 360         UNIPHIER_PINCTRL_PIN(133, "HS1DIN6", UNIPHIER_PIN_IECTRL_EXIST,
 361                              133, UNIPHIER_PIN_DRV_1BIT,
 362                              133, UNIPHIER_PIN_PULL_DOWN),
 363         UNIPHIER_PINCTRL_PIN(134, "HS1DIN7", UNIPHIER_PIN_IECTRL_EXIST,
 364                              134, UNIPHIER_PIN_DRV_1BIT,
 365                              134, UNIPHIER_PIN_PULL_DOWN),
 366         UNIPHIER_PINCTRL_PIN(135, "AO1IEC", UNIPHIER_PIN_IECTRL_EXIST,
 367                              135, UNIPHIER_PIN_DRV_1BIT,
 368                              135, UNIPHIER_PIN_PULL_DOWN),
 369         UNIPHIER_PINCTRL_PIN(136, "AO1ARC", UNIPHIER_PIN_IECTRL_EXIST,
 370                              136, UNIPHIER_PIN_DRV_1BIT,
 371                              136, UNIPHIER_PIN_PULL_DOWN),
 372         UNIPHIER_PINCTRL_PIN(137, "AO1DACCK", UNIPHIER_PIN_IECTRL_EXIST,
 373                              137, UNIPHIER_PIN_DRV_1BIT,
 374                              137, UNIPHIER_PIN_PULL_DOWN),
 375         UNIPHIER_PINCTRL_PIN(138, "AO1BCK", UNIPHIER_PIN_IECTRL_EXIST,
 376                              138, UNIPHIER_PIN_DRV_1BIT,
 377                              138, UNIPHIER_PIN_PULL_DOWN),
 378         UNIPHIER_PINCTRL_PIN(139, "AO1LRCK", UNIPHIER_PIN_IECTRL_EXIST,
 379                              139, UNIPHIER_PIN_DRV_1BIT,
 380                              139, UNIPHIER_PIN_PULL_DOWN),
 381         UNIPHIER_PINCTRL_PIN(140, "AO1D0", UNIPHIER_PIN_IECTRL_EXIST,
 382                              140, UNIPHIER_PIN_DRV_1BIT,
 383                              140, UNIPHIER_PIN_PULL_DOWN),
 384         UNIPHIER_PINCTRL_PIN(141, "AO1D1", UNIPHIER_PIN_IECTRL_EXIST,
 385                              141, UNIPHIER_PIN_DRV_1BIT,
 386                              141, UNIPHIER_PIN_PULL_DOWN),
 387         UNIPHIER_PINCTRL_PIN(142, "AO1D2", UNIPHIER_PIN_IECTRL_EXIST,
 388                              142, UNIPHIER_PIN_DRV_1BIT,
 389                              142, UNIPHIER_PIN_PULL_DOWN),
 390         UNIPHIER_PINCTRL_PIN(143, "XIRQ9", UNIPHIER_PIN_IECTRL_EXIST,
 391                              143, UNIPHIER_PIN_DRV_1BIT,
 392                              143, UNIPHIER_PIN_PULL_DOWN),
 393         UNIPHIER_PINCTRL_PIN(144, "XIRQ10", UNIPHIER_PIN_IECTRL_EXIST,
 394                              144, UNIPHIER_PIN_DRV_1BIT,
 395                              144, UNIPHIER_PIN_PULL_DOWN),
 396         UNIPHIER_PINCTRL_PIN(145, "XIRQ11", UNIPHIER_PIN_IECTRL_EXIST,
 397                              145, UNIPHIER_PIN_DRV_1BIT,
 398                              145, UNIPHIER_PIN_PULL_DOWN),
 399         UNIPHIER_PINCTRL_PIN(146, "XIRQ13", UNIPHIER_PIN_IECTRL_EXIST,
 400                              146, UNIPHIER_PIN_DRV_1BIT,
 401                              146, UNIPHIER_PIN_PULL_DOWN),
 402         UNIPHIER_PINCTRL_PIN(147, "PWMA", UNIPHIER_PIN_IECTRL_EXIST,
 403                              147, UNIPHIER_PIN_DRV_1BIT,
 404                              147, UNIPHIER_PIN_PULL_DOWN),
 405         UNIPHIER_PINCTRL_PIN(148, "LR_GOUT", UNIPHIER_PIN_IECTRL_EXIST,
 406                              148, UNIPHIER_PIN_DRV_1BIT,
 407                              148, UNIPHIER_PIN_PULL_DOWN),
 408         UNIPHIER_PINCTRL_PIN(149, "XIRQ0", UNIPHIER_PIN_IECTRL_EXIST,
 409                              149, UNIPHIER_PIN_DRV_1BIT,
 410                              149, UNIPHIER_PIN_PULL_DOWN),
 411         UNIPHIER_PINCTRL_PIN(150, "XIRQ1", UNIPHIER_PIN_IECTRL_EXIST,
 412                              150, UNIPHIER_PIN_DRV_1BIT,
 413                              150, UNIPHIER_PIN_PULL_DOWN),
 414         UNIPHIER_PINCTRL_PIN(151, "XIRQ2", UNIPHIER_PIN_IECTRL_EXIST,
 415                              151, UNIPHIER_PIN_DRV_1BIT,
 416                              151, UNIPHIER_PIN_PULL_DOWN),
 417         UNIPHIER_PINCTRL_PIN(152, "XIRQ3", UNIPHIER_PIN_IECTRL_EXIST,
 418                              152, UNIPHIER_PIN_DRV_1BIT,
 419                              152, UNIPHIER_PIN_PULL_DOWN),
 420         UNIPHIER_PINCTRL_PIN(153, "XIRQ4", UNIPHIER_PIN_IECTRL_EXIST,
 421                              153, UNIPHIER_PIN_DRV_1BIT,
 422                              153, UNIPHIER_PIN_PULL_DOWN),
 423         UNIPHIER_PINCTRL_PIN(154, "XIRQ5", UNIPHIER_PIN_IECTRL_EXIST,
 424                              154, UNIPHIER_PIN_DRV_1BIT,
 425                              154, UNIPHIER_PIN_PULL_DOWN),
 426         UNIPHIER_PINCTRL_PIN(155, "XIRQ6", UNIPHIER_PIN_IECTRL_EXIST,
 427                              155, UNIPHIER_PIN_DRV_1BIT,
 428                              155, UNIPHIER_PIN_PULL_DOWN),
 429         UNIPHIER_PINCTRL_PIN(156, "XIRQ7", UNIPHIER_PIN_IECTRL_EXIST,
 430                              156, UNIPHIER_PIN_DRV_1BIT,
 431                              156, UNIPHIER_PIN_PULL_DOWN),
 432         UNIPHIER_PINCTRL_PIN(157, "XIRQ8", UNIPHIER_PIN_IECTRL_EXIST,
 433                              157, UNIPHIER_PIN_DRV_1BIT,
 434                              157, UNIPHIER_PIN_PULL_DOWN),
 435         UNIPHIER_PINCTRL_PIN(158, "AGCBS", UNIPHIER_PIN_IECTRL_EXIST,
 436                              158, UNIPHIER_PIN_DRV_1BIT,
 437                              158, UNIPHIER_PIN_PULL_DOWN),
 438         UNIPHIER_PINCTRL_PIN(159, "XIRQ21", UNIPHIER_PIN_IECTRL_EXIST,
 439                              159, UNIPHIER_PIN_DRV_1BIT,
 440                              159, UNIPHIER_PIN_PULL_DOWN),
 441         UNIPHIER_PINCTRL_PIN(160, "XIRQ22", UNIPHIER_PIN_IECTRL_EXIST,
 442                              160, UNIPHIER_PIN_DRV_1BIT,
 443                              160, UNIPHIER_PIN_PULL_DOWN),
 444         UNIPHIER_PINCTRL_PIN(161, "XIRQ23", UNIPHIER_PIN_IECTRL_EXIST,
 445                              161, UNIPHIER_PIN_DRV_1BIT,
 446                              161, UNIPHIER_PIN_PULL_DOWN),
 447         UNIPHIER_PINCTRL_PIN(162, "CH2CLK", UNIPHIER_PIN_IECTRL_EXIST,
 448                              162, UNIPHIER_PIN_DRV_1BIT,
 449                              162, UNIPHIER_PIN_PULL_DOWN),
 450         UNIPHIER_PINCTRL_PIN(163, "CH2PSYNC", UNIPHIER_PIN_IECTRL_EXIST,
 451                              163, UNIPHIER_PIN_DRV_1BIT,
 452                              163, UNIPHIER_PIN_PULL_DOWN),
 453         UNIPHIER_PINCTRL_PIN(164, "CH2VAL", UNIPHIER_PIN_IECTRL_EXIST,
 454                              164, UNIPHIER_PIN_DRV_1BIT,
 455                              164, UNIPHIER_PIN_PULL_DOWN),
 456         UNIPHIER_PINCTRL_PIN(165, "CH2DATA", UNIPHIER_PIN_IECTRL_EXIST,
 457                              165, UNIPHIER_PIN_DRV_1BIT,
 458                              165, UNIPHIER_PIN_PULL_DOWN),
 459         UNIPHIER_PINCTRL_PIN(166, "CK25O", UNIPHIER_PIN_IECTRL_EXIST,
 460                              166, UNIPHIER_PIN_DRV_1BIT,
 461                              166, UNIPHIER_PIN_PULL_DOWN),
 462 };
 463 
 464 static const unsigned aout1_pins[] = {137, 138, 139, 140, 141, 142};
 465 static const int aout1_muxvals[] = {0, 0, 0, 0, 0, 0};
 466 static const unsigned aoutiec1_pins[] = {135, 136};
 467 static const int aoutiec1_muxvals[] = {0, 0};
 468 static const unsigned int emmc_pins[] = {19, 20, 21, 22, 23, 24, 25};
 469 static const int emmc_muxvals[] = {0, 0, 0, 0, 0, 0, 0};
 470 static const unsigned emmc_dat8_pins[] = {26, 27, 28, 29};
 471 static const int emmc_dat8_muxvals[] = {0, 0, 0, 0};
 472 static const unsigned ether_rmii_pins[] = {6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
 473                                            16, 17};
 474 static const int ether_rmii_muxvals[] = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4};
 475 static const unsigned hscin0_ci_pins[] = {102, 103, 104, 105, 106, 107, 108,
 476                                           109, 110, 111, 112};
 477 static const int hscin0_ci_muxvals[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
 478 static const unsigned hscin0_p_pins[] = {102, 103, 104, 105, 106, 107, 108, 109,
 479                                          110, 111, 112};
 480 static const int hscin0_p_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 481 static const unsigned hscin0_s_pins[] = {116, 117, 118, 119};
 482 static const int hscin0_s_muxvals[] = {3, 3, 3, 3};
 483 static const unsigned hscin1_p_pins[] = {124, 125, 126, 127, 128, 129, 130, 131,
 484                                          132, 133, 134};
 485 static const int hscin1_p_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 486 static const unsigned hscin1_s_pins[] = {120, 121, 122, 123};
 487 static const int hscin1_s_muxvals[] = {3, 3, 3, 3};
 488 static const unsigned hscin2_s_pins[] = {124, 125, 126, 127};
 489 static const int hscin2_s_muxvals[] = {3, 3, 3, 3};
 490 static const unsigned hscout0_ci_pins[] = {113, 114, 115, 116, 117, 118, 119,
 491                                            120, 121, 122, 123};
 492 static const int hscout0_ci_muxvals[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
 493 static const unsigned hscout0_p_pins[] = {113, 114, 115, 116, 117, 118, 119,
 494                                           120, 121, 122, 123};
 495 static const int hscout0_p_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 496 static const unsigned hscout0_s_pins[] = {116, 117, 118, 119};
 497 static const int hscout0_s_muxvals[] = {4, 4, 4, 4};
 498 static const unsigned hscout1_s_pins[] = {120, 121, 122, 123};
 499 static const int hscout1_s_muxvals[] = {4, 4, 4, 4};
 500 static const unsigned i2c0_pins[] = {63, 64};
 501 static const int i2c0_muxvals[] = {0, 0};
 502 static const unsigned i2c1_pins[] = {65, 66};
 503 static const int i2c1_muxvals[] = {0, 0};
 504 static const unsigned i2c3_pins[] = {67, 68};
 505 static const int i2c3_muxvals[] = {1, 1};
 506 static const unsigned i2c4_pins[] = {61, 62};
 507 static const int i2c4_muxvals[] = {1, 1};
 508 static const unsigned nand_pins[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
 509                                      15, 16, 17};
 510 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 511 static const unsigned spi0_pins[] = {56, 57, 58, 59};
 512 static const int spi0_muxvals[] = {0, 0, 0, 0};
 513 static const unsigned spi1_pins[] = {169, 170, 171, 172};
 514 static const int spi1_muxvals[] = {1, 1, 1, 1};
 515 static const unsigned system_bus_pins[] = {1, 2, 6, 7, 8, 9, 10, 11, 12, 13,
 516                                            14, 15, 16, 17};
 517 static const int system_bus_muxvals[] = {0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 518                                          2};
 519 static const unsigned system_bus_cs1_pins[] = {0};
 520 static const int system_bus_cs1_muxvals[] = {0};
 521 static const unsigned uart0_pins[] = {54, 55};
 522 static const int uart0_muxvals[] = {0, 0};
 523 static const unsigned uart1_pins[] = {58, 59};
 524 static const int uart1_muxvals[] = {1, 1};
 525 static const unsigned uart2_pins[] = {90, 91};
 526 static const int uart2_muxvals[] = {1, 1};
 527 static const unsigned uart3_pins[] = {94, 95};
 528 static const int uart3_muxvals[] = {1, 1};
 529 static const unsigned uart3_ctsrts_pins[] = {96, 98};
 530 static const int uart3_ctsrts_muxvals[] = {1, 1};
 531 static const unsigned uart3_modem_pins[] = {97, 99, 100, 101};
 532 static const int uart3_modem_muxvals[] = {1, 1, 1, 1};
 533 static const unsigned usb0_pins[] = {46, 47};
 534 static const int usb0_muxvals[] = {0, 0};
 535 static const unsigned usb1_pins[] = {48, 49};
 536 static const int usb1_muxvals[] = {0, 0};
 537 static const unsigned usb2_pins[] = {50, 51};
 538 static const int usb2_muxvals[] = {0, 0};
 539 static const unsigned int gpio_range0_pins[] = {
 540         159, 160, 161, 162, 163, 164, 165, 166,         /* PORT0x */
 541         0, 1, 2, 3, 4, 5, 6, 7,                         /* PORT1x */
 542         8, 9, 10, 11, 12, 13, 14, 15,                   /* PORT2x */
 543         16, 17, 18,                                     /* PORT30-32 */
 544 };
 545 static const unsigned int gpio_range1_pins[] = {
 546         46, 47, 48, 49, 50,                             /* PORT53-57 */
 547         51,                                             /* PORT60 */
 548 };
 549 static const unsigned int gpio_range2_pins[] = {
 550         54, 55, 56, 57, 58,                             /* PORT63-67 */
 551         59, 60, 69, 70, 71, 72, 73, 74,                 /* PORT7x */
 552         75, 76, 77, 78, 79, 80, 81, 82,                 /* PORT8x */
 553         83, 84, 85, 86, 87, 88, 89, 90,                 /* PORT9x */
 554         91, 92, 93, 94, 95, 96, 97, 98,                 /* PORT10x */
 555 };
 556 static const unsigned int gpio_range3_pins[] = {
 557         99, 100, 101, 102, 103, 104, 105, 106,          /* PORT12x */
 558         107, 108, 109, 110, 111, 112, 113, 114,         /* PORT13x */
 559         115, 116, 117, 118, 119, 120, 121, 122,         /* PORT14x */
 560         149, 150, 151, 152, 153, 154, 155, 156,         /* XIRQ0-7 */
 561         157, 143, 144, 145, 85, 146, 158, 84,           /* XIRQ8-15 */
 562         141, 142, 148, 50, 51, 159, 160, 161,           /* XIRQ16-23 */
 563         61, 62, 63, 64, 65, 66, 67, 68,                 /* PORT18x */
 564 };
 565 static const unsigned int gpio_range4_pins[] = {
 566         123, 124, 125, 126, 127, 128, 129, 130,         /* PORT20x */
 567         131, 132, 133, 134, 135, 136, 137, 138,         /* PORT21x */
 568         139, 140, 141, 142,                             /* PORT220-223 */
 569 };
 570 static const unsigned int gpio_range5_pins[] = {
 571         147, 148, 149, 150, 151, 152, 153, 154,         /* PORT23x */
 572         155, 156, 157, 143, 144, 145, 146, 158,         /* PORT24x */
 573 };
 574 
 575 static const struct uniphier_pinctrl_group uniphier_ld11_groups[] = {
 576         UNIPHIER_PINCTRL_GROUP(aout1),
 577         UNIPHIER_PINCTRL_GROUP(aoutiec1),
 578         UNIPHIER_PINCTRL_GROUP(emmc),
 579         UNIPHIER_PINCTRL_GROUP(emmc_dat8),
 580         UNIPHIER_PINCTRL_GROUP(ether_rmii),
 581         UNIPHIER_PINCTRL_GROUP(hscin0_ci),
 582         UNIPHIER_PINCTRL_GROUP(hscin0_p),
 583         UNIPHIER_PINCTRL_GROUP(hscin0_s),
 584         UNIPHIER_PINCTRL_GROUP(hscin1_p),
 585         UNIPHIER_PINCTRL_GROUP(hscin1_s),
 586         UNIPHIER_PINCTRL_GROUP(hscin2_s),
 587         UNIPHIER_PINCTRL_GROUP(hscout0_ci),
 588         UNIPHIER_PINCTRL_GROUP(hscout0_p),
 589         UNIPHIER_PINCTRL_GROUP(hscout0_s),
 590         UNIPHIER_PINCTRL_GROUP(hscout1_s),
 591         UNIPHIER_PINCTRL_GROUP(i2c0),
 592         UNIPHIER_PINCTRL_GROUP(i2c1),
 593         UNIPHIER_PINCTRL_GROUP(i2c3),
 594         UNIPHIER_PINCTRL_GROUP(i2c4),
 595         UNIPHIER_PINCTRL_GROUP(nand),
 596         UNIPHIER_PINCTRL_GROUP(spi0),
 597         UNIPHIER_PINCTRL_GROUP(spi1),
 598         UNIPHIER_PINCTRL_GROUP(system_bus),
 599         UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
 600         UNIPHIER_PINCTRL_GROUP(uart0),
 601         UNIPHIER_PINCTRL_GROUP(uart1),
 602         UNIPHIER_PINCTRL_GROUP(uart2),
 603         UNIPHIER_PINCTRL_GROUP(uart3),
 604         UNIPHIER_PINCTRL_GROUP(uart3_ctsrts),
 605         UNIPHIER_PINCTRL_GROUP(uart3_modem),
 606         UNIPHIER_PINCTRL_GROUP(usb0),
 607         UNIPHIER_PINCTRL_GROUP(usb1),
 608         UNIPHIER_PINCTRL_GROUP(usb2),
 609         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range0),
 610         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1),
 611         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range2),
 612         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range3),
 613         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range4),
 614         UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range5),
 615 };
 616 
 617 static const char * const aout1_groups[] = {"aout1"};
 618 static const char * const aoutiec1_groups[] = {"aoutiec1"};
 619 static const char * const emmc_groups[] = {"emmc", "emmc_dat8"};
 620 static const char * const ether_rmii_groups[] = {"ether_rmii"};
 621 static const char * const hscin0_groups[] = {"hscin0_ci",
 622                                              "hscin0_p",
 623                                              "hscin0_s"};
 624 static const char * const hscin1_groups[] = {"hscin1_p", "hscin1_s"};
 625 static const char * const hscin2_groups[] = {"hscin2_s"};
 626 static const char * const hscout0_groups[] = {"hscout0_ci",
 627                                               "hscout0_p",
 628                                               "hscout0_s"};
 629 static const char * const hscout1_groups[] = {"hscout1_s"};
 630 static const char * const i2c0_groups[] = {"i2c0"};
 631 static const char * const i2c1_groups[] = {"i2c1"};
 632 static const char * const i2c3_groups[] = {"i2c3"};
 633 static const char * const i2c4_groups[] = {"i2c4"};
 634 static const char * const nand_groups[] = {"nand"};
 635 static const char * const spi0_groups[] = {"spi0"};
 636 static const char * const spi1_groups[] = {"spi1"};
 637 static const char * const system_bus_groups[] = {"system_bus",
 638                                                  "system_bus_cs1"};
 639 static const char * const uart0_groups[] = {"uart0"};
 640 static const char * const uart1_groups[] = {"uart1"};
 641 static const char * const uart2_groups[] = {"uart2"};
 642 static const char * const uart3_groups[] = {"uart3", "uart3_ctsrts",
 643                                             "uart3_modem"};
 644 static const char * const usb0_groups[] = {"usb0"};
 645 static const char * const usb1_groups[] = {"usb1"};
 646 static const char * const usb2_groups[] = {"usb2"};
 647 
 648 static const struct uniphier_pinmux_function uniphier_ld11_functions[] = {
 649         UNIPHIER_PINMUX_FUNCTION(aout1),
 650         UNIPHIER_PINMUX_FUNCTION(aoutiec1),
 651         UNIPHIER_PINMUX_FUNCTION(emmc),
 652         UNIPHIER_PINMUX_FUNCTION(ether_rmii),
 653         UNIPHIER_PINMUX_FUNCTION(hscin0),
 654         UNIPHIER_PINMUX_FUNCTION(hscin1),
 655         UNIPHIER_PINMUX_FUNCTION(hscin2),
 656         UNIPHIER_PINMUX_FUNCTION(hscout0),
 657         UNIPHIER_PINMUX_FUNCTION(hscout1),
 658         UNIPHIER_PINMUX_FUNCTION(i2c0),
 659         UNIPHIER_PINMUX_FUNCTION(i2c1),
 660         UNIPHIER_PINMUX_FUNCTION(i2c3),
 661         UNIPHIER_PINMUX_FUNCTION(i2c4),
 662         UNIPHIER_PINMUX_FUNCTION(nand),
 663         UNIPHIER_PINMUX_FUNCTION(spi0),
 664         UNIPHIER_PINMUX_FUNCTION(spi1),
 665         UNIPHIER_PINMUX_FUNCTION(system_bus),
 666         UNIPHIER_PINMUX_FUNCTION(uart0),
 667         UNIPHIER_PINMUX_FUNCTION(uart1),
 668         UNIPHIER_PINMUX_FUNCTION(uart2),
 669         UNIPHIER_PINMUX_FUNCTION(uart3),
 670         UNIPHIER_PINMUX_FUNCTION(usb0),
 671         UNIPHIER_PINMUX_FUNCTION(usb1),
 672         UNIPHIER_PINMUX_FUNCTION(usb2),
 673 };
 674 
 675 static int uniphier_ld11_get_gpio_muxval(unsigned int pin,
 676                                          unsigned int gpio_offset)
 677 {
 678         if (gpio_offset == 132 || gpio_offset == 135)   /* XIRQ12, 15 */
 679                 return 13;
 680 
 681         if (gpio_offset >= 120 && gpio_offset <= 143)   /* XIRQx */
 682                 return 14;
 683 
 684         return 15;
 685 }
 686 
 687 static const struct uniphier_pinctrl_socdata uniphier_ld11_pindata = {
 688         .pins = uniphier_ld11_pins,
 689         .npins = ARRAY_SIZE(uniphier_ld11_pins),
 690         .groups = uniphier_ld11_groups,
 691         .groups_count = ARRAY_SIZE(uniphier_ld11_groups),
 692         .functions = uniphier_ld11_functions,
 693         .functions_count = ARRAY_SIZE(uniphier_ld11_functions),
 694         .get_gpio_muxval = uniphier_ld11_get_gpio_muxval,
 695         .caps = UNIPHIER_PINCTRL_CAPS_PERPIN_IECTRL,
 696 };
 697 
 698 static int uniphier_ld11_pinctrl_probe(struct platform_device *pdev)
 699 {
 700         return uniphier_pinctrl_probe(pdev, &uniphier_ld11_pindata);
 701 }
 702 
 703 static const struct of_device_id uniphier_ld11_pinctrl_match[] = {
 704         { .compatible = "socionext,uniphier-ld11-pinctrl" },
 705         { /* sentinel */ }
 706 };
 707 
 708 static struct platform_driver uniphier_ld11_pinctrl_driver = {
 709         .probe = uniphier_ld11_pinctrl_probe,
 710         .driver = {
 711                 .name = "uniphier-ld11-pinctrl",
 712                 .of_match_table = uniphier_ld11_pinctrl_match,
 713                 .pm = &uniphier_pinctrl_pm_ops,
 714         },
 715 };
 716 builtin_platform_driver(uniphier_ld11_pinctrl_driver);

/* [<][>][^][v][top][bottom][index][help] */