From patchwork Wed Dec 4 15:03:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viken Dadhaniya X-Patchwork-Id: 847784 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 3C7AE20CCDC; Wed, 4 Dec 2024 15:03:43 +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=1733324625; cv=none; b=SIyiy7xYj3uXpc22H8/zI/ikXZ2CT9ITUATznH32Qi3f/Ho7o6nxlviIz3cR+afZiH4zLNnKoNVDXoUwDVWBtTNbhAZHRqTLUsyYgwfynTveTZY4YSRDsyDJsFS/aK1R7w59TVQ7kRRRztmWnv8RGWH11zB7b4mByRYBwVRZ69w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733324625; c=relaxed/simple; bh=P+3g+casf0O8l3h6tYmKSbaVCT9lsm1gtf00GQanwmA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AiZAadD/cwK8pMKea+BQObo4Qdf7/iI/VXmMbnXlqg7raMZQdm77Nb9FfpYYJ3vVn0FKirfJnTGWxjHF7lZlOS4HkNbkq+SulPyHVtHLJWVVdhHKIGmoA1ces+Ot8wVvK1xnZcghUrYidlOZrKa9cavCTQ60/yO8CRA6q4cv2SE= 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=aqUIQVOS; 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="aqUIQVOS" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4B47agab006044; Wed, 4 Dec 2024 15:03:38 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=Q0D2duJKZCN grX4FW4PDA2xV5z2Qxuqlb6n5MEuvj2w=; b=aqUIQVOSGTyfCAcilElOaiQ7aJI YtX0F6M6jj5b7It8Tn6gCPqHMAbdnMJm/Rj3FMIPy1Q4pIBKhKnOpLn6vmGCDGA7 YGh4j630GTgFpOUjdhrGV+isoSvkaTl7VMee5TRg+tS5X1z+IAQHjE9j1D2K0LYM R8anprzsoahMzp45gvJBpeZv9DWnmzkxcju+DIvVxEyHpQb4c0XA2h0/tWuG21kj HUrRw3mOybcmZ76M3Y4vEHnh8w9VlrK1bLL59CMOd9z0Ord91A//uAaqDdi6Mvx8 zuLR9KU117ZIzGgneiF2DRQDVYUgcdfYIQaNpfX9scRD9O4Qf6DeR9Pr35A== 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 439w3emjp2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Dec 2024 15:03:37 +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 4B4F3XIv025824; Wed, 4 Dec 2024 15:03:33 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 437uskx4ug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Dec 2024 15:03:33 +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 4B4F3XRH025814; Wed, 4 Dec 2024 15:03:33 GMT Received: from hu-devc-hyd-u22-c.qualcomm.com ([10.213.97.252]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4B4F3XLW025810 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Dec 2024 15:03:33 +0000 Received: by hu-devc-hyd-u22-c.qualcomm.com (Postfix, from userid 4047106) id ED508503; Wed, 4 Dec 2024 20:33:32 +0530 (+0530) From: Viken Dadhaniya To: andi.shyti@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, broonie@kernel.or, andersson@kernel.org, konradybcio@kernel.org, johan+linaro@kernel.org, dianders@chromium.org, agross@kernel.org, linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-spi@vger.kernel.org Cc: =quic_msavaliy@quicinc.com, quic_anupkulk@quicinc.com, Viken Dadhaniya , Mukesh Kumar Savaliya Subject: [PATCH v1 5/7] i2c: qcom-geni: Load i2c qup Firmware from linux side Date: Wed, 4 Dec 2024 20:33:24 +0530 Message-Id: <20241204150326.1470749-6-quic_vdadhani@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241204150326.1470749-1-quic_vdadhani@quicinc.com> References: <20241204150326.1470749-1-quic_vdadhani@quicinc.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 5MtAmz2KdIxRvHCGfOCSkx7WgssK3Kst X-Proofpoint-ORIG-GUID: 5MtAmz2KdIxRvHCGfOCSkx7WgssK3Kst X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 bulkscore=0 mlxscore=0 adultscore=0 priorityscore=1501 mlxlogscore=999 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412040115 Add provision to load firmware of Serial engine for I2C protocol from Linux Execution Environment on running on APPS processor. Co-developed-by: Mukesh Kumar Savaliya Signed-off-by: Mukesh Kumar Savaliya Signed-off-by: Viken Dadhaniya --- drivers/i2c/busses/i2c-qcom-geni.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 7a22e1f46e60..98878cf7c044 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -876,10 +876,13 @@ static int geni_i2c_probe(struct platform_device *pdev) } proto = geni_se_read_proto(&gi2c->se); if (proto != GENI_SE_I2C) { - dev_err(dev, "Invalid proto %d\n", proto); - geni_se_resources_off(&gi2c->se); - clk_disable_unprepare(gi2c->core_clk); - return -ENXIO; + ret = geni_load_se_firmware(&gi2c->se, GENI_SE_I2C); + if (ret) { + dev_err(gi2c->se.dev, "i2c firmware load failed ret: %d\n", ret); + geni_se_resources_off(&gi2c->se); + clk_disable_unprepare(gi2c->core_clk); + return ret; + } } if (desc && desc->no_dma_support)