CY8C9540A.asi 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /** @file
  2. Copyright (c) 2013-2015 Intel Corporation.
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. CY8C9540A 40 Bit I/O Expander with EEPROM.
  5. **/
  6. Device(CY8C)
  7. {
  8. Name(_HID, "INT3490") // Cypress CY8C9540A Io Expander Function.
  9. Name(_CID, "INT3490")
  10. Name(RBUF, ResourceTemplate()
  11. {
  12. I2CSerialBus(0x20, ControllerInitiated, 100000, AddressingMode7Bit, "\\_SB.PCI0.GIP0.I2C_", 0, ResourceConsumer, , )
  13. GpioInt (Level, ActiveLow, Exclusive, PullDefault, , "\\_SB.PCI0.GIP0.GPO", 0, ResourceConsumer, , ) {QUARK_GPIO5_MAPPING} /* GPIO<5> is INT_S0 */
  14. })
  15. Method(_CRS, 0x0, NotSerialized)
  16. {
  17. CreateByteField(RBUF, 16, OB1)
  18. if (LEqual (ALTS, 0))
  19. {
  20. Store(0x20, OB1)
  21. }
  22. Else
  23. {
  24. Store(0x21, OB1)
  25. }
  26. Return(RBUF)
  27. }
  28. Method(_STA, 0x0, NotSerialized)
  29. {
  30. //
  31. // Only Galileo platform has this device.
  32. // EFI_PLATFORM_TYPE enum value Galileo = 6.
  33. //
  34. If(LNotEqual(PTYP, 6))
  35. {
  36. return (0)
  37. }
  38. Return(0xf)
  39. }
  40. }