mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Cunhao Lu" <1579567540@qq.com>
To: "Jonas Karlman" <jonas@kwiboo.se>
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 <linux-clk@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-rockchip <linux-rockchip@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	netdev <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: Fri, 20 Nov 2026 17:40:26 +0800	[thread overview]
Message-ID: <tencent_BB5901AB88D47E874D0E348B32A609A92308@qq.com> (raw)
In-Reply-To: <34dbd46a-29cc-4b86-b9cb-9477dc0a4da8@kwiboo.se>

Hi Jonas,

Thank you for your review.

> [...]
> > +#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.

Yes, these are SCMI clock IDs. The CRU IDs end at 527, but the SCMI
IDs are a separate set. The vendor header [1] uses 600-615 for this
group, matching the IDs in the released RK3572 BL31 firmware.

I haven't found the RK3572 BL31 source on GitHub, so I can't rebuild
the firmware. That also means I can't change the clock IDs it exposes
via SCMI. If I numbered this group from zero in the binding, Linux
would request ID 1 for the DDR clock, but the firmware on existing
boards expects 601. With those IDs, I wouldn't be able to read the
correct clock data on my board.

I'll add the SCMI_ prefix in the next version and keep the firmware IDs
unchanged.

> [...]
> > +/* 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.

I'll fix the names in the next version.

> 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

Thanks, I'll follow the naming convention in your header in the next
revision. I did notice two possible issues with the reset IDs:

Your header skips 421 between SRST_LINKSYM_HDMITXPHY0 (420) and
SRST_P_PHPPHY_CRU (422). I've fixed this gap in the current patch.

Your header also assigns ID 453 to both SRST_H_PMU1_BIU and
SRST_H_PMU1_FW, but the lookup table [2] maps them to bits 9 and 10
of PMU1 SOFTRST_CON03, respectively. Could you confirm whether these
two reset lines are meant to share an ID?

[1] https://github.com/rockchip-linux/kernel/blob/470f9dccbdc42e7b8a824d0a5c5640a10e9457d2/include/dt-bindings/clock/rockchip,rk3572-cru.h#L542-L560
[2] https://git.u-boot-project.org/u-boot/contributors/kwiboo/u-boot/-/blob/85afc941266af08ab30a897dde794f952321025a/drivers/reset/rst-rk3572.c#L605-606

Best regards,
Cunhao Lu

pw-bot: cr

  reply	other threads:[~2026-11-20  9:40 UTC|newest]

Thread overview: 8+ 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
2026-11-20  9:40     ` Cunhao Lu [this message]
2026-11-20 10:37       ` Jonas Karlman
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=tencent_BB5901AB88D47E874D0E348B32A609A92308@qq.com \
    --to=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=jonas@kwiboo.se \
    --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®