pixisreg.h revision 1.1.2.1       1 /*	$NetBSD: pixisreg.h,v 1.1.2.1 2011/01/07 01:40:36 matt Exp $	*/
      2 /*-
      3  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
      4  * All rights reserved.
      5  *
      6  * This code is derived from software contributed to The NetBSD Foundation
      7  * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects
      8  * Agency and which was developed by Matt Thomas of 3am Software Foundry.
      9  *
     10  * This material is based upon work supported by the Defense Advanced Research
     11  * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under
     12  * Contract No. N66001-09-C-2073.
     13  * Approved for Public Release, Distribution Unlimited
     14  *
     15  * Redistribution and use in source and binary forms, with or without
     16  * modification, are permitted provided that the following conditions
     17  * are met:
     18  * 1. Redistributions of source code must retain the above copyright
     19  *    notice, this list of conditions and the following disclaimer.
     20  * 2. Redistributions in binary form must reproduce the above copyright
     21  *    notice, this list of conditions and the following disclaimer in the
     22  *    documentation and/or other materials provided with the distribution.
     23  *
     24  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     25  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     26  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     27  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     28  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     34  * POSSIBILITY OF SUCH DAMAGE.
     35  */
     36 
     37 #ifndef _MPC85XX_PIXISREG_H_
     38 #define _MPC85XX_PIXISREG_H_
     39 
     40 #define	PX_BASE		0xffdf0000
     41 
     42 #define	PX_ID		0x00	/* System ID register */
     43 #define	PX_VER		0x01	/* System version register */
     44 #define	PX_VER_ID	__BITS(4,7)
     45 #define	PX_VER_ID_GET(n) __SHIFTOUT((n), PX_VER_ID)
     46 #define	PX_VER_REV	__BITS(0,3)
     47 #define	PX_VER_REV_GET(n) __SHIFTOUT((n), PX_VER_ID)
     48 #define	PX_PVER		0x02	/* System version register */
     49 #define	PX_CSR		0x03	/* General control/status register */
     50 #define	PX_CSR_ASLEEP	__BIT(6)
     51 #define	PX_CSR_EVES	__BITS(2,3)
     52 #define	PX_CSR_EVES_GET(n)	__SHIFTOUT((n), PX_CSR_EVES)
     53 #define	PX_CSR_PASS	__BIT(1)
     54 #define	PX_CSR_FAIL	__BIT(0)
     55 #define	PX_RST		0x04	/* Reset control register */
     56 #define	PX_RST_ALL	__BIT(7) /* if set to 0 a full system reset is initiated */
     57 #define	PX_RST_PCIE1	__BIT(6) /* If 1: RST_PCIE1* is deasserted and the slot is out of reset. */
     58 #define	PX_RST_PCIE2	__BIT(5) /* If 1: RST_PCIE2* is deasserted and the slot is out of reset. */
     59 #define	PX_RST_PCIE3	__BIT(4) /* If 1: RST_PCIE3* is deasserted and the slot is out of reset. */
     60 #define	PX_RST_USB	__BIT(3) /* If 0: RST_USB3300 is deasserted and the devices are out of reset. */
     61 #define	PX_RST_PHY	__BIT(2) /* If 1: PHY_RST* is deasserted and the device is out of reset. */
     62 #define	PX_RST_LB	__BIT(1) /* If 1: LB_RST* is deasserted and the device is out of reset. */
     63 #define	PX_RST_GEN	__BIT(0) /* If 1: GEN_RST* is deasserted and the devices are out of reset. */
     64 #define	PX_RST2		0x05	/* Reset control register 2 */
     65 #define	PX_RST2_SGMII	__BIT(1) /* If 1: RST_SGMII_SLOT* is deasserted and the device is out of reset. */
     66 #define	PX_RST2_PCI	__BIT(0) /* If 1: RST_PCI_SLOT* is deasserted and the devices are out of reset. */
     67 #define	PX_AUX1		0x06	/* Auxiliary 1 register */
     68 #define	PX_SPD		0x07	/* Speed register */
     69 #define	PX_SPD_SYSCLK	__BITS(0,2)
     70 #define	PX_SPD_SYSCLK_GET(n)	__SHIFTOUT((n), PX_SPD_SYSCLK)
     71 #define	PX_SPD_33MHZ	0
     72 #define	PX_SPD_40MHZ	1
     73 #define	PX_SPD_50MHZ	2
     74 #define	PX_SPD_66MHZ	3
     75 #define	PX_SPD_83MHZ	4
     76 #define	PX_SPD_100MHZ	5
     77 #define	PX_SPD_133MHZ	6
     78 #define	PX_SPD_166MHZ	7
     79 #define	PX_SPD_DDRCLK	__BITS(3,5)
     80 #define	PX_SPD_DDRCLK_GET(n)	__SHIFTOUT((n), PX_SPD_DDRCLK)
     81 #define	PX_AUX2		0x08	/* Auxiliary 2 register */
     82 #define	PX_CSR2		0x09	/* General control/status register 2 */
     83 #define PX_CSR2_MMC_8BITEN	__BIT(7)
     84 #define PX_CSR2_SDSEL_EN	__BIT(6)
     85 #define PX_CSR2_MMC_8BIT	__BIT(4)
     86 #define PX_CSR2_SDSEK		__BIT(3)
     87 #define	PX_VWATCH	0x0a	/* VELA watchdog register */
     88 #define	PX_LED		0x0b	/* LED data register */
     89 #define	PX_PWR		0x0c	/* Power status register */
     90 #define	PX_VCTRL	0x10	/* VELA control register */
     91 
     92 #endif /* !_MPC85XX_PIXISREG_H_ */
     93