1157089Simp/*- 2157089Simp * Copyright (c) 2006 M. Warner Losh. All rights reserved. 3157089Simp * 4157089Simp * Redistribution and use in source and binary forms, with or without 5157089Simp * modification, are permitted provided that the following conditions 6157089Simp * are met: 7157089Simp * 1. Redistributions of source code must retain the above copyright 8157089Simp * notice, this list of conditions and the following disclaimer. 9157089Simp * 2. Redistributions in binary form must reproduce the above copyright 10157089Simp * notice, this list of conditions and the following disclaimer in the 11157089Simp * documentation and/or other materials provided with the distribution. 12157089Simp * 13185265Simp * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14185265Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15185265Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16185265Simp * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 17185265Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18185265Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19185265Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20185265Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21185265Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22185265Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23185265Simp * SUCH DAMAGE. 24157089Simp */ 25157089Simp 26157089Simp/* $FreeBSD$ */ 27157089Simp 28157089Simp#ifndef ARM_AT91_AT91_PIOREG_H 29157089Simp#define ARM_AT91_AT91_PIOREG_H 30157089Simp 31235271Simp#ifndef ATMEL_ENV 32157089Simp/* Registers */ 33157089Simp#define PIO_PER 0x00 /* PIO Enable Register */ 34157089Simp#define PIO_PDR 0x04 /* PIO Disable Register */ 35157089Simp#define PIO_PSR 0x08 /* PIO Status Register */ 36157089Simp /* 0x0c reserved */ 37157089Simp#define PIO_OER 0x10 /* PIO Output Enable Register */ 38157089Simp#define PIO_ODR 0x14 /* PIO Output Disable Register */ 39157089Simp#define PIO_OSR 0x18 /* PIO Output Status Register */ 40157089Simp /* 0x1c reserved */ 41157089Simp#define PIO_IFER 0x20 /* PIO Glitch Input Enable Register */ 42157089Simp#define PIO_IFDR 0x24 /* PIO Glitch Input Disable Register */ 43157089Simp#define PIO_IFSR 0x28 /* PIO Glitch Input Status Register */ 44157089Simp /* 0x2c reserved */ 45157089Simp#define PIO_SODR 0x30 /* PIO Set Output Data Register */ 46157089Simp#define PIO_CODR 0x34 /* PIO Clear Output Data Register */ 47157089Simp#define PIO_ODSR 0x38 /* PIO Output Data Status Register */ 48157089Simp#define PIO_PDSR 0x3c /* PIO Pin Data Status Register */ 49157089Simp#define PIO_IER 0x40 /* PIO Interrupt Enable Register */ 50157089Simp#define PIO_IDR 0x44 /* PIO Interrupt Disable Register */ 51157089Simp#define PIO_IMR 0x48 /* PIO Interrupt Mask Register */ 52157089Simp#define PIO_ISR 0x4c /* PIO Interrupt Status Register */ 53157089Simp#define PIO_MDER 0x50 /* PIO Multi-Driver Enable Register */ 54157089Simp#define PIO_MDDR 0x54 /* PIO Multi-Driver Disable Register */ 55157089Simp#define PIO_MDSR 0x58 /* PIO Multi-Driver Status Register */ 56157089Simp /* 0x5c reserved */ 57165711Simp#define PIO_PUDR 0x60 /* PIO Pull-up Disable Register */ 58165711Simp#define PIO_PUER 0x64 /* PIO Pull-up Enable Register */ 59157089Simp#define PIO_PUSR 0x68 /* PIO Pull-up Status Register */ 60157089Simp /* 0x6c reserved */ 61157089Simp#define PIO_ASR 0x70 /* PIO Peripheral A Select Register */ 62157089Simp#define PIO_BSR 0x74 /* PIO Peripheral B Select Register */ 63157089Simp#define PIO_ABSR 0x78 /* PIO AB Status Register */ 64157089Simp /* 0x7c-0x9c reserved */ 65157089Simp#define PIO_OWER 0xa0 /* PIO Output Write Enable Register */ 66157089Simp#define PIO_OWDR 0xa4 /* PIO Output Write Disable Register */ 67157089Simp#define PIO_OWSR 0xa8 /* PIO Output Write Status Register */ 68157089Simp /* 0xac reserved */ 69235271Simp#endif 70157089Simp 71213496Scognet#define AT91C_PIO_PA0 ((unsigned int) 1 << 0) // Pin Controlled by PA0 72213496Scognet#define AT91C_PIO_PA1 ((unsigned int) 1 << 1) // Pin Controlled by PA1 73213496Scognet#define AT91C_PIO_PA2 ((unsigned int) 1 << 2) // Pin Controlled by PA2 74213496Scognet#define AT91C_PIO_PA3 ((unsigned int) 1 << 3) // Pin Controlled by PA3 75213496Scognet#define AT91C_PIO_PA4 ((unsigned int) 1 << 4) // Pin Controlled by PA4 76213496Scognet#define AT91C_PIO_PA5 ((unsigned int) 1 << 5) // Pin Controlled by PA5 77213496Scognet#define AT91C_PIO_PA6 ((unsigned int) 1 << 6) // Pin Controlled by PA6 78213496Scognet#define AT91C_PIO_PA7 ((unsigned int) 1 << 7) // Pin Controlled by PA7 79213496Scognet#define AT91C_PIO_PA8 ((unsigned int) 1 << 8) // Pin Controlled by PA8 80213496Scognet#define AT91C_PIO_PA9 ((unsigned int) 1 << 9) // Pin Controlled by PA9 81213496Scognet#define AT91C_PIO_PA10 ((unsigned int) 1 << 10) // Pin Controlled by PA10 82213496Scognet#define AT91C_PIO_PA11 ((unsigned int) 1 << 11) // Pin Controlled by PA11 83213496Scognet#define AT91C_PIO_PA12 ((unsigned int) 1 << 12) // Pin Controlled by PA12 84213496Scognet#define AT91C_PIO_PA13 ((unsigned int) 1 << 13) // Pin Controlled by PA13 85213496Scognet#define AT91C_PIO_PA14 ((unsigned int) 1 << 14) // Pin Controlled by PA14 86213496Scognet#define AT91C_PIO_PA15 ((unsigned int) 1 << 15) // Pin Controlled by PA15 87213496Scognet#define AT91C_PIO_PA16 ((unsigned int) 1 << 16) // Pin Controlled by PA16 88213496Scognet#define AT91C_PIO_PA17 ((unsigned int) 1 << 17) // Pin Controlled by PA17 89213496Scognet#define AT91C_PIO_PA18 ((unsigned int) 1 << 18) // Pin Controlled by PA18 90213496Scognet#define AT91C_PIO_PA19 ((unsigned int) 1 << 19) // Pin Controlled by PA19 91213496Scognet#define AT91C_PIO_PA20 ((unsigned int) 1 << 20) // Pin Controlled by PA20 92213496Scognet#define AT91C_PIO_PA21 ((unsigned int) 1 << 21) // Pin Controlled by PA21 93213496Scognet#define AT91C_PIO_PA22 ((unsigned int) 1 << 22) // Pin Controlled by PA22 94213496Scognet#define AT91C_PIO_PA23 ((unsigned int) 1 << 23) // Pin Controlled by PA23 95213496Scognet#define AT91C_PIO_PA24 ((unsigned int) 1 << 24) // Pin Controlled by PA24 96213496Scognet#define AT91C_PIO_PA25 ((unsigned int) 1 << 25) // Pin Controlled by PA25 97213496Scognet#define AT91C_PIO_PA26 ((unsigned int) 1 << 26) // Pin Controlled by PA26 98213496Scognet#define AT91C_PIO_PA27 ((unsigned int) 1 << 27) // Pin Controlled by PA27 99213496Scognet#define AT91C_PIO_PA28 ((unsigned int) 1 << 28) // Pin Controlled by PA28 100213496Scognet#define AT91C_PIO_PA29 ((unsigned int) 1 << 29) // Pin Controlled by PA29 101213496Scognet#define AT91C_PIO_PA30 ((unsigned int) 1 << 30) // Pin Controlled by PA30 102213496Scognet#define AT91C_PIO_PA31 ((unsigned int) 1 << 31) // Pin Controlled by PA31 103213496Scognet#define AT91C_PIO_PB0 ((unsigned int) 1 << 0) // Pin Controlled by PB0 104213496Scognet#define AT91C_PIO_PB1 ((unsigned int) 1 << 1) // Pin Controlled by PB1 105213496Scognet#define AT91C_PIO_PB2 ((unsigned int) 1 << 2) // Pin Controlled by PB2 106213496Scognet#define AT91C_PIO_PB3 ((unsigned int) 1 << 3) // Pin Controlled by PB3 107213496Scognet#define AT91C_PIO_PB4 ((unsigned int) 1 << 4) // Pin Controlled by PB4 108213496Scognet#define AT91C_PIO_PB5 ((unsigned int) 1 << 5) // Pin Controlled by PB5 109213496Scognet#define AT91C_PIO_PB6 ((unsigned int) 1 << 6) // Pin Controlled by PB6 110213496Scognet#define AT91C_PIO_PB7 ((unsigned int) 1 << 7) // Pin Controlled by PB7 111213496Scognet#define AT91C_PIO_PB8 ((unsigned int) 1 << 8) // Pin Controlled by PB8 112213496Scognet#define AT91C_PIO_PB9 ((unsigned int) 1 << 9) // Pin Controlled by PB9 113213496Scognet#define AT91C_PIO_PB10 ((unsigned int) 1 << 10) // Pin Controlled by PB10 114213496Scognet#define AT91C_PIO_PB11 ((unsigned int) 1 << 11) // Pin Controlled by PB11 115213496Scognet#define AT91C_PIO_PB12 ((unsigned int) 1 << 12) // Pin Controlled by PB12 116213496Scognet#define AT91C_PIO_PB13 ((unsigned int) 1 << 13) // Pin Controlled by PB13 117213496Scognet#define AT91C_PIO_PB14 ((unsigned int) 1 << 14) // Pin Controlled by PB14 118213496Scognet#define AT91C_PIO_PB15 ((unsigned int) 1 << 15) // Pin Controlled by PB15 119213496Scognet#define AT91C_PIO_PB16 ((unsigned int) 1 << 16) // Pin Controlled by PB16 120213496Scognet#define AT91C_PIO_PB17 ((unsigned int) 1 << 17) // Pin Controlled by PB17 121213496Scognet#define AT91C_PIO_PB18 ((unsigned int) 1 << 18) // Pin Controlled by PB18 122213496Scognet#define AT91C_PIO_PB19 ((unsigned int) 1 << 19) // Pin Controlled by PB19 123213496Scognet#define AT91C_PIO_PB20 ((unsigned int) 1 << 20) // Pin Controlled by PB20 124213496Scognet#define AT91C_PIO_PB21 ((unsigned int) 1 << 21) // Pin Controlled by PB21 125213496Scognet#define AT91C_PIO_PB22 ((unsigned int) 1 << 22) // Pin Controlled by PB22 126213496Scognet#define AT91C_PIO_PB23 ((unsigned int) 1 << 23) // Pin Controlled by PB23 127213496Scognet#define AT91C_PIO_PB24 ((unsigned int) 1 << 24) // Pin Controlled by PB24 128213496Scognet#define AT91C_PIO_PB25 ((unsigned int) 1 << 25) // Pin Controlled by PB25 129213496Scognet#define AT91C_PIO_PB26 ((unsigned int) 1 << 26) // Pin Controlled by PB26 130213496Scognet#define AT91C_PIO_PB27 ((unsigned int) 1 << 27) // Pin Controlled by PB27 131213496Scognet#define AT91C_PIO_PB28 ((unsigned int) 1 << 28) // Pin Controlled by PB28 132213496Scognet#define AT91C_PIO_PB29 ((unsigned int) 1 << 29) // Pin Controlled by PB29 133213496Scognet#define AT91C_PIO_PB30 ((unsigned int) 1 << 30) // Pin Controlled by PB30 134213496Scognet#define AT91C_PIO_PB31 ((unsigned int) 1 << 31) // Pin Controlled by PB31 135213496Scognet#define AT91C_PIO_PC0 ((unsigned int) 1 << 0) // Pin Controlled by PC0 136213496Scognet#define AT91C_PIO_PC1 ((unsigned int) 1 << 1) // Pin Controlled by PC1 137213496Scognet#define AT91C_PIO_PC2 ((unsigned int) 1 << 2) // Pin Controlled by PC2 138213496Scognet#define AT91C_PIO_PC3 ((unsigned int) 1 << 3) // Pin Controlled by PC3 139213496Scognet#define AT91C_PIO_PC4 ((unsigned int) 1 << 4) // Pin Controlled by PC4 140213496Scognet#define AT91C_PIO_PC5 ((unsigned int) 1 << 5) // Pin Controlled by PC5 141213496Scognet#define AT91C_PIO_PC6 ((unsigned int) 1 << 6) // Pin Controlled by PC6 142213496Scognet#define AT91C_PIO_PC7 ((unsigned int) 1 << 7) // Pin Controlled by PC7 143213496Scognet#define AT91C_PIO_PC8 ((unsigned int) 1 << 8) // Pin Controlled by PC8 144213496Scognet#define AT91C_PIO_PC9 ((unsigned int) 1 << 9) // Pin Controlled by PC9 145213496Scognet#define AT91C_PIO_PC10 ((unsigned int) 1 << 10) // Pin Controlled by PC10 146213496Scognet#define AT91C_PIO_PC11 ((unsigned int) 1 << 11) // Pin Controlled by PC11 147213496Scognet#define AT91C_PIO_PC12 ((unsigned int) 1 << 12) // Pin Controlled by PC12 148213496Scognet#define AT91C_PIO_PC13 ((unsigned int) 1 << 13) // Pin Controlled by PC13 149213496Scognet#define AT91C_PIO_PC14 ((unsigned int) 1 << 14) // Pin Controlled by PC14 150213496Scognet#define AT91C_PIO_PC15 ((unsigned int) 1 << 15) // Pin Controlled by PC15 151213496Scognet#define AT91C_PIO_PC16 ((unsigned int) 1 << 16) // Pin Controlled by PC16 152213496Scognet#define AT91C_PIO_PC17 ((unsigned int) 1 << 17) // Pin Controlled by PC17 153213496Scognet#define AT91C_PIO_PC18 ((unsigned int) 1 << 18) // Pin Controlled by PC18 154213496Scognet#define AT91C_PIO_PC19 ((unsigned int) 1 << 19) // Pin Controlled by PC19 155213496Scognet#define AT91C_PIO_PC20 ((unsigned int) 1 << 20) // Pin Controlled by PC20 156213496Scognet#define AT91C_PIO_PC21 ((unsigned int) 1 << 21) // Pin Controlled by PC21 157213496Scognet#define AT91C_PIO_PC22 ((unsigned int) 1 << 22) // Pin Controlled by PC22 158213496Scognet#define AT91C_PIO_PC23 ((unsigned int) 1 << 23) // Pin Controlled by PC23 159213496Scognet#define AT91C_PIO_PC24 ((unsigned int) 1 << 24) // Pin Controlled by PC24 160213496Scognet#define AT91C_PIO_PC25 ((unsigned int) 1 << 25) // Pin Controlled by PC25 161213496Scognet#define AT91C_PIO_PC26 ((unsigned int) 1 << 26) // Pin Controlled by PC26 162213496Scognet#define AT91C_PIO_PC27 ((unsigned int) 1 << 27) // Pin Controlled by PC27 163213496Scognet#define AT91C_PIO_PC28 ((unsigned int) 1 << 28) // Pin Controlled by PC28 164213496Scognet#define AT91C_PIO_PC29 ((unsigned int) 1 << 29) // Pin Controlled by PC29 165213496Scognet#define AT91C_PIO_PC30 ((unsigned int) 1 << 30) // Pin Controlled by PC30 166213496Scognet#define AT91C_PIO_PC31 ((unsigned int) 1 << 31) // Pin Controlled by PC31 167259378Sian#define AT91C_PIO_PD0 ((unsigned int) 1 << 0) // Pin Controlled by PD0 168259378Sian#define AT91C_PIO_PD1 ((unsigned int) 1 << 1) // Pin Controlled by PD1 169259378Sian#define AT91C_PIO_PD2 ((unsigned int) 1 << 2) // Pin Controlled by PD2 170259378Sian#define AT91C_PIO_PD3 ((unsigned int) 1 << 3) // Pin Controlled by PD3 171259378Sian#define AT91C_PIO_PD4 ((unsigned int) 1 << 4) // Pin Controlled by PD4 172259378Sian#define AT91C_PIO_PD5 ((unsigned int) 1 << 5) // Pin Controlled by PD5 173259378Sian#define AT91C_PIO_PD6 ((unsigned int) 1 << 6) // Pin Controlled by PD6 174259378Sian#define AT91C_PIO_PD7 ((unsigned int) 1 << 7) // Pin Controlled by PD7 175259378Sian#define AT91C_PIO_PD8 ((unsigned int) 1 << 8) // Pin Controlled by PD8 176259378Sian#define AT91C_PIO_PD9 ((unsigned int) 1 << 9) // Pin Controlled by PD9 177259378Sian#define AT91C_PIO_PD10 ((unsigned int) 1 << 10) // Pin Controlled by PD10 178259378Sian#define AT91C_PIO_PD11 ((unsigned int) 1 << 11) // Pin Controlled by PD11 179259378Sian#define AT91C_PIO_PD12 ((unsigned int) 1 << 12) // Pin Controlled by PD12 180259378Sian#define AT91C_PIO_PD13 ((unsigned int) 1 << 13) // Pin Controlled by PD13 181259378Sian#define AT91C_PIO_PD14 ((unsigned int) 1 << 14) // Pin Controlled by PD14 182259378Sian#define AT91C_PIO_PD15 ((unsigned int) 1 << 15) // Pin Controlled by PD15 183259378Sian#define AT91C_PIO_PD16 ((unsigned int) 1 << 16) // Pin Controlled by PD16 184259378Sian#define AT91C_PIO_PD17 ((unsigned int) 1 << 17) // Pin Controlled by PD17 185259378Sian#define AT91C_PIO_PD18 ((unsigned int) 1 << 18) // Pin Controlled by PD18 186259378Sian#define AT91C_PIO_PD19 ((unsigned int) 1 << 19) // Pin Controlled by PD19 187259378Sian#define AT91C_PIO_PD20 ((unsigned int) 1 << 20) // Pin Controlled by PD20 188259378Sian#define AT91C_PIO_PD21 ((unsigned int) 1 << 21) // Pin Controlled by PD21 189259378Sian#define AT91C_PIO_PD22 ((unsigned int) 1 << 22) // Pin Controlled by PD22 190259378Sian#define AT91C_PIO_PD23 ((unsigned int) 1 << 23) // Pin Controlled by PD23 191259378Sian#define AT91C_PIO_PD24 ((unsigned int) 1 << 24) // Pin Controlled by PD24 192259378Sian#define AT91C_PIO_PD25 ((unsigned int) 1 << 25) // Pin Controlled by PD25 193259378Sian#define AT91C_PIO_PD26 ((unsigned int) 1 << 26) // Pin Controlled by PD26 194259378Sian#define AT91C_PIO_PD27 ((unsigned int) 1 << 27) // Pin Controlled by PD27 195259378Sian#define AT91C_PIO_PD28 ((unsigned int) 1 << 28) // Pin Controlled by PD28 196259378Sian#define AT91C_PIO_PD29 ((unsigned int) 1 << 29) // Pin Controlled by PD29 197259378Sian#define AT91C_PIO_PD30 ((unsigned int) 1 << 30) // Pin Controlled by PD30 198259378Sian#define AT91C_PIO_PD31 ((unsigned int) 1 << 31) // Pin Controlled by PD31 199259378Sian#define AT91C_PIO_PE0 ((unsigned int) 1 << 0) // Pin Controlled by PE0 200259378Sian#define AT91C_PIO_PE1 ((unsigned int) 1 << 1) // Pin Controlled by PE1 201259378Sian#define AT91C_PIO_PE2 ((unsigned int) 1 << 2) // Pin Controlled by PE2 202259378Sian#define AT91C_PIO_PE3 ((unsigned int) 1 << 3) // Pin Controlled by PE3 203259378Sian#define AT91C_PIO_PE4 ((unsigned int) 1 << 4) // Pin Controlled by PE4 204259378Sian#define AT91C_PIO_PE5 ((unsigned int) 1 << 5) // Pin Controlled by PE5 205259378Sian#define AT91C_PIO_PE6 ((unsigned int) 1 << 6) // Pin Controlled by PE6 206259378Sian#define AT91C_PIO_PE7 ((unsigned int) 1 << 7) // Pin Controlled by PE7 207259378Sian#define AT91C_PIO_PE8 ((unsigned int) 1 << 8) // Pin Controlled by PE8 208259378Sian#define AT91C_PIO_PE9 ((unsigned int) 1 << 9) // Pin Controlled by PE9 209259378Sian#define AT91C_PIO_PE10 ((unsigned int) 1 << 10) // Pin Controlled by PE10 210259378Sian#define AT91C_PIO_PE11 ((unsigned int) 1 << 11) // Pin Controlled by PE11 211259378Sian#define AT91C_PIO_PE12 ((unsigned int) 1 << 12) // Pin Controlled by PE12 212259378Sian#define AT91C_PIO_PE13 ((unsigned int) 1 << 13) // Pin Controlled by PE13 213259378Sian#define AT91C_PIO_PE14 ((unsigned int) 1 << 14) // Pin Controlled by PE14 214259378Sian#define AT91C_PIO_PE15 ((unsigned int) 1 << 15) // Pin Controlled by PE15 215259378Sian#define AT91C_PIO_PE16 ((unsigned int) 1 << 16) // Pin Controlled by PE16 216259378Sian#define AT91C_PIO_PE17 ((unsigned int) 1 << 17) // Pin Controlled by PE17 217259378Sian#define AT91C_PIO_PE18 ((unsigned int) 1 << 18) // Pin Controlled by PE18 218259378Sian#define AT91C_PIO_PE19 ((unsigned int) 1 << 19) // Pin Controlled by PE19 219259378Sian#define AT91C_PIO_PE20 ((unsigned int) 1 << 20) // Pin Controlled by PE20 220259378Sian#define AT91C_PIO_PE21 ((unsigned int) 1 << 21) // Pin Controlled by PE21 221259378Sian#define AT91C_PIO_PE22 ((unsigned int) 1 << 22) // Pin Controlled by PE22 222259378Sian#define AT91C_PIO_PE23 ((unsigned int) 1 << 23) // Pin Controlled by PE23 223259378Sian#define AT91C_PIO_PE24 ((unsigned int) 1 << 24) // Pin Controlled by PE24 224259378Sian#define AT91C_PIO_PE25 ((unsigned int) 1 << 25) // Pin Controlled by PE25 225259378Sian#define AT91C_PIO_PE26 ((unsigned int) 1 << 26) // Pin Controlled by PE26 226259378Sian#define AT91C_PIO_PE27 ((unsigned int) 1 << 27) // Pin Controlled by PE27 227259378Sian#define AT91C_PIO_PE28 ((unsigned int) 1 << 28) // Pin Controlled by PE28 228259378Sian#define AT91C_PIO_PE29 ((unsigned int) 1 << 29) // Pin Controlled by PE29 229259378Sian#define AT91C_PIO_PE30 ((unsigned int) 1 << 30) // Pin Controlled by PE30 230259378Sian#define AT91C_PIO_PE31 ((unsigned int) 1 << 31) // Pin Controlled by PE31 231213496Scognet 232157089Simp#endif /* ARM_AT91_AT91_PIOREG_H */ 233