From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [EXT] Re: [PATCH net-next 03/18] net: mvpp2: set the SMI PHY address when connecting to the PHY
Date: Wed, 23 Aug 2017 14:34:24 +0200 [thread overview]
Message-ID: <20170823123424.GA28612@lunn.ch> (raw)
In-Reply-To: <f6d8907b057241c7a72da0a0255cfd23@IL-EXCH01.marvell.com>
> 2. Auto-Negotiation with PHY devices connected to the GMAC ports.
> The device uses a standard master Serial Management Interface for reading from/writing to the PHY
> registers. In addition, the PHY polling unit performs Auto-Negotiation status update with PHY devices attached
> to the Network ports via the Master SMI Interface.
> The device polls the Status register of each PHY in a round-robin manner.
> If the device detects a change in the link from down to up on 1 of the ports, it performs a series of
> register reads from the PHY and updates the Auto-Negotiation results in the device's registers. The
> Port MAC Status register is updated with these results only if Auto-Negotiation is enabled.
Hi Stefan
That is what i was afraid off.
How clever is this phy polling hardware? e.g. Say somebody reads the
PHY temperature sensor:
commit 0b04680fdae464ee51409b8cb36005f6ef8bd689
Author: Andrew Lunn <andrew@lunn.ch>
Date: Fri Jan 20 01:37:49 2017 +0100
phy: marvell: Add support for temperature sensor
Some Marvell PHYs have an inbuilt temperature sensor. Add hwmon
support for this sensor.
There are two different variants. The simpler, older chips have a 5
degree accuracy. The newer devices have 1 degree accuracy.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This requires changing the PHY page to 0x1a. Any reads the polling
unit does at that time are going to get registers from page 0x1a, not
0x0.
And there are other examples where the page may change,
e.g. configuring WOL, LEDs. Cable test is not yet supported, but it is
on my todo list.
In order to safely read/write the PHY, you need to hold the PHY mutex.
Unless the hardware is very smart, please don't enable this. Let the
phylib and the appropriate PHY driver do the work.
Andrew
next prev parent reply other threads:[~2017-08-23 12:34 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 13:48 [PATCH net-next 00/18] net: mvpp2: MAC/GoP configuration and optional PHYs Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 01/18] net: mvpp2: unify register definitions coding style Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 02/18] net: mvpp2: fix the synchronization module bypass macro name Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 03/18] net: mvpp2: set the SMI PHY address when connecting to the PHY Antoine Tenart
2017-07-24 16:40 ` Sergei Shtylyov
2017-07-25 8:42 ` Antoine Tenart
2017-07-26 16:08 ` Andrew Lunn
2017-07-28 1:49 ` Antoine Tenart
2017-07-28 4:21 ` Andrew Lunn
2017-08-22 14:41 ` Antoine Tenart
2017-08-22 14:50 ` Andrew Lunn
2017-08-23 10:40 ` [EXT] " Stefan Chulski
2017-08-23 12:34 ` Andrew Lunn [this message]
2017-08-23 13:30 ` Stefan Chulski
2017-08-23 13:34 ` Andrew Lunn
2017-07-24 13:48 ` [PATCH net-next 04/18] net: mvpp2: move the mii configuration in the ndo_open path Antoine Tenart
2017-07-26 16:11 ` Andrew Lunn
2017-07-28 1:44 ` Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 05/18] net: mvpp2: initialize the GMAC when using a port Antoine Tenart
2017-07-26 16:14 ` Andrew Lunn
2017-07-24 13:48 ` [PATCH net-next 06/18] net: mvpp2: initialize the XLG MAC " Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 07/18] net: mvpp2: initialize the GoP Antoine Tenart
2017-07-26 16:16 ` Andrew Lunn
2017-07-24 13:48 ` [PATCH net-next 08/18] net: mvpp2: make the phy optional Antoine Tenart
2017-07-26 16:20 ` Andrew Lunn
2017-07-28 1:50 ` Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 09/18] net: mvpp2: use named interrupts Antoine Tenart
2017-07-24 16:49 ` Sergei Shtylyov
2017-07-25 8:45 ` Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 10/18] net: mvpp2: use the GoP interrupt for link status changes Antoine Tenart
2017-07-24 22:58 ` Marcin Wojtas
2017-07-25 8:47 ` Antoine Tenart
2017-07-25 13:17 ` Thomas Petazzoni
2017-07-26 0:07 ` Antoine Tenart
2017-07-26 16:26 ` Andrew Lunn
2017-07-26 19:38 ` Russell King - ARM Linux
2017-08-23 8:25 ` Antoine Tenart
2017-08-23 15:24 ` [EXT] " Stefan Chulski
2017-08-23 16:04 ` Antoine Tenart
2017-08-23 21:05 ` Marcin Wojtas
2017-08-24 10:59 ` Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 11/18] Documentation/bindings: net: marvell-pp2: add the system controller Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 12/18] Documentation/bindings: net: marvell-pp2: add the interrupt-names Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 13/18] arm64: dts: marvell: cp110: use named interrupts for the Ethernet ports Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 14/18] arm64: dts: marvell: cp110: add PPv2 port interrupts Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 15/18] arm64: dts: marvell: add a reference to the sysctrl syscon in the ppv2 node Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 16/18] arm64: dts: marvell: mcbin: enable more networking ports Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 17/18] arm64: dts: marvell: 7040-db: enable the SFP port Antoine Tenart
2017-07-24 13:48 ` [PATCH net-next 18/18] arm64: dts: marvell: 8040-db: enable the SFP ports Antoine Tenart
2017-07-24 23:56 ` [PATCH net-next 00/18] net: mvpp2: MAC/GoP configuration and optional PHYs Marcin Wojtas
2017-07-25 8:48 ` Antoine Tenart
2017-07-25 10:45 ` Marcin Wojtas
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=20170823123424.GA28612@lunn.ch \
--to=andrew@lunn.ch \
--cc=linux-arm-kernel@lists.infradead.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).