From: Stephen Boyd <sboyd@kernel.org>
To: Albert Ou <aou@eecs.berkeley.edu>,
Conor Dooley <conor+dt@kernel.org>,
Conor Dooley <conor@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Rob Herring <robh@kernel.org>,
Xukai Wang <kingxukai@zohomail.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
Samuel Holland <samuel.holland@sifive.com>,
Troy Mitchell <TroyMitchell988@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH v6 0/3] riscv: canaan: Add support for K230-Canmv clock
Date: Thu, 24 Jul 2025 15:13:15 -0700 [thread overview]
Message-ID: <175339519523.3513.2798631977806639092@lazor> (raw)
In-Reply-To: <776638cc-cbd9-4747-82eb-e11bcc6c8bdd@zohomail.com>
Quoting Xukai Wang (2025-07-13 09:48:44)
>
> I'm working on a Linux clock driver and have encountered a question
> regarding how to properly represent a particular type of clock source.
>
> In K230 SoC, there's a mux clock whose parent can optionally be an
> external pulse signal, which is counted via a pin (the input is not
> generated internally but comes from an external source). I’m wondering:
>
> Should this external pulse signal be modeled as a clock within the
> Common Clock Framework (CCF)?
Likely, yes.
>
> If so, what would be the correct way to register or describe such a
> clock in the driver?
If it is a fixed rate pulse signal I would use a fixed rate clk node at
the root of the DT tree:
clock-50000 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <50000>;
}
If you need pinctrl settings to make that clk work you can assign them
in that node, although I don't know if I've ever seen such a case
before. If the external parent clk needs to be gated you'll need to
write a more featured driver, unless it can be controlled with a gpio or
something like that.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-07-24 22:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 14:25 [PATCH v6 0/3] riscv: canaan: Add support for K230-Canmv clock Xukai Wang
2025-04-15 14:25 ` [PATCH v6 1/3] dt-bindings: clock: Add bindings for Canaan K230 clock controller Xukai Wang
2025-04-21 10:47 ` Chen Wang
2025-04-22 4:18 ` Xukai Wang
2025-04-15 14:25 ` [PATCH v6 2/3] clk: canaan: Add clock driver for Canaan K230 Xukai Wang
2025-04-18 12:31 ` Troy Mitchell
2025-04-18 14:19 ` Xukai Wang
2025-04-19 10:42 ` Xukai Wang
2025-04-19 11:00 ` Troy Mitchell
2025-04-20 18:08 ` PATCH " ALOK TIWARI
2025-04-21 10:47 ` Xukai Wang
2025-04-21 10:43 ` [PATCH " Chen Wang
2025-04-22 8:01 ` Xukai Wang
2025-04-29 13:12 ` Troy Mitchell
2025-04-15 14:25 ` [PATCH v6 3/3] riscv: dts: canaan: Add clock definition for K230 Xukai Wang
2025-07-13 16:48 ` [PATCH v6 0/3] riscv: canaan: Add support for K230-Canmv clock Xukai Wang
2025-07-24 22:13 ` Stephen Boyd [this message]
2025-07-26 5:22 ` 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=175339519523.3513.2798631977806639092@lazor \
--to=sboyd@kernel.org \
--cc=TroyMitchell988@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kingxukai@zohomail.com \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.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=samuel.holland@sifive.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