reset: rockchip: implement rk3576 lookup table
authorElaine Zhang <zhangqing@rock-chips.com>
Tue, 15 Apr 2025 21:51:19 +0000 (23:51 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 23 Apr 2025 14:12:05 +0000 (22:12 +0800)
commite4225b22cefeee5556c62c1f1ade5356e637c89c
tree202273ff3cfcdbbdf310b518290a5d4373fd0964
parent3919310b37ec0394d944de6d3980254cd8ed3035
reset: rockchip: implement rk3576 lookup table

The current DT bindings for the rk3576 clock use a different ID than the
one that is supposed to be written to the hardware registers.
Thus, we cannot use directly the id provided in the phandle, but rather
use a lookup table to correctly setup the hardware.

This follows the implementation done in the Linux-Kernel and also
how the rk3588 does this both in the Linux-Kernel as well as U-Boot.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
[adapted from mainline Linux code for u-boot]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/include/asm/arch-rockchip/clock.h
drivers/reset/Makefile
drivers/reset/rst-rk3576.c [new file with mode: 0644]