public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Jackson <mpfj-list@mimc.co.uk>
To: lkml <linux-kernel@vger.kernel.org>
Subject: Accessing PHY registers
Date: Thu, 01 Oct 2009 16:14:40 +0100	[thread overview]
Message-ID: <4AC4C760.6080002@mimc.co.uk> (raw)

On our custom AVR32 board, we've a pair of NatSemi DP83848 PHYs.

dmesg shows the following:-

MACB_mii_bus: probed
eth0: Atmel MACB at 0xfff01800 irq 25 (00:19:66:88:76:a4)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
macb macb.1: invalid hw address, using random
MACB_mii_bus: probed
eth1: Atmel MACB at 0xfff01c00 irq 26 (42:36:af:ab:e4:b5)
eth1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:03, irq=-1)

Can anyone shed some light on how I might read / write the PHY registers
from userspace ?

I've looked at ethtool, but it doesn't appear to work:-

# ethtool eth0   
Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	Advertised auto-negotiation: Yes
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 1
	Transceiver: external
	Auto-negotiation: on
	Link detected: yes
# ethtool -d eth0
Cannot get register dump: Operation not supported

Anyone got some sample code (I guess using sockets and ioctl calls ?)
I could take a look at ?

Thanks
Mark


             reply	other threads:[~2009-10-01 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01 15:14 Mark Jackson [this message]
2011-08-24 23:37 ` Accessing PHY registers Turhan Karadeniz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AC4C760.6080002@mimc.co.uk \
    --to=mpfj-list@mimc.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox