From 5babd12ed1144401edc9e17976a64674419aa799 Mon Sep 17 00:00:00 2001 From: Stefano Radaelli Date: Thu, 8 Oct 2026 21:37:44 +0200 Subject: [PATCH 1/2] net: phy: micrel: Check RMII clock select property presence 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 Link: https://patch.msgid.link/6271eea14eb6ef93031921cedc12d87cf5e25595.1791487179.git.stefano.r@variscite.com Signed-off-by: Jakub Kicinski --- 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 5c8461db7b4b..d0b1ad21667b 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) { From 1b93cd0f6584d16b6cf10433f69726a7ad3f056b Mon Sep 17 00:00:00 2001 From: Stefano Radaelli Date: Thu, 8 Oct 2026 21:37:45 +0200 Subject: [PATCH 2/2] dt-bindings: net: micrel: Fix RMII clock select property type The binding describes micrel,rmii-reference-clock-select-25-mhz as a boolean. dt-schema requires properties ending in -mhz to contain an unsigned integer value. A bare property therefore produces a property-units.yaml type warning. Describe 25 MHz selection as <1> and keep the property restricted to KSZ8021, KSZ8031, KSZ8081 and KSZ8091 PHYs, which have the RMII reference clock select bit. The driver checks only for the property presence, so this does not change runtime behavior. Acked-by: Rob Herring (Arm) Signed-off-by: Stefano Radaelli Link: https://patch.msgid.link/759d62ee229f0cbb83a51cacbb70ed7dacf4ea3b.1791487179.git.stefano.r@variscite.com Signed-off-by: Jakub Kicinski --- .../devicetree/bindings/net/micrel.yaml | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/net/micrel.yaml b/Documentation/devicetree/bindings/net/micrel.yaml index 6fa568057b92..a1f876dc00de 100644 --- a/Documentation/devicetree/bindings/net/micrel.yaml +++ b/Documentation/devicetree/bindings/net/micrel.yaml @@ -63,6 +63,14 @@ properties: minimum: 0 maximum: 3 + micrel,rmii-reference-clock-select-25-mhz: + enum: [ 1 ] + description: | + RMII Reference Clock Select bit selects 25 MHz mode. + + Setting the RMII Reference Clock Select bit enables 25 MHz rather + than 50 MHz clock mode. + allOf: - $ref: ethernet-phy.yaml# - if: @@ -90,6 +98,18 @@ allOf: then: properties: micrel,led-mode: false + - if: + not: + properties: + compatible: + contains: + enum: + - ethernet-phy-id0022.1555 + - ethernet-phy-id0022.1556 + - ethernet-phy-id0022.1560 + then: + properties: + micrel,rmii-reference-clock-select-25-mhz: false - if: properties: compatible: @@ -105,13 +125,6 @@ allOf: description: The RMII reference input clock. Used to determine the XI input clock. - micrel,rmii-reference-clock-select-25-mhz: - type: boolean - description: | - RMII Reference Clock Select bit selects 25 MHz mode - - Setting the RMII Reference Clock Select bit enables 25 MHz rather - than 50 MHz clock mode. dependentRequired: micrel,rmii-reference-clock-select-25-mhz: [ clock-names ]