OSDN Git Service

Add rtl8821ce driver version 5.5.2
[android-x86/external-kernel-drivers.git] / rtl8821ce / hal / halmac / halmac_88xx / halmac_8821c / halmac_phy_8821c.c
1 /******************************************************************************
2  *
3  * Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15
16 #include "../../halmac_type.h"
17 #if HALMAC_USB_SUPPORT
18 #include "halmac_usb_8821c.h"
19 #endif
20 #if HALMAC_PCIE_SUPPORT
21 #include "halmac_pcie_8821c.h"
22 #endif
23
24 /**
25  * ============ip sel item list============
26  * HALMAC_IP_INTF_PHY
27  *      USB2 : usb2 phy, 1byte value
28  *      USB3 : usb3 phy, 2byte value
29  *      PCIE1 : pcie gen1 mdio, 2byte value
30  *      PCIE2 : pcie gen2 mdio, 2byte value
31  * HALMAC_IP_SEL_MAC
32  *      USB2, USB3, PCIE1, PCIE2 : mac ip, 1byte value
33  * HALMAC_IP_PCIE_DBI
34  *      USB2 USB3 : none
35  *      PCIE1, PCIE2 : pcie dbi, 1byte value
36  */
37
38 #if HALMAC_8821C_SUPPORT
39
40 struct halmac_intf_phy_para usb2_phy_param_8821c[] = {
41         /* {offset, value, ip sel, cut mask, platform mask} */
42         {0xFFFF, 0x00,
43          HALMAC_IP_INTF_PHY,
44          HALMAC_INTF_PHY_CUT_ALL,
45          HALMAC_INTF_PHY_PLATFORM_ALL},
46 };
47
48 struct halmac_intf_phy_para usb3_phy_param_8821c[] = {
49         /* {offset, value, cut mask, platform mask} */
50         {0xFFFF, 0x0000,
51          HALMAC_IP_INTF_PHY,
52          HALMAC_INTF_PHY_CUT_ALL,
53          HALMAC_INTF_PHY_PLATFORM_ALL},
54 };
55
56 struct halmac_intf_phy_para pcie_gen1_phy_param_8821c[] = {
57         /* {offset, value, ip sel, cut mask, platform mask} */
58         {0x0009, 0x6380,
59          HALMAC_IP_INTF_PHY,
60          HALMAC_INTF_PHY_CUT_ALL,
61          HALMAC_INTF_PHY_PLATFORM_ALL},
62         {0xFFFF, 0x0000,
63          HALMAC_IP_INTF_PHY,
64          HALMAC_INTF_PHY_CUT_ALL,
65          HALMAC_INTF_PHY_PLATFORM_ALL},
66 };
67
68 struct halmac_intf_phy_para pcie_gen2_phy_param_8821c[] = {
69         /* {offset, value, ip sel, cut mask, platform mask} */
70         {0xFFFF, 0x0000,
71          HALMAC_IP_INTF_PHY,
72          HALMAC_INTF_PHY_CUT_ALL,
73          HALMAC_INTF_PHY_PLATFORM_ALL},
74 };
75
76 #endif /* HALMAC_8821C_SUPPORT */