* [PATCH net-next v2 0/1] net: phy: dp83867 non-OF and loopback support
@ 2021-10-13 6:59 Ong Boon Leong
2021-10-13 6:59 ` [PATCH net-next v2 1/1] net: phy: dp83867: introduce critical chip default init for non-of platform Ong Boon Leong
2021-10-15 2:20 ` [PATCH net-next v2 0/1] net: phy: dp83867 non-OF and loopback support patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Ong Boon Leong @ 2021-10-13 6:59 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
Jakub Kicinski
Cc: netdev, linux-kernel, Lay Kuan Loon, Wong Vee Khee
Changes in v2:
* drop "net: phy: dp83867: add generic PHY loopback" patch as not relevant.
Thanks Vee Khee for pointing out.
* Fix dictionary spell check error detected and length issue detected.
Thanks
Boon Leong
Lay, Kuan Loon (1):
net: phy: dp83867: introduce critical chip default init for non-of
platform
drivers/net/phy/dp83867.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next v2 1/1] net: phy: dp83867: introduce critical chip default init for non-of platform
2021-10-13 6:59 [PATCH net-next v2 0/1] net: phy: dp83867 non-OF and loopback support Ong Boon Leong
@ 2021-10-13 6:59 ` Ong Boon Leong
2021-10-13 7:34 ` Kurt Kanzenbach
2021-10-15 2:20 ` [PATCH net-next v2 0/1] net: phy: dp83867 non-OF and loopback support patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Ong Boon Leong @ 2021-10-13 6:59 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
Jakub Kicinski
Cc: netdev, linux-kernel, Lay Kuan Loon, Wong Vee Khee
From: "Lay, Kuan Loon" <kuan.loon.lay@intel.com>
PHY driver dp83867 has rich supports for OF-platform to fine-tune the PHY
chip during phy configuration. However, for non-OF platform, certain PHY
tunable parameters such as IO impedance and RX & TX internal delays are
critical and should be initialized to its default during PHY driver probe.
Tested-by: Clement <clement@intel.com>
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com>
Co-developed-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
---
drivers/net/phy/dp83867.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 6bbc81ad295f..914619f3f0e3 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -619,6 +619,25 @@ static int dp83867_of_init(struct phy_device *phydev)
#else
static int dp83867_of_init(struct phy_device *phydev)
{
+ struct dp83867_private *dp83867 = phydev->priv;
+ u16 delay;
+
+ /* For non-OF device, the RX and TX ID values are either strapped
+ * or take from default value. So, we init RX & TX ID values here
+ * so that the RGMIIDCTL is configured correctly later in
+ * dp83867_config_init();
+ */
+ delay = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIIDCTL);
+ dp83867->rx_id_delay = delay & DP83867_RGMII_RX_CLK_DELAY_MAX;
+ dp83867->tx_id_delay = (delay >> DP83867_RGMII_TX_CLK_DELAY_SHIFT) &
+ DP83867_RGMII_TX_CLK_DELAY_MAX;
+
+ /* Per datasheet, IO impedance is default to 50-ohm, so we set the
+ * same here or else the default '0' means highest IO impedance
+ * which is wrong.
+ */
+ dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN / 2;
+
return 0;
}
#endif /* CONFIG_OF_MDIO */
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2 1/1] net: phy: dp83867: introduce critical chip default init for non-of platform
2021-10-13 6:59 ` [PATCH net-next v2 1/1] net: phy: dp83867: introduce critical chip default init for non-of platform Ong Boon Leong
@ 2021-10-13 7:34 ` Kurt Kanzenbach
0 siblings, 0 replies; 4+ messages in thread
From: Kurt Kanzenbach @ 2021-10-13 7:34 UTC (permalink / raw)
To: Ong Boon Leong, Andrew Lunn, Heiner Kallweit, Russell King,
David S . Miller, Jakub Kicinski
Cc: netdev, linux-kernel, Lay Kuan Loon, Wong Vee Khee
[-- Attachment #1: Type: text/plain, Size: 676 bytes --]
On Wed Oct 13 2021, Ong Boon Leong wrote:
> From: "Lay, Kuan Loon" <kuan.loon.lay@intel.com>
>
> PHY driver dp83867 has rich supports for OF-platform to fine-tune the PHY
> chip during phy configuration. However, for non-OF platform, certain PHY
> tunable parameters such as IO impedance and RX & TX internal delays are
> critical and should be initialized to its default during PHY driver probe.
>
> Tested-by: Clement <clement@intel.com>
> Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com>
> Co-developed-by: Ong Boon Leong <boon.leong.ong@intel.com>
> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Thanks!
Tested-by: Kurt Kanzenbach <kurt@linutronix.de>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2 0/1] net: phy: dp83867 non-OF and loopback support
2021-10-13 6:59 [PATCH net-next v2 0/1] net: phy: dp83867 non-OF and loopback support Ong Boon Leong
2021-10-13 6:59 ` [PATCH net-next v2 1/1] net: phy: dp83867: introduce critical chip default init for non-of platform Ong Boon Leong
@ 2021-10-15 2:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-15 2:20 UTC (permalink / raw)
To: Ong Boon Leong
Cc: andrew, hkallweit1, linux, davem, kuba, netdev, linux-kernel,
kuan.loon.lay, vee.khee.wong
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 13 Oct 2021 14:59:40 +0800 you wrote:
> Changes in v2:
>
> * drop "net: phy: dp83867: add generic PHY loopback" patch as not relevant.
> Thanks Vee Khee for pointing out.
> * Fix dictionary spell check error detected and length issue detected.
>
> Thanks
> Boon Leong
>
> [...]
Here is the summary with links:
- [net-next,v2,1/1] net: phy: dp83867: introduce critical chip default init for non-of platform
https://git.kernel.org/netdev/net-next/c/4dc08dcc9f6f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-15 2:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 6:59 [PATCH net-next v2 0/1] net: phy: dp83867 non-OF and loopback support Ong Boon Leong
2021-10-13 6:59 ` [PATCH net-next v2 1/1] net: phy: dp83867: introduce critical chip default init for non-of platform Ong Boon Leong
2021-10-13 7:34 ` Kurt Kanzenbach
2021-10-15 2:20 ` [PATCH net-next v2 0/1] net: phy: dp83867 non-OF and loopback support patchwork-bot+netdevbpf
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.