lkml.org 
[lkml]   [2022]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config
    Date
    From: Frank Wunderlich <frank-w@public-files.de>

    The PCIe driver covers different SOC which needing different clock
    configs. Define them based on compatible.

    Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
    Reviewed-by: Rob Herring <robh@kernel.org>
    ---
    v2:
    - fix typo in mediatek,mt8192-pcie
    ---
    .../bindings/pci/mediatek-pcie-gen3.yaml | 48 ++++++++++++++-----
    1 file changed, 36 insertions(+), 12 deletions(-)

    diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
    index c00be39af64e..98d3f0f1cd76 100644
    --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
    +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
    @@ -43,9 +43,6 @@ description: |+
    each set has its own address for MSI message, and supports 32 MSI vectors
    to generate interrupt.

    -allOf:
    - - $ref: /schemas/pci/pci-bus.yaml#
    -
    properties:
    compatible:
    oneOf:
    @@ -84,15 +81,7 @@ properties:
    maxItems: 6

    clock-names:
    - items:
    - - const: pl_250m
    - - const: tl_26m
    - - const: tl_96m
    - - const: tl_32k
    - - const: peri_26m
    - - enum:
    - - top_133m # for MT8192
    - - peri_mem # for MT8188/MT8195
    + maxItems: 6

    assigned-clocks:
    maxItems: 1
    @@ -138,6 +127,41 @@ required:
    - '#interrupt-cells'
    - interrupt-controller

    +allOf:
    + - $ref: /schemas/pci/pci-bus.yaml#
    + - if:
    + properties:
    + compatible:
    + contains:
    + const: mediatek,mt8192-pcie
    + then:
    + properties:
    + clock-names:
    + items:
    + - const: pl_250m
    + - const: tl_26m
    + - const: tl_96m
    + - const: tl_32k
    + - const: peri_26m
    + - const: top_133m
    + - if:
    + properties:
    + compatible:
    + contains:
    + enum:
    + - mediatek,mt8188-pcie
    + - mediatek,mt8195-pcie
    + then:
    + properties:
    + clock-names:
    + items:
    + - const: pl_250m
    + - const: tl_26m
    + - const: tl_96m
    + - const: tl_32k
    + - const: peri_26m
    + - const: peri_mem
    +
    unevaluatedProperties: false

    examples:
    --
    2.34.1
    \
     
     \ /
      Last update: 2022-10-25 09:29    [W:2.779 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site