From: Heiko Stuebner <heiko@sntech.de>
To: mturquette@baylibre.com, sboyd@kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
heiko@sntech.de, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: [PATCH v2 0/3] Binding and driver for voltage controlled oscillators
Date: Mon, 15 Jul 2024 13:02:48 +0200 [thread overview]
Message-ID: <20240715110251.261844-1-heiko@sntech.de> (raw)
Rockchip boards with PCIe3 controllers inside the soc (rk3568, rk3588) have
external oscillators on the board to generate the needed 100MHz reference
clock the PCIe3 controller needs.
Often these clock generators need supplies to be enabled to run.
Modelling this clock has taken a number of shapes:
- The rk3568 Rock-3a modelled the generator-regulator as "phy-supply" [0]
&pcie30phy {
phy-supply = <&vcc3v3_pi6c_03>;
status = "okay";
};
which is of course not part of the binding
- On the Rock-5-ITX the supply of the clock generator is controlled by
the same gpio as the regulator supplying the the port connected to the
pcie30x4 controller, so if this controller probes first, both
controllers will just run. But if the pcie30x2 controller probes first
(which has a different supply), the controller will stall at the first
dbi read.
There are other types too, where an 25MHz oscillator supplies a PLL
chip like the diodes,pi6c557 used on Theobroma Jaguar and Tiger boards.
As we established in v1 [1], these are essentially different types, so
this series attempts to solve the first case of "voltage controlled
oscillators" as Stephen called them.
changes in v2:
- drop the Diodes PLLs for now, to get the first variant right
- rename stuff to voltage-oscillator / clk_vco as suggested by Stephen
- require vdd-supply in the binding
- enable-gpios stays optional, as they often are tied to vdd-supply
- drop deprecated elements that were left in from the fixed clock binding
[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts#n605
[1] https://lore.kernel.org/linux-clk/b3c450a94bcb4ad0bc5b3c7ee8712cb8.sboyd@kernel.org/
Heiko Stuebner (3):
dt-bindings: clocks: add binding for voltage-controlled-oscillators
clk: add driver for voltage controlled oscillators
arm64: dts: rockchip: fix the pcie refclock oscillator on Rock 5 ITX
.../bindings/clock/voltage-oscillator.yaml | 49 +++++++
.../boot/dts/rockchip/rk3588-rock-5-itx.dts | 38 ++++-
drivers/clk/Kconfig | 10 ++
drivers/clk/Makefile | 1 +
drivers/clk/clk-vco.c | 133 ++++++++++++++++++
5 files changed, 229 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/clock/voltage-oscillator.yaml
create mode 100644 drivers/clk/clk-vco.c
--
2.39.2
next reply other threads:[~2024-07-15 11:04 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 11:02 Heiko Stuebner [this message]
2024-07-15 11:02 ` [PATCH v2 1/3] dt-bindings: clocks: add binding for voltage-controlled-oscillators Heiko Stuebner
2024-07-15 15:15 ` Dragan Simic
2024-07-15 17:46 ` Heiko Stübner
2024-07-15 18:01 ` Dragan Simic
2024-07-15 19:13 ` Heiko Stübner
2024-07-16 20:11 ` Dragan Simic
2024-07-16 16:15 ` Conor Dooley
2024-07-16 17:54 ` Dragan Simic
2024-07-18 9:25 ` Heiko Stübner
2024-07-18 10:53 ` Dragan Simic
2024-07-18 11:30 ` Heiko Stübner
2024-07-18 13:00 ` Dragan Simic
2024-07-18 13:50 ` Heiko Stübner
2024-07-18 14:24 ` Dragan Simic
2024-07-18 15:59 ` Conor Dooley
2024-07-26 22:21 ` Stephen Boyd
2024-07-27 11:25 ` Heiko Stübner
2024-07-27 17:26 ` Dragan Simic
2024-07-15 11:02 ` [PATCH v2 2/3] clk: add driver for voltage controlled oscillators Heiko Stuebner
2024-07-26 22:39 ` Stephen Boyd
2024-07-15 11:02 ` [PATCH v2 3/3] arm64: dts: rockchip: fix the pcie refclock oscillator on Rock 5 ITX Heiko Stuebner
2024-07-18 7:26 ` Anand Moon
2024-07-18 7:32 ` Dragan Simic
2024-07-18 7:52 ` Anand Moon
2024-07-18 7:58 ` Dragan Simic
2024-07-18 8:00 ` Anand Moon
2024-07-18 9:29 ` Heiko Stübner
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=20240715110251.261844-1-heiko@sntech.de \
--to=heiko@sntech.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mturquette@baylibre.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