xref: /netbsd-src/sys/arch/evbppc/include/walnut.h (revision a1f606d3fd920f2ba34cf18138175513a9930c1f)
1*a1f606d3Slukem /*	$NetBSD: walnut.h,v 1.2 2006/03/08 23:46:23 lukem Exp $	*/
25448df2eSscw 
35448df2eSscw /* include/eval.h, openbios_walnut, walnut_bios 8/10/00 14:35:05 */
45448df2eSscw /*-----------------------------------------------------------------------------+
55448df2eSscw |
65448df2eSscw |       This source code has been made available to you by IBM on an AS-IS
75448df2eSscw |       basis.  Anyone receiving this source is licensed under IBM
85448df2eSscw |       copyrights to use it in any way he or she deems fit, including
95448df2eSscw |       copying it, modifying it, compiling it, and redistributing it either
105448df2eSscw |       with or without modifications.  No license under IBM patents or
115448df2eSscw |       patent applications is to be implied by the copyright license.
125448df2eSscw |
135448df2eSscw |       Any user of this software should understand that IBM cannot provide
145448df2eSscw |       technical support for this software and will not be responsible for
155448df2eSscw |       any consequences resulting from the use of this software.
165448df2eSscw |
175448df2eSscw |       Any person who transfers this source code or any derivative work
185448df2eSscw |       must include the IBM copyright notice, this paragraph, and the
195448df2eSscw |       preceding two paragraphs in the transferred software.
205448df2eSscw |
215448df2eSscw |       COPYRIGHT   I B M   CORPORATION 1995
225448df2eSscw |       LICENSED MATERIAL  -  PROGRAM PROPERTY OF I B M
235448df2eSscw +-----------------------------------------------------------------------------*/
245448df2eSscw /*-----------------------------------------------------------------------------+
255448df2eSscw |
265448df2eSscw |  File Name:   eval.h
275448df2eSscw |
285448df2eSscw |  Function:    Openbios board specific defines. Should contain no
295448df2eSscw |		prototypes since this file gets included in assembly files.
305448df2eSscw |
315448df2eSscw |  Author:      James Burke
325448df2eSscw |
335448df2eSscw |  Change Activity-
345448df2eSscw |
355448df2eSscw |  Date        Description of Change                                       BY
365448df2eSscw |  ---------   ---------------------                                       ---
375448df2eSscw |  11-May-99   Created for Walnut                                          JWB
385448df2eSscw |  01-Jul-99   Made ROM/SRAM non-cacheable in D_CACHEABLE_REGIONS          JWB
395448df2eSscw |  08-Aug-00   Added memory regions and MMIO regions for ROM Monitor debug JWB
405448df2eSscw |  10-Aug-00   Modified PCI memory regions                                 JWB
415448df2eSscw |
425448df2eSscw +-----------------------------------------------------------------------------*/
435448df2eSscw 
445448df2eSscw #ifndef _WALNUT_H_
455448df2eSscw #define _WALNUT_H_
465448df2eSscw 
475448df2eSscw /*----------------------------------------------------------------------------+
485448df2eSscw | 405GP PCI core memory map defines.
495448df2eSscw +----------------------------------------------------------------------------*/
505448df2eSscw #define MIN_PCI_MEMADDR_NOPREFETCH	0x80000000
515448df2eSscw #define MIN_PCI_MEMADDR_PREFETCH	0xc0000000
525448df2eSscw #define MIN_PCI_MEMADDR_VGA    		0x00000000
535448df2eSscw #define MIN_PLB_PCI_IOADDR  0xe8000000  /* PLB side of PCI I/O address space */
545448df2eSscw #define MIN_PCI_PCI_IOADDR  0x00000000  /* PCI side of PCI I/O address space */
555448df2eSscw #define MAX_PCI_DEVICES     5
565448df2eSscw 
575448df2eSscw #define	SRAM_START_ADDR	0xfff00000	/* SRAM starting addr */
585448df2eSscw #define	SRAM_SIZE	0x80000		/* SRAM size - 512K */
595448df2eSscw 
605448df2eSscw /*----------------------------------------------------------------------------+
615448df2eSscw | Universal Interrupt Controller (UIC) events for the Walnut board.
625448df2eSscw +----------------------------------------------------------------------------*/
635448df2eSscw /* Walnut board external IRQs */
645448df2eSscw #define EXT_IRQ_FPGA      	UIC_E0IS   	/* IRQ 25 */
655448df2eSscw #define EXT_IRQ_SMI      	UIC_E1IS        /* IRQ 26 */
665448df2eSscw #define EXT_IRQ_UNUSED 		UIC_E2IS    	/* IRQ 27 */
675448df2eSscw #define EXT_IRQ_PCI_SLOT3 	UIC_E3IS        /* IRQ 28 */
685448df2eSscw #define EXT_IRQ_PCI_SLOT2 	UIC_E4IS        /* IRQ 29 */
695448df2eSscw #define EXT_IRQ_PCI_SLOT1 	UIC_E5IS        /* IRQ 30 */
705448df2eSscw #define EXT_IRQ_PCI_SLOT0 	UIC_E6IS        /* IRQ 31 */
715448df2eSscw 
725448df2eSscw #define EXT_IRQ_CASCADE  	EXT_IRQ_FPGA
735448df2eSscw #define EXT_IRQ_EXPANSION	EXT_IRQ_FPGA
745448df2eSscw #define EXT_IRQ_IR       	EXT_IRQ_FPGA
755448df2eSscw #define EXT_IRQ_KEYBOARD	EXT_IRQ_FPGA
765448df2eSscw #define EXT_IRQ_MOUSE  		EXT_IRQ_FPGA
775448df2eSscw 
785448df2eSscw /*-----------------------------------------------------------------------------+
795448df2eSscw | Defines for the RTC/NVRAM.
805448df2eSscw +-----------------------------------------------------------------------------*/
815448df2eSscw #define NVRAM_BASE      0xf0000000
825448df2eSscw #if 0
835448df2eSscw #define RTC_CONTROL     0x1ff8
845448df2eSscw #define RTC_SECONDS     0x1ff9
855448df2eSscw #define RTC_MINUTES     0x1ffa
865448df2eSscw #define RTC_HOURS       0x1ffb
875448df2eSscw #define RTC_DAY         0x1ffc
885448df2eSscw #define RTC_DATE        0x1ffd
895448df2eSscw #define RTC_MONTH       0x1ffe
905448df2eSscw #define RTC_YEAR        0x1fff
915448df2eSscw #endif
925448df2eSscw 
935448df2eSscw /*-----------------------------------------------------------------------------+
945448df2eSscw | Defines for the Keyboard/Mouse controller.
955448df2eSscw +-----------------------------------------------------------------------------*/
965448df2eSscw #define KEY_MOUSE_BASE  0xf0100000
975448df2eSscw #define KEY_MOUSE_DATA  0x0
985448df2eSscw #define KEY_MOUSE_CMD   0x1  /* write only */
995448df2eSscw #define KEY_MOUSE_STAT  0x1  /* read only */
1005448df2eSscw 
1015448df2eSscw /*-----------------------------------------------------------------------------+
1025448df2eSscw | Defines for FPGA regs.
1035448df2eSscw +-----------------------------------------------------------------------------*/
1045448df2eSscw #define	FPGA_BASE	0xf0300000
1055448df2eSscw #define FPGA_INT_STATUS 0x00    /* Int status - read only 	*/
1065448df2eSscw #define	 FPGA_SW_SMI	  0x10     /* SW_SMI_N present */
1075448df2eSscw #define	 FPGA_EXT_IRQ	  0x08     /* EXT_IRQ present */
1085448df2eSscw #define	 FPGA_IRQ_IRDA	  0x04     /* IRQ_IRDA present */
1095448df2eSscw #define	 FPGA_IRQ_KYBD	  0x02     /* IRQ_KYBD present */
1105448df2eSscw #define	 FPGA_IRQ_MOUSE	  0x01     /* IRQ_MOUSE present */
1115448df2eSscw #define FPGA_INT_ENABLE 0x01    /* Int enable 			*/
1125448df2eSscw       /* FPGA_SW_SMI  */	   /* enable SW_SMI_N */
1135448df2eSscw       /* FPGA_EXT_IRQ  */	   /* enable FPGA_EXT_IRQ */
1145448df2eSscw       /* FPGA_IRQ_IRDA  */	   /* enable FPGA_IRQ_IRDA */
1155448df2eSscw       /* FPGA_IRQ_KYBD  */	   /* enable FPGA_IRQ_KYBD */
1165448df2eSscw       /* FPGA_IRQ_MOUSE  */	   /* enable FPGA_IRQ_MOUSE */
1175448df2eSscw #define FPGA_INT_POL    0x02    /* Int polarity 		*/
1185448df2eSscw       /* FPGA_SW_SMI  */	   /* SW_SMI_N active high/rising */
1195448df2eSscw       /* FPGA_EXT_IRQ  */	   /* FPGA_EXT_IRQ active high/rising */
1205448df2eSscw       /* FPGA_IRQ_IRDA  */	   /* FPGA_IRQ_IRDA active high/rising */
1215448df2eSscw       /* FPGA_IRQ_KYBD  */	   /* FPGA_IRQ_KYBD active high/rising */
1225448df2eSscw       /* FPGA_IRQ_MOUSE  */	   /* FPGA_IRQ_MOUSE active high/rising */
1235448df2eSscw #define FPGA_INT_TRIG   0x03    /* Int type 			*/
1245448df2eSscw       /* FPGA_SW_SMI  */	   /* SW_SMI_N level */
1255448df2eSscw       /* FPGA_EXT_IRQ  */	   /* FPGA_EXT_IRQ level */
1265448df2eSscw       /* FPGA_IRQ_IRDA  */	   /* FPGA_IRQ_IRDA level */
1275448df2eSscw       /* FPGA_IRQ_KYBD  */	   /* FPGA_IRQ_KYBD level */
1285448df2eSscw       /* FPGA_IRQ_MOUSE  */	   /* FPGA_IRQ_MOUSE level */
1295448df2eSscw #define FPGA_BRDC       0x04    /* Board controls 		*/
1305448df2eSscw #define	 FPGA_BRDC_INT	 0x80	   /* IRQ_MOUSE is separate */
1315448df2eSscw #define	 FPGA_BRDC_TC3	 0x10	   /* DMA_EOT/TC3 is set to TC */
1325448df2eSscw #define	 FPGA_BRDC_TC2	 0x08	   /* DMA_EOT/TC2 is set to TC */
1335448df2eSscw #define	 FPGA_BRDC_DIS_EI 0x04	   /* disable expansion interface */
1345448df2eSscw #define	 FPGA_BRDC_EN_INV 0x02	   /* enable invalid address checking */
1355448df2eSscw #define	 FPGA_BRDC_UART_CR 0x01	   /* UART1 is set to CTS/RTS */
1365448df2eSscw #define FPGA_BRDS1      0x05    /* Board status - read only 	*/
1375448df2eSscw #define	 FPGA_BRDS1_CLK  0x04	   /* 405 SDRAM CLK disabled, MPC972 used */
1385448df2eSscw #define	 FPGA_BRDS1_FLASH_EN 0x02  /* On board FLASH disabled */
1395448df2eSscw #define	 FPGA_BRDS1_FLASH_SEL 0x01 /* FLASH at low addr */
1405448df2eSscw #define FPGA_BRDS2      0x06    /* Board status - read only */
1415448df2eSscw #define  SW_CLK_SRC1     0x40      /* if async pci, ext or int clk */
1425448df2eSscw #define	 SW_SEL1	 0x20	   /* use test clock for master clock */
1435448df2eSscw #define	 SW_SEL0	 0x10	   /* use 405GP arbiter */
1445448df2eSscw #define  FSEL_B          0x0c      /* use for mask */
145*a1f606d3Slukem #define  FSEL_SDRAM100   0x01      /* select 100 MHz SDRAM */
146*a1f606d3Slukem #define  FSEL_SDRAM66    0x03      /* select 66 MHz SDRAM */
1475448df2eSscw #define  FSEL_A          0x03      /* use for mask */
148*a1f606d3Slukem #define  FSEL_PCI_66     0x01      /* select 66 MHz async int PCI */
149*a1f606d3Slukem #define  FSEL_PCI_33     0x03      /* select 33 MHz async int PCI */
1505448df2eSscw #define FPGA_SPARE1     0x0e    /* Spare inputs - read only */
1515448df2eSscw #define FPGA_SPARE2     0x0f    /* Spare outputs */
1525448df2eSscw #define	FPGA_SIZE	FPGA_SPARE2
1535448df2eSscw 
1545448df2eSscw #endif /* _WALNUT_H_ */
155