Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4BC4FC4332F for ; Thu, 8 Dec 2022 12:49:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E6C4817FB; Thu, 8 Dec 2022 13:49:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=teegee.cloud Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=teegee.cloud header.i=@teegee.cloud header.b="cySQABO0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A353284D1B; Thu, 8 Dec 2022 05:01:50 +0100 (CET) Received: from mail.teegee.cloud (mail.teegee.cloud [139.99.90.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7DE878363D for ; Thu, 8 Dec 2022 05:01:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=teegee.cloud Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rob@teegee.cloud Received: from mail.teegee.cloud (localhost [127.0.0.1]) by mail.teegee.cloud (Postfix) with ESMTP id 4NSL7W2crNz3wtq for ; Thu, 8 Dec 2022 04:01:43 +0000 (UTC) Authentication-Results: mail.teegee.cloud (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=teegee.cloud DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=teegee.cloud; h= content-transfer-encoding:content-type:subject:from :content-language:to:user-agent:mime-version:date:message-id; s= dkim; t=1670472102; x=1673064103; bh=KBrazzBm8PcJJN1QrAmCE2XqTDi tEf+WOyJSiQq76Pw=; b=cySQABO0YJGp8J4HgLS05wTOxNmDcBkN2aER7LF2Pjx 3xUgY6ERpBKEl581qZYNDOGJf/cTtC+Lx9WK61QLhR0cXQMBOlwglKhnfdjGM0EF U+b05dBxiEi8tvKJHg+AYt7SZLgfrCVWvADcU42G1Fd3RQzD0zVqrsFTt4LdYXks XK1BEJr4E72QJ2PAMwy1yZLmqZDl1rYkwOADjGW9kJDswDk06wuVsXvmCyyADNFQ DS1Zppbpc2yDZsr276/GXGCGrPBFELidQB0ytusIqh5sLb2YNCTm64czC5+lWmSu wzO3J3AgV0LsUctPauBBHsbTP65Ju75Bmav5IMoujeg== Received: from mail.teegee.cloud ([127.0.0.1]) by mail.teegee.cloud (mail.teegee.cloud [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vUxZkGVqQ8px for ; Thu, 8 Dec 2022 04:01:42 +0000 (UTC) Received: from [192.168.3.4] (unknown [195.133.134.78]) by mail.teegee.cloud (Postfix) with ESMTPSA id 4NSL7V6Wq9z3wbN for ; Thu, 8 Dec 2022 04:01:42 +0000 (UTC) Message-ID: Date: Thu, 8 Dec 2022 12:01:42 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 To: u-boot@lists.denx.de Content-Language: en-US From: Rob Kramer Subject: DDR timing for vendor board Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Thu, 08 Dec 2022 13:49:45 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi all, I have a RK3288 board from a Chinese display vendor that came with the=20 usual giant Rockchip tarball that they patched here and there to make=20 the board work. It seems to be based on a rk3288-evb, since that is what=20 they patched in the kernel. The kernel is a 4.4 kernel with Android=20 stuff in it (i.e. fiq-debugger) and a large amount of Rockchip patches,=20 u-boot is 2017.09, with rk patches. It turns out that u-boot TPL/SPL won't boot because the DDR timings are=20 incorrect, and the Chinese vendor uses the Rockchip=20 rk3288_ddr_400MHz_v1.09.bin loader. I'm using u-boot 2022.01 for now,=20 and I've tried to naively modify the timing in=20 arch/arm/dts/rk3288-evb.dts, but it doesn't work at all, with varying=20 errors on boot. The Rockchip loader provides the following info when booting: =C2=A0 In =C2=A0 Channel a: DDR3 400MHz =C2=A0 Bus Width=3D32 Col=3D10 Bank=3D8 Row=3D15 CS=3D1 Die Bus-Width=3D= 16 Size=3D1024MB =C2=A0 Memory OK =C2=A0 OUT =C2=A0 Boot1 Release Time: Apr 11 2018 10:32:58, version: 2.36 =C2=A0 ChipType =3D 0x8, 232 I've tried various DDR3 (not LPDDR3) settings from other boards, for=20 example for a Firefly (666 MHz DDR3): =C2=A0 U-Boot TPL 2022.01 (Jan 10 2022 - 18:46:34) =C2=A0 Col detect error =C2=A0 DRAM init failed! =C2=A0 ### ERROR ### Please RESET the board ### It was expected that 666MHz doesn't work, but if I just change the=20 frequency in the dts, that also fails (error -22). How can I support the DDR for this board? I can't even see what the ID=20 on the chips is, because the heatsink is blocking sight and seems to be=20 attached with some sort of thermal glue. Is there a way to read back the DDR timings (phy-timing, sdram-params)=20 from the kernel/SoC on a board that is booted using the proprietary loade= r? Cheers! =C2=A0=C2=A0=C2=A0 Rob