net: phy: Add Edge-rate driver for Microsemi PHYs.
Subsystems (4)
PATCH v7 1/1 net: phy: Add Edge-rate driver for Microsemi PHYs.
From: Raju Lakkaraju <[email protected]>
Edge-rate:
As system and networking speeds increase, a signal's output transition, also know as the edge rate or slew rate (V/ns), takes on greater importance because high-speed signals come with a price. That price is an assortment of interference problems like ringing on the line, signal overshoot and undershoot, extended signal settling times, crosstalk noise, transmission line reflections, false signal detection by the receiving device and electromagnetic interference (EMI) -- all of which can negate the potential gains designers are seeking when they try to increase system speeds through the use of higher performance logic devices. The fact is, faster signaling edge rates can cause a higher level of electrical noise or other type of interference that can actually lead to slower line speeds and lower maximum system frequencies. This parameter allow the board designers to change the driving strange, and thereby change the EMI behavioral.
Edge-rate parameters (vddmac, edge-slowdown) get from Device Tree.
Tested on Beaglebone Black with VSC 8531 PHY.
---
All the review comments updated and resending for review.
Change set:
v1:
- Initial version of Edge-rate driver add by using IOCTL. v2:
- Changed edge-rate parameter to Device Tree with magic number. v3:
- Added Device Tree documentati0n and edge-rate parameter table. Added probe function initialize the vsc8531 private data structure.
v4:
- As per review comment, Device Tree parameters (vddmac, edge-slowdown) added.
v5:
- As per review comment, Device Tree Document parameters (vddmac, edge-slowdown) real numbers added. Table number changed from 5 to 1.
v6:
- As per review comment, Removed Device Tree header file. Removed MACROs and add ARRAYSIZE
v7:
- As per review comment, Removed '-'s (minus) sign in Edge rate table.
---
.../devicetree/bindings/net/mscc-phy-vsc8531.txt | 3 +- drivers/net/phy/mscc.c | 43 ++++++++++++---------- include/dt-bindings/net/mscc-phy-vsc8531.h | 21 ----------- 3 files changed, 26 insertions(+), 41 deletions(-) delete mode 100644 include/dt-bindings/net/mscc-phy-vsc8531.h
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt +2 -1
@@ -18,7 +18,8 @@ Optional properties: to reprogram drive strength and in effect slow down the edge rate if desired. Table 1 shows the impact to the edge rate per VDDMAC supply for each - drive strength setting. + drive strength setting. VDDMAC supply voltage + should be one of the value in Table-1 first row. Ref: Table:1 - Edge rate change below. Note: see dt-bindings/net/mscc-phy-vsc8531.h for applicable values
drivers/net/phy/mscc.c +24 -19
90 lines not on this page · raw message
include/dt-bindings/net/mscc-phy-vsc8531.h deleted +0 -21
@@ -1,21 +0,0 @@ -/* -* Device Tree constants for Microsemi VSC8531 PHY -* -* Author: Nagaraju Lakkaraju -* -* License: Dual MIT/GPL -* Copyright (c) 2016 Microsemi Corporation -*/ - -#ifndef _DT_BINDINGS_MSCC_VSC8531_H -#define _DT_BINDINGS_MSCC_VSC8531_H - -/* MAC interface Edge rate control VDDMAC in milli Volts */ -#define MSCC_VDDMAC_3300 3300 -#define MSCC_VDDMAC_2500 2500 -#define MSCC_VDDMAC_1800 1800 -#define MSCC_VDDMAC_1500 1500 -#define MSCC_VDDMAC_MAX 4 -#define MSCC_SLOWDOWN_MAX 8 - -#endif
Signature · 1 line
2.7.4
Andrew Lunn
maintainerQuoted 2 lines
v7:
- As per review comment, Removed '-'s (minus) sign in Edge rate table.
Still no exact match on the table.
So if i specify a voltage of 3301, 53% slowdown it looks i will actually get 0% slowdown and no error message. That is not very helpful.
Andrew
Hi Andrew,
Thank you for review comment.
Quoted 12 lines · Andrew Lunn
EXTERNAL EMAIL
Quoted 2 lines
v7:
- As per review comment, Removed '-'s (minus) sign in Edge rate table.Still no exact match on the table.
So if i specify a voltage of 3301, 53% slowdown it looks i will actually get 0% slowdown and no error message. That is not very helpful.
According to my understanding, User should choose the right VDDMAC voltage (i.e. 3.3V or 2.5V or 1.8V or 1.5V).
Do you want me to add an error trace which will inform the user that the configured values can not be supported - or if the driver should pick the "closest" value it can support (or both).
Please suggest me.
Quoted 1 line
Andrew
---
Thanks,
Raju.
A message that is not in the archive (sent off-list or not yet received): 20161005083642.GA13404-dzo6w/[email protected]
Quoted 13 lines · Raju Lakkaraju
Hi Andrew,
Thank you for review comment.
Quoted 8 lines · Andrew Lunn
EXTERNAL EMAIL
Quoted 2 lines
v7:
- As per review comment, Removed '-'s (minus) sign in Edge rate table.Still no exact match on the table.
Quoted 7 lines
Quoted 4 lines
So if i specify a voltage of 3301, 53% slowdown it looks i will actually get 0% slowdown and no error message. That is not very helpful.
According to my understanding, User should choose the right VDDMAC voltage (i.e. 3.3V or 2.5V or 1.8V or 1.5V).
And user do make typos, don't read the documentation, etc and get it wrong. The way you have implemented this, does not help the user figure out what they have wrong. It silently does something totally unexpected.
Quoted 3 lines
Do you want me to add an error trace which will inform the user that the configured values can not be supported - or if the driver should pick the "closest" value it can support (or both).
You should validate what the user has requested via DT is valid, and it not, return -EINVAL during probe. That should cause the PHY driver to fail to load, making it clear something is bad in the device tree. A dev_err() call saying which parameter is invalid would also be nice.
Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html