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 BB00CC4332F for ; Sun, 11 Dec 2022 16:32:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CBE50853A9; Sun, 11 Dec 2022 17:32:45 +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="CWkVLB1G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D1E51853A7; Sun, 11 Dec 2022 17:32:43 +0100 (CET) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 7ED1685225 for ; Sun, 11 Dec 2022 17:32:41 +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-x62d.google.com with SMTP id n21so22417531ejb.9 for ; Sun, 11 Dec 2022 08:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6fUvre1JU0tYIwXahX+f7kH4bp1cGSUdfNAuM8ussg8=; b=CWkVLB1GWHhtwtlCgT5CGjv6Ud+qskML6n84mNXqAUsbCUnwk+5App5i6Sje1z0gfP DcOyS9AxLTTOp+BybaQyXFxUfzMIXJf46cRSMxRIAqmjB81pqyKPaaP2xY1+DPakHAAh +FXC9x+H6lXXM4RuDL/NqZCks1VAHvjUDsn5vU77t+W6/av2LFnGK0Sl+N3LeR48iRWE TiGOGANlhrSbZKFP1AM8zYLnvv4nNf2P+7BDcw8UMoDIRNIqtuOhkgZTMwMs0bGOr5iJ czO1VpJuYLaw1/MourIabrG02koiteWtQzaw8SWzcRUpXJj5o5AjLl6P8Ak7qepOQysj j6Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6fUvre1JU0tYIwXahX+f7kH4bp1cGSUdfNAuM8ussg8=; b=28eY9Milg6/sY7r9KCnh73FGogVBxcRi3jiJuM8iwMo1FC/51m/Oi9+mlNjXmItXNV jc/fEAjWj32b+7cM0ndlMPwNAZmSlW5FkNSuXLUpMR3/W6hHEqXXTEdWp0N1MRAklQgT ilILc+U4YCcyrnUYul0DnKWReLYWKqXnaz+pHpbDJJXDQ6LqeY4/FYCEiFPVxCbknhsK JbxBu9CYu2lG6fgw5+xNdpS++3h21FMaOHzzUndQ+TWNLIFcdHoB2Bm30VBt77lkw6Sd s540KKxsgYqJx/bGIx/JhsRCRfaAlVPqc1P1hs8WORg1URfi/5XDdb4tNurIgHXf9QRL PMqg== X-Gm-Message-State: ANoB5pmnB7Dy70sWD2Akb8uUp1482DjZ2qIuUp3fOgEEXi1/nbdvpOeS pwgqZ6C8Pwl10hJ1q+QqES0= X-Google-Smtp-Source: AA0mqf7u962ZZgBPNubildOpqtrNsICUXGnQ0u5G2joowp/OOxtwAarSj9d9jLr62U1OP7VHIISE5g== X-Received: by 2002:a17:907:d049:b0:7c1:5467:39af with SMTP id vb9-20020a170907d04900b007c1546739afmr5256672ejc.37.1670776361085; Sun, 11 Dec 2022 08:32:41 -0800 (PST) Received: from localhost.localdomain (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id qu27-20020a170907111b00b007c0d41736c0sm2243564ejb.39.2022.12.11.08.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Dec 2022 08:32:40 -0800 (PST) From: Jernej Skrabec To: andre.przywara@arm.com, jagan@amarulasolutions.com Cc: u-boot@lists.denx.de, Jernej Skrabec Subject: [PATCH 0/8] sunxi: Update H616 DRAM driver Date: Sun, 11 Dec 2022 17:32:05 +0100 Message-Id: <20221211163213.98540-1-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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. 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(-) -- 2.38.1