1a551c94aSIdo Barnea/*******************************************************************************
2a551c94aSIdo Barnea
3a551c94aSIdo BarneaCopyright (c) 2001-2015, Intel Corporation
4a551c94aSIdo BarneaAll rights reserved.
5a551c94aSIdo Barnea
6a551c94aSIdo BarneaRedistribution and use in source and binary forms, with or without
7a551c94aSIdo Barneamodification, are permitted provided that the following conditions are met:
8a551c94aSIdo Barnea
9a551c94aSIdo Barnea 1. Redistributions of source code must retain the above copyright notice,
10a551c94aSIdo Barnea    this list of conditions and the following disclaimer.
11a551c94aSIdo Barnea
12a551c94aSIdo Barnea 2. Redistributions in binary form must reproduce the above copyright
13a551c94aSIdo Barnea    notice, this list of conditions and the following disclaimer in the
14a551c94aSIdo Barnea    documentation and/or other materials provided with the distribution.
15a551c94aSIdo Barnea
16a551c94aSIdo Barnea 3. Neither the name of the Intel Corporation nor the names of its
17a551c94aSIdo Barnea    contributors may be used to endorse or promote products derived from
18a551c94aSIdo Barnea    this software without specific prior written permission.
19a551c94aSIdo Barnea
20a551c94aSIdo BarneaTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21a551c94aSIdo BarneaAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22a551c94aSIdo BarneaIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23a551c94aSIdo BarneaARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24a551c94aSIdo BarneaLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25a551c94aSIdo BarneaCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26a551c94aSIdo BarneaSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27a551c94aSIdo BarneaINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28a551c94aSIdo BarneaCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29a551c94aSIdo BarneaARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30a551c94aSIdo BarneaPOSSIBILITY OF SUCH DAMAGE.
31a551c94aSIdo Barnea
32a551c94aSIdo Barnea***************************************************************************/
33a551c94aSIdo Barnea
34a551c94aSIdo Barnea#ifndef _E1000_80003ES2LAN_H_
35a551c94aSIdo Barnea#define _E1000_80003ES2LAN_H_
36a551c94aSIdo Barnea
37a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL	0x00
38a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_OFFSET_INB_CTRL	0x02
39a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_OFFSET_HD_CTRL	0x10
40a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_OFFSET_MAC2PHY_OPMODE	0x1F
41a551c94aSIdo Barnea
42a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_FIFO_CTRL_RX_BYPASS	0x0008
43a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_FIFO_CTRL_TX_BYPASS	0x0800
44a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_INB_CTRL_DIS_PADDING	0x0010
45a551c94aSIdo Barnea
46a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_HD_CTRL_10_100_DEFAULT 0x0004
47a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT	0x0000
48a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_OPMODE_E_IDLE		0x2000
49a551c94aSIdo Barnea
50a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_OPMODE_MASK		0x000C
51a551c94aSIdo Barnea#define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO	0x0004
52a551c94aSIdo Barnea
53a551c94aSIdo Barnea#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gig Carry Extend Padding */
54a551c94aSIdo Barnea#define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN	0x00010000
55a551c94aSIdo Barnea
56a551c94aSIdo Barnea#define DEFAULT_TIPG_IPGT_1000_80003ES2LAN	0x8
57a551c94aSIdo Barnea#define DEFAULT_TIPG_IPGT_10_100_80003ES2LAN	0x9
58a551c94aSIdo Barnea
59a551c94aSIdo Barnea/* GG82563 PHY Specific Status Register (Page 0, Register 16 */
60a551c94aSIdo Barnea#define GG82563_PSCR_POLARITY_REVERSAL_DISABLE	0x0002 /* 1=Reversal Dis */
61a551c94aSIdo Barnea#define GG82563_PSCR_CROSSOVER_MODE_MASK	0x0060
62a551c94aSIdo Barnea#define GG82563_PSCR_CROSSOVER_MODE_MDI		0x0000 /* 00=Manual MDI */
63a551c94aSIdo Barnea#define GG82563_PSCR_CROSSOVER_MODE_MDIX	0x0020 /* 01=Manual MDIX */
64a551c94aSIdo Barnea#define GG82563_PSCR_CROSSOVER_MODE_AUTO	0x0060 /* 11=Auto crossover */
65a551c94aSIdo Barnea
66a551c94aSIdo Barnea/* PHY Specific Control Register 2 (Page 0, Register 26) */
67a551c94aSIdo Barnea#define GG82563_PSCR2_REVERSE_AUTO_NEG		0x2000 /* 1=Reverse Auto-Neg */
68a551c94aSIdo Barnea
69a551c94aSIdo Barnea/* MAC Specific Control Register (Page 2, Register 21) */
70a551c94aSIdo Barnea/* Tx clock speed for Link Down and 1000BASE-T for the following speeds */
71a551c94aSIdo Barnea#define GG82563_MSCR_TX_CLK_MASK		0x0007
72a551c94aSIdo Barnea#define GG82563_MSCR_TX_CLK_10MBPS_2_5		0x0004
73a551c94aSIdo Barnea#define GG82563_MSCR_TX_CLK_100MBPS_25		0x0005
74a551c94aSIdo Barnea#define GG82563_MSCR_TX_CLK_1000MBPS_25		0x0007
75a551c94aSIdo Barnea
76a551c94aSIdo Barnea#define GG82563_MSCR_ASSERT_CRS_ON_TX		0x0010 /* 1=Assert */
77a551c94aSIdo Barnea
78a551c94aSIdo Barnea/* DSP Distance Register (Page 5, Register 26)
79a551c94aSIdo Barnea * 0 = <50M
80a551c94aSIdo Barnea * 1 = 50-80M
81a551c94aSIdo Barnea * 2 = 80-100M
82a551c94aSIdo Barnea * 3 = 110-140M
83a551c94aSIdo Barnea * 4 = >140M
84a551c94aSIdo Barnea */
85a551c94aSIdo Barnea#define GG82563_DSPD_CABLE_LENGTH		0x0007
86a551c94aSIdo Barnea
87a551c94aSIdo Barnea/* Kumeran Mode Control Register (Page 193, Register 16) */
88a551c94aSIdo Barnea#define GG82563_KMCR_PASS_FALSE_CARRIER		0x0800
89a551c94aSIdo Barnea
90a551c94aSIdo Barnea/* Max number of times Kumeran read/write should be validated */
91a551c94aSIdo Barnea#define GG82563_MAX_KMRN_RETRY			0x5
92a551c94aSIdo Barnea
93a551c94aSIdo Barnea/* Power Management Control Register (Page 193, Register 20) */
94a551c94aSIdo Barnea/* 1=Enable SERDES Electrical Idle */
95a551c94aSIdo Barnea#define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE	0x0001
96a551c94aSIdo Barnea
97a551c94aSIdo Barnea/* In-Band Control Register (Page 194, Register 18) */
98a551c94aSIdo Barnea#define GG82563_ICR_DIS_PADDING			0x0010 /* Disable Padding */
99a551c94aSIdo Barnea
100a551c94aSIdo Barnea#endif
101