[PATCH v5 04/13] net: phy: micrel: Check RMII clock select property presence

From: Stefano Radaelli

Date: Thu Oct 08 2026 - 15:46:30 EST


From: Stefano Radaelli <stefano.r@xxxxxxxxxxxxx>

The micrel,rmii-reference-clock-select-25-mhz property is tested
for presence, but of_property_read_bool() warns when the property
has a value. Encoding it as <1> to satisfy the DT schema unit check
would therefore produce a warning at PHY probe.

Use of_property_present() for the presence test. It accepts both
existing empty properties and the new numeric form without changing
the RMII clock selection.

Signed-off-by: Stefano Radaelli <stefano.r@xxxxxxxxxxxxx>
---
v4->v5:
- No changes.

v2->v3:
- New patch: use of_property_present() for the RMII clock select
property so its numeric form does not warn during PHY probe.

drivers/net/phy/micrel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index ae830781824b..acb481a29c25 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -2791,7 +2791,7 @@ static int kszphy_probe(struct phy_device *phydev)

if (type)
priv->rmii_ref_clk_sel = type->has_rmii_ref_clk_sel;
- rmii_ref_clk_sel_25_mhz = of_property_read_bool(np,
+ rmii_ref_clk_sel_25_mhz = of_property_present(np,
"micrel,rmii-reference-clock-select-25-mhz");

if (rate > 24500000 && rate < 25500000) {
--
2.47.3