From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kurt Miller Date: Mon, 07 Oct 2019 00:25:48 -0400 Subject: [U-Boot] [PATCH 0/2] Fix memory instability on ROCK64 In-Reply-To: References: Message-ID: <1570422348.8246.51.camel@intricatesoftware.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On Sun, 2019-10-06 at 12:28 -0400, Simon South wrote: > These two patches fix small issues with the Rockchip RK3328 SDRAM > driver that prevented my PINE64 ROCK64 from booting and running > normally using U-Boot's TPL [1]. > > The first patch updates the phy_dll_bypass_set() function to use the > correct units for its DDR-frequency parameter, which is already > specified in MHz and does not need converting. This issue caused the > DRAM controller to be misconfigured for all but the lowest memory > speeds. > > The second patch fixes an apparent typo in phy_cfg() that caused the > DRAM controller's deskew registers to be loaded with incorrect values: > Instead of copying from the second 44-element portion of the > skew-value array the driver instead re-used a portion of the first. > This also produced instability. > > With both these patches applied my ROCK64 boots and runs normally > using the U-Boot TPL and a memory frequency of either 800 or 933 MHz: > In both cases the "mtest" memory-test command runs indefinitely > without error, and I can boot into NetBSD successfully without the > kernel hanging or panicking. > > [1] https://lists.denx.de/pipermail/u-boot/2019-September/384076.html > > Simon South (2): >   ram: rk3328: Use correct frequency units in function >   ram: rk3328: Fix loading of skew values > >  drivers/ram/rockchip/sdram_rk3328.c | 6 +++--- >  1 file changed, 3 insertions(+), 3 deletions(-) > Your corrections also have helped OpenBSD/arm64 boot using u-boot TPL on Rock64. Here is one test report result: https://marc.info/?l=openbsd-arm&m=157041723301520&w=2 Thank you for tracking down the problems. -Kurt