dt-bindings: phy: mediatek,tphy: allow simple nodename pattern
PATCH v2 1/2 dt-bindings: phy: mediatek,tphy: allow simple nodename pattern
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.
---
Changes in v2:
- none
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +1 -1
@@ -64,7 +64,7 @@ description: | properties: $nodename: - pattern: "^t-phy@[0-9a-f]+$" + pattern: "^t-phy(@[0-9a-f]+)?$" compatible: oneOf:
Signature · 7 lines
2.34.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 2/2 arm64: dts: mediatek: fix t-phy unit name
dtbs_check throws a warning at t-phy nodes:
Warning (unit_address_vs_reg): /t-phy@1a243000: node has a unit name, but no reg or ranges property Warning (unit_address_vs_reg): /soc/t-phy@11c00000: node has a unit name, but no reg or ranges property
The ranges is empty thus removing the @1a243000, @11c00000 from the node name.
---
Changes in v2:
- mention dtbs_check in the commit message and blame some commits
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 2 +- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt7622.dtsi +1 -1
@@ -905,7 +905,7 @@ sata: sata@1a200000 { status = "disabled"; }; - sata_phy: t-phy@1a243000 { + sata_phy: t-phy { compatible = "mediatek,mt7622-tphy", "mediatek,generic-tphy-v1"; #address-cells = <2>;
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +1 -1
@@ -434,7 +434,7 @@ pcie_intc: interrupt-controller { }; }; - pcie_phy: t-phy@11c00000 { + pcie_phy: t-phy { compatible = "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; #address-cells = <2>;
Signature · 7 lines
2.34.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH v2 2/2] arm64: dts: mediatek: fix t-phy unit name
Il 14/08/23 11:39, Eugen Hristev ha scritto:
Quoted 10 lines
dtbs_checkthrows a warning at t-phy nodes:
Warning (unit_address_vs_reg): /t-phy@1a243000: node has a unit name, but no reg or ranges property Warning (unit_address_vs_reg): /soc/t-phy@11c00000: node has a unit name, but no reg or ranges propertyThe ranges is empty thus removing the
@1a243000,@11c00000from the node name.Fixes 6029cae696c8 ("arm64: dts: mediatek: mt7622: harmonize node names and compatibles")Fixes 918aed7abd2d ("arm64: dts: mt7986: add pcie related device nodes")Signed-off-by Eugen Hristev <[email protected]>
Quoted 26 lines · Eugen Hristev
The pattern for the nodename only allows t-phy@... , however, for the case when the t-phy has no
regand onlyranges(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 propertyFor 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>; }; };
Quoted 6 lines
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 <[email protected]>
This seems reasonable to me, perhaps the lads will scream.
Thanks,
Conor.
Quoted 22 lines
---
Changes in v2:
- noneDocumentation/devicetree/bindings/phy/mediatek,tphy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +1
-1@@ -64,7 +64,7 @@ description: | properties: $nodename: - pattern: "^t-phy@[0-9a-f]+$" + pattern: "^t-phy(@[0-9a-f]+)?$" compatible: oneOf:Signature · 1 line
2.34.1
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: (subset) [PATCH v2 1/2] dt-bindings: phy: mediatek,tphy: allow simple nodename pattern
In reply to Eugen HristevQuoted 9 lines · Eugen Hristev
The pattern for the nodename only allows t-phy@... , however, for the case when the t-phy has no
regand onlyranges(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 propertyFor a node like this:
[...]
Applied, thanks!
[1/2] dt-bindings: phy: mediatek,tphy: allow simple nodename pattern
commit: e4077ca4ebdefa1b4616e4dafcb67b621253b233
Best regards,
Signature · 8 lines
~Vinod -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy