Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CCDE17B50F; Sun, 5 Apr 2026 21:59:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.161 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775426387; cv=none; b=Dnqs8k4e71zBiA8XAVgjbAXWDELqzisNjjyeI5/b+pxDEzDXcJ7KoKwT9zqgIVOrPxvvL9xb7PpZoJVrEIsj62GQZXSXrpri8VjW6MldasFhbxgS5P0B1yve+OYkX46ILqlp7ebzYgN5HgUY0mN1g2G5aiFY6LBbCks3OWiD5zE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775426387; c=relaxed/simple; bh=MZNUFi8yolT6aQUoB/vtAsxmU189jDW1XJ3mYuqqJU8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=i97mC98I78JtzK9PuU3Mm/L3pAf0bwexAtw/HQLXQupD7A0kXA7xlfrIhs4O0Xi8uBAAFJZABpk/zIY7lPaQiosNeqhezPAREoxJ5yPuMiI3+yglXO9u+nK9o+Y2DtR4c+Ebwcc7PRhABnbRKBew2tlRjEluP49hcE2FcBp8KyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=fYO8GHPJ; arc=none smtp.client-ip=80.241.56.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="fYO8GHPJ" Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4fpmb26LCHz9sl4; Sun, 5 Apr 2026 23:59:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1775426382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ti02GCS8WYepRt+Ng0w1SPSsT5rII3vNDFgxuu2wZz4=; b=fYO8GHPJ2w9Sj3dzyfXpU++cIf6KcDfByLcXI9h7UU68W3U0DRuOtcTZg0N14k4xHEcXk9 QsHLBLmgwtuP+2gKyqBlm4nGND5GwfZ+NJ/xOD+zMiMt/8QCGLVzw7ax6GKfd0H3YErTCG iDVybZnUQnWp+gJRhH2tXZRhvP6W1S+vSwbe93xiBKKPOGB2itm8BU7O1Vb8hoRk1u+qHO qSGHo6May1Xhm+VUDv/MKNz6mMR6JkDWMEX0sQs0Qkky02JqnhZ2csnMbZYgyjvDfg8c0p qv8EcE4aIFjJbbLuBYsZFH969CSeP1rBDaiwhViOESI/SxBPnM659PMLw+3J/g== Message-ID: <22564dd5-c2b5-46ec-b083-6239a3ff5a2f@mailbox.org> Date: Sun, 5 Apr 2026 23:59:39 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [net-next,PATCH v5 3/3] net: phy: realtek: Add property to enable SSC To: Aleksander Jan Bajkowski , netdev@vger.kernel.org Cc: "David S. Miller" , Andrew Lunn , Conor Dooley , Eric Dumazet , Florian Fainelli , Heiner Kallweit , Ivan Galkin , Jakub Kicinski , Krzysztof Kozlowski , Michael Klein , Paolo Abeni , Rob Herring , Russell King , Vladimir Oltean , devicetree@vger.kernel.org References: <20260326210704.58912-1-marek.vasut@mailbox.org> <20260326210704.58912-3-marek.vasut@mailbox.org> Content-Language: en-US From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-MBO-RS-META: gja1sh77d7xw1qxacetsgq4njcw9hwu6 X-MBO-RS-ID: b05c571556b657abfb4 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 ?