1/* 2 * Copyright (C) 2013 Google Inc. 3 * Copyright (C) 2016 Bin Meng <bmeng.cn@gmail.com> 4 * 5 * Modified from coreboot src/soc/intel/baytrail/acpi/gpio.asl 6 * 7 * SPDX-License-Identifier: GPL-2.0+ 8 */ 9 10/* SouthCluster GPIO */ 11Device (GPSC) 12{ 13 Name(_HID, "INT33FC") 14 Name(_CID, "INT33FC") 15 Name(_UID, 1) 16 17 Name(RBUF, ResourceTemplate() 18 { 19 Memory32Fixed(ReadWrite, 0, 0x1000, RMEM) 20 Interrupt(ResourceConsumer, Level, ActiveLow, Shared, , ,) 21 { 22 GPIO_SC_IRQ 23 } 24 }) 25 26 Method(_CRS) 27 { 28 CreateDwordField(^RBUF, ^RMEM._BAS, RBAS) 29 Add(IO_BASE_ADDRESS, IO_BASE_OFFSET_GPSCORE, RBAS) 30 Return (^RBUF) 31 } 32 33 Method(_STA) 34 { 35 Return (STA_VISIBLE) 36 } 37} 38 39/* NorthCluster GPIO */ 40Device (GPNC) 41{ 42 Name(_HID, "INT33FC") 43 Name(_CID, "INT33FC") 44 Name(_UID, 2) 45 46 Name(RBUF, ResourceTemplate() 47 { 48 Memory32Fixed(ReadWrite, 0, 0x1000, RMEM) 49 Interrupt(ResourceConsumer, Level, ActiveLow, Shared, , ,) 50 { 51 GPIO_NC_IRQ 52 } 53 }) 54 55 Method(_CRS) 56 { 57 CreateDwordField(^RBUF, ^RMEM._BAS, RBAS) 58 Add(IO_BASE_ADDRESS, IO_BASE_OFFSET_GPNCORE, RBAS) 59 Return (^RBUF) 60 } 61 62 Method(_STA) 63 { 64 Return (STA_VISIBLE) 65 } 66} 67 68/* SUS GPIO */ 69Device (GPSS) 70{ 71 Name(_HID, "INT33FC") 72 Name(_CID, "INT33FC") 73 Name(_UID, 3) 74 75 Name(RBUF, ResourceTemplate() 76 { 77 Memory32Fixed(ReadWrite, 0, 0x1000, RMEM) 78 Interrupt(ResourceConsumer, Level, ActiveLow, Shared, , ,) 79 { 80 GPIO_SUS_IRQ 81 } 82 }) 83 84 Method(_CRS) 85 { 86 CreateDwordField(^RBUF, ^RMEM._BAS, RBAS) 87 Add(IO_BASE_ADDRESS, IO_BASE_OFFSET_GPSSUS, RBAS) 88 Return (^RBUF) 89 } 90 91 Method(_STA) 92 { 93 Return (STA_VISIBLE) 94 } 95} 96