lkml.org 
[lkml]   [2022]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] dt-bindings: PCI: me diatek-gen3: add SoC based clock config
Am 28. Oktober 2022 11:24:36 MESZ schrieb Jianjun Wang <jianjun.wang@mediatek.com>:
>Hi Frank,
>
>After apply this patch, we found some dtbs_check error with the
>following patch which adds the PCIe node for MT8195:
>
>https://lore.kernel.org/linux-pci/20221020111925.30002-3-tinghan.shen@mediatek.com/
>
>arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dtb: pcie@112f0000
>: clock-names: 5: 'top_133m' was expected
> From schema: Documentation/devicetree/bindings/pci/mediatek-pcie-
>gen3.yaml
>arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dtb: pcie@112f8000
>: clock-names: 5: 'top_133m' was expected
> From schema: Documentation/devicetree/bindings/pci/mediatek-pcie-
>gen3.yaml
>
>Did you get the same error when adding the PCIe node for MT7986?
>
>Thanks.
>
>On Tue, 2022-10-25 at 09:28 +0200, Frank Wunderlich wrote:
>> From: Frank Wunderlich <frank-w@public-files.de>
>>

As far as i see the problem is the fallback-node which requires different clockconfig than the main compatible.

6th clock was defined as this enum
- top_133m # for MT8192
- peri_mem # for MT8188/MT8195

By using lower compatible as main compatible and first one as fallback you cannot success all parts of allOf.

>> 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

From my PoV the dts is wrong as the 2 SoC are not compatible to each other...mt8192 needs top_133m as 6th clock whereas mt8195 needs peri_mem. Of course we can change it back to enum in both branches,but imho fallback does not match to main compatible in the dts.

>> +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:
>


regards Frank

\
 
 \ /
  Last update: 2022-10-28 12:31    [W:0.109 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site