162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * This file is part of the Chelsio T4 Ethernet driver for Linux.
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Copyright (c) 2003-2014 Chelsio Communications, Inc. All rights reserved.
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * This software is available to you under a choice of one of two
762306a36Sopenharmony_ci * licenses.  You may choose to be licensed under the terms of the GNU
862306a36Sopenharmony_ci * General Public License (GPL) Version 2, available from the file
962306a36Sopenharmony_ci * COPYING in the main directory of this source tree, or the
1062306a36Sopenharmony_ci * OpenIB.org BSD license below:
1162306a36Sopenharmony_ci *
1262306a36Sopenharmony_ci *     Redistribution and use in source and binary forms, with or
1362306a36Sopenharmony_ci *     without modification, are permitted provided that the following
1462306a36Sopenharmony_ci *     conditions are met:
1562306a36Sopenharmony_ci *
1662306a36Sopenharmony_ci *      - Redistributions of source code must retain the above
1762306a36Sopenharmony_ci *        copyright notice, this list of conditions and the following
1862306a36Sopenharmony_ci *        disclaimer.
1962306a36Sopenharmony_ci *
2062306a36Sopenharmony_ci *      - Redistributions in binary form must reproduce the above
2162306a36Sopenharmony_ci *        copyright notice, this list of conditions and the following
2262306a36Sopenharmony_ci *        disclaimer in the documentation and/or other materials
2362306a36Sopenharmony_ci *        provided with the distribution.
2462306a36Sopenharmony_ci *
2562306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2662306a36Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2762306a36Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2862306a36Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
2962306a36Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
3062306a36Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
3162306a36Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3262306a36Sopenharmony_ci * SOFTWARE.
3362306a36Sopenharmony_ci */
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci#ifndef __T4_HW_H
3662306a36Sopenharmony_ci#define __T4_HW_H
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci#include <linux/types.h>
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_cienum {
4162306a36Sopenharmony_ci	NCHAN           = 4,    /* # of HW channels */
4262306a36Sopenharmony_ci	MAX_MTU         = 9600, /* max MAC MTU, excluding header + FCS */
4362306a36Sopenharmony_ci	EEPROMSIZE      = 17408,/* Serial EEPROM physical size */
4462306a36Sopenharmony_ci	EEPROMVSIZE     = 32768,/* Serial EEPROM virtual address space size */
4562306a36Sopenharmony_ci	EEPROMPFSIZE    = 1024, /* EEPROM writable area size for PFn, n>0 */
4662306a36Sopenharmony_ci	RSS_NENTRIES    = 2048, /* # of entries in RSS mapping table */
4762306a36Sopenharmony_ci	T6_RSS_NENTRIES = 4096, /* # of entries in RSS mapping table */
4862306a36Sopenharmony_ci	TCB_SIZE        = 128,  /* TCB size */
4962306a36Sopenharmony_ci	NMTUS           = 16,   /* size of MTU table */
5062306a36Sopenharmony_ci	NCCTRL_WIN      = 32,   /* # of congestion control windows */
5162306a36Sopenharmony_ci	NTX_SCHED       = 8,    /* # of HW Tx scheduling queues */
5262306a36Sopenharmony_ci	PM_NSTATS       = 5,    /* # of PM stats */
5362306a36Sopenharmony_ci	T6_PM_NSTATS    = 7,    /* # of PM stats in T6 */
5462306a36Sopenharmony_ci	MBOX_LEN        = 64,   /* mailbox size in bytes */
5562306a36Sopenharmony_ci	TRACE_LEN       = 112,  /* length of trace data and mask */
5662306a36Sopenharmony_ci	FILTER_OPT_LEN  = 36,   /* filter tuple width for optional components */
5762306a36Sopenharmony_ci};
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_cienum {
6062306a36Sopenharmony_ci	CIM_NUM_IBQ    = 6,     /* # of CIM IBQs */
6162306a36Sopenharmony_ci	CIM_NUM_OBQ    = 6,     /* # of CIM OBQs */
6262306a36Sopenharmony_ci	CIM_NUM_OBQ_T5 = 8,     /* # of CIM OBQs for T5 adapter */
6362306a36Sopenharmony_ci	CIMLA_SIZE     = 2048,  /* # of 32-bit words in CIM LA */
6462306a36Sopenharmony_ci	CIM_PIFLA_SIZE = 64,    /* # of 192-bit words in CIM PIF LA */
6562306a36Sopenharmony_ci	CIM_MALA_SIZE  = 64,    /* # of 160-bit words in CIM MA LA */
6662306a36Sopenharmony_ci	CIM_IBQ_SIZE   = 128,   /* # of 128-bit words in a CIM IBQ */
6762306a36Sopenharmony_ci	CIM_OBQ_SIZE   = 128,   /* # of 128-bit words in a CIM OBQ */
6862306a36Sopenharmony_ci	TPLA_SIZE      = 128,   /* # of 64-bit words in TP LA */
6962306a36Sopenharmony_ci	ULPRX_LA_SIZE  = 512,   /* # of 256-bit words in ULP_RX LA */
7062306a36Sopenharmony_ci};
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci/* SGE context types */
7362306a36Sopenharmony_cienum ctxt_type {
7462306a36Sopenharmony_ci	CTXT_EGRESS,
7562306a36Sopenharmony_ci	CTXT_INGRESS,
7662306a36Sopenharmony_ci	CTXT_FLM,
7762306a36Sopenharmony_ci	CTXT_CNM,
7862306a36Sopenharmony_ci};
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_cienum {
8162306a36Sopenharmony_ci	SF_PAGE_SIZE = 256,           /* serial flash page size */
8262306a36Sopenharmony_ci	SF_SEC_SIZE = 64 * 1024,      /* serial flash sector size */
8362306a36Sopenharmony_ci};
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_cienum { RSP_TYPE_FLBUF, RSP_TYPE_CPL, RSP_TYPE_INTR }; /* response entry types */
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_cienum { MBOX_OWNER_NONE, MBOX_OWNER_FW, MBOX_OWNER_DRV };    /* mailbox owners */
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_cienum {
9062306a36Sopenharmony_ci	SGE_MAX_WR_LEN = 512,     /* max WR size in bytes */
9162306a36Sopenharmony_ci	SGE_CTXT_SIZE = 24,       /* size of SGE context */
9262306a36Sopenharmony_ci	SGE_NTIMERS = 6,          /* # of interrupt holdoff timer values */
9362306a36Sopenharmony_ci	SGE_NCOUNTERS = 4,        /* # of interrupt packet counter values */
9462306a36Sopenharmony_ci	SGE_NDBQTIMERS = 8,       /* # of Doorbell Queue Timer values */
9562306a36Sopenharmony_ci	SGE_MAX_IQ_SIZE = 65520,
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci	SGE_TIMER_RSTRT_CNTR = 6, /* restart RX packet threshold counter */
9862306a36Sopenharmony_ci	SGE_TIMER_UPD_CIDX = 7,   /* update cidx only */
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ci	SGE_EQ_IDXSIZE = 64,      /* egress queue pidx/cidx unit size */
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci	SGE_INTRDST_PCI = 0,      /* interrupt destination is PCI-E */
10362306a36Sopenharmony_ci	SGE_INTRDST_IQ = 1,       /*   destination is an ingress queue */
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci	SGE_UPDATEDEL_NONE = 0,   /* ingress queue pidx update delivery */
10662306a36Sopenharmony_ci	SGE_UPDATEDEL_INTR = 1,   /*   interrupt */
10762306a36Sopenharmony_ci	SGE_UPDATEDEL_STPG = 2,   /*   status page */
10862306a36Sopenharmony_ci	SGE_UPDATEDEL_BOTH = 3,   /*   interrupt and status page */
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci	SGE_HOSTFCMODE_NONE = 0,  /* egress queue cidx updates */
11162306a36Sopenharmony_ci	SGE_HOSTFCMODE_IQ = 1,    /*   sent to ingress queue */
11262306a36Sopenharmony_ci	SGE_HOSTFCMODE_STPG = 2,  /*   sent to status page */
11362306a36Sopenharmony_ci	SGE_HOSTFCMODE_BOTH = 3,  /*   ingress queue and status page */
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci	SGE_FETCHBURSTMIN_16B = 0,/* egress queue descriptor fetch minimum */
11662306a36Sopenharmony_ci	SGE_FETCHBURSTMIN_32B = 1,
11762306a36Sopenharmony_ci	SGE_FETCHBURSTMIN_64B = 2,
11862306a36Sopenharmony_ci	SGE_FETCHBURSTMIN_128B = 3,
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ci	SGE_FETCHBURSTMAX_64B = 0,/* egress queue descriptor fetch maximum */
12162306a36Sopenharmony_ci	SGE_FETCHBURSTMAX_128B = 1,
12262306a36Sopenharmony_ci	SGE_FETCHBURSTMAX_256B = 2,
12362306a36Sopenharmony_ci	SGE_FETCHBURSTMAX_512B = 3,
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ci	SGE_CIDXFLUSHTHRESH_1 = 0,/* egress queue cidx flush threshold */
12662306a36Sopenharmony_ci	SGE_CIDXFLUSHTHRESH_2 = 1,
12762306a36Sopenharmony_ci	SGE_CIDXFLUSHTHRESH_4 = 2,
12862306a36Sopenharmony_ci	SGE_CIDXFLUSHTHRESH_8 = 3,
12962306a36Sopenharmony_ci	SGE_CIDXFLUSHTHRESH_16 = 4,
13062306a36Sopenharmony_ci	SGE_CIDXFLUSHTHRESH_32 = 5,
13162306a36Sopenharmony_ci	SGE_CIDXFLUSHTHRESH_64 = 6,
13262306a36Sopenharmony_ci	SGE_CIDXFLUSHTHRESH_128 = 7,
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci	SGE_INGPADBOUNDARY_SHIFT = 5,/* ingress queue pad boundary */
13562306a36Sopenharmony_ci};
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ci/* PCI-e memory window access */
13862306a36Sopenharmony_cienum pcie_memwin {
13962306a36Sopenharmony_ci	MEMWIN_NIC      = 0,
14062306a36Sopenharmony_ci	MEMWIN_RSVD1    = 1,
14162306a36Sopenharmony_ci	MEMWIN_RSVD2    = 2,
14262306a36Sopenharmony_ci	MEMWIN_RDMA     = 3,
14362306a36Sopenharmony_ci	MEMWIN_RSVD4    = 4,
14462306a36Sopenharmony_ci	MEMWIN_FOISCSI  = 5,
14562306a36Sopenharmony_ci	MEMWIN_CSIOSTOR = 6,
14662306a36Sopenharmony_ci	MEMWIN_RSVD7    = 7,
14762306a36Sopenharmony_ci};
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_cistruct sge_qstat {                /* data written to SGE queue status entries */
15062306a36Sopenharmony_ci	__be32 qid;
15162306a36Sopenharmony_ci	__be16 cidx;
15262306a36Sopenharmony_ci	__be16 pidx;
15362306a36Sopenharmony_ci};
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci/*
15662306a36Sopenharmony_ci * Structure for last 128 bits of response descriptors
15762306a36Sopenharmony_ci */
15862306a36Sopenharmony_cistruct rsp_ctrl {
15962306a36Sopenharmony_ci	__be32 hdrbuflen_pidx;
16062306a36Sopenharmony_ci	__be32 pldbuflen_qid;
16162306a36Sopenharmony_ci	union {
16262306a36Sopenharmony_ci		u8 type_gen;
16362306a36Sopenharmony_ci		__be64 last_flit;
16462306a36Sopenharmony_ci	};
16562306a36Sopenharmony_ci};
16662306a36Sopenharmony_ci
16762306a36Sopenharmony_ci#define RSPD_NEWBUF_S    31
16862306a36Sopenharmony_ci#define RSPD_NEWBUF_V(x) ((x) << RSPD_NEWBUF_S)
16962306a36Sopenharmony_ci#define RSPD_NEWBUF_F    RSPD_NEWBUF_V(1U)
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ci#define RSPD_LEN_S    0
17262306a36Sopenharmony_ci#define RSPD_LEN_M    0x7fffffff
17362306a36Sopenharmony_ci#define RSPD_LEN_G(x) (((x) >> RSPD_LEN_S) & RSPD_LEN_M)
17462306a36Sopenharmony_ci
17562306a36Sopenharmony_ci#define RSPD_QID_S    RSPD_LEN_S
17662306a36Sopenharmony_ci#define RSPD_QID_M    RSPD_LEN_M
17762306a36Sopenharmony_ci#define RSPD_QID_G(x) RSPD_LEN_G(x)
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci#define RSPD_GEN_S    7
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ci#define RSPD_TYPE_S    4
18262306a36Sopenharmony_ci#define RSPD_TYPE_M    0x3
18362306a36Sopenharmony_ci#define RSPD_TYPE_G(x) (((x) >> RSPD_TYPE_S) & RSPD_TYPE_M)
18462306a36Sopenharmony_ci
18562306a36Sopenharmony_ci/* Rx queue interrupt deferral fields: counter enable and timer index */
18662306a36Sopenharmony_ci#define QINTR_CNT_EN_S    0
18762306a36Sopenharmony_ci#define QINTR_CNT_EN_V(x) ((x) << QINTR_CNT_EN_S)
18862306a36Sopenharmony_ci#define QINTR_CNT_EN_F    QINTR_CNT_EN_V(1U)
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci#define QINTR_TIMER_IDX_S    1
19162306a36Sopenharmony_ci#define QINTR_TIMER_IDX_M    0x7
19262306a36Sopenharmony_ci#define QINTR_TIMER_IDX_V(x) ((x) << QINTR_TIMER_IDX_S)
19362306a36Sopenharmony_ci#define QINTR_TIMER_IDX_G(x) (((x) >> QINTR_TIMER_IDX_S) & QINTR_TIMER_IDX_M)
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ci/*
19662306a36Sopenharmony_ci * Flash layout.
19762306a36Sopenharmony_ci */
19862306a36Sopenharmony_ci#define FLASH_START(start)	((start) * SF_SEC_SIZE)
19962306a36Sopenharmony_ci#define FLASH_MAX_SIZE(nsecs)	((nsecs) * SF_SEC_SIZE)
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_cienum {
20262306a36Sopenharmony_ci	/*
20362306a36Sopenharmony_ci	 * Various Expansion-ROM boot images, etc.
20462306a36Sopenharmony_ci	 */
20562306a36Sopenharmony_ci	FLASH_EXP_ROM_START_SEC = 0,
20662306a36Sopenharmony_ci	FLASH_EXP_ROM_NSECS = 6,
20762306a36Sopenharmony_ci	FLASH_EXP_ROM_START = FLASH_START(FLASH_EXP_ROM_START_SEC),
20862306a36Sopenharmony_ci	FLASH_EXP_ROM_MAX_SIZE = FLASH_MAX_SIZE(FLASH_EXP_ROM_NSECS),
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_ci	/*
21162306a36Sopenharmony_ci	 * iSCSI Boot Firmware Table (iBFT) and other driver-related
21262306a36Sopenharmony_ci	 * parameters ...
21362306a36Sopenharmony_ci	 */
21462306a36Sopenharmony_ci	FLASH_IBFT_START_SEC = 6,
21562306a36Sopenharmony_ci	FLASH_IBFT_NSECS = 1,
21662306a36Sopenharmony_ci	FLASH_IBFT_START = FLASH_START(FLASH_IBFT_START_SEC),
21762306a36Sopenharmony_ci	FLASH_IBFT_MAX_SIZE = FLASH_MAX_SIZE(FLASH_IBFT_NSECS),
21862306a36Sopenharmony_ci
21962306a36Sopenharmony_ci	/*
22062306a36Sopenharmony_ci	 * Boot configuration data.
22162306a36Sopenharmony_ci	 */
22262306a36Sopenharmony_ci	FLASH_BOOTCFG_START_SEC = 7,
22362306a36Sopenharmony_ci	FLASH_BOOTCFG_NSECS = 1,
22462306a36Sopenharmony_ci	FLASH_BOOTCFG_START = FLASH_START(FLASH_BOOTCFG_START_SEC),
22562306a36Sopenharmony_ci	FLASH_BOOTCFG_MAX_SIZE = FLASH_MAX_SIZE(FLASH_BOOTCFG_NSECS),
22662306a36Sopenharmony_ci
22762306a36Sopenharmony_ci	/*
22862306a36Sopenharmony_ci	 * Location of firmware image in FLASH.
22962306a36Sopenharmony_ci	 */
23062306a36Sopenharmony_ci	FLASH_FW_START_SEC = 8,
23162306a36Sopenharmony_ci	FLASH_FW_NSECS = 16,
23262306a36Sopenharmony_ci	FLASH_FW_START = FLASH_START(FLASH_FW_START_SEC),
23362306a36Sopenharmony_ci	FLASH_FW_MAX_SIZE = FLASH_MAX_SIZE(FLASH_FW_NSECS),
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ci	/* Location of bootstrap firmware image in FLASH.
23662306a36Sopenharmony_ci	 */
23762306a36Sopenharmony_ci	FLASH_FWBOOTSTRAP_START_SEC = 27,
23862306a36Sopenharmony_ci	FLASH_FWBOOTSTRAP_NSECS = 1,
23962306a36Sopenharmony_ci	FLASH_FWBOOTSTRAP_START = FLASH_START(FLASH_FWBOOTSTRAP_START_SEC),
24062306a36Sopenharmony_ci	FLASH_FWBOOTSTRAP_MAX_SIZE = FLASH_MAX_SIZE(FLASH_FWBOOTSTRAP_NSECS),
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ci	/*
24362306a36Sopenharmony_ci	 * iSCSI persistent/crash information.
24462306a36Sopenharmony_ci	 */
24562306a36Sopenharmony_ci	FLASH_ISCSI_CRASH_START_SEC = 29,
24662306a36Sopenharmony_ci	FLASH_ISCSI_CRASH_NSECS = 1,
24762306a36Sopenharmony_ci	FLASH_ISCSI_CRASH_START = FLASH_START(FLASH_ISCSI_CRASH_START_SEC),
24862306a36Sopenharmony_ci	FLASH_ISCSI_CRASH_MAX_SIZE = FLASH_MAX_SIZE(FLASH_ISCSI_CRASH_NSECS),
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ci	/*
25162306a36Sopenharmony_ci	 * FCoE persistent/crash information.
25262306a36Sopenharmony_ci	 */
25362306a36Sopenharmony_ci	FLASH_FCOE_CRASH_START_SEC = 30,
25462306a36Sopenharmony_ci	FLASH_FCOE_CRASH_NSECS = 1,
25562306a36Sopenharmony_ci	FLASH_FCOE_CRASH_START = FLASH_START(FLASH_FCOE_CRASH_START_SEC),
25662306a36Sopenharmony_ci	FLASH_FCOE_CRASH_MAX_SIZE = FLASH_MAX_SIZE(FLASH_FCOE_CRASH_NSECS),
25762306a36Sopenharmony_ci
25862306a36Sopenharmony_ci	/*
25962306a36Sopenharmony_ci	 * Location of Firmware Configuration File in FLASH.  Since the FPGA
26062306a36Sopenharmony_ci	 * "FLASH" is smaller we need to store the Configuration File in a
26162306a36Sopenharmony_ci	 * different location -- which will overlap the end of the firmware
26262306a36Sopenharmony_ci	 * image if firmware ever gets that large ...
26362306a36Sopenharmony_ci	 */
26462306a36Sopenharmony_ci	FLASH_CFG_START_SEC = 31,
26562306a36Sopenharmony_ci	FLASH_CFG_NSECS = 1,
26662306a36Sopenharmony_ci	FLASH_CFG_START = FLASH_START(FLASH_CFG_START_SEC),
26762306a36Sopenharmony_ci	FLASH_CFG_MAX_SIZE = FLASH_MAX_SIZE(FLASH_CFG_NSECS),
26862306a36Sopenharmony_ci
26962306a36Sopenharmony_ci	/* We don't support FLASH devices which can't support the full
27062306a36Sopenharmony_ci	 * standard set of sections which we need for normal
27162306a36Sopenharmony_ci	 * operations.
27262306a36Sopenharmony_ci	 */
27362306a36Sopenharmony_ci	FLASH_MIN_SIZE = FLASH_CFG_START + FLASH_CFG_MAX_SIZE,
27462306a36Sopenharmony_ci
27562306a36Sopenharmony_ci	FLASH_FPGA_CFG_START_SEC = 15,
27662306a36Sopenharmony_ci	FLASH_FPGA_CFG_START = FLASH_START(FLASH_FPGA_CFG_START_SEC),
27762306a36Sopenharmony_ci
27862306a36Sopenharmony_ci	/*
27962306a36Sopenharmony_ci	 * Sectors 32-63 are reserved for FLASH failover.
28062306a36Sopenharmony_ci	 */
28162306a36Sopenharmony_ci};
28262306a36Sopenharmony_ci
28362306a36Sopenharmony_ci#undef FLASH_START
28462306a36Sopenharmony_ci#undef FLASH_MAX_SIZE
28562306a36Sopenharmony_ci
28662306a36Sopenharmony_ci#define SGE_TIMESTAMP_S 0
28762306a36Sopenharmony_ci#define SGE_TIMESTAMP_M 0xfffffffffffffffULL
28862306a36Sopenharmony_ci#define SGE_TIMESTAMP_V(x) ((__u64)(x) << SGE_TIMESTAMP_S)
28962306a36Sopenharmony_ci#define SGE_TIMESTAMP_G(x) (((__u64)(x) >> SGE_TIMESTAMP_S) & SGE_TIMESTAMP_M)
29062306a36Sopenharmony_ci
29162306a36Sopenharmony_ci#define I2C_DEV_ADDR_A0		0xa0
29262306a36Sopenharmony_ci#define I2C_DEV_ADDR_A2		0xa2
29362306a36Sopenharmony_ci#define I2C_PAGE_SIZE		0x100
29462306a36Sopenharmony_ci#define SFP_DIAG_TYPE_ADDR	0x5c
29562306a36Sopenharmony_ci#define SFP_DIAG_TYPE_LEN	0x1
29662306a36Sopenharmony_ci#define SFP_DIAG_ADDRMODE	BIT(2)
29762306a36Sopenharmony_ci#define SFP_DIAG_IMPLEMENTED	BIT(6)
29862306a36Sopenharmony_ci#define SFF_8472_COMP_ADDR	0x5e
29962306a36Sopenharmony_ci#define SFF_8472_COMP_LEN	0x1
30062306a36Sopenharmony_ci#define SFF_REV_ADDR		0x1
30162306a36Sopenharmony_ci#define SFF_REV_LEN		0x1
30262306a36Sopenharmony_ci
30362306a36Sopenharmony_ci#endif /* __T4_HW_H */
304