1 /** @file 2 3 Copyright (c) 2013-2015 Intel Corporation. 4 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 13 CY8C9540A 40 Bit I/O Expander with EEPROM. 14 15 **/ 16 17 Device(CY8C) 18 { 19 Name(_HID, "INT3490") // Cypress CY8C9540A Io Expander Function. 20 Name(_CID, "INT3490") 21 22 Name(RBUF, ResourceTemplate() 23 { 24 I2CSerialBus(0x20, ControllerInitiated, 100000, AddressingMode7Bit, "\\_SB.PCI0.GIP0.I2C_", 0, ResourceConsumer, , ) 25 GpioInt (Level, ActiveLow, Exclusive, PullDefault, , "\\_SB.PCI0.GIP0.GPO", 0, ResourceConsumer, , ) {QUARK_GPIO5_MAPPING} /* GPIO<5> is INT_S0 */ 26 }) 27 Method(_CRS, 0x0, NotSerialized) 28 { 29 CreateByteField(RBUF, 16, OB1) 30 if (LEqual (ALTS, 0)) 31 { 32 Store(0x20, OB1) 33 } 34 Else 35 { 36 Store(0x21, OB1) 37 } 38 Return(RBUF) 39 } 40 Method(_STA, 0x0, NotSerialized) 41 { 42 // 43 // Only Galileo platform has this device. 44 // EFI_PLATFORM_TYPE enum value Galileo = 6. 45 // 46 If(LNotEqual(PTYP, 6)) 47 { 48 return (0) 49 } 50 Return(0xf) 51 } 52 } 53 54