All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joakim Zhang <qiangqing.zhang@nxp.com>
To: Russell King <linux@armlinux.org.uk>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH net-next 3/4] net: phy: realteck: add dt property to disable ALDPS mode
Date: Wed, 2 Jun 2021 02:22:38 +0000	[thread overview]
Message-ID: <DB8PR04MB6795A51DF2F9525CA9AEA177E63D9@DB8PR04MB6795.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20210601115219.GU30436@shell.armlinux.org.uk>


Hi Russell,

> -----Original Message-----
> From: Russell King <linux@armlinux.org.uk>
> Sent: 2021年6月1日 19:52
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: davem@davemloft.net; kuba@kernel.org; robh+dt@kernel.org;
> andrew@lunn.ch; hkallweit1@gmail.com; f.fainelli@gmail.com; dl-linux-imx
> <linux-imx@nxp.com>; netdev@vger.kernel.org; devicetree@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH net-next 3/4] net: phy: realteck: add dt property to disable
> ALDPS mode
> 
> On Tue, Jun 01, 2021 at 05:04:07PM +0800, Joakim Zhang wrote:
> > @@ -325,8 +329,10 @@ static int rtl8211f_config_init(struct phy_device
> *phydev)
> >  	u16 val;
> >  	int ret;
> >
> > -	val = RTL8211F_ALDPS_ENABLE | RTL8211F_ALDPS_PLL_OFF |
> RTL8211F_ALDPS_XTAL_OFF;
> > -	phy_modify_paged_changed(phydev, 0xa43, RTL8211F_PHYCR1, val, val);
> > +	if (!(priv->quirks & RTL821X_ALDPS_DISABLE_FEATURE)) {
> > +		val = RTL8211F_ALDPS_ENABLE | RTL8211F_ALDPS_PLL_OFF |
> RTL8211F_ALDPS_XTAL_OFF;
> > +		phy_modify_paged_changed(phydev, 0xa43, RTL8211F_PHYCR1, val,
> val);
> > +	}
> 
> Similar questions as with the previous patch, but also... this doesn't actually
> disable the feature if it was previously turned on. E.g. a
> kexec() from a current kernel that has set these features into a subsequent
> kernel that the DT requests the feature to be disabled. Or a boot loader that
> has enabled this feature.
Sorry, I don't know what your meanings. As I explained before, boot loader also can configure PHY registers,
but kernel should not depend on what boot loader did.

If you use kexec() to boot kernel with DT request to disable this clock, PHY probe also can parse this property to disable it.
I know little about kexec(), could you please explain more if I misunderstand?

> If DT specifies that this feature is disabled, shouldn't this code be disabling it
> explicitly?
Yes, exactly should.

Best Regards,
Joakim Zhang
> --
> RMK's Patch system:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ar
> mlinux.org.uk%2Fdeveloper%2Fpatches%2F&amp;data=04%7C01%7Cqiangqin
> g.zhang%40nxp.com%7Ceacabd25941448301acb08d924f3b6de%7C686ea1d3b
> c2b4c6fa92cd99c5c301635%7C0%7C0%7C637581451436345731%7CUnknown
> %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW
> wiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3jyYeGVBXXb5jCDtyTrt3DI9MwVE
> OT5Et9tpCZG26gY%3D&amp;reserved=0
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2021-06-02  2:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  9:04 [PATCH net-next 0/4] net: phy: add dt property for realtek phy Joakim Zhang
2021-06-01  9:04 ` [PATCH net-next 1/4] dt-bindings: net: add dt binding for realtek rtl82xx phy Joakim Zhang
2021-06-01 13:32   ` Rob Herring
2021-06-02  2:39   ` Andrew Lunn
2021-06-02  3:14     ` Joakim Zhang
2021-06-01  9:04 ` [PATCH net-next 2/4] net: phy: realtek: add dt property to disable CLKOUT clock Joakim Zhang
2021-06-01 11:48   ` Russell King (Oracle)
2021-06-02  2:18     ` Joakim Zhang
2021-06-01 22:07   ` Andrew Lunn
2021-06-02  2:23     ` Joakim Zhang
2021-06-01  9:04 ` [PATCH net-next 3/4] net: phy: realteck: add dt property to disable ALDPS mode Joakim Zhang
2021-06-01 11:52   ` Russell King (Oracle)
2021-06-02  2:22     ` Joakim Zhang [this message]
2021-06-01  9:04 ` [PATCH net-next 4/4] net: phy: realtek: add delay to fix RXC generation issue Joakim Zhang

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=DB8PR04MB6795A51DF2F9525CA9AEA177E63D9@DB8PR04MB6795.eurprd04.prod.outlook.com \
    --to=qiangqing.zhang@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.