Re: [PATCH] net: dsa: mv88e6xxx: Add MV88E6352 DT compatible

2018-09-11 Thread Brandon Streiff
On 9/11/2018 6:32 PM, Andrew Lunn wrote: > Please take a look at all the other DT files using the Marvell > chips. You will only ever find "marvell,mv88e6085" or > "marvell,mv88e6190", because everything is compatible to one of these > two. To extend what Andrew stated above,

[PATCH net-next] dt-bindings: net: dsa: marvell: describe compatibility string

2018-03-05 Thread Brandon Streiff
from looking at port_base_addr values (0x0 vs 0x10) in drivers/net/dsa/mv88e6xxx/chip.c. Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- Documentation/devicetree/bindings/net/dsa/marvell.txt | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Documen

Re: [RFC PATCH 00/10] PTP support for DSA and mv88e6xxx driver.

2018-02-06 Thread Brandon Streiff
On 2/3/2018 3:40 PM, Andrew Lunn wrote: > This patchset adds support for using the PTP hardware in switches > supported by the mv88e6xxx driver. The code was produces in > collaboration with Brandon Streiff doing the initial implementation, > and then Richard Cochran and Andrew Lunn ma

RE: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx

2017-11-07 Thread Brandon Streiff
> Oops, I had "slaveOnly" set in my PC's configuration. So layer2 seems > to work as expected. > > Have you tested UDPv4? It doesn't work. I have not. Our usage has been focused on 802.1AS; the ptp4l settings we use are the following: transportSpecific0x1 ptp_dst_mac

RE: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock

2017-09-29 Thread Brandon Streiff
> From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Thursday, September 28, 2017 11:57 AM > > It is the MAC which is doing the time stamping, not they PHY? > So why NETWORK_PHY_TIMESTAMPING? NETWORK_PHY_TIMESTAMPING implies NET_PTP_CLASSIFY (which I do use) and net/core/timestamping.c (which I

RE: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx

2017-09-29 Thread Brandon Streiff
> From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Thursday, September 28, 2017 12:36 PM > > I assume ptp already has the core code to use pinctrl and Linux > standard GPIOs? What does the device tree binding look like? How do > you specify the GPIOs to use? > > What we want to avoid is defining

RE: [PATCH net-next RFC 6/9] net: dsa: forward timestamping callbacks to switch drivers

2017-09-29 Thread Brandon Streiff
> From: Florian Fainelli [mailto:f.faine...@gmail.com] > Sent: Thursday, September 28, 2017 12:40 PM > > Can we also have a fast-path bypass in case time stamping is not > supported by the switch so we don't have to even try to classify this > packet only to realize we don't have a port_rxtsamp()

RE: [PATCH net-next RFC 3/9] net: dsa: mv88e6xxx: add support for GPIO configuration

2017-09-29 Thread Brandon Streiff
> From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Thursday, September 28, 2017 1:01 PM > > > With the write and read acquiring and then releasing the lock > > immediately, is no there room for this sequence to be interrupted in the > > middle and end-up returning inconsistent reads? > > The

RE: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock

2017-09-29 Thread Brandon Streiff
> From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Thursday, September 28, 2017 12:03 PM > > > + bool timeout = time_is_before_jiffies(chip->last_overflow_check + > > + MV88E6XXX_TAI_OVERFLOW_PERIOD); > > + > > + if (timeout) { > > Why do you need

[PATCH net-next RFC 8/9] net: dsa: mv88e6xxx: add rx/tx timestamping support

2017-09-28 Thread Brandon Streiff
Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 16 +- drivers/net/dsa/mv88e6xxx/chip.h | 26 ++ drivers/net/dsa/mv88e6xxx/hwtstamp.c | 535 +++ drivers/net/dsa/mv88

[PATCH net-next RFC 3/9] net: dsa: mv88e6xxx: add support for GPIO configuration

2017-09-28 Thread Brandon Streiff
The Scratch/Misc register is a windowed interface that provides access to the GPIO configuration. Provide a new method for configuration of GPIO functions. Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- drivers/net/dsa/mv88e6xxx/chip.c| 13 +++ drivers/net/dsa/mv8

[PATCH net-next RFC 4/9] net: dsa: mv88e6xxx: add support for event capture

2017-09-28 Thread Brandon Streiff
This patch adds support for configuring mv88e6xxx GPIO lines as PTP pins, so that they may be used for time stamping external events or for periodic output. Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- drivers/net/dsa/mv88e6xxx/chip.h | 4 + drivers/net/dsa/mv88e6xxx

[PATCH net-next RFC 5/9] net: dsa: forward hardware timestamping ioctls to switch driver

2017-09-28 Thread Brandon Streiff
This patch adds support to the dsa slave network device so that switch drivers can implement the SIOC[GS]HWTSTAMP ioctls and the ethtool timestamp-info interface. Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- include/net/dsa.h | 15 +++ net/dsa/slave.c

[PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx

2017-09-28 Thread Brandon Streiff
device_ops::rcv so that we can call the correct port_rxtstamp method. This involved instrumenting all of the *_tag_rcv functions in a way that's kind of a kludge and that I'm not terribly happy with. This applies to net-next as of 14a0d032f4ec. Feedback is appreciated. -- brandon Brandon

[PATCH net-next RFC 6/9] net: dsa: forward timestamping callbacks to switch drivers

2017-09-28 Thread Brandon Streiff
it is where that we know which switch and port the skb goes to. On the tx side, identify PTP packets, clone them, and pass them to the underlying switch driver before we transmit. This mimicks the behavior of skb_tx_timestamp. Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- inclu

[PATCH net-next RFC 7/9] ptp: add offset for reserved field to header

2017-09-28 Thread Brandon Streiff
There is a four-byte "reserved" field at octet 16 in PTPv2. Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- include/linux/ptp_classify.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h index a079656

[PATCH net-next RFC 1/9] net: dsa: mv88e6xxx: add accessors for PTP/TAI registers

2017-09-28 Thread Brandon Streiff
and the special "global port" values are different between the two. This is a similar split to the differences in the "Ingress Rate" register between models, so, like in that case, we call the two variants "6352" and "6390" and create an ops structure to abstract

[PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock

2017-09-28 Thread Brandon Streiff
This patch adds basic support for exposing the 32-bit timestamp counter inside the mv88e6xxx switch code as a ptp_clock. Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- drivers/net/dsa/mv88e6xxx/Kconfig | 10 +++ drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv8

[PATCH net-next RFC 9/9] net: dsa: mv88e6xxx: add workaround for 6341 timestamping

2017-09-28 Thread Brandon Streiff
88E6341 devices default to timestamping at the PHY, but due to a hardware issue, timestamps via this component are unreliable. For this family, configure the PTP hardware to force the timestamping to occur at the MAC. Signed-off-by: Brandon Streiff <brandon.stre...@ni.com> --- drivers/n

Re: net: macb: fail when there's no PHY

2017-09-21 Thread Brandon Streiff
> On Thu, Sep 21, 2017 at 01:05:57PM -0700, Florian Fainelli wrote: > >>> It looks like the macb driver still can't handle boards that don't >>> have a PHY. Is that correct? >> >> Not since: >> >> dacdbb4dfc1a1a1378df8ebc914d4fe82259ed46 ("net: macb: add fixed-link >> node support") > > Yep,