devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"tsbogend@alpha.franken.de" <tsbogend@alpha.franken.de>,
	"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
	"paulburton@kernel.org" <paulburton@kernel.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mail@birger-koblitz.de" <mail@birger-koblitz.de>,
	"bert@biot.com" <bert@biot.com>,
	"john@phrozen.org" <john@phrozen.org>,
	"sander@svanheule.net" <sander@svanheule.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"kabel@kernel.org" <kabel@kernel.org>,
	"ericwouds@gmail.com" <ericwouds@gmail.com>
Subject: Re: [PATCH v2 4/8] dt-bindings: timer: Add schema for realtek,otto-timer
Date: Mon, 24 Jun 2024 05:21:36 +0000	[thread overview]
Message-ID: <052a4bdb-88fe-4891-a69c-0d90c610d816@alliedtelesis.co.nz> (raw)
In-Reply-To: <d65648d6-4e2b-4009-b0e0-7d1f9a926eb7@kernel.org>


On 24/06/24 16:49, Krzysztof Kozlowski wrote:
> On 24/06/2024 03:22, Chris Packham wrote:
>> Add the devicetree schema for the realtek,otto-timer present on a number
>> of Realtek SoCs.
>>
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> ---
>>
>> Notes:
>>      Changes in v2:
>>      - Use specific compatible
> Where? I do not see changes.

In v1 it was rtl930x-timer, I've updated it to rtl9302-timer

>>      - Remove unnecessary label
>>      - Remove unused irq flags (interrupt controller is one-cell)
>>      - Set minItems for reg and interrupts based on compatible
>>
>>   .../bindings/timer/realtek,otto-timer.yaml    | 66 +++++++++++++++++++
>>   1 file changed, 66 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/timer/realtek,otto-timer.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/timer/realtek,otto-timer.yaml b/Documentation/devicetree/bindings/timer/realtek,otto-timer.yaml
>> new file mode 100644
>> index 000000000000..13ea7aa946fe
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/timer/realtek,otto-timer.yaml
>> @@ -0,0 +1,66 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/timer/realtek,otto-timer.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Realtek Otto SoCs Timer/Counter
>> +
>> +description:
>> +  Realtek SoCs support a number of timers/counters. These are used
>> +  as a per CPU clock event generator and an overall CPU clocksource.
>> +
>> +maintainers:
>> +  - Chris Packham <chris.packham@alliedtelesis.co.nz>
>> +
>> +properties:
>> +  $nodename:
>> +    pattern: "^timer@[0-9a-f]+$"
>> +
>> +  compatible:
>> +    items:
>> +      - enum:
>> +          - realtek,rtl9302-timer
>> +      - const: realtek,otto-timer
>> +
>> +  reg:
>> +    maxItems: 5
> Nothing improved.
>
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  interrupts:
>> +    maxItems: 5
> Nothing improved.
>
>> +
>> +allOf:
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            const: realtek,rtl9302-timer
>> +    then:
>> +      properties:
>> +        reg:
>> +          minItems: 2
>> +        interrupts:
>> +          minItems: 2
> No, that's just incorrect. You do not have more than one variant, so it
> is just 2 items. Or 5 items, not 2-5.

I've been told in the past that the device-tree should describe the 
hardware. Which in this case has 5 timers. But I'm also told to give 
them names which I struggle to do because some of them aren't used.

So do you want something like this:

clocks:
     items:
         - description: CPU0 event clock
         - description: system clock source
         - description: unused
         - description: unused
         - description: unused

interrupts:
     items:
         - description: CPU0 event clock interrupt
         - description: system clock source interrupt
         - description: unused
         - description: unused
         - description: unused

>
>
> Best regards,
> Krzysztof
>
>

  reply	other threads:[~2024-06-24  5:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24  1:22 [PATCH v2 0/8] mips: Support for RTL9302C Chris Packham
2024-06-24  1:22 ` [PATCH v2 1/8] mips: dts: realtek: use "serial" instead of "uart" in node name Chris Packham
2024-06-24  1:22 ` [PATCH v2 2/8] mips: dts: realtek: add device_type property to cpu node Chris Packham
2024-06-24  1:22 ` [PATCH v2 3/8] dt-bindings: mips: realtek: Add rtl930x-soc compatible Chris Packham
2024-06-24  4:48   ` Krzysztof Kozlowski
2024-06-24  5:00     ` Chris Packham
2024-06-26  7:12       ` Krzysztof Kozlowski
2024-06-26 21:01         ` Chris Packham
2024-06-27  6:59           ` Krzysztof Kozlowski
2024-06-24  1:22 ` [PATCH v2 4/8] dt-bindings: timer: Add schema for realtek,otto-timer Chris Packham
2024-06-24  4:49   ` Krzysztof Kozlowski
2024-06-24  5:21     ` Chris Packham [this message]
2024-06-26  7:13       ` Krzysztof Kozlowski
2024-06-26 21:07         ` Chris Packham
2024-06-24  1:22 ` [PATCH v2 5/8] dt-bindings: interrupt-controller: realtek,rtl-intc: Add rtl9300-intc Chris Packham
2024-06-24  4:50   ` Krzysztof Kozlowski
2024-06-24  1:22 ` [PATCH v2 6/8] clocksource: realtek: Add timer driver for rtl-otto platforms Chris Packham
2024-06-26 21:22   ` kernel test robot
2024-06-24  1:22 ` [PATCH v2 7/8] mips: generic: add fdt fixup for Realtek reference board Chris Packham
2024-06-24  1:23 ` [PATCH v2 8/8] mips: dts: realtek: Add RTL9302C board Chris Packham

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=052a4bdb-88fe-4891-a69c-0d90c610d816@alliedtelesis.co.nz \
    --to=chris.packham@alliedtelesis.co.nz \
    --cc=bert@biot.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ericwouds@gmail.com \
    --cc=john@phrozen.org \
    --cc=kabel@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mail@birger-koblitz.de \
    --cc=paulburton@kernel.org \
    --cc=peterz@infradead.org \
    --cc=robh@kernel.org \
    --cc=sander@svanheule.net \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    /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).