All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Oliver Graute <oliver.graute@gmail.com>, Andrew Lunn <andrew@lunn.ch>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	buytenh@wantstofly.org
Subject: Re: Device Tree Binding for Marvell DSA Switch on imx28 board over Mdio Interface
Date: Tue, 18 Nov 2014 10:23:14 -0800	[thread overview]
Message-ID: <546B8E92.7080000@gmail.com> (raw)
In-Reply-To: <CA+KjHfauqO=BxOogexO3azW27cb1gHqEL5Mh-c+qxfUMYvf_mw@mail.gmail.com>

On 11/18/2014 12:30 AM, Oliver Graute wrote:
>> Hi Oliver
>>
>> How do you have the strapping pins on the switch set? They determine
>> what address on the mdio bus the chip responds to.
> 
> On the circuit diagram the PIN 54  (P5_IND1/P5ID1) is set to
> "Configuration Address: 0101"
> P5_MODE[3:0]=0111 = Single RMII MAC Mode (100Mbps FD with 50 MHz clock input)
> PIN 59 R1_LED/NO_CPU Configuration: CPU is attached SMI address is 0x10 to 0x1F
> 
> But what is the mdio address of the whole switch? or can I only
> address individual phy ports?

You should specify in the Device Tree the switch pseudo-PHY address,
typically 16 for Marvell switches. You can still access the individual
ports' PHY addresses using address 0 through N.

> 
> The Port 5 Pins of the  Marvell 88e6071 switch are connected via RMII
> to a Micrel Phy KSZ8051. And this Micrel Phy is connected to the MAC
> of IMX28 CPU (also RMII).
> 
>> Does your u-boot have commands to read arbitrary phy registers?
>> Generally, reading a register that does not exist gives 0xffff.  So
>> try some reads at different addresses and see what you can find.
> 
> I can read phy registers from the Marvell switch by a Tool called
> mii_demo it is a bit like mii_diag. It can read PHY registers from the
> switch Ports via IOCTL.
> This is working via some undefined ioctl SIOCSMIIREG2, SIOCGMIIPHY2.
> 
> 
> Example:
> #read SMI PHY Command Register 18 from Switch with IEEE 802.3 Clause 22
> mii_demo -rd eth0 23 0x18
> 
> 0x1680
> 
> Best regards,
> 
> Oliver
> 

  reply	other threads:[~2014-11-18 18:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 13:07 Device Tree Binding for Marvell DSA Switch on imx28 board over Mdio Interface Oliver Graute
2014-11-12 19:19 ` Florian Fainelli
2014-11-13 15:15   ` Oliver Graute
2014-11-13 20:03     ` Florian Fainelli
2014-11-14  7:39       ` Oliver Graute
2014-11-14 14:52         ` Oliver Graute
2014-11-14 17:09           ` Florian Fainelli
2014-11-17 15:58           ` Oliver Graute
2014-11-17 16:09             ` Andrew Lunn
2014-11-18  8:30               ` Oliver Graute
2014-11-18 18:23                 ` Florian Fainelli [this message]
2014-11-19  7:49                   ` Oliver Graute
2014-11-19 15:08                     ` Andrew Lunn
2014-11-17 16:45     ` Fabio Estevam
2014-11-17 16:54       ` Oliver Graute
2014-11-18  0:39         ` Fabio Estevam

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=546B8E92.7080000@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=buytenh@wantstofly.org \
    --cc=netdev@vger.kernel.org \
    --cc=oliver.graute@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.