mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonas Karlman <jonas@kwiboo.se>
To: Cunhao Lu <1579567540@qq.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Elaine Zhang <zhangqing@rock-chips.com>,
	Richard Cochran <richardcochran@gmail.com>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Subject: Re: [PATCH v6 1/4] dt-bindings: clock: rockchip: Add RK3572 CRU
Date: Thu, 19 Nov 2026 12:59:23 +0100	[thread overview]
Message-ID: <34dbd46a-29cc-4b86-b9cb-9477dc0a4da8@kwiboo.se> (raw)
In-Reply-To: <20261117-add-board-ok3572-c-clk-v6-1-cabad6610c5f@qq.com>

Hi Cunhao Lu,

On 11/17/2026 8:06 AM, Cunhao Lu wrote:
> From: Elaine Zhang <zhangqing@rock-chips.com>
> 
> The RK3572 CRU uses the PMU0 GRF for the AUPLL reference mux.
> Describe the controller and define its clock and reset IDs.
> 
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> [adapted to mainline rockchip clock and reset handling (xin24m input,
>  don't introduce CLK_NR_CLKS)]
> Signed-off-by: Cunhao Lu <1579567540@qq.com>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> Changes in v6:
> - Improve readability.
> 
> Changes in v3:
> - Close the reset ID gap while preserving each named reset's register
>   mapping.
> - Remove CLK_NR_CLKS from the clock binding.
> - Fix the indentation of the CRU binding example.
> ---
>  .../bindings/clock/rockchip,rk3572-cru.yaml        |  57 ++
>  include/dt-bindings/clock/rockchip,rk3572-cru.h    | 560 ++++++++++++++++
>  include/dt-bindings/reset/rockchip,rk3572-cru.h    | 713 +++++++++++++++++++++
>  3 files changed, 1330 insertions(+)

[snip]

> diff --git a/include/dt-bindings/clock/rockchip,rk3572-cru.h b/include/dt-bindings/clock/rockchip,rk3572-cru.h
> new file mode 100644
> index 000000000000..b917f72165ae
> --- /dev/null
> +++ b/include/dt-bindings/clock/rockchip,rk3572-cru.h
> @@ -0,0 +1,560 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
> +/*
> + * Copyright (c) 2025 Rockchip Electronics Co., Ltd.
> + * Author: Elaine Zhang <zhangqing@rock-chips.com>
> + */
> +
> +#ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3572_H
> +#define _DT_BINDINGS_CLK_ROCKCHIP_RK3572_H

[snip]

> +#define ACLK_CRYPTO_NS				525
> +#define CLK_PKA_CRYPTO_NS			526
> +#define PCLK_DDR_MON				527
> +
> +/* Secure clocks */
> +#define ACLK_CCI				600
> +#define SCLK_DDR				601
> +#define CLK_STIMER0_ROOT			602
> +#define PCLK_SECURE_S				603
> +#define HCLK_SECURE_S				604
> +#define ACLK_SECURE_S				605
> +#define CLK_PKA_CRYPTO_S			606
> +#define PCLK_KLAD				607
> +#define HCLK_CRYPTO_S				608
> +#define HCLK_KLAD				609
> +#define ACLK_CRYPTO_S				610
> +#define PCLK_OTPC_S				611
> +#define CLK_OTPC_S				612
> +#define PCLK_WDT_S				613
> +#define TCLK_WDT_S				614
> +#define HCLK_TRNG_S				615

Are these secure clocks meant to be used as SCMI clock ids? Why a gap from
527 to 600? If I am not mistaken SCMI ids should similar to Linux clock ids
start at 0 and be a consecutive series.

> +
> +#endif
> diff --git a/include/dt-bindings/reset/rockchip,rk3572-cru.h b/include/dt-bindings/reset/rockchip,rk3572-cru.h
> new file mode 100644
> index 000000000000..a88af7665dae
> --- /dev/null
> +++ b/include/dt-bindings/reset/rockchip,rk3572-cru.h
> @@ -0,0 +1,713 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
> +/*
> + * Copyright (c) 2025 Rockchip Electronics Co., Ltd.
> + * Author: Elaine Zhang <zhangqing@rock-chips.com>
> + */
> +
> +#ifndef _DT_BINDINGS_RESET_ROCKCHIP_RK3572_H
> +#define _DT_BINDINGS_RESET_ROCKCHIP_RK3572_H
> +
> +/* CRU-->SOFTRST_CON01 */
> +#define SRST_ARESETN_TOP_BIU                     0
> +#define SRST_PRESETN_TOP_BIU                     1
> +#define SRST_ARESETN_TOP_MID_BIU                 2
> +#define SRST_HRESETN_TOP_BIU                     3

Please drop the unnecessary/redundant RESETN in all constants. The SRST
prefix is already a short for Software Reset.

Please see [1] for the header I prepared for U-Boot mainline RK3572 support,
it should have all these symbols cleaned up, to match naming patterns used
for all currently supported Rockchip SoCs.

[1] https://git.u-boot-project.org/u-boot/contributors/kwiboo/u-boot/-/blob/rk3562/include/dt-bindings/reset/rockchip%2Crk3572-cru.h

Regards,
Jonas

[snip]

> +#endif

  reply	other threads:[~2026-11-19 11:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  7:06 [PATCH v6 0/4] clk: rockchip: Add RK3572 clock and reset support Cunhao Lu via B4 Relay
2026-11-17  7:06 ` [PATCH v6 1/4] dt-bindings: clock: rockchip: Add RK3572 CRU Cunhao Lu via B4 Relay
2026-11-19 11:59   ` Jonas Karlman [this message]
2026-11-17  7:06 ` [PATCH v6 2/4] clk: rockchip: Add 24-bit fractional divider support Cunhao Lu via B4 Relay
2026-11-17  7:06 ` [PATCH v6 3/4] clk: rockchip: Add composite clock macro with mux table Cunhao Lu via B4 Relay
2026-11-17  7:06 ` [PATCH v6 4/4] clk: rockchip: Add RK3572 clock and reset support Cunhao Lu via B4 Relay

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=34dbd46a-29cc-4b86-b9cb-9477dc0a4da8@kwiboo.se \
    --to=jonas@kwiboo.se \
    --cc=1579567540@qq.com \
    --cc=bmasney+clk@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=jbrunet+clk@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --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=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=zhangqing@rock-chips.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

all inboxes | Powered by JetHome®