[PATCH v4 11/11] PM / devfreq: rockchip-dfi: add RK3576 support

From: Sebastian Reichel

Date: Thu Nov 19 2026 - 08:04:22 EST


Add RK3576 support to the DFI driver exposing the same functionality
as found on previous chips. This uses the RK3588 init for getting the
DRAM type info from the GRF registers. In contrast to RK3588 it uses
a newer DDRMON controller IP, though (version 0x40).

Co-developed-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
Acked-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
---
drivers/devfreq/event/rockchip-dfi.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
index db2c77fc5907..cde10d1e708c 100644
--- a/drivers/devfreq/event/rockchip-dfi.c
+++ b/drivers/devfreq/event/rockchip-dfi.c
@@ -859,6 +859,10 @@ static const char * const rk3399_clk_names[] = {
"pclk_ddr_mon",
};

+static const char * const rk3576_clk_names[] = {
+ "pclk_ddr_mon_ch0", "pclk_ddr_mon_ch1",
+};
+
static const char * const rk3588_clk_names[] = {
"pclk_ddr_mon_ch0", "pclk_ddr_mon_ch1", "pclk_ddr_mon_ch2",
"pclk_ddr_mon_ch3",
@@ -888,6 +892,18 @@ static const struct rockchip_dfi_variant rk3568_variant = {
.reg_access = 0x2c,
};

+static const struct rockchip_dfi_variant rk3576_variant = {
+ .init = rk3588_dfi_init,
+ .stride = 0x10000,
+ .max_channels = 2,
+ .clk_names = rk3576_clk_names,
+ .num_clks = ARRAY_SIZE(rk3576_clk_names),
+ .reg_write_access = 0x28,
+ .reg_read_access = 0x2c,
+ .reg_access = 0x34,
+ .reg_clock_cycles = 0x30,
+};
+
static const struct rockchip_dfi_variant rk3588_variant = {
.init = rk3588_dfi_init,
.stride = 0x4000,
@@ -904,6 +920,7 @@ static const struct rockchip_dfi_variant rk3588_variant = {
static const struct of_device_id rockchip_dfi_id_match[] = {
{ .compatible = "rockchip,rk3399-dfi", .data = &rk3399_variant },
{ .compatible = "rockchip,rk3568-dfi", .data = &rk3568_variant },
+ { .compatible = "rockchip,rk3576-dfi", .data = &rk3576_variant },
{ .compatible = "rockchip,rk3588-dfi", .data = &rk3588_variant },
{ },
};

--
2.53.0