Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp655921imw; Fri, 15 Jul 2022 10:18:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1slNwR1FWnZg9/G7h+ejt76879hDEernRqeDeALUtVbAiWkAFdQhACV7CsRcy8gFcdMeCRl X-Received: by 2002:a05:6808:302b:b0:2f9:eeef:f03 with SMTP id ay43-20020a056808302b00b002f9eeef0f03mr10533581oib.128.1657905517563; Fri, 15 Jul 2022 10:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657905517; cv=none; d=google.com; s=arc-20160816; b=hhw0cj4gVmeK2oB2VLbzxl8BCugVm4qRDaAhY5tHn6kCD//JeCjP/9lp5KhzIEzEhb kRKeFmAkJd6eq4ZREuY6G+iIGzroU91ELJ6YqGmBBNb6JpDxB7o37LRqq4YphuTxitqf tkGQPQ19NJrW6lxvLSplpilAfVBjV+L0Bi0qND7g6JwQAUcN+X5i1XIMKHOh82dXKrcZ tqhsfpoXG4UMvk8EXyoX/FukxOguUZY/ysvuu1lyxHJ3swsRtsqOR3Vagkup4Nb+Qsuk xVo+rkIGOAwUyW7NXftpSXTh5v+kK6rfkHuHXAakHHg7NaZtmM1o/8JQIwg/ZowMqaCh DdDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=dIRVpOqiqH59RP0AoZiD2s3xlmYa2fxQT3tSFC8Essc=; b=INv1TXhaQCBx39zMO3PKhwnFGVOGZN0cP0pOSBMOwcvCMIZ+zmLO4pA3Wmdf4rAIVa Y7S8vRiuqMP4FhclFISYSbRmcIYZNlVAv4JOi4sSciQSvGXPQ2xBtbUmYzgb2QOOiYAA vOEHt2idhHsw8bArGkeYtlC1e1Ar9g86KPS8VwXw4leBZDwIV35sYqIA9DSIzWHahgoY 1IbiLOi85mbjvXs+yzzEjZIFsOFAhjSvEl+POQVM44lEF5MIIGY8/VnRClJ9ogpHS4p6 LS0CSRgZZsm4qksX9ZdFlHTH30mNw5JV7V4003m56eBkX7Zj8U4vKiVYy//ctDifKWFA GPeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kohlschutter-com.20210112.gappssmtp.com header.s=20210112 header.b=HRy26nf+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l206-20020aca3ed7000000b00337b3cfe411si4092176oia.207.2022.07.15.10.18.24; Fri, 15 Jul 2022 10:18:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kohlschutter-com.20210112.gappssmtp.com header.s=20210112 header.b=HRy26nf+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235421AbiGORB1 (ORCPT + 99 others); Fri, 15 Jul 2022 13:01:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235394AbiGORBY (ORCPT ); Fri, 15 Jul 2022 13:01:24 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B66D82386 for ; Fri, 15 Jul 2022 10:01:05 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id fy29so8886230ejc.12 for ; Fri, 15 Jul 2022 10:01:05 -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=dIRVpOqiqH59RP0AoZiD2s3xlmYa2fxQT3tSFC8Essc=; b=HRy26nf+hmKczXYwhz8g5F1tYXyzvWLNDZbn+FWf+AiEATRROmPI+AoL9+m/YxBlLS K3uRB9w/1ZIIZV6E+hgu7GNHmQQFNvxB7fbmvBWEyxKY1+RF5dNWI1Q2veOAs8c8cW+Y hhxBqUOvZnpOaa4+p9EQ7lw6c5Q3W7aDFgdjclMTKaQPL3uGM28Bn1IA3BAeAjxiYckB N6bl61gRnYmN0esXHP2QkHcXNMWT09uysgJvDCcpyB8F5rNRlSdwFWt37o2tmfk27cWL MEKgBmxUvEYNaNwjpKnJDgT/2Uo2IqAtSUdBXGKFinOK3WxS7OTqYmAgx/rOf5b9UOzq L7nw== 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=dIRVpOqiqH59RP0AoZiD2s3xlmYa2fxQT3tSFC8Essc=; b=OHw63evAgMPLEfLIHmK86AfiqVeDiHILGkx/Vf4S3W09ozZcG6jOd1YprHRnSzrdP7 vgKTODCe79w2Jq5PM4Wy2sLxrfA3758TeWtFpPzQByKRJiDXgPxUaIwaC0wxl4G9iI/b 8nkwt3c8MPEAhlnnG2kjOQf1X9k68NA75ARt+x3Jl/IE1oT4XIYeLJNz/MZ6urqOra0P CnxpsQMdnnud5drPLcm1TgQAkpJG8nFfhwldsiDPfAKNlgCXkLFKjTa/Ie88V+mZwG15 DYxbe/xcDfBQXOgi3wN8fdEQD4z6cuV6wt9Ky1RSgiH9gWZeJgi4I65XlB8DqDy8Yh8w QVdg== X-Gm-Message-State: AJIora+wyKUVbvYkEtTe3djQE4PTVvxQl5j5EaHsNentnR0jTfwkAmOP Ss/rvsCJ9vZ+1tp9qqm2m631pQ== X-Received: by 2002:a17:906:8a4d:b0:72b:6b8d:3779 with SMTP id gx13-20020a1709068a4d00b0072b6b8d3779mr14677191ejc.759.1657904463891; Fri, 15 Jul 2022 10:01:03 -0700 (PDT) Received: from smtpclient.apple (ip5b434222.dynamic.kabel-deutschland.de. [91.67.66.34]) by smtp.gmail.com with ESMTPSA id f24-20020a056402069800b004316f94ec4esm3142765edy.66.2022.07.15.10.01.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2022 10:01:03 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: [PATCH v3] arm64: dts: rockchip: Fix SD card init on rk3399-nanopi4 From: =?utf-8?Q?Christian_Kohlsch=C3=BCtter?= In-Reply-To: <502b3fbe-3077-407e-6010-a8cb3ffce7d6@arm.com> Date: Fri, 15 Jul 2022 19:01:02 +0200 Cc: linux-arm-kernel , "open list:ARM/Rockchip SoC..." , linux-kernel , Linux MMC List Content-Transfer-Encoding: quoted-printable Message-Id: <449292CA-CE60-4B90-90F7-295FBFEAB3F8@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> To: Robin Murphy , wens@kernel.org, =?utf-8?Q?Heiko_St=C3=BCbner?= , Markus Reichl X-Mailer: Apple Mail (2.3696.100.31) X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,T_SPF_TEMPERROR autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. While using a limit of 3V seems to work, an additional safety buffer should prevent accidental tripping, preventing a system hang. Set the undervoltage protection limit to 2.7V, which is the minimum permissible SD card operating voltage. Signed-off-by: Christian Kohlsch=C3=BCtter --- arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 =3D> 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 =3D <3000000>; regulator-max-microvolt =3D <3000000>; + + // must be initialized or SD card may fail to initialize = / system may hang + regulator-uv-protection-microvolt =3D <2700000>; + regulator-name =3D "vcc3v0_sd"; vin-supply =3D <&vcc3v3_sys>; }; --=20 2.36.1