From patchwork Thu Feb 16 12:00:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Poovendhan Selvaraj X-Patchwork-Id: 654234 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 00477C636D6 for ; Thu, 16 Feb 2023 12:01:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbjBPMBJ (ORCPT ); Thu, 16 Feb 2023 07:01:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229645AbjBPMBD (ORCPT ); Thu, 16 Feb 2023 07:01:03 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C424F55E4E; Thu, 16 Feb 2023 04:01:02 -0800 (PST) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31GBha2W002231; Thu, 16 Feb 2023 12:00:48 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=xMOPHCH5HyHLJkn1lEQzevkllesvQJiVkZQGOeKlEFQ=; b=Nj+XbD0+hWMh6dsn9a0lE8SPejqpcQ7CSy3NqPo9djb7aik8yxKxj16nZ6g3PPFHfly5 UOE+oXePEIO6HG9ZLqF3+kGv0QNb3PTKp4evwH3jiA7w3hCvBgl/GEcj+WcaoIxZe6yD Jm58YnNrkVzs7yMNJwaVL74XylmUFv+0aYLlnQXWf0gJvLk8W4iC7jcgiZYbnloCGxiy 5AAvhc5wzXqWpzKCE9M7WCIvvOXiUwTBluxfzBNSC/uA3ym1P+CE9LxOg7HHgqLU64IS Z5n8fNyvYAdLR+zXdbOKHvBXTUzqZmTenF76yn4fZXId89QJvOyVg3iVll+QUJN5UQCR Dg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nse3d0ws5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:00:48 +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 31GC0lcg014343 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:00:47 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.41; Thu, 16 Feb 2023 04:00:38 -0800 From: Poovendhan Selvaraj To: , , , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH V5 1/5] dt-bindings: scm: Add compatible for IPQ9574 Date: Thu, 16 Feb 2023 17:30:08 +0530 Message-ID: <20230216120012.28357-2-quic_poovendh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230216120012.28357-1-quic_poovendh@quicinc.com> References: <20230216120012.28357-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: HECHNWqke-AZiVA2NdsloMj0PVbPBK0J X-Proofpoint-ORIG-GUID: HECHNWqke-AZiVA2NdsloMj0PVbPBK0J X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-16_08,2023-02-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0 priorityscore=1501 adultscore=0 phishscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302160102 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the scm compatible string for IPQ9574 SoC Acked-by: Krzysztof Kozlowski Signed-off-by: Poovendhan Selvaraj --- Changes in V5: - Added the Acked by tag Changes in V4: - No changes Changes in V3: - No changes 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 a66e99812b1f..868fc7e555a6 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 Thu Feb 16 12:00:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Poovendhan Selvaraj X-Patchwork-Id: 654605 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 673B5C61DA4 for ; Thu, 16 Feb 2023 12:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230102AbjBPMBZ (ORCPT ); Thu, 16 Feb 2023 07:01:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbjBPMBR (ORCPT ); Thu, 16 Feb 2023 07:01:17 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACCE57775; Thu, 16 Feb 2023 04:01:15 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31G8GPDF017275; Thu, 16 Feb 2023 12:00:57 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=j3Ox1HhtAHkVluv3aMQEIFCWdZE6IRGntv1Ch/MZhaQ=; b=DGyq8rGDinS950AKFcDMdHEBa9XMj5KsozB11XKeQZk4q3ZEAJ4SZN1yvyuLZvBdOFkD OosXLzry81uQmEctwltRCX6EM5kWCTUSnGQFj2ULET5UlnC7abp56rVzxtcU1G58FzGo K7Umx/yMoKZi4+bNGAvTiEQfoKpZxJ0Pv8/DjD5xWHV1Ebsb0dIjAT+KaxcuzI5B2WNN 7nE2csHUMPeds6p4sF7fzUQnprBt6xh0H1xIAS8sXa7PKezkKm3EkTA11V6hD4q3Qpfu 4j3XizYgNgHarcscOdQmsDTuFVYe9IV6wbsnaqVzoFi9NuKmBpRYbcUTGKdSUsx7gMQE 5g== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nsgtt8gb3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:00:57 +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 31GC0tSO015836 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:00:55 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.41; Thu, 16 Feb 2023 04:00:47 -0800 From: Poovendhan Selvaraj To: , , , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH V5 2/5] dt-bindings: mfd: Add the tcsr compatible for IPQ9574 Date: Thu, 16 Feb 2023 17:30:09 +0530 Message-ID: <20230216120012.28357-3-quic_poovendh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230216120012.28357-1-quic_poovendh@quicinc.com> References: <20230216120012.28357-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: FCYkTPuObIQzv7vGq6k6G6Nd9PsXimyP X-Proofpoint-ORIG-GUID: FCYkTPuObIQzv7vGq6k6G6Nd9PsXimyP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-16_09,2023-02-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 spamscore=0 bulkscore=0 mlxscore=0 malwarescore=0 mlxlogscore=982 suspectscore=0 clxscore=1015 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302160102 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 V5: - No changes Changes in V4: - No changes 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 From patchwork Thu Feb 16 12:00:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Poovendhan Selvaraj X-Patchwork-Id: 654233 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 7718CC636CC for ; Thu, 16 Feb 2023 12:01:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbjBPMBg (ORCPT ); Thu, 16 Feb 2023 07:01:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbjBPMBX (ORCPT ); Thu, 16 Feb 2023 07:01:23 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9F6355E66; Thu, 16 Feb 2023 04:01:19 -0800 (PST) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31G5DDuY008032; Thu, 16 Feb 2023 12:01:05 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=qmuCE0XuC6u4If+dJUH+A+bnne3nNdkEYjfIOi4UHqk=; b=oZO+y2wyuLxef8lflO4B2OvsNK48oTnV3JH8UX3PAPIzq9yGKlEpZKPFL5sinUkCMHrF E/DNqXcbKiSBk61NEQDU12xbVK0IiQuzQnJ5Zir/sdDzF1emJgp7KO9yc4yQb+kBhvOl iBvWw2lfav7VPC5WW/rNg7k3JZJ/deu9Xj59scW9xmRh/mcTaFCophfm3VEpH0kJDQ6S NBbvWcHy5uyqIuAbl8rmi7bf8U4Wmx683zVs0TOr88GwJqrty+EdhduhAFZ/zhQ4ILfB K8NH8dw3o6X26Bd9d8dgQYrYtOgWj+JWSi5BjjLZoE4tgXWTv4K/H+jXqJ0/zZIDpPlH hw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nse3d0wtn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:01:05 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 31GC1496031765 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:01:04 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.41; Thu, 16 Feb 2023 04:00:56 -0800 From: Poovendhan Selvaraj To: , , , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH V5 3/5] arm64: dts: qcom: ipq9574: Enable the download mode support Date: Thu, 16 Feb 2023 17:30:10 +0530 Message-ID: <20230216120012.28357-4-quic_poovendh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230216120012.28357-1-quic_poovendh@quicinc.com> References: <20230216120012.28357-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: EUK8J5MjTF8_2m0heTF_dVoTMvGRikid X-Proofpoint-ORIG-GUID: EUK8J5MjTF8_2m0heTF_dVoTMvGRikid X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-16_08,2023-02-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=878 mlxscore=0 impostorscore=0 priorityscore=1501 adultscore=0 phishscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302160102 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable the support for download mode to collect the crashdumps if system crashes, to debug crashes extensively. Signed-off-by: Poovendhan Selvaraj --- Changes in V5: - No changes Changes in V4: - Dropped smem related nodes from this patch - Mapped the entire TCSR_REGS region and updated the offset in qcom,dload-mode property - updated the commit message Changes in V3: - No changes arch/arm64/boot/dts/qcom/ipq9574.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi index 3bb7435f5e7f..099948f36efc 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi @@ -81,6 +81,13 @@ reg = <0x0 0x40000000 0x0 0x0>; }; + firmware { + scm { + compatible = "qcom,scm-ipq9574", "qcom,scm"; + qcom,dload-mode = <&tcsr 0x6100>; + }; + }; + pmu { compatible = "arm,cortex-a73-pmu"; interrupts = ; @@ -142,6 +149,11 @@ #power-domain-cells = <1>; }; + tcsr: syscon@1937000 { + compatible = "qcom,tcsr-ipq9574", "syscon"; + reg = <0x01937000 0x21000>; + }; + sdhc_1: mmc@7804000 { compatible = "qcom,ipq9574-sdhci", "qcom,sdhci-msm-v5"; reg = <0x07804000 0x1000>, <0x07805000 0x1000>; From patchwork Thu Feb 16 12:00:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Poovendhan Selvaraj X-Patchwork-Id: 654604 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 99F8AC636CC for ; Thu, 16 Feb 2023 12:01:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230423AbjBPMBz (ORCPT ); Thu, 16 Feb 2023 07:01:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230440AbjBPMBf (ORCPT ); Thu, 16 Feb 2023 07:01:35 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 259D355E54; Thu, 16 Feb 2023 04:01:30 -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 31G70kIY005288; Thu, 16 Feb 2023 12:01:14 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=1c0O9ryNt4kuCSoWVqDiPno8xpS9i8JyJhhy6y//76M=; b=CmNBN7lleZDnKV10Ux6QfoIrFlk5WxJ+ydumh+V2m1QQIPjedC93/UB+0nzKxhHuLes6 5nsZG4036rCUL0VNGVOKmqplDazi5kAeIrj/PmTsIZBB0hevyuVDcSIXQHsOgTx7WvSz pzU7uEUqrXfitZUXRRwkC5jnK0XDXeFBGmScoCgmEYbdOw3durKvElM8PKR34oTsrTmy uR4Sq7BEzBbswwg+DAyVkabrYE5se1qzoAY6iVxl/vWq2AI647H6ltYlzRRFhs+xdv5M XM7aIdDJb6yHVmUIhn7wKhONcL61qp5Oo/ptk6u0xhilgfZWb4N90ynvUBnfdU8L6A9d bw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ns85k9pds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:01:14 +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 31GC1CmZ016275 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:01:12 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.41; Thu, 16 Feb 2023 04:01:04 -0800 From: Poovendhan Selvaraj To: , , , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH V5 4/5] arm64: dts: qcom: ipq9574: Add SMEM support Date: Thu, 16 Feb 2023 17:30:11 +0530 Message-ID: <20230216120012.28357-5-quic_poovendh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230216120012.28357-1-quic_poovendh@quicinc.com> References: <20230216120012.28357-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: 3mmpecprqcJ4X7MqoeGIz9Vww3ExbahY X-Proofpoint-ORIG-GUID: 3mmpecprqcJ4X7MqoeGIz9Vww3ExbahY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-16_09,2023-02-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 clxscore=1015 bulkscore=0 priorityscore=1501 phishscore=0 impostorscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=856 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302160102 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the required nodes to support SMEM Signed-off-by: Poovendhan Selvaraj --- Changes in V5: - Dropped unrelated changes Changes in V4: - Added required nodes for smem support arch/arm64/boot/dts/qcom/ipq9574.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi index 099948f36efc..14a3396b0381 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi @@ -107,6 +107,13 @@ reg = <0x0 0x4a600000 0x0 0x400000>; no-map; }; + + smem@4aa00000 { + compatible = "qcom,smem"; + reg = <0x0 0x4aa00000 0x0 0x00100000>; + hwlocks = <&tcsr_mutex 0>; + no-map; + }; }; soc: soc@0 { @@ -149,6 +156,12 @@ #power-domain-cells = <1>; }; + tcsr_mutex: hwlock@1905000 { + compatible = "qcom,tcsr-mutex"; + reg = <0x01905000 0x20000>; + #hwlock-cells = <1>; + }; + tcsr: syscon@1937000 { compatible = "qcom,tcsr-ipq9574", "syscon"; reg = <0x01937000 0x21000>; From patchwork Thu Feb 16 12:00:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Poovendhan Selvaraj X-Patchwork-Id: 654232 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 6810DC636D6 for ; Thu, 16 Feb 2023 12:02:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbjBPMB6 (ORCPT ); Thu, 16 Feb 2023 07:01:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbjBPMBj (ORCPT ); Thu, 16 Feb 2023 07:01:39 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DB3753575; Thu, 16 Feb 2023 04:01:36 -0800 (PST) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31G50i77028938; Thu, 16 Feb 2023 12:01:23 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=opMcAMDYXE/o6hcfbgMpGersLTG+F14oWJ+ziWyzw9M=; b=ElaANO0QYtIsS3r+TVIyPq8Z+ihePFPros8UvWNX61C9QXnErxakhodUYb8Bc350Khh+ x6eAVQiKj9mCTxhUEHrFAa5LKCvATaOy8fOXu7Pf2j6MBiJdClwE5yoUqP1AP28w4PK3 OSP24/Scp8qfY5rnOW5hq+5UfJMdOphESJtpIk3ayq6JJq+AyGKRj6XaLltJXXwDxtCG ji1tk6TsCuExk+sH5affoEbNBXnlO6P6qLZgGdN+deeOgyLPPAjn/7WgHkdt2PMxfG8/ 7gZoYAKs+CFsACuXqPVsmue5QEWDeQgjWHZYHRvKuU2hNiRMsd0OH72JmYIt66MRVXyg bA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nrwckbdf1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:01:23 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 31GC1MSE030157 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Feb 2023 12:01:22 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.41; Thu, 16 Feb 2023 04:01:13 -0800 From: Poovendhan Selvaraj To: , , , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH V5 5/5] firmware: scm: Modify only the DLOAD bit in TCSR register for download mode Date: Thu, 16 Feb 2023 17:30:12 +0530 Message-ID: <20230216120012.28357-6-quic_poovendh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230216120012.28357-1-quic_poovendh@quicinc.com> References: <20230216120012.28357-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: -mdhW_9KDe4hvwefKfGFBerxm3NEfgtX X-Proofpoint-ORIG-GUID: -mdhW_9KDe4hvwefKfGFBerxm3NEfgtX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-16_08,2023-02-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 bulkscore=0 phishscore=0 mlxlogscore=999 clxscore=1015 impostorscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302160102 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 V5: - checking the return value in qcom_scm_set_download_mode function as suggested by Srinivas Kandagatla Changes in V4: - retain the orginal value of tcsr register when download mode is not set drivers/firmware/qcom_scm.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index 468d4d5ab550..d88c5f14bd54 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,8 @@ 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 & ~(QCOM_SCM_BOOT_SET_DLOAD_MODE); return qcom_scm_call_atomic(__scm->dev, &desc, NULL); } @@ -426,15 +427,25 @@ 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 (ret) { + dev_err(__scm->dev, + "failed to read dload mode address value: %d\n", ret); + return; + } + 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); + ret = qcom_scm_io_writel(__scm->dload_mode_addr, enable ? + dload_addr_val | QCOM_SCM_BOOT_SET_DLOAD_MODE : + dload_addr_val & ~(QCOM_SCM_BOOT_SET_DLOAD_MODE)); } else { dev_err(__scm->dev, "No available mechanism for setting download mode\n");