[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zd3A/OzmfLRWDtjg@shell.armlinux.org.uk>
Date: Tue, 27 Feb 2024 11:01:16 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Bastien Curutchet <bastien.curutchet@...tlin.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Pavel Machek <pavel@....cz>,
Lee Jones <lee@...nel.org>,
Richard Cochran <richardcochran@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-leds@...r.kernel.org,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
herve.codina@...tlin.com, maxime.chevallier@...tlin.com,
christophercordahi@...ometrics.ca
Subject: Re: [PATCH v2 6/6] net: phy: DP83640: Add fiber mode
enabling/disabling from device tree
On Tue, Feb 27, 2024 at 10:39:45AM +0100, Bastien Curutchet wrote:
> @@ -1141,6 +1147,17 @@ static int dp83640_config_init(struct phy_device *phydev)
> val = phy_read(phydev, PCFCR) & ~PCF_EN;
> phy_write(phydev, PCFCR, val);
>
> + if (dp83640->fiber != FIBER_MODE_DEFAULT) {
> + val = phy_read(phydev, PCSR) & ~FX_EN;
> + if (dp83640->fiber == FIBER_MODE_ENABLE)
> + val |= FX_EN;
> + phy_write(phydev, PCSR, val);
val = 0;
if (dp83640->fiber == FIBER_MODE_ENABLE)
val = FX_EN;
phy_modify(phydev, PCSR, FX_EN, val);
> +
> + /* Write SOFT_RESET bit to ensure configuration */
> + val = phy_read(phydev, PHYCR2) | SOFT_RESET;
> + phy_write(phydev, PHYCR2, val);
phy_set_bits(phydev, PHYCR2, SOFT_RESET);
...
> +#else
> +static int dp83640_of_init(struct phy_device *phydev)
> +{
> + dp83640->fiber = FIBER_MODE_DEFAULT;
This hasn't been build tested - dp83640 won't exist here.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists