Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp157536rba; Tue, 26 Mar 2024 11:57:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSVg43c3KBNrODjFp2DEVfn1URkiQUV/d1gX651ega8QOYzoGVbqh6AlMZgt3z8GsF1KNX8H5wvnA3aMYziU0YwmUNiMHEq6RjC98XOg== X-Google-Smtp-Source: AGHT+IHXwUpHs7t7Zjg7s0e4tDk54ijaTML9wECZHnXc37eWc0+oRgKM8Uk/Yqby+bKdoyFWNt50 X-Received: by 2002:a05:6512:4845:b0:514:b4ca:f478 with SMTP id ep5-20020a056512484500b00514b4caf478mr6911790lfb.39.1711479473470; Tue, 26 Mar 2024 11:57:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711479473; cv=pass; d=google.com; s=arc-20160816; b=EGCif4WXzzBwwlmhKXifL4Xp1O7csaejsgfziIIKPVEf3a1NEVsjr5MDDb0xhpD8DP 6aWvDnT4RCnbMkE0Vqch0gYiGE0w8QipQpvOx7jCs9hUeUl9wvIhegaItT08tVrWzYI4 E9SsIwpbU3DiHOLFdHsFp0OA8WqUAjHJ6Zo1mwbQmNjx5cu5rMljpIpT1b6BLnV9geFe gaoniUHTBYqQOZHH3sfnrVyPV8sNBWKyLV42vzTES2JpCvS3aTKg6Nqo2jllMRaITOOe zKIhMF/nB6AP06Z1E8c2j2Vp8HsmULSL4k1/rMO//rVpYcto8xW3j5bH7Ti5vrSpVt7k uINw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=Am1jdnjIV03hNqqGL+etYWs+PvFpWulukUAUq76HvQQ=; fh=VYKK42FEgPH8y/YwkxFUXR0xrufwvEXqPoqPV4uFoHw=; b=NZGZGQvUb3Gin3AOQZTYD0rrxbLHV4NkLvSzK0wTRLyKtcXLvwtLXg5hq0fgKKMX7G 1NVmV+gd+95A/4eB9/87M0maTROnjKrQ6sBRDzXLYs9dUx+SpsgAsIFl0YL5Zku4CAGe tmwqCtaN9YSk/PqIO+UKpr7KAvF5COjcVC0lZApkhPDSoN8mRcGQyyQgFHLalhPoff6R or07eu9/ROd1QV7vT/FuG0P37Xtux3V1EH1pOqIqEO4n9yU+iE8IAHnxM9+421RZoCT2 UTtPqXqu9n0vaNCYfjuAbEqT1zmHeJ9QwSVuuRncDBAU4W/9BgWKsrsV8R3e0+c1MY92 dzRA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NFkZy5Y9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119730-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hq15-20020a1709073f0f00b00a4a34215709si2285470ejc.1053.2024.03.26.11.57.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 11:57:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119730-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NFkZy5Y9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119730-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3AEC31F2CF73 for ; Tue, 26 Mar 2024 18:57:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30D8813CC70; Tue, 26 Mar 2024 18:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NFkZy5Y9" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AFC813C696; Tue, 26 Mar 2024 18:57:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711479444; cv=none; b=iC+CEzfPa6Iv7c55r700cgrP/JjMC6tLQ/QfWRSLM44hx8RBJaO54O0wtUImyCsRFyGedcdANOI0O79VTGe+eAh+etrd/09VCwtzPkig07GlfzJ19Xu+uVh/vMhTjtv77tvYYoC1J+5BvA+s/MXuGyLFmiZk+00eayoDYGI+GZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711479444; c=relaxed/simple; bh=Gsn3xXI5BKQL/2L//Z3WWmwk7DoW960rhzJRT9Ymakc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=neCYT6uEEWSDqKTpA9ouSnjGEZe2VBgbBizpOyt9EWsEUaT7XlegTQMorX2mI7CGkpAAz62LTGtdOtyPg250g9yt7SBQOa4FWAU6SXybKD07/CVup+RooA0lSgFtgSNVROsvjqtStFJ0Gog1VTqmK3FBHcZ4zv0wIzv3jVzMnlA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NFkZy5Y9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id C36E4C43390; Tue, 26 Mar 2024 18:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711479443; bh=Gsn3xXI5BKQL/2L//Z3WWmwk7DoW960rhzJRT9Ymakc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=NFkZy5Y9KO2Hxq0mI84mZ9prB6Fytp67o6i5a/E4qS3vwxvFWzhv4AIpeM160GWfp AAmVMtfAXgmahmiyPwYN8nj4zBFY3Yyb+7Y4bIJbrE2u1iNhqZNOAGzurwjF72Rv8w /KsXhV57usRVY+CgK3FCqCGbAvn/v0XQNJpzuteTKJK/lbrh89y7fxabQIulbXB/JA Nf1GxyoCfRttFrH1QcjZdSQR+usSkjZ+OKL69z2gBjilVDX6dcH7rekmOelO6shf2x kjd2otmYtZT0F6WGyEViMFAPXuPlKBhKx0SbtgYA8u9vLzkiIzNCu1QTykOLUtfuux LNau16lWcj5bQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2E1EC6FD1F; Tue, 26 Mar 2024 18:57:23 +0000 (UTC) From: Folker Schwesinger via B4 Relay Date: Tue, 26 Mar 2024 19:54:35 +0100 Subject: [PATCH 1/3] phy: rockchip: emmc: Enable pulldown for strobe line Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240326-rk-default-enable-strobe-pulldown-v1-1-f410c71605c0@folker-schwesinger.de> References: <20240326-rk-default-enable-strobe-pulldown-v1-0-f410c71605c0@folker-schwesinger.de> In-Reply-To: <20240326-rk-default-enable-strobe-pulldown-v1-0-f410c71605c0@folker-schwesinger.de> To: Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Chris Ruehl , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Christopher Obbard , Alban Browaeys , Doug Anderson , Brian Norris , Jensen Huang , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Folker Schwesinger X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2253; i=dev@folker-schwesinger.de; h=from:subject:message-id; bh=vn1WaogVqkovnF++lKXXa6btFkOAZlcxkgTSF4vHKKI=; b=owGbwMvMwCXG5FBoZNu1u5bxtFoSQxqz1ESGm1xxESWPdL0nBP77tEF529PKYs66r0ez70y8w 2eS2Tm5o5SFQYyLQVZMkYU1L2MLc2b5Uuuun69h5rAygQ3h4hSAibCEMfwVOiHs8frNmQnzo1mu GdVGya19sFMoZ+G78y36Xp3W6h5fGRnaD1XFVlhoO08onHh787XvZ+ad11Ko0L/3/tkVv8uFT66 zAQA= X-Developer-Key: i=dev@folker-schwesinger.de; a=openpgp; fpr=056E68B4036977A53B8AF9EB024071323D8ABB7D X-Endpoint-Received: by B4 Relay for dev@folker-schwesinger.de/default with auth_id=144 X-Original-From: Folker Schwesinger Reply-To: dev@folker-schwesinger.de From: Folker Schwesinger Restore the behavior of the Rockchip kernel that undconditionally enables the internal strobe pulldown. As the DT property rockchip,enable-strobe-pulldown is obsolete now, replace it with a property to disable the internal pulldown. This fixes I/O errors observed on various Rock Pi 4 and NanoPi4 series boards with some eMMC modules. Other boards may also be affected. An example of these errors is as follows: [ 290.060817] mmc1: running CQE recovery [ 290.061337] blk_update_request: I/O error, dev mmcblk1, sector 1411072 op 0x1:(WRITE) flags 0x800 phys_seg 36 prio class 0 [ 290.061370] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:348: I/O error 10 writing to inode 29547 starting block 176466) [ 290.061484] Buffer I/O error on device mmcblk1p1, logical block 172288 Fixes: 8b5c2b45b8f0 ("phy: rockchip: set pulldown for strobe line in dts") Signed-off-by: Folker Schwesinger --- drivers/phy/rockchip/phy-rockchip-emmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-emmc.c b/drivers/phy/rockchip/phy-rockchip-emmc.c index 20023f6eb994..6e637f3e1b19 100644 --- a/drivers/phy/rockchip/phy-rockchip-emmc.c +++ b/drivers/phy/rockchip/phy-rockchip-emmc.c @@ -376,14 +376,14 @@ static int rockchip_emmc_phy_probe(struct platform_device *pdev) rk_phy->reg_offset = reg_offset; rk_phy->reg_base = grf; rk_phy->drive_impedance = PHYCTRL_DR_50OHM; - rk_phy->enable_strobe_pulldown = PHYCTRL_REN_STRB_DISABLE; + rk_phy->enable_strobe_pulldown = PHYCTRL_REN_STRB_ENABLE; rk_phy->output_tapdelay_select = PHYCTRL_OTAPDLYSEL_DEFAULT; if (!of_property_read_u32(dev->of_node, "drive-impedance-ohm", &val)) rk_phy->drive_impedance = convert_drive_impedance_ohm(pdev, val); - if (of_property_read_bool(dev->of_node, "rockchip,enable-strobe-pulldown")) - rk_phy->enable_strobe_pulldown = PHYCTRL_REN_STRB_ENABLE; + if (of_property_read_bool(dev->of_node, "rockchip,disable-strobe-pulldown")) + rk_phy->enable_strobe_pulldown = PHYCTRL_REN_STRB_DISABLE; if (!of_property_read_u32(dev->of_node, "rockchip,output-tapdelay-select", &val)) { if (val <= PHYCTRL_OTAPDLYSEL_MAXVALUE) -- 2.44.0