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]
Message-ID: <CAFGrd9pueans7Z_GHassY7ouGOwDmj4oJHAXS4ZtbYK4KH58Bw@mail.gmail.com>
Date:   Mon, 28 Nov 2022 15:03:31 +0100
From:   Alexandre Mergnat <amergnat@...libre.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Sean Wang <sean.wang@...iatek.com>,
        Rob Herring <robh+dt@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Chen Zhong <chen.zhong@...iatek.com>,
        Fabien Parent <fabien.parent@...aro.org>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Mark Brown <broonie@...nel.org>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Flora Fu <flora.fu@...iatek.com>,
        Tianping Fang <tianping.fang@...iatek.com>,
        Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Mattijs Korpershoek <mkorpershoek@...libre.com>,
        Rob Herring <robh@...nel.org>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        linux-rtc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Fabien Parent <fparent@...libre.com>,
        linux-input@...r.kernel.org, devicetree@...r.kernel.org,
        linux-leds@...r.kernel.org
Subject: Re: [PATCH v6 05/10] dt-bindings: soc: mediatek: convert pwrap documentation

Le dim. 27 nov. 2022 à 14:11, Krzysztof Kozlowski
<krzysztof.kozlowski@...aro.org> a écrit :
>
> >> +  pmic:
> >> +    type: object
> >
> > What's here? Other schema? If not then maybe compatible? What about
> > description?
>
> I guess this was comment from Rob, so it's fine.

Yes it is.

> >> +allOf:
> >> +  - if:
> >> +      properties:
> >> +        compatible:
> >> +          contains:
> >> +            const: mediatek,mt8365-pwrap
> >> +    then:
> >> +      properties:
> >> +        clocks:
> >> +          minItems: 4
> >> +
> >> +        clock-names:
> >> +          minItems: 4
> >
> > else:
> > ???
>
> Actually this looks less complete than your previous patch.
>
> else:
>   clocks:
>     maxItems: 2
> same for clock-names
>

I think I’ve followed the feedback done here [1]
I’ve declared `minItems: 2` globally and override it to 4 if
mediatek,mt8365-pwrap is used. Isn’t it the right way to implement it
?

> >> +            compatible = "mediatek,mt8135-pwrap";
> >> +            reg = <0 0x1000f000 0 0x1000>,
> >
> > This does not match your unit address. No warnings when compile testing?
> >

There are no warnings when compile testing. I will fix the unit
address anyway, sorry.

> >> +                  <0 0x11017000 0 0x1000>;
> >> +            reg-names = "pwrap", "pwrap-bridge";
> >> +            interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
> >> +            clocks = <&clk26m>, <&clk26m>;
> >> +            clock-names = "spi", "wrap";
> >> +            resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,
> >> +                     <&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;
> >> +            reset-names = "pwrap", "pwrap-bridge";
> >
> > Missing pmic. Make your example complete.
>
> Probably pmic should be skipped, I understand it is described in MFD
> binding.
>

Put the pmic in the example have 2 constraints:
- The original pmic "mediatek,mt6397" isn’t supported by a yaml
schema, so I’ve a dt_binding_check fail: `failed to match any schema
with compatible: ['mediatek,mt6397']`
- If I put another pmic that supports a yaml schema, I need to put all
required properties for the pmic, which I thought was unnecessary
since it’s already done in its own schema and can change for another
pmic, so less consistent.

Then yes, IMHO, PMIC should be skipped in the example.

[1] https://lore.kernel.org/all/fe898d24-54fa-56bb-8067-b422a3a52ff5@collabora.com/

Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ