Commit graph

11 commits

Author SHA1 Message Date
Jacky Bai
8962bdd603 feat(imx8mq): enable dram dvfs support on imx8mq
Enable DRAM DVFS support on i.MX8MQ.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Id72c5eb9625936052ec51e5a52d9d31175ed1b1b
2023-03-01 10:18:03 +08:00
Jacky Bai
dd108c3c1f feat(imx8mq): add the dram retention support for imx8mq
Add the dram retention support for i.MX8MQ. As there is
no enough ocram space available before entering TF-A,
so the timing info need to be copied from dram into ocram.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Id8264c342fd62e297b1969cba5ed505450c78a25
2023-03-01 10:18:03 +08:00
Jacky Bai
a2655f4869 fix(imx8m): backup mr12/14 value from lpddr4 chip
Backup the mr12/14 value as the actual value used is not the
one we configured in the ddrc config timing.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: If04733b34a3b4c080828bb7c82e83f0badbeaafd
2023-03-01 10:03:37 +08:00
Jacky Bai
0331b1c611 fix(imx8m): fix coverity out of bound access issue
Fix the out of bound access to the rank setting array.

Fix Coverity issue:

CID 6474575: Out-of-bounds access (OVERRUN)
CID 11014855: Unused value (UNUSED_VALUE)

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: I5d9ef90f1479e5d46d1b6c8693a27e3abd614766
2023-02-28 14:27:24 +08:00
Jacky Bai
25c43233e8 fix(imx8m): fix the current fsp init
The dfimisc reg value should be shift right 8 bit to
get the current fsp.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
Change-Id: I4c8c166bc3ad4cc1376961cbf47631c68b5900cc
2023-02-28 14:26:39 +08:00
Jacky Bai
3330084979 fix(imx8m): fix the rank to rank space issue
update umctl2's setting based on phy training CDD value
to workaround the rank-to-rank space issue.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: I0fab18cdc378fda760daa0f89c4dd84eb46f7e11
2023-02-28 14:26:35 +08:00
Jacky Bai
0e39488ff3 feat(imx8m): update the ddr4 dvfs flow to include ddr3l support
the DDR3L & DDR4 can share same piece of code for DDR frequency scaling.
So update the ddr4 dvfs flow to support DDR3L too.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: Ifc6981f05ed8a4e399adad97690197a9680f554d
2023-02-27 11:22:51 +08:00
Jacky Bai
5277c09606 fix(imx8m): correct the rank info get fro mstr
the bitfield of active_ranks in MSTR is defined as below.
Correct the rank num get in dram_info.

  0x01: one rank;
  0x11: two rank;

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: Idcadb39f492a8fe81c973ac4136d9a1eaa32f54b
2023-02-27 11:21:32 +08:00
Marco Felsch
6c8f523138 fix(imx8m): fix dram retention fsp_table access
The fsp_table access by [i-1] can cause invalid memory access in case of
i=0. This can be the case if no fsp_table is available. Fix this by
adding the idx variable which tracks the correct index.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Change-Id: If2285517eb9fe837f3ad54360307a77a658bf62c
2022-10-20 18:16:41 +02:00
Jacky Bai
9c336f6118 feat(imx8m): add the ddr frequency change support for imx8m family
Add the DDR frequency change support.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: If1167785796b8678c351569b83d2922c66f6e530
2022-06-27 09:27:11 +08:00
Jacky Bai
c71793c647 feat(imx8m): add dram retention flow for imx8m family
Add the dram retention flow for i.MX8M SoC family.

Change-Id: Ifb8ba5b2f6f002133cf47c07fef73df29c51c890
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
2022-06-27 09:27:11 +08:00