From: Xukai Wang <kingxukai@zohomail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
Troy Mitchell <TroyMitchell988@gmail.com>
Subject: Re: [PATCH 1/3] dt-bindings: clock: Add bindings for Canaan K230 clock controller
Date: Sat, 4 Jan 2025 17:23:58 +0800 [thread overview]
Message-ID: <39e6bf64-2ce6-45bb-b622-4b413efc185f@zohomail.com> (raw)
In-Reply-To: <zfjj33otyxiamsc7u2uwnvygcuhe7u2tfgiz6txp62emnddbw5@5iozmjg4eugn>
On 2024/12/30 15:54, Krzysztof Kozlowski wrote:
> On Sun, Dec 29, 2024 at 09:21:08PM +0800, Xukai Wang wrote:
>> This patch adds the Device Tree binding for the clock controller
>> on Canaan k230. The binding defines the new clocks available and
>> the required properties to configure them correctly.
>>
>> Signed-off-by: Xukai Wang <kingxukai@zohomail.com>
>> ---
>> .../devicetree/bindings/clock/canaan,k230-clk.yaml | 41 ++++++++++++++++++
>> include/dt-bindings/clock/k230-clk.h | 49 ++++++++++++++++++++++
>> 2 files changed, 90 insertions(+)
> Please run scripts/checkpatch.pl and fix reported warnings. After that,
> run also 'scripts/checkpatch.pl --strict' and (probably) fix more
> warnings. Some warnings can be ignored, especially from --strict run,
> but the code here looks like it needs a fix. Feel free to get in touch
> if the warning is not clear.
Apologies for forgetting to use `--strict` with `checkpatch.pl`. I will
run it and address the warnings accordingly before next submission.
>> diff --git a/Documentation/devicetree/bindings/clock/canaan,k230-clk.yaml b/Documentation/devicetree/bindings/clock/canaan,k230-clk.yaml
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..ffd4e0b052455bf3dcedd9355d93764119df3d68
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/canaan,k230-clk.yaml
>> @@ -0,0 +1,41 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/clock/canaan,k230-clk.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Canaan Kendryte K230 Clock
>> +
>> +maintainers:
>> + - Xukai Wang <kingxukai@zohomail.com>
>> +
>> +properties:
>> + compatible:
>> + const: canaan,k230-clk
>> +
>> + clocks:
>> + const: 1
>> +
>> + reg:
>> + maxItems: 2
>> + minItems: 1
> List and describe the items instead.
OK, thank you for the suggestion. I've addressed the feedback and listed
the items under reg with detailed descriptions.
Here's the update version:
reg:
description: |
The `reg` property specifies the base address and size of the
device's registers.
- The first address corresponds to the base address of the PLL
control registers.
- The second address corresponds to the base address of the sysclk
control registers.
minItems: 1
items:
- description: Base address and size of the PLL control registers.
- description: Base address and size of the sysclk control registers.
Does this content look appropriate?
>> +
>> + '#clock-cells':
>> + const: 1
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - clocks
>> + - '#clock-cells'
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + clock-controller@91102000 {
>> + compatible = "canaan,k230-clk";
>> + reg = <0x91102000 0x1000>, <0x91100000 0x1000>;
>> + #clock-cells = <1>;
>> + clocks = <&osc24m>;
>> + };
>> diff --git a/include/dt-bindings/clock/k230-clk.h b/include/dt-bindings/clock/k230-clk.h
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..31d1f82fbcff654072ef1a8985a884377d801e72
>> --- /dev/null
>> +++ b/include/dt-bindings/clock/k230-clk.h
>> @@ -0,0 +1,49 @@
>> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
>> +/*
>> + * Kendryte Canaan K230 Clock Drivers
>> + *
>> + * Author: Xukai Wang <kingxukai@zohomail.com>
>> + */
>> +
>> +#ifndef CLOCK_K230_CLK_H
>> +#define CLOCK_K230_CLK_H
>> +
>> +/* Kendryte K230 SoC clock identifiers (arbitrary values). */
>> +#define K230_CPU0_SRC 0
> Drop the indentation after '#define'
Thank you for your feedback. I have removed the indentation after #define.
> Best regards,
> Krzysztof
>
next prev parent reply other threads:[~2025-01-04 9:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-29 13:21 [PATCH 0/3] riscv: canaan: Add support for K230-Canmv clock Xukai Wang
2024-12-29 13:21 ` [PATCH 1/3] dt-bindings: clock: Add bindings for Canaan K230 clock controller Xukai Wang
2024-12-29 14:30 ` Rob Herring (Arm)
2024-12-29 15:16 ` Troy Mitchell
2024-12-30 7:54 ` Krzysztof Kozlowski
2025-01-04 9:23 ` Xukai Wang [this message]
2025-01-04 10:40 ` Krzysztof Kozlowski
2025-01-04 12:09 ` Xukai Wang
2025-01-04 12:33 ` Krzysztof Kozlowski
2024-12-29 13:21 ` [PATCH 2/3] clk: canaan: Add clock driver for Canaan K230 Xukai Wang
2024-12-29 13:21 ` [PATCH 3/3] riscv: dts: canaan: Add clock initial support for K230 Xukai Wang
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=39e6bf64-2ce6-45bb-b622-4b413efc185f@zohomail.com \
--to=kingxukai@zohomail.com \
--cc=TroyMitchell988@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/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