All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "Marek BehĂșn" <marek.behun@nic.cz>,
	"Joe Hershberger" <joe.hershberger@ni.com>,
	"Ramon Fried" <rfried.dev@gmail.com>,
	u-boot <u-boot@lists.denx.de>, "Stefano Babic" <sbabic@denx.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	dl-uboot-imx <uboot-imx@nxp.com>
Subject: Re: [PATCH 5/6] net: add MV88E61xx DSA driver
Date: Thu, 7 Apr 2022 16:03:12 -0700	[thread overview]
Message-ID: <CAJ+vNU3yT1AuATmSUB+YXYzVGtYw7La4aMz3YJi=ng9jt84JxA@mail.gmail.com> (raw)
In-Reply-To: <20220407213106.6fvsohlh467k3huh@skbuf>

On Thu, Apr 7, 2022 at 2:31 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
> On Thu, Apr 07, 2022 at 01:33:58PM -0700, Tim Harvey wrote:
> > I guess I'll have to invest in tagging packets if you won't accept the
> > simplistic approach of not having to tag frames knowing that only one
> > port is active at a time.
>
> I genuinely don't know where you got the impression from that I don't
> accept the simplistic approach. I gave you an option to make the xmit
> and receive ops actually optional at the DSA uclass level so you don't
> have to come up with a make-believe tag parsing function. In the end
> it goes towards the simplification of the Marvell driver. Let's let them
> battle it out for a while and if tag insertion/parsing won't be
> necessary even for multi-switch systems we can discuss about removing
> that logic completely.

Ok... sorry I misunderstood.

>
> > That said, I have no idea if or when I will re-visit this. Adding a
> > DSA version of this driver was something on my personal wish list and
> > not something that was necessary by any means by my employer so I may
> > have to just drop it as I don't have the personal time to work through
> > this part of it or unravelling the mii bus mess in the fec_mxc driver.
> > It seems to me there is an issue with trying to create DM_MDIO drivers
> > in general as most dt's I've seen wouldn't support the requirements
> > yet configure DM_MDIO anyway (meaning if you implemented it you would
> > break those boards as I found).
>
> I don't know why there are boards which set CONFIG_DM_MDIO and then
> fight against the current trying to survive that config being set.
> Maybe you can look into disabling that config option on boards that
> aren't prepared to handle it?

There might not be many boards that would 'break'. Here's what uses
FEC_MXC and DM_MDIO:
$ grep -H CONFIG_FEC_MXC configs/* | awk -F: '{ print $1 }' | xargs grep DM_MDIO
configs/colibri_imx7_defconfig:CONFIG_DM_MDIO=y
configs/colibri_imx7_emmc_defconfig:CONFIG_DM_MDIO=y
configs/ge_b1x5v2_defconfig:CONFIG_DM_MDIO=y
configs/gwventana_emmc_defconfig:CONFIG_DM_MDIO=y
configs/gwventana_gw5904_defconfig:CONFIG_DM_MDIO=y
configs/gwventana_nand_defconfig:CONFIG_DM_MDIO=y
configs/imx7_cm_defconfig:CONFIG_DM_MDIO=y
configs/imx7_cm_defconfig:CONFIG_DM_MDIO_MUX=y
configs/imx8mm_venice_defconfig:CONFIG_DM_MDIO=y
configs/imx8mn_venice_defconfig:CONFIG_DM_MDIO=y
configs/imx8mp_venice_defconfig:CONFIG_DM_MDIO=y
configs/m53menlo_defconfig:CONFIG_DM_MDIO=y
configs/mx7dsabresd_defconfig:CONFIG_DM_MDIO=y
configs/mx7dsabresd_defconfig:CONFIG_DM_MDIO_MUX=y
configs/mx7dsabresd_qspi_defconfig:CONFIG_DM_MDIO=y
configs/mx7dsabresd_qspi_defconfig:CONFIG_DM_MDIO_MUX=y
configs/opos6uldev_defconfig:CONFIG_DM_MDIO=y
configs/pcm058_defconfig:CONFIG_DM_MDIO=y
configs/pico-dwarf-imx7d_defconfig:CONFIG_DM_MDIO=y
configs/pico-hobbit-imx7d_defconfig:CONFIG_DM_MDIO=y
configs/pico-imx7d_bl33_defconfig:CONFIG_DM_MDIO=y
configs/pico-imx7d_defconfig:CONFIG_DM_MDIO=y
configs/pico-nymph-imx7d_defconfig:CONFIG_DM_MDIO=y
configs/pico-pi-imx7d_defconfig:CONFIG_DM_MDIO=y
configs/udoo_neo_defconfig:CONFIG_DM_MDIO=y

The venice/gwventana ones are mine so I can easily test/fix. For the
others just looking at their CONFIG_DEFAULT_DEVICE_TREE and
eliminating duplicates I see:

I believe these would break:
arch/arm/dts/imx7-colibri-rawnand.dts (no mdio subnode)
arch/arm/dts/imx7-colibri-emmc.dts (no mdio subnode)
arch/arm/dts/imx6sx-udoo-neo-basic.dts (no phy-mode)

These should be ok; have phy-mode, phy-handle, mdio subnode
arch/arm/dts/imx6dl-b1x5v2.dts
arch/arm/dts/imx7-cm.dts
arch/arm/dts/imx53-m53menlo.dts
arch/arm/dts/imx6ul-opos6uldev.dts
arch/arm/dts/imx6q-phytec-mira-rdk-nand.dts
arch/arm/dts/imx7d-pico-pi.dts

These may be ok; has phy-mode, phy-handle, mdio subnode for fec1, but
missing mdio subnode for fec2 (but should use mdio from fec1)
arch/arm/dts/imx7d-sdb.dts
arch/arm/dts/imx7d-sdb-qspi.dts

I feel like I would need to get all board maintainers using FEC_MXC to
sign-off that their boards still work.

But then there is this issue of CONFIG_DM_ETH_PHY that still throws
around the concept of struct mii_dev* (which I think should have been
handled by switching to DM_MDIO). There are now three drivers using
this and I'm not sure what to do with that. There are 28 boards using
CONFIG_DM_ETH_PHY (and likely some which are not even using one of the
three drivers that even use CONFIG_DM_ETH_PHY).

Is there a move to try and move all network drivers to DM_MDIO
eliminating the need for struct mii_dev* within those drivers?

Best Regards,

Tim

  reply	other threads:[~2022-04-07 23:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29 22:52 [PATCH 0/6] Add MV88E61xx DSA driver and use on gwventana Tim Harvey
2022-03-29 22:52 ` [PATCH 1/6] net: mdio-uclass: scan for dm mdio children on post-bind Tim Harvey
2022-04-01 19:40   ` Ramon Fried
2022-03-29 22:52 ` [PATCH 2/6] net: dsa: move cpu port probe to dsa_post_probe Tim Harvey
2022-04-01 19:40   ` Ramon Fried
2022-03-29 22:52 ` [PATCH 3/6] net: mdio-uclass: add wrappers for read/write/reset operations Tim Harvey
2022-03-29 22:52 ` [PATCH 4/6] net: fec: add support for DM_MDIO Tim Harvey
2022-03-31 17:01   ` Vladimir Oltean
2022-03-31 17:48     ` Tim Harvey
2022-03-31 19:36       ` Vladimir Oltean
2022-04-01 17:53         ` Tim Harvey
2022-04-01 19:14           ` Vladimir Oltean
2022-03-29 22:52 ` [PATCH 5/6] net: add MV88E61xx DSA driver Tim Harvey
2022-03-29 23:22   ` Marek Behún
2022-03-30 15:46     ` Tim Harvey
2022-03-31 10:30       ` Marek Behún
2022-04-01 20:24         ` Tim Harvey
2022-04-02 23:17           ` Vladimir Oltean
2022-04-07 20:33             ` Tim Harvey
2022-04-07 21:31               ` Vladimir Oltean
2022-04-07 23:03                 ` Tim Harvey [this message]
2022-04-08  0:26                   ` Marek Behún
2022-04-12 14:13   ` Vladimir Oltean
2022-04-14 21:30     ` Tim Harvey
2022-03-29 22:52 ` [PATCH 6/6] board: gw_ventana: enable MV88E61XX DSA support Tim Harvey
2022-03-30 16:01 ` [PATCH 0/6] Add MV88E61xx DSA driver and use on gwventana Tim Harvey
2022-03-31 20:47   ` Chris Packham

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='CAJ+vNU3yT1AuATmSUB+YXYzVGtYw7La4aMz3YJi=ng9jt84JxA@mail.gmail.com' \
    --to=tharvey@gateworks.com \
    --cc=festevam@gmail.com \
    --cc=joe.hershberger@ni.com \
    --cc=marek.behun@nic.cz \
    --cc=rfried.dev@gmail.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    --cc=vladimir.oltean@nxp.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.