From nobody Mon Dec 15 23:36:16 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 3EFFE3271F8; Mon, 15 Dec 2025 12:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800030; cv=none; b=mqUpn0bVS4AOizxDU7wg5oOJV+dq6auyU81OgSnoGW6WYX5GdlhmUDH10Gwp45Rho6B6Ar0hIgVZGBZsGIJ8vteiUML0HGiCLHv/k3B3ShMbfsbEdV0ZRBEE9QgbFa0DgiDYP9eoAwdZ/wGWHQH4hOth8fz35wvbBbPlZlhoJc0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800030; c=relaxed/simple; bh=k0tbjB2UMIH2CUOVcg0ZdBs1HGpAqF+RzYZ1Xd7fras=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K0pepT2a28OhoTIxulab7PUlrywNiDd2s8jGkiPNqm1hx1ywwcLj0+LO/EtYVn8FyIhamo5YKxdHHWzF3hsP/QHncI5kYasXYXdTI/DJcMyq+loK/pG+m9jGUar19rWZYF3nZri0EEkhkmQmvhJpsDMVpi8C5EqN4w8e+Y/qDiU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=cD/R/DES; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="cD/R/DES" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BFAOB8r3698095; Mon, 15 Dec 2025 12:00:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=nlCZVGg2oKl f5/i0EJK6cBO0sHaOFSxWAM0XP4tym2g=; b=cD/R/DESN8dbA+J4OfvwA7tbEd7 c6CNMFs2SV5gO4P71kS8it86GuIrOHwpAGLw7k6nXGAQISIUPuNsDyXkDrBt3zTt fms7P9Vrixur0u141v5OsnnUbBTig0UJ6GQZrkWY7GR5PDneACbJTXo+h5Hvd5c+ 0IJebq/ic1Vkzs3smSEfDOD83E+tRUgDA9xk+gUOhN+hf+wnjzxQxDtoOL6Hy/Xn RxJPxU6fgJA2Y7IQrKN085F7WyMuPpGiFTKt5AHy6oIQ9X7jptkUqCvT5YYbDA5n IBPL0oN1OcHF12QFseoxQ0/QWiIXfPc+AfriJ7wW3qTNda3KeXAPDXOe1Iw== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b11afcf3a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:21 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 5BFC0IDw029053; Mon, 15 Dec 2025 12:00:18 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4b117kxe1x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:18 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 5BFC0HT6029045; Mon, 15 Dec 2025 12:00:17 GMT Received: from hu-devc-hyd-u22-c.qualcomm.com (hu-rampraka-hyd.qualcomm.com [10.147.247.88]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 5BFC0HYk029044 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:17 +0000 Received: by hu-devc-hyd-u22-c.qualcomm.com (Postfix, from userid 2305851) id 912C45CE; Mon, 15 Dec 2025 17:30:16 +0530 (+0530) From: Ram Prakash Gupta To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Adrian Hunter Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, quic_rampraka@quicinc.com, quic_pragalla@quicinc.com, quic_sayalil@quicinc.com, quic_nitirawa@quicinc.com, quic_bhaskarv@quicinc.com, kernel@oss.qualcomm.com, Sachin Gupta Subject: [PATCH v6 1/5] dt-bindings: mmc: Add dll-presets values for HS400 and HS200 modes Date: Mon, 15 Dec 2025 17:30:05 +0530 Message-Id: <20251215120009.3877889-2-quic_rampraka@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251215120009.3877889-1-quic_rampraka@quicinc.com> References: <20251215120009.3877889-1-quic_rampraka@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Authority-Analysis: v=2.4 cv=TtDrRTXh c=1 sm=1 tr=0 ts=693ff856 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=COk6AnOGAAAA:8 a=xWJhKr_AvhuFiuhVdFkA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE1MDEwNCBTYWx0ZWRfX+VJd/3FQoY8v wZke8LuvmfwuV3gPLpYaClvpei894g1uZpsILPAKAiZtZ8oQGtcChH2VtYGgdPk2FOgOZW9WkDn lixC60nohlgT64eoWIpQ3O5pK05uwdODz+x8+RiY1akTTWy+oEjCn6OfVqYra1Q/tkWftx10mQu Kw6rcynIX2dW7XhyJXTvra/BLI553/Z0wi+MpKAdv+1kyTN8sJKHO9YexvKEYCVqoqpDuZAplAy ZnByJDdEw9bO1slj79SZFEbjYYOjOh9d7NFXATKAtv/UwNTqLDP37JgzQizSy6igG/c8uP+Zds3 I6TVydP7UHrzfM8t2ksGmSY79DEpK9iTJHpVgsxInELUwTYrSkOqb33KgxSNMauCF/C8HrrNJ7n 0SZBM/aMD79v9rXcrD/00vQys4v9SA== X-Proofpoint-GUID: n7quUXZqolJpgv3QgBWlpKG5qcYb44IJ X-Proofpoint-ORIG-GUID: n7quUXZqolJpgv3QgBWlpKG5qcYb44IJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-15_02,2025-12-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1011 priorityscore=1501 bulkscore=0 adultscore=0 impostorscore=0 malwarescore=0 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512150104 Content-Type: text/plain; charset="utf-8" From: Sachin Gupta Document the 'dll-presets' property for MMC device tree bindings. The 'dll-presets' property defines the DLL configurations for HS400 and HS200 modes. QC SoCs can have 0 to 4 SDHCI instances, and each one may need different tuning. Signed-off-by: Sachin Gupta Signed-off-by: Ram Prakash Gupta --- Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml b/Documen= tation/devicetree/bindings/mmc/sdhci-msm.yaml index 938be8228d66..a1a16e6e12ce 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml @@ -140,6 +140,11 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 description: platform specific settings for DLL_CONFIG reg. =20 + qcom,dll-presets: + maxItems: 10 + $ref: /schemas/types.yaml#/definitions/uint32-array + description: platform specific settings for DLL registers. + iommus: minItems: 1 maxItems: 8 --=20 2.34.1 From nobody Mon Dec 15 23:36:16 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 C3AAA32AAC2; Mon, 15 Dec 2025 12:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800031; cv=none; b=setc1IgaviM/OD4Dq4YhiOxw39kWRq96tLqgyPvfJv2O123p1yrEwktMPZ/6DVEeQscapxYArhqGghM0krmJWQYOIZKt3Fxk1RhewL2YL/lZN5q2Tnb9vulJ1yiGiIRYGolY7+VUnuvqzmViMmYbJtmTYEEdTHAaEOYC+8AOMRk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800031; c=relaxed/simple; bh=s5L0D44I9/qrsJ6pTD90a9Fa9vxlhjdd9ltWfH6WNQA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cb+iDrYKG38hMZmj896UmIwVbJxL9GDxS5i+YPF/yOgVQDgbrBKvxDlNpBuFF3tFErPyg5PMT9MQAJfp+lNcPp9G1ERKeOtyI666sJBg+rfw2LvVMuNcuduvItMnZuQua0xbi/gPAWWI+TK3SS1cYbUZZO6f2XqnYL5ueMSjkaI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Qzq+QCqm; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Qzq+QCqm" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BFAOAl23698008; Mon, 15 Dec 2025 12:00:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=LkzRN15bfrz FupZb26I6dPUWuor67Rt4ThUnhR53EF0=; b=Qzq+QCqm35UebC0dBV/QMdrD9mq SAZj7wfjBuArI3q7zGN3x7HIlzCMLGOvkTNqeZ/68laHDOappZWH32OD96W39ZEL /ZDz6e8DxSLm2eyCL6l1pzUWH+fl62/lOSCkmZnblhj3650FUH/mb9024GOz2oxP yrfUapkMlYInJjuZzLh/at/8Hc09LeWnQxQ9+HuAzTZ+XkL+LRwcA0CpDpCGA7yQ koNpA421xtXn/6HJiedFOmEJZpmVq1GD6DGGb03k8l6iA/MZ9g+jZ4aNr9nEMypN mF72WedkPH9bfsFdxczcL3nOev2Hhhi34AMAOwU+q6tO/GsFb65ycIlfmQg== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b11afcf3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:22 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 5BFC0Jsn029071; Mon, 15 Dec 2025 12:00:19 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4b117kxe26-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:19 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 5BFC0JWH029064; Mon, 15 Dec 2025 12:00:19 GMT Received: from hu-devc-hyd-u22-c.qualcomm.com (hu-rampraka-hyd.qualcomm.com [10.147.247.88]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 5BFC0IBQ029061 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:19 +0000 Received: by hu-devc-hyd-u22-c.qualcomm.com (Postfix, from userid 2305851) id AEB315D6; Mon, 15 Dec 2025 17:30:17 +0530 (+0530) From: Ram Prakash Gupta To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Adrian Hunter Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, quic_rampraka@quicinc.com, quic_pragalla@quicinc.com, quic_sayalil@quicinc.com, quic_nitirawa@quicinc.com, quic_bhaskarv@quicinc.com, kernel@oss.qualcomm.com Subject: [PATCH v6 2/5] arm64: dts: qcom: Add sdhc dll-presets Date: Mon, 15 Dec 2025 17:30:06 +0530 Message-Id: <20251215120009.3877889-3-quic_rampraka@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251215120009.3877889-1-quic_rampraka@quicinc.com> References: <20251215120009.3877889-1-quic_rampraka@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Authority-Analysis: v=2.4 cv=TtDrRTXh c=1 sm=1 tr=0 ts=693ff857 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=COk6AnOGAAAA:8 a=LY8UskAvO7GVwCLl8fAA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE1MDEwNCBTYWx0ZWRfX7llbMFJP6amE 6HO77eevDD1WNWZVLt/qzAUBF7EhtSKOU2AJXnw/GSpYW8Ndz8U09SXSvzYUCqeu89FRJljuiWg ObW89EVXh9X06x9EtKSgjkwba1REim9YslitDaqMstkckUbz1vUkpyVWQ14HZy8bWhSwbFd6/yo GkytGgEDBWx02ygn6IjM/CXp03r6FVkn/g5V97wPHWZlJP/WS3rcxYeKkC3yL+ulY6fx66TfUgQ AgNKlZ9IEykAp5jqh+PYIja3Li8TKDZ8okk0qfc064LTevzFaSCvnniJBILkVTy/bBVVKJUoQyJ 8026jMnNxq6ZfFj9Ul22P5lxb+btaF3lFtlKZsgVrSC66nJteQPkoNb2v92FdnUGS8szLONIrBr kuKdzZJ0S04o4BSlS+SKfd9DAxVeYw== X-Proofpoint-GUID: _uQKtiD927rn3ABRp56Ym7ihdGjXZ_8v X-Proofpoint-ORIG-GUID: _uQKtiD927rn3ABRp56Ym7ihdGjXZ_8v X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-15_02,2025-12-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1011 priorityscore=1501 bulkscore=0 adultscore=0 impostorscore=0 malwarescore=0 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512150104 Content-Type: text/plain; charset="utf-8" Add sdhc dll-presets for qdu1000 target. Signed-off-by: Ram Prakash Gupta --- arch/arm64/boot/dts/qcom/qdu1000.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qdu1000.dtsi b/arch/arm64/boot/dts/qc= om/qdu1000.dtsi index 846e5e5899aa..bc31504d5c8c 100644 --- a/arch/arm64/boot/dts/qcom/qdu1000.dtsi +++ b/arch/arm64/boot/dts/qcom/qdu1000.dtsi @@ -912,8 +912,8 @@ sdhc: mmc@8804000 { =20 bus-width =3D <8>; =20 - qcom,dll-config =3D <0x0007642c>; - qcom,ddr-config =3D <0x80040868>; + qcom,dll-presets =3D <0x000F64EC 0x0 0x01 0x2C010800 0x80040868>, + <0x0007642C 0x0 0x10 0x2C010800 0x80040868>; =20 status =3D "disabled"; =20 --=20 2.34.1 From nobody Mon Dec 15 23:36:16 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 778843271F8; Mon, 15 Dec 2025 12:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800039; cv=none; b=ZoIq+8ecima3FuQWXEz/9W69DcsRDUqZsG2lyGGVg4DDDEV65W/RQcY6ULXKrBTY1OqXcnzJxhzlEEiENFPJIi3pq5BYyw8OgR1cVQGb5q8buBTlhPrSTNR1yDepjH5FTWHQnc7rQr/5D6fmzgCQ7m0MXerYamYBVSlLiIt5hwc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800039; c=relaxed/simple; bh=OrjGeSOF4tJANnwof0E3DBY2Ek1qOK+zQvqIeGSWIw8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=juQa3pvZmMpsi7hdwJenEQ6qyGBSzXlhEDwtxJAD5dvPT/o2LQuzVqiCFHpG51DjLgcbIWGkE0wyG0bc7PaWbVFed6SDjyTRN/yfmfTVleIae31Vnds34/gsLK8ou/D/SXXK+98mv2oNIp7sTPyypL0zbhSAmroVVqhIU8tVZZc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=iwKo7rCM; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="iwKo7rCM" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BFAO2Nd314783; Mon, 15 Dec 2025 12:00:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=TBCbk4zBGLh oWKOMGJNe+JgFauS+OLZDrrrt6URdzbY=; b=iwKo7rCMrTFykwo0K/dER8bLDEU KvBqYP4bwf48DkbTEAeOjJsvt2cYYhSm2IKZLYg7mHhSxAWJkxDuUt0sfY0qhdWb y+80yqfd3H4TD7MTPtvIqKCpdDt6nKNnbJ+L029OzhiGHHYRkdtp/EAAu8J919yE zdSdSTiJldMQ1IeK8QGI1kw9Qu5B59nCOFt/lbhmMz99WqgtzRvtLduyZA340fXL oZvxFsYWpRQkzw5xgTsXo8ShJn8JbNhcGdAg23EyPz/jsivT8QcxAnI8VFHk0+TV dHvv0STO+rJdLjxzzcVpozQgwfBihp+fQrO5ewzsZ1fC+rymGg6SyK2OWEw== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b119amcx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:32 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 5BFC0GBg029034; Mon, 15 Dec 2025 12:00:29 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4b117kxe35-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:29 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 5BFC0SOJ029114; Mon, 15 Dec 2025 12:00:28 GMT Received: from hu-devc-hyd-u22-c.qualcomm.com (hu-rampraka-hyd.qualcomm.com [10.147.247.88]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 5BFC0SWu029112 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:28 +0000 Received: by hu-devc-hyd-u22-c.qualcomm.com (Postfix, from userid 2305851) id 683AE5CE; Mon, 15 Dec 2025 17:30:27 +0530 (+0530) From: Ram Prakash Gupta To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Adrian Hunter Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, quic_rampraka@quicinc.com, quic_pragalla@quicinc.com, quic_sayalil@quicinc.com, quic_nitirawa@quicinc.com, quic_bhaskarv@quicinc.com, kernel@oss.qualcomm.com, Sachin Gupta Subject: [PATCH v6 3/5] mmc: sdhci-msm: Add core_major, minor to msm_host structure Date: Mon, 15 Dec 2025 17:30:07 +0530 Message-Id: <20251215120009.3877889-4-quic_rampraka@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251215120009.3877889-1-quic_rampraka@quicinc.com> References: <20251215120009.3877889-1-quic_rampraka@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Authority-Analysis: v=2.4 cv=ftPRpV4f c=1 sm=1 tr=0 ts=693ff861 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=COk6AnOGAAAA:8 a=PK7NwhktG5IhTMEw4kUA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE1MDEwNCBTYWx0ZWRfXyXIj9ahFw2Lg xK8onwd4d2rmkNdQ0t8vNrM6DL/Iqeqm0NwUpBLWKBDdo/AEVSnD/bk/9SZblEaDiSloUIcY/Jz k40I730+GIPFgm9ACY3Gh93gHwfxJuEMDyctfmmS+NXt1IloS/SRniB7toi5izk7+U/7aUCeReh /7eZjuwpDLgLuuygeo91HlAl/JVGSH3mouVyRQmyTnc35Ordx8s82HyCQPxKkZlxdJr7d9XQ63/ LDLV9gFloTQvtAjI61yN9kBmDv23SyEFNPVC0qKfldnj6WZnMTXZwjA26/p2pdb7n1FG0MVYhF5 foxDhEOuJey8ljWzxUaMEaBVqQRLDbQnoGC5+Saoax80ozYmOFb3hkdmK8YP6jXbuVokGt3qYDp xaGAInPkcVB2B4bsH2/H+Q8m5s6nkg== X-Proofpoint-ORIG-GUID: EYL8iVHAPsHA_-jWt74rpmQ13tPIjX_S X-Proofpoint-GUID: EYL8iVHAPsHA_-jWt74rpmQ13tPIjX_S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-15_02,2025-12-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 spamscore=0 suspectscore=0 phishscore=0 clxscore=1015 bulkscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512150104 Content-Type: text/plain; charset="utf-8" From: Sachin Gupta Add the core_major and core_minor variables to the msm_host structure, allowing these variables to be accessed more easily throughout the msm_host context. This update is necessary for an upcoming follow-up patch. Signed-off-by: Sachin Gupta Signed-off-by: Ram Prakash Gupta --- drivers/mmc/host/sdhci-msm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 3b85233131b3..dc79f828522b 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -283,6 +283,8 @@ struct sdhci_msm_host { bool tuning_done; bool calibration_done; u8 saved_tuning_phase; + u8 core_major; + u16 core_minor; bool use_cdclp533; u32 curr_pwr_state; u32 curr_io_level; @@ -2691,6 +2693,10 @@ static int sdhci_msm_probe(struct platform_device *p= dev) core_major =3D (core_version & CORE_VERSION_MAJOR_MASK) >> CORE_VERSION_MAJOR_SHIFT; core_minor =3D core_version & CORE_VERSION_MINOR_MASK; + + msm_host->core_major =3D core_major; + msm_host->core_minor =3D core_minor; + dev_dbg(&pdev->dev, "MCI Version: 0x%08x, major: 0x%04x, minor: 0x%02x\n", core_version, core_major, core_minor); =20 --=20 2.34.1 From nobody Mon Dec 15 23:36:16 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 4F6B232F74F; Mon, 15 Dec 2025 12:00:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800038; cv=none; b=ADLWFp66DbXoEfad8WqxiMdfUWSsG0FhIgfhc0Avox2V3JqzIBkSfwdRdnB4hNSUewbhWXIOQutuvADbz72SPM//xXFuJgmSedwIOw1iWfhTozbPY5IHOTyGFKvOZQBc6eJRkP6WVvc8pHpdO29dLNXy7LLQnxSjfGaDgXEW+Gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800038; c=relaxed/simple; bh=5qCRSUjAO06fYx6lL7lpWK2WxN7JxKbdFFz+jca7bwQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gp9g7qimAiN0zAJUKuWczWclRDz/wWAJ0YbEGdG30Z7GYjU8p770+JO+rRtg4u7FgcWmgc+aHpUp8tDOQml17I5LyCoq/EBaDvc1+sr4XiB4PtVvIijIjrPIGMJAbzN9BtC1obPUPBjdBkbysg8vkZUBjUqTrRQXIKZYlZFQvQU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=UUW8Oref; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="UUW8Oref" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BFANrB9136457; Mon, 15 Dec 2025 12:00:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Mu3crfOmcqd u3Uvn8DStIF+9uk9zlDZw2cXqKD78TRM=; b=UUW8Orefe0lkvfV6tMCnkNTrMjz jjqbqIkn1gQ/q9T08IBuFqxDmMZve+RKSVIU66HM/elbMaHaKOng6qrxSHFJUWde diIqn50VeOrQX36oEsFQR+JXHOg4E+fsln0tqx/KjJektZsYcRuEuHem+6eBoMQu dHGD2V50A+oKXhwKDY9uVSW2GwgBsc9npK63Hx0ECtQJM4E49o/nU/EGpsJDUREl dviPc7ysjnyZlFRtoAvoJ+KvFwPp+UcyglAJulBtLs66+7YbZB8+XdFdyZbzCvQw PInavvRIytFjQG6Sj0gOrqJAH8yK/kqr27RE7UToAF5/mX5Cm5SfaTpSamw== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b11c6mfuu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:33 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 5BFC0TXD029131; Mon, 15 Dec 2025 12:00:29 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4b117kxe3a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:29 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 5BFC0TVQ029126; Mon, 15 Dec 2025 12:00:29 GMT Received: from hu-devc-hyd-u22-c.qualcomm.com (hu-rampraka-hyd.qualcomm.com [10.147.247.88]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 5BFC0SmS029119 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:29 +0000 Received: by hu-devc-hyd-u22-c.qualcomm.com (Postfix, from userid 2305851) id 1F9895D6; Mon, 15 Dec 2025 17:30:28 +0530 (+0530) From: Ram Prakash Gupta To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Adrian Hunter Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, quic_rampraka@quicinc.com, quic_pragalla@quicinc.com, quic_sayalil@quicinc.com, quic_nitirawa@quicinc.com, quic_bhaskarv@quicinc.com, kernel@oss.qualcomm.com, Sachin Gupta Subject: [PATCH v6 4/5] mmc: sdhci-msm: Add Device tree parsing logic for DLL settings Date: Mon, 15 Dec 2025 17:30:08 +0530 Message-Id: <20251215120009.3877889-5-quic_rampraka@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251215120009.3877889-1-quic_rampraka@quicinc.com> References: <20251215120009.3877889-1-quic_rampraka@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Authority-Analysis: v=2.4 cv=actsXBot c=1 sm=1 tr=0 ts=693ff862 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=COk6AnOGAAAA:8 a=ofWALSsdreNL5dRjaDMA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: ZI9rN5u8boiT6vOpev2JMVH9oQMpDpUZ X-Proofpoint-GUID: ZI9rN5u8boiT6vOpev2JMVH9oQMpDpUZ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE1MDEwNCBTYWx0ZWRfX8/t8AEqpAos0 jDy8Yj3yP4gN+3e0f0fILSiRCUiKMXTenLJHPxN93aioSw9kv11/OcBWGX40USpZsVw94G4dFZ+ UOmFxiJ/c0CV/6MzzAd9whG7ifG5c0PiiXq4da9X6fxJdY3EZnMH09oVEh6YTc8+K4JRxkN3iON 5fFtWTC5RcWoF++BMqJcXthHDaH/tj+4YEDKkwRvMteHWOvxgDywehKFIdwh5peuqd9sGsQK3/M DAatwg5oy6bFQ2jI9oYtjAqD/2HUnE4F0XStlvgAyETkAmwPxi1kQ/Ig3/0lLz87SJwk6/AKzYD ZGs1SUCwHswkotNSkSANpX+ggHNcL5krga+C/VYeNhOQ5tnk3JF1DcdzSx6feTR+mHRjsp+9JC3 +pC5j7e9wOKa3aUQ8vgo3oNzJiUQCQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-15_02,2025-12-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 spamscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512150104 Content-Type: text/plain; charset="utf-8" From: Sachin Gupta This update introduces the capability to configure HS200 and HS400 DLL settings via the device tree and parsing it. Signed-off-by: Sachin Gupta Signed-off-by: Ram Prakash Gupta --- drivers/mmc/host/sdhci-msm.c | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index dc79f828522b..1fcd92158bee 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -266,6 +266,19 @@ struct sdhci_msm_variant_info { const struct sdhci_msm_offset *offset; }; =20 +/* + * DLL registers which needs be programmed with HSR settings. + * Add any new register only at the end and don't change the + * sequence. + */ +struct sdhci_msm_dll { + u32 dll_config; + u32 dll_config_2; + u32 dll_config_3; + u32 dll_usr_ctl; + u32 ddr_config; +}; + struct sdhci_msm_host { struct platform_device *pdev; void __iomem *core_mem; /* MSM SDCC mapped address */ @@ -274,6 +287,7 @@ struct sdhci_msm_host { struct clk *xo_clk; /* TCXO clk needed for FLL feature of cm_dll*/ /* core, iface, cal and sleep clocks */ struct clk_bulk_data bulk_clks[4]; + struct sdhci_msm_dll dll[2]; #ifdef CONFIG_MMC_CRYPTO struct qcom_ice *ice; #endif @@ -302,6 +316,7 @@ struct sdhci_msm_host { u32 dll_config; u32 ddr_config; bool vqmmc_enabled; + bool artanis_dll; }; =20 static const struct sdhci_msm_offset *sdhci_priv_msm_offset(struct sdhci_h= ost *host) @@ -2534,6 +2549,23 @@ static int sdhci_msm_gcc_reset(struct device *dev, s= truct sdhci_host *host) return ret; } =20 +#define DLL_SIZE 10 +static int sdhci_msm_dt_parse_dll_info(struct device *dev, struct sdhci_ms= m_host *msm_host) +{ + u32 *dll_table =3D &msm_host->dll[0].dll_config; + int ret; + + msm_host->artanis_dll =3D false; + + ret =3D of_property_read_variable_u32_array(dev->of_node, + "qcom,dll-presets", + dll_table, DLL_SIZE, DLL_SIZE); + if (ret =3D=3D DLL_SIZE) + msm_host->artanis_dll =3D true; + + return ret; +} + static int sdhci_msm_probe(struct platform_device *pdev) { struct sdhci_host *host; @@ -2580,6 +2612,15 @@ static int sdhci_msm_probe(struct platform_device *p= dev) =20 msm_host->saved_tuning_phase =3D INVALID_TUNING_PHASE; =20 + /* + * Parse HSR dll only when property is present in DT. + */ + ret =3D sdhci_msm_dt_parse_dll_info(&pdev->dev, msm_host); + if (ret =3D=3D -ENODATA || ret =3D=3D -EOVERFLOW) { + dev_err(&pdev->dev, "Bad DLL in dt (%d)\n", ret); + return ret; + } + ret =3D sdhci_msm_gcc_reset(&pdev->dev, host); if (ret) return ret; --=20 2.34.1 From nobody Mon Dec 15 23:36:16 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 D0D09330314; Mon, 15 Dec 2025 12:00:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800041; cv=none; b=aqtkBFx4kOHqnnMYKE8q59Ey/oOmTjYuZzjmLnsM+H3lCrBtz4TFrOCS2IcUMtHmkaU2clZkxSBFuH58DDvSRi6qdKLv0fXPTJRoXFUXtK4N6jF2QLzIwmRAbqaNpM8XopD6HiBsiEFONcyznkXEPSh/WpaECHncHbcLkJMfInM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765800041; c=relaxed/simple; bh=iXhMw37ihWXCwsmhdX1Af9gm8ztmMWkU3Hxnia6ma6s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Oq9NV39UTZY+8hrw76LVwzX/Mj4B8l7TobevxAfx6mGv7/YnH3Sdrb7Ga/1MTxqZklVtoHoTSiAie6NDjHReJbrD03xB7LPFh9fpww3zLPxTystERRj/krMxfhdfI8qiaV7U0fCwVPBcoK42Ep1yoHeKlZgtUldIf+UOQjz9pNM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=YPs2D5G0; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="YPs2D5G0" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BFB2itv4002967; Mon, 15 Dec 2025 12:00:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=rFCIbfdt26e o1m3o5i+NfGsxU5xPPvxzu6PAdS8nMwo=; b=YPs2D5G0kCtBU6MrLQ3sjxmxNH+ ESho3Pxpkl2504NhwR7yeUnkNL28N3O7H6Ok9qqOP1WGStZzL+FILqjmzGD3+wc1 2n6iwzZezvlLLHodmfp5cRgcG2+frBZWvNh5tkPM8kClVTV6RCJu1+X9f0X8s2mB iyF/SFIE/TjyNJnTVj4qdaWLnPNc1g4Qym2qJjW0qEY4OOWUdDu0KHvzb8CDP5mj 0i52B1Y8OVE06Wgppy3NBwg175p9hTMEIreFbxdg3EByo9ATi66rudmrSGo/ofFx FG74WRNcqotRf1Fvy+/2/9KwQaaNfKamQs34O66aUfgpyCdP/GMqUAmD+mQ== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b2h44g4pj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:35 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 5BFC0Jsp029071; Mon, 15 Dec 2025 12:00:30 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4b117kxe3e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:30 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 5BFC0UgH029137; Mon, 15 Dec 2025 12:00:30 GMT Received: from hu-devc-hyd-u22-c.qualcomm.com (hu-rampraka-hyd.qualcomm.com [10.147.247.88]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 5BFC0TAs029136 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Dec 2025 12:00:30 +0000 Received: by hu-devc-hyd-u22-c.qualcomm.com (Postfix, from userid 2305851) id B87B65D7; Mon, 15 Dec 2025 17:30:28 +0530 (+0530) From: Ram Prakash Gupta To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Adrian Hunter Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, quic_rampraka@quicinc.com, quic_pragalla@quicinc.com, quic_sayalil@quicinc.com, quic_nitirawa@quicinc.com, quic_bhaskarv@quicinc.com, kernel@oss.qualcomm.com, Sachin Gupta Subject: [PATCH v6 5/5] mmc: sdhci-msm: Rectify DLL programming sequence for SDCC Date: Mon, 15 Dec 2025 17:30:09 +0530 Message-Id: <20251215120009.3877889-6-quic_rampraka@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251215120009.3877889-1-quic_rampraka@quicinc.com> References: <20251215120009.3877889-1-quic_rampraka@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: PxCVu2485kPBIx9hv1fShpM7Ok0XIzRT X-Proofpoint-ORIG-GUID: PxCVu2485kPBIx9hv1fShpM7Ok0XIzRT X-Authority-Analysis: v=2.4 cv=G9cR0tk5 c=1 sm=1 tr=0 ts=693ff863 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=wP3pNCr1ah4A:10 a=VkNPw1HP01LnGYTKEx00:22 a=COk6AnOGAAAA:8 a=u9bmkiIFCt68AObFJ30A:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE1MDEwNCBTYWx0ZWRfX4/SgJVMlgdjE cs1757X/rEhyijzcB0Crr+LSdXyxbGE9Ed95n0y+0EYJnaXOZgup85/zBhKIQKzHk8k4N7Je/Uo E/nSH+jwYl/suH52QZyXkUXogxQTAFHu8lMpI0ijAcV1WI3peaFodsnUviPpfOogMlczMRapp2A Z9l/SE8xFsjWVn1fXKJYGVcSWPueVEbkjuxNq525OEMioKoupg9rde6Eivn6eiB/lGY2r/yu8HW /LL11+jks784nr94Ru6Hu1ZxOG4BXS1Nasn8nycpr0trpFaH3qY9Cf4sWn+TciYW446S1FNpO3r aplJMx8SBpmxbCLF962oTHHDTV8scCeyDDRYeIJA4FLNZVfTFHNZaO6dvU4wMO+e4Mlo0WEQ0aS hFWuHQEj34Rq/dO8tq7iB8H0ObKO8w== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-15_02,2025-12-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 impostorscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512150104 Content-Type: text/plain; charset="utf-8" From: Sachin Gupta With the current DLL sequence stability issues for data transfer seen in HS400 and HS200 modes. "mmc0: cqhci: error IRQ status: 0x00000000 cmd error -84 data error 0" Rectify the DLL programming sequence as per latest hardware programming guide Signed-off-by: Sachin Gupta Signed-off-by: Ram Prakash Gupta --- drivers/mmc/host/sdhci-msm.c | 277 ++++++++++++++++++++++++++++++++--- 1 file changed, 260 insertions(+), 17 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 1fcd92158bee..f459b40db41c 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -28,6 +28,7 @@ #define CORE_VERSION_MAJOR_SHIFT 28 #define CORE_VERSION_MAJOR_MASK (0xf << CORE_VERSION_MAJOR_SHIFT) #define CORE_VERSION_MINOR_MASK 0xff +#define SDHCI_MSM_MIN_V_7FF 0x6e =20 #define CORE_MCI_GENERICS 0x70 #define SWITCHABLE_SIGNALING_VOLTAGE BIT(29) @@ -119,7 +120,8 @@ #define CORE_PWRSAVE_DLL BIT(3) =20 #define DDR_CONFIG_POR_VAL 0x80040873 - +#define DLL_CONFIG_3_POR_VAL 0x10 +#define TCXO_FREQ 19200000 =20 #define INVALID_TUNING_PHASE -1 #define SDHCI_MSM_MIN_CLOCK 400000 @@ -319,6 +321,15 @@ struct sdhci_msm_host { bool artanis_dll; }; =20 +enum dll_init_context { + DLL_INIT_NORMAL, +}; + +enum mode { + HS400, // equivalent to SDR104 mode for DLL. + HS200, // equivalent to SDR50 mode for DLL. +}; + static const struct sdhci_msm_offset *sdhci_priv_msm_offset(struct sdhci_h= ost *host) { struct sdhci_pltfm_host *pltfm_host =3D sdhci_priv(host); @@ -805,6 +816,207 @@ static int msm_init_cm_dll(struct sdhci_host *host) return 0; } =20 +static unsigned int sdhci_msm_get_min_clock(struct sdhci_host *host) +{ + return SDHCI_MSM_MIN_CLOCK; +} + +static unsigned int sdhci_msm_get_clk_rate(struct sdhci_host *host, u32 re= q_clk) +{ + struct sdhci_pltfm_host *pltfm_host =3D sdhci_priv(host); + struct sdhci_msm_host *msm_host =3D sdhci_pltfm_priv(pltfm_host); + struct clk *core_clk =3D msm_host->bulk_clks[0].clk; + struct mmc_ios ios =3D host->mmc->ios; + unsigned int sup_clk; + + if (req_clk < sdhci_msm_get_min_clock(host)) + return sdhci_msm_get_min_clock(host); + + sup_clk =3D clk_get_rate(core_clk); + + if (ios.timing =3D=3D MMC_TIMING_MMC_HS400 || + host->flags & SDHCI_HS400_TUNING) + sup_clk =3D sup_clk / 2; + + return sup_clk; +} + +/* Initialize the DLL (Programmable Delay Line) */ +static int sdhci_msm_configure_dll(struct sdhci_host *host, enum dll_init_= context + init_context, enum mode index) +{ + struct sdhci_pltfm_host *pltfm_host =3D sdhci_priv(host); + struct sdhci_msm_host *msm_host =3D sdhci_pltfm_priv(pltfm_host); + const struct sdhci_msm_offset *msm_offset =3D msm_host->offset; + struct mmc_host *mmc =3D host->mmc; + u32 ddr_cfg_offset, core_vendor_spec, config; + void __iomem *ioaddr =3D host->ioaddr; + unsigned long flags, dll_clock; + int rc =3D 0; + u32 dll_lock; + + dll_clock =3D sdhci_msm_get_clk_rate(host, host->clock); + spin_lock_irqsave(&host->lock, flags); + + core_vendor_spec =3D readl_relaxed(ioaddr + msm_offset->core_vendor_spec); + + /* + * Always disable PWRSAVE during the DLL power + * up regardless of its current setting. + */ + core_vendor_spec &=3D ~CORE_CLK_PWRSAVE; + writel_relaxed(core_vendor_spec, ioaddr + msm_offset->core_vendor_spec); + + if (msm_host->use_14lpp_dll_reset) { + /* Disable CK_OUT */ + config =3D readl_relaxed(ioaddr + msm_offset->core_dll_config); + config &=3D ~CORE_CK_OUT_EN; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + + /* Disable the DLL clock */ + config =3D readl_relaxed(ioaddr + msm_offset->core_dll_config_2); + config |=3D CORE_DLL_CLOCK_DISABLE; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config_2); + } + + /* + * Write 1 to DLL_RST bit of DLL_CONFIG register + * and Write 1 to DLL_PDN bit of DLL_CONFIG register. + */ + config =3D readl_relaxed(ioaddr + msm_offset->core_dll_config); + config |=3D (CORE_DLL_RST | CORE_DLL_PDN); + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + + /* + * Configure DLL_CONFIG_3 and USER_CTRL + * (Only applicable for 7FF projects). + */ + if (msm_host->core_minor >=3D SDHCI_MSM_MIN_V_7FF) { + writel_relaxed(msm_host->dll[index].dll_config_3, + ioaddr + msm_offset->core_dll_config_3); + writel_relaxed(msm_host->dll[index].dll_usr_ctl, + ioaddr + msm_offset->core_dll_usr_ctl); + } + + /* + * Set DDR_CONFIG since step 7 is setting TEST_CTRL that can be skipped. + */ + ddr_cfg_offset =3D msm_host->updated_ddr_cfg ? msm_offset->core_ddr_config + : msm_offset->core_ddr_config_old; + + config =3D msm_host->dll[index].ddr_config; + writel_relaxed(config, ioaddr + ddr_cfg_offset); + + /* Set DLL_CONFIG_2 */ + if (msm_host->use_14lpp_dll_reset) { + u32 mclk_freq; + int cycle_cnt; + + /* + * Only configure the mclk_freq in normal DLL init + * context. If the DLL init is coming from + * CX Collapse Exit context, the host->clock may be zero. + * The DLL_CONFIG_2 register has already been restored to + * proper value prior to getting here. + */ + if (init_context =3D=3D DLL_INIT_NORMAL) { + cycle_cnt =3D readl_relaxed(ioaddr + + msm_offset->core_dll_config_2) + & CORE_FLL_CYCLE_CNT ? 8 : 4; + + mclk_freq =3D DIV_ROUND_CLOSEST_ULL(dll_clock * cycle_cnt, TCXO_FREQ); + + if (dll_clock < 100000000) { + pr_err("%s: %s: Non standard clk freq =3D%u\n", + mmc_hostname(mmc), __func__, dll_clock); + rc =3D -EINVAL; + goto out; + } + + config =3D readl_relaxed(ioaddr + msm_offset->core_dll_config_2); + config =3D (config & ~GENMASK(17, 10)) | + FIELD_PREP(GENMASK(17, 10), mclk_freq); + writel_relaxed(config, ioaddr + msm_offset->core_dll_config_2); + } + /* wait for 5us before enabling DLL clock */ + udelay(5); + } + + config =3D msm_host->dll[index].dll_config; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + + /* Wait for 52us */ + spin_unlock_irqrestore(&host->lock, flags); + usleep_range(60, 70); + spin_lock_irqsave(&host->lock, flags); + + /* + * Write 0 to DLL_RST bit of DLL_CONFIG register + * and Write 0 to DLL_PDN bit of DLL_CONFIG register. + */ + config &=3D ~CORE_DLL_RST; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + + config &=3D ~CORE_DLL_PDN; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + /* Write 1 to DLL_RST bit of DLL_CONFIG register */ + config |=3D CORE_DLL_RST; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + + /* Write 0 to DLL_RST bit of DLL_CONFIG register */ + config &=3D ~CORE_DLL_RST; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + + /* Set CORE_DLL_CLOCK_DISABLE to 0 */ + if (msm_host->use_14lpp_dll_reset) { + config =3D readl_relaxed(ioaddr + msm_offset->core_dll_config_2); + config &=3D ~CORE_DLL_CLOCK_DISABLE; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config_2); + } + + /* Set DLL_EN bit to 1. */ + config =3D readl_relaxed(ioaddr + msm_offset->core_dll_config); + config |=3D CORE_DLL_EN; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + + /* + * Wait for 8000 input clock. Here we calculate the + * delay from fixed clock freq 192MHz, which turns out 42us. + */ + spin_unlock_irqrestore(&host->lock, flags); + usleep_range(50, 60); + spin_lock_irqsave(&host->lock, flags); + + /* Set CK_OUT_EN bit to 1. */ + config |=3D CORE_CK_OUT_EN; + writel_relaxed(config, ioaddr + msm_offset->core_dll_config); + + /* + * Wait until DLL_LOCK bit of DLL_STATUS register + * becomes '1'. + */ + rc =3D readl_relaxed_poll_timeout(ioaddr + + msm_offset->core_dll_status, + dll_lock, + dll_lock & CORE_DLL_LOCK, + 10, + 100); + if (rc =3D=3D -ETIMEDOUT) + pr_err("%s: Unable to get DLL_LOCK, dll_status: 0x%08x\n", + mmc_hostname(host->mmc), dll_lock); + +out: + if (core_vendor_spec & CORE_CLK_PWRSAVE) { + /* Reenable PWRSAVE as needed */ + config =3D readl_relaxed(ioaddr + msm_offset->core_vendor_spec); + config |=3D CORE_CLK_PWRSAVE; + writel_relaxed(config, ioaddr + msm_offset->core_vendor_spec); + } + + spin_unlock_irqrestore(&host->lock, flags); + return rc; +} + static void msm_hc_select_default(struct sdhci_host *host) { struct sdhci_pltfm_host *pltfm_host =3D sdhci_priv(host); @@ -927,6 +1139,24 @@ static void sdhci_msm_hc_select_mode(struct sdhci_hos= t *host) msm_hc_select_default(host); } =20 +static int sdhci_msm_init_dll(struct sdhci_host *host, enum dll_init_conte= xt init_context) +{ + if (host->mmc->ios.timing =3D=3D MMC_TIMING_UHS_SDR104 || + host->mmc->ios.timing =3D=3D MMC_TIMING_MMC_HS400) + return sdhci_msm_configure_dll(host, init_context, HS400); + + return sdhci_msm_configure_dll(host, init_context, HS200); +} + +static int sdhci_msm_dll_config(struct sdhci_host *host, enum dll_init_con= text init_context) +{ + struct sdhci_pltfm_host *pltfm_host =3D sdhci_priv(host); + struct sdhci_msm_host *msm_host =3D sdhci_pltfm_priv(pltfm_host); + + return msm_host->artanis_dll ? sdhci_msm_init_dll(host, init_context) : + msm_init_cm_dll(host); +} + static int sdhci_msm_cdclp533_calibration(struct sdhci_host *host) { struct sdhci_pltfm_host *pltfm_host =3D sdhci_priv(host); @@ -942,7 +1172,7 @@ static int sdhci_msm_cdclp533_calibration(struct sdhci= _host *host) * Retuning in HS400 (DDR mode) will fail, just reset the * tuning block and restore the saved tuning phase. */ - ret =3D msm_init_cm_dll(host); + ret =3D sdhci_msm_dll_config(host, DLL_INIT_NORMAL); if (ret) goto out; =20 @@ -1030,7 +1260,7 @@ static int sdhci_msm_cdclp533_calibration(struct sdhc= i_host *host) return ret; } =20 -static int sdhci_msm_cm_dll_sdc4_calibration(struct sdhci_host *host) +static int sdhci_msm_cm_dll_sdc4_calibration(struct sdhci_host *host, enum= mode index) { struct mmc_host *mmc =3D host->mmc; u32 dll_status, config, ddr_cfg_offset; @@ -1053,7 +1283,11 @@ static int sdhci_msm_cm_dll_sdc4_calibration(struct = sdhci_host *host) ddr_cfg_offset =3D msm_offset->core_ddr_config; else ddr_cfg_offset =3D msm_offset->core_ddr_config_old; - writel_relaxed(msm_host->ddr_config, host->ioaddr + ddr_cfg_offset); + + if (msm_host->artanis_dll) + writel_relaxed(msm_host->dll[index].ddr_config, host->ioaddr + ddr_cfg_o= ffset); + else + writel_relaxed(msm_host->ddr_config, host->ioaddr + ddr_cfg_offset); =20 if (mmc->ios.enhanced_strobe) { config =3D readl_relaxed(host->ioaddr + @@ -1122,7 +1356,8 @@ static int sdhci_msm_hs400_dll_calibration(struct sdh= ci_host *host) * Retuning in HS400 (DDR mode) will fail, just reset the * tuning block and restore the saved tuning phase. */ - ret =3D msm_init_cm_dll(host); + ret =3D sdhci_msm_dll_config(host, DLL_INIT_NORMAL); + if (ret) goto out; =20 @@ -1142,7 +1377,7 @@ static int sdhci_msm_hs400_dll_calibration(struct sdh= ci_host *host) if (msm_host->use_cdclp533) ret =3D sdhci_msm_cdclp533_calibration(host); else - ret =3D sdhci_msm_cm_dll_sdc4_calibration(host); + ret =3D sdhci_msm_cm_dll_sdc4_calibration(host, HS400); out: pr_debug("%s: %s: Exit, ret %d\n", mmc_hostname(host->mmc), __func__, ret); @@ -1185,7 +1420,8 @@ static int sdhci_msm_restore_sdr_dll_config(struct sd= hci_host *host) return 0; =20 /* Reset the tuning block */ - ret =3D msm_init_cm_dll(host); + ret =3D sdhci_msm_dll_config(host, DLL_INIT_NORMAL); + if (ret) return ret; =20 @@ -1227,6 +1463,7 @@ static int sdhci_msm_execute_tuning(struct mmc_host *= mmc, u32 opcode) struct sdhci_msm_host *msm_host =3D sdhci_pltfm_priv(pltfm_host); const struct sdhci_msm_offset *msm_offset =3D msm_host->offset; u32 config; + bool hs400_tuning; =20 if (!sdhci_msm_is_tuning_needed(host)) { msm_host->use_cdr =3D false; @@ -1256,17 +1493,23 @@ static int sdhci_msm_execute_tuning(struct mmc_host= *mmc, u32 opcode) * - select MCLK/2 in VENDOR_SPEC * - program MCLK to 400MHz (or nearest supported) in GCC */ - if (host->flags & SDHCI_HS400_TUNING) { + hs400_tuning =3D !!(host->flags & SDHCI_HS400_TUNING); + if (hs400_tuning) { sdhci_msm_hc_select_mode(host); msm_set_clock_rate_for_bus_mode(host, ios.clock, ios.timing); - host->flags &=3D ~SDHCI_HS400_TUNING; } =20 retry: /* First of all reset the tuning block */ - rc =3D msm_init_cm_dll(host); - if (rc) + rc =3D sdhci_msm_dll_config(host, DLL_INIT_NORMAL); + if (rc) { + if (hs400_tuning) + host->flags &=3D ~SDHCI_HS400_TUNING; return rc; + } + + if (hs400_tuning) + host->flags &=3D ~SDHCI_HS400_TUNING; =20 phase =3D 0; do { @@ -1297,6 +1540,8 @@ static int sdhci_msm_execute_tuning(struct mmc_host *= mmc, u32 opcode) mmc_hostname(mmc)); if (--tuning_seq_cnt) { tuned_phase_cnt =3D 0; + if (hs400_tuning) + host->flags |=3D SDHCI_HS400_TUNING; goto retry; } } @@ -1319,8 +1564,11 @@ static int sdhci_msm_execute_tuning(struct mmc_host = *mmc, u32 opcode) dev_dbg(mmc_dev(mmc), "%s: Setting the tuning phase to %d\n", mmc_hostname(mmc), phase); } else { - if (--tuning_seq_cnt) + if (--tuning_seq_cnt) { + if (hs400_tuning) + host->flags |=3D SDHCI_HS400_TUNING; goto retry; + } /* Tuning failed */ dev_dbg(mmc_dev(mmc), "%s: No tuning point found\n", mmc_hostname(mmc)); @@ -1847,11 +2095,6 @@ static unsigned int sdhci_msm_get_max_clock(struct s= dhci_host *host) return clk_round_rate(core_clk, ULONG_MAX); } =20 -static unsigned int sdhci_msm_get_min_clock(struct sdhci_host *host) -{ - return SDHCI_MSM_MIN_CLOCK; -} - /* * __sdhci_msm_set_clock - sdhci_msm clock control. * --=20 2.34.1