From: Alex Elder <elder@riscstar.com>
To: Haylen Chu <heylenay@4d2.org>,
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>,
Haylen Chu <heylenay@outlook.com>, Yixun Lan <dlan@gentoo.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
spacemit@lists.linux.dev, Inochi Amaoto <inochiama@outlook.com>,
Chen Wang <unicornxdotw@foxmail.com>,
Jisheng Zhang <jszhang@kernel.org>,
Meng Zhang <zhangmeng.kevin@linux.spacemit.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH v6 2/6] dt-bindings: clock: spacemit: Add spacemit,k1-pll
Date: Tue, 8 Apr 2025 14:37:18 -0500 [thread overview]
Message-ID: <c7279fb7-2c43-42d2-bf89-5cdf644d6d6e@riscstar.com> (raw)
In-Reply-To: <20250401172434.6774-3-heylenay@4d2.org>
On 4/1/25 12:24 PM, Haylen Chu wrote:
> Add definition for the PLL found on SpacemiT K1 SoC, which takes the
> external 24MHz oscillator as input and generates clocks in various
> frequencies for the system.
>
> Signed-off-by: Haylen Chu <heylenay@4d2.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Minor nit: you used tabs again on this line:
> +/* APBS (PLL) clocks */
I really don't care what convention you use (I like the spaces
myself), but stick to it one way or the other.
Otherwise this looks good to me.
Reviewed-by: Alex Elder <elder@riscstar.com>
> ---
> .../bindings/clock/spacemit,k1-pll.yaml | 50 +++++++++++++++++++
> .../dt-bindings/clock/spacemit,k1-syscon.h | 37 ++++++++++++++
> 2 files changed, 87 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/spacemit,k1-pll.yaml
>
> diff --git a/Documentation/devicetree/bindings/clock/spacemit,k1-pll.yaml b/Documentation/devicetree/bindings/clock/spacemit,k1-pll.yaml
> new file mode 100644
> index 000000000000..06bafd68c00a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/spacemit,k1-pll.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/spacemit,k1-pll.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: SpacemiT K1 PLL
> +
> +maintainers:
> + - Haylen Chu <heylenay@4d2.org>
> +
> +properties:
> + compatible:
> + const: spacemit,k1-pll
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description: External 24MHz oscillator
> +
> + spacemit,mpmu:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Phandle to the "Main PMU (MPMU)" syscon. It is used to check PLL
> + lock status.
> +
> + "#clock-cells":
> + const: 1
> + description:
> + See <dt-bindings/clock/spacemit,k1-syscon.h> for valid indices.
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - spacemit,mpmu
> + - "#clock-cells"
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + clock-controller@d4090000 {
> + compatible = "spacemit,k1-pll";
> + reg = <0xd4090000 0x1000>;
> + clocks = <&vctcxo_24m>;
> + spacemit,mpmu = <&sysctl_mpmu>;
> + #clock-cells = <1>;
> + };
> diff --git a/include/dt-bindings/clock/spacemit,k1-syscon.h b/include/dt-bindings/clock/spacemit,k1-syscon.h
> index 61c8d7360cf8..efe29c976a01 100644
> --- a/include/dt-bindings/clock/spacemit,k1-syscon.h
> +++ b/include/dt-bindings/clock/spacemit,k1-syscon.h
> @@ -6,6 +6,43 @@
> #ifndef _DT_BINDINGS_SPACEMIT_CCU_H_
> #define _DT_BINDINGS_SPACEMIT_CCU_H_
>
> +/* APBS (PLL) clocks */
> +#define CLK_PLL1 0
> +#define CLK_PLL2 1
> +#define CLK_PLL3 2
> +#define CLK_PLL1_D2 3
> +#define CLK_PLL1_D3 4
> +#define CLK_PLL1_D4 5
> +#define CLK_PLL1_D5 6
> +#define CLK_PLL1_D6 7
> +#define CLK_PLL1_D7 8
> +#define CLK_PLL1_D8 9
> +#define CLK_PLL1_D11 10
> +#define CLK_PLL1_D13 11
> +#define CLK_PLL1_D23 12
> +#define CLK_PLL1_D64 13
> +#define CLK_PLL1_D10_AUD 14
> +#define CLK_PLL1_D100_AUD 15
> +#define CLK_PLL2_D1 16
> +#define CLK_PLL2_D2 17
> +#define CLK_PLL2_D3 18
> +#define CLK_PLL2_D4 19
> +#define CLK_PLL2_D5 20
> +#define CLK_PLL2_D6 21
> +#define CLK_PLL2_D7 22
> +#define CLK_PLL2_D8 23
> +#define CLK_PLL3_D1 24
> +#define CLK_PLL3_D2 25
> +#define CLK_PLL3_D3 26
> +#define CLK_PLL3_D4 27
> +#define CLK_PLL3_D5 28
> +#define CLK_PLL3_D6 29
> +#define CLK_PLL3_D7 30
> +#define CLK_PLL3_D8 31
> +#define CLK_PLL3_80 32
> +#define CLK_PLL3_40 33
> +#define CLK_PLL3_20 34
> +
> /* MPMU clocks */
> #define CLK_PLL1_307P2 0
> #define CLK_PLL1_76P8 1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-04-08 19:37 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 17:24 [PATCH v6 0/6] Add clock controller support for SpacemiT K1 Haylen Chu
2025-04-01 17:24 ` [PATCH v6 1/6] dt-bindings: soc: spacemit: Add spacemit,k1-syscon Haylen Chu
2025-04-08 19:37 ` Alex Elder
2025-04-01 17:24 ` [PATCH v6 2/6] dt-bindings: clock: spacemit: Add spacemit,k1-pll Haylen Chu
2025-04-08 19:37 ` Alex Elder [this message]
2025-04-01 17:24 ` [PATCH v6 3/6] clk: spacemit: Add clock support for SpacemiT K1 SoC Haylen Chu
2025-04-08 19:37 ` Alex Elder
2025-04-10 0:37 ` Yixun Lan
2025-04-10 0:54 ` Inochi Amaoto
2025-04-10 0:57 ` Inochi Amaoto
2025-04-10 1:10 ` Alex Elder
2025-04-10 1:20 ` Inochi Amaoto
2025-04-10 1:55 ` Yixun Lan
2025-04-10 3:47 ` Inochi Amaoto
2025-04-10 12:30 ` Alex Elder
2025-04-10 12:32 ` Alex Elder
2025-04-10 4:07 ` Haylen Chu
2025-04-11 17:14 ` Goko Son
2025-04-10 1:16 ` Yixun Lan
2025-04-10 1:35 ` Inochi Amaoto
2025-04-10 6:54 ` Haylen Chu
2025-04-10 0:55 ` Yixun Lan
2025-04-10 3:55 ` Haylen Chu
2025-04-01 17:24 ` [PATCH v6 4/6] clk: spacemit: k1: Add TWSI8 bus and function clocks Haylen Chu
2025-04-08 19:37 ` Alex Elder
2025-04-10 4:09 ` Haylen Chu
2025-04-01 17:24 ` [PATCH v6 5/6] riscv: dts: spacemit: Add clock tree for SpacemiT K1 Haylen Chu
2025-04-08 19:37 ` Alex Elder
2025-04-01 17:24 ` [PATCH v6 6/6] riscv: defconfig: enable clock controller unit support " Haylen Chu
2025-04-08 19:37 ` Alex Elder
2025-04-10 4:12 ` Haylen Chu
2025-04-08 19:37 ` [PATCH v6 0/6] Add clock controller " Alex Elder
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=c7279fb7-2c43-42d2-bf89-5cdf644d6d6e@riscstar.com \
--to=elder@riscstar.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=heylenay@4d2.org \
--cc=heylenay@outlook.com \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--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=sboyd@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=unicornxdotw@foxmail.com \
--cc=zhangmeng.kevin@linux.spacemit.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