From patchwork Tue Jun 24 09:51:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viken Dadhaniya X-Patchwork-Id: 899483 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 4C36027C17E; Tue, 24 Jun 2025 09:51: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=1750758685; cv=none; b=BP7HuVT+fjh3wop8RNAv5Y2p5OdhIMw470Q+FGButGuIS92wqrRyE8MhvJLCoUJlDdsPY2mPc8NtFhgh6V3NBc0Z96tTIGlh/SYUl0rlU90N3K6Az736ZthBD9XuWQeHB8ggrJyy5sbiRFj7vXW3xLK64ju4ficQN95xe6qlGL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750758685; c=relaxed/simple; bh=UnnSWsOfQBWxPjuzAiAffTQsEi/EV50XPJh+fYJBMQk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oE2EPq+IGEIYF/T2xnl2TYEVKnRfGvbAbBqQwOaj3f3701FMLMaEZ+hZNdhb6jFNyUDzQ85P7p/+v+4/SY8HDcPQ4x+Pju/Red0UUoyEx+PN6qg7DvGcxzR9kuB5sNQWjO6HG9i7DpeGEv8VK9EdCBT95/ChB5VvsOfEQGINves= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=aWH+/Iqd; arc=none smtp.client-ip=205.220.180.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=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="aWH+/Iqd" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55O8RBKx008161; Tue, 24 Jun 2025 09:51:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=vkhi4KBJYib URnFvTYhcQWWXeGdC//Kyr2bUXDwQP2g=; b=aWH+/Iqd7jwty4hpZZA2gpSUZCL 3wkIeM1pe7O7fCvoN6V8O5sLpr9ks1ErKlZ+NUb/KRwz4/KQG/h+NLqFVtKH7+Jz I6bvcdBrI7/QYrJokWGfDif1kdt7+rrxKHoubf+VuH82D3+MgJScytjWqO/Y+mzP NqNJjNhvjVPscEG2FJthXIwYHJr2QazOORAUxkXDe2x6sEG7FAL8JDT25E3j2jSY 3j+gSg97W5z9ejrCf6ijILUqS8UObD5dd57HkDYORJaoBIdld4q0CPzr2asIhH4Z GQ7ICP2YnDWchjoMwM0m3JEs/CMo/c1pyCjZbubKrJBm2/qEXJ4PyZa4Pqg== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47f7tttsrw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Jun 2025 09:51:13 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 55O9pBfg024224; Tue, 24 Jun 2025 09:51:11 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 47dntktdt1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Jun 2025 09:51:11 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 55O9pANZ024217; Tue, 24 Jun 2025 09:51:10 GMT Received: from hu-devc-hyd-u22-c.qualcomm.com ([10.213.97.252]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 55O9pASO024215 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Jun 2025 09:51:10 +0000 Received: by hu-devc-hyd-u22-c.qualcomm.com (Postfix, from userid 4047106) id E0EFE573; Tue, 24 Jun 2025 15:21:09 +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, 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: mukesh.savaliya@oss.qualcomm.com, quic_anupkulk@quicinc.com, Viken Dadhaniya Subject: [PATCH v5 4/5] spi: geni-qcom: Load spi qup Firmware from linux side Date: Tue, 24 Jun 2025 15:21:01 +0530 Message-Id: <20250624095102.1587580-5-viken.dadhaniya@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250624095102.1587580-1-viken.dadhaniya@oss.qualcomm.com> References: <20250624095102.1587580-1-viken.dadhaniya@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-arm-msm@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-Authority-Analysis: v=2.4 cv=QINoRhLL c=1 sm=1 tr=0 ts=685a7512 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=6IFa9wvqVegA:10 a=VwQbUJbxAAAA:8 a=COk6AnOGAAAA:8 a=EUspDBNiAAAA:8 a=zIdmu9zckVospZd7ahEA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: kPRcjvShm9DcQViriGWONgLF96CbUucz X-Proofpoint-GUID: kPRcjvShm9DcQViriGWONgLF96CbUucz X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjI0MDA4MyBTYWx0ZWRfX8Roxmm3gCMOE sKP3YbSW8LDfhPk5SinKrWDDmUmcjTwErAzxVddwyxPMl2L03FM92e3tzU8szi7yUvIKdKHfcJb uNZRTEboarULmKIFKJk2gybfE/E5UY1XGXKFn81CoSLOCKX5ZzSNyRPkYsantXrO/3q1/+7yRMS e1i+wvgDujsHfjUdwGY4+0ssjJaeXNE+/DOWQX+5pDKP86YIxABzNp2OYT+Alca6JaGotDMedD+ T1Pw/opRGfl9idPwZJ/KDZJeqsxNcbw1M0jUQCjp5Pe8Wo/dwKMSkbZ1mp0cmb//RDyQYSyrgwB iisrSXrJoyzqHSJJO4fcjAkW0HaWEhET8RAF7qlQkAC89UvP+9BAKtnOOxbNWxT1TMRfGUf4r0w NGlRtQoECfsWQaTVyWYWu8tduyKwU5qJz9+gbmI9ozzrgoSAGzq6Nv+8H3D5lSyJ/9ZjqG0T X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-06-24_03,2025-06-23_07,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 malwarescore=0 adultscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 bulkscore=0 suspectscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506240083 Add provision to load firmware of Serial engine for SPI 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 --- Dependencies: This patch depends on patch 2 of this series. v4 -> v5: - Updated the email domain from 'quic' to 'oss'. v4 Link: https://lore.kernel.org/all/20250503111029.3583807-5-quic_vdadhani@quicinc.com/ v3 -> v4: - Add a patch dependency note. v3 Link: https://lore.kernel.org/linux-arm-msm/20250303124349.3474185-9-quic_vdadhani@quicinc.com/ v2 -> v3: - Load firmware only if the protocol is invalid. v2 Link: https://lore.kernel.org/linux-arm-msm/20250124105309.295769-8-quic_vdadhani@quicinc.com/ v1 -> v2: - No change. v1 Link: https://lore.kernel.org/linux-arm-msm/20241204150326.1470749-7-quic_vdadhani@quicinc.com/ --- --- drivers/spi/spi-geni-qcom.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c index 768d7482102a..a0d8d3425c6c 100644 --- a/drivers/spi/spi-geni-qcom.c +++ b/drivers/spi/spi-geni-qcom.c @@ -671,6 +671,12 @@ static int spi_geni_init(struct spi_geni_master *mas) goto out_pm; } spi_slv_setup(mas); + } else if (proto == GENI_SE_INVALID_PROTO) { + ret = geni_load_se_firmware(se, GENI_SE_SPI); + if (ret) { + dev_err(mas->dev, "spi master firmware load failed ret: %d\n", ret); + goto out_pm; + } } else if (proto != GENI_SE_SPI) { dev_err(mas->dev, "Invalid proto %d\n", proto); goto out_pm;