1 /* 2 * PROJECT: ReactOS DC21x4 Driver 3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 * PURPOSE: EEPROM data for boards without the standard SROM Format 5 * COPYRIGHT: Copyright 2023 Dmitry Borisov <di.sean@protonmail.com> 6 */ 7 8 /* Adapted from the Linux tulip driver written by Donald Becker */ 9 10 /* INCLUDES *******************************************************************/ 11 12 #include "dc21x4.h" 13 14 /* GLOBALS ********************************************************************/ 15 16 /* Asante */ 17 static DC_PG_DATA UCHAR SRompLeafAsante[] = 18 { 19 0x00, 0x00, 0x94, 20 21 0x00, 0x08, // Default Autoselect 22 0x00, // GPIO direction 23 0x01, // 1 block 24 25 0x80 + 12, // Extended block, 12 bytes 26 0x01, // MII 27 0x00, // PHY #0 28 0x00, // GPIO stream length 29 0x00, // Reset stream length 30 0x00, 0x78, // Capabilities 31 0xE0, 0x01, // Advertisement 32 0x00, 0x50, // FDX 33 0x00, 0x18, // TTM 34 }; 35 36 /* SMC 9332DST */ 37 static DC_PG_DATA UCHAR SRompLeaf9332[] = 38 { 39 0x00, 0x00, 0xC0, 40 41 0x00, 0x08, // Default Autoselect 42 0x1F, // GPIO direction 43 0x04, // 4 blocks 44 45 0x00, // GPR 0 46 0x00, // GPIO data 47 0x9E, 0x00, // Command 0x009E 48 49 0x04, // GPR 4 50 0x00, // GPIO data 51 0x9E, 0x00, // Command 0x009E 52 0x03, // GPR 3 53 0x09, // GPIO data 54 0x6D, 0x00, // Command 0x006D 55 56 0x05, // GPR 5 57 0x09, // GPIO data 58 0x6D, 0x00, // Command 0x006D 59 }; 60 61 /* Cogent EM100 */ 62 static DC_PG_DATA UCHAR SRompLeafEm100[] = 63 { 64 0x00, 0x00, 0x92, 65 66 0x00, 0x08, // Default Autoselect 67 0x3F, // GPIO direction 68 0x06, // 6 blocks 69 70 0x07, // GPR 7 71 0x01, // GPIO data 72 0x21, 0x80, // Command 0x8021 73 74 0x08, // GPR 8 75 0x01, // GPIO data 76 0x21, 0x80, // Command 0x8021 77 78 0x00, // GPR 0 79 0x01, // GPIO data 80 0x9E, 0x00, // Command 0x009E 81 82 0x04, // GPR 4 83 0x01, // GPIO data 84 0x9E, 0x00, // Command 0x009E 85 86 0x03, // GPR 3 87 0x01, // GPIO data 88 0x6D, 0x00, // Command 0x006D 89 90 0x05, // GPR 5 91 0x01, // GPIO data 92 0x6D, 0x00, // Command 0x006D 93 }; 94 95 /* Maxtech NX-110 */ 96 static DC_PG_DATA UCHAR SRompLeafNx110[] = 97 { 98 0x00, 0x00, 0xE8, 99 100 0x00, 0x08, // Default Autoselect 101 0x13, // GPIO direction 102 0x05, // 5 blocks 103 104 0x01, // GPR 1 105 0x10, // GPIO data 106 0x9E, 0x00, // Command 0x009E 107 108 0x00, // GPR 0 109 0x00, // GPIO data 110 0x9E, 0x00, // Command 0x009E 111 112 0x04, // GPR 4 113 0x00, // GPIO data 114 0x9E, 0x00, // Command 0x009E 115 116 0x03, // GPR 3 117 0x03, // GPIO data 118 0x6D, 0x00, // Command 0x006D 119 120 0x05, // GPR 5 121 0x03, // GPIO data 122 0x6D, 0x00, // Command 0x006D 123 }; 124 125 /* Accton EN1207 */ 126 static DC_PG_DATA UCHAR SRompLeafEn1207[] = 127 { 128 0x00, 0x00, 0xE8, 129 130 0x00, 0x08, // Default Autoselect 131 0x1F, // GPIO direction 132 0x05, // 5 blocks 133 134 0x01, // GPR 1 135 0x1B, // GPIO data 136 0x00, 0x00, // Command 0x0000 137 138 0x00, // GPR 0 139 0x0B, // GPIO data 140 0x9E, 0x00, // Command 0x009E 141 142 0x04, // GPR 4 143 0x0B, // GPIO data 144 0x9E, 0x00, // Command 0x009E 145 146 0x03, // GPR 3 147 0x1B, // GPIO data 148 0x6D, 0x00, // Command 0x006D 149 150 0x05, // GPR 5 151 0x1B, // GPIO data 152 0x6D, 0x00, // Command 0x006D 153 }; 154 155 /* NetWinder */ 156 static DC_PG_DATA UCHAR SRompLeafNetWinder[] = 157 { 158 0x00, 0x10, 0x57, 159 160 0x00, 0x08, // Default Autoselect 161 0x01, // 1 block 162 163 0x80 + 21, // Extended block, 21 bytes 164 0x03, // MII 165 0x01, // PHY #1 166 0x00, // GPIO stream length 167 0x03, // Reset stream length 168 0x21, 0x08, 169 0x00, 0x00, 170 0x01, 0x00, 171 0x00, 0x00, // Capabilities 172 0xE1, 0x01, // Advertisement 173 0x00, 0x00, // FDX 174 0x00, 0x00, // TTM 175 0x00, // PHY cannot be unplugged 176 }; 177 178 /* Cobalt Microserver */ 179 static DC_PG_DATA UCHAR SRompLeafCobaltMicroserver[] = 180 { 181 0x00, 0x10, 0xE0, 182 183 0x00, 0x08, // Default Autoselect 184 0x01, // 1 block 185 186 0x80 + 21, // Extended block, 21 bytes 187 0x03, // MII 188 0x00, // PHY #0 189 0x00, // GPIO stream length 190 0x04, // Reset stream length 191 0x01, 0x08, // Set control mode, GP0 output 192 0x00, 0x00, // Drive GP0 Low (RST is active low) 193 0x00, 0x08, // Control mode, GP0 input (undriven) 194 0x00, 0x00, // Clear control mode 195 0x00, 0x78, // Capabilities: 100TX FDX + HDX, 10bT FDX + HDX 196 0xE0, 0x01, // Advertise all above 197 0x00, 0x50, // FDX all above 198 0x00, 0x18, // Set fast TTM in 100bt modes 199 0x00, // PHY cannot be unplugged 200 }; 201 202 #if DBG 203 #define DEFINE_BOARD(Leaf, Name) { Name, Leaf, sizeof(Leaf) - 3 /* OUI (3 bytes) */} 204 #else 205 #define DEFINE_BOARD(Leaf, Name) { Leaf, sizeof(Leaf) - 3 } 206 #endif 207 208 DC_PG_DATA 209 DC_SROM_REPAIR_ENTRY SRompRepairData[] = 210 { 211 DEFINE_BOARD(SRompLeafAsante, "Asante"), 212 DEFINE_BOARD(SRompLeaf9332, "SMC 9332DST"), 213 DEFINE_BOARD(SRompLeafEm100, "Cogent EM100"), 214 DEFINE_BOARD(SRompLeafNx110, "Maxtech NX-110"), 215 DEFINE_BOARD(SRompLeafEn1207, "Accton EN1207"), // Must be defined after the NX-110 216 DEFINE_BOARD(SRompLeafNetWinder, "NetWinder"), 217 DEFINE_BOARD(SRompLeafCobaltMicroserver, "Cobalt Microserver"), 218 DEFINE_BOARD(NULL, NULL), 219 }; 220