From patchwork Wed Feb 8 05:33:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Poovendhan Selvaraj X-Patchwork-Id: 651966 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21383C64EC5 for ; Wed, 8 Feb 2023 05:34:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbjBHFe0 (ORCPT ); Wed, 8 Feb 2023 00:34:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbjBHFeY (ORCPT ); Wed, 8 Feb 2023 00:34:24 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26E0C25E18; Tue, 7 Feb 2023 21:34:23 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3185X9RQ016002; Wed, 8 Feb 2023 05:34:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=fRUmdp7IcdM7xxpd6NYjn8DttDJLBmu2r6KzPXF28/w=; b=Qc+1litF5Stdwxm1GITU/SePeIbaMX2WNYcKdAMJHKIDxtPxI5ioMwX3TL8OgFzyAnti 5ka9vjKXvNiiomj/xFaNXSpzhAZdpVyT9ciKGtmYHh8iBwXmqfOeBwEfiwpbrc0yI1aU kb+bOByWIgOp5YFx/o3IeJkjQ1z/XFZHjF4pvA1j+caOuF618r/k5llpKAQ50K3t8YuQ 9eejiltu/+vxnuLp3PmqBIGhq9KV8T+zq9OaUQ/d2w974FE3MOS0L3MMI/jxkP0xbP1y f4f0tLG77s3s4MiL0qOFP2VjrALjd93qhIJChFIMCGI9chETZ6XWtej9rk0/uF+Cjd/R GQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nkfesbceg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Feb 2023 05:34:10 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3185Y8MQ026997 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 Feb 2023 05:34:08 GMT Received: from poovendh-linux.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.986.36; Tue, 7 Feb 2023 21:33:58 -0800 From: Poovendhan Selvaraj To: , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH V3 1/5] dt-bindings: scm: Add compatible for IPQ9574 Date: Wed, 8 Feb 2023 11:03:28 +0530 Message-ID: <20230208053332.16537-2-quic_poovendh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230208053332.16537-1-quic_poovendh@quicinc.com> References: <20230208053332.16537-1-quic_poovendh@quicinc.com> MIME-Version: 1.0 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-GUID: Rdh1domovWkH6KvepjcnJU_IhViTEcyH X-Proofpoint-ORIG-GUID: Rdh1domovWkH6KvepjcnJU_IhViTEcyH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-08_02,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 suspectscore=0 mlxlogscore=989 impostorscore=0 mlxscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302080049 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the scm compatible string for IPQ9574 SoC Signed-off-by: Poovendhan Selvaraj --- Changes in V3: - Dropped the Co-developed by tag Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml index 4193492ba73e..82120b98af56 100644 --- a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml +++ b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml @@ -27,6 +27,7 @@ properties: - qcom,scm-ipq6018 - qcom,scm-ipq806x - qcom,scm-ipq8074 + - qcom,scm-ipq9574 - qcom,scm-mdm9607 - qcom,scm-msm8226 - qcom,scm-msm8660 From patchwork Wed Feb 8 05:33:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Poovendhan Selvaraj X-Patchwork-Id: 651965 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3415EC6379F for ; Wed, 8 Feb 2023 05:35:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbjBHFfI (ORCPT ); Wed, 8 Feb 2023 00:35:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbjBHFe7 (ORCPT ); Wed, 8 Feb 2023 00:34:59 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E28272D170; Tue, 7 Feb 2023 21:34:50 -0800 (PST) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3185Vf9C014283; Wed, 8 Feb 2023 05:34:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=ut718roIadzdaNnZsWxLsjpG5owC/eAxrCb2vzzvBN0=; b=BJoJ/kqYUZFfPZ5JJbUXOLTqvgkqcPcnK8hz81evfkUE5f6qrFCkDCoNz8Si9WOUdqbR iQL9rP/HBA2NO+xygxLqvhfdYp39bypaW7a8P/4tRCNQ+sfI63adNx07P3wrE1+6jCpX uGbiYuKMyKbccqZ03R4RRBRNbmxBlrERkGu97uyccVyo7R+kqWHEADVbSOFYBBq1h3ax 4XsOQ6yZfqoy+342I6aGGfw4KDaFrktsn8ImnMMVEwWdNBvx/5y48OpmSXUuMSCa2vg2 BvADGKjr44PlXg80REffJbUej9CZ4eLXTwtThav6ehHDVwa6NRyWCnocYoPAv3EX1nTs wQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nkga2u7f0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Feb 2023 05:34:29 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3185YS6G027211 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 Feb 2023 05:34:28 GMT Received: from poovendh-linux.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.986.36; Tue, 7 Feb 2023 21:34:18 -0800 From: Poovendhan Selvaraj To: , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH V3 3/5] firmware: scm: Modify only the DLOAD bit in TCSR register for download mode Date: Wed, 8 Feb 2023 11:03:30 +0530 Message-ID: <20230208053332.16537-4-quic_poovendh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230208053332.16537-1-quic_poovendh@quicinc.com> References: <20230208053332.16537-1-quic_poovendh@quicinc.com> MIME-Version: 1.0 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-GUID: fKk0KDAQvH98jx30_BgJZCpLaw7nQ0Re X-Proofpoint-ORIG-GUID: fKk0KDAQvH98jx30_BgJZCpLaw7nQ0Re X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-08_02,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 clxscore=1015 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302080049 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org CrashDump collection is based on the DLOAD bit of TCSR register. To retain other bits, we read the register and modify only the DLOAD bit as the other bits have their own significance. Co-developed-by: Anusha Rao Signed-off-by: Anusha Rao Co-developed-by: Kathiravan Thirumoorthy Signed-off-by: Kathiravan Thirumoorthy Signed-off-by: Poovendhan Selvaraj --- Changes in V3: - retain the value of tcsr register when download mode is not set drivers/firmware/qcom_scm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index 2000323722bf..2ad7ccf0abcd 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -407,7 +407,7 @@ int qcom_scm_set_remote_state(u32 state, u32 id) } EXPORT_SYMBOL(qcom_scm_set_remote_state); -static int __qcom_scm_set_dload_mode(struct device *dev, bool enable) +static int __qcom_scm_set_dload_mode(struct device *dev, u32 val, bool enable) { struct qcom_scm_desc desc = { .svc = QCOM_SCM_SVC_BOOT, @@ -417,7 +417,7 @@ static int __qcom_scm_set_dload_mode(struct device *dev, bool enable) .owner = ARM_SMCCC_OWNER_SIP, }; - desc.args[1] = enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0; + desc.args[1] = enable ? val | QCOM_SCM_BOOT_SET_DLOAD_MODE : val; return qcom_scm_call_atomic(__scm->dev, &desc, NULL); } @@ -426,15 +426,19 @@ static void qcom_scm_set_download_mode(bool enable) { bool avail; int ret = 0; + u32 dload_addr_val; avail = __qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_BOOT, QCOM_SCM_BOOT_SET_DLOAD_MODE); + ret = qcom_scm_io_readl(__scm->dload_mode_addr, &dload_addr_val); + if (avail) { - ret = __qcom_scm_set_dload_mode(__scm->dev, enable); + ret = __qcom_scm_set_dload_mode(__scm->dev, dload_addr_val, enable); } else if (__scm->dload_mode_addr) { ret = qcom_scm_io_writel(__scm->dload_mode_addr, - enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0); + enable ? dload_addr_val | + QCOM_SCM_BOOT_SET_DLOAD_MODE : dload_addr_val); } else { dev_err(__scm->dev, "No available mechanism for setting download mode\n"); From patchwork Wed Feb 8 05:33:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Poovendhan Selvaraj X-Patchwork-Id: 651964 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1842C636CC for ; Wed, 8 Feb 2023 05:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229460AbjBHFfX (ORCPT ); Wed, 8 Feb 2023 00:35:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbjBHFfI (ORCPT ); Wed, 8 Feb 2023 00:35:08 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 338B1367DF; Tue, 7 Feb 2023 21:35:03 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3185WJQP013075; Wed, 8 Feb 2023 05:34:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=UBxzIkc7lP6EOGu67rfNBuaVZ3+fhBWSLMED84IEq9A=; b=K4zC9eii3f0UIQpBRPUUJ15ZyxCH8ejiCtXhgbzC4IbAYmiNxqlLYsrDMd/w9I3XpN/e L5++iwEG5dZRHCdNKvrzBsTJ8UR6G7TYR/19fTt2DMAQYXIQe+zTDuuhBDClsNc4WvSn wNuHvNTNuN5IeOzKZUNkqMLTLgdeV+OdJz7nyjmsPs5fQfnz3ZI5+7+Rd++dRAPnmIGZ BeuW0rPg9prvopVOtxJi3MKUSmKC6kDNHGahTAKDyGbDlsV2f0tVIQ2APcIsgIegobDo nhWsblIUZEuUsc45ItHfYnh6H7Uvbh+vPZPtdqzRAFG4nkZ7wep5zO1lllfW04fG5F3i aw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nkgafk8tc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Feb 2023 05:34:50 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3185Ynbu023139 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 Feb 2023 05:34:49 GMT Received: from poovendh-linux.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.986.36; Tue, 7 Feb 2023 21:34:38 -0800 From: Poovendhan Selvaraj To: , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH V3 5/5] dt-bindings: mfd: Add the tcsr compatible for IPQ9574 Date: Wed, 8 Feb 2023 11:03:32 +0530 Message-ID: <20230208053332.16537-6-quic_poovendh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230208053332.16537-1-quic_poovendh@quicinc.com> References: <20230208053332.16537-1-quic_poovendh@quicinc.com> MIME-Version: 1.0 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-GUID: TPmiLsovj8CDWAZnIRrI5EHFk7xbkoiz X-Proofpoint-ORIG-GUID: TPmiLsovj8CDWAZnIRrI5EHFk7xbkoiz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-08_01,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 adultscore=0 clxscore=1015 bulkscore=0 spamscore=0 mlxlogscore=961 mlxscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302080049 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the tcsr compatible string for IPQ9574 SoC Acked-by: Krzysztof Kozlowski Signed-off-by: Poovendhan Selvaraj --- Changes in V3: - Updated the subject - Added the Acked by tag Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml index 2eeebe920e6e..203fc890c9a3 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml +++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml @@ -31,6 +31,7 @@ properties: - qcom,tcsr-ipq5332 - qcom,tcsr-ipq6018 - qcom,tcsr-ipq8064 + - qcom,tcsr-ipq9574 - qcom,tcsr-mdm9615 - qcom,tcsr-msm8226 - qcom,tcsr-msm8660