net/e1000/base: add missing device ID
[dpdk.git] / drivers / net / e1000 / base / e1000_defines.h
index 8e40771..41a2b5c 100644 (file)
@@ -1,35 +1,6 @@
-/*******************************************************************************
-
-Copyright (c) 2001-2015, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the Intel Corporation nor the names of its
-    contributors may be used to endorse or promote products derived from
-    this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-***************************************************************************/
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2001 - 2015 Intel Corporation
+ */
 
 #ifndef _E1000_DEFINES_H_
 #define _E1000_DEFINES_H_
@@ -198,6 +169,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #define E1000_RCTL_DTYP_PS     0x00000400 /* Packet Split descriptor */
 #define E1000_RCTL_RDMTS_HALF  0x00000000 /* Rx desc min thresh size */
 #define E1000_RCTL_RDMTS_HEX   0x00010000
+#define E1000_RCTL_RDMTS1_HEX  E1000_RCTL_RDMTS_HEX
 #define E1000_RCTL_MO_SHIFT    12 /* multicast offset shift */
 #define E1000_RCTL_MO_3                0x00003000 /* multicast offset 15:4 */
 #define E1000_RCTL_BAM         0x00008000 /* broadcast enable */
@@ -279,6 +251,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #define E1000_CTRL_SWDPIO0     0x00400000 /* SWDPIN 0 Input or output */
 #define E1000_CTRL_SWDPIO2     0x01000000 /* SWDPIN 2 input or output */
 #define E1000_CTRL_SWDPIO3     0x02000000 /* SWDPIN 3 input or output */
+#define E1000_CTRL_DEV_RST     0x20000000 /* Device reset */
 #define E1000_CTRL_RST         0x04000000 /* Global reset */
 #define E1000_CTRL_RFCE                0x08000000 /* Receive Flow Control enable */
 #define E1000_CTRL_TFCE                0x10000000 /* Transmit flow control enable */
@@ -343,6 +316,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #define E1000_STATUS_PCIX_SPEED_66     0x00000000 /* PCI-X bus spd 50-66MHz */
 #define E1000_STATUS_PCIX_SPEED_100    0x00004000 /* PCI-X bus spd 66-100MHz */
 #define E1000_STATUS_PCIX_SPEED_133    0x00008000 /* PCI-X bus spd 100-133MHz*/
+#define E1000_STATUS_PCIM_STATE                0x40000000 /* PCIm function state */
 
 #define SPEED_10       10
 #define SPEED_100      100
@@ -442,8 +416,8 @@ POSSIBILITY OF SUCH DAMAGE.
 #define E1000_RFCTL_LEF                        0x00040000
 
 /* Collision related configuration parameters */
-#define E1000_COLLISION_THRESHOLD      15
 #define E1000_CT_SHIFT                 4
+#define E1000_COLLISION_THRESHOLD      15
 #define E1000_COLLISION_DISTANCE       63
 #define E1000_COLD_SHIFT               12
 
@@ -468,6 +442,8 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #define ETHERNET_FCS_SIZE              4
 #define MAX_JUMBO_FRAME_SIZE           0x3F00
+/* The datasheet maximum supported RX size is 9.5KB (9728 bytes) */
+#define MAX_RX_JUMBO_FRAME_SIZE                0x2600
 #define E1000_TX_PTR_GAP               0x1F
 
 /* Extended Configuration Control and Size */
@@ -751,6 +727,12 @@ POSSIBILITY OF SUCH DAMAGE.
 #define E1000_TSYNCTXCTL_VALID         0x00000001 /* Tx timestamp valid */
 #define E1000_TSYNCTXCTL_ENABLED       0x00000010 /* enable Tx timestamping */
 
+/* HH Time Sync */
+#define E1000_TSYNCTXCTL_MAX_ALLOWED_DLY_MASK  0x0000F000 /* max delay */
+#define E1000_TSYNCTXCTL_SYNC_COMP_ERR         0x20000000 /* sync err */
+#define E1000_TSYNCTXCTL_SYNC_COMP             0x40000000 /* sync complete */
+#define E1000_TSYNCTXCTL_START_SYNC            0x80000000 /* initiate sync */
+
 #define E1000_TSYNCRXCTL_VALID         0x00000001 /* Rx timestamp valid */
 #define E1000_TSYNCRXCTL_TYPE_MASK     0x0000000E /* Rx type mask */
 #define E1000_TSYNCRXCTL_TYPE_L2_V2    0x00
@@ -790,6 +772,17 @@ POSSIBILITY OF SUCH DAMAGE.
 #define E1000_TIMINCA_INCPERIOD_SHIFT  24
 #define E1000_TIMINCA_INCVALUE_MASK    0x00FFFFFF
 
+/* ETQF register bit definitions */
+#define E1000_ETQF_1588                        (1 << 30)
+#define E1000_FTQF_VF_BP               0x00008000
+#define E1000_FTQF_1588_TIME_STAMP     0x08000000
+#define E1000_FTQF_MASK                        0xF0000000
+#define E1000_FTQF_MASK_PROTO_BP       0x10000000
+/* Immediate Interrupt Rx (A.K.A. Low Latency Interrupt) */
+#define E1000_IMIREXT_CTRL_BP  0x00080000  /* Bypass check of ctrl bits */
+#define E1000_IMIREXT_SIZE_BP  0x00001000  /* Packet size bypass */
+
+#define E1000_RXDADV_STAT_TSIP         0x08000 /* timestamp in packet */
 #define E1000_TSICR_TXTS               0x00000002
 #define E1000_TSIM_TXTS                        0x00000002
 /* TUPLE Filtering Configuration */
@@ -847,6 +840,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #define E1000_M88E1543_PAGE_ADDR       0x16       /* Page Offset Register */
 #define E1000_M88E1543_EEE_CTRL_1      0x0
 #define E1000_M88E1543_EEE_CTRL_1_MS   0x0001     /* EEE Master/Slave */
+#define E1000_M88E1543_FIBER_CTRL      0x0        /* Fiber Control Register */
 #define E1000_EEE_ADV_DEV_I354         7
 #define E1000_EEE_ADV_ADDR_I354                60
 #define E1000_EEE_ADV_100_SUPPORTED    (1 << 1)   /* 100BaseTx EEE Supported */
@@ -1264,6 +1258,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #define I350_I_PHY_ID          0x015403B0
 #define I210_I_PHY_ID          0x01410C00
 #define IGP04E1000_E_PHY_ID    0x02A80391
+#define BCM54616_E_PHY_ID      0x03625D10
 #define M88_VENDOR             0x0141
 
 /* M88E1000 Specific Registers */