Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAM_SUNIV] correct m=m_factor+1 enumerations #23

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

Apaczer
Copy link
Member

@Apaczer Apaczer commented Aug 2, 2023

Holy moly! The uboot upstream code doesn't allow for PLL_DDR outputs with divisors (mostly) other than 1, so 174MHz is not applicable by default (it just reverts to 168).

List with correct values (after change) for ddr_clock:

96,102,104,108,112,114,120,126,128,132,136,138,144,150,152,156,160,162,168,174,176,180,184,186,192,198,200,204,208,216,224,228,232,234,240,248,252,256,264,270,272,276,288,300,

Personally I have found the 198MHz to be max stable and 204 the bleeding edge.

for PLL_DDR output calculated with divisor other than 1
@nfriedly
Copy link
Member

nfriedly commented Aug 2, 2023

Nice work! Is this something that it would make sense to send upstream?

@Apaczer
Copy link
Member Author

Apaczer commented Aug 2, 2023

Nice work! Is this something that it would make sense to send upstream?

Well that's not the only thing that's missing for e.g.:

diff --git a/arch/arm/mach-sunxi/dram_suniv.c b/arch/arm/mach-sunxi/dram_suniv.c
--- a/arch/arm/mach-sunxi/dram_suniv.c
+++ b/arch/arm/mach-sunxi/dram_suniv.c
@@ -57,7 +57,7 @@ struct dram_para

 struct dram_para suniv_dram_para = {
        .size = 32,
+       .clk = 156,
-       .clk = CONFIG_DRAM_CLK,
        .access_mode = 1,
        .cs_num = 1,
        .ddr8_remap = 0,

smbd hardcoded 156MHz from the start (stock frequency), and there may be other parts that has not reach upstream (we're using slightly modded version from https://github.com/aodzip/buildroot-tiny200/blob/master/board/allwinner/suniv-f1c100s/patch/u-boot/0001-v2020.07.11.patch)

when DDR clock reaches 180MHz bump  SDRAM Pad Multi-Driving from Level 2 to Level 3
@Apaczer Apaczer merged commit d3c226e into MiyooCFW:master Aug 2, 2023
@Apaczer Apaczer deleted the ddr branch August 2, 2023 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants