Skip to content

Commit

Permalink
scripts: limit MT7621 512 MiB DDR max rate to 1066 MT/s
Browse files Browse the repository at this point in the history
Some users report that a 1200 MT/s DDR rate may cause the u-boot
to fail to start.

Signed-off-by: Shiji Yang <[email protected]>
  • Loading branch information
DragonBluep committed Nov 14, 2023
1 parent 3252b45 commit f58796c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ else
exit 1
fi

echo "set DRAM frequency: $7 MHz"
echo "set DRAM frequency: $7 MT/s"
echo "CONFIG_MT7621_DRAM_FREQ_$7_LEGACY=y" >> ${DEFCONFIG}

echo "Parse DDR init parameters: $8"
Expand Down Expand Up @@ -99,6 +99,10 @@ DDR3-256MiB)
;;
DDR3-512MiB)
echo "CONFIG_MT7621_DRAM_DDR3_4096M_LEGACY=y" >> ${DEFCONFIG}
if [ -n $(cat ${DEFCONFIG} | grep MT7621_DRAM_FREQ_1200_LEGACY) ]; then
echo "The max DRAM speed for 512 MiB RAM is 1066 MT/s"
sed -i 's/MT7621_DRAM_FREQ_1200_LEGACY/MT7621_DRAM_FREQ_1066_LEGACY/' ${DEFCONFIG}
fi
;;
DDR3-128MiB-KGD)
echo "CONFIG_MT7621_DRAM_DDR3_1024M_KGD_LEGACY=y" >> ${DEFCONFIG}
Expand Down

0 comments on commit f58796c

Please sign in to comment.