lkml.org 
[lkml]   [2022]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 3/5] dt-bindings: net: ipq4019-mdio: require and validate clocks
    Date
    Now that we can match the platforms requiring clocks by compatible start
    using those to allow clocks per compatible and make them required.

    Signed-off-by: Robert Marko <robimarko@gmail.com>
    ---
    Changes in v2:
    * Keep clocks under properties and disallow per compatible
    ---
    .../bindings/net/qcom,ipq4019-mdio.yaml | 27 ++++++++++++++-----
    1 file changed, 20 insertions(+), 7 deletions(-)

    diff --git a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
    index f4918c9e6fd2..72561e3aeee3 100644
    --- a/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
    +++ b/Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
    @@ -9,9 +9,6 @@ title: Qualcomm IPQ40xx MDIO Controller
    maintainers:
    - Robert Marko <robert.marko@sartura.hr>

    -allOf:
    - - $ref: "mdio.yaml#"
    -
    properties:
    compatible:
    oneOf:
    @@ -40,10 +37,8 @@ properties:
    address range is only required by the platform IPQ50xx.

    clocks:
    - maxItems: 1
    - description: |
    - MDIO clock source frequency fixed to 100MHZ, this clock should be specified
    - by the platform IPQ807x, IPQ60xx and IPQ50xx.
    + items:
    + - description: MDIO clock source frequency fixed to 100MHZ

    required:
    - compatible
    @@ -51,6 +46,24 @@ required:
    - "#address-cells"
    - "#size-cells"

    +allOf:
    + - $ref: "mdio.yaml#"
    +
    + - if:
    + properties:
    + compatible:
    + contains:
    + enum:
    + - qcom,ipq5018-mdio
    + - qcom,ipq6018-mdio
    + - qcom,ipq8074-mdio
    + then:
    + required:
    + - clocks
    + else:
    + properties:
    + clocks: false
    +
    unevaluatedProperties: false

    examples:
    --
    2.38.1
    \
     
     \ /
      Last update: 2022-11-14 20:48    [W:2.836 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site