From patchwork Wed Jul 5 14:42:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 13302272 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 92AE3EB64DA for ; Wed, 5 Jul 2023 14:43:33 +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:References:In-Reply-To: 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: List-Owner; bh=wqXqK2IzQ8oEva1getaFfEC9frpbNEb9WjKtONCkYu4=; b=SOXzMuD3g8PRwT uAJIkcmZoDzWCbbCr4A/tZLg+ZO77/Hc//gTnBpsVwEdqjSwSC0Ta6duFAUQcmuvk3+GdKTwoaWUR E/V0b3VJao4LKVuY2mL/GIE1fe2fI7ctHzOHEyxEV8q1NaVWAH3VOHFrOc7BXRzN/hsKdl5O0C/oP 0xSK6gLBYmgeP5Xw01sMWppjIwgZsSfEcTrqJsxjjt2sGZ/eHAmBhRGNSf28WcOtrs092YkI6dtLq S5jB28TBkmF4yndxgFdgTj5kjDrqXp8iEFtB+fs2BUpE80irUF7ueDDrGPeysnUh7jL1Cp/2FK3P4 NW/pe1ntqYOkWCxwlMMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qH3il-00GB7d-18; Wed, 05 Jul 2023 14:43:07 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qH3ih-00GB4u-15; Wed, 05 Jul 2023 14:43:04 +0000 Received: from obbardc-t14.home (unknown [IPv6:2a00:23c8:b70a:ae01:7599:ed26:1798:f430]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: obbardc) by madras.collabora.co.uk (Postfix) with ESMTPSA id B7BFE6606FBA; Wed, 5 Jul 2023 15:43:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1688568181; bh=uPaYPRBzOqPzhs7FH+a97cBKmRbQaU3/eRl8Hl4t9z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2hNM1ZmvLZ2ham6FGonveGJiwK9UZbmqzgcCkRfqPOTpM7KFaX9itSzRzJTcJFmR DY1OTZaAKpKTbIOujbgh/oyyQwREsRzY/I2uzWVvnM9XPE42PSsafBGfYkW0GQQRsS t8MzAz2sORC51PBadMdhW5y/uT8fTmsdmD+3BdI4uQ2Lb93fjs+ItBTM/VVTll98d8 RP9JjkPcCe3wen1CWcoOBnshnDU3dzOtg0y5eFa9oHVmvEv/4l6NLvfnMUNXPxKu11 fHshVc5tqSej1UpBNspfgT2Tfg6JDMFe/cBOuc0FDyF0yI10DnWRU2+m8is2SkMeY6 RHHaXwZmCtgfw== From: Christopher Obbard To: linux-rockchip@lists.infradead.org Cc: kernel@collabora.com, Christopher Obbard , Akash Gajjar , Conor Dooley , FUKAUMI Naoki , Heiko Stuebner , Jagan Teki , Krzysztof Kozlowski , Pragnesh Patel , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/2] arm64: dts: rockchip: Disable HS400 for eMMC on ROCK Pi 4 Date: Wed, 5 Jul 2023 15:42:54 +0100 Message-Id: <20230705144255.115299-2-chris.obbard@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230705144255.115299-1-chris.obbard@collabora.com> References: <20230705144255.115299-1-chris.obbard@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230705_074303_500590_FBAA46A7 X-CRM114-Status: GOOD ( 14.84 ) 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 There is some instablity with some eMMC modules on ROCK Pi 4 SBCs running in HS400 mode. This ends up resulting in some block errors after a while or after a "heavy" operation utilising the eMMC (e.g. resizing a filesystem). An example of these errors is as follows: [ 289.171014] mmc1: running CQE recovery [ 290.048972] mmc1: running CQE recovery [ 290.054834] mmc1: running CQE recovery [ 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 [ 290.061531] Buffer I/O error on device mmcblk1p1, logical block 172289 [ 290.061551] Buffer I/O error on device mmcblk1p1, logical block 172290 [ 290.061574] Buffer I/O error on device mmcblk1p1, logical block 172291 [ 290.061592] Buffer I/O error on device mmcblk1p1, logical block 172292 [ 290.061615] Buffer I/O error on device mmcblk1p1, logical block 172293 [ 290.061632] Buffer I/O error on device mmcblk1p1, logical block 172294 [ 290.061654] Buffer I/O error on device mmcblk1p1, logical block 172295 [ 290.061673] Buffer I/O error on device mmcblk1p1, logical block 172296 [ 290.061695] Buffer I/O error on device mmcblk1p1, logical block 172297 Disabling the Command Queue seems to stop the CQE recovery from running, but doesn't seem to improve the I/O errors. Until this can be investigated further, disable HS400 mode on the ROCK Pi 4 SBCs to at least stop I/O errors from occurring. While we are here, set the eMMC maximum clock frequency to 1.5MHz to follow the ROCK 4C+. Fixes: 1b5715c602fd ("arm64: dts: rockchip: add ROCK Pi 4 DTS support") Signed-off-by: Christopher Obbard Tested-By: Folker Schwesinger Signed-off-by: Christian Kohlschütter Signed-off-by: Mark Brown --- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi index 907071d4fe80..95efee311ece 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi @@ -645,9 +645,9 @@ &saradc { }; &sdhci { + max-frequency = <150000000>; bus-width = <8>; - mmc-hs400-1_8v; - mmc-hs400-enhanced-strobe; + mmc-hs200-1_8v; non-removable; status = "okay"; }; From patchwork Wed Jul 5 14:42:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 13302273 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 04BD4EB64DA for ; Wed, 5 Jul 2023 14:43:37 +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:References:In-Reply-To: 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: List-Owner; bh=D+0vYE2+jCDoo779KuQnFwfIoZ0UeOH4zmSgTZgtriE=; b=L6fxSllTcriusU pUM6+6YxLQaP7a8f0Lo6l7XF0aciI9R/zFHFAhYvXbXNA9Q9udhe/w4nVFLI/o6sU+iat0qh9ZsKq AMpodk/IKXuwDcA5oJqe84Hw7LtNmT8ALyzK76N5M+IJO31EgLw2WQkAPasHG0cYR2UED5wFIgzI7 VvJULHDSL+UiiUVNwXa/nG2YvXbb/SBlL8kWoiSMJ2I95uI53yMwoBjRyRqmHOE1pPvQGLnAvM6xL PMvl7hpG2SxH/p+RcJZblHbvXG1/9qYLSBjjhoAI57ajNB5he7rCqX/6QCD1BPfW1E2XxT0aY4Pii OrxOmrm4Xy2t9Q+zpa5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qH3in-00GB8y-15; Wed, 05 Jul 2023 14:43:09 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qH3ih-00GB53-1f; Wed, 05 Jul 2023 14:43:05 +0000 Received: from obbardc-t14.home (unknown [IPv6:2a00:23c8:b70a:ae01:7599:ed26:1798:f430]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: obbardc) by madras.collabora.co.uk (Postfix) with ESMTPSA id 35DA16606FBC; Wed, 5 Jul 2023 15:43:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1688568182; bh=V58cBnqk19ExhjbGA1KcziLl4pEqWwYt10fdubSKHPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCJKws57Os/TNHkGMeIsQr10uHdrPTuGAqhHwMGkGzhXWzoLTs/dveUTQt1OORGV4 zZPvfXH8fWegzcL8oWKoyo3tj6O/hH0bfnk4QetgKnhnehDuzjz8XMT2t6VFpew2AC 1POWAKxZYd8H5VPN19pq2sxa/JstaXv6OA1pKpYgJnc1xQitaAXdlDZbWxhce+cJvN Yk2yevmq98l4+mdFH9UMguG/ajpF5msAfU7717QMFixGXDzzWpy9Z8lJeRXFsSzqfZ lAT0m+b5KleRUF/HjvYs2xNoLbqGSSiBjJWs8gejxZQIIRq697yJjEho5m8YAJrUUa lSWp4dDn1isLA== From: Christopher Obbard To: linux-rockchip@lists.infradead.org Cc: kernel@collabora.com, Christopher Obbard , Conor Dooley , FUKAUMI Naoki , Heiko Stuebner , Jagan Teki , Krzysztof Kozlowski , Manoj Sai , Rob Herring , Stephen Chen , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/2] arm64: dts: rockchip: Disable HS400 for eMMC on ROCK 4C+ Date: Wed, 5 Jul 2023 15:42:55 +0100 Message-Id: <20230705144255.115299-3-chris.obbard@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230705144255.115299-1-chris.obbard@collabora.com> References: <20230705144255.115299-1-chris.obbard@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230705_074303_679440_8AB6B1FD X-CRM114-Status: GOOD ( 13.40 ) 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 There is some instablity with some eMMC modules on ROCK Pi 4 SBCs running in HS400 mode. This ends up resulting in some block errors after a while or after a "heavy" operation utilising the eMMC (e.g. resizing a filesystem). An example of these errors is as follows: [ 289.171014] mmc1: running CQE recovery [ 290.048972] mmc1: running CQE recovery [ 290.054834] mmc1: running CQE recovery [ 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 [ 290.061531] Buffer I/O error on device mmcblk1p1, logical block 172289 [ 290.061551] Buffer I/O error on device mmcblk1p1, logical block 172290 [ 290.061574] Buffer I/O error on device mmcblk1p1, logical block 172291 [ 290.061592] Buffer I/O error on device mmcblk1p1, logical block 172292 [ 290.061615] Buffer I/O error on device mmcblk1p1, logical block 172293 [ 290.061632] Buffer I/O error on device mmcblk1p1, logical block 172294 [ 290.061654] Buffer I/O error on device mmcblk1p1, logical block 172295 [ 290.061673] Buffer I/O error on device mmcblk1p1, logical block 172296 [ 290.061695] Buffer I/O error on device mmcblk1p1, logical block 172297 Disabling the Command Queue seems to stop the CQE recovery from running, but doesn't seem to improve the I/O errors. Until this can be investigated further, disable HS400 mode on the ROCK Pi 4 SBCs to at least stop I/O errors from occurring. Fixes: 246450344dad ("arm64: dts: rockchip: rk3399: Radxa ROCK 4C+") Signed-off-by: Christopher Obbard --- arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts index 028eb508ae30..8bfd5f88d1ef 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts @@ -548,9 +548,8 @@ &saradc { &sdhci { max-frequency = <150000000>; bus-width = <8>; - mmc-hs400-1_8v; + mmc-hs200-1_8v; non-removable; - mmc-hs400-enhanced-strobe; status = "okay"; };