1 /** @file 2 Differentiated System Description Table Fields (DSDT) 3 4 Copyright (c) 2014, ARM Ltd. All rights reserved.<BR> 5 Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR> 6 Copyright (c) 2015, Linaro Limited. All rights reserved.<BR> 7 This program and the accompanying materials 8 are licensed and made available under the terms and conditions of the BSD License 9 which accompanies this distribution. The full text of the license may be found at 10 http://opensource.org/licenses/bsd-license.php 11 12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 15 **/ 16 17 Scope(_SB) 18 { 19 Device(SAS0) { 20 Name(_HID, "HISI0162") 21 Name(_CCA, 1) 22 Name(_CRS, ResourceTemplate() { 23 Memory32Fixed(ReadWrite, 0xC3000000, 0x10000) 24 Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, 0, "\\_SB.MBI6") 25 { 26 64,65,66,67,68, 27 69,70,71,72,73, 28 74,75,76,77,78, 29 79,80,81,82,83, 30 84,85,86,87,88, 31 89,90,91,92,93, 32 94,95,96,97,98, 33 99,100,101,102,103, 34 104,105,106,107,108, 35 109,110,111,112,113, 36 114,115,116,117,118, 37 119,120,121,122,123, 38 124,125,126,127,128, 39 129,130,131,132,133, 40 134,135,136,137,138, 41 139,140,141,142,143, 42 144,145,146,147,148, 43 149,150,151,152,153, 44 154,155,156,157,158, 45 159, 46 } 47 48 Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, 0, "\\_SB.MBI6" ) 49 { 50 601,602,603,604, 51 605,606,607,608,609, 52 610,611,612,613,614, 53 615,616,617,618,619, 54 620,621,622,623,624, 55 625,626,627,628,629, 56 630,631,632, 57 } 58 }) 59 60 Name (_DSD, Package () { 61 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 62 Package () { 63 Package () {"interrupt-parent",Package() {\_SB.MBI6}}, 64 Package (2) {"sas-addr", Package() {50, 01, 88, 20, 16, 00, 00, 0x00}}, 65 Package () {"queue-count", 16}, 66 Package () {"phy-count", 8}, 67 } 68 }) 69 70 OperationRegion (CTL, SystemMemory, 0xC0000000, 0x10000) 71 Field (CTL, AnyAcc, NoLock, Preserve) 72 { 73 Offset (0x338), 74 CLK, 32, 75 CLKD, 32, 76 Offset (0xa60), 77 RST, 32, 78 DRST, 32, 79 Offset (0x5a30), 80 STS, 32, 81 } 82 83 OperationRegion (PHYS, SystemMemory, 0xC3002000, 0x2000) 84 Field (PHYS, DWordAcc, NoLock, Preserve) { 85 Offset (0x0014), 86 PHY0, 32, 87 Offset (0x0414), 88 PHY1, 32, 89 Offset (0x0814), 90 PHY2, 32, 91 Offset (0x0c14), 92 PHY3, 32, 93 Offset (0x1014), 94 PHY4, 32, 95 Offset (0x1414), 96 PHY5, 32, 97 Offset (0x1814), 98 PHY6, 32, 99 Offset (0x1c14), 100 PHY7, 32, 101 } 102 103 OperationRegion (SYSR, SystemMemory, 0xD0000000, 0x10000) 104 Field (SYSR, DWordAcc, NoLock, Preserve) { 105 Offset (0xe014), 106 DIE4, 32, 107 } 108 109 Method (_RST, 0x0, Serialized) 110 { 111 Store(0x7ffff, RST) 112 Store(0x7ffff, CLKD) 113 Sleep(1) 114 Store(0x7ffff, DRST) 115 Store(0x7ffff, CLK) 116 Sleep(1) 117 Store(DIE4, local0) 118 If (LEqual (local0, 0)) { 119 /* 66MHZ */ 120 Store(0x0199B694, Local1) 121 Store(Local1, PHY0) 122 Store(Local1, PHY1) 123 Store(Local1, PHY2) 124 Store(Local1, PHY3) 125 Store(Local1, PHY4) 126 Store(Local1, PHY5) 127 Store(Local1, PHY6) 128 Store(Local1, PHY7) 129 } 130 } 131 } 132 133 Device(SAS1) { 134 Name(_HID, "HISI0162") 135 Name(_CCA, 1) 136 Name(_CRS, ResourceTemplate() { 137 Memory32Fixed(ReadWrite, 0xA2000000, 0x10000) 138 139 Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, 0, "\\_SB.MBI1") 140 { 141 64,65,66,67,68, 142 69,70,71,72,73, 143 74,75,76,77,78, 144 79,80,81,82,83, 145 84,85,86,87,88, 146 89,90,91,92,93, 147 94,95,96,97,98, 148 99,100,101,102,103, 149 104,105,106,107,108, 150 109,110,111,112,113, 151 114,115,116,117,118, 152 119,120,121,122,123, 153 124,125,126,127,128, 154 129,130,131,132,133, 155 134,135,136,137,138, 156 139,140,141,142,143, 157 144,145,146,147,148, 158 149,150,151,152,153, 159 154,155,156,157,158, 160 159, 161 } 162 163 Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, 0, "\\_SB.MBI1") 164 { 165 576,577,578,579,580, 166 581,582,583,584,585, 167 586,587,588,589,590, 168 591,592,593,594,595, 169 596,597,598,599,600, 170 601,602,603,604,605, 171 606,607, 172 } 173 }) 174 175 Name (_DSD, Package () { 176 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 177 Package () { 178 Package () {"interrupt-parent",Package() {\_SB.MBI1}}, 179 Package (2) {"sas-addr", Package() {50, 01, 88, 20, 16, 00, 00, 00}}, 180 Package () {"queue-count", 16}, 181 Package () {"phy-count", 8}, 182 Package () {"hip06-sas-v2-quirk-amt", 1}, 183 } 184 }) 185 186 OperationRegion (CTL, SystemMemory, 0xA0000000, 0x10000) 187 Field (CTL, AnyAcc, NoLock, Preserve) 188 { 189 Offset (0x318), 190 CLK, 32, 191 CLKD, 32, 192 Offset (0xa18), 193 RST, 32, 194 DRST, 32, 195 Offset (0x5a0c), 196 STS, 32, 197 } 198 199 OperationRegion (PHYS, SystemMemory, 0xA2002000, 0x2000) 200 Field (PHYS, DWordAcc, NoLock, Preserve) { 201 Offset (0x0014), 202 PHY0, 32, 203 Offset (0x0414), 204 PHY1, 32, 205 Offset (0x0814), 206 PHY2, 32, 207 Offset (0x0c14), 208 PHY3, 32, 209 Offset (0x1014), 210 PHY4, 32, 211 Offset (0x1414), 212 PHY5, 32, 213 Offset (0x1814), 214 PHY6, 32, 215 Offset (0x1c14), 216 PHY7, 32, 217 } 218 219 OperationRegion (SYSR, SystemMemory, 0xD0000000, 0x10000) 220 Field (SYSR, DWordAcc, NoLock, Preserve) { 221 Offset (0xe014), 222 DIE4, 32, 223 } 224 225 Method (_RST, 0x0, Serialized) 226 { 227 Store(0x7ffff, RST) 228 Store(0x7ffff, CLKD) 229 Sleep(1) 230 Store(0x7ffff, DRST) 231 Store(0x7ffff, CLK) 232 Sleep(1) 233 Store(DIE4, local0) 234 If (LEqual (local0, 0)) { 235 /* 66MHZ */ 236 Store(0x0199B694, Local1) 237 Store(Local1, PHY0) 238 Store(Local1, PHY1) 239 Store(Local1, PHY2) 240 Store(Local1, PHY3) 241 Store(Local1, PHY4) 242 Store(Local1, PHY5) 243 Store(Local1, PHY6) 244 Store(Local1, PHY7) 245 } 246 } 247 } 248 249 Device(SAS2) { 250 Name(_HID, "HISI0162") 251 Name(_CCA, 1) 252 Name(_CRS, ResourceTemplate() { 253 Memory32Fixed(ReadWrite, 0xA3000000, 0x10000) 254 255 Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, 0, "\\_SB.MBI2") 256 { 257 192,193,194,195,196, 258 197,198,199,200,201, 259 202,203,204,205,206, 260 207,208,209,210,211, 261 212,213,214,215,216, 262 217,218,219,220,221, 263 222,223,224,225,226, 264 227,228,229,230,231, 265 232,233,234,235,236, 266 237,238,239,240,241, 267 242,243,244,245,246, 268 247,248,249,250,251, 269 252,253,254,255,256, 270 257,258,259,260,261, 271 262,263,264,265,266, 272 267,268,269,270,271, 273 272,273,274,275,276, 274 277,278,279,280,281, 275 282,283,284,285,286, 276 287, 277 } 278 279 Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, 0, "\\_SB.MBI2") 280 { 281 608,609,610,611, 282 612,613,614,615,616, 283 617,618,619,620,621, 284 622,623,624,625,626, 285 627,628,629,630,631, 286 632,633,634,635,636, 287 637,638,639, 288 } 289 }) 290 291 Name (_DSD, Package () { 292 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 293 Package () { 294 Package () {"interrupt-parent",Package() {\_SB.MBI2}}, 295 Package (2) {"sas-addr", Package() {50, 01, 88, 20, 16, 00, 00, 00}}, 296 Package () {"queue-count", 16}, 297 Package () {"phy-count", 9}, 298 } 299 }) 300 301 OperationRegion (CTL, SystemMemory, 0xA0000000, 0x10000) 302 Field (CTL, AnyAcc, NoLock, Preserve) 303 { 304 Offset (0x3a8), 305 CLK, 32, 306 CLKD, 32, 307 Offset (0xae0), 308 RST, 32, 309 DRST, 32, 310 Offset (0x5a70), 311 STS, 32, 312 } 313 314 OperationRegion (PHYS, SystemMemory, 0xA3002000, 0x2400) 315 Field (PHYS, DWordAcc, NoLock, Preserve) { 316 Offset (0x0014), 317 PHY0, 32, 318 Offset (0x0414), 319 PHY1, 32, 320 Offset (0x0814), 321 PHY2, 32, 322 Offset (0x0c14), 323 PHY3, 32, 324 Offset (0x1014), 325 PHY4, 32, 326 Offset (0x1414), 327 PHY5, 32, 328 Offset (0x1814), 329 PHY6, 32, 330 Offset (0x1c14), 331 PHY7, 32, 332 offset (0x2014), 333 PHY8, 32, 334 } 335 336 OperationRegion (SYSR, SystemMemory, 0xD0000000, 0x10000) 337 Field (SYSR, DWordAcc, NoLock, Preserve) { 338 Offset (0xe014), 339 DIE4, 32, 340 } 341 342 Method (_RST, 0x0, Serialized) 343 { 344 Store(0x7ffff, RST) 345 Store(0x7ffff, CLKD) 346 Sleep(1) 347 Store(0x7ffff, DRST) 348 Store(0x7ffff, CLK) 349 Sleep(1) 350 Store(DIE4, local0) 351 If (LEqual (local0, 0)) { 352 /* 66MHZ */ 353 Store(0x0199B694, Local1) 354 Store(Local1, PHY0) 355 Store(Local1, PHY1) 356 Store(Local1, PHY2) 357 Store(Local1, PHY3) 358 Store(Local1, PHY4) 359 Store(Local1, PHY5) 360 Store(Local1, PHY6) 361 Store(Local1, PHY7) 362 Store(Local1, PHY8) 363 } 364 } 365 } 366 367 } 368