Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp156111lqs; Thu, 13 Jun 2024 06:46:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWFyvpV5HL109DX2Q7Ghay2+pOjHv3UOs+Sb2dB9BRq919yeqCNCZEV6S3dYvBs9M1M+1Ku4xF3L3mZYcdoR/drpuvQjqfH1u/FksBU/A== X-Google-Smtp-Source: AGHT+IFCvh2D0jIa7OGY+kn13DhkzyBIIobUYNHxzOuLx6PeuzVntFywcKY4GZ8GS/cK4H9Y+0oO X-Received: by 2002:a05:6871:7414:b0:254:963e:cc3f with SMTP id 586e51a60fabf-25514c032d7mr4758568fac.1.1718286417363; Thu, 13 Jun 2024 06:46:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718286416; cv=pass; d=google.com; s=arc-20160816; b=eeUYBaXvC5CfJ4x8r3ug8DsT2V3+wPgJGZwXv+OGI6q4C3JhxKXERX+ZVRNVXR6y2b a2kKC9SZ2uPE5vMi1Uvnb1/ZJJdNrMk1iMw0c5bM24tUMP0TSG9IrKHlVgP4ZZj3h+Tm ACwkDHwOM1OTwCmJUGrYsLmfmrEiV73BNMQ24HnZPPM/1gh71FDfK2DdqFS+OOnaIc1w kSQgW40CNvUJNlj0SD3SeGSN6cxO/G0pWsn+iLDDkvQp0jT2mScr7gbtG1XgCRAh2OlZ zA8S0rVtWYfnG1uiDBpa0/MJqpdGrQQOQtEiMOsQO6TQmwkrXWfBjQq6VRsaS/2Y3IET q54A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+ft2qWe9FHp0/KfAvWloclQeeRysSrANj+OLu1ccaBo=; fh=fEOdCJiiFaXgY8M9UX9c0QZiU39mC+BX+OVFkL52xOg=; b=XLyr0wEDfmjHiAKzjwuXWAeyvBrFRFZ7MJQO6ABoTxqgAuIJU184epIbfeVoOzJNs5 EEipAg2AxluEl3Ue4Rw1MrTqoiCpGI9GE4aXIP0u7kp7jOAQc8pbxRmLH+ZfyLaX9U5v 1oi71vIGLIHgACuo2/8U4Ezy/TlnqT1WkPJ7Bq2DbUJNOfBWZhaesEt36V4sqzwTG00L 2wBY7FiDUuS2lQ90Z2N/QNhr5bfRZmjAHvHRJnU+hTVAXYRtVcTQ7CfMLXZdeRvMWxBQ dxDQkRdIZl5Fdmg++E/jxUJjGxDAsj3rOtlyb3ncUFfUeGFuO0LnxGwVdZnLy2tbIYYz hn/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z0lfE3IM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee67b86c2si1331163a12.831.2024.06.13.06.46.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:46:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z0lfE3IM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213344-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 757F028C963 for ; Thu, 13 Jun 2024 13:41:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 011C5144D16; Thu, 13 Jun 2024 13:40:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z0lfE3IM" 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 274FB1448E5; Thu, 13 Jun 2024 13:40:28 +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=1718286029; cv=none; b=e4//FKztHDopa6z6/ExV5RV6XIU3NBZZKwfye+gT50WaN4CFb15FQOeHE/SiI9jxYRiEOeSvMs22kZV+NwKFKLOkRB/pYyDCpy7FSqojvQlUTv4G4VL8eqo+pBlLM0rCBJTAokHgYIRVfHQys8hRkllFyIcSrwavOhCKZw4tQBQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718286029; c=relaxed/simple; bh=m5QYFdAL+feMVH2MyIxXOPX2B5GR+B9Lzkpomys7T0Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SRZo6axezFolQXOqviyHdbx0+s8O+8tT/DuSlD9gZ3844un2s/WTFtcDWEu0CYpgkBxUhNdZLVatiA72rxLyg+TJF/f/aEIVwV3mXrsW9NgNSKDUoFdwQ2/6TMU/T+T9UmDS4NEHrevPTouGehy8wROIB0yUVTRleVSrxUfK7FE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z0lfE3IM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 755CEC2BBFC; Thu, 13 Jun 2024 13:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718286028; bh=m5QYFdAL+feMVH2MyIxXOPX2B5GR+B9Lzkpomys7T0Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z0lfE3IMyfPRo/fEuZj//DfvwmChfaVwJtt7MWWguxlpXtAP8pfRITgz/TSDtJLxC 99HT8TGmCjrAs5DsXQsKJpcsjZPSePj0Eavv0J3I9uXagFy31pSGRqNVrlhjYaR0kq sAmTmjY07VInHqmOQ5m3vfyvP5eJN+XRPLyN7rhvfdhrYWOx7WYikaNDa+ZbckbCJZ ZjKIWVEamUEVaDmZYoPybFdt6dzXdx3BB4DLFrPUHMXBfFTKbNu3wHFOz5TJo8bhQl tu9JNRbVzmwxOqthBRrGJjgzVwu8cLasXJ2O81OgIJ4FZ1t4H2kDLv3CCdHavOHlya iOHeWAAfYetEQ== Date: Thu, 13 Jun 2024 21:26:37 +0800 From: Jisheng Zhang To: Haylen Chu Cc: Adrian Hunter , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mmc: sdhci-of-dwcmshc: Use inverted-wp quirk for CV18xx and SG200x SoCs Message-ID: References: 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-Disposition: inline In-Reply-To: On Thu, Jun 13, 2024 at 09:15:50PM +0800, Jisheng Zhang wrote: > On Thu, Jun 13, 2024 at 09:03:24PM +0800, Jisheng Zhang wrote: > > On Fri, May 31, 2024 at 02:13:47PM +0000, Haylen Chu wrote: > > > MMC controller integrated in Sophgo CV18xx and SG200x SoCs has an > > > inverted write-protect flag, causing SDCards misdetected as read-only. > > > So set SDHCI_QURIK_INVERTED_WRITE_PROTECT to make write protection work > > > correctly. > > > > No, I would rather set cd-inverted property in dts. > > wp-inverted hmm, if I read the SCH correctly, there's no wp pin at all, so disable-wp is better > > > > > > > Fixes: 017199c2849c ("mmc: sdhci-of-dwcmshc: Add support for Sophgo CV1800B and SG2002") > > > Signed-off-by: Haylen Chu > > > --- > > > drivers/mmc/host/sdhci-of-dwcmshc.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c > > > index 39edf04fedcf..62b7f28de54f 100644 > > > --- a/drivers/mmc/host/sdhci-of-dwcmshc.c > > > +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c > > > @@ -962,7 +962,8 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_th1520_pdata = { > > > > > > static const struct sdhci_pltfm_data sdhci_dwcmshc_cv18xx_pdata = { > > > .ops = &sdhci_dwcmshc_cv18xx_ops, > > > - .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, > > > + .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | > > > + SDHCI_QUIRK_INVERTED_WRITE_PROTECT, > > > .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, > > > }; > > > > > > -- > > > 2.45.1 > > >