blob: 7ef7532a502a01c955339f28269dc3fcee342c59 [file] [log] [blame]
wdenkdd7d41f2002-09-18 20:04:01 +00001/*
2 * (C) Copyright 2001
3 * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkdd7d41f2002-09-18 20:04:01 +00006 */
7
8/*
9 * MII Utilities
10 */
11
12#include <common.h>
13#include <command.h>
wdenke44b9112004-04-18 23:32:11 +000014#include <miiphy.h>
15
wdenk61066ec2004-04-18 22:57:51 +000016typedef struct _MII_reg_desc_t {
17 ushort regno;
18 char * name;
19} MII_reg_desc_t;
20
Mike Frysinger4b497472010-10-20 01:06:48 -040021static const MII_reg_desc_t reg_0_5_desc_tbl[] = {
Mike Frysingerd63ee712010-12-23 15:40:12 -050022 { MII_BMCR, "PHY control register" },
23 { MII_BMSR, "PHY status register" },
24 { MII_PHYSID1, "PHY ID 1 register" },
25 { MII_PHYSID2, "PHY ID 2 register" },
26 { MII_ADVERTISE, "Autonegotiation advertisement register" },
27 { MII_LPA, "Autonegotiation partner abilities register" },
wdenk61066ec2004-04-18 22:57:51 +000028};
29
30typedef struct _MII_field_desc_t {
31 ushort hi;
32 ushort lo;
33 ushort mask;
34 char * name;
35} MII_field_desc_t;
36
Mike Frysinger4b497472010-10-20 01:06:48 -040037static const MII_field_desc_t reg_0_desc_tbl[] = {
wdenk61066ec2004-04-18 22:57:51 +000038 { 15, 15, 0x01, "reset" },
39 { 14, 14, 0x01, "loopback" },
40 { 13, 6, 0x81, "speed selection" }, /* special */
41 { 12, 12, 0x01, "A/N enable" },
42 { 11, 11, 0x01, "power-down" },
43 { 10, 10, 0x01, "isolate" },
44 { 9, 9, 0x01, "restart A/N" },
45 { 8, 8, 0x01, "duplex" }, /* special */
46 { 7, 7, 0x01, "collision test enable" },
47 { 5, 0, 0x3f, "(reserved)" }
48};
49
Mike Frysinger4b497472010-10-20 01:06:48 -040050static const MII_field_desc_t reg_1_desc_tbl[] = {
wdenk61066ec2004-04-18 22:57:51 +000051 { 15, 15, 0x01, "100BASE-T4 able" },
52 { 14, 14, 0x01, "100BASE-X full duplex able" },
53 { 13, 13, 0x01, "100BASE-X half duplex able" },
54 { 12, 12, 0x01, "10 Mbps full duplex able" },
55 { 11, 11, 0x01, "10 Mbps half duplex able" },
56 { 10, 10, 0x01, "100BASE-T2 full duplex able" },
57 { 9, 9, 0x01, "100BASE-T2 half duplex able" },
58 { 8, 8, 0x01, "extended status" },
59 { 7, 7, 0x01, "(reserved)" },
60 { 6, 6, 0x01, "MF preamble suppression" },
61 { 5, 5, 0x01, "A/N complete" },
62 { 4, 4, 0x01, "remote fault" },
63 { 3, 3, 0x01, "A/N able" },
64 { 2, 2, 0x01, "link status" },
65 { 1, 1, 0x01, "jabber detect" },
66 { 0, 0, 0x01, "extended capabilities" },
67};
68
Mike Frysinger4b497472010-10-20 01:06:48 -040069static const MII_field_desc_t reg_2_desc_tbl[] = {
wdenk61066ec2004-04-18 22:57:51 +000070 { 15, 0, 0xffff, "OUI portion" },
71};
72
Mike Frysinger4b497472010-10-20 01:06:48 -040073static const MII_field_desc_t reg_3_desc_tbl[] = {
wdenk61066ec2004-04-18 22:57:51 +000074 { 15, 10, 0x3f, "OUI portion" },
75 { 9, 4, 0x3f, "manufacturer part number" },
76 { 3, 0, 0x0f, "manufacturer rev. number" },
77};
78
Mike Frysinger4b497472010-10-20 01:06:48 -040079static const MII_field_desc_t reg_4_desc_tbl[] = {
wdenk61066ec2004-04-18 22:57:51 +000080 { 15, 15, 0x01, "next page able" },
Stephan Baurothcf617af2013-08-08 13:44:41 +020081 { 14, 14, 0x01, "(reserved)" },
wdenk61066ec2004-04-18 22:57:51 +000082 { 13, 13, 0x01, "remote fault" },
Stephan Baurothcf617af2013-08-08 13:44:41 +020083 { 12, 12, 0x01, "(reserved)" },
wdenk61066ec2004-04-18 22:57:51 +000084 { 11, 11, 0x01, "asymmetric pause" },
85 { 10, 10, 0x01, "pause enable" },
86 { 9, 9, 0x01, "100BASE-T4 able" },
87 { 8, 8, 0x01, "100BASE-TX full duplex able" },
88 { 7, 7, 0x01, "100BASE-TX able" },
89 { 6, 6, 0x01, "10BASE-T full duplex able" },
90 { 5, 5, 0x01, "10BASE-T able" },
91 { 4, 0, 0x1f, "xxx to do" },
92};
93
Mike Frysinger4b497472010-10-20 01:06:48 -040094static const MII_field_desc_t reg_5_desc_tbl[] = {
wdenk61066ec2004-04-18 22:57:51 +000095 { 15, 15, 0x01, "next page able" },
96 { 14, 14, 0x01, "acknowledge" },
97 { 13, 13, 0x01, "remote fault" },
98 { 12, 12, 0x01, "(reserved)" },
99 { 11, 11, 0x01, "asymmetric pause able" },
100 { 10, 10, 0x01, "pause able" },
101 { 9, 9, 0x01, "100BASE-T4 able" },
102 { 8, 8, 0x01, "100BASE-X full duplex able" },
103 { 7, 7, 0x01, "100BASE-TX able" },
104 { 6, 6, 0x01, "10BASE-T full duplex able" },
105 { 5, 5, 0x01, "10BASE-T able" },
106 { 4, 0, 0x1f, "xxx to do" },
107};
wdenk61066ec2004-04-18 22:57:51 +0000108typedef struct _MII_field_desc_and_len_t {
Mike Frysinger4b497472010-10-20 01:06:48 -0400109 const MII_field_desc_t *pdesc;
wdenk61066ec2004-04-18 22:57:51 +0000110 ushort len;
111} MII_field_desc_and_len_t;
112
Mike Frysinger4b497472010-10-20 01:06:48 -0400113static const MII_field_desc_and_len_t desc_and_len_tbl[] = {
114 { reg_0_desc_tbl, ARRAY_SIZE(reg_0_desc_tbl) },
115 { reg_1_desc_tbl, ARRAY_SIZE(reg_1_desc_tbl) },
116 { reg_2_desc_tbl, ARRAY_SIZE(reg_2_desc_tbl) },
117 { reg_3_desc_tbl, ARRAY_SIZE(reg_3_desc_tbl) },
118 { reg_4_desc_tbl, ARRAY_SIZE(reg_4_desc_tbl) },
119 { reg_5_desc_tbl, ARRAY_SIZE(reg_5_desc_tbl) },
wdenk61066ec2004-04-18 22:57:51 +0000120};
121
122static void dump_reg(
123 ushort regval,
Mike Frysinger4b497472010-10-20 01:06:48 -0400124 const MII_reg_desc_t *prd,
125 const MII_field_desc_and_len_t *pdl);
wdenk61066ec2004-04-18 22:57:51 +0000126
127static int special_field(
128 ushort regno,
Mike Frysinger4b497472010-10-20 01:06:48 -0400129 const MII_field_desc_t *pdesc,
wdenk61066ec2004-04-18 22:57:51 +0000130 ushort regval);
131
Mike Frysinger4b497472010-10-20 01:06:48 -0400132static void MII_dump_0_to_5(
wdenk61066ec2004-04-18 22:57:51 +0000133 ushort regvals[6],
134 uchar reglo,
135 uchar reghi)
136{
137 ulong i;
138
139 for (i = 0; i < 6; i++) {
140 if ((reglo <= i) && (i <= reghi))
141 dump_reg(regvals[i], &reg_0_5_desc_tbl[i],
142 &desc_and_len_tbl[i]);
143 }
144}
145
146static void dump_reg(
147 ushort regval,
Mike Frysinger4b497472010-10-20 01:06:48 -0400148 const MII_reg_desc_t *prd,
149 const MII_field_desc_and_len_t *pdl)
wdenk61066ec2004-04-18 22:57:51 +0000150{
151 ulong i;
152 ushort mask_in_place;
Mike Frysinger4b497472010-10-20 01:06:48 -0400153 const MII_field_desc_t *pdesc;
wdenk61066ec2004-04-18 22:57:51 +0000154
155 printf("%u. (%04hx) -- %s --\n",
156 prd->regno, regval, prd->name);
157
158 for (i = 0; i < pdl->len; i++) {
159 pdesc = &pdl->pdesc[i];
160
161 mask_in_place = pdesc->mask << pdesc->lo;
162
Jeroen Hofsteea3e58912014-07-13 23:44:21 +0200163 printf(" (%04hx:%04x) %u.",
164 mask_in_place,
165 regval & mask_in_place,
166 prd->regno);
wdenk61066ec2004-04-18 22:57:51 +0000167
168 if (special_field(prd->regno, pdesc, regval)) {
169 }
170 else {
171 if (pdesc->hi == pdesc->lo)
172 printf("%2u ", pdesc->lo);
173 else
174 printf("%2u-%2u", pdesc->hi, pdesc->lo);
175 printf(" = %5u %s",
176 (regval & mask_in_place) >> pdesc->lo,
177 pdesc->name);
178 }
179 printf("\n");
180
181 }
182 printf("\n");
183}
184
185/* Special fields:
186** 0.6,13
187** 0.8
188** 2.15-0
189** 3.15-0
190** 4.4-0
191** 5.4-0
192*/
193
194static int special_field(
195 ushort regno,
Mike Frysinger4b497472010-10-20 01:06:48 -0400196 const MII_field_desc_t *pdesc,
wdenk61066ec2004-04-18 22:57:51 +0000197 ushort regval)
198{
Mike Frysingerd63ee712010-12-23 15:40:12 -0500199 if ((regno == MII_BMCR) && (pdesc->lo == 6)) {
200 ushort speed_bits = regval & (BMCR_SPEED1000 | BMCR_SPEED100);
wdenk61066ec2004-04-18 22:57:51 +0000201 printf("%2u,%2u = b%u%u speed selection = %s Mbps",
202 6, 13,
203 (regval >> 6) & 1,
204 (regval >> 13) & 1,
Mike Frysingerd63ee712010-12-23 15:40:12 -0500205 speed_bits == BMCR_SPEED1000 ? "1000" :
206 speed_bits == BMCR_SPEED100 ? "100" :
207 "10");
wdenk61066ec2004-04-18 22:57:51 +0000208 return 1;
209 }
210
Mike Frysingerd63ee712010-12-23 15:40:12 -0500211 else if ((regno == MII_BMCR) && (pdesc->lo == 8)) {
wdenk61066ec2004-04-18 22:57:51 +0000212 printf("%2u = %5u duplex = %s",
213 pdesc->lo,
214 (regval >> pdesc->lo) & 1,
215 ((regval >> pdesc->lo) & 1) ? "full" : "half");
216 return 1;
217 }
218
Mike Frysingerd63ee712010-12-23 15:40:12 -0500219 else if ((regno == MII_ADVERTISE) && (pdesc->lo == 0)) {
wdenk61066ec2004-04-18 22:57:51 +0000220 ushort sel_bits = (regval >> pdesc->lo) & pdesc->mask;
221 printf("%2u-%2u = %5u selector = %s",
222 pdesc->hi, pdesc->lo, sel_bits,
wdenk656140b2004-04-25 13:18:40 +0000223 sel_bits == PHY_ANLPAR_PSB_802_3 ?
wdenk61066ec2004-04-18 22:57:51 +0000224 "IEEE 802.3" :
wdenk656140b2004-04-25 13:18:40 +0000225 sel_bits == PHY_ANLPAR_PSB_802_9 ?
wdenk61066ec2004-04-18 22:57:51 +0000226 "IEEE 802.9 ISLAN-16T" :
227 "???");
228 return 1;
229 }
230
Mike Frysingerd63ee712010-12-23 15:40:12 -0500231 else if ((regno == MII_LPA) && (pdesc->lo == 0)) {
wdenk61066ec2004-04-18 22:57:51 +0000232 ushort sel_bits = (regval >> pdesc->lo) & pdesc->mask;
233 printf("%2u-%2u = %u selector = %s",
234 pdesc->hi, pdesc->lo, sel_bits,
wdenk656140b2004-04-25 13:18:40 +0000235 sel_bits == PHY_ANLPAR_PSB_802_3 ?
wdenk61066ec2004-04-18 22:57:51 +0000236 "IEEE 802.3" :
wdenk656140b2004-04-25 13:18:40 +0000237 sel_bits == PHY_ANLPAR_PSB_802_9 ?
wdenk61066ec2004-04-18 22:57:51 +0000238 "IEEE 802.9 ISLAN-16T" :
239 "???");
240 return 1;
241 }
242
243 return 0;
244}
245
Mike Frysinger4b497472010-10-20 01:06:48 -0400246static char last_op[2];
247static uint last_data;
248static uint last_addr_lo;
249static uint last_addr_hi;
250static uint last_reg_lo;
251static uint last_reg_hi;
Tim Jamesd9ba8a62015-03-25 11:55:15 +0000252static uint last_mask;
wdenk61066ec2004-04-18 22:57:51 +0000253
254static void extract_range(
255 char * input,
256 unsigned char * plo,
257 unsigned char * phi)
258{
259 char * end;
260 *plo = simple_strtoul(input, &end, 16);
261 if (*end == '-') {
262 end++;
263 *phi = simple_strtoul(end, NULL, 16);
264 }
265 else {
266 *phi = *plo;
267 }
268}
269
wdenk20c98a62004-04-23 20:32:05 +0000270/* ---------------------------------------------------------------- */
Mike Frysinger4b497472010-10-20 01:06:48 -0400271static int do_mii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
wdenk61066ec2004-04-18 22:57:51 +0000272{
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200273 char op[2];
wdenk61066ec2004-04-18 22:57:51 +0000274 unsigned char addrlo, addrhi, reglo, reghi;
Wolfgang Denkedb65482005-09-24 21:54:50 +0200275 unsigned char addr, reg;
Tim Jamesd9ba8a62015-03-25 11:55:15 +0000276 unsigned short data, mask;
wdenk61066ec2004-04-18 22:57:51 +0000277 int rcode = 0;
Mike Frysinger5ff5fdb2010-07-27 18:35:08 -0400278 const char *devname;
wdenk61066ec2004-04-18 22:57:51 +0000279
Wolfgang Denk3b683112010-07-17 01:06:04 +0200280 if (argc < 2)
Simon Glassa06dfc72011-12-10 08:44:01 +0000281 return CMD_RET_USAGE;
Shinya Kuribayashi9a631042007-12-27 15:39:54 +0900282
TsiChung Liewb3162452008-03-30 01:22:13 -0500283#if defined(CONFIG_MII_INIT)
wdenk61066ec2004-04-18 22:57:51 +0000284 mii_init ();
285#endif
286
287 /*
288 * We use the last specified parameters, unless new ones are
289 * entered.
290 */
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200291 op[0] = last_op[0];
292 op[1] = last_op[1];
wdenk61066ec2004-04-18 22:57:51 +0000293 addrlo = last_addr_lo;
294 addrhi = last_addr_hi;
295 reglo = last_reg_lo;
296 reghi = last_reg_hi;
297 data = last_data;
Tim Jamesd9ba8a62015-03-25 11:55:15 +0000298 mask = last_mask;
wdenk61066ec2004-04-18 22:57:51 +0000299
300 if ((flag & CMD_FLAG_REPEAT) == 0) {
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200301 op[0] = argv[1][0];
302 if (strlen(argv[1]) > 1)
303 op[1] = argv[1][1];
304 else
305 op[1] = '\0';
306
wdenk61066ec2004-04-18 22:57:51 +0000307 if (argc >= 3)
308 extract_range(argv[2], &addrlo, &addrhi);
309 if (argc >= 4)
310 extract_range(argv[3], &reglo, &reghi);
311 if (argc >= 5)
Tim Jamesd9ba8a62015-03-25 11:55:15 +0000312 data = simple_strtoul(argv[4], NULL, 16);
313 if (argc >= 6)
314 mask = simple_strtoul(argv[5], NULL, 16);
wdenk61066ec2004-04-18 22:57:51 +0000315 }
316
Michal Simekf3aabf12015-10-19 15:13:34 +0200317 if (addrhi > 31) {
318 printf("Incorrect PHY address. Range should be 0-31\n");
319 return CMD_RET_USAGE;
320 }
321
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200322 /* use current device */
323 devname = miiphy_get_current_dev();
324
wdenk61066ec2004-04-18 22:57:51 +0000325 /*
326 * check info/read/write.
327 */
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200328 if (op[0] == 'i') {
wdenk61066ec2004-04-18 22:57:51 +0000329 unsigned char j, start, end;
330 unsigned int oui;
331 unsigned char model;
332 unsigned char rev;
333
334 /*
335 * Look for any and all PHYs. Valid addresses are 0..31.
336 */
337 if (argc >= 3) {
Wolfgang Denkedb65482005-09-24 21:54:50 +0200338 start = addrlo; end = addrhi;
wdenk61066ec2004-04-18 22:57:51 +0000339 } else {
Wolfgang Denkedb65482005-09-24 21:54:50 +0200340 start = 0; end = 31;
wdenk61066ec2004-04-18 22:57:51 +0000341 }
342
Wolfgang Denkedb65482005-09-24 21:54:50 +0200343 for (j = start; j <= end; j++) {
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200344 if (miiphy_info (devname, j, &oui, &model, &rev) == 0) {
wdenk61066ec2004-04-18 22:57:51 +0000345 printf("PHY 0x%02X: "
346 "OUI = 0x%04X, "
347 "Model = 0x%02X, "
348 "Rev = 0x%02X, "
Larry Johnson966a80b2007-11-01 08:46:50 -0500349 "%3dbase%s, %s\n",
wdenk61066ec2004-04-18 22:57:51 +0000350 j, oui, model, rev,
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200351 miiphy_speed (devname, j),
Larry Johnson966a80b2007-11-01 08:46:50 -0500352 miiphy_is_1000base_x (devname, j)
353 ? "X" : "T",
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200354 (miiphy_duplex (devname, j) == FULL)
355 ? "FDX" : "HDX");
wdenk61066ec2004-04-18 22:57:51 +0000356 }
357 }
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200358 } else if (op[0] == 'r') {
wdenk61066ec2004-04-18 22:57:51 +0000359 for (addr = addrlo; addr <= addrhi; addr++) {
360 for (reg = reglo; reg <= reghi; reg++) {
361 data = 0xffff;
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200362 if (miiphy_read (devname, addr, reg, &data) != 0) {
wdenk61066ec2004-04-18 22:57:51 +0000363 printf(
364 "Error reading from the PHY addr=%02x reg=%02x\n",
365 addr, reg);
366 rcode = 1;
Wolfgang Denkedb65482005-09-24 21:54:50 +0200367 } else {
wdenk61066ec2004-04-18 22:57:51 +0000368 if ((addrlo != addrhi) || (reglo != reghi))
369 printf("addr=%02x reg=%02x data=",
370 (uint)addr, (uint)reg);
371 printf("%04X\n", data & 0x0000FFFF);
372 }
373 }
374 if ((addrlo != addrhi) && (reglo != reghi))
375 printf("\n");
376 }
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200377 } else if (op[0] == 'w') {
wdenk61066ec2004-04-18 22:57:51 +0000378 for (addr = addrlo; addr <= addrhi; addr++) {
379 for (reg = reglo; reg <= reghi; reg++) {
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200380 if (miiphy_write (devname, addr, reg, data) != 0) {
wdenk61066ec2004-04-18 22:57:51 +0000381 printf("Error writing to the PHY addr=%02x reg=%02x\n",
382 addr, reg);
383 rcode = 1;
384 }
385 }
386 }
Tim Jamesd9ba8a62015-03-25 11:55:15 +0000387 } else if (op[0] == 'm') {
388 for (addr = addrlo; addr <= addrhi; addr++) {
389 for (reg = reglo; reg <= reghi; reg++) {
390 unsigned short val = 0;
391 if (miiphy_read(devname, addr,
392 reg, &val)) {
393 printf("Error reading from the PHY");
394 printf(" addr=%02x", addr);
395 printf(" reg=%02x\n", reg);
396 rcode = 1;
397 } else {
398 val = (val & ~mask) | (data & mask);
399 if (miiphy_write(devname, addr,
400 reg, val)) {
401 printf("Error writing to the PHY");
402 printf(" addr=%02x", addr);
403 printf(" reg=%02x\n", reg);
404 rcode = 1;
405 }
406 }
407 }
408 }
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200409 } else if (strncmp(op, "du", 2) == 0) {
wdenk61066ec2004-04-18 22:57:51 +0000410 ushort regs[6];
411 int ok = 1;
412 if ((reglo > 5) || (reghi > 5)) {
413 printf(
414 "The MII dump command only formats the "
415 "standard MII registers, 0-5.\n");
416 return 1;
417 }
418 for (addr = addrlo; addr <= addrhi; addr++) {
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200419 for (reg = reglo; reg < reghi + 1; reg++) {
420 if (miiphy_read(devname, addr, reg, &regs[reg]) != 0) {
wdenk61066ec2004-04-18 22:57:51 +0000421 ok = 0;
422 printf(
423 "Error reading from the PHY addr=%02x reg=%02x\n",
424 addr, reg);
425 rcode = 1;
426 }
427 }
428 if (ok)
429 MII_dump_0_to_5(regs, reglo, reghi);
430 printf("\n");
431 }
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200432 } else if (strncmp(op, "de", 2) == 0) {
433 if (argc == 2)
434 miiphy_listdev ();
435 else
436 miiphy_set_current_dev (argv[2]);
wdenk61066ec2004-04-18 22:57:51 +0000437 } else {
Simon Glassa06dfc72011-12-10 08:44:01 +0000438 return CMD_RET_USAGE;
wdenk61066ec2004-04-18 22:57:51 +0000439 }
440
441 /*
442 * Save the parameters for repeats.
443 */
Marian Balakowiczaab8c492005-10-28 22:30:33 +0200444 last_op[0] = op[0];
445 last_op[1] = op[1];
wdenk61066ec2004-04-18 22:57:51 +0000446 last_addr_lo = addrlo;
447 last_addr_hi = addrhi;
448 last_reg_lo = reglo;
449 last_reg_hi = reghi;
450 last_data = data;
Tim Jamesd9ba8a62015-03-25 11:55:15 +0000451 last_mask = mask;
wdenk61066ec2004-04-18 22:57:51 +0000452
453 return rcode;
454}
455
456/***************************************************/
457
458U_BOOT_CMD(
Tim Jamesd9ba8a62015-03-25 11:55:15 +0000459 mii, 6, 1, do_mii,
Peter Tyserdfb72b82009-01-27 18:03:12 -0600460 "MII utility commands",
Tim Jamesd9ba8a62015-03-25 11:55:15 +0000461 "device - list available devices\n"
462 "mii device <devname> - set current device\n"
463 "mii info <addr> - display MII PHY info\n"
464 "mii read <addr> <reg> - read MII PHY <addr> register <reg>\n"
465 "mii write <addr> <reg> <data> - write MII PHY <addr> register <reg>\n"
466 "mii modify <addr> <reg> <data> <mask> - modify MII PHY <addr> register <reg>\n"
467 " updating bits identified in <mask>\n"
468 "mii dump <addr> <reg> - pretty-print <addr> <reg> (0-5 only)\n"
Wolfgang Denkc54781c2009-05-24 17:06:54 +0200469 "Addr and/or reg may be ranges, e.g. 2-7."
wdenk61066ec2004-04-18 22:57:51 +0000470);