mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: netdev-bot+sashiko@kernel.org
Cc: cjd@cjdns.fr, netdev@vger.kernel.org, andrew@lunn.ch,
	olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, krzk+dt@kernel.org,
	conor+dt@kernel.org, matthias.bgg@gmail.com,
	angelogioacchino.delregno@collabora.com,
	chester.a.unal@arinc9.com, daniel@makrotopia.org,
	linux@armlinux.org.uk, arinc.unal@arinc9.com,
	Landen.Chao@mediatek.com, dqfext@gmail.com,
	sean.wang@mediatek.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, naseefkm@gmail.com,
	b.larsson@gmx.com
Subject: Re: [PATCH v2 net-next 6/7] dt-bindings: net: dsa: mediatek,mt7530: add econet,en751221
Date: Thu, 24 Sep 2026 10:49:55 -0500	[thread overview]
Message-ID: <20260924154955.GA337010-robh@kernel.org> (raw)
In-Reply-To: <178967820050.22033.18093714968849770785@kernel.org>

On Thu, Sep 17, 2026 at 08:50:00PM +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 7 potential
> issue(s) to consider:
> 
> Critical: 0 · High: 1 · Medium: 4 · Low: 2
> 
> - [High] net: dsa: lockless child_bus access causes MDIO race condition
> - [Medium] The new switch-device compatible `econet,en751221`
>   (mediatek,mt7530.yaml line 126) is the identical string already…
> - [Medium] The new `econet,en751221` conditional (mediatek,mt7530.yaml
>   lines 369-377) applies only `$ref: "#/$defs/mt7530-passthrough-dsa-…
> - [Medium] The series patch "net: dsa: mediatek: support MDIO switch
>   downstream of MMIO switch" moved `mt7530_setup_mdio_irq()` out of…
> - [Medium] In passthrough mode `mt753x_cpu_port_enable()` (added by the
>   series patch "net: dsa: mediatek: add support for passthrough mode")…
> - [Low] The paragraph added to the binding description
>   (mediatek,mt7530.yaml lines 32-36) states that "EcoNet EN751221 SoCs…
> - [Low] Concern that neither `econet,en751221-switch` nor
>   `econet,en751221` has any consumer: at this commit…
> 
> --
> 
> dt-bindings: net: dsa: mediatek,mt7530: add econet,en751221
> 
> This adds two compatible strings to the MT7530 binding: econet,en751221-switch
> for the memory mapped switch built into the EcoNet EN751221 SoC, and
> econet,en751221 for the MT7530 multi-chip module that some EN751221 packages
> attach to port 5 of the on-die switch via TRGMII. A new $defs block constrains
> the DSA link port of the multi-chip module.
> 
> A few questions on the schema below, plus two observations about other
> patches in the same series.
> 
> > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > index e29fb86934981..106c4087528d7 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > @@ -29,6 +29,12 @@ description: |
> >    and the switch registers are directly mapped into SoC's memory map rather than
> >    using MDIO. The DSA driver currently doesn't support MT7620 variants.
> >  
> > +  EcoNet EN751221 SoCs have a memory mapped MT7530 with 3x 10/100 PHYs and 1x
>                                                           ^^^^
> 
> [Severity: Low]
> Should this be 4x 10/100 PHYs?  The commit message of this patch says
> "ports 0..3 are 10/100 only, port 4 has a gigabit PHY", which is four fast
> ethernet PHYs, and en751221_mac_port_get_caps() in the later driver patch of
> this series agrees:
> 
> 	/* EN751221 ports 0..3 are connected to the integrated FE PHYs. */
> 	case 0 ... 3:
> 		__set_bit(PHY_INTERFACE_MODE_INTERNAL, config->supported_interfaces);
> 		config->mac_capabilities |= MAC_10 | MAC_100;
> 
> Since there is no in-tree EN751221 switch DTS yet, this paragraph is the only
> port reference a DT author has.
> 
> > +  gigabit PHY. Some EN751221 chips such as EN7513G and EN7526G have a multi-chip
> > +  module implementation of the MT7530 as well as the on-die switch. In these
> > +  packages, the multi-chip module is connected to port 5 of the on-die switch
> > +  via a TRGMII link.
> > +
> >    There is only the standalone version of MT7531.
> >  
> >    Port 5 on MT7530 supports various configurations:
> > @@ -111,6 +117,14 @@ properties:
> >            Built-in switch of the EcoNet EN7528 SoC
> >          const: econet,en7528-switch
> >  
> > +      - description:
> > +          Built-in switch of EcoNet EN751221 SoC
> > +        const: econet,en751221-switch
> > +
> > +      - description:
> > +          Multi-chip module MT7530 in EN751221 SoC
> > +        const: econet,en751221
> 
> [Severity: Medium]
> Can this string collide with the existing SoC compatible?  econet,en751221 is
> already documented as the EN751221 root node compatible in
> Documentation/devicetree/bindings/mips/econet.yaml:
> 
>   properties:
>     $nodename:
>       const: '/'
> 
>     compatible:
>       oneOf:
>         - description: Boards with EcoNet EN751221 family SoC
>           items:
>             - enum:
>                 - smartfiber,xp8421-b
>             - const: econet,en751221
> 
> and arch/mips/boot/dts/econet/en751221.dtsi uses it on the root node:
> 
>   / {
> 	compatible = "econet,en751221";
> 
> dtschema derives the select clause of a binding from the strings enumerated
> under properties:compatible, so after this patch mediatek,mt7530.yaml is also
> selected for that root node.  The switch schema has required: [compatible,
> reg], unevaluatedProperties: false, and via the new conditional below also
> required: [mediatek,mcm] (which in turn pulls in resets and reset-names).  Does
> make dtbs_check on arch/mips/boot/dts/econet/en751221_smartfiber_xp8421-b.dtb
> now report the root node as an invalid MT7530 switch node?
> 
> The reverse direction looks affected too: a switch@... node carrying
> compatible = "econet,en751221" is selected by mips/econet.yaml and fails its
> $nodename: const: '/' and its two-entry board/SoC compatible list.
> 
> The analogous MT7621 case does not collide because the SoC root uses
> mediatek,mt7621-soc.  Since the SoC compatible is already released, would a
> distinct string for the switch, e.g. econet,en751221-mcm-switch, work here?

This needs to be addressed.

Rob

  reply	other threads:[~2026-09-24 15:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 17:46 [PATCH v2 net-next 0/7] net: dsa: mt7530: support EcoNet EN751221 Caleb James DeLisle
2026-09-15 17:46 ` [PATCH v2 net-next 1/7] net: dsa: mt7530: get ctrl phy addr using a function Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-15 17:46 ` [PATCH v2 net-next 2/7] dt-bindings: net: dsa: mediatek,mt7530: add passthrough mode Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-24 15:45     ` Rob Herring
2026-09-24 15:45   ` Rob Herring (Arm)
2026-09-15 17:46 ` [PATCH v2 net-next 3/7] net: dsa: mediatek: add support for " Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-15 17:46 ` [PATCH v2 net-next 4/7] net: dsa: mediatek: support PLL setup on MMIO MT7530 Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-15 17:46 ` [PATCH v2 net-next 5/7] net: dsa: mediatek: support MDIO switch downstream of MMIO switch Caleb James DeLisle
2026-09-17 20:49   ` netdev-bot+sashiko
2026-09-15 17:46 ` [PATCH v2 net-next 6/7] dt-bindings: net: dsa: mediatek,mt7530: add econet,en751221 Caleb James DeLisle
2026-09-17 20:50   ` netdev-bot+sashiko
2026-09-24 15:49     ` Rob Herring [this message]
2026-09-15 17:46 ` [PATCH v2 net-next 7/7] net: dsa: mediatek: support EN751221 switch Caleb James DeLisle
2026-09-17 20:50   ` netdev-bot+sashiko
2026-09-20 10:33   ` Benjamin Larsson

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=20260924154955.GA337010-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Landen.Chao@mediatek.com \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arinc.unal@arinc9.com \
    --cc=b.larsson@gmx.com \
    --cc=chester.a.unal@arinc9.com \
    --cc=cjd@cjdns.fr \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=matthias.bgg@gmail.com \
    --cc=naseefkm@gmail.com \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®