u-boot/arch/arm/include/asm/arch-imx8m
Rasmus Villemoes 290ffe5788 imx8m: fix reading of DDR4 MR registers
I was trying to employ lpddr4_mr_read() to something similar to what
the imx8mm-cl-iot-gate board is doing for auto-detecting the RAM
type. However, the version in drivers/ddr/imx/imx8m/ddrphy_utils.c
differs from the private one used by that board in how it extracts the
byte value, and I was only getting zeroes. Adding a bit of debug
printf'ing gives me

 tmp = 0x00ffff00
 tmp = 0x00070700
 tmp = 0x00000000
 tmp = 0x00101000

and indeed I was expecting a (combined) value of 0xff070010 (0xff
being Manufacturer ID for Micron). I can't find any documentation that
says how the values are supposed to be read, but clearly the iot-gate
definition is the right one, both for its use case as well as my
imx8mp-based board.

So lift the private definition of lpddr4_mr_read() from the
imx8mm-cl-iot-gate board code to ddrphy_utils.c, and add a declaration
in the ddr.h header where e.g. get_trained_CDD() is already declared.

This has only been compile-tested for the imx8mm-cl-iot-gate
board (since I don't have the hardware), but since I've merely moved
its definition of lpddr4_mr_read(), I'd be surprised if it changed
anything for that board.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Tested-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-05-20 09:30:28 +02:00
..
clock.h imx8m: add init_nand_clk 2022-04-12 19:10:44 +02:00
clock_imx8mm.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
clock_imx8mq.h imx8mq: fix SSCG_PLL_REFCLK_SEL_x 2020-09-17 14:40:10 +02:00
crm_regs.h imx: rename mx8m,MX8M to imx8m,IMX8M 2019-01-01 14:12:18 +01:00
ddr.h imx8m: fix reading of DDR4 MR registers 2022-05-20 09:30:28 +02:00
gpio.h imx: rename mx8m,MX8M to imx8m,IMX8M 2019-01-01 14:12:18 +01:00
imx-regs.h ARM: imx: imx8m: Introduce and use UART_BASE_ADDR(n) 2022-05-20 09:03:01 +02:00
imx8mm_pins.h imx8m: add pin header for i.MX8MM 2019-10-08 16:36:36 +02:00
imx8mn_pins.h imx8mn: add pin header 2019-11-05 10:27:18 +01:00
imx8mp_pins.h imx: imx8mp: add pin header file 2020-01-08 13:20:08 +01:00
imx8mq_pins.h imx: rename mx8m,MX8M to imx8m,IMX8M 2019-01-01 14:12:18 +01:00
lpddr4_define.h imx: imx8m: add lpddr4 header file 2019-01-01 14:12:18 +01:00
sys_proto.h imx: rename mx8m,MX8M to imx8m,IMX8M 2019-01-01 14:12:18 +01:00