From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.69.12 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796309425; b=lRUzCVa5xzghTdZ3gSlfEFImXqqvBC3H7hVqbpPIci8O0ki2A+OkOtimT4EavwxY+Pl+ J6zaBHnTpRqRfIz77XJcsf7WTEPu4cx3SU5Uuor/3O/34R3Ue9u7TJzIuRODRYsYx6PkG flXVWARa20ljdT/qYN21b48ridWG5EtTKSSpMS8/oNB93tL2DcgIQWZBRWZvVq+PRvCUE LkZND4GgQTvhnGFjKyjP3nBuBekoYREvaEv+r5JbipAWU6SBxMrS9JSHtobBiV34+S/Hc P9i3RLB9htsjFi7/wo5J0cRBKiNGL9MmwjgG2blPtp9uRynBSLx6J2ume8ui5/vv0bA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796309425; h=DMARC-Filter:DKIM-Signature:Received:Received: X-MS-Exchange-Authentication-Results:Received-SPF:Received:Received: Received:Message-ID:Date:MIME-Version:User-Agent:Subject:To:CC: References:Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy: X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=wOmfX0ziXAL7sD/+j9n6e1r880nrrmekGCMUeXlo5K4=; b=xl/iY1H3psJZYmNLHen/0YhPvywd0P7rQVm93jfhQ9NNaIYIj+e03J+PqtkbC3mEp+Zl gWdBsZiVynr8FcrRGAM430T3/oQPqMmImPe593fpiQfCq2to8SVPc2P7e/2V8DTxle4Om rXvQ1XmVJk0XPfbszzZVJasxd8HxKp5v3MxvIUFVc0VSWpTG2UfHuPukgsQxI+d3SOnHg QsJ7z+PCR8EHwzq5R3bk+aHk9W1upbrY4wA8pcSid1Yo0OMkEA3kCq9FFCawgIudVMWbE At9zjAKa4wVLYUOxjWL2SJUKO2632m9llmHImZ1ONIBFVmHhBS5eFhca7Yok5pOF2+g== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector2 header.b=aHelrCka; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.69.12 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010012.outbound.protection.outlook.com [52.101.69.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9267A606A322; Thu, 3 Dec 2026 14:50:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9267A606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector2 header.b=aHelrCka ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=S+gmr2dqbHLjrIGiGd3m+zVwS2D6Ikv0tHBGy3ji0UH4ZUAlpNgeO/tSveutKwtix9bvznVdN2ZqlRJlsrxSkLnDPxwOlHupalXmTA2ap/7ecjdPTOQTqE/tqEveQ5ItwULMV9BW3jEroJKkCNuUHNvUZs7fPVCr2rG3qDKi2jIPXOCiskqWkrLBtV8cbfTtLyXtgg8zhiv4wiup1v2mHiS+1Po/PexQSiZB8AfNp1RNZhxNtiyLWsCFRfmI7lqKvNlZfCDIt6tdGWs7Oker+/NnrHkmg2mHB1JPMfLgYYtxJ0ad954DckgooiOvUMRqk8rPKGoPExLl1rvmWrbyjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wOmfX0ziXAL7sD/+j9n6e1r880nrrmekGCMUeXlo5K4=; b=TZH2o8WCYe2UfYAEWjs4MfKzmlWEQgHSMC0Y1rfAZnBWqwNI96yV8JoMmK/B42dL7VmmHUURycYui/Xz3keBVpqrvfpCmyXrgIz0OYqcKSVH7QvZAX5lmWzBFLsdgoSsBO53aBZXR3gbzL8jSG8a/QOljRnnY7fAR8Rw/gJ54Gu+6NlHoqk3RX/Aq0y//25/YhSZtfqt4keiTGD6dZuNVPQ360Wq6eASngnlv5HsCfHVgq6/hblhsX5AXbCwqniKxzfXtYqp33rFuaBKgl+z0+LTXQPmPW2FQINXpS687KHOvLslphRDIanD6e3EIM3FNNVYvHT0/pfXINZdNzBeeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 164.130.1.59) smtp.rcpttodomain=posteo.net smtp.mailfrom=foss.st.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=foss.st.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wOmfX0ziXAL7sD/+j9n6e1r880nrrmekGCMUeXlo5K4=; b=aHelrCkavhiceC9gH1wsBlful0xxP07AUVs4bgeWavEhN3FycNeFO7bkmCopqYwV33lb4vK037BHhZ8s+UUjGRVw+m8zvDwBvQikde4+SD2e0pehAed3Bi88Pr9GC+cva0QmVreomro22rQ1gUpn3t1O1o/J/jp+Bumm5TlueGydmZZDtg2IeDOwY1vhht8iUsR/tezPRjkz3305EFyvdUFqYmZ5eFT2VOI2PwlyFLHkxX1NrEbbXuQPdhrD6v2X5wAmLByC36BNPPLmezMIexpQsXKTEnu8nXuRYspyJiUOLM3t6PNfveD4Gce7DXu9BLyXSS9oU0rVskhPRjJMrw== Received: from PA7P264CA0061.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2de::6) by GV2PR10MB9699.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:358::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.709.5; Thu, 3 Dec 2026 14:50:20 +0000 Received: from ZR1PEPF0000E6B6.eurprd07.prod.outlook.com (2603:10a6:102:2de:cafe::a1) by PA7P264CA0061.outlook.office365.com (2603:10a6:102:2de::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.12 via Frontend Transport; Thu, 3 Dec 2026 14:50:20 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=fail (sender IP is 164.130.1.59) smtp.mailfrom=foss.st.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=foss.st.com; Received-SPF: Fail (protection.outlook.com: domain of foss.st.com does not designate 164.130.1.59 as permitted sender) receiver=protection.outlook.com; client-ip=164.130.1.59; helo=smtpO365.st.com; Received: from smtpO365.st.com (164.130.1.59) by ZR1PEPF0000E6B6.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.709.6 via Frontend Transport; Thu, 3 Dec 2026 14:50:19 +0000 Received: from STKDAG1NODE2.st.com (10.75.128.133) by smtpo365.st.com (10.250.44.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Thu, 3 Dec 2026 15:51:26 +0100 Received: from [10.48.86.79] (10.48.86.79) by STKDAG1NODE2.st.com (10.75.128.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Thu, 3 Dec 2026 15:50:18 +0100 Message-ID: Date: Thu, 3 Dec 2026 15:50:18 +0100 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/5] mmc: mmci: stm32: silent data corruption and HS200 fixes To: Mateusz Nowicki , Ulf Hansson , CC: Russell King , Linus Walleij , Yann Gautier , Christophe Kerello , Maxime Coquelin , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , , , , References: <20261104152657.14909-1-mateusz.nowicki@posteo.net> Content-Language: en-US From: Alexandre TORGUE In-Reply-To: <20261104152657.14909-1-mateusz.nowicki@posteo.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: ENXCAS1NODE2.st.com (10.75.128.138) To STKDAG1NODE2.st.com (10.75.128.133) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZR1PEPF0000E6B6:EE_|GV2PR10MB9699:EE_ X-MS-Office365-Filtering-Correlation-Id: fc017506-911b-44d0-2286-08df514cc084 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|82310400026|36860700016|7416014|376014|1800799024|22082099003|18002099003|13003099007|10067099003|56012099006|11063799006|5023799004|261026121527099003|261028144727099003|261021123027099003|261021121427099003|261022105027099003|261102123227099003|261009223027099003|261026140227099003; X-Microsoft-Antispam-Message-Info: qjJgqdoAo2fJmVUUOFND9ZOCNULFIcshKNGjyaIoSVZZAHy7nFILMuEqRKf1vz4wk4S9/Rn0wjI5SUd8CpMCmuvAyVXjFUu6YEFor4n0SMy4YM1h2xfKMIIL43Jo3rMTePcyRPuj/uJjDKvxxDzlxihGoTXcOHeBlem1OaV7FtDUjH61cHVnZS+zHzbQz06GeP4GnWxm6ZxJAztNAOnZSHlJCnTKWEzEfLGiSJP97Ng8yFy2c6fkxx8bJDMUsvu9KV0sfZYDwgsxnjKa6M9IpV7OBNUAQULQscig3eeQ/8aPUItXL9Y87EarDlDVqcWVdYHWb8EYHRKWfqoRygfBBKI8qtX7B2/VzpD9GEiiSQ+QCzcXK/szqdebQURY3rXZAna6F7fE5cjqBm6n1wobty2qZUGr+wrOYk9XiyZTRJA4xoDjQUvFVafwUVKWi4D4GlFZHH+EcbbeP+KllETbrKLZgx7Fd1pTVrEAnIB9tKhd64NnwPTkXNqez/yPO+J8mslLhfT/AZ1rXltTOE9FRyiPSJXMz3H+dHTVq8AB7WsvU1owNNPSNUgn6+lcNogoB9S93B+goQh/PtjpOSSy722XHMAM5gjdvedZSzPgd6y/XsmxDCxPJqNA99X027FRRWhGqRPoXMZA3cloGzu67ONSiCo/GEH93ZmXC67XQu0= X-Forefront-Antispam-Report: CIP:164.130.1.59;CTRY:IT;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:smtpO365.st.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(23010399003)(82310400026)(36860700016)(7416014)(376014)(1800799024)(22082099003)(18002099003)(13003099007)(10067099003)(56012099006)(11063799006)(5023799004)(261026121527099003)(261028144727099003)(261021123027099003)(261021121427099003)(261022105027099003)(261102123227099003)(261009223027099003)(261026140227099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GU/1xY/K77bZBcr7DIJCeUFxXxp/+1zCMGwax848qNS2qsrzR0Bk0enfp+mqL8N/iJm08YvNcaTDCtYmR9hi/VDmgkEilaJZA9of/911XPikshKVYARIPFGT4+hUwT52/4J+7R25aUgpytWLCeoRLdLBA0HCV38W4+ctFCHl0d5NRBqwZgS3yVtIRtXWpW2MYGc0DKrMOf5X3YvS6tbmyhC95kCo8RfUJ6+sK7yWTvUvR9RcAU6A3LOm0IkZ+sXqlvvtnIHq4XW8UCTKvWg0zlIFZjrhj3avbeulvJgpbH3E54AD2XEyhnvvS6+COQujRUH/s4V2xOt3WSe29PK+gQnmau6IZ61rRiAB9v+fWTpxKC19A3xKMIPlgEZOMbZGe2KOLhKLTXGqYRMBFGM+NvqeYu9IxJr5oTKegze8EFN6SEEe4MaOSwdNxXoZqP0E X-OriginatorOrg: foss.st.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2026 14:50:19.8911 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc017506-911b-44d0-2286-08df514cc084 X-MS-Exchange-CrossTenant-Id: 75e027c9-20d5-47d5-b82f-77d7cd041e8f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=75e027c9-20d5-47d5-b82f-77d7cd041e8f;Ip=[164.130.1.59];Helo=[smtpO365.st.com] X-MS-Exchange-CrossTenant-AuthSource: ZR1PEPF0000E6B6.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR10MB9699 Hi Mateusz On 11/4/26 16:27, Mateusz Nowicki wrote: > The eMMC of the STM32MP257F-DK in HS200 returned stale data and lost > writes without any error. Patch 1 makes data CRC errors visible to the > core again. Patches 2 and 3 are the fixes of the ST downstream kernel > for the causes seen on the DK, as Christophe pointed out. Patches 4 and > 5 move the eMMC of the DK back to the sdmmc2 pins_a groups and remove > the pins_b groups I added for it in 7.4: the corruption came from the > delay block, not from the slew rate, and the slower pins avoid > overshoots on the SDMMC2 clock. Patches 1-3 are for the mmc tree, 4 and > 5 for the STM32 device tree, patch 4 needs patch 3. > > Tested on the STM32MP257F-DK with a v7.3-rc6 based kernel with the same > changes, each run writing 832 MiB to the eMMC and reading it back: > > - SDMMC2 kernel clock 200 MHz, HS200 at 100 MHz as in mainline: without > patch 3 the writes failed with I/O errors in all 9 runs (sdmmc2 pins_a > or pins_b, with or without NEGEDGE), with it all 6 runs were correct > (pins_a and pins_b). > - SDMMC2 kernel clock 150 MHz, HS200 at 150 MHz with the delay block: > all 6 runs correct (pins_a and pins_b), the tuning picked the same > phase in all 10 rebinds on each pin group. > > Build tested on v7.4-rc1 (arm64 defconfig, W=1). Not tested on > STM32MP1x. > > Changes in v2: > - Drop "mmc: mmci: stm32: do not use NEGEDGE in HS200 mode". NEGEDGE > has no effect with CLKDIV = 0 and is valid with a divider, I misread > RM0457 (Christophe). The writes at 100 MHz fail because of the delay > block, not NEGEDGE. > - Replace "mmc: mmci: stm32: lock the STM32MP25 delay block again before > tuning" with the same change from the ST downstream kernel, "mmc: mmci: > stm32: release the delay block before enabling it" (Christophe). > - Add "mmc: mmci: stm32: use the delay block above 100 MHz on stm32mp25 > SoC" from the ST downstream kernel (Christophe), with dlyb checked > before reading min_freq from it. > - Add "arm64: dts: st: use sdmmc2 pins_a on stm32mp257f-dk" and > "arm64: dts: st: remove sdmmc2 pins_b from stm32mp25" (Christophe). > - Rebase on v7.4-rc1. > - Link to v1: https://lore.kernel.org/r/20261031120700.42576-1-mateusz.nowicki@posteo.net > > Christophe Kerello (2): > mmc: mmci: stm32: release the delay block before enabling it > mmc: mmci: stm32: use the delay block above 100 MHz on stm32mp25 SoC > > Mateusz Nowicki (3): > mmc: mmci: do not count a data CRC error as a complete transfer > arm64: dts: st: use sdmmc2 pins_a on stm32mp257f-dk > arm64: dts: st: remove sdmmc2 pins_b from stm32mp25 > > arch/arm64/boot/dts/st/stm32mp25-pinctrl.dtsi | 58 ------------------- > arch/arm64/boot/dts/st/stm32mp257f-dk.dts | 4 +- > drivers/mmc/host/mmci.c | 5 +- > drivers/mmc/host/mmci_stm32_sdmmc.c | 28 +++++++-- > 4 files changed, 27 insertions(+), 68 deletions(-) > > > base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 DT patches applied on stm32-next. regards Alex