lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 Oct 2022 12:31:00 +0200
From:   Frank Wunderlich <linux@...web.de>
To:     Jianjun Wang <jianjun.wang@...iatek.com>,
        linux-mediatek@...ts.infradead.org
CC:     Frank Wunderlich <frank-w@...lic-files.de>,
        Ryder Lee <ryder.lee@...iatek.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v2 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config

Am 28. Oktober 2022 11:24:36 MESZ schrieb Jianjun Wang <jianjun.wang@...iatek.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@...f0000
>: 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@...f8000
>: 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@...lic-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ