From: Sekhar Nori <nsekhar@ti.com>
To: Nishanth Menon <nm@ti.com>, Mugunthan V N <mugunthanvnm@ti.com>,
netdev@vger.kernel.org, Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@armlinux.org.uk>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH 1/3] net: phy: dp83867: Add documentation for optional impedance control
Date: Thu, 21 Jul 2016 11:52:36 +0530 [thread overview]
Message-ID: <57906A2C.7010201@ti.com> (raw)
In-Reply-To: <578F99D3.9090601@ti.com>
Nishanth,
On Wednesday 20 July 2016 09:03 PM, Nishanth Menon wrote:
> On 07/20/2016 09:56 AM, Mugunthan V N wrote:
>> Add documention of ti,impedance-control which can be used to
>> correct MAC impedance mismatch using phy extended registers.
>>
>> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
>> ---
>> Documentation/devicetree/bindings/net/ti,dp83867.txt | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.txt
>> b/Documentation/devicetree/bindings/net/ti,dp83867.txt
>> index 5d21141..531ea3c5 100644
>> --- a/Documentation/devicetree/bindings/net/ti,dp83867.txt
>> +++ b/Documentation/devicetree/bindings/net/ti,dp83867.txt
>> @@ -9,6 +9,13 @@ Required properties:
>> - ti,fifo-depth - Transmitt FIFO depth- see
>> dt-bindings/net/ti-dp83867.h
>> for applicable values
>>
>> +Optional property:
>> + - ti,impedance-control - MAC Interface Impedance control to vary the
>> + output impedance with an approximate range
>> + from 35-70 ohms in 32 steps. Value range can
>> + be 0x0 to 0x1f. Lowest impedance value is
>> + 0x1f and highest impedance being 0x0.
>> +
>
> Should'nt you be using the impedance values of 35 to 70 as the valid
> values here? that would be the hardware description, and the values to
> program corresponding to those are 0x00 to 0x1f. Right?
>
> Rob: is'nt that the right way to do it?
Agree that that is usually the right way to do it. I believe this case
is bit peculiar though. Here is the extract from the datasheet[1] about
how the register in question works.
"
Output impedance approximate range from 35-70 ohms in 32 steps.
Lowest being 11110 and highest being 00000. Range and Step size
will vary with process.
Default is set to 50 ohms by trim. But the default register value can
vary by process. Non default values of MAC I/O impedance can be
used based on trace impedance. Mismatch between device and
trace impedance can cause voltage overshoot and undershoot.
"
So clearly, there is no easy correspondence that the hardware guarantees
between output impedance ohmage and the register value programmed. Only
couple of things are guaranteed.
1) Programming a value of 0 gives approximately 35 ohms
2) Programming a value of 0x1F gives approximately 70 ohms
3) Default value of the register gives 50 ohms (the default value could
vary by device).
4) Programming a value in between will give some ohmage in the
approximate range 35-70 (curve is unknown).
Given this, I am not sure how one can convert a given user supplied ohms
values to a reasonable register value. Clearly, the register is supposed
to be programmed by experimentation, not calculation.
That said, we could take another approach. At least for the current
issue we are trying to address, we only need to configure the register
to max value. And given the nature of the register, I am pretty sure
that is what most people will end up doing.
So, may be we have two properties:
ti,max-output-impedance
ti,min-output-imepdance
which configure the impedance to maximum and minimum values
respectively. If, in future, someone needs to configure a value in
between, he can introduce a more granular property which when then
override whatever else is specified.
Regards,
Sekhar
[1] http://www.ti.com/lit/ds/symlink/dp83867ir.pdf
next prev parent reply other threads:[~2016-07-21 6:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 14:56 [net-next PATCH 0/3] add support for impedance control for TI dp83867 phy and fix 2nd ethernet on dra72 rev C evm Mugunthan V N
2016-07-20 14:56 ` [net-next PATCH 1/3] net: phy: dp83867: Add documentation for optional impedance control Mugunthan V N
2016-07-20 15:33 ` Nishanth Menon
2016-07-21 6:22 ` Sekhar Nori [this message]
2016-07-21 21:14 ` Rob Herring
2016-07-22 10:05 ` Mugunthan V N
2016-07-20 14:56 ` [net-next PATCH 2/3] net: phy: dp83867: add support for MAC impedance configuration Mugunthan V N
[not found] ` <20160720145614.13132-1-mugunthanvnm-l0cyMroinI0@public.gmane.org>
2016-07-20 14:56 ` [net-next PATCH 3/3] ARM: dts: dra72-evm-revc: fix non-working cpsw second ethernet Mugunthan V N
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=57906A2C.7010201@ti.com \
--to=nsekhar@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=tony@atomide.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 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).