From patchwork Wed Oct 19 14:27:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 13011891 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D075C4332F for ; Wed, 19 Oct 2022 14:51:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=h0jc1y3IEs6uVDrYEshgt35NS3wxEZSYiXbJmrrEspI=; b=FDJDWZkVhpTCm2 kLZyLvQ5sS0uypHyel81FSXzNdUJAQqQsgL9d4pU1o62zKia1a78+7JBqArSn7kXaI1nl/h7wIGis kZwKQhN3grAoSVp2CBmTOa67C3XoG5LlWTDDlwl8qos29z5BxSyXiYmV+R38oLaW0oe8BSUYFeqjX TH+YqfEZyMf9GbtmqJOQl+0uIFrxexvZAcwmyyjnNFLerxBKSXg6Kcp5xJT/idlxrxPgUzkMb/tNg EfZbgPQZJN+gZ644NmiZjoC+f/CezLORaiiTTT+9uvhsHR30wfca26ZWHVA7sdQ06KmkVlBQ8L+ym k+cda8H7Fg6hGTjoS4RQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olAOm-002tbM-Az; Wed, 19 Oct 2022 14:50:24 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olA36-002n6q-42; Wed, 19 Oct 2022 14:28:02 +0000 Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 6AECBFF805; Wed, 19 Oct 2022 14:27:50 +0000 (UTC) From: Quentin Schulz To: foss+kernel@0leil.net, Krzysztof Kozlowski , Heiko Stuebner , Rob Herring Cc: Quentin Schulz , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Jakob Unterwurzacher , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] arm64: dts: rockchip: lower rk3399-puma-haikou SD controller clock frequency Date: Wed, 19 Oct 2022 16:27:27 +0200 Message-Id: <20221019-upstream-puma-sd-40mhz-v1-0-754a76421518@theobroma-systems.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_072800_390358_E01EB34A X-CRM114-Status: GOOD ( 10.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Quentin Schulz From: Jakob Unterwurzacher CRC errors (code -84 EILSEQ) have been observed for some SanDisk Ultra A1 cards when running at 50MHz. Waveform analysis suggest that the level shifters that are used on the RK3399-Q7 module for voltage translation between 3.0 and 3.3V don't handle clock rates at or above 48MHz properly. Back off to 40MHz for some safety margin. Cc: stable@vger.kernel.org Fixes: 60fd9f72ce8a ("arm64: dts: rockchip: add Haikou baseboard with RK3399-Q7 SoM") Signed-off-by: Jakob Unterwurzacher Signed-off-by: Quentin Schulz --- We've been carrying this patch downstream for years and completely forgot to upstream it. This is now done. To: Rob Herring To: Krzysztof Kozlowski To: Heiko Stuebner Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: Jakob Unterwurzacher --- arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: aae703b02f92bde9264366c545e87cec451de471 change-id: 20221019-upstream-puma-sd-40mhz-b5aef1c351e6 Best regards, diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts index 04c752f49be9..115c14c0a3c6 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts @@ -207,7 +207,7 @@ &sdmmc { cap-sd-highspeed; cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; disable-wp; - max-frequency = <150000000>; + max-frequency = <40000000>; pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; vmmc-supply = <&vcc3v3_baseboard>;