Jorge Ramirez-Ortiz | 47503d2 | 2018-09-23 09:36:52 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #define BOARDNUM 16 |
| 8 | #define BOARD_JUDGE_AUTO |
| 9 | |
| 10 | static uint32_t _board_judge(void); |
| 11 | |
| 12 | static uint32_t boardcnf_get_brd_type(void) |
| 13 | { |
| 14 | return _board_judge(); |
| 15 | } |
| 16 | |
| 17 | struct _boardcnf_ch { |
| 18 | uint8_t ddr_density[CS_CNT]; |
| 19 | uint32_t ca_swap; |
| 20 | uint16_t dqs_swap; |
| 21 | uint32_t dq_swap[SLICE_CNT]; |
| 22 | uint8_t dm_swap[SLICE_CNT]; |
| 23 | uint16_t wdqlvl_patt[16]; |
| 24 | int8_t cacs_adj[10]; |
| 25 | int8_t dm_adj_w[SLICE_CNT]; |
| 26 | int8_t dq_adj_w[SLICE_CNT * 8]; |
| 27 | int8_t dm_adj_r[SLICE_CNT]; |
| 28 | int8_t dq_adj_r[SLICE_CNT * 8]; |
| 29 | }; |
| 30 | |
| 31 | struct _boardcnf { |
| 32 | uint8_t phyvalid; |
| 33 | uint8_t dbi_en; |
| 34 | uint16_t cacs_dly; |
| 35 | int16_t cacs_dly_adj; |
| 36 | uint16_t dqdm_dly_w; |
| 37 | uint16_t dqdm_dly_r; |
| 38 | struct _boardcnf_ch ch[DRAM_CH_CNT]; |
| 39 | }; |
| 40 | |
| 41 | #define WDQLVL_PAT {\ |
| 42 | 0x00AA,\ |
| 43 | 0x0055,\ |
| 44 | 0x00AA,\ |
| 45 | 0x0155,\ |
| 46 | 0x01CC,\ |
| 47 | 0x0133,\ |
| 48 | 0x00CC,\ |
| 49 | 0x0033,\ |
| 50 | 0x00F0,\ |
| 51 | 0x010F,\ |
| 52 | 0x01F0,\ |
| 53 | 0x010F,\ |
| 54 | 0x00F0,\ |
| 55 | 0x00F0,\ |
| 56 | 0x000F,\ |
| 57 | 0x010F} |
| 58 | |
| 59 | static const struct _boardcnf boardcnfs[BOARDNUM] = { |
| 60 | { |
| 61 | /* boardcnf[0] RENESAS SALVATOR-X board with M3-W/SIP */ |
| 62 | .phyvalid = 0x03, |
| 63 | .dbi_en = 0x01, |
| 64 | .cacs_dly = 0x02c0, |
| 65 | .cacs_dly_adj = 0, |
| 66 | .dqdm_dly_w = 0x0300, |
| 67 | .dqdm_dly_r = 0x00a0, |
| 68 | .ch = { |
| 69 | { |
| 70 | {0x02, 0x02}, |
| 71 | 0x00543210U, |
| 72 | 0x3201U, |
| 73 | {0x70612543, 0x43251670, 0x45326170, 0x10672534}, |
| 74 | {0x08, 0x08, 0x08, 0x08}, |
| 75 | WDQLVL_PAT, |
| 76 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 77 | 0, 0}, |
| 78 | {0, 0, 0, 0}, |
| 79 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 80 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 81 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 82 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 83 | {0, 0, 0, 0}, |
| 84 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 85 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 86 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 87 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 88 | }, |
| 89 | |
| 90 | { |
| 91 | {0x02, 0x02}, |
| 92 | 0x00543210, |
| 93 | 0x2310, |
| 94 | {0x01327654, 0x34526107, 0x35421670, 0x70615324}, |
| 95 | {0x08, 0x08, 0x08, 0x08}, |
| 96 | WDQLVL_PAT, |
| 97 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 98 | 0, 0}, |
| 99 | {0, 0, 0, 0}, |
| 100 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 101 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 102 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 103 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 104 | {0, 0, 0, 0}, |
| 105 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 106 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 107 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 108 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 109 | } |
| 110 | } |
| 111 | }, |
| 112 | /* boardcnf[1] RENESAS KRIEK board with M3-W/SoC */ |
| 113 | { |
| 114 | 0x03, |
| 115 | 0x01, |
| 116 | 0x2c0, |
| 117 | 0, |
| 118 | 0x300, |
| 119 | 0x0a0, |
| 120 | { |
| 121 | { |
| 122 | {0x02, 0x02}, |
| 123 | 0x00345201, |
| 124 | 0x3201, |
| 125 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 126 | {0x08, 0x08, 0x08, 0x08}, |
| 127 | WDQLVL_PAT, |
| 128 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 129 | 0, 0}, |
| 130 | {0, 0, 0, 0}, |
| 131 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 132 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 133 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 134 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 135 | {0, 0, 0, 0}, |
| 136 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 137 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 138 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 139 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 140 | }, |
| 141 | { |
| 142 | {0x02, 0x02}, |
| 143 | 0x00302154, |
| 144 | 0x2310, |
| 145 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 146 | {0x08, 0x08, 0x08, 0x08}, |
| 147 | WDQLVL_PAT, |
| 148 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 149 | 0, 0}, |
| 150 | {0, 0, 0, 0}, |
| 151 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 152 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 153 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 154 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 155 | {0, 0, 0, 0}, |
| 156 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 157 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 158 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 159 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 160 | } |
| 161 | } |
| 162 | }, |
| 163 | /* boardcnf[2] RENESAS SALVATOR-X board with H3 Ver.1.x/SIP(8Gbit 1rank) */ |
| 164 | { |
| 165 | 0x0f, |
| 166 | 0x00, |
| 167 | 0x300, |
| 168 | -320, |
| 169 | 0x300, |
| 170 | 0x0a0, |
| 171 | { |
| 172 | { |
| 173 | {0x02, 0xff}, |
| 174 | 0x00543210, |
| 175 | 0x3210, |
| 176 | {0x20741365, 0x34256107, 0x57460321, 0x70614532}, |
| 177 | {0x08, 0x08, 0x08, 0x08}, |
| 178 | WDQLVL_PAT, |
| 179 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 180 | 0, 0}, |
| 181 | {0, 0, 0, 0}, |
| 182 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 183 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 184 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 185 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 186 | {0, 0, 0, 0}, |
| 187 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 188 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 189 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 190 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 191 | }, |
| 192 | { |
| 193 | {0x02, 0xff}, |
| 194 | 0x00543210, |
| 195 | 0x3102, |
| 196 | {0x23547610, 0x34526107, 0x67452310, 0x32106754}, |
| 197 | {0x08, 0x08, 0x08, 0x08}, |
| 198 | WDQLVL_PAT, |
| 199 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 200 | 0, 0}, |
| 201 | {0, 0, 0, 0}, |
| 202 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 203 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 204 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 205 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 206 | {0, 0, 0, 0}, |
| 207 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 208 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 209 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 210 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 211 | }, |
| 212 | { |
| 213 | {0x02, 0xff}, |
| 214 | 0x00543210, |
| 215 | 0x0213, |
| 216 | {0x30216754, 0x67453210, 0x70165243, 0x07162345}, |
| 217 | {0x08, 0x08, 0x08, 0x08}, |
| 218 | WDQLVL_PAT, |
| 219 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 220 | 0, 0}, |
| 221 | {0, 0, 0, 0}, |
| 222 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 223 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 224 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 225 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 226 | {0, 0, 0, 0}, |
| 227 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 228 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 229 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 230 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 231 | }, |
| 232 | { |
| 233 | {0x02, 0xff}, |
| 234 | 0x00543210, |
| 235 | 0x0213, |
| 236 | {0x01327654, 0x70615432, 0x54760123, 0x07162345}, |
| 237 | {0x08, 0x08, 0x08, 0x08}, |
| 238 | WDQLVL_PAT, |
| 239 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 240 | 0, 0}, |
| 241 | {0, 0, 0, 0}, |
| 242 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 243 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 244 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 245 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 246 | {0, 0, 0, 0}, |
| 247 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 248 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 249 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 250 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 251 | } |
| 252 | } |
| 253 | }, |
| 254 | /* boardcnf[3] RENESAS Starter Kit board with M3-W/SIP(8Gbit 1rank) */ |
| 255 | { |
| 256 | 0x03, |
| 257 | 0x01, |
| 258 | 0x02c0, |
| 259 | 0, |
| 260 | 0x0300, |
| 261 | 0x00a0, |
| 262 | { |
| 263 | { |
| 264 | {0x02, 0xFF}, |
| 265 | 0x00543210U, |
| 266 | 0x3201, |
| 267 | {0x70612543, 0x43251670, 0x45326170, 0x10672534}, |
| 268 | {0x08, 0x08, 0x08, 0x08}, |
| 269 | WDQLVL_PAT, |
| 270 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 271 | 0, 0}, |
| 272 | {0, 0, 0, 0}, |
| 273 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 274 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 275 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 276 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 277 | {0, 0, 0, 0}, |
| 278 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 279 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 280 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 281 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 282 | }, |
| 283 | { |
| 284 | {0x02, 0xFF}, |
| 285 | 0x00543210, |
| 286 | 0x2310, |
| 287 | {0x01327654, 0x34526107, 0x35421670, 0x70615324}, |
| 288 | {0x08, 0x08, 0x08, 0x08}, |
| 289 | WDQLVL_PAT, |
| 290 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 291 | 0, 0}, |
| 292 | {0, 0, 0, 0}, |
| 293 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 294 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 295 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 296 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 297 | {0, 0, 0, 0}, |
| 298 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 299 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 300 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 301 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 302 | } |
| 303 | } |
| 304 | }, |
| 305 | /* boardcnf[4] RENESAS SALVATOR-M(1rank) board with H3 Ver.1.x/SoC */ |
| 306 | { |
| 307 | 0x0f, |
| 308 | 0x00, |
| 309 | 0x2c0, |
| 310 | -320, |
| 311 | 0x300, |
| 312 | 0x0a0, |
| 313 | { |
| 314 | { |
| 315 | {0x02, 0xff}, |
| 316 | 0x00315024, |
| 317 | 0x3120, |
| 318 | {0x30671254, 0x26541037, 0x17054623, 0x12307645}, |
| 319 | {0x08, 0x08, 0x08, 0x08}, |
| 320 | WDQLVL_PAT, |
| 321 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 322 | 0, 0}, |
| 323 | {0, 0, 0, 0}, |
| 324 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 325 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 326 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 327 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 328 | {0, 0, 0, 0}, |
| 329 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 330 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 331 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 332 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 333 | }, |
| 334 | { |
| 335 | {0x02, 0xff}, |
| 336 | 0x00025143, |
| 337 | 0x3210, |
| 338 | {0x70613542, 0x16245307, 0x30712645, 0x21706354}, |
| 339 | {0x08, 0x08, 0x08, 0x08}, |
| 340 | WDQLVL_PAT, |
| 341 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 342 | 0, 0}, |
| 343 | {0, 0, 0, 0}, |
| 344 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 345 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 346 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 347 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 348 | {0, 0, 0, 0}, |
| 349 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 350 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 351 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 352 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 353 | }, |
| 354 | { |
| 355 | {0x02, 0xff}, |
| 356 | 0x00523104, |
| 357 | 0x2301, |
| 358 | {0x70613542, 0x16245307, 0x30712645, 0x21706354}, |
| 359 | {0x08, 0x08, 0x08, 0x08}, |
| 360 | WDQLVL_PAT, |
| 361 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 362 | 0, 0}, |
| 363 | {0, 0, 0, 0}, |
| 364 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 365 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 366 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 367 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 368 | {0, 0, 0, 0}, |
| 369 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 370 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 371 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 372 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 373 | }, |
| 374 | { |
| 375 | {0x02, 0xff}, |
| 376 | 0x00153402, |
| 377 | 0x2031, |
| 378 | {0x30671254, 0x26541037, 0x17054623, 0x12307645}, |
| 379 | {0x08, 0x08, 0x08, 0x08}, |
| 380 | WDQLVL_PAT, |
| 381 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 382 | 0, 0}, |
| 383 | {0, 0, 0, 0}, |
| 384 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 385 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 386 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 387 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 388 | {0, 0, 0, 0}, |
| 389 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 390 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 391 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 392 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 393 | } |
| 394 | } |
| 395 | }, |
| 396 | /* boardcnf[5] RENESAS KRIEK-1rank board with M3-W/SoC */ |
| 397 | { |
| 398 | 0x03, |
| 399 | 0x01, |
| 400 | 0x2c0, |
| 401 | 0, |
| 402 | 0x300, |
| 403 | 0x0a0, |
| 404 | { |
| 405 | { |
| 406 | {0x02, 0xff}, |
| 407 | 0x00345201, |
| 408 | 0x3201, |
| 409 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 410 | {0x08, 0x08, 0x08, 0x08}, |
| 411 | WDQLVL_PAT, |
| 412 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 413 | 0, 0}, |
| 414 | {0, 0, 0, 0}, |
| 415 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 416 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 417 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 418 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 419 | {0, 0, 0, 0}, |
| 420 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 421 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 422 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 423 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 424 | }, |
| 425 | { |
| 426 | {0x02, 0xff}, |
| 427 | 0x00302154, |
| 428 | 0x2310, |
| 429 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 430 | {0x08, 0x08, 0x08, 0x08}, |
| 431 | WDQLVL_PAT, |
| 432 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 433 | 0, 0}, |
| 434 | {0, 0, 0, 0}, |
| 435 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 436 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 437 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 438 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 439 | {0, 0, 0, 0}, |
| 440 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 441 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 442 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 443 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 444 | } |
| 445 | } |
| 446 | }, |
| 447 | /* boardcnf[6] RENESAS SALVATOR-X board with H3 Ver.1.x/SIP(8Gbit 2rank) */ |
| 448 | { |
| 449 | 0x0f, |
| 450 | 0x00, |
| 451 | 0x300, |
| 452 | -320, |
| 453 | 0x300, |
| 454 | 0x0a0, |
| 455 | { |
| 456 | { |
| 457 | {0x02, 0x02}, |
| 458 | 0x00543210, |
| 459 | 0x3210, |
| 460 | {0x20741365, 0x34256107, 0x57460321, 0x70614532}, |
| 461 | {0x08, 0x08, 0x08, 0x08}, |
| 462 | WDQLVL_PAT, |
| 463 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 464 | 0, 0}, |
| 465 | {0, 0, 0, 0}, |
| 466 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 467 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 468 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 469 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 470 | {0, 0, 0, 0}, |
| 471 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 472 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 473 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 474 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 475 | }, |
| 476 | { |
| 477 | {0x02, 0x02}, |
| 478 | 0x00543210, |
| 479 | 0x3102, |
| 480 | {0x23547610, 0x34526107, 0x67452310, 0x32106754}, |
| 481 | {0x08, 0x08, 0x08, 0x08}, |
| 482 | WDQLVL_PAT, |
| 483 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 484 | 0, 0}, |
| 485 | {0, 0, 0, 0}, |
| 486 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 487 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 488 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 489 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 490 | {0, 0, 0, 0}, |
| 491 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 492 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 493 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 494 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 495 | }, |
| 496 | { |
| 497 | {0x02, 0x02}, |
| 498 | 0x00543210, |
| 499 | 0x0213, |
| 500 | {0x30216754, 0x67453210, 0x70165243, 0x07162345}, |
| 501 | {0x08, 0x08, 0x08, 0x08}, |
| 502 | WDQLVL_PAT, |
| 503 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 504 | 0, 0}, |
| 505 | {0, 0, 0, 0}, |
| 506 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 507 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 508 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 509 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 510 | {0, 0, 0, 0}, |
| 511 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 512 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 513 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 514 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 515 | }, |
| 516 | { |
| 517 | {0x02, 0x02}, |
| 518 | 0x00543210, |
| 519 | 0x0213, |
| 520 | {0x01327654, 0x70615432, 0x54760123, 0x07162345}, |
| 521 | {0x08, 0x08, 0x08, 0x08}, |
| 522 | WDQLVL_PAT, |
| 523 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 524 | 0, 0}, |
| 525 | {0, 0, 0, 0}, |
| 526 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 527 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 528 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 529 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 530 | {0, 0, 0, 0}, |
| 531 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 532 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 533 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 534 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 535 | } |
| 536 | } |
| 537 | }, |
| 538 | /* boardcnf[7] RENESAS SALVATOR-X board with H3 Ver.2.0 or later/SIP(8Gbit 1rank) */ |
| 539 | { |
| 540 | 0x0f, |
| 541 | 0x01, |
| 542 | 0x300, |
| 543 | 0, |
| 544 | 0x300, |
| 545 | 0x0a0, |
| 546 | { |
| 547 | { |
| 548 | {0x02, 0xff}, |
| 549 | 0x00543210, |
| 550 | 0x2310, |
| 551 | {0x70631425, 0x34527016, 0x43527610, 0x32104567}, |
| 552 | {0x08, 0x08, 0x08, 0x08}, |
| 553 | WDQLVL_PAT, |
| 554 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 555 | 0, 0}, |
| 556 | {0, 0, 0, 0}, |
| 557 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 558 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 559 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 560 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 561 | {0, 0, 0, 0}, |
| 562 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 563 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 564 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 565 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 566 | }, |
| 567 | { |
| 568 | {0x02, 0xff}, |
| 569 | 0x00105432, |
| 570 | 0x3210, |
| 571 | {0x43256107, 0x07162354, 0x10234567, 0x01235467}, |
| 572 | {0x08, 0x08, 0x08, 0x08}, |
| 573 | WDQLVL_PAT, |
| 574 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 575 | 0, 0}, |
| 576 | {0, 0, 0, 0}, |
| 577 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 578 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 579 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 580 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 581 | {0, 0, 0, 0}, |
| 582 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 583 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 584 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 585 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 586 | }, |
| 587 | { |
| 588 | {0x02, 0xff}, |
| 589 | 0x00543210, |
| 590 | 0x2301, |
| 591 | {0x01327654, 0x02316457, 0x10234567, 0x01325467}, |
| 592 | {0x08, 0x08, 0x08, 0x08}, |
| 593 | WDQLVL_PAT, |
| 594 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 595 | 0, 0}, |
| 596 | {0, 0, 0, 0}, |
| 597 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 598 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 599 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 600 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 601 | {0, 0, 0, 0}, |
| 602 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 603 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 604 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 605 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 606 | }, |
| 607 | { |
| 608 | {0x02, 0xff}, |
| 609 | 0x00543210, |
| 610 | 0x2301, |
| 611 | {0x12034765, 0x23105467, 0x23017645, 0x32106745}, |
| 612 | {0x08, 0x08, 0x08, 0x08}, |
| 613 | WDQLVL_PAT, |
| 614 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 615 | 0, 0}, |
| 616 | {0, 0, 0, 0}, |
| 617 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 618 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 619 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 620 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 621 | {0, 0, 0, 0}, |
| 622 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 623 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 624 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 625 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 626 | } |
| 627 | } |
| 628 | }, |
| 629 | /* boardcnf[8] RENESAS SALVATOR-X board with H3 Ver.2.0 or later/SIP(8Gbit 2rank) */ |
| 630 | { |
| 631 | #if RCAR_DRAM_CHANNEL == 5 |
| 632 | 0x05, |
| 633 | #else |
| 634 | 0x0f, |
| 635 | #endif |
| 636 | 0x01, |
| 637 | 0x300, |
| 638 | 0, |
| 639 | 0x300, |
| 640 | 0x0a0, |
| 641 | { |
| 642 | { |
| 643 | {0x02, 0x02}, |
| 644 | 0x00543210, |
| 645 | 0x2310, |
| 646 | {0x70631425, 0x34527016, 0x43527610, 0x32104567}, |
| 647 | {0x08, 0x08, 0x08, 0x08}, |
| 648 | WDQLVL_PAT, |
| 649 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 650 | 0, 0}, |
| 651 | {0, 0, 0, 0}, |
| 652 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 653 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 654 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 655 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 656 | {0, 0, 0, 0}, |
| 657 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 658 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 659 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 660 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 661 | }, |
| 662 | #if ((RCAR_DRAM_CHANNEL == 5) && (RCAR_DRAM_SPLIT == 2)) |
| 663 | { |
| 664 | {0x02, 0x02}, |
| 665 | 0x00543210, |
| 666 | 0x2301, |
| 667 | {0x01327654, 0x02316457, 0x10234567, 0x01325467}, |
| 668 | {0x08, 0x08, 0x08, 0x08}, |
| 669 | WDQLVL_PAT, |
| 670 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 671 | 0, 0}, |
| 672 | {0, 0, 0, 0}, |
| 673 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 674 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 675 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 676 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 677 | {0, 0, 0, 0}, |
| 678 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 679 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 680 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 681 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 682 | }, |
| 683 | #else |
| 684 | { |
| 685 | {0x02, 0x02}, |
| 686 | 0x00105432, |
| 687 | 0x3210, |
| 688 | {0x43256107, 0x07162354, 0x10234567, 0x01235467}, |
| 689 | {0x08, 0x08, 0x08, 0x08}, |
| 690 | WDQLVL_PAT, |
| 691 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 692 | 0, 0}, |
| 693 | {0, 0, 0, 0}, |
| 694 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 695 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 696 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 697 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 698 | {0, 0, 0, 0}, |
| 699 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 700 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 701 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 702 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 703 | }, |
| 704 | #endif |
| 705 | { |
| 706 | {0x02, 0x02}, |
| 707 | 0x00543210, |
| 708 | 0x2301, |
| 709 | {0x01327654, 0x02316457, 0x10234567, 0x01325467}, |
| 710 | {0x08, 0x08, 0x08, 0x08}, |
| 711 | WDQLVL_PAT, |
| 712 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 713 | 0, 0}, |
| 714 | {0, 0, 0, 0}, |
| 715 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 716 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 717 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 718 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 719 | {0, 0, 0, 0}, |
| 720 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 721 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 722 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 723 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 724 | }, |
| 725 | { |
| 726 | {0x02, 0x02}, |
| 727 | 0x00543210, |
| 728 | 0x2301, |
| 729 | {0x12034765, 0x23105467, 0x23017645, 0x32106745}, |
| 730 | {0x08, 0x08, 0x08, 0x08}, |
| 731 | WDQLVL_PAT, |
| 732 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 733 | 0, 0}, |
| 734 | {0, 0, 0, 0}, |
| 735 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 736 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 737 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 738 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 739 | {0, 0, 0, 0}, |
| 740 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 741 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 742 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 743 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 744 | } |
| 745 | } |
| 746 | }, |
| 747 | /* boardcnf[9] RENESAS SALVATOR-MS(1rank) board with H3 Ver.2.0 or later/SoC */ |
| 748 | { |
| 749 | 0x0f, |
| 750 | 0x01, |
| 751 | 0x300, |
| 752 | 0, |
| 753 | 0x300, |
| 754 | 0x0a0, |
| 755 | { |
| 756 | { |
| 757 | {0x02, 0xff}, |
| 758 | 0x00543210, |
| 759 | 0x3210, |
| 760 | {0x27645310, 0x75346210, 0x53467210, 0x23674510}, |
| 761 | {0x08, 0x08, 0x08, 0x08}, |
| 762 | WDQLVL_PAT, |
| 763 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 764 | 0, 0}, |
| 765 | {0, 0, 0, 0}, |
| 766 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 767 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 768 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 769 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 770 | {0, 0, 0, 0}, |
| 771 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 772 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 773 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 774 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 775 | }, |
| 776 | { |
| 777 | {0x02, 0xff}, |
| 778 | 0x00543210, |
| 779 | 0x2301, |
| 780 | {0x23764510, 0x43257610, 0x43752610, 0x37652401}, |
| 781 | {0x08, 0x08, 0x08, 0x08}, |
| 782 | WDQLVL_PAT, |
| 783 | {-128, -128, -128, -128, -128, -128, 0, 0, |
| 784 | 0, 0}, |
| 785 | {0, 0, 0, 0}, |
| 786 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 787 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 788 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 789 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 790 | {0, 0, 0, 0}, |
| 791 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 792 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 793 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 794 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 795 | }, |
| 796 | { |
| 797 | {0x02, 0xff}, |
| 798 | 0x00452103, |
| 799 | 0x3210, |
| 800 | {0x32764510, 0x43257610, 0x43752610, 0x26573401}, |
| 801 | {0x08, 0x08, 0x08, 0x08}, |
| 802 | WDQLVL_PAT, |
| 803 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 804 | 0, 0}, |
| 805 | {0, 0, 0, 0}, |
| 806 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 807 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 808 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 809 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 810 | {0, 0, 0, 0}, |
| 811 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 812 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 813 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 814 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 815 | }, |
| 816 | { |
| 817 | {0x02, 0xff}, |
| 818 | 0x00520413, |
| 819 | 0x2301, |
| 820 | {0x47652301, 0x75346210, 0x53467210, 0x32674501}, |
| 821 | {0x08, 0x08, 0x08, 0x08}, |
| 822 | WDQLVL_PAT, |
| 823 | {30, 30, 30, 30, 30, 30, 30, 30, |
| 824 | 30, 30}, |
| 825 | {0, 0, 0, 0}, |
| 826 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 827 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 828 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 829 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 830 | {0, 0, 0, 0}, |
| 831 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 832 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 833 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 834 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 835 | } |
| 836 | } |
| 837 | }, |
| 838 | /* boardcnf[10] RENESAS Kriek(2rank) board with M3-N/SoC */ |
| 839 | { |
| 840 | 0x01, |
| 841 | 0x01, |
| 842 | 0x300, |
| 843 | 0, |
| 844 | 0x300, |
| 845 | 0x0a0, |
| 846 | { |
| 847 | { |
| 848 | {0x02, 0x02}, |
| 849 | 0x00345201, |
| 850 | 0x3201, |
| 851 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 852 | {0x08, 0x08, 0x08, 0x08}, |
| 853 | WDQLVL_PAT, |
| 854 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 855 | 0, 0}, |
| 856 | {0, 0, 0, 0}, |
| 857 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 858 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 859 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 860 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 861 | {0, 0, 0, 0}, |
| 862 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 863 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 864 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 865 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 866 | } |
| 867 | } |
| 868 | }, |
| 869 | /* boardcnf[11] RENESAS SALVATOR-X board with M3-N/SIP(8Gbit 2rank) */ |
| 870 | { |
| 871 | 0x01, |
| 872 | 0x01, |
| 873 | 0x300, |
| 874 | 0, |
| 875 | 0x300, |
| 876 | 0x0a0, |
| 877 | { |
| 878 | { |
| 879 | {0x02, 0x02}, |
| 880 | 0x00342501, |
| 881 | 0x3201, |
| 882 | {0x10672534, 0x43257106, 0x34527601, 0x71605243}, |
| 883 | {0x08, 0x08, 0x08, 0x08}, |
| 884 | WDQLVL_PAT, |
| 885 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 886 | 0, 0}, |
| 887 | {0, 0, 0, 0}, |
| 888 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 889 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 890 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 891 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 892 | {0, 0, 0, 0}, |
| 893 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 894 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 895 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 896 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 897 | } |
| 898 | } |
| 899 | }, |
| 900 | /* boardcnf[12] RENESAS CONDOR board with V3H/SoC */ |
| 901 | { |
| 902 | 0x01, |
| 903 | 0x1, |
| 904 | 0x300, |
| 905 | 0, |
| 906 | 0x300, |
| 907 | 0x0a0, |
| 908 | { |
| 909 | { |
| 910 | {0x02, 0x02}, |
| 911 | 0x00501342, |
| 912 | 0x3201, |
| 913 | {0x70562134, 0x34526071, 0x23147506, 0x12430567}, |
| 914 | {0x08, 0x08, 0x08, 0x08}, |
| 915 | WDQLVL_PAT, |
| 916 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 917 | 0, 0}, |
| 918 | {0, 0, 0, 0}, |
| 919 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 920 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 921 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 922 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 923 | {0, 0, 0, 0}, |
| 924 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 925 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 926 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 927 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 928 | } |
| 929 | } |
| 930 | }, |
| 931 | /* boardcnf[13] RENESAS KRIEK board with PM3/SoC */ |
| 932 | { |
| 933 | 0x05, |
| 934 | 0x00, |
| 935 | 0x2c0, |
| 936 | -320, |
| 937 | 0x300, |
| 938 | 0x0a0, |
| 939 | { |
| 940 | { |
| 941 | {0x02, 0x02}, |
| 942 | 0x00345201, |
| 943 | 0x3201, |
| 944 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 945 | {0x08, 0x08, 0x08, 0x08}, |
| 946 | WDQLVL_PAT, |
| 947 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 948 | 0, 0}, |
| 949 | {0, 0, 0, 0}, |
| 950 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 951 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 952 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 953 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 954 | {0, 0, 0, 0}, |
| 955 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 956 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 957 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 958 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 959 | }, |
| 960 | { |
| 961 | {0x02, 0x02}, |
| 962 | 0x00302154, |
| 963 | 0x2310, |
| 964 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 965 | {0x08, 0x08, 0x08, 0x08}, |
| 966 | WDQLVL_PAT, |
| 967 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 968 | 0, 0}, |
| 969 | {0, 0, 0, 0}, |
| 970 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 971 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 972 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 973 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 974 | {0, 0, 0, 0}, |
| 975 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 976 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 977 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 978 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 979 | }, |
| 980 | { |
| 981 | {0x02, 0x02}, |
| 982 | 0x00302154, |
| 983 | 0x2310, |
| 984 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 985 | {0x08, 0x08, 0x08, 0x08}, |
| 986 | WDQLVL_PAT, |
| 987 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 988 | 0, 0}, |
| 989 | {0, 0, 0, 0}, |
| 990 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 991 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 992 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 993 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 994 | {0, 0, 0, 0}, |
| 995 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 996 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 997 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 998 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 999 | }, |
| 1000 | { |
| 1001 | {0xff, 0xff}, |
| 1002 | 0, |
| 1003 | 0, |
| 1004 | {0, 0, 0, 0}, |
| 1005 | {0, 0, 0, 0}, |
| 1006 | WDQLVL_PAT, |
| 1007 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1008 | 0, 0}, |
| 1009 | {0, 0, 0, 0}, |
| 1010 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1011 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1012 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1013 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1014 | {0, 0, 0, 0}, |
| 1015 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1016 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1017 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1018 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1019 | } |
| 1020 | } |
| 1021 | }, |
| 1022 | /* boardcnf[14] SALVATOR-X board with H3 Ver.2.0 or later/SIP(16Gbit 1rank) */ |
| 1023 | { |
| 1024 | #if RCAR_DRAM_CHANNEL == 5 |
| 1025 | 0x05, |
| 1026 | #else |
| 1027 | 0x0f, |
| 1028 | #endif |
| 1029 | 0x01, |
| 1030 | 0x300, |
| 1031 | 0, |
| 1032 | 0x300, |
| 1033 | 0x0a0, |
| 1034 | { |
| 1035 | { |
| 1036 | {0x04, 0xff}, |
| 1037 | 0x00543210, |
| 1038 | 0x2310, |
| 1039 | {0x70631425, 0x34527016, 0x43527610, 0x32104567}, |
| 1040 | {0x08, 0x08, 0x08, 0x08}, |
| 1041 | WDQLVL_PAT, |
| 1042 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1043 | 0, 0}, |
| 1044 | {0, 0, 0, 0}, |
| 1045 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1046 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1047 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1048 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1049 | {0, 0, 0, 0}, |
| 1050 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1051 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1052 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1053 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1054 | }, |
| 1055 | #if ((RCAR_DRAM_CHANNEL == 5) && (RCAR_DRAM_SPLIT == 2)) |
| 1056 | { |
| 1057 | {0x04, 0xff}, |
| 1058 | 0x00543210, |
| 1059 | 0x2301, |
| 1060 | {0x01327654, 0x02316457, 0x10234567, 0x01325467}, |
| 1061 | {0x08, 0x08, 0x08, 0x08}, |
| 1062 | WDQLVL_PAT, |
| 1063 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1064 | 0, 0}, |
| 1065 | {0, 0, 0, 0}, |
| 1066 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1067 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1068 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1069 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1070 | {0, 0, 0, 0}, |
| 1071 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1072 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1073 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1074 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1075 | }, |
| 1076 | #else |
| 1077 | { |
| 1078 | {0x04, 0xff}, |
| 1079 | 0x00105432, |
| 1080 | 0x3210, |
| 1081 | {0x43256107, 0x07162354, 0x10234567, 0x01235467}, |
| 1082 | {0x08, 0x08, 0x08, 0x08}, |
| 1083 | WDQLVL_PAT, |
| 1084 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1085 | 0, 0}, |
| 1086 | {0, 0, 0, 0}, |
| 1087 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1088 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1089 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1090 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1091 | {0, 0, 0, 0}, |
| 1092 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1093 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1094 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1095 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1096 | }, |
| 1097 | #endif |
| 1098 | { |
| 1099 | {0x04, 0xff}, |
| 1100 | 0x00543210, |
| 1101 | 0x2301, |
| 1102 | {0x01327654, 0x02316457, 0x10234567, 0x01325467}, |
| 1103 | {0x08, 0x08, 0x08, 0x08}, |
| 1104 | WDQLVL_PAT, |
| 1105 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1106 | 0, 0}, |
| 1107 | {0, 0, 0, 0}, |
| 1108 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1109 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1110 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1111 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1112 | {0, 0, 0, 0}, |
| 1113 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1114 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1115 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1116 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1117 | }, |
| 1118 | { |
| 1119 | {0x04, 0xff}, |
| 1120 | 0x00543210, |
| 1121 | 0x2301, |
| 1122 | {0x12034765, 0x23105467, 0x23017645, 0x32106745}, |
| 1123 | {0x08, 0x08, 0x08, 0x08}, |
| 1124 | WDQLVL_PAT, |
| 1125 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1126 | 0, 0}, |
| 1127 | {0, 0, 0, 0}, |
| 1128 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1129 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1130 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1131 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1132 | {0, 0, 0, 0}, |
| 1133 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1134 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1135 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1136 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1137 | } |
| 1138 | } |
| 1139 | }, |
| 1140 | /* boardcnf[15] RENESAS KRIEK board with H3N */ |
| 1141 | { |
| 1142 | 0x05, |
| 1143 | 0x01, |
| 1144 | 0x300, |
| 1145 | 0, |
| 1146 | 0x300, |
| 1147 | 0x0a0, |
| 1148 | { |
| 1149 | { |
| 1150 | {0x02, 0x02}, |
| 1151 | 0x00345201, |
| 1152 | 0x3201, |
| 1153 | {0x01672543, 0x45367012, 0x45632107, 0x60715234}, |
| 1154 | {0x08, 0x08, 0x08, 0x08}, |
| 1155 | WDQLVL_PAT, |
| 1156 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1157 | 0, 0}, |
| 1158 | {0, 0, 0, 0}, |
| 1159 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1160 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1161 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1162 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1163 | {0, 0, 0, 0}, |
| 1164 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1165 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1166 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1167 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1168 | }, |
| 1169 | { |
| 1170 | {0x02, 0x02}, |
| 1171 | 0x00302154, |
| 1172 | 0x2310, |
| 1173 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 1174 | {0x08, 0x08, 0x08, 0x08}, |
| 1175 | WDQLVL_PAT, |
| 1176 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1177 | 0, 0}, |
| 1178 | {0, 0, 0, 0}, |
| 1179 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1180 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1181 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1182 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1183 | {0, 0, 0, 0}, |
| 1184 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1185 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1186 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1187 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1188 | }, |
| 1189 | { |
| 1190 | {0x02, 0x02}, |
| 1191 | 0x00302154, |
| 1192 | 0x2310, |
| 1193 | {0x01672543, 0x45361207, 0x45632107, 0x60715234}, |
| 1194 | {0x08, 0x08, 0x08, 0x08}, |
| 1195 | WDQLVL_PAT, |
| 1196 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1197 | 0, 0}, |
| 1198 | {0, 0, 0, 0}, |
| 1199 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1200 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1201 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1202 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1203 | {0, 0, 0, 0}, |
| 1204 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1205 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1206 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1207 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1208 | }, |
| 1209 | { |
| 1210 | {0xff, 0xff}, |
| 1211 | 0, |
| 1212 | 0, |
| 1213 | {0, 0, 0, 0}, |
| 1214 | {0, 0, 0, 0}, |
| 1215 | WDQLVL_PAT, |
| 1216 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1217 | 0, 0}, |
| 1218 | {0, 0, 0, 0}, |
| 1219 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1220 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1221 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1222 | 0, 0, 0, 0, 0, 0, 0, 0}, |
| 1223 | {0, 0, 0, 0}, |
| 1224 | {0, 0, 0, 0, 0, 0, 0, 0, |
| 1225 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1226 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 1227 | 0, 0, 0, 0, 0, 0, 0, 0} |
| 1228 | } |
| 1229 | } |
| 1230 | } |
| 1231 | }; |
| 1232 | |
| 1233 | void boardcnf_get_brd_clk(uint32_t brd, uint32_t * clk, uint32_t * div) |
| 1234 | { |
| 1235 | uint32_t md; |
| 1236 | |
| 1237 | if ((Prr_Product == PRR_PRODUCT_H3) && (Prr_Cut == PRR_PRODUCT_10)) { |
| 1238 | *clk = 50; |
| 1239 | *div = 3; |
| 1240 | } else { |
| 1241 | md = (mmio_read_32(RST_MODEMR) >> 13) & 0x3; |
| 1242 | switch (md) { |
| 1243 | case 0x0: |
| 1244 | *clk = 50; |
| 1245 | *div = 3; |
| 1246 | break; |
| 1247 | case 0x1: |
| 1248 | *clk = 60; |
| 1249 | *div = 3; |
| 1250 | break; |
| 1251 | case 0x2: |
| 1252 | *clk = 75; |
| 1253 | *div = 3; |
| 1254 | break; |
| 1255 | case 0x3: |
| 1256 | *clk = 100; |
| 1257 | *div = 3; |
| 1258 | break; |
| 1259 | } |
| 1260 | } |
| 1261 | } |
| 1262 | |
| 1263 | void boardcnf_get_ddr_mbps(uint32_t brd, uint32_t * mbps, uint32_t * div) |
| 1264 | { |
| 1265 | uint32_t md; |
| 1266 | |
| 1267 | md = (mmio_read_32(RST_MODEMR) >> 17) & 0x5; |
| 1268 | md = (md | (md >> 1)) & 0x3; |
| 1269 | switch (md) { |
| 1270 | case 0x0: |
| 1271 | *mbps = 3200; |
| 1272 | *div = 1; |
| 1273 | break; |
| 1274 | case 0x1: |
| 1275 | *mbps = 2800; |
| 1276 | *div = 1; |
| 1277 | break; |
| 1278 | case 0x2: |
| 1279 | *mbps = 2400; |
| 1280 | *div = 1; |
| 1281 | break; |
| 1282 | case 0x3: |
| 1283 | *mbps = 1600; |
| 1284 | *div = 1; |
| 1285 | break; |
| 1286 | } |
| 1287 | } |
| 1288 | |
| 1289 | #define _def_REFPERIOD 1890 |
| 1290 | |
| 1291 | #define M3_SAMPLE_TT_A84 0xB866CC10, 0x3B250421 |
| 1292 | #define M3_SAMPLE_TT_A85 0xB866CC10, 0x3AA50421 |
| 1293 | #define M3_SAMPLE_TT_A86 0xB866CC10, 0x3AA48421 |
| 1294 | #define M3_SAMPLE_FF_B45 0xB866CC10, 0x3AB00C21 |
| 1295 | #define M3_SAMPLE_FF_B49 0xB866CC10, 0x39B10C21 |
| 1296 | #define M3_SAMPLE_FF_B56 0xB866CC10, 0x3AAF8C21 |
| 1297 | #define M3_SAMPLE_SS_E24 0xB866CC10, 0x3BA39421 |
| 1298 | #define M3_SAMPLE_SS_E28 0xB866CC10, 0x3C231421 |
| 1299 | #define M3_SAMPLE_SS_E32 0xB866CC10, 0x3C241421 |
| 1300 | |
| 1301 | static const uint32_t TermcodeBySample[20][3] = { |
| 1302 | {M3_SAMPLE_TT_A84, 0x000158D5}, |
| 1303 | {M3_SAMPLE_TT_A85, 0x00015955}, |
| 1304 | {M3_SAMPLE_TT_A86, 0x00015955}, |
| 1305 | {M3_SAMPLE_FF_B45, 0x00015690}, |
| 1306 | {M3_SAMPLE_FF_B49, 0x00015753}, |
| 1307 | {M3_SAMPLE_FF_B56, 0x00015793}, |
| 1308 | {M3_SAMPLE_SS_E24, 0x00015996}, |
| 1309 | {M3_SAMPLE_SS_E28, 0x000159D7}, |
| 1310 | {M3_SAMPLE_SS_E32, 0x00015997}, |
| 1311 | {0xFFFFFFFF, 0xFFFFFFFF, 0x0001554F} |
| 1312 | }; |
| 1313 | |
| 1314 | #ifdef BOARD_JUDGE_AUTO |
| 1315 | /* |
| 1316 | * SAMPLE board detect function |
| 1317 | */ |
| 1318 | #define PFC_PMMR 0xE6060000U |
| 1319 | #define PFC_PUEN5 0xE6060414U |
| 1320 | #define PFC_PUEN6 0xE6060418U |
| 1321 | #define PFC_PUD5 0xE6060454U |
| 1322 | #define PFC_PUD6 0xE6060458U |
| 1323 | #define GPIO_INDT5 0xE605500CU |
| 1324 | #define GPIO_INDT6 0xE605540CU |
| 1325 | |
| 1326 | #define BIT25 (1<<25) |
| 1327 | #define BIT22 (1<<22) |
| 1328 | #define BIT15 (1<<15) |
| 1329 | #define BIT0 (1) |
| 1330 | #define GPIO_GPSR6 (0xE6060118U) |
| 1331 | |
| 1332 | #if (RCAR_GEN3_ULCB == 0) |
| 1333 | static void pfc_write_and_poll(uint32_t a, uint32_t v) |
| 1334 | { |
| 1335 | mmio_write_32(PFC_PMMR, ~v); |
| 1336 | v = ~mmio_read_32(PFC_PMMR); |
| 1337 | mmio_write_32(a, v); |
| 1338 | while (v != mmio_read_32(a)) ; |
| 1339 | dsb_sev(); |
| 1340 | } |
| 1341 | #endif |
| 1342 | |
| 1343 | #ifndef RCAR_GEN3_ULCB |
| 1344 | #define RCAR_GEN3_ULCB 0 |
| 1345 | #endif |
| 1346 | |
| 1347 | #if (RCAR_GEN3_ULCB == 0) /* non Starter Kit */ |
| 1348 | |
| 1349 | static uint32_t opencheck_SSI_WS6(void) |
| 1350 | { |
| 1351 | uint32_t dataL, down, up; |
| 1352 | uint32_t gpsr6_bak; |
| 1353 | uint32_t puen5_bak; |
| 1354 | uint32_t pud5_bak; |
| 1355 | |
| 1356 | gpsr6_bak = mmio_read_32(GPIO_GPSR6); |
| 1357 | puen5_bak = mmio_read_32(PFC_PUEN5); |
| 1358 | pud5_bak = mmio_read_32(PFC_PUD5); |
| 1359 | dsb_sev(); |
| 1360 | |
| 1361 | dataL = (gpsr6_bak & ~BIT15); |
| 1362 | pfc_write_and_poll(GPIO_GPSR6, dataL); |
| 1363 | |
| 1364 | /* Pull-Up/Down Enable (PUEN5[22]=1) */ |
| 1365 | dataL = puen5_bak; |
| 1366 | dataL |= (BIT22); |
| 1367 | pfc_write_and_poll(PFC_PUEN5, dataL); |
| 1368 | |
| 1369 | /* Pull-Down-Enable (PUD5[22]=0, PUEN5[22]=1) */ |
| 1370 | dataL = pud5_bak; |
| 1371 | dataL &= ~(BIT22); |
| 1372 | pfc_write_and_poll(PFC_PUD5, dataL); |
| 1373 | /* GPSR6[15]=SSI_WS6 */ |
| 1374 | rcar_micro_delay(10); |
| 1375 | down = (mmio_read_32(GPIO_INDT6) >> 15) & 0x1; |
| 1376 | dsb_sev(); |
| 1377 | |
| 1378 | /* Pull-Up-Enable (PUD5[22]=1, PUEN5[22]=1) */ |
| 1379 | dataL = pud5_bak; |
| 1380 | dataL |= (BIT22); |
| 1381 | pfc_write_and_poll(PFC_PUD5, dataL); |
| 1382 | |
| 1383 | /* GPSR6[15]=SSI_WS6 */ |
| 1384 | rcar_micro_delay(10); |
| 1385 | up = (mmio_read_32(GPIO_INDT6) >> 15) & 0x1; |
| 1386 | |
| 1387 | dsb_sev(); |
| 1388 | |
| 1389 | pfc_write_and_poll(GPIO_GPSR6, gpsr6_bak); |
| 1390 | pfc_write_and_poll(PFC_PUEN5, puen5_bak); |
| 1391 | pfc_write_and_poll(PFC_PUD5, pud5_bak); |
| 1392 | |
| 1393 | if (down == up) { |
| 1394 | /* Same = Connect */ |
| 1395 | return 0; |
| 1396 | } |
| 1397 | |
| 1398 | /* Diff = Open */ |
| 1399 | return 1; |
| 1400 | } |
| 1401 | |
| 1402 | #endif |
| 1403 | |
| 1404 | static uint32_t _board_judge(void) |
| 1405 | { |
| 1406 | uint32_t brd; |
| 1407 | #if (RCAR_GEN3_ULCB==1) |
| 1408 | /* Starter Kit */ |
| 1409 | if (Prr_Product == PRR_PRODUCT_H3) { |
| 1410 | if (Prr_Cut <= PRR_PRODUCT_11) { |
| 1411 | /* RENESAS Starter Kit(H3 Ver.1.x/SIP) board */ |
| 1412 | brd = 2; |
| 1413 | } else { |
| 1414 | /* RENESAS Starter Kit(H3 Ver.2.0 or later/SIP) board */ |
| 1415 | #if (RCAR_DRAM_LPDDR4_MEMCONF == 0) |
| 1416 | brd = 7; |
| 1417 | #else |
| 1418 | brd = 8; |
| 1419 | #endif |
| 1420 | } |
| 1421 | } else if (Prr_Product == PRR_PRODUCT_M3) { |
| 1422 | /* RENESAS Starter Kit(M3-W/SIP 8Gbit 1rank) board */ |
| 1423 | brd = 3; |
| 1424 | } else { |
| 1425 | /* RENESAS Starter Kit(M3-N/SIP) board */ |
| 1426 | brd = 11; |
| 1427 | } |
| 1428 | #else |
| 1429 | uint32_t usb2_ovc_open; |
| 1430 | |
| 1431 | usb2_ovc_open = opencheck_SSI_WS6(); |
| 1432 | |
| 1433 | /* RENESAS Eva-borad */ |
| 1434 | if (Prr_Product == PRR_PRODUCT_V3H) { |
| 1435 | /* RENESAS Condor board */ |
| 1436 | brd = 12; |
| 1437 | } else if (usb2_ovc_open) { |
| 1438 | if (Prr_Product == PRR_PRODUCT_M3N) { |
| 1439 | /* RENESAS Kriek board with M3-N */ |
| 1440 | brd = 10; |
| 1441 | } else if (Prr_Product == PRR_PRODUCT_M3) { |
| 1442 | /* RENESAS Kriek board with M3-W */ |
| 1443 | brd = 1; |
| 1444 | } else if (Prr_Cut <= PRR_PRODUCT_11) { |
| 1445 | /* RENESAS Kriek board with PM3 */ |
| 1446 | brd = 13; |
| 1447 | } else { |
| 1448 | /* RENESAS Kriek board with H3N */ |
| 1449 | brd = 15; |
| 1450 | } |
| 1451 | } else { |
| 1452 | if (Prr_Product == PRR_PRODUCT_H3) { |
| 1453 | if (Prr_Cut <= PRR_PRODUCT_11) { |
| 1454 | /* RENESAS SALVATOR-X (H3 Ver.1.x/SIP) */ |
| 1455 | brd = 2; |
| 1456 | } else if (Prr_Cut < PRR_PRODUCT_30) { |
| 1457 | /* RENESAS SALVATOR-X (H3 Ver.2.0/SIP) */ |
| 1458 | brd = 7; // 8Gbit/1rank |
| 1459 | } else { |
| 1460 | /* RENESAS SALVATOR-X (H3 Ver.3.0/SIP) */ |
| 1461 | #if (RCAR_DRAM_LPDDR4_MEMCONF == 0) |
| 1462 | brd = 7; |
| 1463 | #else |
| 1464 | brd = 8; |
| 1465 | #endif |
| 1466 | } |
| 1467 | } else if (Prr_Product == PRR_PRODUCT_M3N) { |
| 1468 | /* RENESAS SALVATOR-X (M3-N/SIP) */ |
| 1469 | brd = 11; |
| 1470 | } else { |
| 1471 | /* RENESAS SALVATOR-X (M3-W/SIP) */ |
| 1472 | brd = 0; |
| 1473 | } |
| 1474 | } |
| 1475 | #endif |
| 1476 | return brd; |
| 1477 | } |
| 1478 | #endif |