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