public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: phy: mediatek,tphy: allow simple nodename pattern
@ 2023-08-11 13:06 Eugen Hristev
  2023-08-11 13:07 ` [PATCH 2/2] arm64: dts: mediatek: fix t-phy unit name Eugen Hristev
  0 siblings, 1 reply; 3+ messages in thread
From: Eugen Hristev @ 2023-08-11 13:06 UTC (permalink / raw)
  To: linux-mediatek
  Cc: krzysztof.kozlowski+dt, robh+dt, matthias.bgg,
	angelogioacchino.delregno, devicetree, linux-arm-kernel,
	linux-kernel, conor+dt, kernel, Eugen Hristev

The pattern for the nodename only allows t-phy@... , however, for the case
when the t-phy has no `reg` and only `ranges` (basically when the t-phy
is just a parent node), dtc will throw this warning:

Warning (unit_address_vs_reg): /t-phy@1a243000: node has a unit name, but no reg or ranges property

For a node like this:

	sata_phy: t-phy@1a243000 {
		ranges;

		sata_port: sata-phy@1a243000 {
			reg = <0 0x1a243000 0 0x0100>;
		};
	};

it is normal that the parent node 't-phy' would be without any address, as in:

	sata_phy: t-phy {
		ranges;

		sata_port: sata-phy@1a243000 {
			reg = <0 0x1a243000 0 0x0100>;
		};
	};

because being just a holder it does not have its own reg.

However the binding does not allow such a name for the t-phy, so with this
patch, making the `@[0-9a-f]+` part optional, such node is possible.

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
---
 Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
index 230a17f24966..2bb91542e984 100644
--- a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
+++ b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml
@@ -64,7 +64,7 @@ description: |
 
 properties:
   $nodename:
-    pattern: "^t-phy@[0-9a-f]+$"
+    pattern: "^t-phy(@[0-9a-f]+)?$"
 
   compatible:
     oneOf:
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-11 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 13:06 [PATCH 1/2] dt-bindings: phy: mediatek,tphy: allow simple nodename pattern Eugen Hristev
2023-08-11 13:07 ` [PATCH 2/2] arm64: dts: mediatek: fix t-phy unit name Eugen Hristev
2023-08-11 13:10   ` Christopher Obbard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox