Commit graph

8 commits

Author SHA1 Message Date
Jacky Bai
ad0cbbf513 fix(imx8m): fix the dfiphymaster setting after dvfs
the dfi phy master setting need to be save/restore to make
sure it aligned with the initial config.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Change-Id: I4f572b9aff9cc47a6c28524ce0fe03cdc66b88a1
2023-02-27 11:23:44 +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
Jacky Bai
093888caaf feat(imx8m): fix the ddr4 dvfs random hang on imx8m
Remove the while loop waiting in step12 to align with what
we did before, just use a 'if' condition check for debug
purpose.

Tested-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Id2685c5f628270a24944470d675a5c8706f39f13
2023-02-27 11:20:23 +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
2003fa94dc feat(imx8mn): enable dram retention suuport on imx8mn
Enable dram retention support on i.MX8MN.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I9b3a08efbbd154b2fc7e41bedb36a4d4e3784448
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