public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Aleksander Jan Bajkowski <olek2@wp.pl>
To: Marek Vasut <marek.vasut@mailbox.org>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew@lunn.ch>, Conor Dooley <conor+dt@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Ivan Galkin <ivan.galkin@axis.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Michael Klein <michael@fossekall.de>,
	Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	devicetree@vger.kernel.org
Subject: Re: [net-next,PATCH v5 3/3] net: phy: realtek: Add property to enable SSC
Date: Mon, 6 Apr 2026 11:06:34 +0200	[thread overview]
Message-ID: <afe58c43-ccce-4ace-80d2-a3ed09e166c9@wp.pl> (raw)
In-Reply-To: <22564dd5-c2b5-46ec-b083-6239a3ff5a2f@mailbox.org>

Hi Marek,

On 05/04/2026 23:59, Marek Vasut wrote:
> On 4/5/26 10:23 PM, Aleksander Jan Bajkowski wrote:
>
> Hi,
>
>>> +static int rtl8211f_config_clkout_ssc(struct phy_device *phydev)
>>> +{
>>> +    struct rtl821x_priv *priv = phydev->priv;
>>> +    struct device *dev = &phydev->mdio.dev;
>>> +    int ret;
>>> +
>>> +    /* The value is preserved if the device tree property is absent */
>>> +    if (!priv->enable_clkout_ssc)
>>> +        return 0;
>>> +
>>> +    /* RTL8211FVD has PHYCR2 register, but configuration of CLKOUT SSC
>>> +     * is not currently supported by this driver due to different bit
>>> +     * layout.
>>> +     */
>>> +    if (phydev->drv->phy_id == RTL_8211FVD_PHYID)
>>> +        return 0;
>>> +
>>> +    /* Unnamed registers from EMI improvement parameters 
>>> application note 1.2 */
>>> +    ret = phy_write_paged(phydev, 0xd09, 0x10, 0xcf00);
>>> +    if (ret < 0) {
>>> +        dev_err(dev, "CLKOUT SSC initialization failed: %pe\n", 
>>> ERR_PTR(ret));
>>> +        return ret;
>>> +    }
>>> +
>>> +    ret = phy_write(phydev, RTL8211F_SSC_CLKOUT, 0x38c3);
>>
>> Only registers 0x10–0x17 require paged operations. The remaining 
>> registers
>> are mapped directly into the PHY address space. This is mentioned in 
>> commit
>> 650e55f224a575cdb18c984b95036109519502d1. Paged and direct access return
>> the same results. With this in mind, I believe that 
>> RTL8211F_SSC_CLKOUT is
>> an alias for RTL8211F_PHYCR2 and is described on page 45 of the 
>> datasheet[1].
>>
>> 1. RTL8211F(I)-CG/RTL8211FD(I)-CG Datasheet
> This is a good point indeed, I think I can simply set PHYCR2 bits 
> 7,12,13 to enable the CLKOUT SSC ?
Sounds correct.


Regards,
Aleksander

      reply	other threads:[~2026-04-06  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 21:06 [net-next,PATCH v5 1/3] dt-bindings: net: realtek,rtl82xx: Keep property list sorted Marek Vasut
2026-03-26 21:06 ` [net-next,PATCH v5 2/3] dt-bindings: net: realtek,rtl82xx: Document realtek,*-ssc-enable property Marek Vasut
2026-03-26 21:06 ` [net-next,PATCH v5 3/3] net: phy: realtek: Add property to enable SSC Marek Vasut
2026-03-31  1:57   ` Jakub Kicinski
2026-04-05 21:46     ` Marek Vasut
2026-04-05 20:23   ` Aleksander Jan Bajkowski
2026-04-05 21:59     ` Marek Vasut
2026-04-06  9:06       ` Aleksander Jan Bajkowski [this message]

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=afe58c43-ccce-4ace-80d2-a3ed09e166c9@wp.pl \
    --to=olek2@wp.pl \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=ivan.galkin@axis.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marek.vasut@mailbox.org \
    --cc=michael@fossekall.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox