Re: [PATCH v6 1/4] dt-bindings: clock: rockchip: Add RK3572 CRU

From: Jonas Karlman

Date: Thu Nov 19 2026 - 06:59:57 EST


Hi Cunhao Lu,

On 11/17/2026 8:06 AM, Cunhao Lu wrote:
> From: Elaine Zhang <zhangqing@xxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxx>
> [adapted to mainline rockchip clock and reset handling (xin24m input,
> don't introduce CLK_NR_CLKS)]
> Signed-off-by: Cunhao Lu <1579567540@xxxxxx>
> Reviewed-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxxx>
> + */
> +
> +#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@xxxxxxxxxxxxxx>
> + */
> +
> +#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