Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 1 | /* |
| 2 | * SH-X3 prototype CPU pinmux |
| 3 | * |
| 4 | * Copyright (C) 2010 Paul Mundt |
| 5 | * |
| 6 | * This file is subject to the terms and conditions of the GNU General Public |
| 7 | * License. See the file "COPYING" in the main directory of this archive |
| 8 | * for more details. |
| 9 | */ |
| 10 | #include <linux/init.h> |
| 11 | #include <linux/kernel.h> |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 12 | #include <cpu/shx3.h> |
| 13 | |
Laurent Pinchart | c332380 | 2012-12-15 23:51:55 +0100 | [diff] [blame] | 14 | #include "sh_pfc.h" |
| 15 | |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 16 | enum { |
| 17 | PINMUX_RESERVED = 0, |
| 18 | |
| 19 | PINMUX_DATA_BEGIN, |
| 20 | PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA, |
| 21 | PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA, |
| 22 | PB7_DATA, PB6_DATA, PB5_DATA, PB4_DATA, |
| 23 | PB3_DATA, PB2_DATA, PB1_DATA, PB0_DATA, |
| 24 | PC7_DATA, PC6_DATA, PC5_DATA, PC4_DATA, |
| 25 | PC3_DATA, PC2_DATA, PC1_DATA, PC0_DATA, |
| 26 | PD7_DATA, PD6_DATA, PD5_DATA, PD4_DATA, |
| 27 | PD3_DATA, PD2_DATA, PD1_DATA, PD0_DATA, |
| 28 | PE7_DATA, PE6_DATA, PE5_DATA, PE4_DATA, |
| 29 | PE3_DATA, PE2_DATA, PE1_DATA, PE0_DATA, |
| 30 | PF7_DATA, PF6_DATA, PF5_DATA, PF4_DATA, |
| 31 | PF3_DATA, PF2_DATA, PF1_DATA, PF0_DATA, |
| 32 | PG7_DATA, PG6_DATA, PG5_DATA, PG4_DATA, |
| 33 | PG3_DATA, PG2_DATA, PG1_DATA, PG0_DATA, |
| 34 | |
| 35 | PH5_DATA, PH4_DATA, |
| 36 | PH3_DATA, PH2_DATA, PH1_DATA, PH0_DATA, |
| 37 | PINMUX_DATA_END, |
| 38 | |
| 39 | PINMUX_INPUT_BEGIN, |
| 40 | PA7_IN, PA6_IN, PA5_IN, PA4_IN, |
| 41 | PA3_IN, PA2_IN, PA1_IN, PA0_IN, |
| 42 | PB7_IN, PB6_IN, PB5_IN, PB4_IN, |
| 43 | PB3_IN, PB2_IN, PB1_IN, PB0_IN, |
| 44 | PC7_IN, PC6_IN, PC5_IN, PC4_IN, |
| 45 | PC3_IN, PC2_IN, PC1_IN, PC0_IN, |
| 46 | PD7_IN, PD6_IN, PD5_IN, PD4_IN, |
| 47 | PD3_IN, PD2_IN, PD1_IN, PD0_IN, |
| 48 | PE7_IN, PE6_IN, PE5_IN, PE4_IN, |
| 49 | PE3_IN, PE2_IN, PE1_IN, PE0_IN, |
| 50 | PF7_IN, PF6_IN, PF5_IN, PF4_IN, |
| 51 | PF3_IN, PF2_IN, PF1_IN, PF0_IN, |
| 52 | PG7_IN, PG6_IN, PG5_IN, PG4_IN, |
| 53 | PG3_IN, PG2_IN, PG1_IN, PG0_IN, |
| 54 | |
| 55 | PH5_IN, PH4_IN, |
| 56 | PH3_IN, PH2_IN, PH1_IN, PH0_IN, |
| 57 | PINMUX_INPUT_END, |
| 58 | |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 59 | PINMUX_OUTPUT_BEGIN, |
| 60 | PA7_OUT, PA6_OUT, PA5_OUT, PA4_OUT, |
| 61 | PA3_OUT, PA2_OUT, PA1_OUT, PA0_OUT, |
| 62 | PB7_OUT, PB6_OUT, PB5_OUT, PB4_OUT, |
| 63 | PB3_OUT, PB2_OUT, PB1_OUT, PB0_OUT, |
| 64 | PC7_OUT, PC6_OUT, PC5_OUT, PC4_OUT, |
| 65 | PC3_OUT, PC2_OUT, PC1_OUT, PC0_OUT, |
| 66 | PD7_OUT, PD6_OUT, PD5_OUT, PD4_OUT, |
| 67 | PD3_OUT, PD2_OUT, PD1_OUT, PD0_OUT, |
| 68 | PE7_OUT, PE6_OUT, PE5_OUT, PE4_OUT, |
| 69 | PE3_OUT, PE2_OUT, PE1_OUT, PE0_OUT, |
| 70 | PF7_OUT, PF6_OUT, PF5_OUT, PF4_OUT, |
| 71 | PF3_OUT, PF2_OUT, PF1_OUT, PF0_OUT, |
| 72 | PG7_OUT, PG6_OUT, PG5_OUT, PG4_OUT, |
| 73 | PG3_OUT, PG2_OUT, PG1_OUT, PG0_OUT, |
| 74 | |
| 75 | PH5_OUT, PH4_OUT, |
| 76 | PH3_OUT, PH2_OUT, PH1_OUT, PH0_OUT, |
| 77 | PINMUX_OUTPUT_END, |
| 78 | |
| 79 | PINMUX_FUNCTION_BEGIN, |
| 80 | PA7_FN, PA6_FN, PA5_FN, PA4_FN, |
| 81 | PA3_FN, PA2_FN, PA1_FN, PA0_FN, |
| 82 | PB7_FN, PB6_FN, PB5_FN, PB4_FN, |
| 83 | PB3_FN, PB2_FN, PB1_FN, PB0_FN, |
| 84 | PC7_FN, PC6_FN, PC5_FN, PC4_FN, |
| 85 | PC3_FN, PC2_FN, PC1_FN, PC0_FN, |
| 86 | PD7_FN, PD6_FN, PD5_FN, PD4_FN, |
| 87 | PD3_FN, PD2_FN, PD1_FN, PD0_FN, |
| 88 | PE7_FN, PE6_FN, PE5_FN, PE4_FN, |
| 89 | PE3_FN, PE2_FN, PE1_FN, PE0_FN, |
| 90 | PF7_FN, PF6_FN, PF5_FN, PF4_FN, |
| 91 | PF3_FN, PF2_FN, PF1_FN, PF0_FN, |
| 92 | PG7_FN, PG6_FN, PG5_FN, PG4_FN, |
| 93 | PG3_FN, PG2_FN, PG1_FN, PG0_FN, |
| 94 | |
| 95 | PH5_FN, PH4_FN, |
| 96 | PH3_FN, PH2_FN, PH1_FN, PH0_FN, |
| 97 | PINMUX_FUNCTION_END, |
| 98 | |
| 99 | PINMUX_MARK_BEGIN, |
| 100 | |
| 101 | D31_MARK, D30_MARK, D29_MARK, D28_MARK, D27_MARK, D26_MARK, |
| 102 | D25_MARK, D24_MARK, D23_MARK, D22_MARK, D21_MARK, D20_MARK, |
| 103 | D19_MARK, D18_MARK, D17_MARK, D16_MARK, |
| 104 | |
| 105 | BACK_MARK, BREQ_MARK, |
| 106 | WE3_MARK, WE2_MARK, |
| 107 | CS6_MARK, CS5_MARK, CS4_MARK, |
| 108 | CLKOUTENB_MARK, |
| 109 | |
| 110 | DACK3_MARK, DACK2_MARK, DACK1_MARK, DACK0_MARK, |
| 111 | DREQ3_MARK, DREQ2_MARK, DREQ1_MARK, DREQ0_MARK, |
| 112 | |
| 113 | IRQ3_MARK, IRQ2_MARK, IRQ1_MARK, IRQ0_MARK, |
| 114 | |
| 115 | DRAK3_MARK, DRAK2_MARK, DRAK1_MARK, DRAK0_MARK, |
| 116 | |
| 117 | SCK3_MARK, SCK2_MARK, SCK1_MARK, SCK0_MARK, |
| 118 | IRL3_MARK, IRL2_MARK, IRL1_MARK, IRL0_MARK, |
| 119 | TXD3_MARK, TXD2_MARK, TXD1_MARK, TXD0_MARK, |
| 120 | RXD3_MARK, RXD2_MARK, RXD1_MARK, RXD0_MARK, |
| 121 | |
| 122 | CE2B_MARK, CE2A_MARK, IOIS16_MARK, |
| 123 | STATUS1_MARK, STATUS0_MARK, |
| 124 | |
| 125 | IRQOUT_MARK, |
| 126 | |
| 127 | PINMUX_MARK_END, |
| 128 | }; |
| 129 | |
Laurent Pinchart | cd3c1be | 2013-02-16 18:47:05 +0100 | [diff] [blame] | 130 | static const pinmux_enum_t shx3_pinmux_data[] = { |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 131 | |
| 132 | /* PA GPIO */ |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 133 | PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT), |
| 134 | PINMUX_DATA(PA6_DATA, PA6_IN, PA6_OUT), |
| 135 | PINMUX_DATA(PA5_DATA, PA5_IN, PA5_OUT), |
| 136 | PINMUX_DATA(PA4_DATA, PA4_IN, PA4_OUT), |
| 137 | PINMUX_DATA(PA3_DATA, PA3_IN, PA3_OUT), |
| 138 | PINMUX_DATA(PA2_DATA, PA2_IN, PA2_OUT), |
| 139 | PINMUX_DATA(PA1_DATA, PA1_IN, PA1_OUT), |
| 140 | PINMUX_DATA(PA0_DATA, PA0_IN, PA0_OUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 141 | |
| 142 | /* PB GPIO */ |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 143 | PINMUX_DATA(PB7_DATA, PB7_IN, PB7_OUT), |
| 144 | PINMUX_DATA(PB6_DATA, PB6_IN, PB6_OUT), |
| 145 | PINMUX_DATA(PB5_DATA, PB5_IN, PB5_OUT), |
| 146 | PINMUX_DATA(PB4_DATA, PB4_IN, PB4_OUT), |
| 147 | PINMUX_DATA(PB3_DATA, PB3_IN, PB3_OUT), |
| 148 | PINMUX_DATA(PB2_DATA, PB2_IN, PB2_OUT), |
| 149 | PINMUX_DATA(PB1_DATA, PB1_IN, PB1_OUT), |
| 150 | PINMUX_DATA(PB0_DATA, PB0_IN, PB0_OUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 151 | |
| 152 | /* PC GPIO */ |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 153 | PINMUX_DATA(PC7_DATA, PC7_IN, PC7_OUT), |
| 154 | PINMUX_DATA(PC6_DATA, PC6_IN, PC6_OUT), |
| 155 | PINMUX_DATA(PC5_DATA, PC5_IN, PC5_OUT), |
| 156 | PINMUX_DATA(PC4_DATA, PC4_IN, PC4_OUT), |
| 157 | PINMUX_DATA(PC3_DATA, PC3_IN, PC3_OUT), |
| 158 | PINMUX_DATA(PC2_DATA, PC2_IN, PC2_OUT), |
| 159 | PINMUX_DATA(PC1_DATA, PC1_IN, PC1_OUT), |
| 160 | PINMUX_DATA(PC0_DATA, PC0_IN, PC0_OUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 161 | |
| 162 | /* PD GPIO */ |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 163 | PINMUX_DATA(PD7_DATA, PD7_IN, PD7_OUT), |
| 164 | PINMUX_DATA(PD6_DATA, PD6_IN, PD6_OUT), |
| 165 | PINMUX_DATA(PD5_DATA, PD5_IN, PD5_OUT), |
| 166 | PINMUX_DATA(PD4_DATA, PD4_IN, PD4_OUT), |
| 167 | PINMUX_DATA(PD3_DATA, PD3_IN, PD3_OUT), |
| 168 | PINMUX_DATA(PD2_DATA, PD2_IN, PD2_OUT), |
| 169 | PINMUX_DATA(PD1_DATA, PD1_IN, PD1_OUT), |
| 170 | PINMUX_DATA(PD0_DATA, PD0_IN, PD0_OUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 171 | |
| 172 | /* PE GPIO */ |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 173 | PINMUX_DATA(PE7_DATA, PE7_IN, PE7_OUT), |
| 174 | PINMUX_DATA(PE6_DATA, PE6_IN, PE6_OUT), |
| 175 | PINMUX_DATA(PE5_DATA, PE5_IN, PE5_OUT), |
| 176 | PINMUX_DATA(PE4_DATA, PE4_IN, PE4_OUT), |
| 177 | PINMUX_DATA(PE3_DATA, PE3_IN, PE3_OUT), |
| 178 | PINMUX_DATA(PE2_DATA, PE2_IN, PE2_OUT), |
| 179 | PINMUX_DATA(PE1_DATA, PE1_IN, PE1_OUT), |
| 180 | PINMUX_DATA(PE0_DATA, PE0_IN, PE0_OUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 181 | |
| 182 | /* PF GPIO */ |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 183 | PINMUX_DATA(PF7_DATA, PF7_IN, PF7_OUT), |
| 184 | PINMUX_DATA(PF6_DATA, PF6_IN, PF6_OUT), |
| 185 | PINMUX_DATA(PF5_DATA, PF5_IN, PF5_OUT), |
| 186 | PINMUX_DATA(PF4_DATA, PF4_IN, PF4_OUT), |
| 187 | PINMUX_DATA(PF3_DATA, PF3_IN, PF3_OUT), |
| 188 | PINMUX_DATA(PF2_DATA, PF2_IN, PF2_OUT), |
| 189 | PINMUX_DATA(PF1_DATA, PF1_IN, PF1_OUT), |
| 190 | PINMUX_DATA(PF0_DATA, PF0_IN, PF0_OUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 191 | |
| 192 | /* PG GPIO */ |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 193 | PINMUX_DATA(PG7_DATA, PG7_IN, PG7_OUT), |
| 194 | PINMUX_DATA(PG6_DATA, PG6_IN, PG6_OUT), |
| 195 | PINMUX_DATA(PG5_DATA, PG5_IN, PG5_OUT), |
| 196 | PINMUX_DATA(PG4_DATA, PG4_IN, PG4_OUT), |
| 197 | PINMUX_DATA(PG3_DATA, PG3_IN, PG3_OUT), |
| 198 | PINMUX_DATA(PG2_DATA, PG2_IN, PG2_OUT), |
| 199 | PINMUX_DATA(PG1_DATA, PG1_IN, PG1_OUT), |
| 200 | PINMUX_DATA(PG0_DATA, PG0_IN, PG0_OUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 201 | |
| 202 | /* PH GPIO */ |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 203 | PINMUX_DATA(PH5_DATA, PH5_IN, PH5_OUT), |
| 204 | PINMUX_DATA(PH4_DATA, PH4_IN, PH4_OUT), |
| 205 | PINMUX_DATA(PH3_DATA, PH3_IN, PH3_OUT), |
| 206 | PINMUX_DATA(PH2_DATA, PH2_IN, PH2_OUT), |
| 207 | PINMUX_DATA(PH1_DATA, PH1_IN, PH1_OUT), |
| 208 | PINMUX_DATA(PH0_DATA, PH0_IN, PH0_OUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 209 | |
| 210 | /* PA FN */ |
| 211 | PINMUX_DATA(D31_MARK, PA7_FN), |
| 212 | PINMUX_DATA(D30_MARK, PA6_FN), |
| 213 | PINMUX_DATA(D29_MARK, PA5_FN), |
| 214 | PINMUX_DATA(D28_MARK, PA4_FN), |
| 215 | PINMUX_DATA(D27_MARK, PA3_FN), |
| 216 | PINMUX_DATA(D26_MARK, PA2_FN), |
| 217 | PINMUX_DATA(D25_MARK, PA1_FN), |
| 218 | PINMUX_DATA(D24_MARK, PA0_FN), |
| 219 | |
| 220 | /* PB FN */ |
| 221 | PINMUX_DATA(D23_MARK, PB7_FN), |
| 222 | PINMUX_DATA(D22_MARK, PB6_FN), |
| 223 | PINMUX_DATA(D21_MARK, PB5_FN), |
| 224 | PINMUX_DATA(D20_MARK, PB4_FN), |
| 225 | PINMUX_DATA(D19_MARK, PB3_FN), |
| 226 | PINMUX_DATA(D18_MARK, PB2_FN), |
| 227 | PINMUX_DATA(D17_MARK, PB1_FN), |
| 228 | PINMUX_DATA(D16_MARK, PB0_FN), |
| 229 | |
| 230 | /* PC FN */ |
| 231 | PINMUX_DATA(BACK_MARK, PC7_FN), |
| 232 | PINMUX_DATA(BREQ_MARK, PC6_FN), |
| 233 | PINMUX_DATA(WE3_MARK, PC5_FN), |
| 234 | PINMUX_DATA(WE2_MARK, PC4_FN), |
| 235 | PINMUX_DATA(CS6_MARK, PC3_FN), |
| 236 | PINMUX_DATA(CS5_MARK, PC2_FN), |
| 237 | PINMUX_DATA(CS4_MARK, PC1_FN), |
| 238 | PINMUX_DATA(CLKOUTENB_MARK, PC0_FN), |
| 239 | |
| 240 | /* PD FN */ |
| 241 | PINMUX_DATA(DACK3_MARK, PD7_FN), |
| 242 | PINMUX_DATA(DACK2_MARK, PD6_FN), |
| 243 | PINMUX_DATA(DACK1_MARK, PD5_FN), |
| 244 | PINMUX_DATA(DACK0_MARK, PD4_FN), |
| 245 | PINMUX_DATA(DREQ3_MARK, PD3_FN), |
| 246 | PINMUX_DATA(DREQ2_MARK, PD2_FN), |
| 247 | PINMUX_DATA(DREQ1_MARK, PD1_FN), |
| 248 | PINMUX_DATA(DREQ0_MARK, PD0_FN), |
| 249 | |
| 250 | /* PE FN */ |
| 251 | PINMUX_DATA(IRQ3_MARK, PE7_FN), |
| 252 | PINMUX_DATA(IRQ2_MARK, PE6_FN), |
| 253 | PINMUX_DATA(IRQ1_MARK, PE5_FN), |
| 254 | PINMUX_DATA(IRQ0_MARK, PE4_FN), |
| 255 | PINMUX_DATA(DRAK3_MARK, PE3_FN), |
| 256 | PINMUX_DATA(DRAK2_MARK, PE2_FN), |
| 257 | PINMUX_DATA(DRAK1_MARK, PE1_FN), |
| 258 | PINMUX_DATA(DRAK0_MARK, PE0_FN), |
| 259 | |
| 260 | /* PF FN */ |
| 261 | PINMUX_DATA(SCK3_MARK, PF7_FN), |
| 262 | PINMUX_DATA(SCK2_MARK, PF6_FN), |
| 263 | PINMUX_DATA(SCK1_MARK, PF5_FN), |
| 264 | PINMUX_DATA(SCK0_MARK, PF4_FN), |
| 265 | PINMUX_DATA(IRL3_MARK, PF3_FN), |
| 266 | PINMUX_DATA(IRL2_MARK, PF2_FN), |
| 267 | PINMUX_DATA(IRL1_MARK, PF1_FN), |
| 268 | PINMUX_DATA(IRL0_MARK, PF0_FN), |
| 269 | |
| 270 | /* PG FN */ |
| 271 | PINMUX_DATA(TXD3_MARK, PG7_FN), |
| 272 | PINMUX_DATA(TXD2_MARK, PG6_FN), |
| 273 | PINMUX_DATA(TXD1_MARK, PG5_FN), |
| 274 | PINMUX_DATA(TXD0_MARK, PG4_FN), |
| 275 | PINMUX_DATA(RXD3_MARK, PG3_FN), |
| 276 | PINMUX_DATA(RXD2_MARK, PG2_FN), |
| 277 | PINMUX_DATA(RXD1_MARK, PG1_FN), |
| 278 | PINMUX_DATA(RXD0_MARK, PG0_FN), |
| 279 | |
| 280 | /* PH FN */ |
| 281 | PINMUX_DATA(CE2B_MARK, PH5_FN), |
| 282 | PINMUX_DATA(CE2A_MARK, PH4_FN), |
| 283 | PINMUX_DATA(IOIS16_MARK, PH3_FN), |
| 284 | PINMUX_DATA(STATUS1_MARK, PH2_FN), |
| 285 | PINMUX_DATA(STATUS0_MARK, PH1_FN), |
| 286 | PINMUX_DATA(IRQOUT_MARK, PH0_FN), |
| 287 | }; |
| 288 | |
Laurent Pinchart | a3db40a6 | 2013-01-02 14:53:37 +0100 | [diff] [blame] | 289 | static struct sh_pfc_pin shx3_pinmux_pins[] = { |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 290 | /* PA */ |
| 291 | PINMUX_GPIO(GPIO_PA7, PA7_DATA), |
| 292 | PINMUX_GPIO(GPIO_PA6, PA6_DATA), |
| 293 | PINMUX_GPIO(GPIO_PA5, PA5_DATA), |
| 294 | PINMUX_GPIO(GPIO_PA4, PA4_DATA), |
| 295 | PINMUX_GPIO(GPIO_PA3, PA3_DATA), |
| 296 | PINMUX_GPIO(GPIO_PA2, PA2_DATA), |
| 297 | PINMUX_GPIO(GPIO_PA1, PA1_DATA), |
| 298 | PINMUX_GPIO(GPIO_PA0, PA0_DATA), |
| 299 | |
| 300 | /* PB */ |
| 301 | PINMUX_GPIO(GPIO_PB7, PB7_DATA), |
| 302 | PINMUX_GPIO(GPIO_PB6, PB6_DATA), |
| 303 | PINMUX_GPIO(GPIO_PB5, PB5_DATA), |
| 304 | PINMUX_GPIO(GPIO_PB4, PB4_DATA), |
| 305 | PINMUX_GPIO(GPIO_PB3, PB3_DATA), |
| 306 | PINMUX_GPIO(GPIO_PB2, PB2_DATA), |
| 307 | PINMUX_GPIO(GPIO_PB1, PB1_DATA), |
| 308 | PINMUX_GPIO(GPIO_PB0, PB0_DATA), |
| 309 | |
| 310 | /* PC */ |
| 311 | PINMUX_GPIO(GPIO_PC7, PC7_DATA), |
| 312 | PINMUX_GPIO(GPIO_PC6, PC6_DATA), |
| 313 | PINMUX_GPIO(GPIO_PC5, PC5_DATA), |
| 314 | PINMUX_GPIO(GPIO_PC4, PC4_DATA), |
| 315 | PINMUX_GPIO(GPIO_PC3, PC3_DATA), |
| 316 | PINMUX_GPIO(GPIO_PC2, PC2_DATA), |
| 317 | PINMUX_GPIO(GPIO_PC1, PC1_DATA), |
| 318 | PINMUX_GPIO(GPIO_PC0, PC0_DATA), |
| 319 | |
| 320 | /* PD */ |
| 321 | PINMUX_GPIO(GPIO_PD7, PD7_DATA), |
| 322 | PINMUX_GPIO(GPIO_PD6, PD6_DATA), |
| 323 | PINMUX_GPIO(GPIO_PD5, PD5_DATA), |
| 324 | PINMUX_GPIO(GPIO_PD4, PD4_DATA), |
| 325 | PINMUX_GPIO(GPIO_PD3, PD3_DATA), |
| 326 | PINMUX_GPIO(GPIO_PD2, PD2_DATA), |
| 327 | PINMUX_GPIO(GPIO_PD1, PD1_DATA), |
| 328 | PINMUX_GPIO(GPIO_PD0, PD0_DATA), |
| 329 | |
| 330 | /* PE */ |
| 331 | PINMUX_GPIO(GPIO_PE7, PE7_DATA), |
| 332 | PINMUX_GPIO(GPIO_PE6, PE6_DATA), |
| 333 | PINMUX_GPIO(GPIO_PE5, PE5_DATA), |
| 334 | PINMUX_GPIO(GPIO_PE4, PE4_DATA), |
| 335 | PINMUX_GPIO(GPIO_PE3, PE3_DATA), |
| 336 | PINMUX_GPIO(GPIO_PE2, PE2_DATA), |
| 337 | PINMUX_GPIO(GPIO_PE1, PE1_DATA), |
| 338 | PINMUX_GPIO(GPIO_PE0, PE0_DATA), |
| 339 | |
| 340 | /* PF */ |
| 341 | PINMUX_GPIO(GPIO_PF7, PF7_DATA), |
| 342 | PINMUX_GPIO(GPIO_PF6, PF6_DATA), |
| 343 | PINMUX_GPIO(GPIO_PF5, PF5_DATA), |
| 344 | PINMUX_GPIO(GPIO_PF4, PF4_DATA), |
| 345 | PINMUX_GPIO(GPIO_PF3, PF3_DATA), |
| 346 | PINMUX_GPIO(GPIO_PF2, PF2_DATA), |
| 347 | PINMUX_GPIO(GPIO_PF1, PF1_DATA), |
| 348 | PINMUX_GPIO(GPIO_PF0, PF0_DATA), |
| 349 | |
| 350 | /* PG */ |
| 351 | PINMUX_GPIO(GPIO_PG7, PG7_DATA), |
| 352 | PINMUX_GPIO(GPIO_PG6, PG6_DATA), |
| 353 | PINMUX_GPIO(GPIO_PG5, PG5_DATA), |
| 354 | PINMUX_GPIO(GPIO_PG4, PG4_DATA), |
| 355 | PINMUX_GPIO(GPIO_PG3, PG3_DATA), |
| 356 | PINMUX_GPIO(GPIO_PG2, PG2_DATA), |
| 357 | PINMUX_GPIO(GPIO_PG1, PG1_DATA), |
| 358 | PINMUX_GPIO(GPIO_PG0, PG0_DATA), |
| 359 | |
| 360 | /* PH */ |
| 361 | PINMUX_GPIO(GPIO_PH5, PH5_DATA), |
| 362 | PINMUX_GPIO(GPIO_PH4, PH4_DATA), |
| 363 | PINMUX_GPIO(GPIO_PH3, PH3_DATA), |
| 364 | PINMUX_GPIO(GPIO_PH2, PH2_DATA), |
| 365 | PINMUX_GPIO(GPIO_PH1, PH1_DATA), |
| 366 | PINMUX_GPIO(GPIO_PH0, PH0_DATA), |
Laurent Pinchart | a373ed0 | 2012-11-29 13:24:07 +0100 | [diff] [blame] | 367 | }; |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 368 | |
Laurent Pinchart | a373ed0 | 2012-11-29 13:24:07 +0100 | [diff] [blame] | 369 | #define PINMUX_FN_BASE ARRAY_SIZE(shx3_pinmux_pins) |
| 370 | |
Laurent Pinchart | cd3c1be | 2013-02-16 18:47:05 +0100 | [diff] [blame] | 371 | static const struct pinmux_func shx3_pinmux_func_gpios[] = { |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 372 | /* FN */ |
Laurent Pinchart | 35ad427 | 2012-11-28 22:05:49 +0100 | [diff] [blame] | 373 | GPIO_FN(D31), |
| 374 | GPIO_FN(D30), |
| 375 | GPIO_FN(D29), |
| 376 | GPIO_FN(D28), |
| 377 | GPIO_FN(D27), |
| 378 | GPIO_FN(D26), |
| 379 | GPIO_FN(D25), |
| 380 | GPIO_FN(D24), |
| 381 | GPIO_FN(D23), |
| 382 | GPIO_FN(D22), |
| 383 | GPIO_FN(D21), |
| 384 | GPIO_FN(D20), |
| 385 | GPIO_FN(D19), |
| 386 | GPIO_FN(D18), |
| 387 | GPIO_FN(D17), |
| 388 | GPIO_FN(D16), |
| 389 | GPIO_FN(BACK), |
| 390 | GPIO_FN(BREQ), |
| 391 | GPIO_FN(WE3), |
| 392 | GPIO_FN(WE2), |
| 393 | GPIO_FN(CS6), |
| 394 | GPIO_FN(CS5), |
| 395 | GPIO_FN(CS4), |
| 396 | GPIO_FN(CLKOUTENB), |
| 397 | GPIO_FN(DACK3), |
| 398 | GPIO_FN(DACK2), |
| 399 | GPIO_FN(DACK1), |
| 400 | GPIO_FN(DACK0), |
| 401 | GPIO_FN(DREQ3), |
| 402 | GPIO_FN(DREQ2), |
| 403 | GPIO_FN(DREQ1), |
| 404 | GPIO_FN(DREQ0), |
| 405 | GPIO_FN(IRQ3), |
| 406 | GPIO_FN(IRQ2), |
| 407 | GPIO_FN(IRQ1), |
| 408 | GPIO_FN(IRQ0), |
| 409 | GPIO_FN(DRAK3), |
| 410 | GPIO_FN(DRAK2), |
| 411 | GPIO_FN(DRAK1), |
| 412 | GPIO_FN(DRAK0), |
| 413 | GPIO_FN(SCK3), |
| 414 | GPIO_FN(SCK2), |
| 415 | GPIO_FN(SCK1), |
| 416 | GPIO_FN(SCK0), |
| 417 | GPIO_FN(IRL3), |
| 418 | GPIO_FN(IRL2), |
| 419 | GPIO_FN(IRL1), |
| 420 | GPIO_FN(IRL0), |
| 421 | GPIO_FN(TXD3), |
| 422 | GPIO_FN(TXD2), |
| 423 | GPIO_FN(TXD1), |
| 424 | GPIO_FN(TXD0), |
| 425 | GPIO_FN(RXD3), |
| 426 | GPIO_FN(RXD2), |
| 427 | GPIO_FN(RXD1), |
| 428 | GPIO_FN(RXD0), |
| 429 | GPIO_FN(CE2B), |
| 430 | GPIO_FN(CE2A), |
| 431 | GPIO_FN(IOIS16), |
| 432 | GPIO_FN(STATUS1), |
| 433 | GPIO_FN(STATUS0), |
| 434 | GPIO_FN(IRQOUT), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 435 | }; |
| 436 | |
Laurent Pinchart | cd3c1be | 2013-02-16 18:47:05 +0100 | [diff] [blame] | 437 | static const struct pinmux_cfg_reg shx3_pinmux_config_regs[] = { |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 438 | { PINMUX_CFG_REG("PABCR", 0xffc70000, 32, 2) { |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 439 | PA7_FN, PA7_OUT, PA7_IN, 0, |
| 440 | PA6_FN, PA6_OUT, PA6_IN, 0, |
| 441 | PA5_FN, PA5_OUT, PA5_IN, 0, |
| 442 | PA4_FN, PA4_OUT, PA4_IN, 0, |
| 443 | PA3_FN, PA3_OUT, PA3_IN, 0, |
| 444 | PA2_FN, PA2_OUT, PA2_IN, 0, |
| 445 | PA1_FN, PA1_OUT, PA1_IN, 0, |
| 446 | PA0_FN, PA0_OUT, PA0_IN, 0, |
| 447 | PB7_FN, PB7_OUT, PB7_IN, 0, |
| 448 | PB6_FN, PB6_OUT, PB6_IN, 0, |
| 449 | PB5_FN, PB5_OUT, PB5_IN, 0, |
| 450 | PB4_FN, PB4_OUT, PB4_IN, 0, |
| 451 | PB3_FN, PB3_OUT, PB3_IN, 0, |
| 452 | PB2_FN, PB2_OUT, PB2_IN, 0, |
| 453 | PB1_FN, PB1_OUT, PB1_IN, 0, |
| 454 | PB0_FN, PB0_OUT, PB0_IN, 0, }, |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 455 | }, |
| 456 | { PINMUX_CFG_REG("PCDCR", 0xffc70004, 32, 2) { |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 457 | PC7_FN, PC7_OUT, PC7_IN, 0, |
| 458 | PC6_FN, PC6_OUT, PC6_IN, 0, |
| 459 | PC5_FN, PC5_OUT, PC5_IN, 0, |
| 460 | PC4_FN, PC4_OUT, PC4_IN, 0, |
| 461 | PC3_FN, PC3_OUT, PC3_IN, 0, |
| 462 | PC2_FN, PC2_OUT, PC2_IN, 0, |
| 463 | PC1_FN, PC1_OUT, PC1_IN, 0, |
| 464 | PC0_FN, PC0_OUT, PC0_IN, 0, |
| 465 | PD7_FN, PD7_OUT, PD7_IN, 0, |
| 466 | PD6_FN, PD6_OUT, PD6_IN, 0, |
| 467 | PD5_FN, PD5_OUT, PD5_IN, 0, |
| 468 | PD4_FN, PD4_OUT, PD4_IN, 0, |
| 469 | PD3_FN, PD3_OUT, PD3_IN, 0, |
| 470 | PD2_FN, PD2_OUT, PD2_IN, 0, |
| 471 | PD1_FN, PD1_OUT, PD1_IN, 0, |
| 472 | PD0_FN, PD0_OUT, PD0_IN, 0, }, |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 473 | }, |
| 474 | { PINMUX_CFG_REG("PEFCR", 0xffc70008, 32, 2) { |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 475 | PE7_FN, PE7_OUT, PE7_IN, 0, |
| 476 | PE6_FN, PE6_OUT, PE6_IN, 0, |
| 477 | PE5_FN, PE5_OUT, PE5_IN, 0, |
| 478 | PE4_FN, PE4_OUT, PE4_IN, 0, |
| 479 | PE3_FN, PE3_OUT, PE3_IN, 0, |
| 480 | PE2_FN, PE2_OUT, PE2_IN, 0, |
| 481 | PE1_FN, PE1_OUT, PE1_IN, 0, |
| 482 | PE0_FN, PE0_OUT, PE0_IN, 0, |
| 483 | PF7_FN, PF7_OUT, PF7_IN, 0, |
| 484 | PF6_FN, PF6_OUT, PF6_IN, 0, |
| 485 | PF5_FN, PF5_OUT, PF5_IN, 0, |
| 486 | PF4_FN, PF4_OUT, PF4_IN, 0, |
| 487 | PF3_FN, PF3_OUT, PF3_IN, 0, |
| 488 | PF2_FN, PF2_OUT, PF2_IN, 0, |
| 489 | PF1_FN, PF1_OUT, PF1_IN, 0, |
| 490 | PF0_FN, PF0_OUT, PF0_IN, 0, }, |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 491 | }, |
| 492 | { PINMUX_CFG_REG("PGHCR", 0xffc7000c, 32, 2) { |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 493 | PG7_FN, PG7_OUT, PG7_IN, 0, |
| 494 | PG6_FN, PG6_OUT, PG6_IN, 0, |
| 495 | PG5_FN, PG5_OUT, PG5_IN, 0, |
| 496 | PG4_FN, PG4_OUT, PG4_IN, 0, |
| 497 | PG3_FN, PG3_OUT, PG3_IN, 0, |
| 498 | PG2_FN, PG2_OUT, PG2_IN, 0, |
| 499 | PG1_FN, PG1_OUT, PG1_IN, 0, |
| 500 | PG0_FN, PG0_OUT, PG0_IN, 0, |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 501 | 0, 0, 0, 0, |
| 502 | 0, 0, 0, 0, |
Laurent Pinchart | 4e5ca4a | 2013-07-16 01:54:13 +0200 | [diff] [blame^] | 503 | PH5_FN, PH5_OUT, PH5_IN, 0, |
| 504 | PH4_FN, PH4_OUT, PH4_IN, 0, |
| 505 | PH3_FN, PH3_OUT, PH3_IN, 0, |
| 506 | PH2_FN, PH2_OUT, PH2_IN, 0, |
| 507 | PH1_FN, PH1_OUT, PH1_IN, 0, |
| 508 | PH0_FN, PH0_OUT, PH0_IN, 0, }, |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 509 | }, |
| 510 | { }, |
| 511 | }; |
| 512 | |
Laurent Pinchart | cd3c1be | 2013-02-16 18:47:05 +0100 | [diff] [blame] | 513 | static const struct pinmux_data_reg shx3_pinmux_data_regs[] = { |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 514 | { PINMUX_DATA_REG("PABDR", 0xffc70010, 32) { |
| 515 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 516 | PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA, |
| 517 | PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA, |
| 518 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 519 | PB7_DATA, PB6_DATA, PB5_DATA, PB4_DATA, |
| 520 | PB3_DATA, PB2_DATA, PB1_DATA, PB0_DATA, }, |
| 521 | }, |
| 522 | { PINMUX_DATA_REG("PCDDR", 0xffc70014, 32) { |
| 523 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 524 | PC7_DATA, PC6_DATA, PC5_DATA, PC4_DATA, |
| 525 | PC3_DATA, PC2_DATA, PC1_DATA, PC0_DATA, |
| 526 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 527 | PD7_DATA, PD6_DATA, PD5_DATA, PD4_DATA, |
| 528 | PD3_DATA, PD2_DATA, PD1_DATA, PD0_DATA, }, |
| 529 | }, |
| 530 | { PINMUX_DATA_REG("PEFDR", 0xffc70018, 32) { |
| 531 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 532 | PE7_DATA, PE6_DATA, PE5_DATA, PE4_DATA, |
| 533 | PE3_DATA, PE2_DATA, PE1_DATA, PE0_DATA, |
| 534 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 535 | PF7_DATA, PF6_DATA, PF5_DATA, PF4_DATA, |
| 536 | PF3_DATA, PF2_DATA, PF1_DATA, PF0_DATA, }, |
| 537 | }, |
| 538 | { PINMUX_DATA_REG("PGHDR", 0xffc7001c, 32) { |
| 539 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 540 | PG7_DATA, PG6_DATA, PG5_DATA, PG4_DATA, |
| 541 | PG3_DATA, PG2_DATA, PG1_DATA, PG0_DATA, |
| 542 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 543 | 0, 0, PH5_DATA, PH4_DATA, |
| 544 | PH3_DATA, PH2_DATA, PH1_DATA, PH0_DATA, }, |
| 545 | }, |
| 546 | { }, |
| 547 | }; |
| 548 | |
Laurent Pinchart | cd3c1be | 2013-02-16 18:47:05 +0100 | [diff] [blame] | 549 | const struct sh_pfc_soc_info shx3_pinmux_info = { |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 550 | .name = "shx3_pfc", |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 551 | .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 552 | .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END }, |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 553 | .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, |
Laurent Pinchart | a373ed0 | 2012-11-29 13:24:07 +0100 | [diff] [blame] | 554 | .pins = shx3_pinmux_pins, |
| 555 | .nr_pins = ARRAY_SIZE(shx3_pinmux_pins), |
| 556 | .func_gpios = shx3_pinmux_func_gpios, |
| 557 | .nr_func_gpios = ARRAY_SIZE(shx3_pinmux_func_gpios), |
Laurent Pinchart | d5d9a81 | 2012-12-15 23:51:40 +0100 | [diff] [blame] | 558 | .gpio_data = shx3_pinmux_data, |
| 559 | .gpio_data_size = ARRAY_SIZE(shx3_pinmux_data), |
| 560 | .cfg_regs = shx3_pinmux_config_regs, |
| 561 | .data_regs = shx3_pinmux_data_regs, |
| 562 | }; |