1 /** @file 2 * 3 * Copyright (c) 2011-2012, ARM Limited. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-2-Clause-Patent 6 * 7 **/ 8 9 10 #ifndef __PL061_GPIO_H__ 11 #define __PL061_GPIO_H__ 12 13 #include <Protocol/EmbeddedGpio.h> 14 15 // PL061 GPIO Registers 16 #define PL061_GPIO_DATA_REG_OFFSET ((UINTN) 0x000) 17 #define PL061_GPIO_DATA_REG 0x000 18 #define PL061_GPIO_DIR_REG 0x400 19 #define PL061_GPIO_IS_REG 0x404 20 #define PL061_GPIO_IBE_REG 0x408 21 #define PL061_GPIO_IEV_REG 0x40C 22 #define PL061_GPIO_IE_REG 0x410 23 #define PL061_GPIO_RIS_REG 0x414 24 #define PL061_GPIO_MIS_REG 0x410 25 #define PL061_GPIO_IC_REG 0x41C 26 #define PL061_GPIO_AFSEL_REG 0x420 27 28 #define PL061_GPIO_PERIPH_ID0 0xFE0 29 #define PL061_GPIO_PERIPH_ID1 0xFE4 30 #define PL061_GPIO_PERIPH_ID2 0xFE8 31 #define PL061_GPIO_PERIPH_ID3 0xFEC 32 33 #define PL061_GPIO_PCELL_ID0 0xFF0 34 #define PL061_GPIO_PCELL_ID1 0xFF4 35 #define PL061_GPIO_PCELL_ID2 0xFF8 36 #define PL061_GPIO_PCELL_ID3 0xFFC 37 38 #define PL061_GPIO_PINS 8 39 40 // All bits low except one bit high, native bit length 41 #define GPIO_PIN_MASK(Pin) (1UL << ((UINTN)(Pin))) 42 43 #endif // __PL061_GPIO_H__ 44