From: Vadym Kochan <vadym.kochan@plvision.eu>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jonathan McDowell <noodles@earth.li>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@mellanox.com>,
Ido Schimmel <idosch@mellanox.com>,
Oleksandr Mazur <oleksandr.mazur@plvision.eu>,
Serhiy Boiko <serhiy.boiko@plvision.eu>,
Serhiy Pshyk <serhiy.pshyk@plvision.eu>,
Volodymyr Mytnyk <volodymyr.mytnyk@plvision.eu>,
Taras Chornyi <taras.chornyi@plvision.eu>,
Andrii Savka <andrii.savka@plvision.eu>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Mickey Rachamim <mickeyr@marvell.com>
Subject: Re: [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices
Date: Thu, 20 Aug 2020 11:31:31 +0300 [thread overview]
Message-ID: <20200820083131.GA28129@plvision.eu> (raw)
In-Reply-To: <20200814131815.GA2238071@lunn.ch>
Hi Andrew,
On Fri, Aug 14, 2020 at 03:18:15PM +0200, Andrew Lunn wrote:
> > > > Currently
> > > >
> > > > compatible = "marvell,prestera"
> > > >
> > > > is used as default, so may be
> > > >
> > > > you mean to support few matching including particular silicon too, like ?
> > > >
> > > >
> > > > compatible = "marvell,prestera"
> > > > compatible = "marvell,prestera-ac3x"
> > > >
> > > > Would you please give an example ?
> > >
> > > AFAICT "Prestera" is the general name for the Marvell
> > > enterprise/data-centre silicon, comparable to the "LinkStreet"
> > > designation for their lower end switching. The mv88e* drivers do not
> > > mention LinkStreet in their compatible strings at all, choosing instead
> > > to refer to chip IDs (I see mv88e6085, mv88e6190 + mv88e6250).
> > >
> > > I do not have enough familiarity with the Prestera range to be able to
> > > tell what commonality there is between the different versions (it
> > > appears you need an NDA to get hold of the programming references), but
> > > even just looking at your driver and the vendor code for the BobCat it
> > > seems that AlleyCat3 uses an extended DSA header format, and requires a
> > > firmware with message based access, in comparison to the BobCat which
> > > uses register poking.
> > >
> > > Based on that I'd recommend not using the bare "marvell,prestera"
> > > compatible string, but instead something more specific.
> > > "marvell,prestera-ac3x" seems like a suitable choice, assuming that's
> > > how these chips are named/generally referred to.
> > >
> > > Also I'd expand your Kconfig information to actually include "Marvell
> > > Prestera 98DX326x" as that's the only supported chip range at present.
> > >
> >
> > Yes, Prestera covers more range of devices. But it is planning to cover
> > other devices too, and currently there is no device-specific DTS
> > properties which are used in this version, but only the generic one -
> > since only the MAC address node.
> >
> > I mean that if there will be other Prestera devices supported then it
> > will require to extend the DTS matching string in the driver just to
> > support the same generic DTS properties for new device.
> >
> > Anyway I will rise and discuss this question.
>
> Hi Vadym
>
> Lets start with how mv88e6xxx does this. The switches have ID
> registers. Once you have read the ID registers, you know what device
> you have, and you can select device specific code as needed. However,
> these ID registers are in three different locations, depending on the
> chip family. So the compatible string is all about where to read the
> ID from, not about what specific chip is. So most device tree bindings
> say "marvell,mv88e6085", but the 6390 family use "marvell,mv88e6190"
> for example.
>
> This naming scheme is actually odd compared to others. And that
> oddness causes confusion. But it avoids a few problems. If you have
> per chip compatible strings, what do you do when it conflicts with the
> ID registers. If from day 1 you validate the compatible string against
> the ID register and fail the probe if it is incorrect, you are
> O.K. But if you decide to add this validation later, you are going to
> find a number of device tree blobs which have the wrong compatible
> string. Do you fail the probe on boards which have worked?
>
> So what to do with this driver?
>
> Does the prestera have ID registers? Are you using them in the driver?
>
ASIC device specific handling is serviced by the firmware, current
driver's logic does not have PP specific code and relies on the FW ABI
which is PP-generic, and it looks like this how it should work for
boards with other ASICs, of course these boards should follow the
Marvell's Switchdev board design.
> Marvell is not particularly good at backwards compatibility. Does your
> compatible string give you enough wiggle room you can easily introduce
> another compatible string in order to find the ID registers when they
> move?
>
> Andrew
next prev parent reply other threads:[~2020-08-20 8:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 12:22 [net-next v4 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX326x (AC3x) Vadym Kochan
2020-07-27 12:22 ` [net-next v4 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices Vadym Kochan
2020-07-27 12:59 ` Andy Shevchenko
2020-07-31 15:22 ` Vadym Kochan
2020-07-31 16:02 ` Andy Shevchenko
2020-07-31 20:55 ` Vadym Kochan
2020-07-27 19:32 ` David Miller
2020-08-13 8:03 ` Jonathan McDowell
2020-08-14 8:20 ` Vadym Kochan
2020-08-14 12:05 ` Jonathan McDowell
2020-08-14 12:27 ` Vadym Kochan
2020-08-14 13:18 ` Andrew Lunn
2020-08-20 8:31 ` Vadym Kochan [this message]
2020-08-20 10:00 ` [EXT] " Mickey Rachamim
2020-08-22 16:34 ` Andrew Lunn
2020-08-25 11:36 ` Vadym Kochan
2020-07-27 12:22 ` [net-next v4 2/6] net: marvell: prestera: Add PCI interface support Vadym Kochan
2020-07-27 12:32 ` Jiri Pirko
2020-07-27 12:35 ` Vadym Kochan
2020-07-27 13:02 ` Jiri Pirko
2020-07-27 13:29 ` Andy Shevchenko
2020-07-27 14:11 ` Jiri Pirko
2020-07-27 15:33 ` Andy Shevchenko
2020-07-27 12:22 ` [net-next v4 3/6] net: marvell: prestera: Add basic devlink support Vadym Kochan
2020-07-27 13:07 ` Andy Shevchenko
2020-07-28 12:30 ` Vadym Kochan
2020-07-28 13:24 ` Andy Shevchenko
2020-07-27 12:22 ` [net-next v4 4/6] net: marvell: prestera: Add ethtool interface support Vadym Kochan
2020-07-27 13:17 ` Andy Shevchenko
2020-07-27 12:22 ` [net-next v4 5/6] net: marvell: prestera: Add Switchdev driver implementation Vadym Kochan
2020-07-27 12:22 ` [net-next v4 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings Vadym Kochan
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=20200820083131.GA28129@plvision.eu \
--to=vadym.kochan@plvision.eu \
--cc=andrew@lunn.ch \
--cc=andrii.savka@plvision.eu \
--cc=andy.shevchenko@gmail.com \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mickeyr@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=noodles@earth.li \
--cc=oleksandr.mazur@plvision.eu \
--cc=serhiy.boiko@plvision.eu \
--cc=serhiy.pshyk@plvision.eu \
--cc=taras.chornyi@plvision.eu \
--cc=volodymyr.mytnyk@plvision.eu \
/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).