lpc.asl 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com>
  4. */
  5. /* Intel LPC Bus Device - 0:1f.0 */
  6. Device (LPCB)
  7. {
  8. Name(_ADR, 0x001f0000)
  9. OperationRegion(PRTX, PCI_Config, 0x60, 8)
  10. Field(PRTX, AnyAcc, NoLock, Preserve) {
  11. PRTA, 8,
  12. PRTB, 8,
  13. PRTC, 8,
  14. PRTD, 8,
  15. PRTE, 8,
  16. PRTF, 8,
  17. PRTG, 8,
  18. PRTH, 8,
  19. }
  20. #include <asm/acpi/irqlinks.asl>
  21. /* Firmware Hub */
  22. Device (FWH)
  23. {
  24. Name(_HID, EISAID("INT0800"))
  25. Name(_CRS, ResourceTemplate()
  26. {
  27. Memory32Fixed(ReadOnly, 0xff000000, 0x01000000)
  28. })
  29. }
  30. /* 8259 Interrupt Controller */
  31. Device (PIC)
  32. {
  33. Name(_HID, EISAID("PNP0000"))
  34. Name(_CRS, ResourceTemplate()
  35. {
  36. IO(Decode16, 0x20, 0x20, 0x01, 0x02)
  37. IO(Decode16, 0x24, 0x24, 0x01, 0x02)
  38. IO(Decode16, 0x28, 0x28, 0x01, 0x02)
  39. IO(Decode16, 0x2c, 0x2c, 0x01, 0x02)
  40. IO(Decode16, 0x30, 0x30, 0x01, 0x02)
  41. IO(Decode16, 0x34, 0x34, 0x01, 0x02)
  42. IO(Decode16, 0x38, 0x38, 0x01, 0x02)
  43. IO(Decode16, 0x3c, 0x3c, 0x01, 0x02)
  44. IO(Decode16, 0xa0, 0xa0, 0x01, 0x02)
  45. IO(Decode16, 0xa4, 0xa4, 0x01, 0x02)
  46. IO(Decode16, 0xa8, 0xa8, 0x01, 0x02)
  47. IO(Decode16, 0xac, 0xac, 0x01, 0x02)
  48. IO(Decode16, 0xb0, 0xb0, 0x01, 0x02)
  49. IO(Decode16, 0xb4, 0xb4, 0x01, 0x02)
  50. IO(Decode16, 0xb8, 0xb8, 0x01, 0x02)
  51. IO(Decode16, 0xbc, 0xbc, 0x01, 0x02)
  52. IO(Decode16, 0x4d0, 0x4d0, 0x01, 0x02)
  53. IRQNoFlags () { 2 }
  54. })
  55. }
  56. /* 8254 timer */
  57. Device (TIMR)
  58. {
  59. Name(_HID, EISAID("PNP0100"))
  60. Name(_CRS, ResourceTemplate()
  61. {
  62. IO(Decode16, 0x40, 0x40, 0x01, 0x04)
  63. IO(Decode16, 0x50, 0x50, 0x10, 0x04)
  64. IRQNoFlags() { 0 }
  65. })
  66. }
  67. /* HPET */
  68. Device (HPET)
  69. {
  70. Name(_HID, EISAID("PNP0103"))
  71. Name(_CID, 0x010CD041)
  72. Name(_CRS, ResourceTemplate()
  73. {
  74. Memory32Fixed(ReadOnly, HPET_BASE_ADDRESS, HPET_BASE_SIZE)
  75. })
  76. Method(_STA)
  77. {
  78. Return (STA_VISIBLE)
  79. }
  80. }
  81. /* Real Time Clock */
  82. Device (RTC)
  83. {
  84. Name(_HID, EISAID("PNP0B00"))
  85. Name(_CRS, ResourceTemplate()
  86. {
  87. IO(Decode16, 0x70, 0x70, 1, 8)
  88. IRQNoFlags() { 8 }
  89. })
  90. }
  91. /* LPC device: Resource consumption */
  92. Device (LDRC)
  93. {
  94. Name(_HID, EISAID("PNP0C02"))
  95. Name(_UID, 2)
  96. Name(RBUF, ResourceTemplate()
  97. {
  98. IO(Decode16, 0x61, 0x61, 0x1, 0x01) /* NMI Status */
  99. IO(Decode16, 0x63, 0x63, 0x1, 0x01) /* CPU Reserved */
  100. IO(Decode16, 0x65, 0x65, 0x1, 0x01) /* CPU Reserved */
  101. IO(Decode16, 0x67, 0x67, 0x1, 0x01) /* CPU Reserved */
  102. IO(Decode16, 0x80, 0x80, 0x1, 0x01) /* Port 80 Post */
  103. IO(Decode16, 0x92, 0x92, 0x1, 0x01) /* CPU Reserved */
  104. IO(Decode16, 0xb2, 0xb2, 0x1, 0x02) /* SWSMI */
  105. })
  106. Method(_CRS, 0, NotSerialized)
  107. {
  108. Return (RBUF)
  109. }
  110. }
  111. }