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