Message ID | 20240402192555.1955204-5-mr.nuke.me@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/7] dt-bindings: clock: Add PCIe pipe related clocks for IPQ9574 | expand |
One minor mistake (I believe) On 2.04.2024 21:25, Alexandru Gagniuc wrote: > @@ -61,6 +61,43 @@ required: > - clock-output-names > - "#phy-cells" > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,ipq6018-qmp-pcie-phy > + - qcom,ipq8074-qmp-gen3-pcie-phy > + - qcom,ipq8074-qmp-pcie-phy > + then: > + properties: > + clocks: > + maxItems: 3 > + clock-names: > + items: > + - const: aux > + - const: cfg_ahb > + - const: pipe > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,ipq9574-qmp-gen3x2-pcie-phy > + then: > + properties: > + clocks: > + maxItems: 5 This should probably be minItems: 5. You already have maxItems: 5 at global property. > + clock-names: > + items: > + - const: aux > + - const: cfg_ahb > + - const: pipe > + - const: anoc > + - const: snoc > + > additionalProperties: false > > examples:
On 02/04/2024 21:25, Alexandru Gagniuc wrote: > The IPQ9574 gen3x2 PHY is very similar to IPQ6018. It requires two > extra clocks named "anoc" and "snoc". Document this, and add a > new compatible string for this PHY. > > Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> > --- > .../phy/qcom,ipq8074-qmp-pcie-phy.yaml | 47 +++++++++++++++++-- > 1 file changed, 42 insertions(+), 5 deletions(-) > > diff --git a/Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml > index 634cec5d57ea..b0dbd2726acd 100644 > --- a/Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml > +++ b/Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml > @@ -19,19 +19,19 @@ properties: > - qcom,ipq6018-qmp-pcie-phy > - qcom,ipq8074-qmp-gen3-pcie-phy > - qcom,ipq8074-qmp-pcie-phy > + - qcom,ipq9574-qmp-gen3x2-pcie-phy > > reg: > items: > - description: serdes > > clocks: > - maxItems: 3 > + minItems: 3 > + maxItems: 5 > > clock-names: > - items: > - - const: aux > - - const: cfg_ahb > - - const: pipe > + minItems: 3 > + maxItems: 5 Just grow the list here to match ipq9574 and keep minItems: 3 > > resets: > maxItems: 2 > @@ -61,6 +61,43 @@ required: > - clock-output-names > - "#phy-cells" > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,ipq6018-qmp-pcie-phy > + - qcom,ipq8074-qmp-gen3-pcie-phy > + - qcom,ipq8074-qmp-pcie-phy > + then: > + properties: > + clocks: > + maxItems: 3 > + clock-names: > + items: > + - const: aux > + - const: cfg_ahb > + - const: pipe Only maxItems: 3 > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,ipq9574-qmp-gen3x2-pcie-phy > + then: > + properties: > + clocks: > + maxItems: 5 > + clock-names: > + items: > + - const: aux > + - const: cfg_ahb > + - const: pipe > + - const: anoc > + - const: snoc minItems: 5 Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml index 634cec5d57ea..b0dbd2726acd 100644 --- a/Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,ipq8074-qmp-pcie-phy.yaml @@ -19,19 +19,19 @@ properties: - qcom,ipq6018-qmp-pcie-phy - qcom,ipq8074-qmp-gen3-pcie-phy - qcom,ipq8074-qmp-pcie-phy + - qcom,ipq9574-qmp-gen3x2-pcie-phy reg: items: - description: serdes clocks: - maxItems: 3 + minItems: 3 + maxItems: 5 clock-names: - items: - - const: aux - - const: cfg_ahb - - const: pipe + minItems: 3 + maxItems: 5 resets: maxItems: 2 @@ -61,6 +61,43 @@ required: - clock-output-names - "#phy-cells" +allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq6018-qmp-pcie-phy + - qcom,ipq8074-qmp-gen3-pcie-phy + - qcom,ipq8074-qmp-pcie-phy + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: aux + - const: cfg_ahb + - const: pipe + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq9574-qmp-gen3x2-pcie-phy + then: + properties: + clocks: + maxItems: 5 + clock-names: + items: + - const: aux + - const: cfg_ahb + - const: pipe + - const: anoc + - const: snoc + additionalProperties: false examples:
The IPQ9574 gen3x2 PHY is very similar to IPQ6018. It requires two extra clocks named "anoc" and "snoc". Document this, and add a new compatible string for this PHY. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> --- .../phy/qcom,ipq8074-qmp-pcie-phy.yaml | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-)