Devicetree
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Markus Stockhausen <markus.stockhausen@gmx.de>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, chris.packham@alliedtelesis.co.nz,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v4 5/5] net: mdio: realtek-rtl9300: support non-default clock frequencies
Date: Mon, 14 Sep 2026 18:47:12 +0200	[thread overview]
Message-ID: <14d8680e-a64d-4ce3-aafd-314b32f579fc@lunn.ch> (raw)
In-Reply-To: <20260912130451.3757276-6-markus.stockhausen@gmx.de>

On Sat, Sep 12, 2026 at 03:04:51PM +0200, Markus Stockhausen wrote:
> The Ethernet MDIO controllers in Realtek Otto switches use an MDC clock
> frequency of 2.5 MHz by default. Hardware configuration fields allow the
> following frequencies to be selected:
> 
> - RTL838x: 2.5 MHz or 10 MHz
> - RTL839x, RTL930x and RTL931x: 1.25 MHz, 2.5 MHz or 5 MHz
> 
> Add support for configuring the MDC frequency through the
> clock-frequency property of each MDIO bus node. Lower frequencies can
> simplify protocol analysis with a logic analyzer, while higher
> frequencies reduce MDIO transaction times during normal operation.
> 
> Program the frequency selector during every probe. If clock-frequency is
> absent, select the defined default of 2.5 MHz. This matches the
> configuration observed with a protocol analyzer under the stock firmware
> or after issuing "rtk network on" in the bootloader.
> 
> RTL839x is an exception because both MDIO buses share a single frequency
> field. Use an explicitly specified frequency as the shared frequency and
> let buses without the property inherit it. Use the 2.5 MHz default if
> neither bus specifies a frequency. Reject conflicting explicit
> frequencies because the hardware cannot configure them independently.
> 
> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2026-09-14 16:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 13:04 [PATCH net-next v4 0/5] net: mdio: realtek-rtl9300: add bus frequency handling Markus Stockhausen
2026-09-12 13:04 ` [PATCH net-next v4 1/5] dt-bindings: net: realtek,rtl9301-mdio: restrict MDIO buses by family Markus Stockhausen
2026-09-16 13:35   ` netdev-bot+sashiko
2026-09-24 14:46     ` Rob Herring
2026-09-12 13:04 ` [PATCH net-next v4 2/5] dt-bindings: net: realtek,rtl9301-mdio: add clock-frequency Markus Stockhausen
2026-09-16 13:35   ` netdev-bot+sashiko
2026-09-24 14:43     ` Rob Herring
2026-09-12 13:04 ` [PATCH net-next v4 3/5] net: mdio: realtek-rtl9300: convert "fwnode" left-overs to "of" Markus Stockhausen
2026-09-14 16:30   ` Andrew Lunn
2026-09-12 13:04 ` [PATCH net-next v4 4/5] net: mdio: realtek-rtl9300: reject duplicate MDIO bus IDs Markus Stockhausen
2026-09-14 16:31   ` Andrew Lunn
2026-09-14 16:44   ` Andrew Lunn
2026-09-16 13:35   ` netdev-bot+sashiko
2026-09-12 13:04 ` [PATCH net-next v4 5/5] net: mdio: realtek-rtl9300: support non-default clock frequencies Markus Stockhausen
2026-09-14 16:47   ` Andrew Lunn [this message]
2026-09-16 13:35   ` netdev-bot+sashiko

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=14d8680e-a64d-4ce3-aafd-314b32f579fc@lunn.ch \
    --to=andrew@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=linux@armlinux.org.uk \
    --cc=markus.stockhausen@gmx.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    /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