From patchwork Mon Aug 19 14:59:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973867 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FuxHE0jy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbRf0BP2z1yXZ for ; Tue, 20 Aug 2024 01:02:22 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31E6F88CE1; Mon, 19 Aug 2024 17:02:06 +0200 (CEST) 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="FuxHE0jy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C569871C7; Mon, 19 Aug 2024 17:02:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) (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 165BA87B84 for ; Mon, 19 Aug 2024 17:02:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-2702ed1054fso1039025fac.3 for ; Mon, 19 Aug 2024 08:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079722; x=1724684522; darn=lists.denx.de; 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=8PH9F1VBK3kWNUHiqkBLlRVWB0H6/h7ZsBfedPxrAx0=; b=FuxHE0jylLRb1Bz4r9q9YPloDxeNJk71cYhuEry4qXKYEMPyRF3wR5BzyHlYUhMuXC P7EFf/9r7EB665GSBdquKEQXjippFQSlfn8O6fBKV/2dZW/wDfRDG81yoscHadQ7IFj+ VIbYYz2mOZhisKJIaPs1pgOr8B91xxPzo6YmnNx2dv2YHsy32V71oiWAO1jS+WJa5Gda UztW2EvvQN++QyTmpGwI8afLzpWySHSUJAoJISURvYKHsO2lhgPa68OFimvjK5iRzqaU f4ZDqFyho5DgyjltZ2tdfWNZg/9DO2m+VYO1DMWAhac/fqFBFb6nnoNHMZiPlu1RGf82 sC8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079722; x=1724684522; 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=8PH9F1VBK3kWNUHiqkBLlRVWB0H6/h7ZsBfedPxrAx0=; b=qa/JlsUKF2tSeEPVFrXWDyQwRBW24fOEeeEHn0qa5Qn1NUHUBklyhxYdqxmk05uRzc gLGDT4KKyYVFgF68mhVG+I58YFIQ6APPhHSy8vr8ZPJLsDaS5aw5q1WGL+RcPKIl7GpL ffZcFy5mUAJa+8lvrn2QD1XVoXysosboQlwW06I3/M196SQZSMGmtR3/8dGWStnaADpZ mVI2XBHO/4LEPWmD7wAAOmhKbascc+L5O6rJ9u2YDB1FOp9hIomuBGTjLB3w297Pg0Ey kdf8eriqGwMoFq/UjG0XaVt3zS3vuAZ0QyDXgoKwVk2ZfCecvV2okPZ+QMrtdKZWJheq 6qOQ== X-Gm-Message-State: AOJu0Yzifl+FzUqppZ0Mq3BgWPbc8RfAil/NGH4YcJEYDPxiZcqAk/ef n8y7eghUvPo6ISXgIC3lRot6/bE43AksQZnKeltKO9uxI+5m5gxO4lf/1A== X-Google-Smtp-Source: AGHT+IHcgrH8A2XuEKWQfINMNP2BRnxJ4x0jSbXjW2MyO1GB+sMBEYg0l+JWwbrpHEcQbpWAAuR42g== X-Received: by 2002:a05:6870:470c:b0:25d:f0ba:eab7 with SMTP id 586e51a60fabf-2701c37eac4mr13785703fac.18.1724079721580; Mon, 19 Aug 2024 08:02:01 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:01 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 1/9] sunxi: H616: dram: LPDDR4: adjust settings Date: Mon, 19 Aug 2024 09:59:30 -0500 Message-Id: <20240819145938.503221-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Jernej Skrabec Adjust H616 LPDDR4 DRAM settings to be in line with vendor driver. Signed-off-by: Jernej Skrabec Tested-by: Chris Morgan --- arch/arm/mach-sunxi/dram_sun50i_h616.c | 33 +++++++++++++------ .../dram_timings/h616_lpddr4_2133.c | 2 +- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c index 37c139e0ee..5be2887a06 100644 --- a/arch/arm/mach-sunxi/dram_sun50i_h616.c +++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c @@ -293,14 +293,22 @@ static void mctl_phy_configure_odt(const struct dram_para *para) dmb(); } -static bool mctl_phy_write_leveling(const struct dram_config *config) +static bool mctl_phy_write_leveling(const struct dram_para *para, + const struct dram_config *config) { bool result = true; u32 val; clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 0xc0, 0x80); - writel(4, SUNXI_DRAM_PHY0_BASE + 0xc); - writel(0x40, SUNXI_DRAM_PHY0_BASE + 0x10); + + if (para->type == SUNXI_DRAM_TYPE_LPDDR4) { + /* MR2 value */ + writel(0x1b, SUNXI_DRAM_PHY0_BASE + 0xc); + writel(0, SUNXI_DRAM_PHY0_BASE + 0x10); + } else { + writel(4, SUNXI_DRAM_PHY0_BASE + 0xc); + writel(0x40, SUNXI_DRAM_PHY0_BASE + 0x10); + } setbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 4); @@ -859,9 +867,9 @@ static void mctl_phy_ca_bit_delay_compensation(const struct dram_para *para, } break; case SUNXI_DRAM_TYPE_LPDDR4: - if (para->tpr2 & 1) { - writel(val, SUNXI_DRAM_PHY0_BASE + 0x788); - } else { + writel(val, SUNXI_DRAM_PHY0_BASE + 0x788); + if (config->ranks == 2) { + val = (para->tpr10 >> 11) & 0x1e; writel(val, SUNXI_DRAM_PHY0_BASE + 0x794); }; break; @@ -1080,19 +1088,27 @@ static bool mctl_phy_init(const struct dram_para *para, mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0); writel(0xb04, &mctl_ctl->mrctrl1); + udelay(10); writel(0x80000030, &mctl_ctl->mrctrl0); + udelay(10); mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0); writel(0xc72, &mctl_ctl->mrctrl1); + udelay(10); writel(0x80000030, &mctl_ctl->mrctrl0); + udelay(10); mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0); writel(0xe09, &mctl_ctl->mrctrl1); + udelay(10); writel(0x80000030, &mctl_ctl->mrctrl0); + udelay(10); mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0); writel(0x1624, &mctl_ctl->mrctrl1); + udelay(10); writel(0x80000030, &mctl_ctl->mrctrl0); + udelay(10); mctl_await_completion(&mctl_ctl->mrctrl0, BIT(31), 0); break; case SUNXI_DRAM_TYPE_DDR4: @@ -1108,7 +1124,7 @@ static bool mctl_phy_init(const struct dram_para *para, if (para->tpr10 & TPR10_WRITE_LEVELING) { for (i = 0; i < 5; i++) - if (mctl_phy_write_leveling(config)) + if (mctl_phy_write_leveling(para, config)) break; if (i == 5) { debug("write leveling failed!\n"); @@ -1234,9 +1250,6 @@ static bool mctl_ctrl_init(const struct dram_para *para, setbits_le32(&mctl_ctl->unk_0x3180, BIT(31) | BIT(30)); setbits_le32(&mctl_ctl->unk_0x4180, BIT(31) | BIT(30)); - if (para->type == SUNXI_DRAM_TYPE_LPDDR4) - setbits_le32(&mctl_ctl->dbictl, 0x1); - setbits_le32(&mctl_ctl->rfshctl3, BIT(0)); clrbits_le32(&mctl_ctl->dfimisc, BIT(0)); diff --git a/arch/arm/mach-sunxi/dram_timings/h616_lpddr4_2133.c b/arch/arm/mach-sunxi/dram_timings/h616_lpddr4_2133.c index e6446b9180..6f5c4acbd6 100644 --- a/arch/arm/mach-sunxi/dram_timings/h616_lpddr4_2133.c +++ b/arch/arm/mach-sunxi/dram_timings/h616_lpddr4_2133.c @@ -23,7 +23,7 @@ void mctl_set_timing_params(const struct dram_para *para) u8 trcd = max(ns_to_t(18), 2); u8 trc = ns_to_t(65); u8 txp = max(ns_to_t(8), 2); - u8 trtp = max(ns_to_t(8), 4); + u8 trtp = 4; u8 trp = ns_to_t(21); u8 tras = ns_to_t(42); u16 trefi = ns_to_t(3904) / 32; From patchwork Mon Aug 19 14:59:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973869 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=BRlTVdk0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbRv0x7Pz1yXZ for ; Tue, 20 Aug 2024 01:02:35 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9B48A87B84; Mon, 19 Aug 2024 17:02:08 +0200 (CEST) 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="BRlTVdk0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE01A88CE9; Mon, 19 Aug 2024 17:02:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) (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 D2C9688CA0 for ; Mon, 19 Aug 2024 17:02:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3db16129143so2345699b6e.0 for ; Mon, 19 Aug 2024 08:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079722; x=1724684522; darn=lists.denx.de; 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=lncLCU7aTj1amHcX2H/VFllgDBgYGr8WJkwU+3jD/qo=; b=BRlTVdk0fVVc5EuKxpnv7gtxjT1ha5Aqe08ab8r3bqki1wYRy0SQjY6KE9m6hdzliI A+NGGcX1VJu9CQBzDwCWFz9614pRUJNJU5q9u5tBL5CZ9Me9AHyZwZ7bApWV+MCkLHCL ceH8dC7dyQCI/325bGCSuRtDlgQrWXvFIbxCrOQZccBuk/l4reov1ycyQlhbrmWElNwc CJADJm+rj1D3629CRfavoEpIY+RdqWmjOxFpsY0Rysk9FkHpP6R2y0R+aWa1dI3lLvVM ihnYS565dP+N1KVwr3AzPkOxqsOsQAhdEC3HhcorESumtnKbHZyg0sFExyl3hqcaEI/e sxpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079722; x=1724684522; 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=lncLCU7aTj1amHcX2H/VFllgDBgYGr8WJkwU+3jD/qo=; b=pTatFDMQr8CXqhqUcAbn1UVSbcsD1fhnxIJ3vmlELgO9ibhJKda0GPe22wJ+z6y6rR boEEAE83laHxO6o0VUOLNUpxZ/OQnis2vPDgtrj3+y+ZKLIhftsC3D43by5u2dT1tCjB oLxX7WbLuXLqeG+BeFFmqtG08HDhNEvZd07aUQ1OHH9jKyWkeTN2fwywZziV/HCrKbaK U1YarAn0ez5JAs8gz0gRE/itOIaA0kgvjanT10fSnlo/BmNrsg3SoZU3pgZjn1/7T2w6 ZjUVPNrXlMn6JQoh3zY4hpv6e6pTe1UkREkW38POnGGwq8ZjjBvEezsyBZEgcWdnxvNA 6AOA== X-Gm-Message-State: AOJu0YzgUkjANgEKqdpQr23nH1Rwxnc+AJQW0lMeMQjCwEN95el+IDxk UO8AVx1leWnphZW0a7mffrdUgwrRkfTollRZYwH0flMpJuu/CpkYYUcb3A== X-Google-Smtp-Source: AGHT+IElfWs4izjdWHCoYG2iUXY05Ry2eoPFtvMiRrlFsHToq2lwUngUPyjfqgtXS5hwBjqAcFgQCw== X-Received: by 2002:a05:6870:9a8a:b0:25d:fab0:b6f4 with SMTP id 586e51a60fabf-27033f211f5mr7726117fac.1.1724079722384; Mon, 19 Aug 2024 08:02:02 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:01 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 2/9] sunxi: H616: DRAM: Add alternative pin mapping Date: Mon, 19 Aug 2024 09:59:31 -0500 Message-Id: <20240819145938.503221-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Jernej Skrabec It seems that different dies need different PHY pin mapping. Select alternatives based on "bond ID". Signed-off-by: Jernej Skrabec Tested-by: Chris Morgan --- arch/arm/mach-sunxi/dram_sun50i_h616.c | 59 +++++++++++++++++++------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c index 5be2887a06..dfaa270d96 100644 --- a/arch/arm/mach-sunxi/dram_sun50i_h616.c +++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c @@ -225,22 +225,43 @@ static void mctl_set_addrmap(const struct dram_config *config) mctl_ctl->addrmap[8] = 0x3F3F; } -static const u8 phy_init[] = { +static const u8 phy_addr_maps[2][27] = { #ifdef CONFIG_SUNXI_DRAM_H616_DDR3_1333 - 0x07, 0x0b, 0x02, 0x16, 0x0d, 0x0e, 0x14, 0x19, - 0x0a, 0x15, 0x03, 0x13, 0x04, 0x0c, 0x10, 0x06, - 0x0f, 0x11, 0x1a, 0x01, 0x12, 0x17, 0x00, 0x08, - 0x09, 0x05, 0x18 + { + 0x07, 0x0b, 0x02, 0x16, 0x0d, 0x0e, 0x14, 0x19, + 0x0a, 0x15, 0x03, 0x13, 0x04, 0x0c, 0x10, 0x06, + 0x0f, 0x11, 0x1a, 0x01, 0x12, 0x17, 0x00, 0x08, + 0x09, 0x05, 0x18 + }, { + 0x08, 0x02, 0x12, 0x05, 0x15, 0x17, 0x18, 0x0b, + 0x14, 0x07, 0x04, 0x13, 0x0c, 0x00, 0x16, 0x1a, + 0x0a, 0x11, 0x03, 0x10, 0x0e, 0x01, 0x0d, 0x19, + 0x06, 0x09, 0x0f + } #elif defined(CONFIG_SUNXI_DRAM_H616_LPDDR3) - 0x18, 0x06, 0x00, 0x05, 0x04, 0x03, 0x09, 0x02, - 0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x07, - 0x17, 0x19, 0x1a + { + 0x18, 0x06, 0x00, 0x05, 0x04, 0x03, 0x09, 0x02, + 0x08, 0x01, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x07, + 0x17, 0x19, 0x1a + }, { + 0x18, 0x00, 0x04, 0x09, 0x06, 0x05, 0x02, 0x19, + 0x17, 0x03, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x07, + 0x08, 0x01, 0x1a + } #elif defined(CONFIG_SUNXI_DRAM_H616_LPDDR4) - 0x02, 0x00, 0x17, 0x05, 0x04, 0x19, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x01, - 0x18, 0x03, 0x1a + { + 0x02, 0x00, 0x17, 0x05, 0x04, 0x19, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x01, + 0x18, 0x03, 0x1a + }, { + 0x03, 0x00, 0x17, 0x05, 0x02, 0x19, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x01, + 0x18, 0x04, 0x1a + } #endif }; @@ -887,6 +908,7 @@ static bool mctl_phy_init(const struct dram_para *para, struct sunxi_mctl_ctl_reg * const mctl_ctl = (struct sunxi_mctl_ctl_reg *)SUNXI_DRAM_CTL0_BASE; u32 val, val2, *ptr, mr0, mr2; + const u8 *map; int i; if (para->type == SUNXI_DRAM_TYPE_LPDDR4) @@ -942,8 +964,15 @@ static bool mctl_phy_init(const struct dram_para *para, writel(val2, SUNXI_DRAM_PHY0_BASE + 0x37c); ptr = (u32 *)(SUNXI_DRAM_PHY0_BASE + 0xc0); - for (i = 0; i < ARRAY_SIZE(phy_init); i++) - writel(phy_init[i], &ptr[i]); + val = readl(SUNXI_SID_BASE); + if (((val & 0xfbff) == 0x5000) || + ((val & 0xfeff) == 0x5c00) || + ((val & 0xf7ff) == 0x2000)) + map = phy_addr_maps[0]; + else + map = phy_addr_maps[1]; + for (i = 0; i < ARRAY_SIZE(phy_addr_maps[0]); i++) + writel(map[i], &ptr[i]); if (para->tpr10 & TPR10_CA_BIT_DELAY) mctl_phy_ca_bit_delay_compensation(para, config); From patchwork Mon Aug 19 14:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973870 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Dzkj8IgC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbS80WpRz1yXZ for ; Tue, 20 Aug 2024 01:02:47 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 07BB288CD5; Mon, 19 Aug 2024 17:02:09 +0200 (CEST) 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="Dzkj8IgC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B42EA88CA0; Mon, 19 Aug 2024 17:02:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) (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 7124688CD1 for ; Mon, 19 Aug 2024 17:02:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-2705d31a35cso808865fac.0 for ; Mon, 19 Aug 2024 08:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079723; x=1724684523; darn=lists.denx.de; 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=kjo9pDFsvtwhRHezPLs3FvZtXyZY5+SglhV9vXSsQ2I=; b=Dzkj8IgClLIDaukxkG62olO++GrGs9EnGanwfJn9B84K4frDDYXPjprEtkioPuiOJm t6PQfpVYqV4LV13HPifax4ZQjDRPPRJ8gtq7bISkG7BAPf5B8TafOYu+eJmu7K0RKnjm i/7FVcN48TIX3DNllwsVjXbgd6r2HIelKSirhNCEz4C8YD2e4UG03OKKdnvpXO3XOQIP Jey7wt0GLBOdrKcQbtVRDnfMynyzS+W8SFlcsInkmfvbgd0mHL1e9G9AKwjtOHAtgAEt HTvduZJ/fwAz2QE9Ya3hi5LQkNNMjQRyH3fmpTptR5U6UO3tNfpGftkk/G9Q6x1uOuFM egMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079723; x=1724684523; 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=kjo9pDFsvtwhRHezPLs3FvZtXyZY5+SglhV9vXSsQ2I=; b=KRHmQHBT/vfFsR9aZapEQ4Z+idXn3QzkvSiQeBHWnssRK+c16lSvZ1ilOBKD6SDPml SoWOOxfs1xpzfSfK3FEoEvFU+za6N/wFXPcbR2omZDeRXMvhw7Fzorff+LgkKVzYJnAK MAy+QShH8i6htlZd6J0lqSVzugiy4Y6tmUQcSrc1zwNJ96ZYz6W8YYUrs7yNvJgiydyN gKWW8szmmHkkyjYSViHxA8uNsnxSLyxP8ILHmeeN0FlpdscYcywjTxyYgyQqRjvCwpai F5PqRHkX3da9v8HML3DsPX9Nwez4Cq8xoXV42HrGwasjQiIFTBmwGrlaqiTnSrcKc2iZ 9lfg== X-Gm-Message-State: AOJu0Yyet6ozmEysnNiW+538wuJ/ETOjOZkaL4kACiWZnceCaloj91/4 rb6GkOCqCQaFZ8krsDicA8neuF4yyhQdja5Q1AkxfCl+n/gG8YiDAg/iYg== X-Google-Smtp-Source: AGHT+IHk0gCJU935BaNpa4t4kkcECyCuVcU3k8xzJcj3GJTiXQpVvg+B9Mw2qcEZCHu4iy9i0i/i9A== X-Received: by 2002:a05:6870:d287:b0:25e:19fe:f233 with SMTP id 586e51a60fabf-2701c5a0e76mr13215346fac.32.1724079723072; Mon, 19 Aug 2024 08:02:03 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:02 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 3/9] sunxi: H616: DRAM: Adjust configuration procedure Date: Mon, 19 Aug 2024 09:59:32 -0500 Message-Id: <20240819145938.503221-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Jernej Skrabec When comparing configuration procedure to vendor driver, I noticed that one command was out of order and that some delays were missing. Fix that. Signed-off-by: Jernej Skrabec Tested-by: Chris Morgan --- arch/arm/mach-sunxi/dram_sun50i_h616.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c index dfaa270d96..72194fffc2 100644 --- a/arch/arm/mach-sunxi/dram_sun50i_h616.c +++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c @@ -1023,12 +1023,16 @@ static bool mctl_phy_init(const struct dram_para *para, clrsetbits_le32(SUNXI_DRAM_PHY0_BASE + 0x14c, 0xe0, 0x20); } + clrbits_le32(&mctl_com->unk_0x500, 0x200); + udelay(1); + clrbits_le32(SUNXI_DRAM_PHY0_BASE + 0x14c, 8); mctl_await_completion((u32 *)(SUNXI_DRAM_PHY0_BASE + 0x180), 4, 4); + udelay(1000); + writel(0x37, SUNXI_DRAM_PHY0_BASE + 0x58); - clrbits_le32(&mctl_com->unk_0x500, 0x200); writel(0, &mctl_ctl->swctl); setbits_le32(&mctl_ctl->dfimisc, 1); @@ -1047,6 +1051,8 @@ static bool mctl_phy_init(const struct dram_para *para, mctl_await_completion(&mctl_ctl->swstat, 1, 1); mctl_await_completion(&mctl_ctl->statr, 3, 1); + udelay(200); + writel(0, &mctl_ctl->swctl); clrbits_le32(&mctl_ctl->dfimisc, 1); @@ -1290,8 +1296,10 @@ static bool mctl_ctrl_init(const struct dram_para *para, setbits_le32(&mctl_ctl->clken, BIT(8)); clrsetbits_le32(&mctl_com->unk_0x500, BIT(24), 0x300); + udelay(1); /* this write seems to enable PHY MMIO region */ setbits_le32(&mctl_com->unk_0x500, BIT(24)); + udelay(1); if (!mctl_phy_init(para, config)) return false; From patchwork Mon Aug 19 14:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973871 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=E6JZ9v5m; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbSN1XV0z1yXZ for ; Tue, 20 Aug 2024 01:03:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6965288CE9; Mon, 19 Aug 2024 17:02:09 +0200 (CEST) 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="E6JZ9v5m"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7EAAF88CBD; Mon, 19 Aug 2024 17:02:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) (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 4E1B587B84 for ; Mon, 19 Aug 2024 17:02:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-26fde6117cfso2601841fac.1 for ; Mon, 19 Aug 2024 08:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079724; x=1724684524; darn=lists.denx.de; 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=ltZj4/Ji8gzhH309+IEHQ77DxYY9xSO3M6xa/+15m/Q=; b=E6JZ9v5moe5oIXX5QkzqMY1EApqQpMcPd17SyNnAkyQWJbRbRSuHn+sK/9Yo4Ub0T6 6iGWcNyvsuhks+WAr6JqNsRDjMXwR1sFz5D3xzRs1sVo/mf3a95matprIGktmvUh2ExD X3907jpJij/oEkFFdDP5VraAq0jk8zupwzVTeyW4H7MNjQ8zi4be7xcT2E5rjsLtBczN JdJqeCFAx+DndZYYMO0JyxYuwpilQFgdnvXZE1Ulb3F3HOAYSoB6eF2DF/Zl58aRkOGK MaNCfVWpLgO3xKcBXFSh7cmFeNy/I4CRZyne81tXzNC8nUb0gkXMyXqB061Pi4RpcExa MWlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079724; x=1724684524; 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=ltZj4/Ji8gzhH309+IEHQ77DxYY9xSO3M6xa/+15m/Q=; b=YNpO5Sr0ITwCmVrYgNS2D/lk9TUNsfOqeYLu2dBwLWitTwOWU8H/d57/TPX0YqVNtg zzTRXCpUeMKJ1MFF+0htqVGmYlvpwcWqOc8LVJp1vYhX4jF+1FUMCh2320HfLSNKz+ZN qfuj2hv604I/2AZvYZpZuiavJW1QeaBwpqU7ftHVMVksASXIXPPfBIYdKqX0DI2ZkfeX nSRPxRvVTpzKUH6GasCmaUUfeq0X1XD9Zak06YrAMEBy52jSLRW3LEGktCKuU+tIECGq rcbJVthXHMD+5UsPznzeh12EUlKUQmC7dvaSbKIC6dGRfnC2+fKtU0PgyUOZgXZG0w2W 6xvQ== X-Gm-Message-State: AOJu0YwkEVQQd59G4Ol8P1kwD4nd8rW5CtHuFG/cEa7YslfdDJxXUiW2 KEngkNGywxGeGjjPGMLUUj6lWjW/UFNsECboCRYyefaquDLOMbnm22xslw== X-Google-Smtp-Source: AGHT+IGv3zawwRaytjnLje1XYwouz9eRxY8VvScy2pZB5yoVOU4GduERqZlnrauOCU8Usp+zM//aVw== X-Received: by 2002:a05:6871:b28:b0:25e:129c:2223 with SMTP id 586e51a60fabf-27033fc75cdmr8188026fac.19.1724079723793; Mon, 19 Aug 2024 08:02:03 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:03 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 4/9] sunxi: H616: DRAM: Adjust size scan procedure Date: Mon, 19 Aug 2024 09:59:33 -0500 Message-Id: <20240819145938.503221-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Jernej Skrabec It's safer to start scanning for columns first and then rows. Columns reside on LSB address pins, which means that second configuration will already have all needed row pins active. This is also preparation for introducing DDR4 support, which need scan for banks and bank groups too. Signed-off-by: Jernej Skrabec Tested-by: Chris Morgan --- arch/arm/mach-sunxi/dram_sun50i_h616.c | 31 +++++++++++++++----------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c index 72194fffc2..2f2776ce35 100644 --- a/arch/arm/mach-sunxi/dram_sun50i_h616.c +++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c @@ -1371,28 +1371,33 @@ static void mctl_auto_detect_rank_width(const struct dram_para *para, static void mctl_auto_detect_dram_size(const struct dram_para *para, struct dram_config *config) { - /* detect row address bits */ - config->cols = 8; - config->rows = 18; + unsigned int shift; + + /* max. config for columns, but not rows */ + config->cols = 11; + config->rows = 13; mctl_core_init(para, config); - for (config->rows = 13; config->rows < 18; config->rows++) { - /* 8 banks, 8 bit per byte and 16/32 bit width */ - if (mctl_mem_matches((1 << (config->rows + config->cols + - 4 + config->bus_full_width)))) + shift = config->bus_full_width + 1; + + /* detect column address bits */ + for (config->cols = 8; config->cols < 11; config->cols++) { + if (mctl_mem_matches(1ULL << (config->cols + shift))) break; } + debug("detected %u columns\n", config->cols); - /* detect column address bits */ - config->cols = 11; + /* reconfigure to make sure that all active rows are accessible */ + config->rows = 18; mctl_core_init(para, config); - for (config->cols = 8; config->cols < 11; config->cols++) { - /* 8 bits per byte and 16/32 bit width */ - if (mctl_mem_matches(1 << (config->cols + 1 + - config->bus_full_width))) + /* detect row address bits */ + shift = config->bus_full_width + 4 + config->cols; + for (config->rows = 13; config->rows < 18; config->rows++) { + if (mctl_mem_matches(1ULL << (config->rows + shift))) break; } + debug("detected %u rows\n", config->rows); } static unsigned long mctl_calc_size(const struct dram_config *config) From patchwork Mon Aug 19 14:59:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973872 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=HQSWQnkl; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbSc3Llqz1yXZ for ; Tue, 20 Aug 2024 01:03:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CC9BE88CF5; Mon, 19 Aug 2024 17:02:12 +0200 (CEST) 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="HQSWQnkl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A99DA88ADB; Mon, 19 Aug 2024 17:02:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) (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 453D988CE6 for ; Mon, 19 Aug 2024 17:02:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-5d5af7ae388so2357158eaf.0 for ; Mon, 19 Aug 2024 08:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079725; x=1724684525; darn=lists.denx.de; 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=6mPa4OuabQeX2loaQ2kTd5kAkhyoVHYBr7+w8aNFRWs=; b=HQSWQnkljIEhxIGMBE/qVTBN6vsGjttU0AO/LVGapYls8dzwwqlmaPMQRH50VLQzaB tkt1NERskgroOotMinIj0ypzDsYXdAiOlSm0pAvgFl3DWl7p6yZFpdS/StrG3jUXhpaX DRXgMhOMDONPGjGMMcFw36n6/IZqnHaBbnJ7cDaVLmEthZ+TCRTWKVZz2uVM1xfDX0eH O0ZmEy1VSTMP++8uc2WYTUtg3DeNeVq7mVveg1W+x/2Q6Pq5Jqe8ZCIY528bVEYlL+Nl gUY67w6RwwzkUW8ihyIgetchQMvXm2Tn+wRR8e22nMMevdkxe4v7k8pJTJDhgBUdh9Hs EPiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079725; x=1724684525; 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=6mPa4OuabQeX2loaQ2kTd5kAkhyoVHYBr7+w8aNFRWs=; b=AzdJsDKWBc7RA12Yhl0Rkyv/KzzsGeNjwiS9kX80mrRxCHZK7AopieiglRgYZxECeL +nJYzrOKWFQ7tqhVaBDmAJCgsFDkRwKLP3t6whpDRxX9Pu4aDGfs3uOseo6qGOzQqN80 +4k07JkYkOw3WKcc2v4+qU6qVR3s/uMZqtJia2uDAYzW6J4Djnk3BQul5aJ7UByGJOB1 pir3wOCdpJBH0pwYeTzrMXo09sdw9B0CjdlJMbOUjz/0V9eOKsrJNKwWlbMxl4h3k0bH vEjVNHDz6661qDqUglYQmqRPRKRO5ksFKFs8Ko8/XtGZkl5hFG51Ia1/a5Gu/LnnoF/T RpNQ== X-Gm-Message-State: AOJu0YyYokefWR2YY7yqz5odPdOASicsxWlTctX3adWiHfauDsr+HsRZ UrRSO4x8ShFchXRZXp5vbNFD/ta/K6e//1yoZ2xwzpk0+ODx2zqaO0OeJg== X-Google-Smtp-Source: AGHT+IGZpnZo9P16/vc058+NnPmp59Pg73KCKQX6xzc5LUM7CgXV5SIVPyvZWTa3APl8AVZImtwZ3Q== X-Received: by 2002:a05:6870:3290:b0:260:27c6:48b6 with SMTP id 586e51a60fabf-2701db7c1a0mr4838781fac.8.1724079724613; Mon, 19 Aug 2024 08:02:04 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:04 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 5/9] sunxi: H616: dram: Update mbus priorities Date: Mon, 19 Aug 2024 09:59:34 -0500 Message-Id: <20240819145938.503221-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Jernej Skrabec CSI1 channel (22) is missing and IOMMU (25) has priority flag set in vendor bootloader. Fix that. While at it, replace bandwidth flag with priority since original flag has always value "true". Signed-off-by: Jernej Skrabec Tested-by: Chris Morgan --- arch/arm/mach-sunxi/dram_sun50i_h616.c | 41 +++++++++++++------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c index 2f2776ce35..c0bcf2eec7 100644 --- a/arch/arm/mach-sunxi/dram_sun50i_h616.c +++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c @@ -55,8 +55,8 @@ static void mbus_configure_port(u8 port, writel_relaxed(cfg1, &mctl_com->master[port].cfg1); } -#define MBUS_CONF(port, bwlimit, qos, acs, bwl0, bwl1, bwl2) \ - mbus_configure_port(port, bwlimit, false, \ +#define MBUS_CONF(port, priority, qos, acs, bwl0, bwl1, bwl2) \ + mbus_configure_port(port, true, priority, \ MBUS_QOS_ ## qos, 0, acs, bwl0, bwl1, bwl2) static void mctl_set_master_priority(void) @@ -68,24 +68,25 @@ static void mctl_set_master_priority(void) writel(399, &mctl_com->tmr); writel(BIT(16), &mctl_com->bwcr); - MBUS_CONF( 0, true, HIGHEST, 0, 256, 128, 100); - MBUS_CONF( 1, true, HIGH, 0, 1536, 1400, 256); - MBUS_CONF( 2, true, HIGHEST, 0, 512, 256, 96); - MBUS_CONF( 3, true, HIGH, 0, 256, 100, 80); - MBUS_CONF( 4, true, HIGH, 2, 8192, 5500, 5000); - MBUS_CONF( 5, true, HIGH, 2, 100, 64, 32); - MBUS_CONF( 6, true, HIGH, 2, 100, 64, 32); - MBUS_CONF( 8, true, HIGH, 0, 256, 128, 64); - MBUS_CONF(11, true, HIGH, 0, 256, 128, 100); - MBUS_CONF(14, true, HIGH, 0, 1024, 256, 64); - MBUS_CONF(16, true, HIGHEST, 6, 8192, 2800, 2400); - MBUS_CONF(21, true, HIGHEST, 6, 2048, 768, 512); - MBUS_CONF(25, true, HIGHEST, 0, 100, 64, 32); - MBUS_CONF(26, true, HIGH, 2, 8192, 5500, 5000); - MBUS_CONF(37, true, HIGH, 0, 256, 128, 64); - MBUS_CONF(38, true, HIGH, 2, 100, 64, 32); - MBUS_CONF(39, true, HIGH, 2, 8192, 5500, 5000); - MBUS_CONF(40, true, HIGH, 2, 100, 64, 32); + MBUS_CONF(0, false, HIGHEST, 0, 256, 128, 100); + MBUS_CONF(1, false, HIGH, 0, 1536, 1400, 256); + MBUS_CONF(2, false, HIGHEST, 0, 512, 256, 96); + MBUS_CONF(3, false, HIGH, 0, 256, 100, 80); + MBUS_CONF(4, false, HIGH, 2, 8192, 5500, 5000); + MBUS_CONF(5, false, HIGH, 2, 100, 64, 32); + MBUS_CONF(6, false, HIGH, 2, 100, 64, 32); + MBUS_CONF(8, false, HIGH, 0, 256, 128, 64); + MBUS_CONF(11, false, HIGH, 0, 256, 128, 100); + MBUS_CONF(14, false, HIGH, 0, 1024, 256, 64); + MBUS_CONF(16, false, HIGHEST, 6, 8192, 2800, 2400); + MBUS_CONF(21, false, HIGHEST, 6, 2048, 768, 512); + MBUS_CONF(22, false, HIGH, 0, 256, 128, 100); + MBUS_CONF(25, true, HIGHEST, 0, 100, 64, 32); + MBUS_CONF(26, false, HIGH, 2, 8192, 5500, 5000); + MBUS_CONF(37, false, HIGH, 0, 256, 128, 64); + MBUS_CONF(38, false, HIGH, 2, 100, 64, 32); + MBUS_CONF(39, false, HIGH, 2, 8192, 5500, 5000); + MBUS_CONF(40, false, HIGH, 2, 100, 64, 32); dmb(); } From patchwork Mon Aug 19 14:59:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973873 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Y/AkHVwj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbSs025Jz1yXZ for ; Tue, 20 Aug 2024 01:03:25 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 414B188D02; Mon, 19 Aug 2024 17:02:13 +0200 (CEST) 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="Y/AkHVwj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8118A88CEC; Mon, 19 Aug 2024 17:02:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) (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 118248641A for ; Mon, 19 Aug 2024 17:02:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-27012aa4a74so1804278fac.0 for ; Mon, 19 Aug 2024 08:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079726; x=1724684526; darn=lists.denx.de; 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=XvwJElt4YUfFpBwvQE1FxCIY+djXkU5S5UfwCL3zens=; b=Y/AkHVwjcvGGJKGJmB+3QDvpfCgdPLzXPRjhd2ysE1pKK/bcUf4bRezsvJkNTXQxjC +XnLkZa1bPuLw5BTLAQ1qJr/NB0i9ls3A3oUhR4NKCfzA6qN6yBaOWBaiQAlptN4armk 0stpImgiUBkSpAu9D9FVe7IbkIMnp+0xXEAhCnALibmdxboSFqrPjQYaiZLIGeWKqHjK YyFqWhZqztQLtGNUqiCvLgN+Nk7iB6kUunD50LvX1hJfkFa1FHOvoabapZY92AnYBHm+ +OyJEjQlVtbO7A23GK/mYiFT/j0VBJUjaIm3f+dpRKSxcPJr011tgokNyogWotM9lrhj WNpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079726; x=1724684526; 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=XvwJElt4YUfFpBwvQE1FxCIY+djXkU5S5UfwCL3zens=; b=R6bK8T6/2UJ4pShQWeX2liVovDfjy8eqCb2euJzUaENTvfd7QKQnH/R5EEnzYtO00k Zb93RLcy9+t/l7MIjfSBIdQpMYvaw0gd8Bx4LBjut6U9bBvne++XE5BoqtgXntcR6uR0 HePqZvCRLV8uiMxL0+f57dE0A/pupnNq1i9K/J9o0MFsitgIJzd8hcozm/ZUWMzz0Luh wq4niu8+A0C2KD5iUMnAexLDn2Fj5HuZMBvCbGZ5T+2HdOPG2e3LBNrjTELmHevgTBs+ iXAU7nJWAZd6zK+nVyLGMfR4oGY2pw6rrcbdydQKXeyW8k7tr843eupW4HibdEC90A+C 9N3Q== X-Gm-Message-State: AOJu0YyOjcgr9UPytZ5NplgJqbhg7fCVDANhOMUO5m0S/Oi65/NlJDr4 63euW2O2eSgmPhmOKnLWNFPmFtKmEwf6x3H1GcHeOhC+3CQBcwsXnZDcJQ== X-Google-Smtp-Source: AGHT+IHnTA6//OhariupgMVxqPieNyMDOoc9ieVCe6eN2SSk5WYUpdoMAWgrW21qMgEzRePZWlkAFg== X-Received: by 2002:a05:6870:232a:b0:268:b62c:d084 with SMTP id 586e51a60fabf-2701c33fb5dmr12971773fac.10.1724079725573; Mon, 19 Aug 2024 08:02:05 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:05 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 6/9] arm64: dts: allwinner: h616: Add r_i2c pinctrl nodes Date: Mon, 19 Aug 2024 09:59:35 -0500 Message-Id: <20240819145938.503221-7-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan Add pinctrl nodes for the r_i2c node. Without the pinmux defined the r_i2c bus may fail to work, possibly if the bootloader uses rsb mode for the PMIC. Link: https://lore.kernel.org/linux-sunxi/172252952262.1669767.7675865282122079154.b4-ty@csie.org/ [ upstream commit: 7c9ea4ab76176f65f4f55aa144f9145a4bccaacb ] Signed-off-by: Chris Morgan --- dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi b/dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi index 921d5f61d8..41f2c23e07 100644 --- a/dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi +++ b/dts/upstream/src/arm64/allwinner/sun50i-h616.dtsi @@ -836,6 +836,8 @@ clocks = <&r_ccu CLK_R_APB2_I2C>; dmas = <&dma 48>, <&dma 48>; dma-names = "rx", "tx"; + pinctrl-names = "default"; + pinctrl-0 = <&r_i2c_pins>; resets = <&r_ccu RST_R_APB2_I2C>; status = "disabled"; #address-cells = <1>; From patchwork Mon Aug 19 14:59:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973874 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=LV/nmuW+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbT56gMXz1yXZ for ; Tue, 20 Aug 2024 01:03:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A461A88CE8; Mon, 19 Aug 2024 17:02:15 +0200 (CEST) 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="LV/nmuW+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0CCB788CF2; Mon, 19 Aug 2024 17:02:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 8E6D18641A for ; Mon, 19 Aug 2024 17:02:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-7095bfd6346so2427873a34.0 for ; Mon, 19 Aug 2024 08:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079728; x=1724684528; darn=lists.denx.de; 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=y7L7XYgaJVmhWh8Td1afpcf2JPka7r6HJoVdHQpIxxo=; b=LV/nmuW+K2opTHtgnY8y772ZMs3Fp7+IbpgzgkbJt6jbqODq1HeaqKcJYAG6arAXeh poY0wuAYoIVbK9NlQHPflGawbqC1ZOCoFnb3MzJRKQlZkQkDdhMmV08B5QihkKzRVu9e IBRxyTlKxr/vB2UWiNZgEgYJc1GyIeA6X3IXi3OljBtlczHw4JDTKFhDfjM0LnVJ1xyM KvJTYkp+FfUOxig5Hi5QUt+KkZ9TYrBJloXAznzKv9r3sfimsO4tLyS8Z5UVXJPs+ruw teoEctXN0mu1KN4GrTtmJeNsSMNg8/04noe+d2F1hGwIdN8zpzhuRPGWTW//9VN+gnBX L0Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079728; x=1724684528; 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=y7L7XYgaJVmhWh8Td1afpcf2JPka7r6HJoVdHQpIxxo=; b=oPM/U5+XNp8NqpnU9ZFoywcqCRtz7LB9rwDMQrOJ5dZmSwSRx3JaptpOkMAXltb+bF aFi2ECK5rLssZEIxY9+QU49IJhBr71w1AqFhSBb8im5oergC+QZNVJ+5EwxtctVHItP7 3M6chgrAj9xH50wVf1Tmm3//RbBVp+jHGEKN7fFHgAHKic8TudjGalczUT+EwNedRLmg 2KeBTAujej33ucxMM0/9818ooGErEnKyGl7ZxDqURPL2/jEaJ/wuCOKEFhVFBXBSYd+j Iz61xunqLUR3fj5Nsx2jojBcmWzQbPV49dwfyl/DojiIfGnqb/39jxrbfoQPTI20oS+Q EERw== X-Gm-Message-State: AOJu0YyYdDxRYPk96AasTnZfNkeuMOWSTjsY0n0H4szb8KkM+EFalKn/ NhQhdDZsCvY8ExnyoTgOmVojdABXALIV986vlcrUsfotcVkE3n6nBn9PCg== X-Google-Smtp-Source: AGHT+IF1EMJQi3Gj4vbnERpTMm+6/3nB0U7rkJ6fZFkVwL82+R8VzL3pFHt5nZ6fakvl2RaWSoMgJg== X-Received: by 2002:a05:6871:ca14:b0:270:130f:cee3 with SMTP id 586e51a60fabf-2701c3418e1mr8402671fac.10.1724079727884; Mon, 19 Aug 2024 08:02:07 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:05 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 7/9] sunxi: Correct TPR6 parameter for H616 DRAM driver Date: Mon, 19 Aug 2024 09:59:36 -0500 Message-Id: <20240819145938.503221-8-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan Correct the default TPR6 parameter based on suggestion from Mikhail Kalashnikov. [1] [1] https://lore.kernel.org/u-boot/4c003cab-c8b8-484d-924d-084e71fe666e@gmail.com/ Fixes: 4b02f0120a4b ("sunxi: H616: add LPDDR4 DRAM support") Suggested-by: Mikhail Kalashnikov Signed-off-by: Chris Morgan --- arch/arm/mach-sunxi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 17666814c5..f1dcc0d105 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -87,7 +87,7 @@ config DRAM_SUN50I_H616_TPR2 config DRAM_SUN50I_H616_TPR6 hex "H616 DRAM TPR6 parameter" - default 0x3300c080 + default 0x33c00080 help TPR6 value from vendor DRAM settings. From patchwork Mon Aug 19 14:59:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973875 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=nGzAF8gu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbTL2lhLz1yXZ for ; Tue, 20 Aug 2024 01:03:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 215FE88CFA; Mon, 19 Aug 2024 17:02:16 +0200 (CEST) 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="nGzAF8gu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19AC988CFF; Mon, 19 Aug 2024 17:02:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 8455488CED for ; Mon, 19 Aug 2024 17:02:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-7094641d4e6so1726751a34.3 for ; Mon, 19 Aug 2024 08:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079729; x=1724684529; darn=lists.denx.de; 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=C0tFfXayi3urLhZKNL3vguNmsKHroWu87sYhuZkNjDs=; b=nGzAF8gunV88O3Npn52X3uVEOEESEXKxP9JFQF1w78OSPbvZtc+6bZo8skk5GzL54f DAX8EI7t1y2l5uL69VoJVOburUK4UnAw9T0Aa6ASkEsuSBy7/ImTjKNZiGzcQBSPkRho /tl6aJUwISXyk9tCsjWaz53EY7aiHvj9m+D9QGoSmmB9A/8gysv7OuGOayRaLS1AP1am 4X9veaMqs6zBkCU5k5BqOzZmR3F0/CKtTB0+YN2jWLtcGoHuLJEmVVfmkc4eymp1dzx3 RlkhtKmM9BaTbmN19HDkN3deD86s93u7LLBYoGVUInckLCIJ4wfql0Nou1+Lnwm2z96J CYFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079729; x=1724684529; 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=C0tFfXayi3urLhZKNL3vguNmsKHroWu87sYhuZkNjDs=; b=YEBRxHZg2HVwwDOpArzk0ZMwkplUc9rgmC1lzPgleVLgYGkXmbNG4tJTGfQYzv+DQi c3mPnAsi+KphyGaP43mdbPLNCw9YeR6GlY8fhychXL6+MmryAcdGcrM7WUeyEvvToz5A MYnQyBL3t612x5uSO2qGk2BVc5/G2SGjGUoGSkHX8Q4wrN4klxDWdAHa3iPXGiOmRBRE Gwe2YB8dISP3yUbnHhXJ5dyJaQtrWQiUotQyrT5bD/XcoIJohvPScii4MEDIM7HeenmF XuY8hCp2tPbsvnxHaTGrkFXdbdzqjoRQM1b+2MBtq9tdyf3hoqWNmg1/CZ0uSuL23Ukk gcRQ== X-Gm-Message-State: AOJu0YzAP9fQX23i9YSIJxPxhZBo8w54lM9V81kr1UlqUL/xi/847QkR MAw5lyAs/pMZythsv5c3S3bwBSgXdKOoN6ghIT8azQBXb0/Kmu4TjhJrig== X-Google-Smtp-Source: AGHT+IH8NUxaXdLo7mWZx2C4Z9V3JNgksBmbWF5RRww8JjuecrZvMYCDjeW4OaeGi3scxyHF7da5Zg== X-Received: by 2002:a05:6870:5251:b0:260:e3fa:ab8d with SMTP id 586e51a60fabf-2701c52e424mr12734036fac.37.1724079728780; Mon, 19 Aug 2024 08:02:08 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:08 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 8/9] arm64: dts: allwinner: h616: Change RG35XX Series from r_rsb to r_i2c Date: Mon, 19 Aug 2024 09:59:37 -0500 Message-Id: <20240819145938.503221-9-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan Change the Anbernic RG35XX series to use the r_i2c bus for the PMIC instead of the r_rsb bus. This is to keep the device tree consistent as there are at least 3 devices (the RG35XX-SP, RG28XX, and RG40XX-H) that have an external RTC on the r_i2c bus. Link: https://lore.kernel.org/linux-sunxi/172252952262.1669767.7675865282122079154.b4-ty@csie.org/ [ upstream commit: c712e5d0985628b1df13930489b49b740e610a2b ] Signed-off-by: Chris Morgan --- .../arm64/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dts/upstream/src/arm64/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts b/dts/upstream/src/arm64/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts index ee30584b6a..e2bbd22bd8 100644 --- a/dts/upstream/src/arm64/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +++ b/dts/upstream/src/arm64/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts @@ -201,12 +201,12 @@ vcc-pi-supply = <®_cldo3>; }; -&r_rsb { +&r_i2c { status = "okay"; - axp717: pmic@3a3 { + axp717: pmic@34 { compatible = "x-powers,axp717"; - reg = <0x3a3>; + reg = <0x34>; interrupt-controller; #interrupt-cells = <1>; interrupt-parent = <&nmi_intc>; From patchwork Mon Aug 19 14:59:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 1973876 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Ef/RIwob; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnbTY5Gqcz1yXZ for ; Tue, 20 Aug 2024 01:04:01 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8342C88CFB; Mon, 19 Aug 2024 17:02:16 +0200 (CEST) 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="Ef/RIwob"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1727388CE8; Mon, 19 Aug 2024 17:02:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (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 13E5F871C7 for ; Mon, 19 Aug 2024 17:02:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-70930972e19so1398296a34.3 for ; Mon, 19 Aug 2024 08:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724079730; x=1724684530; darn=lists.denx.de; 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=mCw5MPcxcWw0TZEM4gndlYGDMLadeweGjwzY42FV5nY=; b=Ef/RIwobzah2HKVBqSXfUZ+CBvLj9eXZpAd9SuD0o9DGt6AumxZ5ichirpF7S7649l cmv22AplU/SHzh6hnwCbHlxC+mOGeFsM7Zf8ihKOtrFoUrbkGvU4I94ZoVw77WHxSiRp apvHiEAhy/RxcX42OvGUJIJYq1Qg8VO+y3DBVvXcgYfUrQvuawfSicA9iSje8gs2FNiH QJ+yOHWwWlD4Yzttduen5U7zvHY+wROrlGMmcT/k1Llkhdwnc3Je/OI7pT50RX/SZAUr bvuBsN8BlvkZZuQVC4Vea7nZ7VbBqhfKCYNXcokxLc1Ws+zSxjIO0sezuJDl9euO0EB/ nFpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724079730; x=1724684530; 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=mCw5MPcxcWw0TZEM4gndlYGDMLadeweGjwzY42FV5nY=; b=iVTA7wiLIoKPXCoaF9AdUePQA/0iMMxDlTPT/s5TGKJT5lKqpc/DAYK/lxAi/Na26f 4C21c1XRvmHksBidZzHEHgdLxSg3BIM3qm1HAGLSAFOOR3409lmQtjAzGtNwZ5Y/PIMH 60ocJuFYfZN9ytLWgkUmm9n81lTaZHaRMAMEP/s5y3us81rCgFip38H1k/aNmJeMKXDa DlJJEoYFXYF2kMjGZontMw/wveAb6Si22LPRajDJqkGs/zOfu2XfvKe+EluTxvBrp6HH gSckvQ2yJ5uT+klRx6aWaBllKflzew0RUQV0HjOeGpigdJj5rq0lJMNun7Vivpq5LJep Qzyg== X-Gm-Message-State: AOJu0Yzcg6tKSF37lgysvUtCCrGUC+tqygK6EDqz1OgksDL3HzdTKyIs NGwxOO6Os+riP1ba2KC254K8snHiCbutoSPtbz20gIJ6y2HEyFqHqW2Tzw== X-Google-Smtp-Source: AGHT+IEH+ruuVKkA8iT6/E82AGwwd2EomO1XBLJ7JHUuhvoF4PutUeN0Pb51cqxhR/LZmlq4b0O+rQ== X-Received: by 2002:a05:6870:a688:b0:25d:fb57:db43 with SMTP id 586e51a60fabf-27033fb8dc1mr8505844fac.12.1724079729537; Mon, 19 Aug 2024 08:02:09 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:fb0:1bcf::54]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-27004432d18sm2945189fac.7.2024.08.19.08.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:02:09 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, jernej.skrabec@gmail.com, neil.armstrong@linaro.org, hdegoede@redhat.com, andre.przywara@arm.com, jagan@amarulasolutions.com, trini@konsulko.com, ryan@testtoast.com, iuncuim@gmail.com, sumit.garg@linaro.org, Chris Morgan Subject: [PATCH V2 9/9] sunxi: Add support for Anbernic RG35XX-2024 Date: Mon, 19 Aug 2024 09:59:38 -0500 Message-Id: <20240819145938.503221-10-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819145938.503221-1-macroalpha82@gmail.com> References: <20240819145938.503221-1-macroalpha82@gmail.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan The Anbernic RG35XX series of devices are based around an Allwinner H700 SoC with 1GB of RAM, 2 SD cards, and multiple input buttons. This bootloader has been tested on the Anbernic RG35XX-2024 and RG35XX-H, but should be suitable for the entire lineup of H700 based devices. A future series of updates will add board selection logic to identify and load the correct device tree automatically. Signed-off-by: Chris Morgan --- board/sunxi/MAINTAINERS | 5 +++ configs/anbernic_rg35xx_h700_defconfig | 52 ++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 configs/anbernic_rg35xx_h700_defconfig diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS index 4ad77c75f5..84799879e8 100644 --- a/board/sunxi/MAINTAINERS +++ b/board/sunxi/MAINTAINERS @@ -132,6 +132,11 @@ M: Paul Kocialkowski S: Maintained F: configs/Ampe_A76_defconfig +ANBERNIC RG35XX-2024 +M: Chris Morgan +S: Maintained +F: configs/anbernic_rg35xx_h700_defconfig + BANANAPI M1 PLUS M: Jagan Teki S: Maintained diff --git a/configs/anbernic_rg35xx_h700_defconfig b/configs/anbernic_rg35xx_h700_defconfig new file mode 100644 index 0000000000..6ea2f45d2f --- /dev/null +++ b/configs/anbernic_rg35xx_h700_defconfig @@ -0,0 +1,52 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_DEFAULT_DEVICE_TREE="allwinner/sun50i-h700-anbernic-rg35xx-2024" +CONFIG_SPL=y +CONFIG_DRAM_SUN50I_H616_DX_ODT=0x08080808 +CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e +CONFIG_DRAM_SUN50I_H616_CA_DRI=0x0e0e +CONFIG_DRAM_SUN50I_H616_ODT_EN=0x7887bbbb +CONFIG_DRAM_SUN50I_H616_TPR2=0x1 +CONFIG_DRAM_SUN50I_H616_TPR6=0x40808080 +CONFIG_DRAM_SUN50I_H616_TPR10=0x402f6633 +CONFIG_DRAM_SUN50I_H616_TPR11=0x1b1f1e1c +CONFIG_DRAM_SUN50I_H616_TPR12=0x06060606 +CONFIG_MACH_SUN50I_H616=y +CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y +CONFIG_SUNXI_DRAM_H616_LPDDR4=y +CONFIG_DRAM_CLK=672 +CONFIG_R_I2C_ENABLE=y +CONFIG_DEFAULT_FDT_FILE="sun50i-h700-anbernic-rg35xx-2024.dtb" +CONFIG_LAST_STAGE_INIT=y +CONFIG_SPL_I2C=y +CONFIG_CMD_BDINFO_EXTRA=y +CONFIG_CMD_BOOTDEV=y +CONFIG_CMD_BOOTMETH=y +CONFIG_CMD_BOOTZ=y +CONFIG_BOOTM_OPENRTOS=y +CONFIG_BOOTM_OSE=y +CONFIG_CMD_ADTIMG=y +CONFIG_CMD_ADC=y +CONFIG_CMD_CLK=y +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_BKOPS_ENABLE=y +CONFIG_CMD_MMC_REG=y +CONFIG_CMD_MMC_SWRITE=y +CONFIG_CMD_SDRAM=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y +CONFIG_OF_UPSTREAM=y +# CONFIG_NET is not set +CONFIG_BUTTON=y +CONFIG_BUTTON_GPIO=y +CONFIG_SPL_SYS_I2C_LEGACY=y +CONFIG_SYS_I2C_MVTWSI=y +CONFIG_SYS_I2C_SLAVE=0x7f +CONFIG_SYS_I2C_SPEED=400000 +CONFIG_REGULATOR_AXP=y +CONFIG_AXP717_POWER=y +CONFIG_AXP_DCDC2_VOLT=940 +CONFIG_AXP_DCDC3_VOLT=1100 +CONFIG_REGEX=y +# CONFIG_EFI_LOADER is not set