net: phy: Add Edge-rate driver for Microsemi PHYs.
Subsystems (4)
PATCH v3 1/1 net: phy: Add Edge-rate driver for Microsemi PHYs.
Hi,
Thank you for review the code and valuable comments.
Summary of changes:
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 documentatoin and edge-rate parameter table.
Added probe function initialize the vsc8531 private datastructure.
Thanks,
Raju.
From: Raju Lakkaraju <[email protected]>
---
All the review comments updated and resending for review.
Summary:
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 documentatoin and edge-rate parameter table.
Added probe function initialize the vsc8531 private datastructure.
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 value get from Device Tree.
Tested on Beaglebone Black with VSC 8531 PHY.
--- .../devicetree/bindings/net/mscc-phy-vsc8531.txt | 61 ++++++++++++++++ drivers/net/phy/mscc.c | 85 ++++++++++++++++++++++ include/dt-bindings/net/mscc-phy-vsc8531.h | 23 ++++++ 3 files changed, 169 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt create mode 100644 include/dt-bindings/net/mscc-phy-vsc8531.h
Documentation/devicetree/bindings/net/mscc-phy-vsc8531.txt new file +61 -0
@@ -0,0 +1,61 @@ +* Microsemi - vsc8531 Giga bit ethernet phy + +Required properties: +- compatible : Should contain phy id as "ethernet-phy-idAAAA.BBBB" + If the phy's identifier is known then the list may contain an entry + of the form: "ethernet-phy-idAAAA.BBBB" where + AAAA - The value of the 16 bit Phy Identifier 1 register as + 4 hex digits. This is the chip vendor OUI bits 3:18 + BBBB - The value of the 16 bit Phy Identifier 2 register as + 4 hex digits. This is the chip vendor OUI bits 19:24, + followed by 10 bits of a vendor specific ID. +- reg : The ID number for the phy, usually a small integer + +Optional properties: +- vsc8531,edge-rate : Edge rate sets the drive strength of the MAC + interface output signals. Changing the drive + strength will affect the edge rate of the output + signal. The goal of this setting is to help + reduce electrical emission (EMI) by being able + to reprogram drive strength and in effect slow + down the edge rate if desired. Table 5 shows the + impact to the edge rate per VDDMAC supply for each + drive strength setting. Default edge rate is set as + Fastest edge rate (i.e. 7). + Ref: Table:1 - Edge rate change below. + +Note: see dt-bindings/net/mscc-vsc8531.h for applicable values + +Table: 1 - Edge rate change +-----------------------------------------------------------------------------| +| Edge Rate Change (VDDMAC) | +| | +| Reg Setting 3.3V 2.5V 1.8V 1.5V | +|----------------------------------------------------------------------------| +| 111 Default Deafult Default Default | +| (Fastest) (recommended) (recommended)| +|----------------------------------------------------------------------------| +| 110 -2% -3% -5% -6% | +|----------------------------------------------------------------------------| +| 101 -4% -6% -9% -14% | +|----------------------------------------------------------------------------| +| 100 -7% -10% -16% -21% | +| (recommended) (recommended) | +|----------------------------------------------------------------------------| +| 011 -10% -14% -23% -29% | +|----------------------------------------------------------------------------| +| 010 -17% -23% -35% -42% | +|----------------------------------------------------------------------------| +| 001 -29% -37% -52% -58% | +|----------------------------------------------------------------------------| +| 000 -53% -63% -76% -77% | +| (slowest) | +|----------------------------------------------------------------------------| + +Example: + + vsc8531_0: ethernet-phy@0 { + compatible = "ethernet-phy-id0007.0570"; + reg = <0>; + vsc8531,edge-rate = /bits/ 8 <MSCC_EDGE_RATE_CNTL_FASTEST>; + };
drivers/net/phy/mscc.c +85 -0
142 lines not on this page · raw message
include/dt-bindings/net/mscc-phy-vsc8531.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* 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 pad */ +#define MSCC_EDGE_RATE_CNTL_SLOWEST 0 +#define MSCC_EDGE_RATE_CNTL_PLUS_1 1 +#define MSCC_EDGE_RATE_CNTL_PLUS_2 2 +#define MSCC_EDGE_RATE_CNTL_PLUS_3 3 +#define MSCC_EDGE_RATE_CNTL_PLUS_4 4 +#define MSCC_EDGE_RATE_CNTL_PLUS_5 5 +#define MSCC_EDGE_RATE_CNTL_PLUS_6 6 +#define MSCC_EDGE_RATE_CNTL_FASTEST 7 + +#endif
Signature · 1 line
2.7.4
Quoted 11 lines · Raju Lakkaraju
Hi,
Thank you for review the code and valuable comments.
Summary of changes:
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 documentatoin and edge-rate parameter table.
Added probe function initialize the vsc8531 private datastructure.
Thanks,
Raju.
Quoted 3 lines
From: Raju Lakkaraju <Raju.Lakkaraju-dzo6w/[email protected]>
---
Please read SubmittingPatches about what the --- means, and what should be above it and what should be below it.
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