1 1.3 msaitoh /* $NetBSD: ipgphyreg.h,v 1.3 2019/11/21 03:04:21 msaitoh Exp $ */ 2 1.1 msaitoh /* $OpenBSD: ipgphyreg.h,v 1.3 2015/07/19 06:28:12 yuo Exp $ */ 3 1.1 msaitoh 4 1.1 msaitoh /*- 5 1.1 msaitoh * Copyright (c) 2006, Pyun YongHyeon 6 1.1 msaitoh * All rights reserved. 7 1.1 msaitoh * 8 1.1 msaitoh * Redistribution and use in source and binary forms, with or without 9 1.1 msaitoh * modification, are permitted provided that the following conditions 10 1.1 msaitoh * are met: 11 1.1 msaitoh * 1. Redistributions of source code must retain the above copyright 12 1.1 msaitoh * notice unmodified, this list of conditions, and the following 13 1.1 msaitoh * disclaimer. 14 1.1 msaitoh * 2. Redistributions in binary form must reproduce the above copyright 15 1.1 msaitoh * notice, this list of conditions and the following disclaimer in the 16 1.1 msaitoh * documentation and/or other materials provided with the distribution. 17 1.1 msaitoh * 18 1.1 msaitoh * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 1.1 msaitoh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 1.1 msaitoh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 1.1 msaitoh * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22 1.1 msaitoh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 1.1 msaitoh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 1.1 msaitoh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 1.1 msaitoh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 1.1 msaitoh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 1.1 msaitoh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 1.1 msaitoh * SUCH DAMAGE. 29 1.1 msaitoh * 30 1.1 msaitoh */ 31 1.1 msaitoh 32 1.1 msaitoh #ifndef _DEV_MII_IPGPHYREG_H_ 33 1.1 msaitoh #define _DEV_MII_IPGPHYREG_H_ 34 1.1 msaitoh 35 1.1 msaitoh /* 36 1.1 msaitoh * Registers for the IC Plus IPGA internal PHY. 37 1.1 msaitoh */ 38 1.1 msaitoh 39 1.1 msaitoh /* PHY specific control & status register. IP1001 only. */ 40 1.2 msaitoh #define IPGPHY_SCSR 0x10 41 1.2 msaitoh #define IPGPHY_SCSR_RXPHASE_SEL 0x0001 42 1.2 msaitoh #define IPGPHY_SCSR_TXPHASE_SEL 0x0002 43 1.1 msaitoh #define IPGPHY_SCSR_REPEATOR_MODE 0x0004 44 1.1 msaitoh #define IPGPHY_SCSR_RESERVED1_DEF 0x0008 45 1.1 msaitoh #define IPGPHY_SCSR_RXCLK_DRV_MASK 0x0060 46 1.1 msaitoh #define IPGPHY_SCSR_RXCLK_DRV_DEF 0x0040 47 1.1 msaitoh #define IPGPHY_SCSR_RXD_DRV_MASK 0x0180 48 1.2 msaitoh #define IPGPHY_SCSR_RXD_DRV_DEF 0x0100 49 1.2 msaitoh #define IPGPHY_SCSR_JABBER_ENB 0x0200 50 1.1 msaitoh #define IPGPHY_SCSR_HEART_BEAT_ENB 0x0400 51 1.1 msaitoh #define IPGPHY_SCSR_DOWNSHIFT_ENB 0x0800 52 1.1 msaitoh #define IPGPHY_SCSR_RESERVED2_DEF 0x1000 53 1.2 msaitoh #define IPGPHY_SCSR_LED_DRV_4MA 0x0000 54 1.2 msaitoh #define IPGPHY_SCSR_LED_DRV_8MA 0x2000 55 1.1 msaitoh #define IPGPHY_SCSR_LED_MODE_MASK 0xC000 56 1.1 msaitoh #define IPGPHY_SCSR_LED_MODE_DEF 0x0000 57 1.1 msaitoh 58 1.1 msaitoh /* PHY link status register. IP1001 only. */ 59 1.2 msaitoh #define IPGPHY_LSR 0x11 60 1.2 msaitoh #define IPGPHY_LSR_JABBER_DET 0x0200 61 1.1 msaitoh #define IPGPHY_LSR_APS_SLEEP 0x0400 62 1.2 msaitoh #define IPGPHY_LSR_MDIX 0x0800 63 1.2 msaitoh #define IPGPHY_LSR_FULL_DUPLEX 0x1000 64 1.1 msaitoh #define IPGPHY_LSR_SPEED_10 0x0000 65 1.1 msaitoh #define IPGPHY_LSR_SPEED_100 0x2000 66 1.2 msaitoh #define IPGPHY_LSR_SPEED_1000 0x4000 67 1.2 msaitoh #define IPGPHY_LSR_SPEED_MASK 0x6000 68 1.1 msaitoh #define IPGPHY_LSR_LINKUP 0x8000 69 1.1 msaitoh 70 1.1 msaitoh /* PHY specific control register 2. IP1001 only. */ 71 1.2 msaitoh #define IPGPHY_SCR 0x14 72 1.1 msaitoh #define IPGPHY_SCR_SEW_RATE_MASK 0x0003 73 1.2 msaitoh #define IPGPHY_SCR_SEW_RATE_DEF 0x0003 74 1.2 msaitoh #define IPGPHY_SCR_AUTO_XOVER 0x0004 75 1.1 msaitoh #define IPGPHY_SCR_SPEED_10_100_ENB 0x0040 76 1.1 msaitoh #define IPGPHY_SCR_FIFO_LATENCY_2 0x0000 77 1.1 msaitoh #define IPGPHY_SCR_FIFO_LATENCY_3 0x0080 78 1.1 msaitoh #define IPGPHY_SCR_FIFO_LATENCY_4 0x0100 79 1.1 msaitoh #define IPGPHY_SCR_FIFO_LATENCY_5 0x0180 80 1.1 msaitoh #define IPGPHY_SCR_MDIX_ENB 0x0200 81 1.2 msaitoh #define IPGPHY_SCR_RESERVED_DEF 0x0400 82 1.1 msaitoh #define IPGPHY_SCR_APS_ON 0x0800 83 1.1 msaitoh 84 1.1 msaitoh #endif /* _DEV_MII_IPGPHYREG_H_ */ 85