From: Xingyu Wu <xingyu.wu@starfivetech.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
<linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Philipp Zabel <p.zabel@pengutronix.de>,
Samin Guo <samin.guo@starfivetech.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/3] dt-bindings: timer: Add timer for StarFive JH7110 SoC
Date: Tue, 10 Jan 2023 10:14:21 +0800 [thread overview]
Message-ID: <4febeef1-a42a-7d6f-d1af-d8fe19582822@starfivetech.com> (raw)
In-Reply-To: <179e66a8-c6c0-6d3e-4f4a-6b884f532572@linaro.org>
On 2022/12/23 18:25, Krzysztof Kozlowski wrote:
> On 23/12/2022 10:47, Xingyu Wu wrote:
>> Add bindings for the timer on the JH7110
>> RISC-V SoC by StarFive Technology Ltd.
>
> Please wrap commit message according to Linux coding style / submission
> process (neither too early nor over the limit):
> https://elixir.bootlin.com/linux/v5.18-rc4/source/Documentation/process/submitting-patches.rst#L586
>
>
>>
>> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
>> ---
>> .../timer/starfive,jh7110-timers.yaml | 105 ++++++++++++++++++
>> 1 file changed, 105 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/timer/starfive,jh7110-timers.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/timer/starfive,jh7110-timers.yaml b/Documentation/devicetree/bindings/timer/starfive,jh7110-timers.yaml
>> new file mode 100644
>> index 000000000000..fe58dc056313
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/timer/starfive,jh7110-timers.yaml
>> @@ -0,0 +1,105 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/timer/starfive,jh7110-timers.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: StarFive Timers
>
>
> Not enough, really not enough. Describe the hardware.
Will add. Thanks.
>
>> +
>> +maintainers:
>> + - Samin Guo <samin.guo@starfivetech.com>
>> + - Xingyu Wu <xingyu.wu@starfivetech.com>
>> +
>> +properties:
>> + compatible:
>> + const: starfive,jh7110-timers
>
> Why plural "timers", not "timer"? The module is usually called timer -
> see other hardware that type.
>
Will fix. Thanks.
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupts:
>> + items:
>> + - description: timer channel 0 interrupt
>> + - description: timer channel 1 interrupt
>> + - description: timer channel 2 interrupt
>> + - description: timer channel 3 interrupt
>> +
>> + interrupt-names:
>> + items:
>> + - const: timer0
>> + - const: timer1
>> + - const: timer2
>> + - const: timer3
>
> I would just drop the names, not really useful. Unless you plan to add
> here some generic interrupt (like you did for clock-names)?
Will drop. Thanks.
>
>> +
>> + clocks:
>> + items:
>> + - description: timer channel 0 clock
>> + - description: timer channel 1 clock
>> + - description: timer channel 2 clock
>> + - description: timer channel 3 clock
>> + - description: APB clock
>> +
>> + clock-names:
>> + items:
>> + - const: timer0
>> + - const: timer1
>> + - const: timer2
>> + - const: timer3
>> + - const: apb
>> +
>> + resets:
>> + items:
>> + - description: timer channel 0 reset
>> + - description: timer channel 1 reset
>> + - description: timer channel 2 reset
>> + - description: timer channel 3 reset
>> + - description: APB reset
>> +
>> + reset-names:
>> + items:
>> + - const: timer0
>> + - const: timer1
>> + - const: timer2
>> + - const: timer3
>> + - const: apb
>> +
>> + clock-frequency:
>> + description: The frequency of the clock that drives the counter, in Hz.
>
> Why do you need it? Use common clk framework to get that frequency.
Because normally this timer driver is loaded earlier than the clock tree driver, it won't get
that frequency by clk framework and this 'clock-frequency' node is used instead.
>
> Also, sort the nodes somehow, e.g.
> compatible/reg/clocks/clock-frequency/interrupts/resets.
Will reorder. Thanks.
>
>
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - interrupts
>> + - interrupt-names
>> + - clocks
>> + - clock-names
>> + - resets
>> + - reset-names
>> + - clock-frequency
>> +
>> +unevaluatedProperties: false
>
> Did you test the binding?
Yes, I had tested by 'dt_binding_check'. Do you mean the 'unevaluatedProperties' is wrong
and use 'additionalProperties'?
Best regards,
Xingyu Wu
next prev parent reply other threads:[~2023-01-10 2:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 9:47 [PATCH v1 0/3] Add timer driver for StarFive JH7110 RISC-V SoC Xingyu Wu
2022-12-23 9:47 ` [PATCH v1 1/3] dt-bindings: timer: Add timer for StarFive JH7110 SoC Xingyu Wu
2022-12-23 10:25 ` Krzysztof Kozlowski
2023-01-10 2:14 ` Xingyu Wu [this message]
2023-01-10 8:24 ` Krzysztof Kozlowski
2022-12-23 9:48 ` [PATCH v1 2/3] clocksource: Add StarFive timer driver Xingyu Wu
2023-01-17 6:39 ` Xingyu Wu
2023-03-02 9:39 ` Andreas Schwab
2023-03-07 3:47 ` Xingyu Wu
2022-12-23 9:48 ` [PATCH v1 3/3] riscv: dts: jh7110: starfive: Add timer node Xingyu Wu
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=4febeef1-a42a-7d6f-d1af-d8fe19582822@starfivetech.com \
--to=xingyu.wu@starfivetech.com \
--cc=aou@eecs.berkeley.edu \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=samin.guo@starfivetech.com \
--cc=tglx@linutronix.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).