netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	tsbogend@alpha.franken.de, hkallweit1@gmail.com,
	linux@armlinux.org.uk, markus.stockhausen@gmx.de,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, linux-mips@vger.kernel.org
Subject: Re: [PATCH v3 1/3] dt-bindings: net: Add Realtek MDIO controller
Date: Tue, 17 Dec 2024 23:54:34 +0000	[thread overview]
Message-ID: <Z2IPOkMsI4ufGQpQ@makrotopia.org> (raw)
In-Reply-To: <20241217224501.398039-2-chris.packham@alliedtelesis.co.nz>

On Wed, Dec 18, 2024 at 11:44:59AM +1300, Chris Packham wrote:
> [...]
> +patternProperties:
> +  '^ethernet-phy(@[a-f0-9]+)?':
> +    type: object
> +    $ref: ethernet-phy.yaml#
> +
> +    properties:
> +      reg:
> +        description:
> +          The MDIO communication on the RTL9300 is abstracted by the switch. At
> +          the software level communication uses the switch port to address the
> +          PHY with the actual MDIO bus and address having been setup via the
> +          realtek,smi-address property.
> +
> +      realtek,smi-address:
> +        $ref: /schemas/types.yaml#/definitions/uint32-array
> +        description: SMI interface and address for the connected PHY
> +        items:
> +          - description: SMI interface number associated with the port.
> +          - description: SMI address of the PHY for the port.

What speaks against describing the actual MDIO busses and addresses (ie.
the hardware) in Device Tree and setting up the hardware mapping between
ports and SMI bus and address by parsing the DSA switch port description
in the MDIO driver?

In that way you would not need the additional vendor-specific property
and on switches with high port density also avoid having to deal with
bogus "MDIO addresses" greater than 31.

  reply	other threads:[~2024-12-17 23:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 22:44 [PATCH v3 0/3] RTL9300 MDIO driver Chris Packham
2024-12-17 22:44 ` [PATCH v3 1/3] dt-bindings: net: Add Realtek MDIO controller Chris Packham
2024-12-17 23:54   ` Daniel Golle [this message]
2024-12-19 20:44     ` Chris Packham
2024-12-17 22:45 ` [PATCH v3 2/3] mips: dts: realtek: Add " Chris Packham
2024-12-17 22:45 ` [PATCH v3 3/3] net: mdio: Add RTL9300 MDIO driver 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=Z2IPOkMsI4ufGQpQ@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=markus.stockhausen@gmx.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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).