dsdt.asl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. /*++
  2. Copyright (c) 2015 Minoca Corp.
  3. This file is licensed under the terms of the GNU General Public License
  4. version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details. See the LICENSE file at the root of this
  6. project for complete licensing information..
  7. Module Name:
  8. dsdt.dsl
  9. Abstract:
  10. This module implements the ACPI Differentiated System Descriptor Table
  11. (DSDT) for the Texas Instruments PandaBoard.
  12. Author:
  13. Evan Green 10-Jul-2015
  14. Environment:
  15. Firmware
  16. --*/
  17. //
  18. // --------------------------------------------------------------------- Tables
  19. //
  20. DefinitionBlock (
  21. "dsdt.aml",
  22. "DSDT",
  23. 0x01,
  24. "Minoca",
  25. "Minoca ",
  26. 0x1
  27. )
  28. {
  29. Scope(\_SB) {
  30. Device(DWC0) {
  31. Name(_HID, EISAID("DWC0000"))
  32. Name(_UID, 0)
  33. //
  34. // Define the operation region to access the DWC configuration
  35. // space.
  36. //
  37. OperationRegion(DWCR, SystemMemory, 0xFF580000, 0x104)
  38. Field(DWCR, DWordAcc, NoLock, Preserve) {
  39. Offset(0x8),
  40. SKP1, 1,
  41. AHBB, 3,
  42. AHBW, 1,
  43. Offset(0xC),
  44. SKP2, 8,
  45. USRP, 1,
  46. UHNP, 1,
  47. Offset(0x24),
  48. RXFS, 16,
  49. Offset(0x28),
  50. NPFO, 16,
  51. NPFS, 16,
  52. Offset(0x100),
  53. PDFO, 16,
  54. PDFS, 16,
  55. }
  56. //
  57. // Set the AHB configuration register to have a burst length of 16,
  58. // the receive FIFO to 516 bytes, the non-periodic transmit FIFO to
  59. // 128 bytes, and the periodic transmit FIFO to 256 bytes. The
  60. // Veyron's DWC USB controller allows dynamic FIFO sizes and the
  61. // maximum FIFO depth is greater than the total FIFO sizes
  62. // programmed here. Despite the Hardware 2 Configuration register's
  63. // claims that this device supports SRP and HNP, it does not. Also
  64. // clear those bits in the USB configuration register.
  65. //
  66. Method(_INI, 0) {
  67. Store(0x204, RXFS)
  68. Store(0x204, NPFO)
  69. Store(0x80, NPFS)
  70. Store(0x288, PDFO)
  71. Store(0x100, PDFS)
  72. Store(0x0, USRP)
  73. Store(0x0, UHNP)
  74. Store(0x7, AHBB)
  75. Store(0x0, AHBW)
  76. }
  77. Method (_STA, 0, NotSerialized) {
  78. Return(0x0F)
  79. }
  80. Name(_CRS, ResourceTemplate() {
  81. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  82. NonCacheable, ReadWrite,
  83. 0x00000000,
  84. 0xFF580000,
  85. 0xFF590FFF,
  86. 0x00000000,
  87. 0x00011000
  88. )
  89. Interrupt(, Level, ActiveHigh,) { 55 }
  90. })
  91. }
  92. Device(DWC1) {
  93. Name(_HID, EISAID("DWC0000"))
  94. Name(_UID, 0)
  95. //
  96. // Define the operation region to access the DWC configuration
  97. // space.
  98. //
  99. OperationRegion(DWCR, SystemMemory, 0xFF540000, 0x104)
  100. Field(DWCR, DWordAcc, NoLock, Preserve) {
  101. Offset(0x8),
  102. SKP1, 1,
  103. AHBB, 3,
  104. AHBW, 1,
  105. Offset(0xC),
  106. SKP2, 8,
  107. USRP, 1,
  108. UHNP, 1,
  109. Offset(0x24),
  110. RXFS, 16,
  111. Offset(0x28),
  112. NPFO, 16,
  113. NPFS, 16,
  114. Offset(0x100),
  115. PDFO, 16,
  116. PDFS, 16,
  117. }
  118. //
  119. // Set the AHB configuration register to have a burst length of 16,
  120. // the receive FIFO to 516 bytes, the non-periodic transmit FIFO to
  121. // 128 bytes, and the periodic transmit FIFO to 256 bytes. The
  122. // Veyron's DWC USB controller allows dynamic FIFO sizes and the
  123. // maximum FIFO depth is greater than the total FIFO sizes
  124. // programmed here. This controller accurately describes its mode.
  125. // The USB configuration register does not need modifications.
  126. //
  127. Method(_INI, 0) {
  128. Store(0x204, RXFS)
  129. Store(0x204, NPFO)
  130. Store(0x80, NPFS)
  131. Store(0x288, PDFO)
  132. Store(0x100, PDFS)
  133. Store(0x7, AHBB)
  134. Store(0x0, AHBW)
  135. }
  136. Method (_STA, 0, NotSerialized) {
  137. Return(0x0F)
  138. }
  139. Name(_CRS, ResourceTemplate() {
  140. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  141. NonCacheable, ReadWrite,
  142. 0x00000000,
  143. 0xFF540000,
  144. 0xFF550FFF,
  145. 0x00000000,
  146. 0x00011000
  147. )
  148. Interrupt(, Level, ActiveHigh,) { 57 }
  149. })
  150. }
  151. Device(GPI0) {
  152. Name(_HID, "RKC0002")
  153. Name(_UID, 0)
  154. Method(_STA, 0, NotSerialized) {
  155. Return(0x0F)
  156. }
  157. Name(_CRS, ResourceTemplate() {
  158. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  159. NonCacheable, ReadWrite,
  160. 0x00000000,
  161. 0xFF750000,
  162. 0xFF750FFF,
  163. 0x00000000,
  164. 0x00001000)
  165. Interrupt(, Level, ActiveHigh,) {113}
  166. })
  167. }
  168. Device(GPI1) {
  169. Name(_HID, "RKC0002")
  170. Name(_UID, 0)
  171. Method(_STA, 0, NotSerialized) {
  172. Return(0x0F)
  173. }
  174. Name(_CRS, ResourceTemplate() {
  175. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  176. NonCacheable, ReadWrite,
  177. 0x00000000,
  178. 0xFF780000,
  179. 0xFF780FFF,
  180. 0x00000000,
  181. 0x00001000)
  182. Interrupt(, Level, ActiveHigh,) {114}
  183. })
  184. }
  185. Device(GPI2) {
  186. Name(_HID, "RKC0002")
  187. Name(_UID, 0)
  188. Method(_STA, 0, NotSerialized) {
  189. Return(0x0F)
  190. }
  191. Name(_CRS, ResourceTemplate() {
  192. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  193. NonCacheable, ReadWrite,
  194. 0x00000000,
  195. 0xFF790000,
  196. 0xFF790FFF,
  197. 0x00000000,
  198. 0x00001000)
  199. Interrupt(, Level, ActiveHigh,) {115}
  200. })
  201. }
  202. Device(GPI3) {
  203. Name(_HID, "RKC0002")
  204. Name(_UID, 0)
  205. Method(_STA, 0, NotSerialized) {
  206. Return(0x0F)
  207. }
  208. Name(_CRS, ResourceTemplate() {
  209. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  210. NonCacheable, ReadWrite,
  211. 0x00000000,
  212. 0xFF7A0000,
  213. 0xFF7A0FFF,
  214. 0x00000000,
  215. 0x00001000)
  216. Interrupt(, Level, ActiveHigh,) {116}
  217. })
  218. }
  219. Device(GPI4) {
  220. Name(_HID, "RKC0002")
  221. Name(_UID, 0)
  222. Method(_STA, 0, NotSerialized) {
  223. Return(0x0F)
  224. }
  225. Name(_CRS, ResourceTemplate() {
  226. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  227. NonCacheable, ReadWrite,
  228. 0x00000000,
  229. 0xFF7B0000,
  230. 0xFF7B0FFF,
  231. 0x00000000,
  232. 0x00001000)
  233. Interrupt(, Level, ActiveHigh,) {117}
  234. })
  235. }
  236. Device(GPI5) {
  237. Name(_HID, "RKC0002")
  238. Name(_UID, 0)
  239. Method(_STA, 0, NotSerialized) {
  240. Return(0x0F)
  241. }
  242. Name(_CRS, ResourceTemplate() {
  243. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  244. NonCacheable, ReadWrite,
  245. 0x00000000,
  246. 0xFF7C0000,
  247. 0xFF7C0FFF,
  248. 0x00000000,
  249. 0x00001000)
  250. Interrupt(, Level, ActiveHigh,) {118}
  251. })
  252. }
  253. Device(GPI6) {
  254. Name(_HID, "RKC0002")
  255. Name(_UID, 0)
  256. Method(_STA, 0, NotSerialized) {
  257. Return(0x0F)
  258. }
  259. Name(_CRS, ResourceTemplate() {
  260. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  261. NonCacheable, ReadWrite,
  262. 0x00000000,
  263. 0xFF7D0000,
  264. 0xFF7D0FFF,
  265. 0x00000000,
  266. 0x00001000)
  267. Interrupt(, Level, ActiveHigh,) {119}
  268. })
  269. }
  270. Device(GPI7) {
  271. Name(_HID, "RKC0002")
  272. Name(_UID, 0)
  273. Method(_STA, 0, NotSerialized) {
  274. Return(0x0F)
  275. }
  276. Name(_CRS, ResourceTemplate() {
  277. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  278. NonCacheable, ReadWrite,
  279. 0x00000000,
  280. 0xFF7E0000,
  281. 0xFF7E0FFF,
  282. 0x00000000,
  283. 0x00001000)
  284. Interrupt(, Level, ActiveHigh,) {120}
  285. })
  286. }
  287. Device(GPI8) {
  288. Name(_HID, "RKC0002")
  289. Name(_UID, 0)
  290. Method(_STA, 0, NotSerialized) {
  291. Return(0x0F)
  292. }
  293. Name(_CRS, ResourceTemplate() {
  294. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  295. NonCacheable, ReadWrite,
  296. 0x00000000,
  297. 0xFF7F0000,
  298. 0xFF7F0FFF,
  299. 0x00000000,
  300. 0x00001000)
  301. Interrupt(, Level, ActiveHigh,) {121}
  302. })
  303. }
  304. Device(SPI0) {
  305. Name(_HID, "RKC0001")
  306. Name(_UID, 0)
  307. Method(_STA, 0, NotSerialized) {
  308. Return(0x0F)
  309. }
  310. Name(_CRS, ResourceTemplate() {
  311. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  312. NonCacheable, ReadWrite,
  313. 0x00000000,
  314. 0xFF110000,
  315. 0xFF110FFF,
  316. 0x00000000,
  317. 0x00001000)
  318. Interrupt(, Level, ActiveHigh,) {76}
  319. })
  320. }
  321. Device(I2C0) {
  322. Name(_HID, "RKC0003")
  323. Name(_UID, 0)
  324. Method(_STA, 0, NotSerialized) {
  325. Return(0x0F)
  326. }
  327. Name(_CRS, ResourceTemplate() {
  328. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  329. NonCacheable, ReadWrite,
  330. 0x00000000,
  331. 0xFF650000,
  332. 0xFF650FFF,
  333. 0x00000000,
  334. 0x00001000)
  335. Interrupt(, Level, ActiveHigh,) {92}
  336. })
  337. }
  338. Device(I2C1) {
  339. Name(_HID, "RKC0003")
  340. Name(_UID, 0)
  341. Method(_STA, 0, NotSerialized) {
  342. Return(0x0F)
  343. }
  344. Name(_CRS, ResourceTemplate() {
  345. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  346. NonCacheable, ReadWrite,
  347. 0x00000000,
  348. 0xFF140000,
  349. 0xFF140FFF,
  350. 0x00000000,
  351. 0x00001000)
  352. Interrupt(, Level, ActiveHigh,) {94}
  353. })
  354. }
  355. Device(I2C2) {
  356. Name(_HID, "RKC0003")
  357. Name(_UID, 0)
  358. Method(_STA, 0, NotSerialized) {
  359. Return(0x0F)
  360. }
  361. Name(_CRS, ResourceTemplate() {
  362. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  363. NonCacheable, ReadWrite,
  364. 0x00000000,
  365. 0xFF660000,
  366. 0xFF660FFF,
  367. 0x00000000,
  368. 0x00001000)
  369. Interrupt(, Level, ActiveHigh,) {93}
  370. })
  371. }
  372. Device(I2C3) {
  373. Name(_HID, "RKC0003")
  374. Name(_UID, 0)
  375. Method(_STA, 0, NotSerialized) {
  376. Return(0x0F)
  377. }
  378. Name(_CRS, ResourceTemplate() {
  379. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  380. NonCacheable, ReadWrite,
  381. 0x00000000,
  382. 0xFF150000,
  383. 0xFF150FFF,
  384. 0x00000000,
  385. 0x00001000)
  386. Interrupt(, Level, ActiveHigh,) {95}
  387. })
  388. }
  389. Device(I2C4) {
  390. Name(_HID, "RKC0003")
  391. Name(_UID, 0)
  392. Method(_STA, 0, NotSerialized) {
  393. Return(0x0F)
  394. }
  395. Name(_CRS, ResourceTemplate() {
  396. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  397. NonCacheable, ReadWrite,
  398. 0x00000000,
  399. 0xFF160000,
  400. 0xFF160FFF,
  401. 0x00000000,
  402. 0x00001000)
  403. Interrupt(, Level, ActiveHigh,) {96}
  404. })
  405. }
  406. Device(I2C5) {
  407. Name(_HID, "RKC0003")
  408. Name(_UID, 0)
  409. Method(_STA, 0, NotSerialized) {
  410. Return(0x0F)
  411. }
  412. Name(_CRS, ResourceTemplate() {
  413. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  414. NonCacheable, ReadWrite,
  415. 0x00000000,
  416. 0xFF170000,
  417. 0xFF170FFF,
  418. 0x00000000,
  419. 0x00001000)
  420. Interrupt(, Level, ActiveHigh,) {97}
  421. })
  422. }
  423. }
  424. Scope(\_SB.SPI0) {
  425. Device(GOEC) {
  426. Name(_HID, "GOO0001")
  427. Name(_UID, 0)
  428. Method(_STA, 0, NotSerialized) {
  429. Return(0x0F)
  430. }
  431. Name(_CRS, ResourceTemplate() {
  432. SPISerialBus(0x1, , , 8, , 3000000, ClockPolarityLow,
  433. ClockPhaseFirst, "\\_SB_SPI0", , ,)
  434. GpioInt(Level, ActiveLow, Shared, PullUp, ,
  435. "\\_SB_GPI7") {7}
  436. })
  437. }
  438. }
  439. Scope(\_SB.I2C0) {
  440. Device(PMIC) {
  441. Name(_HID, "RKC0808")
  442. Name(_UID, 0)
  443. Method(_STA, 0, NotSerialized) {
  444. Return(0x0F)
  445. }
  446. Name(_CRS, ResourceTemplate() {
  447. I2CSerialBus(0x1B, ControllerInitiated, 400000,
  448. AddressingMode7Bit, "\\_SB_I2C0", , , , )
  449. GpioInt(Level, ActiveLow, Shared, PullUp, ,
  450. "\\_SB_GPI0") {4}
  451. })
  452. }
  453. }
  454. Scope(\_SB.I2C4) {
  455. Device(MOUS) {
  456. Name(_HID, "ELAN0000")
  457. Name(_UID, 0)
  458. Method(_STA, 0, NotSerialized) {
  459. Return(0x0F)
  460. }
  461. Name(_CRS, ResourceTemplate() {
  462. I2CSerialBus(0x15, ControllerInitiated, 400000,
  463. AddressingMode7Bit, "\\_SB_I2C4", , , , )
  464. GpioInt(Edge, ActiveLow, Shared, PullUp, ,
  465. "\\_SB_GPI7") {3}
  466. })
  467. }
  468. }
  469. //
  470. // Define SD and eMMC under the PMIC since it's needed to provide 1.8V
  471. // switching.
  472. //
  473. Scope(\_SB.I2C0.PMIC) {
  474. Device(SDMC) {
  475. Name(_HID, "RKC0D40")
  476. Name(_UID, 0)
  477. Method(_STA, 0, NotSerialized) {
  478. Return(0x0F)
  479. }
  480. Name(_CRS, ResourceTemplate() {
  481. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  482. NonCacheable, ReadWrite,
  483. 0x00000000,
  484. 0xFF0C0000,
  485. 0xFF0C0FFF,
  486. 0x00000000,
  487. 0x00001000)
  488. Interrupt(, Level, ActiveHigh,) {64}
  489. GpioInt(Edge, ActiveLow, Exclusive, PullNone, ,
  490. "\\_SB_GPI7") {5}
  491. VendorLong() {
  492. 0x00, // SubType
  493. 0x0C, 0x32, 0x39, 0x94, 0xE5, 0x11, 0xFA, 0xC6, // UUID
  494. 0x0B, 0xBA, 0x12, 0x99, 0x8E, 0xC1, 0x83, 0x04, // UUID
  495. 0x80, 0xB8, 0x67, 0x23, // FundamentalClock (594MHz)
  496. 0x05, 0x00, 0x00, 0x00, // LDO
  497. 0x00, 0x00, 0x76, 0xFF, // CRU
  498. 0x8C, 0x00, // Clock Select Offset
  499. 0x00, 0x00, // Clock Select shift
  500. 0x00, 0x02, 0x00, 0x00, // Control Offset
  501. }
  502. })
  503. }
  504. Device(EMMC) {
  505. Name(_HID, "RKC0D40")
  506. Name(_UID, 0)
  507. Method(_STA, 0, NotSerialized) {
  508. Return(0x0F)
  509. }
  510. Name(_CRS, ResourceTemplate() {
  511. DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFixed,
  512. NonCacheable, ReadWrite,
  513. 0x00000000,
  514. 0xFF0F0000,
  515. 0xFF0F0FFF,
  516. 0x00000000,
  517. 0x00001000)
  518. Interrupt(, Level, ActiveHigh,) {67}
  519. VendorLong() {
  520. 0x00, // SubType
  521. 0x0C, 0x32, 0x39, 0x94, 0xE5, 0x11, 0xFA, 0xC6, // UUID
  522. 0x0B, 0xBA, 0x12, 0x99, 0x8E, 0xC1, 0x83, 0x04, // UUID
  523. 0x80, 0xB8, 0x67, 0x23, // FundamentalClock (594MHz)
  524. 0x00, 0x00, 0x00, 0x00, // LDO
  525. 0x00, 0x00, 0x76, 0xFF, // CRU
  526. 0x90, 0x00, // Clock Select Offset
  527. 0x08, 0x00, // Clock Select shift
  528. 0x18, 0x02, 0x00, 0x00 // Control Offset
  529. }
  530. })
  531. }
  532. }
  533. Name(\_S3, Package (0x04) {
  534. 0x01,
  535. 0x01,
  536. Zero,
  537. Zero
  538. })
  539. Name(\_S4, Package (0x04) {
  540. Zero,
  541. Zero,
  542. Zero,
  543. Zero
  544. })
  545. Name(\_S5, Package (0x04) {
  546. Zero,
  547. Zero,
  548. Zero,
  549. Zero
  550. })
  551. }