[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <79651cf2-7efd-b54c-65a0-8986cea071d5@linaro.org>
Date: Tue, 29 Nov 2022 09:57:56 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Alexandre Mergnat <amergnat@...libre.com>
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
On 28/11/2022 15:03, Alexandre Mergnat wrote:
>
>>>> +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
> ?
Yes, just the other part of comment is missing:
"If you really want to force a validation error when using
mediatek,mt8365-pwrap
and not providing `sys` and `tmr` clocks, you can just override minItems."
but that's fine if this was your intention.
>
>>>> + 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.
Yes, you're right.
Best regards,
Krzysztof
Powered by blists - more mailing lists