From mboxrd@z Thu Jan 1 00:00:00 1970 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 310FAC53210 for ; Wed, 4 Jan 2023 21:02:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB80585279; Wed, 4 Jan 2023 22:02:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="N9mQnRbY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EEE0D85301; Wed, 4 Jan 2023 22:02:38 +0100 (CET) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 46069851BC for ; Wed, 4 Jan 2023 22:02:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jernej.skrabec@gmail.com Received: by mail-ej1-x631.google.com with SMTP id x22so85574902ejs.11 for ; Wed, 04 Jan 2023 13:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HSyYZek4wmNooMet7QkRF3cGZ5UwVMqlZbkzVHzWwxs=; b=N9mQnRbYwlDe5o/VWvKkNYZ1YSbgjTlb31Sz8lloJbAxl3AyvqsxHg95ZfPfe0Y4HX 8m8S1HOh53X4i6GQrCNC0l8FxPbijltuBUsHo3YDv+n2KiVKWBaKNlmvzrlgmUbkRNp4 CnyyvoDBjVRt6RjEubzMeMa2+8pf7AXxpCGIv35iXKaKAYNvrv+6igzOI9q6gsoSWjEn Sbloq8nZb7y70xP4hYA+9g+P0beSaMGtjt+fA+X4bhUTQjxj1FYY0mCUrZRFwnNRb7FZ 6b/C8WJ/q9B5Pw2ehUPD+c1smW+/WQCkgNBy1FcYYLxxsg4AK9+8TA57XAyNM+UDbdbp vJ+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HSyYZek4wmNooMet7QkRF3cGZ5UwVMqlZbkzVHzWwxs=; b=MSlo8V2mG2cnYIQIlvDp7rZzUI9GOlkBp1m0GXbzvzYFNOfjSjsU0/xigCIPTrAUvD 6cr5BywvRYZC3+u74YJagfUS8FxnL/Am9fKDWnIPneFH6u/MyyaIA9W2+GLmS5ghcLc1 Ym0z1laamZOCaIBNTH0202mzNUnY1a25oR/2Fy76cs12avYBtylURiakbaCUXsbRx/wB 5++gfoRk2O+DhqowfBWlyAgio5kLKRug7IW8gBLrvIxmXVGlLzKH4z59I/dV6FqKJlO1 dY6dPNSe7cMsH07J0xj/ibRObDpevByFFj293RTA1DkeuB02u34l7xdzfUhAf5dlJDhX 9LTQ== X-Gm-Message-State: AFqh2kqwo/t1GuVlE2tl65NHRiT6Kq0dVlKQ7OXfGIJntZ+45AyqdgfX 8k5rGNSqC/b2qYAorBApL+I= X-Google-Smtp-Source: AMrXdXvY84qMALwhmJP+m6NkPwtx+9mreKS2laUy1UKGohGzHpmmpgUnCQGiOPW1c4+IbguU4RAK+g== X-Received: by 2002:a17:907:3e96:b0:7c4:f501:e5b1 with SMTP id hs22-20020a1709073e9600b007c4f501e5b1mr57253652ejc.51.1672866155818; Wed, 04 Jan 2023 13:02:35 -0800 (PST) Received: from jernej-laptop.localnet (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id l9-20020a1709060cc900b007c0f2d051f4sm15494023ejh.203.2023.01.04.13.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 13:02:34 -0800 (PST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Andre Przywara Cc: jagan@amarulasolutions.com, u-boot@lists.denx.de Subject: Re: [PATCH 0/8] sunxi: Update H616 DRAM driver Date: Wed, 04 Jan 2023 22:02:33 +0100 Message-ID: <4767183.GXAFRqVoOG@jernej-laptop> In-Reply-To: <20230104004716.5a07be57@slackpad.lan> References: <20221211163213.98540-1-jernej.skrabec@gmail.com> <20230104004716.5a07be57@slackpad.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 Andre! Dne sreda, 04. januar 2023 ob 01:47:16 CET je Andre Przywara napisal(a): > On Sun, 11 Dec 2022 17:32:05 +0100 > Jernej Skrabec wrote: > > Hi Jernej, > > > Current H616 DRAM driver is completely customized to Orange Pi Zero2 > > board, which is currently the only H616 board supported by U-Boot. > > Needless to say, this is not ideal for adding new boards. With changes > > in this series, all DDR3 boards are supported and all that is needed is > > just vendor DRAM values extracted from Android image. New DRAM types > > should also be easier to support, since a lot of constants used before > > are not really DRAM type dependent. > > > > Changes were verified by decompiling driver and generated values were > > compared to previous, hard coded ones. This was done without dram_para > > structures, so compiler was able to heavily optimize code and produce > > constants. > > so many thanks again for putting this together! > I came to like (the idea of) this series very much lately, as this > removes timing/delay values from the code, and easily allows putting the > vendor provided values in the defconfig. > I used that approach as well for the D1 driver, and am wondering if we > should extend this to other SoCs, potentially unifying the Kconfig part? While it would be nice, I'm not sure it's worth the effort and there is a chance that something might break during rework. > > And you hinted at a v2, can you provide an estimate for this? If you > send it still this week, I would like to put it into U-Boot's next > branch, otherwise it goes straight into master, should the merge window > open next week as planned. I have changes for v2 in my github repo. I don't have any estimation, since I had some time off from programming lately and I'm just only catching up. Weekend at earliest, but no promises. > > Btw., to verify the feasibility of drivers/ram/sunxi, I moved the H616 > driver into there, together with the Kconfig parts, I wonder what you > think about this? An example of how this looks is in the D1 driver > patches. Looks good, but I don't know what are implications regarding interface. Is just code move or that implies that some ram framework must be used? Best regards, Jernej > > Cheers, > Andre > > > Please take a look. > > > > Best regards, > > Jernej > > > > Jernej Skrabec (8): > > sunxi: Fix write to H616 DRAM CR register > > sunxi: cosmetic: Fix H616 DRAM driver code style > > sunxi: parameterize H616 DRAM ODT values > > sunxi: Convert H616 DRAM options to single setting > > sunxi: Always configure ODT on H616 DRAM > > sunxi: Make bit delay function in H616 DRAM code void > > sunxi: Parameterize bit delay code in H616 DRAM driver > > sunxi: Parameterize H616 DRAM code some more > > > > .../include/asm/arch-sunxi/dram_sun50i_h616.h | 18 + > > arch/arm/mach-sunxi/Kconfig | 67 +-- > > arch/arm/mach-sunxi/dram_sun50i_h616.c | 445 +++++++++++------- > > configs/orangepi_zero2_defconfig | 8 +- > > 4 files changed, 348 insertions(+), 190 deletions(-)