From mboxrd@z Thu Jan 1 00:00:00 1970 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 113EF3EC6B2 for ; Mon, 27 Jul 2026 09:21: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=1785144101; cv=none; b=LjRW71KhzXx3XhLikNBuTw8BhaQMAT1AkU6S8TVttUaohmIy7Xnh0du4ltXF4m2hlw9PDMp6pBOgJJVFgLgmFK48SrnCKlMy+A8Arc9221n+I+q6FkkBx8Y3KQnN47E12Lu0CHFLBGzS3h+CR95B3bpVSLkZhwIHXsdEnbBApos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785144101; c=relaxed/simple; bh=XibWOFYzL7NFRYf/IFZlMjx/SLzb9MhUUvP0QCnS3/Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qE/rIhjpRMxr/wcHyRqb0L7B6t261NIDkx53EhDYIlmkDE2VO6UxxsG1J48et1+U/ftaG7Wy86wDqg/PeKVzeJ/6Nv5M/koo8C0ksD1z5S0CNK9TgFZ7pVEBRQ96M2fc6q6SVWyn/m36s9ehZXA099G47qMqsrubhuGSFEEtreA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=iqB5fpm8; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=N6yVKZsS; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="iqB5fpm8"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="N6yVKZsS" 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 66R8g64Y3372839 for ; Mon, 27 Jul 2026 09:21:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= qh8+gNQVycVqYf+GLM/MIdlS2XrJGv+NSL9vs+oSJNc=; b=iqB5fpm80dVFZQsy IvRJL5CpRqphQ4UagYGTDeR78/WB/5ch7GJzC4+7R/iUTgLqvIIPJbS2WRYy9/Qg oOepWsx5PNg0eQ89LMivQhNMfvPqvsGDyIJEmc6Tx6atWANTP4fYk2swvy06RPHN BFo2iZh0Svmv0Shb2SB3vOZ1ZOoZK1WLmwPCedj4WWpjF6EuWUzXzeq2UY6fnUrK ebNK1j61zv+2VD7aOQX2RDZnYLwt5Ful+3z4M4wDOKWrQIBKcygxv9GsmGnpD+i9 R8It7UR9bf0ECzR79VQY6VWCnq7aDC20+TVSScvdj8TJ3h2u6Ip3j9liNPgt3A/e RD22MQ== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fngystrn4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 27 Jul 2026 09:21:38 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-51ebdfceddcso33340931cf.3 for ; Mon, 27 Jul 2026 02:21:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785144097; x=1785748897; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qh8+gNQVycVqYf+GLM/MIdlS2XrJGv+NSL9vs+oSJNc=; b=N6yVKZsSMkGVnmiRpzwKGZMS1q+Yse0dciBYg4ASPwqEV/iZ0s48+lRG/y01w8gAAm 7sF2kL5L/1pHcOULG7SCV7Ys6mn+R1MMD3OrVWxZtebkIGWtRtv456HJNpsFtDnvuSJv v5O6oExBPLJ7wDlgPc7tjnaMGyV6BJUHALfeoML9jriQHwOaHYWvoqpAj+Gao9JNl6NQ x8Q57K0OJxK1mINH48WI5sL6sZvzxWrDZZ2DWWOVzmWkUrK0zm0+RqNfX2QxSeQAt2tu 37O0jf2OOF6d4crGF2RFxvEZ7/hTPTzL5NY1XXpK90vMApN0fQu5FBzigBEqCHmVbs3V tkkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785144097; x=1785748897; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=qh8+gNQVycVqYf+GLM/MIdlS2XrJGv+NSL9vs+oSJNc=; b=YjiGGTsEzJXnxmRSq2AuQr8Tu+c/7G774hNxiZuhsG7UxJTNqSKOfd6ZjMngcEQQqk FdsW6Mz9Y/NLzF4Jx9taf65dfJqyHV6W0s9AbXyzfFPP5VBjtxvrbM3MhaE9spIUWovr XW8MBSZcWwUYPDKdTM+LwuBiQbhczc/ElQBV2iTVVcVXkDYnrI2TovDEs5b5NvZvkA3m P+CLNlqs4niQK8FX8u41+Y8coR89CFvfc+J6hwiiBOUuZxanRRHmpCiIFuIn8ie1+6/i fodvYN48JLmoQp0MDbGXWzvsiOCWnm9hlc58FUE4V9tyLVXOjPnwLIreyxmoJ2ra03F3 5mlw== X-Forwarded-Encrypted: i=1; AHgh+RpPhpsS0QdQRdf+TrPcR8Fnh9PumnsGD9xTqFRiqpGFy79HNBg7ijIi5eHULQUksMR5C+CFI+ozuONw1IQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyI1Fcbxu8BNuP5dtDUrWqVO+L5jXR0F7mxHLb07WKt79vxtp24 Ggqy8Ior2pFKTzvQSEAibvkaJu4oArSaxXOdppWm6BCfiQnic2fp+ws4sZMzCyhjfWpF1cldzlv YLqhwKi7k2eVRyRNqNCb555EYVhseusiW/ReUbY9z8j8DPaeb0vuoyS70Ae7kXTb5OPI= X-Gm-Gg: AR+sD13u5eoUbG2R4c50AiGd1OileLrwArfnFtrsxeuE287WsVAMlbvUJXYvFYpQevg T9b1wA+OFCeR08abL8c7RCa/PjJ09Z+A/LONKsH3P/6mp3+Uoyx7Y4UwtTG2voXRfbvB9xH9KHs MRZEB4MVHTOdgmCNK9sks9BOJQ4ZIIhgohDWFglWzNLtPQDcWHgpYVhJp7tENCxc+4zTsFnovEn 2D3FzWqawMQzB0ifZLjxWk/xs6yfwHAANtpaUO6k0QdfdCyALyjTcjt4VHhyfur1yuUQz6bBU9S 5hXIOCA5Ueemwm031tk28TC62O+Nd8KxC3+y6fwTwCWImETKagnc0y4wxCKBn+F54Vv6KA4FYW5 c3ODwPdimUzIEdapQKWk8ndPtdDyAcsoKrhn8GNOY0heO6zZ7mHsQBnj8DBdmK57/2i9StM50TK qwF51EFhO5EgVZ5R+ZNlk9O5vqEXQenxxNhc4aB3WZCeyd3HkgNmyx X-Received: by 2002:a05:622a:4d98:b0:51b:f8b3:3d4a with SMTP id d75a77b69052e-529a865ef39mr80908611cf.50.1785144097211; Mon, 27 Jul 2026 02:21:37 -0700 (PDT) X-Received: by 2002:a05:622a:4d98:b0:51b:f8b3:3d4a with SMTP id d75a77b69052e-529a865ef39mr80908511cf.50.1785144096761; Mon, 27 Jul 2026 02:21:36 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.na.qualcomm.com ([2a01:e0a:830:450:61cd:dcd3:c61a:ac3c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69fb51c9babsm2265326a12.12.2026.07.27.02.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2026 02:21:36 -0700 (PDT) From: Loic Poulain Date: Mon, 27 Jul 2026 11:21:32 +0200 Subject: [PATCH v2 1/3] i2c: qcom-cci: Switch msm8953 to the CCI v2 timing/rate config 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: <20260727-cci-clk-fix-v2-1-c3958f28b045@oss.qualcomm.com> References: <20260727-cci-clk-fix-v2-0-c3958f28b045@oss.qualcomm.com> In-Reply-To: <20260727-cci-clk-fix-v2-0-c3958f28b045@oss.qualcomm.com> To: Robert Foss , Andi Shyti , Wolfram Sang , Dmitry Baryshkov , Luca Weiss Cc: linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vladimir.zapolskiy@linaro.org, Loic Poulain X-Mailer: b4 0.14.2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI3MDA5MSBTYWx0ZWRfX8POR4Inxg89J Kks0uZ+uYb+lHLt42H5CyfIYJ6k4pqB99L5tPxCM5Ep7dtFapo9Pb7gn257jHLWK99obYcFfngu RdDXZ5WSOipYToPvkJj0a5rFQSlXqe0wbNdJLAu1puuuRYD2cn1xAB0VP4okh8h+lmSneG4EfRS ko9loRU9uuw/o5bADHBsxcWSN5YdTtJfx67YtIe66yNSD4mrS2ZfraxcOVjsEh87WzddARnPfBj 1M8DU1++hsdxJpTSq1hqKELWNGLVMKFIFPsSQO1420pbAEaQKsUxPxjWslhdPueLIFBlmu/fnri CwZHXPDqtEPTmSMJgTnXk8M4Uy3tGy9vtFZTW8CrCkb0JjtF4cquJpjPhEeeo8If/0R3hEzQZlh zhJ6RtLV8kAE8DBf99itoXwYYz2RE0uPtBf/OJ0f3Zn3pQEDHrBtX17PIQJkalcyTa45cXhVhd5 ataykAToyYimLqIDafg== X-Proofpoint-GUID: CbgB9VgFj8Ff_q_ZrGuWUbLL7XbytFPl X-Authority-Analysis: v=2.4 cv=DNG/JSNb c=1 sm=1 tr=0 ts=6a672322 cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=Y4CGMd7wAM7EkgizcVsA:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI3MDA5MSBTYWx0ZWRfXyKezJnuF7qB5 Ac/xEdPmiUJmL7l4cJUOhF2vtmI2aNOvnA/Xk5Z7FvlRXemBulivfJqlEB4tPomykhfcX4dj4Xf j8IHNvUyjnznG6W2eAnhTpSpxiZUjwA= X-Proofpoint-ORIG-GUID: CbgB9VgFj8Ff_q_ZrGuWUbLL7XbytFPl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-27_02,2026-07-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 malwarescore=0 bulkscore=0 adultscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607270091 The msm8953 CCI timing table is internally inconsistent. Its Standard and Fast timings match v1/v1.5, which are calibrated for a 19.2 MHz CCI clock, but its Fast+ timings are essentially the v2 values, which are calibrated for 37.5 MHz. Since all masters share a single CCI clock, no single rate can satisfy all three modes with the current table, and the DT assigns 19.2 MHz, so Fast+ timings are wrong. The msm8953 CCI is the same hardware version as msm8996/sdm630, which already use the cci_v2_data config (37.5 MHz). 37.5 MHz is supported by the msm8953 CCI RCG, so reuse cci_v2_data for msm8953 as well and drop the redundant, inconsistent standalone table. This makes all three I2C modes self-consistent under a single clock rate. Note this requires the CCI clock to run at 37.5 MHz, the proper clock rate will be set in an upcoming CCI patch. Signed-off-by: Loic Poulain --- drivers/i2c/busses/i2c-qcom-cci.c | 47 +-------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c index 4d64895a9e9e4e0bd5e0ccb5c3cc04b282b1e4d5..23cef922351ce44d71f1691cd7e4aab274fdd196 100644 --- a/drivers/i2c/busses/i2c-qcom-cci.c +++ b/drivers/i2c/busses/i2c-qcom-cci.c @@ -772,54 +772,9 @@ static const struct cci_data cci_v2_data = { }, }; -static const struct cci_data cci_msm8953_data = { - .num_masters = 2, - .queue_size = { 64, 16 }, - .quirks = { - .max_write_len = 11, - .max_read_len = 12, - }, - .params[I2C_MODE_STANDARD] = { - .thigh = 78, - .tlow = 114, - .tsu_sto = 28, - .tsu_sta = 28, - .thd_dat = 10, - .thd_sta = 77, - .tbuf = 118, - .scl_stretch_en = 0, - .trdhld = 6, - .tsp = 1 - }, - .params[I2C_MODE_FAST] = { - .thigh = 20, - .tlow = 28, - .tsu_sto = 21, - .tsu_sta = 21, - .thd_dat = 13, - .thd_sta = 18, - .tbuf = 32, - .scl_stretch_en = 0, - .trdhld = 6, - .tsp = 3 - }, - .params[I2C_MODE_FAST_PLUS] = { - .thigh = 16, - .tlow = 22, - .tsu_sto = 17, - .tsu_sta = 18, - .thd_dat = 16, - .thd_sta = 15, - .tbuf = 19, - .scl_stretch_en = 1, - .trdhld = 3, - .tsp = 3 - }, -}; - static const struct of_device_id cci_dt_match[] = { { .compatible = "qcom,msm8226-cci", .data = &cci_v1_data}, - { .compatible = "qcom,msm8953-cci", .data = &cci_msm8953_data}, + { .compatible = "qcom,msm8953-cci", .data = &cci_v2_data}, { .compatible = "qcom,msm8974-cci", .data = &cci_v1_5_data}, { .compatible = "qcom,msm8996-cci", .data = &cci_v2_data}, -- 2.34.1