From: Segher Boessenkool <segher@kernel.crashing.org>
To: Andy Fleming <afleming@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/4 v2] powerpc: document max-speed and interface-type properties
Date: Tue, 17 Apr 2007 12:40:17 +0200 [thread overview]
Message-ID: <0e43365ca6941310d2d0cb6e117c493a@kernel.crashing.org> (raw)
In-Reply-To: <236CD796-DFDF-41B5-A92B-6C15876327E0@freescale.com>
>>> It's not saying what type the PHY is, though. It's describing the
>>> connection. The PHY is just as flexible wrt connection type as the
>>> ethernet controller.
>>
>> Huh, I've never seen that. I'll take your word for it.
>
> Well, mostly this just means that the PHY has pins, and can be told
> which pins have what meaning in the same way that the ethernet
> controller can.
Oh I see. But the PHY is connected in only one way, so
its node should say which way that is.
>>> Ethernet controllers need to know what the connection is so they can
>>> establish a data connection with the PHYs
>>
>> Can't you probe for PHYs?
>
> I'm beginning to suspect you are confusing the PHY management bus with
> the PHY data bus.
No I'm not -- not this time, anyway ;-)
>>> 1) The driver tells the PHY what interface to use
>>
>> The device tree is not structured after how Linux device
>> drivers want to use the information; instead, it describes
>> the hardware.
>
> My point was merely that the location of the information is arbitrary,
> and so here are three reasons for arbitrarily putting it in the
> ethernet node, rather than the PHY node.
The max speed of the controller, and the types of MII buses
it supports, belongs in the controller node (perhaps as
implicit information).
The max speed of the PHY, and the types of MII buses it
supports, belongs in the PHY node.
I don't see anything arbitrary here.
>>> 3) The UCC needs to be told the connection type, because it does not
>>> have logic to detect it on its own.
>>
>> Just try all possible kinds, see if you can see a PHY
>> connected?
>
> To extend on the point above, this is nearly impossible. As I said,
> the management bus and the data bus are different. This interface
> property describes the pin configuration for the data bus. It also
> describes the "rate" at which the data is sent or received (some
> interfaces double-pump, some use echo cancellation). The result of a
> misconfiguration is that you receive gibberish and you send gibberish.
> The PHY will happily misunderstand the ethernet controller, and
> visa-versa.
>
> They *both* need to know how they are wired to the other one.
I was thinking you could put the PHY in loopback mode and see
what works. This might not be too reliable of course.
> Again, no. You would have to convince me that the interface is more
> closely tied to the PHY than to the controller. I believe it's an
> equal weighting, and have provided three arguments above for why the
> ethernet node is more appropriate. Feel free to do so for the PHY.
> But you need four or more, or I win. ;)
It seems you misunderstand me. I say the controller information
belongs in the controller node, and the PHY information belongs
in the PHY node. If there are multiple modes possible for a
given controller+PHY combination, that information should be put
in the PHY node, since a controller can have multiple PHYs but
not the other way around (for a given PHY->controller assignment,
which is a configuration option for the firmware to decide on,
so any given device tree will describe only one such assignment).
Segher
prev parent reply other threads:[~2007-04-17 10:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-13 6:25 [PATCH 1/4 v2] powerpc: document max-speed and interface-type properties Kim Phillips
2007-04-13 17:00 ` Kumar Gala
2007-04-13 17:36 ` Kim Phillips
2007-04-13 17:42 ` Kumar Gala
2007-04-13 17:52 ` Kim Phillips
2007-04-13 17:59 ` Kumar Gala
2007-04-13 19:02 ` Segher Boessenkool
2007-04-16 15:25 ` Kim Phillips
2007-04-16 15:34 ` Kumar Gala
2007-04-16 15:47 ` Segher Boessenkool
2007-04-16 16:57 ` Kim Phillips
2007-04-16 23:18 ` Segher Boessenkool
2007-04-17 0:31 ` Kim Phillips
2007-04-17 10:25 ` Segher Boessenkool
2007-04-17 20:27 ` Kim Phillips
2007-04-17 23:18 ` Segher Boessenkool
2007-04-18 1:13 ` Kim Phillips
2007-04-18 10:34 ` Segher Boessenkool
2007-04-18 21:48 ` Kim Phillips
2007-04-20 8:34 ` Segher Boessenkool
2007-04-20 19:13 ` Andy Fleming
2007-04-21 17:22 ` Segher Boessenkool
2007-04-23 16:58 ` Andy Fleming
2007-04-23 21:24 ` Segher Boessenkool
2007-04-16 18:40 ` Andy Fleming
2007-04-16 23:25 ` Segher Boessenkool
2007-04-17 7:04 ` Andy Fleming
2007-04-17 10:40 ` Segher Boessenkool [this message]
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=0e43365ca6941310d2d0cb6e117c493a@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--cc=afleming@freescale.com \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).