diff options
Diffstat (limited to 'arch/mips/include/asm/mach-au1x00/au1000.h')
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1000.h | 273 |
1 files changed, 223 insertions, 50 deletions
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index de24ec57dd2f..569828d3ccab 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -136,6 +136,7 @@ static inline int au1xxx_cpu_needs_config_od(void) | |||
136 | #define ALCHEMY_CPU_AU1100 2 | 136 | #define ALCHEMY_CPU_AU1100 2 |
137 | #define ALCHEMY_CPU_AU1550 3 | 137 | #define ALCHEMY_CPU_AU1550 3 |
138 | #define ALCHEMY_CPU_AU1200 4 | 138 | #define ALCHEMY_CPU_AU1200 4 |
139 | #define ALCHEMY_CPU_AU1300 5 | ||
139 | 140 | ||
140 | static inline int alchemy_get_cputype(void) | 141 | static inline int alchemy_get_cputype(void) |
141 | { | 142 | { |
@@ -156,6 +157,9 @@ static inline int alchemy_get_cputype(void) | |||
156 | case 0x05030000: | 157 | case 0x05030000: |
157 | return ALCHEMY_CPU_AU1200; | 158 | return ALCHEMY_CPU_AU1200; |
158 | break; | 159 | break; |
160 | case 0x800c0000: | ||
161 | return ALCHEMY_CPU_AU1300; | ||
162 | break; | ||
159 | } | 163 | } |
160 | 164 | ||
161 | return ALCHEMY_CPU_UNKNOWN; | 165 | return ALCHEMY_CPU_UNKNOWN; |
@@ -166,6 +170,7 @@ static inline int alchemy_get_uarts(int type) | |||
166 | { | 170 | { |
167 | switch (type) { | 171 | switch (type) { |
168 | case ALCHEMY_CPU_AU1000: | 172 | case ALCHEMY_CPU_AU1000: |
173 | case ALCHEMY_CPU_AU1300: | ||
169 | return 4; | 174 | return 4; |
170 | case ALCHEMY_CPU_AU1500: | 175 | case ALCHEMY_CPU_AU1500: |
171 | case ALCHEMY_CPU_AU1200: | 176 | case ALCHEMY_CPU_AU1200: |
@@ -243,6 +248,7 @@ extern unsigned long au1xxx_calc_clock(void); | |||
243 | /* PM: arch/mips/alchemy/common/sleeper.S, power.c, irq.c */ | 248 | /* PM: arch/mips/alchemy/common/sleeper.S, power.c, irq.c */ |
244 | void alchemy_sleep_au1000(void); | 249 | void alchemy_sleep_au1000(void); |
245 | void alchemy_sleep_au1550(void); | 250 | void alchemy_sleep_au1550(void); |
251 | void alchemy_sleep_au1300(void); | ||
246 | void au_sleep(void); | 252 | void au_sleep(void); |
247 | 253 | ||
248 | /* USB: drivers/usb/host/alchemy-common.c */ | 254 | /* USB: drivers/usb/host/alchemy-common.c */ |
@@ -251,6 +257,7 @@ enum alchemy_usb_block { | |||
251 | ALCHEMY_USB_UDC0, | 257 | ALCHEMY_USB_UDC0, |
252 | ALCHEMY_USB_EHCI0, | 258 | ALCHEMY_USB_EHCI0, |
253 | ALCHEMY_USB_OTG0, | 259 | ALCHEMY_USB_OTG0, |
260 | ALCHEMY_USB_OHCI1, | ||
254 | }; | 261 | }; |
255 | int alchemy_usb_control(int block, int enable); | 262 | int alchemy_usb_control(int block, int enable); |
256 | 263 | ||
@@ -263,14 +270,92 @@ struct alchemy_pci_platdata { | |||
263 | unsigned long pci_cfg_clr; | 270 | unsigned long pci_cfg_clr; |
264 | }; | 271 | }; |
265 | 272 | ||
266 | /* SOC Interrupt numbers */ | 273 | /* Multifunction pins: Each of these pins can either be assigned to the |
274 | * GPIO controller or a on-chip peripheral. | ||
275 | * Call "au1300_pinfunc_to_dev()" or "au1300_pinfunc_to_gpio()" to | ||
276 | * assign one of these to either the GPIO controller or the device. | ||
277 | */ | ||
278 | enum au1300_multifunc_pins { | ||
279 | /* wake-from-str pins 0-3 */ | ||
280 | AU1300_PIN_WAKE0 = 0, AU1300_PIN_WAKE1, AU1300_PIN_WAKE2, | ||
281 | AU1300_PIN_WAKE3, | ||
282 | /* external clock sources for PSCs: 4-5 */ | ||
283 | AU1300_PIN_EXTCLK0, AU1300_PIN_EXTCLK1, | ||
284 | /* 8bit MMC interface on SD0: 6-9 */ | ||
285 | AU1300_PIN_SD0DAT4, AU1300_PIN_SD0DAT5, AU1300_PIN_SD0DAT6, | ||
286 | AU1300_PIN_SD0DAT7, | ||
287 | /* aux clk input for freqgen 3: 10 */ | ||
288 | AU1300_PIN_FG3AUX, | ||
289 | /* UART1 pins: 11-18 */ | ||
290 | AU1300_PIN_U1RI, AU1300_PIN_U1DCD, AU1300_PIN_U1DSR, | ||
291 | AU1300_PIN_U1CTS, AU1300_PIN_U1RTS, AU1300_PIN_U1DTR, | ||
292 | AU1300_PIN_U1RX, AU1300_PIN_U1TX, | ||
293 | /* UART0 pins: 19-24 */ | ||
294 | AU1300_PIN_U0RI, AU1300_PIN_U0DCD, AU1300_PIN_U0DSR, | ||
295 | AU1300_PIN_U0CTS, AU1300_PIN_U0RTS, AU1300_PIN_U0DTR, | ||
296 | /* UART2: 25-26 */ | ||
297 | AU1300_PIN_U2RX, AU1300_PIN_U2TX, | ||
298 | /* UART3: 27-28 */ | ||
299 | AU1300_PIN_U3RX, AU1300_PIN_U3TX, | ||
300 | /* LCD controller PWMs, ext pixclock: 29-31 */ | ||
301 | AU1300_PIN_LCDPWM0, AU1300_PIN_LCDPWM1, AU1300_PIN_LCDCLKIN, | ||
302 | /* SD1 interface: 32-37 */ | ||
303 | AU1300_PIN_SD1DAT0, AU1300_PIN_SD1DAT1, AU1300_PIN_SD1DAT2, | ||
304 | AU1300_PIN_SD1DAT3, AU1300_PIN_SD1CMD, AU1300_PIN_SD1CLK, | ||
305 | /* SD2 interface: 38-43 */ | ||
306 | AU1300_PIN_SD2DAT0, AU1300_PIN_SD2DAT1, AU1300_PIN_SD2DAT2, | ||
307 | AU1300_PIN_SD2DAT3, AU1300_PIN_SD2CMD, AU1300_PIN_SD2CLK, | ||
308 | /* PSC0/1 clocks: 44-45 */ | ||
309 | AU1300_PIN_PSC0CLK, AU1300_PIN_PSC1CLK, | ||
310 | /* PSCs: 46-49/50-53/54-57/58-61 */ | ||
311 | AU1300_PIN_PSC0SYNC0, AU1300_PIN_PSC0SYNC1, AU1300_PIN_PSC0D0, | ||
312 | AU1300_PIN_PSC0D1, | ||
313 | AU1300_PIN_PSC1SYNC0, AU1300_PIN_PSC1SYNC1, AU1300_PIN_PSC1D0, | ||
314 | AU1300_PIN_PSC1D1, | ||
315 | AU1300_PIN_PSC2SYNC0, AU1300_PIN_PSC2SYNC1, AU1300_PIN_PSC2D0, | ||
316 | AU1300_PIN_PSC2D1, | ||
317 | AU1300_PIN_PSC3SYNC0, AU1300_PIN_PSC3SYNC1, AU1300_PIN_PSC3D0, | ||
318 | AU1300_PIN_PSC3D1, | ||
319 | /* PCMCIA interface: 62-70 */ | ||
320 | AU1300_PIN_PCE2, AU1300_PIN_PCE1, AU1300_PIN_PIOS16, | ||
321 | AU1300_PIN_PIOR, AU1300_PIN_PWE, AU1300_PIN_PWAIT, | ||
322 | AU1300_PIN_PREG, AU1300_PIN_POE, AU1300_PIN_PIOW, | ||
323 | /* camera interface H/V sync inputs: 71-72 */ | ||
324 | AU1300_PIN_CIMLS, AU1300_PIN_CIMFS, | ||
325 | /* PSC2/3 clocks: 73-74 */ | ||
326 | AU1300_PIN_PSC2CLK, AU1300_PIN_PSC3CLK, | ||
327 | }; | ||
328 | |||
329 | /* GPIC (Au1300) pin management: arch/mips/alchemy/common/gpioint.c */ | ||
330 | extern void au1300_pinfunc_to_gpio(enum au1300_multifunc_pins gpio); | ||
331 | extern void au1300_pinfunc_to_dev(enum au1300_multifunc_pins gpio); | ||
332 | extern void au1300_set_irq_priority(unsigned int irq, int p); | ||
333 | extern void au1300_set_dbdma_gpio(int dchan, unsigned int gpio); | ||
334 | |||
335 | /* Au1300 allows to disconnect certain blocks from internal power supply */ | ||
336 | enum au1300_vss_block { | ||
337 | AU1300_VSS_MPE = 0, | ||
338 | AU1300_VSS_BSA, | ||
339 | AU1300_VSS_GPE, | ||
340 | AU1300_VSS_MGP, | ||
341 | }; | ||
267 | 342 | ||
343 | extern void au1300_vss_block_control(int block, int enable); | ||
344 | |||
345 | |||
346 | /* SOC Interrupt numbers */ | ||
347 | /* Au1000-style (IC0/1): 2 controllers with 32 sources each */ | ||
268 | #define AU1000_INTC0_INT_BASE (MIPS_CPU_IRQ_BASE + 8) | 348 | #define AU1000_INTC0_INT_BASE (MIPS_CPU_IRQ_BASE + 8) |
269 | #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) | 349 | #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) |
270 | #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1) | 350 | #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1) |
271 | #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) | 351 | #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) |
272 | #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST | 352 | #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST |
273 | 353 | ||
354 | /* Au1300-style (GPIC): 1 controller with up to 128 sources */ | ||
355 | #define ALCHEMY_GPIC_INT_BASE (MIPS_CPU_IRQ_BASE + 8) | ||
356 | #define ALCHEMY_GPIC_INT_NUM 128 | ||
357 | #define ALCHEMY_GPIC_INT_LAST (ALCHEMY_GPIC_INT_BASE + ALCHEMY_GPIC_INT_NUM - 1) | ||
358 | |||
274 | enum soc_au1000_ints { | 359 | enum soc_au1000_ints { |
275 | AU1000_FIRST_INT = AU1000_INTC0_INT_BASE, | 360 | AU1000_FIRST_INT = AU1000_INTC0_INT_BASE, |
276 | AU1000_UART0_INT = AU1000_FIRST_INT, | 361 | AU1000_UART0_INT = AU1000_FIRST_INT, |
@@ -591,24 +676,77 @@ enum soc_au1200_ints { | |||
591 | 676 | ||
592 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ | 677 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ |
593 | 678 | ||
679 | /* Au1300 peripheral interrupt numbers */ | ||
680 | #define AU1300_FIRST_INT (ALCHEMY_GPIC_INT_BASE) | ||
681 | #define AU1300_UART1_INT (AU1300_FIRST_INT + 17) | ||
682 | #define AU1300_UART2_INT (AU1300_FIRST_INT + 25) | ||
683 | #define AU1300_UART3_INT (AU1300_FIRST_INT + 27) | ||
684 | #define AU1300_SD1_INT (AU1300_FIRST_INT + 32) | ||
685 | #define AU1300_SD2_INT (AU1300_FIRST_INT + 38) | ||
686 | #define AU1300_PSC0_INT (AU1300_FIRST_INT + 48) | ||
687 | #define AU1300_PSC1_INT (AU1300_FIRST_INT + 52) | ||
688 | #define AU1300_PSC2_INT (AU1300_FIRST_INT + 56) | ||
689 | #define AU1300_PSC3_INT (AU1300_FIRST_INT + 60) | ||
690 | #define AU1300_NAND_INT (AU1300_FIRST_INT + 62) | ||
691 | #define AU1300_DDMA_INT (AU1300_FIRST_INT + 75) | ||
692 | #define AU1300_MMU_INT (AU1300_FIRST_INT + 76) | ||
693 | #define AU1300_MPU_INT (AU1300_FIRST_INT + 77) | ||
694 | #define AU1300_GPU_INT (AU1300_FIRST_INT + 78) | ||
695 | #define AU1300_UDMA_INT (AU1300_FIRST_INT + 79) | ||
696 | #define AU1300_TOY_INT (AU1300_FIRST_INT + 80) | ||
697 | #define AU1300_TOY_MATCH0_INT (AU1300_FIRST_INT + 81) | ||
698 | #define AU1300_TOY_MATCH1_INT (AU1300_FIRST_INT + 82) | ||
699 | #define AU1300_TOY_MATCH2_INT (AU1300_FIRST_INT + 83) | ||
700 | #define AU1300_RTC_INT (AU1300_FIRST_INT + 84) | ||
701 | #define AU1300_RTC_MATCH0_INT (AU1300_FIRST_INT + 85) | ||
702 | #define AU1300_RTC_MATCH1_INT (AU1300_FIRST_INT + 86) | ||
703 | #define AU1300_RTC_MATCH2_INT (AU1300_FIRST_INT + 87) | ||
704 | #define AU1300_UART0_INT (AU1300_FIRST_INT + 88) | ||
705 | #define AU1300_SD0_INT (AU1300_FIRST_INT + 89) | ||
706 | #define AU1300_USB_INT (AU1300_FIRST_INT + 90) | ||
707 | #define AU1300_LCD_INT (AU1300_FIRST_INT + 91) | ||
708 | #define AU1300_BSA_INT (AU1300_FIRST_INT + 92) | ||
709 | #define AU1300_MPE_INT (AU1300_FIRST_INT + 93) | ||
710 | #define AU1300_ITE_INT (AU1300_FIRST_INT + 94) | ||
711 | #define AU1300_AES_INT (AU1300_FIRST_INT + 95) | ||
712 | #define AU1300_CIM_INT (AU1300_FIRST_INT + 96) | ||
713 | |||
714 | /**********************************************************************/ | ||
715 | |||
594 | /* | 716 | /* |
595 | * Physical base addresses for integrated peripherals | 717 | * Physical base addresses for integrated peripherals |
596 | * 0..au1000 1..au1500 2..au1100 3..au1550 4..au1200 | 718 | * 0..au1000 1..au1500 2..au1100 3..au1550 4..au1200 5..au1300 |
597 | */ | 719 | */ |
598 | 720 | ||
599 | #define AU1000_AC97_PHYS_ADDR 0x10000000 /* 012 */ | 721 | #define AU1000_AC97_PHYS_ADDR 0x10000000 /* 012 */ |
722 | #define AU1300_ROM_PHYS_ADDR 0x10000000 /* 5 */ | ||
723 | #define AU1300_OTP_PHYS_ADDR 0x10002000 /* 5 */ | ||
724 | #define AU1300_VSS_PHYS_ADDR 0x10003000 /* 5 */ | ||
725 | #define AU1300_UART0_PHYS_ADDR 0x10100000 /* 5 */ | ||
726 | #define AU1300_UART1_PHYS_ADDR 0x10101000 /* 5 */ | ||
727 | #define AU1300_UART2_PHYS_ADDR 0x10102000 /* 5 */ | ||
728 | #define AU1300_UART3_PHYS_ADDR 0x10103000 /* 5 */ | ||
600 | #define AU1000_USB_OHCI_PHYS_ADDR 0x10100000 /* 012 */ | 729 | #define AU1000_USB_OHCI_PHYS_ADDR 0x10100000 /* 012 */ |
601 | #define AU1000_USB_UDC_PHYS_ADDR 0x10200000 /* 0123 */ | 730 | #define AU1000_USB_UDC_PHYS_ADDR 0x10200000 /* 0123 */ |
731 | #define AU1300_GPIC_PHYS_ADDR 0x10200000 /* 5 */ | ||
602 | #define AU1000_IRDA_PHYS_ADDR 0x10300000 /* 02 */ | 732 | #define AU1000_IRDA_PHYS_ADDR 0x10300000 /* 02 */ |
603 | #define AU1200_AES_PHYS_ADDR 0x10300000 /* 4 */ | 733 | #define AU1200_AES_PHYS_ADDR 0x10300000 /* 45 */ |
604 | #define AU1000_IC0_PHYS_ADDR 0x10400000 /* 01234 */ | 734 | #define AU1000_IC0_PHYS_ADDR 0x10400000 /* 01234 */ |
735 | #define AU1300_GPU_PHYS_ADDR 0x10500000 /* 5 */ | ||
605 | #define AU1000_MAC0_PHYS_ADDR 0x10500000 /* 023 */ | 736 | #define AU1000_MAC0_PHYS_ADDR 0x10500000 /* 023 */ |
606 | #define AU1000_MAC1_PHYS_ADDR 0x10510000 /* 023 */ | 737 | #define AU1000_MAC1_PHYS_ADDR 0x10510000 /* 023 */ |
607 | #define AU1000_MACEN_PHYS_ADDR 0x10520000 /* 023 */ | 738 | #define AU1000_MACEN_PHYS_ADDR 0x10520000 /* 023 */ |
608 | #define AU1100_SD0_PHYS_ADDR 0x10600000 /* 24 */ | 739 | #define AU1100_SD0_PHYS_ADDR 0x10600000 /* 245 */ |
740 | #define AU1300_SD1_PHYS_ADDR 0x10601000 /* 5 */ | ||
741 | #define AU1300_SD2_PHYS_ADDR 0x10602000 /* 5 */ | ||
609 | #define AU1100_SD1_PHYS_ADDR 0x10680000 /* 24 */ | 742 | #define AU1100_SD1_PHYS_ADDR 0x10680000 /* 24 */ |
743 | #define AU1300_SYS_PHYS_ADDR 0x10900000 /* 5 */ | ||
610 | #define AU1550_PSC2_PHYS_ADDR 0x10A00000 /* 3 */ | 744 | #define AU1550_PSC2_PHYS_ADDR 0x10A00000 /* 3 */ |
611 | #define AU1550_PSC3_PHYS_ADDR 0x10B00000 /* 3 */ | 745 | #define AU1550_PSC3_PHYS_ADDR 0x10B00000 /* 3 */ |
746 | #define AU1300_PSC0_PHYS_ADDR 0x10A00000 /* 5 */ | ||
747 | #define AU1300_PSC1_PHYS_ADDR 0x10A01000 /* 5 */ | ||
748 | #define AU1300_PSC2_PHYS_ADDR 0x10A02000 /* 5 */ | ||
749 | #define AU1300_PSC3_PHYS_ADDR 0x10A03000 /* 5 */ | ||
612 | #define AU1000_I2S_PHYS_ADDR 0x11000000 /* 02 */ | 750 | #define AU1000_I2S_PHYS_ADDR 0x11000000 /* 02 */ |
613 | #define AU1500_MAC0_PHYS_ADDR 0x11500000 /* 1 */ | 751 | #define AU1500_MAC0_PHYS_ADDR 0x11500000 /* 1 */ |
614 | #define AU1500_MAC1_PHYS_ADDR 0x11510000 /* 1 */ | 752 | #define AU1500_MAC1_PHYS_ADDR 0x11510000 /* 1 */ |
@@ -622,37 +760,96 @@ enum soc_au1200_ints { | |||
622 | #define AU1000_SSI1_PHYS_ADDR 0x11680000 /* 02 */ | 760 | #define AU1000_SSI1_PHYS_ADDR 0x11680000 /* 02 */ |
623 | #define AU1500_GPIO2_PHYS_ADDR 0x11700000 /* 1234 */ | 761 | #define AU1500_GPIO2_PHYS_ADDR 0x11700000 /* 1234 */ |
624 | #define AU1000_IC1_PHYS_ADDR 0x11800000 /* 01234 */ | 762 | #define AU1000_IC1_PHYS_ADDR 0x11800000 /* 01234 */ |
625 | #define AU1000_SYS_PHYS_ADDR 0x11900000 /* 01234 */ | 763 | #define AU1000_SYS_PHYS_ADDR 0x11900000 /* 012345 */ |
626 | #define AU1550_PSC0_PHYS_ADDR 0x11A00000 /* 34 */ | 764 | #define AU1550_PSC0_PHYS_ADDR 0x11A00000 /* 34 */ |
627 | #define AU1550_PSC1_PHYS_ADDR 0x11B00000 /* 34 */ | 765 | #define AU1550_PSC1_PHYS_ADDR 0x11B00000 /* 34 */ |
628 | #define AU1000_MEM_PHYS_ADDR 0x14000000 /* 01234 */ | 766 | #define AU1000_MEM_PHYS_ADDR 0x14000000 /* 01234 */ |
629 | #define AU1000_STATIC_MEM_PHYS_ADDR 0x14001000 /* 01234 */ | 767 | #define AU1000_STATIC_MEM_PHYS_ADDR 0x14001000 /* 01234 */ |
768 | #define AU1300_UDMA_PHYS_ADDR 0x14001800 /* 5 */ | ||
630 | #define AU1000_DMA_PHYS_ADDR 0x14002000 /* 012 */ | 769 | #define AU1000_DMA_PHYS_ADDR 0x14002000 /* 012 */ |
631 | #define AU1550_DBDMA_PHYS_ADDR 0x14002000 /* 34 */ | 770 | #define AU1550_DBDMA_PHYS_ADDR 0x14002000 /* 345 */ |
632 | #define AU1550_DBDMA_CONF_PHYS_ADDR 0x14003000 /* 34 */ | 771 | #define AU1550_DBDMA_CONF_PHYS_ADDR 0x14003000 /* 345 */ |
633 | #define AU1000_MACDMA0_PHYS_ADDR 0x14004000 /* 0123 */ | 772 | #define AU1000_MACDMA0_PHYS_ADDR 0x14004000 /* 0123 */ |
634 | #define AU1000_MACDMA1_PHYS_ADDR 0x14004200 /* 0123 */ | 773 | #define AU1000_MACDMA1_PHYS_ADDR 0x14004200 /* 0123 */ |
635 | #define AU1200_CIM_PHYS_ADDR 0x14004000 /* 4 */ | 774 | #define AU1200_CIM_PHYS_ADDR 0x14004000 /* 45 */ |
636 | #define AU1500_PCI_PHYS_ADDR 0x14005000 /* 13 */ | 775 | #define AU1500_PCI_PHYS_ADDR 0x14005000 /* 13 */ |
637 | #define AU1550_PE_PHYS_ADDR 0x14008000 /* 3 */ | 776 | #define AU1550_PE_PHYS_ADDR 0x14008000 /* 3 */ |
638 | #define AU1200_MAEBE_PHYS_ADDR 0x14010000 /* 4 */ | 777 | #define AU1200_MAEBE_PHYS_ADDR 0x14010000 /* 4 */ |
639 | #define AU1200_MAEFE_PHYS_ADDR 0x14012000 /* 4 */ | 778 | #define AU1200_MAEFE_PHYS_ADDR 0x14012000 /* 4 */ |
779 | #define AU1300_MAEITE_PHYS_ADDR 0x14010000 /* 5 */ | ||
780 | #define AU1300_MAEMPE_PHYS_ADDR 0x14014000 /* 5 */ | ||
640 | #define AU1550_USB_OHCI_PHYS_ADDR 0x14020000 /* 3 */ | 781 | #define AU1550_USB_OHCI_PHYS_ADDR 0x14020000 /* 3 */ |
641 | #define AU1200_USB_CTL_PHYS_ADDR 0x14020000 /* 4 */ | 782 | #define AU1200_USB_CTL_PHYS_ADDR 0x14020000 /* 4 */ |
642 | #define AU1200_USB_OTG_PHYS_ADDR 0x14020020 /* 4 */ | 783 | #define AU1200_USB_OTG_PHYS_ADDR 0x14020020 /* 4 */ |
643 | #define AU1200_USB_OHCI_PHYS_ADDR 0x14020100 /* 4 */ | 784 | #define AU1200_USB_OHCI_PHYS_ADDR 0x14020100 /* 4 */ |
644 | #define AU1200_USB_EHCI_PHYS_ADDR 0x14020200 /* 4 */ | 785 | #define AU1200_USB_EHCI_PHYS_ADDR 0x14020200 /* 4 */ |
645 | #define AU1200_USB_UDC_PHYS_ADDR 0x14022000 /* 4 */ | 786 | #define AU1200_USB_UDC_PHYS_ADDR 0x14022000 /* 4 */ |
787 | #define AU1300_USB_EHCI_PHYS_ADDR 0x14020000 /* 5 */ | ||
788 | #define AU1300_USB_OHCI0_PHYS_ADDR 0x14020400 /* 5 */ | ||
789 | #define AU1300_USB_OHCI1_PHYS_ADDR 0x14020800 /* 5 */ | ||
790 | #define AU1300_USB_CTL_PHYS_ADDR 0x14021000 /* 5 */ | ||
791 | #define AU1300_USB_OTG_PHYS_ADDR 0x14022000 /* 5 */ | ||
792 | #define AU1300_MAEBSA_PHYS_ADDR 0x14030000 /* 5 */ | ||
646 | #define AU1100_LCD_PHYS_ADDR 0x15000000 /* 2 */ | 793 | #define AU1100_LCD_PHYS_ADDR 0x15000000 /* 2 */ |
647 | #define AU1200_LCD_PHYS_ADDR 0x15000000 /* 4 */ | 794 | #define AU1200_LCD_PHYS_ADDR 0x15000000 /* 45 */ |
648 | #define AU1500_PCI_MEM_PHYS_ADDR 0x400000000ULL /* 13 */ | 795 | #define AU1500_PCI_MEM_PHYS_ADDR 0x400000000ULL /* 13 */ |
649 | #define AU1500_PCI_IO_PHYS_ADDR 0x500000000ULL /* 13 */ | 796 | #define AU1500_PCI_IO_PHYS_ADDR 0x500000000ULL /* 13 */ |
650 | #define AU1500_PCI_CONFIG0_PHYS_ADDR 0x600000000ULL /* 13 */ | 797 | #define AU1500_PCI_CONFIG0_PHYS_ADDR 0x600000000ULL /* 13 */ |
651 | #define AU1500_PCI_CONFIG1_PHYS_ADDR 0x680000000ULL /* 13 */ | 798 | #define AU1500_PCI_CONFIG1_PHYS_ADDR 0x680000000ULL /* 13 */ |
652 | #define AU1000_PCMCIA_IO_PHYS_ADDR 0xF00000000ULL /* 01234 */ | 799 | #define AU1000_PCMCIA_IO_PHYS_ADDR 0xF00000000ULL /* 012345 */ |
653 | #define AU1000_PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL /* 01234 */ | 800 | #define AU1000_PCMCIA_ATTR_PHYS_ADDR 0xF40000000ULL /* 012345 */ |
654 | #define AU1000_PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL /* 01234 */ | 801 | #define AU1000_PCMCIA_MEM_PHYS_ADDR 0xF80000000ULL /* 012345 */ |
655 | 802 | ||
803 | /**********************************************************************/ | ||
804 | |||
805 | |||
806 | /* | ||
807 | * Au1300 GPIO+INT controller (GPIC) register offsets and bits | ||
808 | * Registers are 128bits (0x10 bytes), divided into 4 "banks". | ||
809 | */ | ||
810 | #define AU1300_GPIC_PINVAL 0x0000 | ||
811 | #define AU1300_GPIC_PINVALCLR 0x0010 | ||
812 | #define AU1300_GPIC_IPEND 0x0020 | ||
813 | #define AU1300_GPIC_PRIENC 0x0030 | ||
814 | #define AU1300_GPIC_IEN 0x0040 /* int_mask in manual */ | ||
815 | #define AU1300_GPIC_IDIS 0x0050 /* int_maskclr in manual */ | ||
816 | #define AU1300_GPIC_DMASEL 0x0060 | ||
817 | #define AU1300_GPIC_DEVSEL 0x0080 | ||
818 | #define AU1300_GPIC_DEVCLR 0x0090 | ||
819 | #define AU1300_GPIC_RSTVAL 0x00a0 | ||
820 | /* pin configuration space. one 32bit register for up to 128 IRQs */ | ||
821 | #define AU1300_GPIC_PINCFG 0x1000 | ||
822 | |||
823 | #define GPIC_GPIO_TO_BIT(gpio) \ | ||
824 | (1 << ((gpio) & 0x1f)) | ||
825 | |||
826 | #define GPIC_GPIO_BANKOFF(gpio) \ | ||
827 | (((gpio) >> 5) * 4) | ||
828 | |||
829 | /* Pin Control bits: who owns the pin, what does it do */ | ||
830 | #define GPIC_CFG_PC_GPIN 0 | ||
831 | #define GPIC_CFG_PC_DEV 1 | ||
832 | #define GPIC_CFG_PC_GPOLOW 2 | ||
833 | #define GPIC_CFG_PC_GPOHIGH 3 | ||
834 | #define GPIC_CFG_PC_MASK 3 | ||
835 | |||
836 | /* assign pin to MIPS IRQ line */ | ||
837 | #define GPIC_CFG_IL_SET(x) (((x) & 3) << 2) | ||
838 | #define GPIC_CFG_IL_MASK (3 << 2) | ||
839 | |||
840 | /* pin interrupt type setup */ | ||
841 | #define GPIC_CFG_IC_OFF (0 << 4) | ||
842 | #define GPIC_CFG_IC_LEVEL_LOW (1 << 4) | ||
843 | #define GPIC_CFG_IC_LEVEL_HIGH (2 << 4) | ||
844 | #define GPIC_CFG_IC_EDGE_FALL (5 << 4) | ||
845 | #define GPIC_CFG_IC_EDGE_RISE (6 << 4) | ||
846 | #define GPIC_CFG_IC_EDGE_BOTH (7 << 4) | ||
847 | #define GPIC_CFG_IC_MASK (7 << 4) | ||
848 | |||
849 | /* allow interrupt to wake cpu from 'wait' */ | ||
850 | #define GPIC_CFG_IDLEWAKE (1 << 7) | ||
851 | |||
852 | /***********************************************************************/ | ||
656 | 853 | ||
657 | /* Au1000 SDRAM memory controller register offsets */ | 854 | /* Au1000 SDRAM memory controller register offsets */ |
658 | #define AU1000_MEM_SDMODE0 0x0000 | 855 | #define AU1000_MEM_SDMODE0 0x0000 |
@@ -1068,44 +1265,20 @@ enum soc_au1200_ints { | |||
1068 | #define SSI_ENABLE_CD (1 << 1) | 1265 | #define SSI_ENABLE_CD (1 << 1) |
1069 | #define SSI_ENABLE_E (1 << 0) | 1266 | #define SSI_ENABLE_E (1 << 0) |
1070 | 1267 | ||
1071 | /* IrDA Controller */ | 1268 | |
1072 | #define IRDA_BASE 0xB0300000 | 1269 | /* |
1073 | #define IR_RING_PTR_STATUS (IRDA_BASE + 0x00) | 1270 | * The IrDA peripheral has an IRFIRSEL pin, but on the DB/PB boards it's not |
1074 | #define IR_RING_BASE_ADDR_H (IRDA_BASE + 0x04) | 1271 | * used to select FIR/SIR mode on the transceiver but as a GPIO. Instead a |
1075 | #define IR_RING_BASE_ADDR_L (IRDA_BASE + 0x08) | 1272 | * CPLD has to be told about the mode. |
1076 | #define IR_RING_SIZE (IRDA_BASE + 0x0C) | 1273 | */ |
1077 | #define IR_RING_PROMPT (IRDA_BASE + 0x10) | 1274 | #define AU1000_IRDA_PHY_MODE_OFF 0 |
1078 | #define IR_RING_ADDR_CMPR (IRDA_BASE + 0x14) | 1275 | #define AU1000_IRDA_PHY_MODE_SIR 1 |
1079 | #define IR_INT_CLEAR (IRDA_BASE + 0x18) | 1276 | #define AU1000_IRDA_PHY_MODE_FIR 2 |
1080 | #define IR_CONFIG_1 (IRDA_BASE + 0x20) | 1277 | |
1081 | # define IR_RX_INVERT_LED (1 << 0) | 1278 | struct au1k_irda_platform_data { |
1082 | # define IR_TX_INVERT_LED (1 << 1) | 1279 | void(*set_phy_mode)(int mode); |
1083 | # define IR_ST (1 << 2) | 1280 | }; |
1084 | # define IR_SF (1 << 3) | 1281 | |
1085 | # define IR_SIR (1 << 4) | ||
1086 | # define IR_MIR (1 << 5) | ||
1087 | # define IR_FIR (1 << 6) | ||
1088 | # define IR_16CRC (1 << 7) | ||
1089 | # define IR_TD (1 << 8) | ||
1090 | # define IR_RX_ALL (1 << 9) | ||
1091 | # define IR_DMA_ENABLE (1 << 10) | ||
1092 | # define IR_RX_ENABLE (1 << 11) | ||
1093 | # define IR_TX_ENABLE (1 << 12) | ||
1094 | # define IR_LOOPBACK (1 << 14) | ||
1095 | # define IR_SIR_MODE (IR_SIR | IR_DMA_ENABLE | \ | ||
1096 | IR_RX_ALL | IR_RX_ENABLE | IR_SF | IR_16CRC) | ||
1097 | #define IR_SIR_FLAGS (IRDA_BASE + 0x24) | ||
1098 | #define IR_ENABLE (IRDA_BASE + 0x28) | ||
1099 | # define IR_RX_STATUS (1 << 9) | ||
1100 | # define IR_TX_STATUS (1 << 10) | ||
1101 | #define IR_READ_PHY_CONFIG (IRDA_BASE + 0x2C) | ||
1102 | #define IR_WRITE_PHY_CONFIG (IRDA_BASE + 0x30) | ||
1103 | #define IR_MAX_PKT_LEN (IRDA_BASE + 0x34) | ||
1104 | #define IR_RX_BYTE_CNT (IRDA_BASE + 0x38) | ||
1105 | #define IR_CONFIG_2 (IRDA_BASE + 0x3C) | ||
1106 | # define IR_MODE_INV (1 << 0) | ||
1107 | # define IR_ONE_PIN (1 << 1) | ||
1108 | #define IR_INTERFACE_CONFIG (IRDA_BASE + 0x40) | ||
1109 | 1282 | ||
1110 | /* GPIO */ | 1283 | /* GPIO */ |
1111 | #define SYS_PINFUNC 0xB190002C | 1284 | #define SYS_PINFUNC 0xB190002C |