AD7298.asi 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /** @file
  2. Analog devices AD7298 ADC.
  3. Copyright (c) 2013-2015 Intel Corporation.
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. Device(ADC1)
  7. {
  8. Name(_HID, "INT3494") // Galileo Version 1 Low-Speed ADC.
  9. Name(_CID, "INT3494")
  10. Name(RBUF, ResourceTemplate()
  11. {
  12. // SPI0: mode 2, 4Mhz, 16-bit data length
  13. SpiSerialBus (0x0000, PolarityLow, FourWireMode, 16, ControllerInitiated, 4000000, ClockPolarityHigh, ClockPhaseFirst, "\\_SB_.PCI0.SPI0",0x00, ResourceConsumer, ,)
  14. // GPIO<0> is SPI0_CS_N
  15. GpioIO(Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.PCI0.GIP0.GPO_", 0, ResourceConsumer, , ) {QUARK_GPIO0_MAPPING}
  16. })
  17. Method(_CRS, 0x0, NotSerialized)
  18. {
  19. Return(RBUF)
  20. }
  21. Method(_STA, 0x0, NotSerialized)
  22. {
  23. //
  24. // Only Galileo platform has this device.
  25. // EFI_PLATFORM_TYPE enum value Galileo = 6.
  26. //
  27. If(LNotEqual(PTYP, 6))
  28. {
  29. return (0)
  30. }
  31. Return(0xf)
  32. }
  33. }