1/* 10G controller driver for Samsung SoCs
2 *
3 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
4 *		http://www.samsung.com
5 *
6 * Author: Byungho An <bh74.an@samsung.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#ifndef __SXGBE_XPCS_H__
13#define __SXGBE_XPCS_H__
14
15/* XPCS Registers */
16#define XPCS_OFFSET			0x1A060000
17#define SR_PCS_MMD_CONTROL1		0x030000
18#define SR_PCS_CONTROL2			0x030007
19#define VR_PCS_MMD_XAUI_MODE_CONTROL	0x038004
20#define VR_PCS_MMD_DIGITAL_STATUS	0x038010
21#define SR_MII_MMD_CONTROL		0x1F0000
22#define SR_MII_MMD_AN_ADV		0x1F0004
23#define SR_MII_MMD_AN_LINK_PARTNER_BA	0x1F0005
24#define VR_MII_MMD_AN_CONTROL		0x1F8001
25#define VR_MII_MMD_AN_INT_STATUS	0x1F8002
26
27#define XPCS_QSEQ_STATE_STABLE		0x10
28#define XPCS_QSEQ_STATE_MPLLOFF		0x1c
29#define XPCS_TYPE_SEL_R			0x00
30#define XPCS_TYPE_SEL_X			0x01
31#define XPCS_TYPE_SEL_W			0x02
32#define XPCS_XAUI_MODE			0x00
33#define XPCS_RXAUI_MODE			0x01
34
35int sxgbe_xpcs_init(struct net_device *ndev);
36int sxgbe_xpcs_init_1G(struct net_device *ndev);
37
38#endif /* __SXGBE_XPCS_H__ */
39