xref: /linux/drivers/net/ethernet/realtek/r8169.h (revision da1d9caf95def6f0320819cf941c9fd1069ba9e1)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* r8169.h: RealTek 8169/8168/8101 ethernet driver.
3  *
4  * Copyright (c) 2002 ShuChen <shuchen@realtek.com.tw>
5  * Copyright (c) 2003 - 2007 Francois Romieu <romieu@fr.zoreil.com>
6  * Copyright (c) a lot of people too. Please respect their work.
7  *
8  * See MAINTAINERS file for support contact information.
9  */
10 
11 #include <linux/types.h>
12 #include <linux/phy.h>
13 
14 enum mac_version {
15 	/* support for ancient RTL_GIGA_MAC_VER_01 has been removed */
16 	RTL_GIGA_MAC_VER_02,
17 	RTL_GIGA_MAC_VER_03,
18 	RTL_GIGA_MAC_VER_04,
19 	RTL_GIGA_MAC_VER_05,
20 	RTL_GIGA_MAC_VER_06,
21 	RTL_GIGA_MAC_VER_07,
22 	RTL_GIGA_MAC_VER_08,
23 	RTL_GIGA_MAC_VER_09,
24 	RTL_GIGA_MAC_VER_10,
25 	RTL_GIGA_MAC_VER_11,
26 	RTL_GIGA_MAC_VER_12,
27 	RTL_GIGA_MAC_VER_13,
28 	RTL_GIGA_MAC_VER_14,
29 	RTL_GIGA_MAC_VER_16,
30 	RTL_GIGA_MAC_VER_17,
31 	RTL_GIGA_MAC_VER_18,
32 	RTL_GIGA_MAC_VER_19,
33 	RTL_GIGA_MAC_VER_20,
34 	RTL_GIGA_MAC_VER_21,
35 	RTL_GIGA_MAC_VER_22,
36 	RTL_GIGA_MAC_VER_23,
37 	RTL_GIGA_MAC_VER_24,
38 	RTL_GIGA_MAC_VER_25,
39 	RTL_GIGA_MAC_VER_26,
40 	/* support for RTL_GIGA_MAC_VER_27 has been removed */
41 	RTL_GIGA_MAC_VER_28,
42 	RTL_GIGA_MAC_VER_29,
43 	RTL_GIGA_MAC_VER_30,
44 	RTL_GIGA_MAC_VER_31,
45 	RTL_GIGA_MAC_VER_32,
46 	RTL_GIGA_MAC_VER_33,
47 	RTL_GIGA_MAC_VER_34,
48 	RTL_GIGA_MAC_VER_35,
49 	RTL_GIGA_MAC_VER_36,
50 	RTL_GIGA_MAC_VER_37,
51 	RTL_GIGA_MAC_VER_38,
52 	RTL_GIGA_MAC_VER_39,
53 	RTL_GIGA_MAC_VER_40,
54 	RTL_GIGA_MAC_VER_41,
55 	RTL_GIGA_MAC_VER_42,
56 	RTL_GIGA_MAC_VER_43,
57 	RTL_GIGA_MAC_VER_44,
58 	RTL_GIGA_MAC_VER_45,
59 	RTL_GIGA_MAC_VER_46,
60 	RTL_GIGA_MAC_VER_47,
61 	RTL_GIGA_MAC_VER_48,
62 	RTL_GIGA_MAC_VER_49,
63 	RTL_GIGA_MAC_VER_50,
64 	RTL_GIGA_MAC_VER_51,
65 	RTL_GIGA_MAC_VER_52,
66 	RTL_GIGA_MAC_VER_53,
67 	RTL_GIGA_MAC_VER_60,
68 	RTL_GIGA_MAC_VER_61,
69 	RTL_GIGA_MAC_VER_63,
70 	RTL_GIGA_MAC_NONE
71 };
72 
73 struct rtl8169_private;
74 
75 void r8169_apply_firmware(struct rtl8169_private *tp);
76 u16 rtl8168h_2_get_adc_bias_ioffset(struct rtl8169_private *tp);
77 u8 rtl8168d_efuse_read(struct rtl8169_private *tp, int reg_addr);
78 void r8169_hw_phy_config(struct rtl8169_private *tp, struct phy_device *phydev,
79 			 enum mac_version ver);
80