diff mbox series

[1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible

Message ID 20221113184727.44923-1-robimarko@gmail.com
State Superseded
Headers show
Series [1/5] dt-bindings: net: ipq4019-mdio: document IPQ6018 compatible | expand

Commit Message

Robert Marko Nov. 13, 2022, 6:47 p.m. UTC
Document IPQ6018 compatible that is already being used in the DTS along
with the fallback IPQ4019 compatible as driver itself only gets probed
on IPQ4019 and IPQ5018 compatibles.

This is also required in order to specify which platform require clock to
be defined and validate it in schema.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 .../devicetree/bindings/net/qcom,ipq4019-mdio.yaml  | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

Comments

Krzysztof Kozlowski Nov. 14, 2022, 8:26 a.m. UTC | #1
On 13/11/2022 19:47, Robert Marko wrote:
> Document IPQ6018 compatible that is already being used in the DTS along
> with the fallback IPQ4019 compatible as driver itself only gets probed
> on IPQ4019 and IPQ5018 compatibles.
> 
> This is also required in order to specify which platform require clock to
> be defined and validate it in schema.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
>  .../devicetree/bindings/net/qcom,ipq4019-mdio.yaml  | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> index ad8b2b41c140..2463c0bad203 100644
> --- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> @@ -14,9 +14,16 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - qcom,ipq4019-mdio
> -      - qcom,ipq5018-mdio
> +    oneOf:
> +      - items:

These are just one item, so drop "items".

> +          - enum:
> +              - qcom,ipq4019-mdio
> +              - qcom,ipq5018-mdio
> +

Best regards,
Krzysztof
Krzysztof Kozlowski Nov. 14, 2022, 8:27 a.m. UTC | #2
On 13/11/2022 19:47, Robert Marko wrote:
> Allow using IPQ8074 specific compatible along with the fallback IPQ4019
> one in order to be able to specify which compatibles require clocks to
> be able to validate them via schema.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Krzysztof Kozlowski Nov. 14, 2022, 8:30 a.m. UTC | #3
On 13/11/2022 19:47, Robert Marko wrote:
> IPQ5018, IPQ6018 and IPQ8074 require clock-names to be set as driver is
> requesting the clock based on it and not index, so document that and make
> it required for the listed SoC-s.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
>  Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> index b34955b0b827..d233009b0d49 100644
> --- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
> @@ -59,8 +59,12 @@ allOf:
>          clocks:
>            items:
>              - description: MDIO clock source frequency fixed to 100MHZ

Similarly to clocks, define clock-names in top-level and disallow them
for other variants. Do not define properties in allOf:if:then - it makes
schema difficult to maintain and read.

> +        clock-names:
> +          items:
> +            - const: gcc_mdio_ahb_clk
>        required:
>          - clocks
> +        - clock-names
>  
>  unevaluatedProperties: false
>  

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
index ad8b2b41c140..2463c0bad203 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
@@ -14,9 +14,16 @@  allOf:
 
 properties:
   compatible:
-    enum:
-      - qcom,ipq4019-mdio
-      - qcom,ipq5018-mdio
+    oneOf:
+      - items:
+          - enum:
+              - qcom,ipq4019-mdio
+              - qcom,ipq5018-mdio
+
+      - items:
+          - enum:
+              - qcom,ipq6018-mdio
+          - const: qcom,ipq4019-mdio
 
   "#address-cells":
     const: 1