]> git.baikalelectronics.ru Git - uboot.git/commit
rockchip: sdram: add basic support for sdram reg info version 3
authorJonas Karlman <jonas@kwiboo.se>
Tue, 7 Feb 2023 17:27:10 +0000 (17:27 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 28 Feb 2023 10:07:26 +0000 (18:07 +0800)
commit8e79d2b89b9a7226d6a72dc589e7298282a077bc
tree69f26e84d24064d3811ee19c3aba973ddc63b84a
parentca9ba27327597bc4334a39e73179dc50634e50e2
rockchip: sdram: add basic support for sdram reg info version 3

Newer DRAM initialization blobs from vendor can encode sdram info in a
new version 3 format. The new format makes use of more bits in sys_reg3
compared to the version 2 format.

Add basic support for detecting the version 3 format and decoding the
high bits used for ddrtype.

This fixes decode of sdram size on my RK3568 boards that have LPDDR4X.

Details on the new format was deciphered from vendor u-boot commit [1].

[1] https://github.com/rockchip-linux/u-boot/commit/c69667e0e2bf4290ab1f408fcde58b8806ac266b

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/include/asm/arch-rockchip/sdram.h
arch/arm/mach-rockchip/sdram.c