GithubHelp home page GithubHelp logo

smooge / phytool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wkz/phytool

0.0 0.0 0.0 40 KB

Linux MDIO register access

License: GNU General Public License v2.0

C 87.66% Makefile 4.36% Roff 7.97%

phytool's Introduction

phytool

Linux MDIO register access

Usage

phytool read  IFACE/ADDR/REG
phytool write IFACE/ADDR/REG <0-0xffff>
phytool print IFACE/ADDR[/REG]

Clause 22:

ADDR := <0-0x1f>
REG  := <0-0x1f>

Clause 45 (not supported by all MDIO drivers):

ADDR := PORT:DEV
PORT := <0-0x1f>
DEV  := <0-0x1f>
REG  := <0-0xffff>

The read and write commands are simple register level accessors. The print command will pretty-print a register. When using the print command, the register is optional. If left out, the most common registers will be shown.

Examples

~ # phytool read eth4/0/4
0x0de1

~ # phytool print eth0/0
ieee-phy: id:0x01410eb1

   ieee-phy: reg:BMCR(0x00) val:0x1140
      flags:          -reset -loopback +aneg-enable -power-down -isolate -aneg-restart -collision-test
      speed:          1000-full

   ieee-phy: reg:BMSR(0x01) val:0x7949
      capabilities:   -100-b4 +100-f +100-h +10-f +10-h -100-t2-f -100-t2-h
      flags:          +ext-status -aneg-complete -remote-fault +aneg-capable -link -jabber +ext-register

mv6tool

Marvell Link Street register access

Usage

mv6tool read  LOCATION/REG
mv6tool write LOCATION/REG <0-0xffff>
mv6tool print LOCATION[/REG]
mv6tool print IFACE

where

LOCATION := IFACE/<port|phy> | DEV/<ADDR|phyN|portN|globalG|serdes>

DEV  := <0-0x1f>
ADDR := <0-0x1f>
N    := <0-0xa>
G    := <0-2>
REG  := <0-0x1f>

The read and write commands are simple register level accessors. The print command will pretty-print a register. When using the print command, the register is optional. If left out, the most common registers will be shown.

Examples

~ # mv6tool 1/global1/0
mv6: model:mv88e6097 dev:1 global:1
   mv6: reg:00 val:0xc800

~ # mv6tool print eth1-1
mv6: model:mv88e6352 dev:0 port:1
   mv6: reg:PS(0x00) val:0x100f
      flags:          -pause-en -my-pause +phy-detect -link -eee -tx-paused -flow-ctrl
      speed:          10-half
      mode:           0xf

   mv6: reg:PC(0x04) val:0x1414
      flags:          -router-header +igmp-snoop -vlan-tunnel -tag-if-both
      egress-mode:    01, untagged
      frame-mode:     00, normal
      initial-pri:    01, tag prio
      egress-floods:  01, allow UC
      port-state:     00, disabled

Origin & References

phytool is developed and maintained by Tobias Waldekranz.
Please file bug fixes and pull requests at GitHub

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.