Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause
2 : : * Copyright(c) 2024 Realtek Corporation. All rights reserved
3 : : */
4 : :
5 : : #include "../r8169_ethdev.h"
6 : : #include "../r8169_hw.h"
7 : : #include "../r8169_phy.h"
8 : : #include "rtl9151a.h"
9 : :
10 : : /* For RTL9151A, CFG_METHOD_60 */
11 : :
12 : : /* ------------------------------------MAC 9151A------------------------------------- */
13 : :
14 : : /* ------------------------------------PHY 9151A--------------------------------------- */
15 : :
16 : : static const u16 phy_mcu_ram_code_9151a_1_1[] = {
17 : : 0xa436, 0x8023, 0xa438, 0x5100, 0xa436, 0xB82E, 0xa438, 0x0001,
18 : : 0xb820, 0x0090, 0xa436, 0xA016, 0xa438, 0x0020, 0xa436, 0xA012,
19 : : 0xa438, 0x0000, 0xa436, 0xA014, 0xa438, 0x1800, 0xa438, 0x8010,
20 : : 0xa438, 0x1800, 0xa438, 0x8017, 0xa438, 0x1800, 0xa438, 0x8028,
21 : : 0xa438, 0x1800, 0xa438, 0x8028, 0xa438, 0x1800, 0xa438, 0x8028,
22 : : 0xa438, 0x1800, 0xa438, 0x8028, 0xa438, 0x1800, 0xa438, 0x8028,
23 : : 0xa438, 0x1800, 0xa438, 0x8028, 0xa438, 0x8901, 0xa438, 0xd707,
24 : : 0xa438, 0x4076, 0xa438, 0x1800, 0xa438, 0x1399, 0xa438, 0x1800,
25 : : 0xa438, 0x139f, 0xa438, 0xa00a, 0xa438, 0x0c06, 0xa438, 0x0102,
26 : : 0xa438, 0xa240, 0xa438, 0xa290, 0xa438, 0xa344, 0xa438, 0xab02,
27 : : 0xa438, 0xa404, 0xa438, 0xd1c7, 0xa438, 0xd045, 0xa438, 0x1000,
28 : : 0xa438, 0x125f, 0xa438, 0xd700, 0xa438, 0x5fbb, 0xa438, 0xa320,
29 : : 0xa438, 0x1800, 0xa438, 0x0cc2, 0xa436, 0xA10E, 0xa438, 0xffff,
30 : : 0xa436, 0xA10C, 0xa438, 0xffff, 0xa436, 0xA10A, 0xa438, 0xffff,
31 : : 0xa436, 0xA108, 0xa438, 0xffff, 0xa436, 0xA106, 0xa438, 0xffff,
32 : : 0xa436, 0xA104, 0xa438, 0xffff, 0xa436, 0xA102, 0xa438, 0x0cb4,
33 : : 0xa436, 0xA100, 0xa438, 0x1398, 0xa436, 0xA110, 0xa438, 0x0003,
34 : : 0xb820, 0x0010, 0xa436, 0x844e, 0xa438, 0xaf84, 0xa438, 0x66af,
35 : : 0xa438, 0x847b, 0xa438, 0xaf84, 0xa438, 0x7baf, 0xa438, 0x847b,
36 : : 0xa438, 0xaf84, 0xa438, 0x7baf, 0xa438, 0x847b, 0xa438, 0xaf84,
37 : : 0xa438, 0x7baf, 0xa438, 0x847b, 0xa438, 0xd400, 0xa438, 0x04bf,
38 : : 0xa438, 0x645d, 0xa438, 0x026a, 0xa438, 0x4cd4, 0xa438, 0x0004,
39 : : 0xa438, 0xbf64, 0xa438, 0x6002, 0xa438, 0x6a4c, 0xa438, 0xaf61,
40 : : 0xa438, 0x1600, 0xa436, 0xb818, 0xa438, 0x6110, 0xa436, 0xb81a,
41 : : 0xa438, 0xffff, 0xa436, 0xb81c, 0xa438, 0xffff, 0xa436, 0xb81e,
42 : : 0xa438, 0xffff, 0xa436, 0xb850, 0xa438, 0x03d1, 0xa436, 0xb852,
43 : : 0xa438, 0xffff, 0xa436, 0xb878, 0xa438, 0xffff, 0xa436, 0xb884,
44 : : 0xa438, 0xffff, 0xa436, 0xb832, 0xa438, 0x0001, 0xB82E, 0x0000,
45 : : 0xa436, 0x8023, 0xa438, 0x0000, 0xB820, 0x0000, 0xFFFF, 0xFFFF
46 : : };
47 : :
48 : : static void
49 : : rtl_real_set_phy_mcu_9151a_1_1(struct rtl_hw *hw)
50 : : {
51 : 0 : rtl_set_phy_mcu_ram_code(hw, phy_mcu_ram_code_9151a_1_1,
52 : : ARRAY_SIZE(phy_mcu_ram_code_9151a_1_1));
53 : : }
54 : :
55 : : void
56 : 0 : rtl_set_phy_mcu_9151a_1(struct rtl_hw *hw)
57 : : {
58 : 0 : rtl_set_phy_mcu_patch_request(hw);
59 : :
60 : : rtl_real_set_phy_mcu_9151a_1_1(hw);
61 : :
62 : 0 : rtl_clear_phy_mcu_patch_request(hw);
63 : 0 : }
|