Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1167802pxb; Fri, 21 Jan 2022 11:17:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJymdDf10e9GpZDd/rm0klKfnwWqOktQtIWVsML6BOUb1/d5AhYuy6vFOl6TXf3L8VtvlvVO X-Received: by 2002:a05:6a00:1492:b0:4c7:3706:cb89 with SMTP id v18-20020a056a00149200b004c73706cb89mr4702634pfu.79.1642792655852; Fri, 21 Jan 2022 11:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642792655; cv=none; d=google.com; s=arc-20160816; b=Q5g1031HCZvHGtfVMY8nQ+zjSwyb+sbVfidkRXoRKIiBvEllGX7iv2armC7WQ02RbA ZWoI0IbaIGlHoX+bohsuhBvMzaGvOje0XoTiNQbU6LyunG74f/Kx0mLecp2cBoBk8NKf z1EuOvDQn0Qfb8sObIL0zIGJEYgWbzDdyOAwnzULfiIfap8E1djNCVpLGlFf5J9lZT43 hjvVxp4TJHNbne/a10R6gWV7tAwS7EVVgC83voyphdNe8paxtD30xNI7sdrDa7SwufEJ 4anfAXG1IfiF4pYZyaIEcnlRqqYE6uyrgw5asHJ52FxpWcO8KKWGg8bJvFi+VUGwFBcs 5sxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Tc/3SO9VMPoNTOBUPdtVao4Q05teSWKJppnPOktZKlQ=; b=auswAmFI33HJTlAAo4aX8t0pSoWbtZwYT+q5d3Jh8nTJveVV36AFH/jUB6A9K75/CQ Efk1ta+G+6+ojxkgpnRFjft0eH46zaSFB2TgzhHvrlQpS6KV+o+/2BabPMGF05MPC/jZ vVBDAxCZze5OSDXKnyiMLwOBKF+akgbIApwMvNSxxmAs9ue1UrR/Sw/j2jQ610tFbP3A ldLOqzR30I53T/WMTe1Iq9PnXaE30idyKsuF/F8Aiys7BoYwBElitb5G2xkr/EXgtcsd gC5q9pT76SZl2CDmC8sFTjY4elR9m8pvw67/O+HEViSNxOm0B6jtPaY+mbiM8FWQIib+ lPjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l62si2933877pge.349.2022.01.21.11.17.23; Fri, 21 Jan 2022 11:17:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354931AbiASNuv (ORCPT + 99 others); Wed, 19 Jan 2022 08:50:51 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:33451 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235698AbiASNum (ORCPT ); Wed, 19 Jan 2022 08:50:42 -0500 Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 3930EFF802; Wed, 19 Jan 2022 13:50:35 +0000 (UTC) From: quentin.schulz@theobroma-systems.com To: robh+dt@kernel.org, heiko@sntech.de Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Jakob Unterwurzacher , Quentin Schulz , Quentin Schulz Subject: [PATCH] arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity Date: Wed, 19 Jan 2022 14:49:48 +0100 Message-Id: <20220119134948.1444965-1-quentin.schulz@theobroma-systems.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakob Unterwurzacher There are signal integrity issues running the eMMC at 200MHz on Puma RK3399-Q7. Similar to the work-around found for RK3399 Gru boards, lowering the frequency to 100MHz made the eMMC much more stable, so let's lower the frequency to 100MHz. It might be possible to run at 150MHz as on RK3399 Gru boards but only 100MHz was extensively tested. Cc: Quentin Schulz Signed-off-by: Jakob Unterwurzacher Signed-off-by: Quentin Schulz --- Note/RFC: as opposed to gru DTSI, max-frequency is used here instead of assigned-clock-rates. AFAIU, max-frequency applies to the SD bus rate, while assigned-clock-rates applies to the clock fed to the SD host controller inside the SoC. max-frequency does not interact with the clock subsystem AFAICT. assigned-clock-rates sets the clock rate at probe, regardless of eMMC tuning. Technically, the Arasan SDHC IP supports silicon-hardcoded clock multiplier so I think setting assigned-clock-rates as a way of rate limiting the eMMC block is incorrect and max-frequency should be used instead (as done in this patch). Otherwise the SDHC could still potentially derive a 200MHz clock from a lower rate clock thanks to its multiplier. arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi index fb67db4619ea..a6108578aae0 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -425,6 +425,12 @@ vcc5v0_host_en: vcc5v0-host-en { }; &sdhci { + /* + * Signal integrity isn't great at 200MHz but 100MHz has proven stable + * enough. + */ + max-frequency = <100000000>; + bus-width = <8>; mmc-hs400-1_8v; mmc-hs400-enhanced-strobe; -- 2.34.1