Re: [PATCH v3 3/5] net: phy: qcom: at803x: Add Qualcomm IPQ5018 Internal PHY support

From
George Moussalem <hidden>
Date
2025-06-02 13:02:28
Also in
linux-arm-msm, linux-clk, lkml, netdev
Reply to
Andrew Lunn, 2025-06-02
Hi Andrew,

On 6/2/25 16:41, Andrew Lunn wrote:
quoted
+	/* PHY DAC values are optional and only set in a PHY to PHY link architecture */
+	if (priv->set_short_cable_dac) {
+		/* setting MDAC (Multi-level Digital-to-Analog Converter) in MMD1 */
+		phy_modify_mmd(phydev, MDIO_MMD_PMAPMD, IPQ5018_PHY_MMD1_MDAC,
+			       IPQ5018_PHY_DAC_MASK, IPQ5018_PHY_MMD1_MDAC_VAL);
+
+		/* setting EDAC (Error-detection and Correction) in debug register */
+		at803x_debug_reg_mask(phydev, IPQ5018_PHY_DEBUG_EDAC,
+				      IPQ5018_PHY_DAC_MASK, IPQ5018_PHY_DEBUG_EDAC_VAL);
+	}
In the binding you say:


+            If not set, it is assumed the MDI output pins of this PHY are directly
+            connected to an RJ45 connector and default DAC values will be used.

So shouldn't there be an else clause here setting these two values to
their default, undoing what the bootloader might of done etc.
DAC values are only set if the property is set in the DTS. If the property is not set, the default values set by the PHY itself are used, and as you mentioned below, DAC values aren't modified by the driver.
Or you can change the binding, and say something like:

+            If not set, DAC values are not modified.
sure, anything else you need changed for v4?
We often need a tristate in DT, set something, unset something, leave
it as it is. But that does not exist in DT in an easy form :-(
	Andrew
Best regards,
George
Thread (16 messages) 16 messages, 6 authors, last reply 2025-06-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help