From patchwork Fri Jul 15 17:12:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_Kohlsch=C3=BCtter?= X-Patchwork-Id: 12919488 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 1F77CC433EF for ; Fri, 15 Jul 2022 17:12: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:To:References:Message-Id:Cc:Date: In-Reply-To:From:Subject:Mime-Version:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bHTpq77DKk3E7YN29gsKV+ii59ROPqFczVDcadBmidU=; b=K2kcKnKyoZKSkK s9mCklfIpA4aP8cMtFNKBkpALE2PYyBhcGMqH4sPUi2u3DxaP3vaqIZkzkx8hFsxxHj6eiwtBAaNM Ldkbmr5cPrZr+O6jzLzE8Hb5zQWfzW7H5EdtYS2bvYb0cQIn3h2eM5aR5NkiMvLu4KH2/ezbasCKB 9ZzMDrPXUY7nPmg18OSvpwIFL9c4wvSf/gfRQ3gIMC7OjnOjDpCa92bioseZPc6jcSvbbwQxTQBjG 1buJsYYVxUhtwuVBvHQLzro61uJstu5t6dT27PRJZxDK0LNPDHE4lbYFPdOux4nmpD/g8yNDxVEkm 83akuRSBjDIDUQqcYofA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCOrZ-00948x-SL; Fri, 15 Jul 2022 17:12:25 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCOrV-009486-9I for linux-rockchip@lists.infradead.org; Fri, 15 Jul 2022 17:12:22 +0000 Received: by mail-ed1-x52e.google.com with SMTP id g1so7087607edb.12 for ; Fri, 15 Jul 2022 10:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kohlschutter-com.20210112.gappssmtp.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KXfsOmRJt+ko9q2xCFE2u/0piZsS+7uuoZliHVGfwJQ=; b=JrUCiOaL0g8EZjc7wwNGSWCtN8AoXNWc/FBN+G13zkfhPnZfEyApW41SbcCUJVq6VO dR7HcyqrkF58dvkmfAe5ylq+x4m6VpO7NMbfqSSS19cfgNYETRuS3UrwNSOsLk23EDvp k1Ux3y42VDgKAghB/G3mnPHggMBKcCQYjJzDEalT18pNvI14L+0dDiBVMOQo1cTafUzf fep39I8Wf6WaljcC8DGRHErqfQaFQsMSQHrE7CJH1vANwCMDcKWNXL0wgIYpiD8x97zr BnQUicxkYqw/8dfPVegc4muo10PfDYkr1DNLyiuq2VZPfINs4wTMyGy2wPz9QQHw+MHD 2C7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KXfsOmRJt+ko9q2xCFE2u/0piZsS+7uuoZliHVGfwJQ=; b=oF932wLyRJMuAz+/qEUrigSHQtwve5K8wUsZDyfPqJzdIqgna/xS4SXizuq2kIrcrp xwo6CC1CNAWFPQ3huQv33X6IolKHKqoWBNEEpjqX5RwaVKh+yqa+C18rwCYnqHSNXyfD Q78VLn+DiDUYMdQT02tupM8ne5MXx5HAZVIAk1hRSGDDypls6eFuEt6mJDAmqbiTywzU mpRm+Z+lLZlUe4/2bNM/ge6QEn29u1pnew6tDgt0zr+N+q+iRP4IUpo7zUwbbaCm49Yy TZabOcnLDo+mrjLs42qVAhY1K17xCT3d/T73MWtdLtCFfmQU6qfF6THigGRk3B6J1eic N5gg== X-Gm-Message-State: AJIora/fb1R6zaDWbOCjSWd9zX0OkKBPsl0G5Q7BO81XNaPHxpo4TX9L y+X6KkjgYejEsS2k0EOHNcwn/g== X-Google-Smtp-Source: AGRyM1sSLPziXUwYzLmFnukeeceHvDSD/6Jo8MXOHXz40mmUWueDudeIQrT56eXfaH9gWvcZcE3Acw== X-Received: by 2002:a05:6402:34c1:b0:43a:bd7a:898a with SMTP id w1-20020a05640234c100b0043abd7a898amr20426220edc.426.1657905132673; Fri, 15 Jul 2022 10:12:12 -0700 (PDT) Received: from smtpclient.apple (ip5b434222.dynamic.kabel-deutschland.de. [91.67.66.34]) by smtp.gmail.com with ESMTPSA id l5-20020aa7c3c5000000b0043575ae2051sm3179899edr.62.2022.07.15.10.12.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2022 10:12:12 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: [PATCH v4] arm64: dts: rockchip: Fix SD card init on rk3399-nanopi4 From: =?utf-8?q?Christian_Kohlsch=C3=BCtter?= In-Reply-To: <449292CA-CE60-4B90-90F7-295FBFEAB3F8@kohlschutter.com> Date: Fri, 15 Jul 2022 19:12:11 +0200 Cc: linux-arm-kernel , "open list:ARM/Rockchip SoC..." , linux-kernel , Linux MMC List Message-Id: <73F9AED0-D2A8-4294-B6E1-1B92D2A36529@kohlschutter.com> References: <12878108.O9o76ZdvQC@diego> <103b714c-b07c-f016-1062-84bd94786b22@arm.com> <9AF1E75F-5947-49B0-887D-82C426527B99@kohlschutter.com> <590f7a08-a6ca-be54-4254-363343642a52@arm.com> <5ca9bd94-54d9-04f8-0098-a56ffb6f5fe1@arm.com> <502b3fbe-3077-407e-6010-a8cb3ffce7d6@arm.com> <449292CA-CE60-4B90-90F7-295FBFEAB3F8@kohlschutter.com> To: Robin Murphy , wens@kernel.org, =?utf-8?q?Heiko_St?= =?utf-8?q?=C3=BCbner?= , Markus Reichl X-Mailer: Apple Mail (2.3696.100.31) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220715_101221_336545_700457E4 X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org mmc/SD-card initialization may fail on NanoPi R4S with "mmc1: problem reading SD Status register" / "mmc1: error -110 whilst initialising SD card" either on cold boot or after a reboot. Moreover, the system would also sometimes hang upon reboot. This is prevented by setting an explicit undervoltage protection limit for the SD-card-specific vcc3v0_sd voltage regulator. Set the undervoltage protection limit to 2.7V, which is the minimum permissible SD card operating voltage. Signed-off-by: Christian Kohlschütter --- arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 => 100755 arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi old mode 100644 new mode 100755 index 8c0ff6c96e03..669c74ce4d13 --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi @@ -73,6 +73,10 @@ vcc3v0_sd: vcc3v0-sd { regulator-always-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; + + // must be configured or SD card may fail to initialize occasionally + regulator-uv-protection-microvolt = <2700000>; + regulator-name = "vcc3v0_sd"; vin-supply = <&vcc3v3_sys>; };