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 1614CC4332F for ; Fri, 9 Dec 2022 11:10:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E302B851C1; Fri, 9 Dec 2022 12:10:26 +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="iWAOkhTK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AAD8D851CF; Fri, 9 Dec 2022 12:10:24 +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 7CA4B85196 for ; Fri, 9 Dec 2022 12:10:21 +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 4NT7bb1rVYz413r for ; Fri, 9 Dec 2022 11:10:19 +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:mime-version:subject :references:in-reply-to:message-id:to:from:date; s=dkim; t= 1670584218; x=1673176219; bh=HLJK+BrgC1U6wkn+HvvzmgUGKTdCF3ZEbe+ tV2O7ksI=; b=iWAOkhTKO9tCNCREz7UhlCgpu1nGOt7104x3qvg/bWdH2BGpld8 g2hsLGK9Mlny8EeOyjGdIYi8u1wTrP3vW01bDHBUQCcDpGoQ3fpnsAZpkmLMWM6u LiF9YlnbR8a0mQbygWjW1tjVc66bhSxRaTBuEE9052d2ZlJmmUdpkkENtBtV4F59 371MqjIZsr59E7OZs2ugFI6s5eMyf32TIBDAOApGxNqOnx0hszDkc2MhTMxjFe2l RlZ361as/AJocSpxjHpGySqWCh/LL6LZ4momv/Fzdvx6bGJplnieOWJq9vCH2nxE D/qET1JmeJY1aSDpdaX694IMwdJngEh+ThQ== 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 47zDkJgUWNjt for ; Fri, 9 Dec 2022 11:10:18 +0000 (UTC) Received: from dummy.faircode.eu (unknown [119.56.100.160]) by mail.teegee.cloud (Postfix) with ESMTPSA id 4NT7bZ3fhPz3xSB; Fri, 9 Dec 2022 11:10:18 +0000 (UTC) Date: Fri, 9 Dec 2022 19:10:18 +0800 (GMT+08:00) From: Rob Kramer To: Jack Mitchell Cc: u-boot@lists.denx.de Message-ID: In-Reply-To: References: Subject: Re: DDR timing for vendor board MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: 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 Jack, Thanks for your suggestion, I hadn't thought of using just the rkbin ddr fi= le together with u-boot SPL. My biggest objection was the rkbin miniloader = that makes assumptions on partition layout. It seems to work, but now I'm in for some DT pain :) Cheers, =C2=A0=C2=A0=C2=A0 Rob 9 Dec 2022 00:49:30 Jack Mitchell : > On 08/12/2022 04:01, Rob Kramer wrote: >> Hi all, >>=20 >> I have a RK3288 board from a Chinese display vendor that came with the >> usual giant Rockchip tarball that they patched here and there to make >> the board work. It seems to be based on a rk3288-evb, since that is what >> they patched in the kernel. The kernel is a 4.4 kernel with Android >> stuff in it (i.e. fiq-debugger) and a large amount of Rockchip patches, >> u-boot is 2017.09, with rk patches. >>=20 >> It turns out that u-boot TPL/SPL won't boot because the DDR timings are >> incorrect, and the Chinese vendor uses the Rockchip >> rk3288_ddr_400MHz_v1.09.bin loader. I'm using u-boot 2022.01 for now, >> and I've tried to naively modify the timing in >> arch/arm/dts/rk3288-evb.dts, but it doesn't work at all, with varying >> errors on boot. >>=20 >> The Rockchip loader provides the following info when booting: >>=20 >> =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 >>=20 >> I've tried various DDR3 (not LPDDR3) settings from other boards, for >> example for a Firefly (666 MHz DDR3): >>=20 >> =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 ### >>=20 >> It was expected that 666MHz doesn't work, but if I just change the >> frequency in the dts, that also fails (error -22). >>=20 >> How can I support the DDR for this board? I can't even see what the ID >> on the chips is, because the heatsink is blocking sight and seems to be >> attached with some sort of thermal glue. >>=20 >> Is there a way to read back the DDR timings (phy-timing, sdram-params) >> from the kernel/SoC on a board that is booted using the proprietary load= er? >>=20 >> Cheers! >>=20 >> =C2=A0=C2=A0=C2=A0 Rob >>=20 >=20 > Hi Rob, >=20 > You could be in for a world of hurt here as Rockchip are very poor at > supporting different DDR init configurations in u-boot. In the past with > awkward boards I've used the Rockchip DDR init blob as the TPL binary > for u-boot then skip the DRAM init in the u-boot SPL. >=20 > From my travels in this area I've found that single channel RAM boards > are particularly difficult to get working as the majority if not all > mainlined board use dual channel RAM. >=20 > Sorry I can't be more help, but trying to use the DDR blob is a good > starting point to get you going on mainline. >=20 > Good Luck! >=20 > --=20 > Jack Mitchell, Consultant > https://www.tuxable.co.uk