linux-mips
[Top] [All Lists]

Re: How to describe I2C and MDIO bus multiplexers with the device tree?

To: devicetree-discuss@lists.ozlabs.org, Grant Likely <grant.likely@secretlab.ca>
Subject: Re: How to describe I2C and MDIO bus multiplexers with the device tree?
From: David Daney <david.daney@cavium.com>
Date: Wed, 03 Aug 2011 15:11:51 -0700
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, linux-mips <linux-mips@linux-mips.org>
In-reply-to: <4E39C5EB.8070701@cavium.com>
References: <4E39C5EB.8070701@cavium.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 08/03/2011 03:04 PM, David Daney wrote:

I have a board (ASCII art representation below) that has a bunch of
PHY devices that are connected behind a MDIO bus switch/multiplexer.
This multiplexer is in turn controlled by GPIO pins on a I2C GPIO port
expander. which is in turn on a I2C bus switch/multiplexer.

There is another switch/multiplexer that is controlled directly via I2C.

Q: How can this be represented?

My attempt is below...

I2C-0 MDIO-1 MDIO-0
| | |
| |--------------| | |

Crap, my mailer ate the ASCII art.

Attached is the text file that should make it through.



Some notes/questions:

o mdio-mux@0 is a child of soc@0, but conceptually it might just as
well be floating in space.

o The parent-bus property of both mdio-mux@0 and mdio-mux@77 denotes
the connection of the multiplexer to its 'parent' bus.

o The cell-index property of the multiplexed bus instances denotes the
sub-bus of the switch/multiplexer the children are connected to.
Would a different property name be better here?

o For mdio-mux@0 the driver will use the cell-index to determine how
to program the gpios that control the switch/multiplexer.

Am I totally insane?
David Daney

Attachment: multiplexer-1.txt
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>