devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>, "Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Hauke Mehrtens" <hauke@hauke-m.de>,
	zajec5@gmail.com,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	zhouyanjie@wanyeetech.com,
	"open list:MIPS" <linux-mips@vger.kernel.org>,
	"Arınç ÜNAL" <arinc.unal@arinc9.com>
Subject: Re: [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema
Date: Sun, 2 Oct 2022 10:03:25 +0200	[thread overview]
Message-ID: <25261abe-ad91-d648-f47e-b9236b35f06f@linaro.org> (raw)
In-Reply-To: <CAMhs-H_999=LsUcEm6CNw5tai+v_D3xJ50JWycbqq4LZgPN9Zg@mail.gmail.com>

On 01/10/2022 12:35, Sergio Paracuellos wrote:
>>
>>> +  compatible:
>>> +    oneOf:
>>> +      - description: Boards with Broadcom bcm3368 SoC
>>> +        items:
>>> +          - const: brcm,bcm3368
>>> +
>>> +      - description: Boards with Broadcom bcm3384 SoC
>>> +        items:
>>> +          - const: brcm,bcm3384
>>
>> I don't understand what did you want to achieve here. Either you
>> document SoC or boards. If boards, where are the actual boards? If SoC,
>> then why calling it boards, why making it oneOf?
> 
> I agree with description should just say "Broadcom bcm3384 SoC", but I
> don't understand what is wrong with oneOf here...

If you document SoCs, this should be just an enum because it will take
20% of that lines. Much smaller, easier to read.

In the same time (for documenting SoCs) all the descriptions are
redundant. We know that this is "Broadcom bcm33843 SoC" because
compatible is "brcm,bcm33843".

> 
>>
>>
>>> +
>>> +      - description: Boards with Broadcom bcm33843 SoC
>>> +        items:
>>> +          - const: brcm,bcm33843
>>> +

(...)

> 
>>
>>> +    unevaluatedProperties: false
>>> +
>>> +    properties:
>>> +      mips-hpt-frequency:
>>> +        description: This is common to all CPUs in the system so it lives
>>> +         under the "cpus" node.
>>
>> You need to describe what is this. Not where it lives. Because where it
>> lives, we can easily see from the schema.
> 
> I have just copied this from the previous documented bmips text file. I guess
> writing the following will be better:
> 
> properties:
>       mips-hpt-frequency:
>         description: MIPS counter high precision timer frequency.
>          This is common to all CPUs in the system so it lives
>          under the "cpus" node.
>         $ref: /schemas/types.yaml#/definitions/uint32

Much better, thanks.


Best regards,
Krzysztof


  reply	other threads:[~2022-10-02  8:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01  4:38 [PATCH v4 0/2] dt-bindings: mips: add CPU bindings for MIPS architecture Sergio Paracuellos
2022-10-01  4:38 ` [PATCH v4 1/2] " Sergio Paracuellos
2022-10-01  4:38 ` [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema Sergio Paracuellos
2022-10-01  9:47   ` Krzysztof Kozlowski
2022-10-01 10:35     ` Sergio Paracuellos
2022-10-02  8:03       ` Krzysztof Kozlowski [this message]
2022-10-02  8:55         ` Sergio Paracuellos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25261abe-ad91-d648-f47e-b9236b35f06f@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=arinc.unal@arinc9.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hauke@hauke-m.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sergio.paracuellos@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=zajec5@gmail.com \
    --cc=zhouyanjie@wanyeetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).