[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <41f9a362-0eb2-dca9-5975-62a6497ca826@ti.com>
Date: Tue, 17 Dec 2019 11:57:54 +0200
From: Grygorii Strashko <grygorii.strashko@...com>
To: Rob Herring <robh+dt@...nel.org>
CC: "David S. Miller" <davem@...emloft.net>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Mark Rutland <mark.rutland@....com>,
<devicetree@...r.kernel.org>,
Simon Horman <simon.horman@...ronome.com>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] dt-bindings: net: mdio: use non vendor specific
compatible string in example
Hi Rob,
On 06/12/2019 17:44, Grygorii Strashko wrote:
>
>
> On 06/12/2019 17:09, Rob Herring wrote:
>> On Fri, Dec 6, 2019 at 5:14 AM Grygorii Strashko
>> <grygorii.strashko@...com> wrote:
>>>
>>>
>>>
>>> On 05/12/2019 19:59, Rob Herring wrote:
>>>> On Wed, Nov 27, 2019 at 9:39 AM Grygorii Strashko
>>>> <grygorii.strashko@...com> wrote:
>>>>>
>>>>> Use non vendor specific compatible string in example, otherwise DT YAML
>>>>> schemas validation may trigger warnings specific to TI ti,davinci_mdio
>>>>> and not to the generic MDIO example.
>>>>>
>>>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
>>>>> ---
>>>>> Documentation/devicetree/bindings/net/mdio.yaml | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/net/mdio.yaml b/Documentation/devicetree/bindings/net/mdio.yaml
>>>>> index 5d08d2ffd4eb..524f062c6973 100644
>>>>> --- a/Documentation/devicetree/bindings/net/mdio.yaml
>>>>> +++ b/Documentation/devicetree/bindings/net/mdio.yaml
>>>>> @@ -56,7 +56,7 @@ patternProperties:
>>>>> examples:
>>>>> - |
>>>>> davinci_mdio: mdio@...30000 {
>>>>> - compatible = "ti,davinci_mdio";
>>>>> + compatible = "vendor,mdio";
>>>>
>>>> The problem with this is eventually 'vendor,mdio' will get flagged as
>>>> an undocumented compatible. We're a ways off from being able to enable
>>>> that until we have a majority of bindings converted. Though maybe
>>>> examples can be enabled sooner rather than later.
>>>>
>>>
>>> May be some generic compatible string be used for all examples,
>>> like: "vendor,example-ip". What do you think?
>>
>> I'm still not clear what problem you are trying to solve. 'may trigger
>> warnings' doesn't sound like an actual problem.
>
> oh. sry.
> it's like this
> - mdio.yaml describes generic MDIO properties, but uses compatible = "ti,davinci_mdio";
> - davinci_mdio (or other IPs) has some custom properties.
> Some of them can be marked as required - for example bus_freq.
> And in the feature i need to add clocks.
>
> Now "bus_freq" is required for davinci_mdio, but not required for generic mdio example.
> As result, by default, following warning will be produced:
> /home/grygorii/kernel.org/linux-master/linux/Documentation/devicetree/bindings/net/mdio.example.dt.yaml: mdio@...30000: 'bus_freq' is a required property
>
> to w/a above I've added for davinci_mdio:
> if:
> properties:
> compatible:
> contains:
> const: ti,davinci_mdio
> required:
> - bus_freq
> (by the way above is incorrect and if i add "then:" it will still produce warning :), but
> it is different story)
>
> Next if I add "clocks" as required for davinci_mdio I'll get warning again and
> will need to hack ti,davinci-mdio.yaml or update example in mdio.yaml.
>
> So, I'm the position of lucky persons who is working on some HW module which bindings
> where occasionally selected as generic example. :)
>
> FYI, below is example from power-domain.yaml:
>
> parent3: power-controller@...40000 {
> compatible = "foo,power-controller";
> reg = <0x12340000 0x1000>;
> #power-domain-cells = <0>;
> domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>;
> };
>
May be it would be acceptable to just drop "compatible" property from generic MDIO example?
--
Best regards,
grygorii
Powered by blists - more mailing lists