All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Andrew Lunn <andrew@lunn.ch>, pavel@denx.de
Cc: netdev@vger.kernel.org, f.fainelli@gmail.com,
	buytenh@marvell.com, buytenh@wantstofly.org, nico@marvell.com
Subject: Re: DSA support for Marvell 88e6065 switch
Date: Sun, 18 Nov 2018 21:15:28 +0100	[thread overview]
Message-ID: <20181118201528.GA18518@amd> (raw)
In-Reply-To: <20181118182053.GE7446@lunn.ch>

[-- Attachment #1: Type: text/plain, Size: 2691 bytes --]

HI!

> > > > I'm trying to create support for Marvell 88e6065 switch... and it
> > > > seems like drivers/net/dsa supports everything, but this model.
> > > > 
> > > > Did someone work with this hardware before? Any idea if it would be
> > > > more suitable to support by existing 88e6060 code, or if 88e6xxx code
> > > > should serve as a base?
> > > 
> > > Hi Pavel
> > > 
> > > The 88e6xxx should be extended to support this. I think you will find
> > > a lot of the building blocks are already in the driver. Compare the
> > > various implementations of the functions in the mv88e6xxx_ops to what
> > > the datasheet says for the registers, and pick those that match.
> > 
> > Ok, so I played a bit.
> > 
> > It looks like e6065 has different register layout from those supported
> > by 6xxx, and is quite similar to e6060.
> 
> Hi Pavel
> 
> However, if you look in the mv88e6xxx, there are quite a few functions
> called mv88e6065_foo. Marvell keeps changing the register layout. When
> writing code, we try to name the functions based on which family of
> devices introduced those registers. But we don't have the whole
> history, so we probably have some names wrong.

Let me check... I thought there was only one such function. Ok, I see
two such functions:

mv88e6065_phylink_validate
mv88e6065_port_set_speed

I may need to re-check, but it looked to me like even functions and
registeres labeled 6xxx are different on 6060 and 6065... which means
changes to the code would not be exactly nice and easy.

> > I understand how 88e6xxx code is supposed to work... but I don't
> > understand how e6060 code is supposed to be probed. It does not seem
> > to have device tree support. It seems to be older code, but is way
> > simpler, and seems to be targetted at similar hardware.
> 
> The e6060 code is really old, pretty much abandoned. To make it
> usable, you are going to have to make a lot of changes. Turn it into
> an mdio driver, add device tree, make it use the new dsa2.c API, etc.

If I wanted it to work, what do I need to do? AFAICT phy autoprobing
should just attach it as soon as it is compiled in?

I tried adding nodes in dts trying to make the driver attach, but no
luck so far.

> I still think you should be looking at the mv88e6xxx driver, but maybe
> taking bits of code from the 6060 driver and adding it to the
> mv88e6xxx driver as needed.

e6060 driver is much simpler, which is somehow nice. Let me look
around some more.

Thanks,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2018-11-19  6:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 19:51 DSA support for Marvell 88e6065 switch Pavel Machek
2018-11-15 20:26 ` Andrew Lunn
2018-11-18 18:07   ` Pavel Machek
2018-11-18 18:20     ` Andrew Lunn
2018-11-18 20:15       ` Pavel Machek [this message]
2018-11-19  3:25         ` Andrew Lunn
2018-11-22 13:21           ` Pavel Machek
2018-11-22 15:33             ` Lennert Buytenhek
2018-11-22 20:27               ` Pavel Machek
2018-12-03  1:42                 ` Lennert Buytenhek
2018-12-05 20:46                   ` Pavel Machek
2018-12-05 22:20                     ` Florian Fainelli
2018-12-06 14:40                       ` Pavel Machek
2019-01-29 22:57       ` mv88e6xxx -- DSA support for Marvell 88e6065 switch (and maybe 88e6060?) Pavel Machek
2019-01-29 23:12         ` Andrew Lunn
2019-01-29 23:21         ` Vivien Didelot
2018-12-06 13:00 ` Well supported DSA switches, support for Marvell 88e6065 switch Pavel Machek
2018-12-06 13:01   ` [PATCH] mv88e6060: Warn about errors Pavel Machek
2018-12-06 20:21     ` David Miller
2018-12-06 20:36       ` Pavel Machek
2018-12-06 13:02   ` [RFD] mv88e6060: Allow the driver to be probed from device tree Pavel Machek
2018-12-06 18:32     ` kbuild test robot
2018-12-15  8:41     ` kbuild test robot
2018-12-06 13:03   ` mv88e6060: Turn e6060 driver into e6065 driver Pavel Machek
2018-12-06 20:23     ` David Miller
2018-12-06 20:35       ` Pavel Machek
2018-12-06 13:05   ` [PATCH] dsa device tree bindings: fix typo and wrong example Pavel Machek
2018-12-06 13:28     ` Vokáč Michal
2019-01-07 18:49       ` Pavel Machek
2019-01-07 18:53         ` Florian Fainelli
2018-12-06 13:06   ` [RFC] tag_daddr: add tagging scheme used by Marvel 88e6065 switch Pavel Machek

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=20181118201528.GA18518@amd \
    --to=pavel@denx.de \
    --cc=andrew@lunn.ch \
    --cc=buytenh@marvell.com \
    --cc=buytenh@wantstofly.org \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nico@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.