1*2fa7e141Sandvar /* $NetBSD: aureg.h,v 1.20 2022/04/08 10:17:54 andvar Exp $ */ 2ca42af5eSsimonb 3ca42af5eSsimonb /* 4ca42af5eSsimonb * Copyright 2002 Wasabi Systems, Inc. 5ca42af5eSsimonb * All rights reserved. 6ca42af5eSsimonb * 7ca42af5eSsimonb * Written by Simon Burge for Wasabi Systems, Inc. 8ca42af5eSsimonb * 9ca42af5eSsimonb * Redistribution and use in source and binary forms, with or without 10ca42af5eSsimonb * modification, are permitted provided that the following conditions 11ca42af5eSsimonb * are met: 12ca42af5eSsimonb * 1. Redistributions of source code must retain the above copyright 13ca42af5eSsimonb * notice, this list of conditions and the following disclaimer. 14ca42af5eSsimonb * 2. Redistributions in binary form must reproduce the above copyright 15ca42af5eSsimonb * notice, this list of conditions and the following disclaimer in the 16ca42af5eSsimonb * documentation and/or other materials provided with the distribution. 17ca42af5eSsimonb * 3. All advertising materials mentioning features or use of this software 18ca42af5eSsimonb * must display the following acknowledgement: 19ca42af5eSsimonb * This product includes software developed for the NetBSD Project by 20ca42af5eSsimonb * Wasabi Systems, Inc. 21ca42af5eSsimonb * 4. The name of Wasabi Systems, Inc. may not be used to endorse 22ca42af5eSsimonb * or promote products derived from this software without specific prior 23ca42af5eSsimonb * written permission. 24ca42af5eSsimonb * 25ca42af5eSsimonb * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 26ca42af5eSsimonb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27ca42af5eSsimonb * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28ca42af5eSsimonb * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 29ca42af5eSsimonb * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30ca42af5eSsimonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31ca42af5eSsimonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32ca42af5eSsimonb * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33ca42af5eSsimonb * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34ca42af5eSsimonb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35ca42af5eSsimonb * POSSIBILITY OF SUCH DAMAGE. 36ca42af5eSsimonb */ 37ca42af5eSsimonb 380129c249Sgdamore #ifndef _MIPS_ALCHEMY_AUREG_H 390129c249Sgdamore #define _MIPS_ALCHEMY_AUREG_H 40ca42af5eSsimonb 41ca42af5eSsimonb /************************************************************************/ 42ca42af5eSsimonb /******************** AC97 Controller registers *********************/ 43ca42af5eSsimonb /************************************************************************/ 44ca42af5eSsimonb #define AC97_BASE 0x10000000 45ca42af5eSsimonb 46ca42af5eSsimonb /************************************************************************/ 47ca42af5eSsimonb /*********************** USB Host registers *************************/ 48ca42af5eSsimonb /************************************************************************/ 49ca42af5eSsimonb #define USBH_BASE 0x10100000 500129c249Sgdamore #define AU1550_USBH_BASE 0x14020000 51ca42af5eSsimonb 52ca42af5eSsimonb #define USBH_ENABLE 0x7fffc 530129c249Sgdamore #define USBH_SIZE 0x100000 54ca42af5eSsimonb 55e7b5db7cStron #define AU1550_USBH_ENABLE 0x7ffc 56e7b5db7cStron #define AU1550_USBH_SIZE 0x60000 57ca42af5eSsimonb 58ca42af5eSsimonb /************************************************************************/ 59ca42af5eSsimonb /********************** USB Device registers ************************/ 60ca42af5eSsimonb /************************************************************************/ 61ca42af5eSsimonb #define USBD_BASE 0x10200000 62ca42af5eSsimonb 63ca42af5eSsimonb /************************************************************************/ 64ca42af5eSsimonb /************************* IRDA registers ***************************/ 65ca42af5eSsimonb /************************************************************************/ 66ca42af5eSsimonb #define IRDA_BASE 0x10300000 67ca42af5eSsimonb 68ca42af5eSsimonb /************************************************************************/ 69ca42af5eSsimonb /****************** Interrupt Controller registers ******************/ 70ca42af5eSsimonb /************************************************************************/ 71ca42af5eSsimonb 72ca42af5eSsimonb #define IC0_BASE 0x10400000 73ca42af5eSsimonb #define IC1_BASE 0x11800000 74ca42af5eSsimonb 75ca42af5eSsimonb /* 76ca42af5eSsimonb * The *_READ registers read the current value of the register 77ca42af5eSsimonb * The *_SET registers set to 1 all bits that are written 1 78ca42af5eSsimonb * The *_CLEAR registers clear to zero all bits that are written as 1 79ca42af5eSsimonb */ 80ca42af5eSsimonb #define IC_CONFIG0_READ 0x40 /* See table below */ 81ca42af5eSsimonb #define IC_CONFIG0_SET 0x40 82ca42af5eSsimonb #define IC_CONFIG0_CLEAR 0x44 83ca42af5eSsimonb 84ca42af5eSsimonb #define IC_CONFIG1_READ 0x48 /* See table below */ 85ca42af5eSsimonb #define IC_CONFIG1_SET 0x48 86ca42af5eSsimonb #define IC_CONFIG1_CLEAR 0x4c 87ca42af5eSsimonb 88ca42af5eSsimonb #define IC_CONFIG2_READ 0x50 /* See table below */ 89ca42af5eSsimonb #define IC_CONFIG2_SET 0x50 90ca42af5eSsimonb #define IC_CONFIG2_CLEAR 0x54 91ca42af5eSsimonb 92ca42af5eSsimonb #define IC_REQUEST0_INT 0x54 /* Show active interrupts on request 0 */ 93ca42af5eSsimonb 94ca42af5eSsimonb #define IC_SOURCE_READ 0x58 /* Interrupt source */ 95ca42af5eSsimonb #define IC_SOURCE_SET 0x58 /* 0 - test bit used as source */ 96ca42af5eSsimonb #define IC_SOURCE_CLEAR 0x5c /* 1 - peripheral/GPIO used as source */ 97ca42af5eSsimonb 98ca42af5eSsimonb #define IC_REQUEST1_INT 0x5c /* Show active interrupts on request 1 */ 99ca42af5eSsimonb 100ca42af5eSsimonb #define IC_ASSIGN_REQUEST_READ 0x60 /* Assigns the interrupt to one of the */ 101ca42af5eSsimonb #define IC_ASSIGN_REQUEST_SET 0x60 /* CPU requests (0 - assign to request 1, */ 102ca42af5eSsimonb #define IC_ASSIGN_REQUEST_CLEAR 0x64 /* 1 - assign to request 0) */ 103ca42af5eSsimonb 104ca42af5eSsimonb #define IC_WAKEUP_READ 0x68 /* Controls whether the interrupt can */ 105ca42af5eSsimonb #define IC_WAKEUP_SET 0x68 /* cause a wakeup from IDLE */ 106ca42af5eSsimonb #define IC_WAKEUP_CLEAR 0x6c 107ca42af5eSsimonb 108ca42af5eSsimonb #define IC_MASK_READ 0x70 /* Enables/Disables the interrupt */ 109ca42af5eSsimonb #define IC_MASK_SET 0x70 110ca42af5eSsimonb #define IC_MASK_CLEAR 0x74 111ca42af5eSsimonb 11293728889Sgdamore #define IC_RISING_EDGE 0x78 /* Check/clear rising edge */ 113ca42af5eSsimonb 11493728889Sgdamore #define IC_FALLING_EDGE 0x7c /* Check/clear falling edge */ 115ca42af5eSsimonb 11693728889Sgdamore #define IC_TEST_BIT 0x80 /* single bit source select */ 117ca42af5eSsimonb 118ca42af5eSsimonb /* 119ca42af5eSsimonb * Interrupt Configuration Register Functions 120ca42af5eSsimonb * 121ca42af5eSsimonb * Cfg2[n] Cfg1[n] Cfg0[n] Function 122ca42af5eSsimonb * 0 0 0 Interrupts Disabled 123ca42af5eSsimonb * 0 0 1 Rising Edge Enabled 124ca42af5eSsimonb * 0 1 0 Falling Edge Enabled 125ca42af5eSsimonb * 0 1 1 Rising and Falling Edge Enabled 126ca42af5eSsimonb * 1 0 0 Interrupts Disabled 127ca42af5eSsimonb * 1 0 1 High Level Enabled 128ca42af5eSsimonb * 1 1 0 Low Level Enabled 129ca42af5eSsimonb * 1 1 1 Both Levels and Both Edges Enabled 130ca42af5eSsimonb */ 131ca42af5eSsimonb 132ca42af5eSsimonb /************************************************************************/ 133*2fa7e141Sandvar /************* Programmable Serial Controller registers **************/ 134ac76a40eSshige /************************************************************************/ 135ac76a40eSshige 136fc14a8a6Sshige #define PSC0_BASE 0x11A00000 137fc14a8a6Sshige #define PSC1_BASE 0x11B00000 138fc14a8a6Sshige #define PSC2_BASE 0x10A00000 139fc14a8a6Sshige #define PSC3_BASE 0x10B00000 140ac76a40eSshige 141ac76a40eSshige 142ac76a40eSshige /************************************************************************/ 143ca42af5eSsimonb /********************** Ethernet MAC registers **********************/ 144ca42af5eSsimonb /************************************************************************/ 145ca42af5eSsimonb 146ca42af5eSsimonb #define MAC0_BASE 0x10500000 147ca42af5eSsimonb #define MAC1_BASE 0x10510000 148ca42af5eSsimonb #define MACx_SIZE 0x28 149ca42af5eSsimonb 150f7a378cbSsimonb #define AU1500_MAC0_BASE 0x11500000 /* Grr, different on Au1500 */ 151f7a378cbSsimonb #define AU1500_MAC1_BASE 0x11510000 /* Grr, different on Au1500 */ 152ca42af5eSsimonb 153ca42af5eSsimonb #define MAC0_ENABLE 0x10520000 154ca42af5eSsimonb #define MAC1_ENABLE 0x10520004 155ca42af5eSsimonb #define MACENx_SIZE 0x04 156ca42af5eSsimonb 157f7a378cbSsimonb #define AU1500_MAC0_ENABLE 0x11520000 /* Grr, different on Au1500 */ 158f7a378cbSsimonb #define AU1500_MAC1_ENABLE 0x11520004 /* Grr, different on Au1500 */ 159ca42af5eSsimonb 160ca42af5eSsimonb #define MAC0_DMA_BASE 0x14004000 161ca42af5eSsimonb #define MAC1_DMA_BASE 0x14004200 162ca42af5eSsimonb #define MACx_DMA_SIZE 0x140 163ca42af5eSsimonb 164ca42af5eSsimonb /************************************************************************/ 165bd88c02eSgdamore /********************** Static Bus registers ************************/ 166bd88c02eSgdamore /************************************************************************/ 167bd88c02eSgdamore #define STATIC_BUS_BASE 0x14001000 168bd88c02eSgdamore 169bd88c02eSgdamore /************************************************************************/ 170ca42af5eSsimonb /******************** Secure Digital registers **********************/ 171ca42af5eSsimonb /************************************************************************/ 172ca42af5eSsimonb #define SD0_BASE 0x10600000 173ca42af5eSsimonb #define SD1_BASE 0x10680000 174ca42af5eSsimonb 175ca42af5eSsimonb /************************************************************************/ 176ca42af5eSsimonb /************************* I^2S registers ***************************/ 177ca42af5eSsimonb /************************************************************************/ 178ca42af5eSsimonb #define I2S_BASE 0x11000000 179ca42af5eSsimonb 180ca42af5eSsimonb /************************************************************************/ 181ca42af5eSsimonb /************************** UART registers **************************/ 182ca42af5eSsimonb /************************************************************************/ 183ca42af5eSsimonb 184ca42af5eSsimonb #define UART0_BASE 0x11100000 185ca42af5eSsimonb #define UART1_BASE 0x11200000 186ca42af5eSsimonb #define UART2_BASE 0x11300000 187ca42af5eSsimonb #define UART3_BASE 0x11400000 188ca42af5eSsimonb 189ca42af5eSsimonb /************************************************************************/ 190ca42af5eSsimonb /************************* SSI registers ****************************/ 191ca42af5eSsimonb /************************************************************************/ 192ca42af5eSsimonb #define SSI0_BASE 0x11600000 193ca42af5eSsimonb #define SSI1_BASE 0x11680000 194ca42af5eSsimonb 195ca42af5eSsimonb /************************************************************************/ 196ca42af5eSsimonb /************************ GPIO2 registers ***************************/ 197ca42af5eSsimonb /************************************************************************/ 198bd88c02eSgdamore #define GPIO_BASE 0x11900100 199bd88c02eSgdamore 200bd88c02eSgdamore /************************************************************************/ 201bd88c02eSgdamore /************************ GPIO2 registers ***************************/ 202bd88c02eSgdamore /************************************************************************/ 203ca42af5eSsimonb #define GPIO2_BASE 0x11700000 204ca42af5eSsimonb 205ca42af5eSsimonb /************************************************************************/ 2060a8bdb27Sgdamore /************************* PCI registers ****************************/ 2070a8bdb27Sgdamore /************************************************************************/ 2080a8bdb27Sgdamore #define PCI_BASE 0x14005000 2090a8bdb27Sgdamore #define PCI_HEADER 0x14005100 2100a8bdb27Sgdamore #define PCI_MEM_BASE 0x400000000ULL 2110a8bdb27Sgdamore #define PCI_IO_BASE 0x500000000ULL 2120a8bdb27Sgdamore #define PCI_CONFIG_BASE 0x600000000ULL 2130a8bdb27Sgdamore 2140a8bdb27Sgdamore /************************************************************************/ 215ace199bdSgdamore /*********************** PCMCIA registers ***************************/ 216ace199bdSgdamore /************************************************************************/ 217bd88c02eSgdamore #define PCMCIA_BASE 0xF00000000ULL 218ace199bdSgdamore 219ace199bdSgdamore /************************************************************************/ 220ca42af5eSsimonb /****************** Programmable Counter registers ******************/ 221ca42af5eSsimonb /************************************************************************/ 222ca42af5eSsimonb 223ca42af5eSsimonb #define SYS_BASE 0x11900000 224ca42af5eSsimonb 225ca42af5eSsimonb #define PC_BASE SYS_BASE 226ca42af5eSsimonb 227ca42af5eSsimonb #define PC_TRIM0 0x00 /* PC0 Divide (16 bits) */ 228ca42af5eSsimonb #define PC_COUNTER_WRITE0 0x04 /* set PC0 */ 229ca42af5eSsimonb #define PC_MATCH0_0 0x08 /* match counter & interrupt */ 230ca42af5eSsimonb #define PC_MATCH1_0 0x0c /* match counter & interrupt */ 231ca42af5eSsimonb #define PC_MATCH2_0 0x10 /* match counter & interrupt */ 232ca42af5eSsimonb #define PC_COUNTER_CONTROL 0x14 /* Programmable Counter Control */ 233ca42af5eSsimonb #define CC_E1S 0x00800000 /* Enable PC1 write status */ 234ca42af5eSsimonb #define CC_T1S 0x00100000 /* Trim PC1 write status */ 235ca42af5eSsimonb #define CC_M21 0x00080000 /* Match 2 of PC1 write status */ 236ca42af5eSsimonb #define CC_M11 0x00040000 /* Match 1 of PC1 write status */ 237ca42af5eSsimonb #define CC_M01 0x00020000 /* Match 0 of PC1 write status */ 238ca42af5eSsimonb #define CC_C1S 0x00010000 /* PC1 write status */ 239ca42af5eSsimonb #define CC_BP 0x00004000 /* Bypass OSC (use GPIO1) */ 240ca42af5eSsimonb #define CC_EN1 0x00002000 /* Enable PC1 */ 241ca42af5eSsimonb #define CC_BT1 0x00001000 /* Bypass Trim on PC1 */ 242ca42af5eSsimonb #define CC_EN0 0x00000800 /* Enable PC0 */ 243ca42af5eSsimonb #define CC_BT0 0x00000400 /* Bypass Trim on PC0 */ 244ca42af5eSsimonb #define CC_EO 0x00000100 /* Enable Oscillator */ 245ca42af5eSsimonb #define CC_E0S 0x00000080 /* Enable PC0 write status */ 246ca42af5eSsimonb #define CC_32S 0x00000020 /* 32.768kHz OSC status */ 247ca42af5eSsimonb #define CC_T0S 0x00000010 /* Trim PC0 write status */ 248ca42af5eSsimonb #define CC_M20 0x00000008 /* Match 2 of PC0 write status */ 249ca42af5eSsimonb #define CC_M10 0x00000004 /* Match 1 of PC0 write status */ 250ca42af5eSsimonb #define CC_M00 0x00000002 /* Match 0 of PC0 write status */ 251ca42af5eSsimonb #define CC_C0S 0x00000001 /* PC0 write status */ 252ca42af5eSsimonb #define PC_COUNTER_READ_0 0x40 /* get PC0 */ 253ca42af5eSsimonb #define PC_TRIM1 0x44 /* PC1 Divide (16 bits) */ 254ca42af5eSsimonb #define PC_COUNTER_WRITE1 0x48 /* set PC1 */ 255ca42af5eSsimonb #define PC_MATCH0_1 0x4c /* match counter & interrupt */ 256ca42af5eSsimonb #define PC_MATCH1_1 0x50 /* match counter & interrupt */ 257ca42af5eSsimonb #define PC_MATCH2_1 0x54 /* match counter & interrupt */ 258ca42af5eSsimonb #define PC_COUNTER_READ_1 0x58 /* get PC1 */ 259ca42af5eSsimonb 260ca42af5eSsimonb #define PC_SIZE 0x5c /* size of register set */ 261ca42af5eSsimonb #define PC_RATE 32768 /* counter rate is 32.768kHz */ 26229422429Shpeyerl 26329422429Shpeyerl /************************************************************************/ 26429422429Shpeyerl /******************* Frequency Generator Registers ******************/ 26529422429Shpeyerl /************************************************************************/ 26629422429Shpeyerl 26729422429Shpeyerl #define SYS_FREQCTRL0 (SYS_BASE + 0x20) 26829422429Shpeyerl #define SFC_FRDIV2(f) (f<<22) /* 29:22. Freq Divider 2 */ 26929422429Shpeyerl #define SFC_FE2 (1<<21) /* Freq generator output enable 2 */ 27029422429Shpeyerl #define SFC_FS2 (1<<20) /* Freq generator source 2 */ 27129422429Shpeyerl #define SFC_FRDIV1(f) (f<<12) /* 19:12. Freq Divider 1 */ 27229422429Shpeyerl #define SFC_FE1 (1<<11) /* Freq generator output enable 1 */ 27329422429Shpeyerl #define SFC_FS1 (1<<10) /* Freq generator source 1 */ 27429422429Shpeyerl #define SFC_FRDIV0(f) (f<<2) /* 9:2. Freq Divider 0 */ 27529422429Shpeyerl #define SFC_FE0 2 /* Freq generator output enable 0 */ 27629422429Shpeyerl #define SFC_FS0 1 /* Freq generator source 0 */ 27729422429Shpeyerl 27829422429Shpeyerl #define SYS_FREQCTRL1 (SYS_BASE + 0x24) 27929422429Shpeyerl #define SFC_FRDIV5(f) (f<<22) /* 29:22. Freq Divider 5 */ 28029422429Shpeyerl #define SFC_FE5 (1<<21) /* Freq generator output enable 5 */ 28129422429Shpeyerl #define SFC_FS5 (1<<20) /* Freq generator source 5 */ 28229422429Shpeyerl #define SFC_FRDIV4(f) (f<<12) /* 19:12. Freq Divider 4 */ 28329422429Shpeyerl #define SFC_FE4 (1<<11) /* Freq generator output enable 4 */ 28429422429Shpeyerl #define SFC_FS4 (1<<10) /* Freq generator source 4 */ 28529422429Shpeyerl #define SFC_FRDIV3(f) (f<<2) /* 9:2. Freq Divider 3 */ 28629422429Shpeyerl #define SFC_FE3 2 /* Freq generator output enable 3 */ 28729422429Shpeyerl #define SFC_FS3 1 /* Freq generator source 3 */ 28829422429Shpeyerl 28929422429Shpeyerl /************************************************************************/ 29029422429Shpeyerl /****************** Clock Source Control Registers ******************/ 29129422429Shpeyerl /************************************************************************/ 29229422429Shpeyerl 29329422429Shpeyerl #define SYS_CLKSRC (SYS_BASE + 0x28) 29429422429Shpeyerl #define SCS_ME1(n) (n<<27) /* EXTCLK1 Clock Mux input select */ 29529422429Shpeyerl #define SCS_ME0(n) (n<<22) /* EXTCLK0 Clock Mux input select */ 29629422429Shpeyerl #define SCS_MPC(n) (n<<17) /* PCI clock mux input select */ 29729422429Shpeyerl #define SCS_MUH(n) (n<<12) /* USB Host clock mux input select */ 29829422429Shpeyerl #define SCS_MUD(n) (n<<7) /* USB Device clock mux input select */ 29929422429Shpeyerl #define SCS_MEx_AUX 0x1 /* Aux clock */ 30029422429Shpeyerl #define SCS_MEx_FREQ0 0x2 /* FREQ0 */ 30129422429Shpeyerl #define SCS_MEx_FREQ1 0x3 /* FREQ1 */ 30229422429Shpeyerl #define SCS_MEx_FREQ2 0x4 /* FREQ2 */ 30329422429Shpeyerl #define SCS_MEx_FREQ3 0x5 /* FREQ3 */ 30429422429Shpeyerl #define SCS_MEx_FREQ4 0x6 /* FREQ4 */ 30529422429Shpeyerl #define SCS_MEx_FREQ5 0x7 /* FREQ5 */ 30629422429Shpeyerl #define SCS_DE1 (1<<26) /* EXTCLK1 clock divider select */ 30729422429Shpeyerl #define SCS_CE1 (1<<25) /* EXTCLK1 clock select */ 30829422429Shpeyerl #define SCS_DE0 (1<<21) /* EXTCLK0 clock divider select */ 30929422429Shpeyerl #define SCS_CE0 (1<<20) /* EXTCLK0 clock select */ 31029422429Shpeyerl #define SCS_DPC (1<<16) /* PCI clock divider select */ 31129422429Shpeyerl #define SCS_CPC (1<<15) /* PCI clock select */ 31229422429Shpeyerl #define SCS_DUH (1<<11) /* USB Host clock divider select */ 31329422429Shpeyerl #define SCS_CUH (1<<10) /* USB Host clock select */ 31429422429Shpeyerl #define SCS_DUD (1<<6) /* USB Device clock divider select */ 31529422429Shpeyerl #define SCS_CUD (1<<5) /* USB Device clock select */ 316871bc9f7Sgdamore /* 317871bc9f7Sgdamore * Au1550 bits, needed for PSCs. Note that some bits collide with 318871bc9f7Sgdamore * earlier parts. On Au1550, USB clocks (both device and host) are 319871bc9f7Sgdamore * shared with PSC2, and must be configured for 48MHz. DBAU1550 YAMON 320871bc9f7Sgdamore * does this by default. Also, EXTCLK0 is shared with PSC3. DBAU1550 321871bc9f7Sgdamore * YAMON does not configure any clocks besides PSC2. 322871bc9f7Sgdamore */ 323871bc9f7Sgdamore #define SCS_MP3(n) (n<<22) /* psc3_intclock mux */ 324871bc9f7Sgdamore #define SCS_DP3 (1<<21) /* psc3_intclock divider */ 325871bc9f7Sgdamore #define SCS_CP3 (1<<20) /* psc3_intclock select */ 326871bc9f7Sgdamore #define SCS_MP1(n) (n<<12) /* psc1_intclock mux */ 327871bc9f7Sgdamore #define SCS_DP1 (1<<11) /* psc1_intclock divider */ 328871bc9f7Sgdamore #define SCS_CP1 (1<<10) /* psc1_intclock select */ 329871bc9f7Sgdamore #define SCS_MP0(n) (n<<7) /* psc0_intclock mux */ 330871bc9f7Sgdamore #define SCS_DP0 (1<<6) /* psc0_intclock divider */ 3312e0bf311Sandvar #define SCS_CP0 (1<<5) /* psc0_intclock select */ 332871bc9f7Sgdamore #define SCS_MP2(n) (n<<2) /* psc2_intclock mux */ 333871bc9f7Sgdamore #define SCS_DP2 (1<<1) /* psc2_intclock divider */ 334871bc9f7Sgdamore #define SCS_CP2 (1<<0) /* psc2_intclock select */ 335871bc9f7Sgdamore 336871bc9f7Sgdamore /************************************************************************/ 337871bc9f7Sgdamore /*************************** PIN Function *****************************/ 338871bc9f7Sgdamore /************************************************************************/ 339871bc9f7Sgdamore 340871bc9f7Sgdamore #define SYS_PINFUNC (SYS_BASE + 0x2c) 341871bc9f7Sgdamore #define SPF_PSC3_MASK (7<<20) 342871bc9f7Sgdamore #define SPF_PSC3_AC97 (0<<17) /* select AC97/SPI */ 343871bc9f7Sgdamore #define SPF_PSC3_I2S (1<<17) /* select I2S */ 344871bc9f7Sgdamore #define SPF_PSC3_SMBUS (3<<17) /* select SMbus */ 345871bc9f7Sgdamore #define SPF_PSC3_GPIO (7<<17) /* select gpio215:211 */ 346871bc9f7Sgdamore #define SPF_PSC2_MASK (7<<17) 347871bc9f7Sgdamore #define SPF_PSC2_AC97 (0<<17) /* select AC97/SPI */ 348871bc9f7Sgdamore #define SPF_PSC2_I2S (1<<17) /* select I2S */ 349871bc9f7Sgdamore #define SPF_PSC2_SMBUS (3<<17) /* select SMbus */ 350871bc9f7Sgdamore #define SPF_PSC2_GPIO (7<<17) /* select gpio210:206*/ 351871bc9f7Sgdamore #define SPF_CS (1<<16) /* extclk0 or 32kHz osc */ 352871bc9f7Sgdamore #define SPF_USB (1<<15) /* host or device usb otg */ 353871bc9f7Sgdamore #define SPF_U3T (1<<14) /* uart3 tx or gpio23 */ 354871bc9f7Sgdamore #define SPF_U1R (1<<13) /* uart1 rx or gpio22 */ 355871bc9f7Sgdamore #define SPF_U1T (1<<12) /* uart1 tx or gpio21 */ 356871bc9f7Sgdamore #define SPF_EX1 (1<<10) /* gpio3 or extclk1 */ 357871bc9f7Sgdamore #define SPF_EX0 (1<<9) /* gpio2 or extclk0/32kHz osc*/ 358871bc9f7Sgdamore #define SPF_U3 (1<<7) /* gpio14:9 or uart3 */ 359871bc9f7Sgdamore #define SPF_MBSa (1<<5) /* must be set */ 360871bc9f7Sgdamore #define SPF_NI2 (1<<4) /* enet1 or gpio28:24 */ 361871bc9f7Sgdamore #define SPF_U0 (1<<3) /* uart0 or gpio20 */ 362871bc9f7Sgdamore #define SPF_MBSb (1<<2) /* must be set */ 363871bc9f7Sgdamore #define SPF_S1 (1<<1) /* gpio17 or psc1_sync1 */ 364871bc9f7Sgdamore #define SPF_S0 (1<<0) /* gpio16 or psc0_sync1 */ 36529422429Shpeyerl 36629422429Shpeyerl /************************************************************************/ 36729422429Shpeyerl /*************************** PLL Control *****************************/ 36829422429Shpeyerl /************************************************************************/ 36929422429Shpeyerl 37029422429Shpeyerl #define SYS_CPUPLL (SYS_BASE + 0x60) 37129422429Shpeyerl #define SYS_AUXPLL (SYS_BASE + 0x64) 3720129c249Sgdamore 3730129c249Sgdamore #endif /* _MIPS_ALCHEMY_AUREG_H */ 374