net: phy: dp83869: fix setting CLK_O_SEL field.
Subsystems (3)
PATCH 1/1 net: phy: dp83869: fix setting CLK_O_SEL field.
Table 7-121 in datasheet says we have to set register 0xc6 to value 0x10 before CLK_O_SEL can be modified. No more infos about this field found in datasheet. With this fix, setting of CLK_O_SEL field in IO_MUX_CFG register worked through dts property "ti,clk-output-sel" on a DP83869HMRGZR.
---
drivers/net/phy/dp83869.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/net/phy/dp83869.c +12 -1
@@ -31,6 +31,7 @@#define DP83869_RGMIICTL 0x0032#define DP83869_STRAP_STS1 0x006e#define DP83869_RGMIIDCTL 0x0086 +#define DP83869_ANA_PLL_PROG_PI 0x00c6#define DP83869_RXFCFG 0x0134#define DP83869_RXFPMD1 0x0136#define DP83869_RXFPMD2 0x0137
@@ -826,12 +827,22 @@ static int dp83869_config_init(struct phy_device *phydev)dp83869_config_port_mirroring (phydev);/* Clock output selection if muxing property is set */ -if (dp83869->clk_output_sel !=DP83869_CLK_O_SEL_REF_CLK ) +if (dp83869->clk_output_sel !=DP83869_CLK_O_SEL_REF_CLK ) { +/* +* Table 7-121 in datasheet says we have to set register 0xc6 +* to value 0x10 before CLK_O_SEL can be modified. +*/ + ret =phy_write_mmd (phydev,DP83869_DEVADDR , +DP83869_ANA_PLL_PROG_PI ,0x10 ); +if (ret) +return ret; + ret =phy_modify_mmd (phydev,DP83869_DEVADDR ,DP83869_IO_MUX_CFG ,DP83869_IO_MUX_CFG_CLK_O_SEL_MASK , dp83869->clk_output_sel <<DP83869_IO_MUX_CFG_CLK_O_SEL_SHIFT ); + }if (phy_interface_is_rgmii (phydev)) { ret = phy_write_mmd(phydev, DP83869_DEVADDR, DP83869_RGMIIDCTL,
Signature · 1 line
2.20.1
Quoted 7 lines · Heiko Schocher
Table 7-121 in datasheet says we have to set register
0xc6to value0x10beforeCLK_O_SELcan be modified. No more infos about this field found in datasheet. With this fix, setting ofCLK_O_SELfield inIO_MUX_CFGregister worked through dts property "ti,clk-output-sel" on a DP83869HMRGZR.Signed-off-by Heiko Schocher <[email protected]>
Paolo Abeni
maintainerQuoted 7 lines · Heiko Schocher
Table 7-121 in datasheet says we have to set register
0xc6to value0x10beforeCLK_O_SELcan be modified. No more infos about this field found in datasheet. With this fix, setting ofCLK_O_SELfield inIO_MUX_CFGregister worked through dts property "ti,clk-output-sel" on a DP83869HMRGZR.Signed-off-by Heiko Schocher <[email protected]>
Note that a required fixes tag is missing here:
/P
Hello Paolo,
Quoted 7 lines · Paolo Abeni
Quoted 6 lines · Heiko Schocher
Table 7-121 in datasheet says we have to set register
0xc6to value0x10beforeCLK_O_SELcan be modified. No more infos about this field found in datasheet. With this fix, setting ofCLK_O_SELfield inIO_MUX_CFGregister worked through dts property "ti,clk-output-sel" on a DP83869HMRGZR.
Quoted 5 lines
Quoted 1 line
Signed-off-by Heiko Schocher <[email protected]>Note that a required fixes tag is missing here:
Fixes 01db923e8377 ("net: phy: dp83869: Add TI dp83869 phy")
Should I resend a v2 patch with this tag added ?
Thanks!
bye,
Heiko
Quoted 3 lines
/P
Signature · 5 lines
Nabla Software Engineering HRB 40522 Augsburg Phone: +49 821 45592596 E-Mail: [email protected] Geschäftsführer : Stefano Babic
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 9 lines · On Sat, 25 Apr 2026 05:13:39 +0200 you wrote:
Table 7-121 in datasheet says we have to set register
0xc6to value0x10beforeCLK_O_SELcan be modified. No more infos about this field found in datasheet. With this fix, setting ofCLK_O_SELfield inIO_MUX_CFGregister worked through dts property "ti,clk-output-sel" on a DP83869HMRGZR.Signed-off-by Heiko Schocher <[email protected]>[...]
Here is the summary with links:
- [v1] net: phy: dp83869: fix setting CLK_O_SEL field.
https://git.kernel.org/netdev/net/c/46f74a3f7d57
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html