Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp667813imw; Fri, 15 Jul 2022 10:32:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saH2hw0vCrQgAhl4Xc2SA5Pu54zd+d3w4yBZjBZIEKaOPlKAbCeIQhrqv8WI0alQJhzSp2 X-Received: by 2002:a05:6a00:22c7:b0:52b:af2:903f with SMTP id f7-20020a056a0022c700b0052b0af2903fmr14834025pfj.3.1657906344526; Fri, 15 Jul 2022 10:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657906344; cv=none; d=google.com; s=arc-20160816; b=LG/mrsZ1CfCAnzLcgy8YXOFguaPouSQx0jkzthmTZ5idSkE7aV0bJ9cXGW5zAnV1Bg fk8m6Z4/1TuZqd5FhrGUG2Hftc2QBuYvnvfnO5bj0p2q61U+t27EVVGs+Kin+QYjuxDq UfVdg3IxwzFYvpWR8dqmsq17MwdqrMzQNvRmpHOVqGW8ig+0eAElMPCCmms/48ysuRTF 8KROKCouAV95oMl9GC0AXhXxAEb5OjlkcS9G0W6uHBHt/uz0LFEL2S0cp2D5ok2+IVRx n4dH0DK0YZ5fUeOx0HnrOKA8AmL3ZoBwVmXyzClJdE3Vjsr+rIHbEa4iuByFtfO5DwW3 RNWg== 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=KXfsOmRJt+ko9q2xCFE2u/0piZsS+7uuoZliHVGfwJQ=; b=CVHgM64rCJcpA9Fa/C11ewv5aDEFse93p1qWNzTn3MLNhAq4IeN6TeXTdGBWU7JHly 4Dd3DBrsLRqDxziG+KvJK79g5Zw4R8D59RNKpuaWDaf67wxyxuLnv/YST8KHmX7X+8k4 HozxTM6cEJ9hiGuesl5KoNQNgZKP5AoMfRtiRad06owENKEy2HdvaxuGGfwRs7C2G+lz Z2Poc5YVxwSCLWKbn4c4+JAL+phnTa6wFZzfhbEpFtneoz2pn1MQgE11S0dqQwOyHRHJ g0/VjT6drERxl9tyxUwBUUCIp3zM4bd6bLaUOQNR7KYmzZYbyaJPGyTHcZDK+aH4ZmjA C0cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kohlschutter-com.20210112.gappssmtp.com header.s=20210112 header.b=JrUCiOaL; 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 y3-20020a17090322c300b0016a417b06c9si7050199plg.591.2022.07.15.10.32.04; Fri, 15 Jul 2022 10:32:24 -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=JrUCiOaL; 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 S232855AbiGORMe (ORCPT + 99 others); Fri, 15 Jul 2022 13:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbiGORMc (ORCPT ); Fri, 15 Jul 2022 13:12:32 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265A26173A for ; Fri, 15 Jul 2022 10:12:14 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id fd6so7109207edb.5 for ; Fri, 15 Jul 2022 10:12:14 -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=Ef713kDIPmDNrBEYr/iKXQCJlI5ihrcB67heXIBga9IqYNpZDEuZWKfngyINyfH+UR u/5CNDvpU1CbGHrKFQ+9ZIsAZ9CyxhOfI2RaUstHOCYQIDy1ZPWb7b4IJmy+KpKSWyv3 UkeIy8heMtJA0FOW4IVF1uNdsx5s0NWQFAJwzDUND+n+JAoi0WchY0X9T4JthfbuZkfJ /xlkFQ/bbLyYMMV0ubUYwckjelqPT/tH0zoUCaX7nfBMD1iRVSXImxC0e6zvqVt9+ZHy aDzmFotLoO7OnB82olWmJl8XGkdnh+eM0pT81SRvPbsK02xdRwg1vT0aRWHs7afbT4a8 EcnQ== X-Gm-Message-State: AJIora96Ev38TiW6zx8GK8DBSUn747OnzTIrkl/+oeZzUFZDM/uyLbRj DYoAN0dbTyz0HXGzurPDw5MfKg== 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) Content-Type: text/plain; charset=utf-8 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 Content-Transfer-Encoding: quoted-printable 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=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,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. 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 configured or SD card may fail to initialize = occasionally + regulator-uv-protection-microvolt =3D <2700000>; + regulator-name =3D "vcc3v0_sd"; vin-supply =3D <&vcc3v3_sys>; }; --=20 2.36.1=