From nobody Fri Oct 3 08:52:32 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 6F5721DF270; Wed, 3 Sep 2025 08:10:20 +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=1756887021; cv=none; b=gRsIh4/Uqj+dSkCP6XiAJ27M13rIIxz6NmH/1ZB9PFDdNP5dmIHipaU7FexexMmAzEhGR4fymhL7b1aXxL2gKpkAXadCI1vkPVHRbUiRD76ZHKz12dFNkO44VlnXlGBMsEMFScMJVWXxA+W+54j2ilHbJ3My60Xk6xGKkRmDucA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756887021; c=relaxed/simple; bh=fwqhmYU0zJjtRM4AoymrT8y+EeDMT2LZy3J+wjceevs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aBSobuzdqhOVo6bVrtW5iA6vQhSIefxGCNxKbk5Yr/YXgVZWOz8WK9bmB7pUD1i+HYvlyJKwvfEkaMWUnQORd02/tuRgCgsjjfZBhqvzDL978UcBr6x/nfVK/sXQEPgy0aGXEYAlGvij78OaGKddX6FmmonV0omZrz+MudGYSo0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=AnrYYuEB; 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=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="AnrYYuEB" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58335HNV012176; Wed, 3 Sep 2025 08:10:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= L8KJSGPZDQuXLFnHuyhuskaClGdAwGOnDa5JEVRNmJ8=; b=AnrYYuEBAZFvoVlN i4NKdVPxSKUt5jXEsl57pq0ISIawduz5tZvI+XJJKdsuS/MnnRA8XYmBQegRTsv8 /toWPS/WCqgKH8qdUKDqHixotWqAUs9sBHPu6UXsjT3Y2+MSBvnTgn85vrfrOBh2 IbytVr3RMGv4PpfhwaM25wFJbF+Rf2RKmdFm8/Ysl7FsPrk5BnLScM9PBTegamUu DbBNbRKCUYduuTIT5NTP74QcfCgIvjXtFRjEX+E8OJ7BpyIdPThOdV1MNzoJzhsq 3z6Y+z1JJ8fC+I1ULUEBhatGhUgVRcyWd8/MbqEnvK4nMoElx/mXo057q4Glhh6K /YCQJA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48ut2fjmwu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Sep 2025 08:10:16 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 5838A7lJ005434 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 3 Sep 2025 08:10:07 GMT Received: from hu-mmanikan-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.24; Wed, 3 Sep 2025 01:10:02 -0700 From: Manikanta Mylavarapu To: , , , , , , , , , , , CC: , , Subject: [PATCH v2 1/2] i2c: qcom-geni: add OPP table support Date: Wed, 3 Sep 2025 13:39:47 +0530 Message-ID: <20250903080948.3898671-2-quic_mmanikan@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250903080948.3898671-1-quic_mmanikan@quicinc.com> References: <20250903080948.3898671-1-quic_mmanikan@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-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODMwMDAzOCBTYWx0ZWRfX/CPYMYwtuUF5 2BuaKxnhWiHvoxPxhEtnM3Ysspjny1bdkOfFzSqeq0WUL5IS4qBaczIIUtwzWR9r8tz/nJ+fDJ+ fFOhgVa1/FcTh+d50Eu0/WW/vYSXmCyaC9TBS5p/CZJu07Y2gcUO3brdwyhRR7IBELR+oKjUDts En3zS2k+AzwDzan04EFN9Ui+lEC3Xf2EvFiY2OiY1+0fEvZDXQJwtsXjojPMScZnw8Qnh2tzxOP Ghxe22g0bLrvPlPfxxNaUQH3cfYF8UKyFwZoJybUIrdrnQltKtpzvvVgqoQFGc9b6aZK1evoy3f CYuJYZOX8IaPP/ZSm7dlHg80T3RJZ+KYmj/wxMQJe7wNYtky4oUOiv605pAEmOSxhqJSSUjbRZx aRSc0PoE X-Proofpoint-ORIG-GUID: 42Fs02m87ur47nO2CW56vkMDvZFugU-J X-Proofpoint-GUID: 42Fs02m87ur47nO2CW56vkMDvZFugU-J X-Authority-Analysis: v=2.4 cv=U7iSDfru c=1 sm=1 tr=0 ts=68b7f7e9 cx=c_pps a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=GEpy-HfZoHoA:10 a=yJojWOMRYYMA:10 a=COk6AnOGAAAA:8 a=PkaDvUb3SntloxbNxXMA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-03_04,2025-08-28_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 clxscore=1011 impostorscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508300038 Content-Type: text/plain; charset="utf-8" Add support for reading and configuring the OPP table in the GENI I2C driver. This enables setting the frequency based on device tree data, removing dependency on bootloader configuration. Signed-off-by: Manikanta Mylavarapu --- drivers/i2c/busses/i2c-qcom-geni.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qc= om-geni.c index ff2289b52c84..85b7f25e0c6e 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -779,11 +780,13 @@ static int setup_gpi_dma(struct geni_i2c_dev *gi2c) =20 static int geni_i2c_probe(struct platform_device *pdev) { - struct geni_i2c_dev *gi2c; + const struct geni_i2c_desc *desc =3D NULL; u32 proto, tx_depth, fifo_disable; - int ret; struct device *dev =3D &pdev->dev; - const struct geni_i2c_desc *desc =3D NULL; + unsigned long freq =3D ULONG_MAX; + struct geni_i2c_dev *gi2c; + struct dev_pm_opp *opp; + int ret; =20 gi2c =3D devm_kzalloc(dev, sizeof(*gi2c), GFP_KERNEL); if (!gi2c) @@ -814,6 +817,24 @@ static int geni_i2c_probe(struct platform_device *pdev) gi2c->clk_freq_out =3D I2C_MAX_STANDARD_MODE_FREQ; } =20 + ret =3D devm_pm_opp_set_clkname(&pdev->dev, "se"); + if (ret) + return ret; + + /* OPP table is optional */ + ret =3D devm_pm_opp_of_add_table(dev); + if (!ret) { + opp =3D dev_pm_opp_find_freq_floor(dev, &freq); + if (IS_ERR(opp)) + return dev_err_probe(dev, PTR_ERR(opp), "failed to find the frequency\n= "); + dev_pm_opp_put(opp); + ret =3D dev_pm_opp_set_rate(dev, freq); + if (ret) + return dev_err_probe(dev, ret, "failed to set the rate=3D%ld\n", freq); + } else if (ret && ret !=3D -ENODEV) { + return dev_err_probe(&pdev->dev, ret, "invalid OPP table in device tree\= n"); + } + if (has_acpi_companion(dev)) ACPI_COMPANION_SET(&gi2c->adap.dev, ACPI_COMPANION(dev)); =20 --=20 2.34.1 From nobody Fri Oct 3 08:52:32 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 C10CC2EAB98; Wed, 3 Sep 2025 08:10:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756887025; cv=none; b=CqDjsxBmJjSuuwcTwaEmnBsUIxJMK51SZuBp16uV9ahOVdNqHUpBakue02AZwx2Qy9goIOZ0Ud4Uu9pTY2P41jZlw1RoNeWoRUctDwZny8JbGOreaxQUyTX/iwyL5Z0ZhrMOGzrB4GzHWwY1bv8J8xbJgjiHCIZxNFxNn0WEqWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756887025; c=relaxed/simple; bh=4XxNXMCtP+0UFGsELPfxjk/UT5QryuVz3UbxbhJYews=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kv7Rx4aYf2Y6xV35eK+pPsDPv6udfiDGtX7IU5mYTUQK4g2yRgARwPia26QJyU2EhuY3FV7t8m6RHYZcwx/KSyLuWTH5ji81g3kkDB9mai89KHav5RGvYpH9TiR7rkMhspNAmb4wtYI4905LqiasGInKwSMAVfV4DCpufLZhCGI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=OKxm9u5g; arc=none smtp.client-ip=205.220.180.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=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="OKxm9u5g" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5832Ucuw019740; Wed, 3 Sep 2025 08:10:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= WGgkCKgxJSPoqAojbJbakGTTfWHHsWtUjXMAF1vAHEU=; b=OKxm9u5gVFVRMP0x voNqhSu0Z3lIQu/C46/h4Is7zhbNfhKsBKy4+oRZuKTO/n/yR+56gB2wGy14jup0 /sa6j35PJ1iC3FH+1ZQCoFtDHGnH4U9UxCXv3rle0XNN0olJODIk5Z8EX18wg1o/ foUtbTdIviEZk5sXcjW4bmmVrIGRZJM4cIN0NvFWRyQJbCJuLurP4Ts40GJEc4kA rqJFZkaEbXXUaUqxHQM67xzEsCuGQzZtfMgibXLSO1zvzrI6hUyjnItRLtjkNLGD LAfDWiuyVWEaMSBwyXnj8X28zHECG80rg5/kvshff9Y+LRodG23vox0NBvbiSl/N 2ioz/g== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 48urw02tbh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Sep 2025 08:10:19 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 5838ABfd013861 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 3 Sep 2025 08:10:11 GMT Received: from hu-mmanikan-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.24; Wed, 3 Sep 2025 01:10:07 -0700 From: Manikanta Mylavarapu To: , , , , , , , , , , , CC: , , Subject: [PATCH v2 2/2] arm64: dts: qcom: ipq5424: add i2c nodes Date: Wed, 3 Sep 2025 13:39:48 +0530 Message-ID: <20250903080948.3898671-3-quic_mmanikan@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250903080948.3898671-1-quic_mmanikan@quicinc.com> References: <20250903080948.3898671-1-quic_mmanikan@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-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: MGK7SCmoDPa-9T4uTS6iGohWB9CssDX6 X-Proofpoint-ORIG-GUID: MGK7SCmoDPa-9T4uTS6iGohWB9CssDX6 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODMwMDAyNyBTYWx0ZWRfX5Zw3u+L1V91x O09x9JU538h+6IdvKIxLBiKMtLk/6/p1UlfWzNa66FoLmIaBhDfxROfOoFHDP3kEzG6Bh666ZHs nxoFyGU9wMR/6lHhYFMyw4EdgZ94qJuEGl47StnLDPEYfV14sVPmAkk4lvGjZPKavC84Rpbm/jj 1shUxC886PFjilfoaiOV8OO2JqX9TeEzM/0MYaYg7CzCXf5djwcQxNGh3dI2ESjK/OX374gbzv4 z5TInVxPTU7brrkErbcRNrD7a4iqx9Bf+70bmNr5mMWuq4HiHnG1BRBwvlqDaPF+ifiyyPVsXSR lz4Z2xruYSqTwtzcqe+2uj3crMeZTGpeyPmd4d+LXmI7w+jXL/lsPtqZN+fdGZseokhdhCrUFCQ 0wlI2Duk X-Authority-Analysis: v=2.4 cv=NrDRc9dJ c=1 sm=1 tr=0 ts=68b7f7eb cx=c_pps a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=GEpy-HfZoHoA:10 a=yJojWOMRYYMA:10 a=COk6AnOGAAAA:8 a=5VfnTfZ0KsacMTR8VH4A:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-03_04,2025-08-28_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 suspectscore=0 malwarescore=0 priorityscore=1501 phishscore=0 impostorscore=0 spamscore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508300027 Content-Type: text/plain; charset="utf-8" Serial engines 2 and 3 on the IPQ5424 support I2C. The I2C instance operates on serial engine 2, designated as i2c0, and on serial engine 3, designated as i2c1. Add both the i2c0 and i2c1 nodes. Signed-off-by: Manikanta Mylavarapu Reviewed-by: Konrad Dybcio --- v2: Remove assigned-clock and add opp table to configure the frequency of s= e clock arch/arm64/boot/dts/qcom/ipq5424.dtsi | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qc= om/ipq5424.dtsi index 67877fbbdf3a..0d8ea9a8c600 100644 --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi @@ -173,6 +173,14 @@ memory@80000000 { reg =3D <0x0 0x80000000 0x0 0x0>; }; =20 + i2c_opp_table_64mhz: opp-table-qup64mhz { + compatible =3D "operating-points-v2"; + + opp-64000000 { + opp-hz =3D /bits/ 64 <64000000>; + }; + }; + pmu-a55 { compatible =3D "arm,cortex-a55-pmu"; interrupts =3D ; @@ -519,6 +527,26 @@ uart1: serial@1a84000 { interrupts =3D ; }; =20 + i2c0: i2c@1a88000 { + compatible =3D "qcom,geni-i2c"; + reg =3D <0 0x01a88000 0 0x4000>; + clocks =3D <&gcc GCC_QUPV3_I2C0_CLK>; + clock-names =3D "se"; + interrupts =3D ; + operating-points-v2 =3D <&i2c_opp_table_64mhz>; + status =3D "disabled"; + }; + + i2c1: i2c@1a8c000 { + compatible =3D "qcom,geni-i2c"; + reg =3D <0 0x01a8c000 0 0x4000>; + clocks =3D <&gcc GCC_QUPV3_I2C1_CLK>; + clock-names =3D "se"; + interrupts =3D ; + operating-points-v2 =3D <&i2c_opp_table_64mhz>; + status =3D "disabled"; + }; + spi0: spi@1a90000 { compatible =3D "qcom,geni-spi"; reg =3D <0 0x01a90000 0 0x4000>; --=20 2.34.1