lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175339519523.3513.2798631977806639092@lazor>
Date: Thu, 24 Jul 2025 15:13:15 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Albert Ou <aou@...s.berkeley.edu>, Conor Dooley <conor+dt@...nel.org>, Conor Dooley <conor@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Michael Turquette <mturquette@...libre.com>, Palmer Dabbelt <palmer@...belt.com>, Paul Walmsley <paul.walmsley@...ive.com>, Rob Herring <robh@...nel.org>, Xukai Wang <kingxukai@...omail.com>
Cc: linux-clk@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org, Samuel Holland <samuel.holland@...ive.com>, Troy Mitchell <TroyMitchell988@...il.com>, Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: Re: [PATCH v6 0/3] riscv: canaan: Add support for K230-Canmv clock

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ