From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E8E1E77170 for ; Thu, 5 Dec 2024 11:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:CC:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Pgi8rzaEWRtb1Qwm7WBfFssjc2xsjvAca14rl02ms/0=; b=FHj+BCCTjEPJ6wFzVx/jqKYzWs D/tO6PvsMRU2wjoRyWhddKNobL+Gk9ZYm4iPAQVn8jue39nLZMd4B4PVx9/T2/XVujTQd1PIBF/as OmSy7ouNgsq3JNC+s2Pkp1KOmKbRHS4m6Edam1Qy33Ww7oq8RskR6l2QhzLPPX2Wj8Y+y+s6+vx1d 6ZAk4UyzrikqL9sBaTmNKm6zRdBjvCxVCdccf7Fk+z6ZJrFGfnlQ/ZfDTaZCMLbwY7rOj30ZSGjaa 7+7IwQhti06ROeZN6tgzRXRl9EQf0mwOD2kJp9mFTJ9uWlQxacJfEnij+a+mzsVWvJrgbLUZvU3pK w31pdC6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tJ9iv-0000000FfEc-3WVx; Thu, 05 Dec 2024 11:08:45 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tJ9hu-0000000Fezb-0v2H for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2024 11:07:43 +0000 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4B56H5FQ031191; Thu, 5 Dec 2024 11:07:35 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= Pgi8rzaEWRtb1Qwm7WBfFssjc2xsjvAca14rl02ms/0=; b=aSahnSHT5GKGeuGU cg8Y+cqSsA1GKYCj7DzdWe8PIXQxW8u52bKWEivES/16SjsHd4F6gqPDijIpkxYq bHAUIr6qZtu6uK/WsOuPOAd31BGqbdSerxst/8fM1/oF8dbg4VKggGIyDLx6FLx2 j9b03akkNSDIGdT2BVKc9K5vLM3D64TY1r13TwPSfVhKWbvBLkMA//LZEr0RvWuH IuuCovB4Ayjvf7Jxb2VfVHDiHGVfL4S8vZStqD8TIxj9k4CcwjtB9p5umk5IWFua GWdkZcq36BDhvG8iKO4HJ7dauqe36tnVLZefLuT7RUume5sr9z+QaIfaSmMPcz+v Qh9EeQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 439w90ybex-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 05 Dec 2024 11:07:35 +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 4B5B7YaC031800 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 5 Dec 2024 11:07:34 GMT Received: from [10.190.163.187] (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.1544.9; Thu, 5 Dec 2024 03:07:31 -0800 Message-ID: <73a16eb4-e590-92db-ee24-cc4f42a9de01@quicinc.com> Date: Thu, 5 Dec 2024 16:37:28 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH V5 1/2] firmware: arm_scmi: Add QCOM Generic Vendor Protocol documentation Content-Language: en-US To: Cristian Marussi CC: , , , , , , , , References: <20241115011515.1313447-1-quic_sibis@quicinc.com> <20241115011515.1313447-2-quic_sibis@quicinc.com> From: Sibi Sankar In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] 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-ORIG-GUID: XrgWAK3E314MfAigyWSkXsqJzgzavaBT X-Proofpoint-GUID: XrgWAK3E314MfAigyWSkXsqJzgzavaBT 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 mlxlogscore=999 bulkscore=0 impostorscore=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 spamscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412050080 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241205_030742_388765_B19897EB X-CRM114-Status: GOOD ( 25.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/4/24 17:18, Cristian Marussi wrote: > On Fri, Nov 15, 2024 at 06:45:14AM +0530, Sibi Sankar wrote: >> Add QCOM System Control Management Interface (SCMI) Generic Vendor >> Extensions Protocol documentation. >> >> Signed-off-by: Sibi Sankar >> --- >> >> v4: >> * Update the protol attributes doc with more information. [Cristian] >> >> .../arm_scmi/vendors/qcom/qcom_generic.rst | 211 ++++++++++++++++++ >> 1 file changed, 211 insertions(+) >> create mode 100644 drivers/firmware/arm_scmi/vendors/qcom/qcom_generic.rst >> >> diff --git a/drivers/firmware/arm_scmi/vendors/qcom/qcom_generic.rst b/drivers/firmware/arm_scmi/vendors/qcom/qcom_generic.rst >> new file mode 100644 >> index 000000000000..141bc932e30f >> --- /dev/null >> +++ b/drivers/firmware/arm_scmi/vendors/qcom/qcom_generic.rst >> @@ -0,0 +1,211 @@ >> +.. SPDX-License-Identifier: GPL-2.0 >> +.. include:: >> + >> +=============================================================================== >> +QCOM System Control and Management Interface(SCMI) Vendor Protocols Extension >> +=============================================================================== >> + >> +:Copyright: |copy| 2024, Qualcomm Innovation Center, Inc. All rights reserved. >> + >> +:Author: Sibi Sankar >> + >> +SCMI_GENERIC: System Control and Management Interface QCOM Generic Vendor Protocol >> +================================================================================== >> + >> +This protocol is intended as a generic way of exposing a number of Qualcomm >> +SoC specific features through a mixture of pre-determined algorithm string and >> +param_id pairs hosted on the SCMI controller. It implements an interface compliant >> +with the Arm SCMI Specification with additional vendor specific commands as >> +detailed below. >> + >> +Commands: >> +_________ >> + >> +PROTOCOL_VERSION >> +~~~~~~~~~~~~~~~~ >> + >> +message_id: 0x0 >> +protocol_id: 0x80 >> + >> ++---------------+--------------------------------------------------------------+ >> +|Return values | >> ++---------------+--------------------------------------------------------------+ >> +|Name |Description | >> ++---------------+--------------------------------------------------------------+ >> +|int32 status |See ARM SCMI Specification for status code definitions. | >> ++---------------+--------------------------------------------------------------+ >> +|uint32 version |For this revision of the specification, this value must be | >> +| |0x10000. | >> ++---------------+--------------------------------------------------------------+ >> + >> +PROTOCOL_ATTRIBUTES >> +~~~~~~~~~~~~~~~~~~~ >> + >> +message_id: 0x1 >> +protocol_id: 0x80 >> + >> ++---------------+--------------------------------------------------------------+ >> +|Return values | >> ++------------------+-----------------------------------------------------------+ >> +|Name |Description | >> ++------------------+-----------------------------------------------------------+ >> +|int32 status |See ARM SCMI Specification for status code definitions. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 attributes |Bits[31:16] Reserved, must be to 0. | >> +| |Bits[15:8] Number of agents in the system | >> +| |Bits[7:0] Number of vendor protocols in the system | >> ++------------------+-----------------------------------------------------------+ > > Thanks of clarifing this....may I ask why number of agents is reported > here too given that it is already exposed by Base protocol ? > > Not really arguing about this so much, but you will end up having to maintain this > on 2 different protocols fw side...or are they not 'agents' in the SCMI meaning ? > > Anyway, I'm fine with it, even though you dont seem to use this > anywhere. We don't use it anywhere and it looks like it was just put together so that this protocol is compliant to the spec :| > >> + >> +PROTOCOL_MESSAGE_ATTRIBUTES >> +~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> + >> +message_id: 0x2 >> +protocol_id: 0x80 >> + >> ++---------------+--------------------------------------------------------------+ >> +|Return values | >> ++------------------+-----------------------------------------------------------+ >> +|Name |Description | >> ++------------------+-----------------------------------------------------------+ >> +|int32 status |See ARM SCMI Specification for status code definitions. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 attributes |For all message id's the parameter has a value of 0. | >> ++------------------+-----------------------------------------------------------+ >> + >> +QCOM_SCMI_SET_PARAM >> +~~~~~~~~~~~~~~~~~~~ >> + >> +message_id: 0x10 >> +protocol_id: 0x80 >> + >> ++------------------+-----------------------------------------------------------+ >> +|Parameters | >> ++------------------+-----------------------------------------------------------+ >> +|Name |Description | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 ext_id |Reserved, must be zero. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 algo_low |Lower 32-bit value of the algorithm string. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 algo_high |Upper 32-bit value of the algorithm string. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 param_id |Serves as the token message id for the algorithm string | >> +| |and is used to set various parameters supported by it. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 buf[] |Serves as the payload for the specified param_id and | >> +| |algorithm string pair. | >> ++------------------+-----------------------------------------------------------+ >> +|Return values | >> ++------------------+-----------------------------------------------------------+ >> +|Name |Description | >> ++------------------+-----------------------------------------------------------+ >> +|int32 status |SUCCESS: if the param_id and buf[] is parsed successfully | >> +| |by the chosen algorithm string. | >> +| |NOT_SUPPORTED: if the algorithm string does not have any | >> +| |matches. | >> +| |INVALID_PARAMETERS: if the param_id and the buf[] passed | >> +| |is rejected by the algorithm string. | >> ++------------------+-----------------------------------------------------------+ >> + >> +QCOM_SCMI_GET_PARAM >> +~~~~~~~~~~~~~~~~~~~ >> + >> +message_id: 0x11 >> +protocol_id: 0x80 >> + >> ++------------------+-----------------------------------------------------------+ >> +|Parameters | >> ++------------------+-----------------------------------------------------------+ >> +|Name |Description | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 ext_id |Reserved, must be zero. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 algo_low |Lower 32-bit value of the algorithm string. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 algo_high |Upper 32-bit value of the algorithm string. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 param_id |Serves as the token message id for the algorithm string. | >> ++------------------+-----------------------------------------------------------+ >> +|uint32 buf[] |Serves as the payload and store of value for the specified | >> +| |param_id and algorithm string pair. | >> ++------------------+-----------------------------------------------------------+ >> +|Return values | >> ++------------------+-----------------------------------------------------------+ >> +|Name |Description | >> ++------------------+-----------------------------------------------------------+ >> +|int32 status |SUCCESS: if the param_id and buf[] is parsed successfully | >> +| |by the chosen algorithm string and the result is copied | >> +| |into buf[]. | >> +| |NOT_SUPPORTED: if the algorithm string does not have any | >> +| |matches. | >> +| |INVALID_PARAMETERS: if the param_id and the buf[] passed | >> +| |is rejected by the algorithm string. | >> ++------------------+-----------------------------------------------------------+ > > ..missed this last time...so you should add here also a field describing > the reply buf right ? (as it happenns really in your code) something > like: > > ++------------------+-----------------------------------------------------------+ > +|uint32 buf[] |Holds the payload of the result of the query. | > +| | | > ++------------------+-----------------------------------------------------------+ Thanks will get this added in the next re-spin. -Sibi > > Thanks, > Cristian