From patchwork Mon Mar 6 23:11:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melody Olvera X-Patchwork-Id: 65171 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2127363wrd; Mon, 6 Mar 2023 15:18:37 -0800 (PST) X-Google-Smtp-Source: AK7set9tcvBuPEurZQTSdDbh+RUqHozVso9jtr3VG1BAKcBekXqYvbtIqS1sziDElspiDgRJAr54 X-Received: by 2002:a17:906:76c5:b0:8aa:c0a4:2aa5 with SMTP id q5-20020a17090676c500b008aac0a42aa5mr12238394ejn.16.1678144717125; Mon, 06 Mar 2023 15:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678144717; cv=none; d=google.com; s=arc-20160816; b=m8TZpXLYPookuOIT9WdMh8AtypbGcq1JVzdqjwZtu8C87cRHqHzibDQVrHo4hSzfMm biQxjjeH5ptAYvHfG5JRrLwGRVudCXgTuP6Jfj8D+Z6h2wPcpvFbLqKNT9L+flLDgP61 gqgBWAbGf7AHeuxKPW9BvpzssmGEEIahObWF0n56EibWYHq1Ly1qpbWL0VgTJ0vXkXTL 1QCfbjpWO9zcK0moBGz1DkYdPNRI+zFy/iCy6g3yPDrYnYBcCc6m+4Y0HkmfcbUVxYIn jBE6qvA6p0/JkK+7sOQ1DlrnWTggJKm8rrn+GXlv0ySc8TDyD8ws4kW/0uX2kL/UdJD6 U5Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YT3dSWd4wzeR2hFfsAe6g5r/y81mcW4u9HCzfn3BK0k=; b=KpeVf7e3a9x4AnN0WlNFYL+s/ZsB7Yok4Zs837B2cWVhmxXD+kuUsDqzE0lklxExs3 AXC9lygujtmvFkR/0yUJNl3BWVBcHu8AXKm4S8CjjcwU7MwxsT5gglBvgEMCU1ovAjwO rh8eok217APo9L2HHCFgI7J4PslB3kwO7Kd+BCEDI2ldMNboDnfwgcVjp/tKUj6pO6Cp 41rf8r+SvJoyBhrOGoY25j2zZWfE4E186bUC7LSIaYQYKoQZIwSkgD6Z7/6ZcygTXJSA zjpx/WuGl71dElB8pabqaJBFAgNw3MAqU8QU2qXjJ9LluN37TF8fC1dZhqJrW1NqzimH horw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=WPdwFLat; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kw18-20020a170907771200b008e10c06e904si11785713ejc.414.2023.03.06.15.18.13; Mon, 06 Mar 2023 15:18:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=WPdwFLat; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230170AbjCFXMa (ORCPT + 99 others); Mon, 6 Mar 2023 18:12:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbjCFXM2 (ORCPT ); Mon, 6 Mar 2023 18:12:28 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C86D6BC18; Mon, 6 Mar 2023 15:12:26 -0800 (PST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 326Mtp14026904; Mon, 6 Mar 2023 23:12:22 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-transfer-encoding : content-type; s=qcppdkim1; bh=YT3dSWd4wzeR2hFfsAe6g5r/y81mcW4u9HCzfn3BK0k=; b=WPdwFLatq0HXfiTTUaU0yWoVmC+/eO5LTV1AeqgO8cDct8HnKLAHbE/p4RNtkbGWhUUD NQF4mCTv26CJZcicsOlq2Fk7S8GjMXoQH3IqjVpmTTXst3oxgb+ubndzyQ/veO8+VbEO SqMcFJkyvD47AEq5HOPVhsbnQkfWynmsMXc7xsA7GNKAKqTo9TsVsZIMQ4ejZzacuehN b1hQCjWr6A1XCuGEnsITG81XTj0+CRt7EX96kTXjc/HwF31CYeZNpPBURsCfsNxvJvdj j6ue3J8TxwdsaW+A2pgDAR58K5b1nlx9Te/W5+DHJX7788ltQEi2Bo5Lvi3qVp+tFzAL Xg== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p41876b0h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 23:12:22 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 326NCLTq019293 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 6 Mar 2023 23:12:21 GMT Received: from hu-molvera-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 6 Mar 2023 15:12:21 -0800 From: Melody Olvera To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jassi Brar , Mathieu Poirier , Robert Marko , Guru Das Srinagesh CC: Konrad Dybcio , Manivannan Sadhasivam , Melody Olvera , , , , , "Krzysztof Kozlowski" Subject: [PATCH v2 1/7] dt-bindings: firmware: qcom,scm: Update QDU1000/QRU1000 compatible Date: Mon, 6 Mar 2023 15:11:56 -0800 Message-ID: <20230306231202.12223-2-quic_molvera@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230306231202.12223-1-quic_molvera@quicinc.com> References: <20230306231202.12223-1-quic_molvera@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: hq1r_VGPSo69cQ0NFwll1vplOuwEmR1O X-Proofpoint-ORIG-GUID: hq1r_VGPSo69cQ0NFwll1vplOuwEmR1O X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_14,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 adultscore=0 priorityscore=1501 mlxscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060202 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759662274748569249?= X-GMAIL-MSGID: =?utf-8?q?1759662274748569249?= Update compatible for QDU1000 and QRU1000 to include the interconnect these devices have. Signed-off-by: Melody Olvera Acked-by: Krzysztof Kozlowski --- 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..d8fdb00738fb 100644 --- a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml +++ b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml @@ -166,6 +166,7 @@ allOf: compatible: contains: enum: + - qcom,scm-qdu1000 - qcom,scm-sm8450 - qcom,scm-sm8550 then: From patchwork Mon Mar 6 23:11:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melody Olvera X-Patchwork-Id: 65178 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2131243wrd; Mon, 6 Mar 2023 15:29:09 -0800 (PST) X-Google-Smtp-Source: AK7set/SfiU+hKb2bKYXRP9ag5BXqWUeu70sGlFMfGJj0okYqxWPnFIPK4ZWCWlwviaWFQvyZBUD X-Received: by 2002:a05:6a20:12c5:b0:cd:9654:d97d with SMTP id v5-20020a056a2012c500b000cd9654d97dmr13881280pzg.57.1678145349181; Mon, 06 Mar 2023 15:29:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678145349; cv=none; d=google.com; s=arc-20160816; b=QIEjSPxRBUafckd9k8/sH3SlSgVvH1zrxdaQv/GttpwTeFuMfl7JFLJCRNmaKMR13k BmzFMh50i3kt5OHB29ZdBai/JpUHPY7tDfAK84TwMsAIvZZTki51OuR68QmccK9pzEdk VgEtgR60l5LM9S0k4vAs5egimXokCAYk3MPt6smq47Qf55tQanhk/efZGZOTtZuYBhzU jF+kq5fvCy04YBNJMcrzP//RBdeSOJFGLGKhVL17Z3uZyNljWppkUCf65TToIzOQFa8U hCyOTGPx5oQ49GuyV5Uj5VHS7yBICXNNlByY7SjVXYP3NSX9V2kLN1bBkJojplofcd8V i0Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O6GdyKyp2MozsFksEtMpVzRMYT5mBVUw4JRkIIyY3lc=; b=Xg2Qyy8eRmnEKagJJ2DVuggSqTzHbSzcYG+e/6Y+7nNHCjF9CI5ZwJORbpRgBmtRwp rA0TQ5aXnn7mZfzTvq6dOgVnUFlxgvv9qq7nTf0NSwLPLKN5CEGq04dB1VT0sqolRgC/ CMW8hfg1TSNWa/hvxygkzezFrKWM+PPzMBuOpeWBkpG2ZcGcj1ihymug+NgymSBwIYRI XLaIJX3XDINJpcXoDJk1m4mG5sX2UgDWWApa7K6no4W/tE1RPRgF6TSPDPiuROCxrOSZ gFQUjuES5gEaSANkxaoKGTJOq9XezEmH/UKrV0w8f37ujyMSGf8WZI9UOFmxFl6JZlEk uozQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GUZVk6pB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t201-20020a635fd2000000b005037c243053si9708562pgb.746.2023.03.06.15.28.56; Mon, 06 Mar 2023 15:29:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GUZVk6pB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbjCFXMe (ORCPT + 99 others); Mon, 6 Mar 2023 18:12:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230115AbjCFXM2 (ORCPT ); Mon, 6 Mar 2023 18:12:28 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4520B6BDE4; Mon, 6 Mar 2023 15:12:27 -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 326Mc5Wb007664; Mon, 6 Mar 2023 23:12: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-transfer-encoding : content-type; s=qcppdkim1; bh=O6GdyKyp2MozsFksEtMpVzRMYT5mBVUw4JRkIIyY3lc=; b=GUZVk6pBzIa01OBnR9+x91Eq2tDJNEaEqeJYeMLLkoK/EbsMPC3p6Mwey1D0dkh/9B+f JpPYsMaghB+paKYTgPH62LSZdEkw/UU9S6wg/ed0pV8DgcdNWfEyHksKJrgX9Bra6NdA GtubBwTy6TeNGyJKMcSpcqJV3AKWBPmDPvZtu9L3v9Fu4te0rGC/ZP1ByTqA/x6ZrU/8 81audvynnFOV8eYZD7YM20BW7I/Jh/q1ScmXpuzsK1QqvaBubMoD++umIyOuW6BnDadK O+3KX6IhGdJoFTzRjVA9k1IBP//4GfvO2mjv5ppvfVBY3VpFGqPY5EXhD4kQmtKl9rvm xw== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p417jx9aq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 23:12:23 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 326NCM6t014983 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 6 Mar 2023 23:12:22 GMT Received: from hu-molvera-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 6 Mar 2023 15:12:21 -0800 From: Melody Olvera To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jassi Brar , Mathieu Poirier , Robert Marko , Guru Das Srinagesh CC: Konrad Dybcio , Manivannan Sadhasivam , Melody Olvera , , , , Subject: [PATCH v2 2/7] dt-bindings: soc: qcom: aoss: Document QDU1000/QRU1000 compatible Date: Mon, 6 Mar 2023 15:11:57 -0800 Message-ID: <20230306231202.12223-3-quic_molvera@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230306231202.12223-1-quic_molvera@quicinc.com> References: <20230306231202.12223-1-quic_molvera@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: mNfck7xCD4ZUrQNg15fjSya_3dCLuQ7B X-Proofpoint-ORIG-GUID: mNfck7xCD4ZUrQNg15fjSya_3dCLuQ7B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_14,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 clxscore=1015 adultscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 suspectscore=0 priorityscore=1501 spamscore=0 mlxlogscore=866 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060202 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759662937807748223?= X-GMAIL-MSGID: =?utf-8?q?1759662937807748223?= Add compatible for QDU1000 and QRU1000 aoss devices. Signed-off-by: Melody Olvera Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml index ab607efbb64c..798f15588ee2 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml @@ -25,6 +25,7 @@ properties: compatible: items: - enum: + - qcom,qdu1000-aoss-qmp - qcom,sc7180-aoss-qmp - qcom,sc7280-aoss-qmp - qcom,sc8180x-aoss-qmp From patchwork Mon Mar 6 23:11:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melody Olvera X-Patchwork-Id: 65177 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2128444wrd; Mon, 6 Mar 2023 15:21:09 -0800 (PST) X-Google-Smtp-Source: AK7set/e7FBvCyTUvO5i8cvKtBOwuk+6azfsM5pU+AJNM8hV3NjGkzxRrcNnmWZkiwk7tl5+WqRh X-Received: by 2002:a17:906:3804:b0:88f:a236:69e6 with SMTP id v4-20020a170906380400b0088fa23669e6mr11712135ejc.7.1678144869805; Mon, 06 Mar 2023 15:21:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678144869; cv=none; d=google.com; s=arc-20160816; b=VunscNqJMSbi5GEPn4q6m34u9eX/waTErsK4b561hsmyGvuHm2JtoBBrhCT9PaeFIP GKOXwj820cQeEHc9YHHu+50DNDA75QeK+i6IZNV4M7zaI9Y7Qk9N5an1cyKHwepnaARy pZn56uVjrGdwMlikCG+zL9m733loZQD71xWoJwYGYUlBx1dC1VRnQLXp+vRUIQSmfkmR hLoukmFYQypgVMKDmzk10LtaV2j9C9+9p1M9KKPFBX/3M8xVRDUFAIfxsaK/zWgSbj/k V3fQsAKkVHjQnkLRMEZ/8aCOWtbEgdFqTmy4P2FGZsojQIeYlnGIPyFuv9U+kGHH/p+N IVog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=omULz/2yvQYLDBSp/17RkFqhTWJMTk4HL7QPtaR04wk=; b=PbdleuVEQu15SX+LPxLpoJO7Ht/vxGV5NnVs3CvnVzd1wb1c7fSIbGfAPvMbjNO+R6 Q2/BN72fm/nA4k4CjfjNodR9EB5tnGBmi7ZdsxZMPQLPjOgymW3I0JGXDCtkUM3SR4Ic J4ZRjrR39b1oaDdCWiSLZGwff8cXWZe0liBD248mvSLVuzStJHaPrsSIpPOaXCqwvmWA h5IWbKey3LXsQvLnq8J/cF9caMwxaViT8heShBsS5Qorkgc1vQQHoZgGsXK1HXM6g6bH 0oIYwdfCEn8ytTZazVM3WxIT+Ybur1suyJZM6d0YK3PW/2o3Kw8TOZo6NDlaNJPypJW7 bL5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iduoyJeM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a17090634c900b008cb1699ca92si462497ejb.142.2023.03.06.15.20.45; Mon, 06 Mar 2023 15:21:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iduoyJeM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230240AbjCFXMw (ORCPT + 99 others); Mon, 6 Mar 2023 18:12:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbjCFXM3 (ORCPT ); Mon, 6 Mar 2023 18:12:29 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85ECF2386A; Mon, 6 Mar 2023 15:12:27 -0800 (PST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 326N5XmO021527; Mon, 6 Mar 2023 23:12: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-transfer-encoding : content-type; s=qcppdkim1; bh=omULz/2yvQYLDBSp/17RkFqhTWJMTk4HL7QPtaR04wk=; b=iduoyJeMbAhgyRXCh0HCwGZfe7dTaZ0sl03jE3/C5I38YhgZlLlG1jYnJcm69YgmZ53S cfUI6Ekt8WW1lUUn8LPWoUT210kER56tEjkiUpINjjy9anKEDic4pJGtHGjrq8l3SRuY BCEJ0CLMHOdUghNEOekoUiyuBl3CD3T1HXnh2OSIhBwTzkwRCVrYkuw3AAhJrip8snhP DMArYcRn1iJttFVlA8t3fSsOU+pthmGs/Sx/ZgC6vafe/PQRLxiER35yMD1ljoquMSR4 IaQAtbr0jpuwpBZ47dI1LB0dfirBnQN+R/FxQHoXWjTmoD9R23KL9pFDqbhZqaPP2Wzj 6g== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p41876b0k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 23:12:23 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 326NCM5Z019349 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 6 Mar 2023 23:12:22 GMT Received: from hu-molvera-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 6 Mar 2023 15:12:22 -0800 From: Melody Olvera To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jassi Brar , Mathieu Poirier , Robert Marko , Guru Das Srinagesh CC: Konrad Dybcio , Manivannan Sadhasivam , Melody Olvera , , , , Subject: [PATCH v2 3/7] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices Date: Mon, 6 Mar 2023 15:11:58 -0800 Message-ID: <20230306231202.12223-4-quic_molvera@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230306231202.12223-1-quic_molvera@quicinc.com> References: <20230306231202.12223-1-quic_molvera@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 3JBtrnWMyHSwr2MPF6klsZjiIMXUvrow X-Proofpoint-ORIG-GUID: 3JBtrnWMyHSwr2MPF6klsZjiIMXUvrow X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_14,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 priorityscore=1501 mlxscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=952 bulkscore=0 suspectscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060202 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759662434726699118?= X-GMAIL-MSGID: =?utf-8?q?1759662434726699118?= This documents the compatible for the component used to boot the MPSS on the QDU1000 and QRU1000 SoCs. The QDU1000 and QRU1000 mpss boot process now requires the specification of an RMB register space to complete the handshake needed to start or attach the mpss. Signed-off-by: Melody Olvera --- .../remoteproc/qcom,qdu1000-mpss-pas.yaml | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml new file mode 100644 index 000000000000..9cb4296c1fa6 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml @@ -0,0 +1,130 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/remoteproc/qcom,qdu1000-mpss-pas.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QDU1000 Modem Peripheral Authentication Service + +maintainers: + - Melody Olvera + +description: + Qualcomm QDU1000 SoC Peripheral Authentication Service loads and boots firmware + on the Qualcomm DSP Hexagon core. + +properties: + compatible: + enum: + - qcom,qdu1000-mpss-pas + + reg: + maxItems: 2 + + clocks: + items: + - description: XO clock + + clock-names: + items: + - const: xo + + qcom,qmp: + $ref: /schemas/types.yaml#/definitions/phandle + description: Reference to the AOSS side-channel message RAM. + + smd-edge: false + + firmware-name: + $ref: /schemas/types.yaml#/definitions/string-array + items: + - description: Firmware name of the Hexagon core + - description: Firmware name of the Hexagon Devicetree + + memory-region: + items: + - description: Memory region for main Firmware authentication + - description: Memory region for Devicetree Firmware authentication + - description: DSM Memory region + + interrupts: + minItems: 6 + + interrupt-names: + minItems: 6 + + interconnects: + minItems: 1 + + power-domains: + items: + - description: CX power domain + - description: MSS power domain + + power-domain-names: + items: + - const: cx + - const: mss + +required: + - compatible + - reg + +allOf: + - $ref: /schemas/remoteproc/qcom,pas-common.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + #include + #include + + remoteproc@4080000 { + compatible = "qcom,qdu1000-mpss-pas"; + reg = <0x4080000 0x4040>, + <0x4180000 0x1000>; + + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-names = "xo"; + + interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 1 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 2 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 3 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 7 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", "handover", + "stop-ack", "shutdown-ack"; + + memory-region = <&mpss_mem>, <&dtb_mpss_mem>, <&mpss_dsm_mem>; + + firmware-name = "qcom/qdu1000/modem.mbn", + "qcom/qdu1000/modem_dtb.mbn"; + + power-domains = <&rpmhpd QDU1000_CX>, + <&rpmhpd QDU1000_MSS>; + power-domain-names = "cx", "mss"; + + interconnects = <&mc_virt MASTER_LLCC &mc_virt SLAVE_EBI1>; + + qcom,qmp = <&aoss_qmp>; + + qcom,smem-states = <&smp2p_adsp_out 0>; + qcom,smem-state-names = "stop"; + + glink-edge { + interrupts-extended = <&ipcc IPCC_CLIENT_MPSS + IPCC_MPROC_SIGNAL_GLINK_QMP + IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc IPCC_CLIENT_MPSS IPCC_MPROC_SIGNAL_GLINK_QMP>; + + label = "modem"; + qcom,remote-pid = <2>; + + }; + }; From patchwork Mon Mar 6 23:11:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melody Olvera X-Patchwork-Id: 65176 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2128371wrd; Mon, 6 Mar 2023 15:20:58 -0800 (PST) X-Google-Smtp-Source: AK7set8tq9a5CbArqNObCvG2jPTH9W4I1Xz3nMEhIVOZxpQAUkwLxnz3mq3gLk7f2OUysiBIrsoX X-Received: by 2002:a17:906:128e:b0:906:3b1b:1ad9 with SMTP id k14-20020a170906128e00b009063b1b1ad9mr12288572ejb.14.1678144857959; Mon, 06 Mar 2023 15:20:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678144857; cv=none; d=google.com; s=arc-20160816; b=zux6JY0TmeGiVE4FfqGt6iPLLc0/hDFD2UxvU0N1nz8l9WLJKj6vthiAYi4M6uhvA8 Sbj9cOouVv5CauQe2n9M2wR51aGvG25H3bfi2fw5iQ9+9by+WHpZGnz5ZlFxtQhSnKGo OzHTY/KVlLtazXUmwtSAd95isy7pEhDsI62R7ppXjkolPOwG7ob7ZAXblGTGfM63ngbn 4t6EZBXeh8ATk2NmA48zIpTGjfiDrGvMrulsrWIcViwqFgacwMOglw8Dr5aiCdBJbuVV eslgTbrFGGFiVQ/VFmhnfKbmoCvyI0I2Q8YGkUHqFx0Cbtg5VDARqymmibHvtffUrDlI Sddw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0LZD2cM+vYQX60C1XUR70llZ7jY3+Ms+wGaNHJaJUmc=; b=Fefx2uWTLtKfKqBB2ALsdpMwrtyLzmaH0bXnqaT1CK3Hki074VNDmlpByHLDVACwrr TFgn52min+FT/5IKjO8L2bPV1rOexkAwZEXGQ5YltgZNLb6aLPDc7k60StIDYRB9AnaP 3RXWObVNKtBPe8yQTz59l0tClYerntNbjTn2fWt7II0IIs1jrq7cIJOdKMP6HMcsLNSE rWaw2tm7bKCU1jMZtW655iOlJPsJz7Icr1Bnti6uJf8VlIE2nH/x8e8B/bQAwsg2Feks 4xBr8UdriOEsmu6I535uShfC/NUqjsYv5usvPRxIaLmpJxmtLF0MyhWpG+9Ft6UgP3Be it+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=l+GUdoFY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f6-20020a056402160600b004ad0993e54esi1432631edv.487.2023.03.06.15.20.33; Mon, 06 Mar 2023 15:20:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=l+GUdoFY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbjCFXMq (ORCPT + 99 others); Mon, 6 Mar 2023 18:12:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbjCFXM3 (ORCPT ); Mon, 6 Mar 2023 18:12:29 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEB5A6BDC8; Mon, 6 Mar 2023 15:12:27 -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 326LQXct006183; Mon, 6 Mar 2023 23:12:24 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-transfer-encoding : content-type; s=qcppdkim1; bh=0LZD2cM+vYQX60C1XUR70llZ7jY3+Ms+wGaNHJaJUmc=; b=l+GUdoFYUDJSz1JbKkqnaUpOIK3ugIxTILNKXyxxZ6Md4M1Gu5Iy/u9HPPxxMGxUDtHy Eo1IvqTVhSNhN8sP8r45k8YpsV+OfezfDNuDWukN0sT3r8wsLbPwuWABqd+viPCfWZr+ pyGKGIiGPRGMRKIa447JnfUYabN34dvXankcO7Vfvi1+BdgXvDQDYmQjwPsFCtTk0JHg o9UZ/Gx/2HO3A6ohPeHBfHzBADYEn6/sLI12Bwk338p23k0GL47AtX8R52WR8RgHILRP chGJM0Tlnu4b2/5wYv6eb+cyB3fpBuBuurwCuS+8PRQyD2ZrDzbKlMeygcUN64BV4lBf QA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p419169fv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 23:12:23 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 326NCN0r019355 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 6 Mar 2023 23:12:23 GMT Received: from hu-molvera-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 6 Mar 2023 15:12:22 -0800 From: Melody Olvera To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jassi Brar , Mathieu Poirier , Robert Marko , Guru Das Srinagesh CC: Konrad Dybcio , Manivannan Sadhasivam , Melody Olvera , , , , , "Gokul Krishna Krishnakumar" Subject: [PATCH v2 4/7] soc: qcom: mdt_loader: Enhance split binary detection Date: Mon, 6 Mar 2023 15:11:59 -0800 Message-ID: <20230306231202.12223-5-quic_molvera@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230306231202.12223-1-quic_molvera@quicinc.com> References: <20230306231202.12223-1-quic_molvera@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: BOP1_PX7PyL_XNcVM61tBneq-1Ly_QBQ X-Proofpoint-GUID: BOP1_PX7PyL_XNcVM61tBneq-1Ly_QBQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_14,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 clxscore=1015 impostorscore=0 bulkscore=0 spamscore=0 phishscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060202 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759662422300219125?= X-GMAIL-MSGID: =?utf-8?q?1759662422300219125?= From: Gokul Krishna Krishnakumar When booting with split binaries, it may be that the offset of the first program header lies inside the mdt's filesize, in this case the loader would incorrectly assume that the bins were not split. The loading would then continue on and fail for split bins. This change updates the logic used by the mdt loader to understand whether the firmware images are split or not by checking if each programs header's segment lies within the file or not. Signed-off-by: Gokul Krishna Krishnakumar Signed-off-by: Melody Olvera --- drivers/soc/qcom/mdt_loader.c | 64 +++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/drivers/soc/qcom/mdt_loader.c b/drivers/soc/qcom/mdt_loader.c index 33dd8c315eb7..3aadce299c02 100644 --- a/drivers/soc/qcom/mdt_loader.c +++ b/drivers/soc/qcom/mdt_loader.c @@ -31,6 +31,26 @@ static bool mdt_phdr_valid(const struct elf32_phdr *phdr) return true; } +static bool qcom_mdt_bins_are_split(const struct firmware *fw) +{ + const struct elf32_phdr *phdrs; + const struct elf32_hdr *ehdr; + uint64_t seg_start, seg_end; + int i; + + ehdr = (struct elf32_hdr *)fw->data; + phdrs = (struct elf32_phdr *)(ehdr + 1); + + for (i = 0; i < ehdr->e_phnum; i++) { + seg_start = phdrs[i].p_offset; + seg_end = phdrs[i].p_offset + phdrs[i].p_filesz; + if (seg_start > fw->size || seg_end > fw->size) + return true; + } + + return false; +} + static ssize_t mdt_load_split_segment(void *ptr, const struct elf32_phdr *phdrs, unsigned int segment, const char *fw_name, struct device *dev) @@ -167,23 +187,13 @@ void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len, /* Copy ELF header */ memcpy(data, fw->data, ehdr_size); - if (ehdr_size + hash_size == fw->size) { - /* Firmware is split and hash is packed following the ELF header */ - hash_offset = phdrs[0].p_filesz; - memcpy(data + ehdr_size, fw->data + hash_offset, hash_size); - } else if (phdrs[hash_segment].p_offset + hash_size <= fw->size) { - /* Hash is in its own segment, but within the loaded file */ + + if (qcom_mdt_bins_are_split(fw)) { + ret = mdt_load_split_segment(data + ehdr_size, phdrs, hash_segment, fw_name, dev); + } else { hash_offset = phdrs[hash_segment].p_offset; memcpy(data + ehdr_size, fw->data + hash_offset, hash_size); - } else { - /* Hash is in its own segment, beyond the loaded file */ - ret = mdt_load_split_segment(data + ehdr_size, phdrs, hash_segment, fw_name, dev); - if (ret) { - kfree(data); - return ERR_PTR(ret); - } } - *data_len = ehdr_size + hash_size; return data; @@ -270,6 +280,7 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw, phys_addr_t min_addr = PHYS_ADDR_MAX; ssize_t offset; bool relocate = false; + bool is_split; void *ptr; int ret = 0; int i; @@ -277,6 +288,7 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw, if (!fw || !mem_region || !mem_phys || !mem_size) return -EINVAL; + is_split = qcom_mdt_bins_are_split(fw); ehdr = (struct elf32_hdr *)fw->data; phdrs = (struct elf32_phdr *)(ehdr + 1); @@ -330,22 +342,16 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw, ptr = mem_region + offset; - if (phdr->p_filesz && phdr->p_offset < fw->size && - phdr->p_offset + phdr->p_filesz <= fw->size) { - /* Firmware is large enough to be non-split */ - if (phdr->p_offset + phdr->p_filesz > fw->size) { - dev_err(dev, "file %s segment %d would be truncated\n", - fw_name, i); - ret = -EINVAL; - break; + if (phdr->p_filesz) { + if (!is_split) { + /* Firmware is large enough to be non-split */ + memcpy(ptr, fw->data + phdr->p_offset, phdr->p_filesz); + } else { + /* Firmware not large enough, load split-out segments */ + ret = mdt_load_split_segment(ptr, phdrs, i, fw_name, dev); + if (ret) + break; } - - memcpy(ptr, fw->data + phdr->p_offset, phdr->p_filesz); - } else if (phdr->p_filesz) { - /* Firmware not large enough, load split-out segments */ - ret = mdt_load_split_segment(ptr, phdrs, i, fw_name, dev); - if (ret) - break; } if (phdr->p_memsz > phdr->p_filesz) From patchwork Mon Mar 6 23:12:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melody Olvera X-Patchwork-Id: 65175 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2128354wrd; Mon, 6 Mar 2023 15:20:56 -0800 (PST) X-Google-Smtp-Source: AK7set/uenDbGB6EMweXLEExLNpQRFt7B6B4EAvxjRfGr+g9YrkKww4XxszdGk3c6GTJj1/r1xFp X-Received: by 2002:a17:906:1396:b0:8b0:fc14:bbcb with SMTP id f22-20020a170906139600b008b0fc14bbcbmr12089927ejc.42.1678144856132; Mon, 06 Mar 2023 15:20:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678144856; cv=none; d=google.com; s=arc-20160816; b=iYU6uPoDLIK+fJwQ9o5DORDcBsaJ22TVNqaHInvJ0lz/hgH4g0ocSGGBxge+zyj8DI XPIT+utpXvsMy1Ja7t0IdrxV/puws0GY1lwgVU3nDYWDVaak+rJQrqAGZF0K3wU6Kqtk Us1J6ij8ApQQzSxqGmzPyzR4mggMFWKdPuONSlQ2d2mgo6AZ/i/9CTsiuwXHd2p0LlMU OZnXD7b8bJUQG7Y3j+MxS4uSucpWoAZUgqarkrcWTk662tvnBTzbDB/ZJGum6BQMLHLT gfh5ZzyZ8o4W61i6fETRuCjLpVX7GusQokCnzC1ONTmr3na+8dMEGhgJlGlORU04yMt/ vL0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bioW/gDMtzyPy8t6XnD7ivoEwoVwagFU1ZBUDiMg2Ro=; b=gTCe8MiV3cHeHviywx2+j+hdgq4V3xuCA2ANLVw55CtPr06E4tnxdpm/eqWKjnVCnq wJUOatb8FQWmNy9b63CU+OjrUcu5GgKZE1fb/iYeska36j1SHk1xmrPscCMgYnP7H46m GEzBqPpmkFLgpvSgnCBG/Q72HJthe7JbbOuJMZvM2ysW2Qr3DfLnaWPFK37LtxHCPbBW gFrxgpzWJuzBLEwTsz06kmt6xdiCgPhGJNrfv8zuQ+I3dWiFK4ZgC9oXeFM/k2BDYavL Llf/IYY8TRXUR0TO29eIcihfh6SrF9AqKC9Kspq6B3zTiZENk8wdHIOSTcUwXtecqkcL A2zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hGds6MkT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ko15-20020a170907986f00b008b17a1f0979si11363855ejc.319.2023.03.06.15.20.31; Mon, 06 Mar 2023 15:20:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hGds6MkT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230241AbjCFXMk (ORCPT + 99 others); Mon, 6 Mar 2023 18:12:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230157AbjCFXM3 (ORCPT ); Mon, 6 Mar 2023 18:12:29 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15E7F6BDED; Mon, 6 Mar 2023 15:12:28 -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 326M0Q1U011331; Mon, 6 Mar 2023 23:12:24 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-transfer-encoding : content-type; s=qcppdkim1; bh=bioW/gDMtzyPy8t6XnD7ivoEwoVwagFU1ZBUDiMg2Ro=; b=hGds6MkTmanbJJ1UZhjFQ115VuuCYmR+scqeuNcWC+KHiBZNyH/YpCKU5tUErgSMjghf 7+l8kBn/Hzq5rwG/2uXa+6RDE+4BqnL5wAkHVc583uo7kPyowWMKI7xC41pvmEtXWIpM R+FjkjfBz1emA1zo2loohjL0zcCZzpNnvKprXcFB8ADgCFtyUrjqx4IcD4veklOdHmTe a7HaPN3wIBbgl3XMhpEuaxZYpGKLX4iLtSb3rIKHbYhazRbG+6jwZp09PTN9m3ql5HOo FlNr/28F2oC5CJR26ZrWowyaoO1IJPvE4MSlhxRxH8S4O2EJz2Ox3D7e0GjSyNbcv2Qm Qw== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p419169fw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 23:12:24 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 326NCN4j016431 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 6 Mar 2023 23:12:23 GMT Received: from hu-molvera-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 6 Mar 2023 15:12:23 -0800 From: Melody Olvera To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jassi Brar , Mathieu Poirier , Robert Marko , Guru Das Srinagesh CC: Konrad Dybcio , Manivannan Sadhasivam , Melody Olvera , , , , Subject: [PATCH v2 5/7] remoteproc: qcom: q6v5: Add support for q6 rmb registers Date: Mon, 6 Mar 2023 15:12:00 -0800 Message-ID: <20230306231202.12223-6-quic_molvera@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230306231202.12223-1-quic_molvera@quicinc.com> References: <20230306231202.12223-1-quic_molvera@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: axJPqk7BDoTW6-HvcF44iy4QkJD40j5s X-Proofpoint-GUID: axJPqk7BDoTW6-HvcF44iy4QkJD40j5s X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_14,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=791 clxscore=1015 impostorscore=0 bulkscore=0 spamscore=0 phishscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060202 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759662420659676247?= X-GMAIL-MSGID: =?utf-8?q?1759662420659676247?= When attaching a running Q6, the remoteproc driver needs a way to communicate with the Q6 using rmb registers, so allow the rmb register to be gotten from the device tree if present. Signed-off-by: Melody Olvera --- drivers/remoteproc/qcom_q6v5.c | 9 +++++++++ drivers/remoteproc/qcom_q6v5.h | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c index 192c7aa0e39e..e8c6be70ebfd 100644 --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c @@ -254,6 +254,7 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, void (*handover)(struct qcom_q6v5 *q6v5)) { int ret; + struct resource *res; q6v5->rproc = rproc; q6v5->dev = &pdev->dev; @@ -263,6 +264,14 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev, init_completion(&q6v5->start_done); init_completion(&q6v5->stop_done); + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + if (res) { + q6v5->rmb_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(q6v5->rmb_base)) + q6v5->rmb_base = NULL; + } else + q6v5->rmb_base = NULL; + q6v5->wdog_irq = platform_get_irq_byname(pdev, "wdog"); if (q6v5->wdog_irq < 0) return q6v5->wdog_irq; diff --git a/drivers/remoteproc/qcom_q6v5.h b/drivers/remoteproc/qcom_q6v5.h index 5a859c41896e..95824d5b64ce 100644 --- a/drivers/remoteproc/qcom_q6v5.h +++ b/drivers/remoteproc/qcom_q6v5.h @@ -7,6 +7,12 @@ #include #include +#define RMB_BOOT_WAIT_REG 0x8 +#define RMB_BOOT_CONT_REG 0xC +#define RMB_Q6_BOOT_STATUS_REG 0x10 + +#define RMB_POLL_MAX_TIMES 250 + struct icc_path; struct rproc; struct qcom_smem_state; @@ -16,6 +22,8 @@ struct qcom_q6v5 { struct device *dev; struct rproc *rproc; + void __iomem *rmb_base; + struct qcom_smem_state *state; struct qmp *qmp; From patchwork Mon Mar 6 23:12:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melody Olvera X-Patchwork-Id: 65174 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2128355wrd; Mon, 6 Mar 2023 15:20:56 -0800 (PST) X-Google-Smtp-Source: AK7set807IgraSSB37DZyPw+UWSkjaYif4H+O+QTxgbLHcggoSlk3HLvdDcwIi4LuowjT2B8m+yT X-Received: by 2002:a17:907:9484:b0:886:7eae:26c4 with SMTP id dm4-20020a170907948400b008867eae26c4mr16043563ejc.5.1678144856083; Mon, 06 Mar 2023 15:20:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678144856; cv=none; d=google.com; s=arc-20160816; b=X+TYhp9CbY2M3hkqxqhYbNZHtazMF8ur835Mt7o7rAKiEWX8nGp5PTCSpY0YguHacv XaJ4q6SKRtDe5FmyeDlpiIbymXceWk7kWQRvLNQFM//6zFri3galgqmprOoS40pIcB/7 mkHFWM0utV+dJIfxBpqCA8Y35MGYW0W/O0h78731HJw1F9obZ/t/V//0ZbALMkaYP4Ga n9biXiGyFEjt93lMSJ/WJjNknNnUy+rTgy44BGV28Pg0GGy2S33owh3+eqAmHpGFB+2W vcuIavz2c//pZ5NqqX1cIIVC8SWT/pgF38eX9OzDe2UL3AJiSgRtfUL7slccKqdcb946 Zetw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tgUeJRW6YeP8ms6pJIH4nhb8rtNO+pEVzSfF6vJl3V4=; b=XDbN5l1JxSRvUdm//Y4NKkpt7VNHOGhT+KuHBnS1xBkg2sWqV6IdIBWh7RyX69ggp+ hknmQZr14988AzwtfU32PBOi8Lb3TKgTmaO49yPllsO5uj4oDZ3/eA/kG5eqqVDXdEgB jsf8EyZZTyz9vQLkZGw0cTRNi/cepMfZdFT5lt7SZbmliOyrxGRniaDUrr8dfabooNx2 cmbvWAQxx4Qsv6FTJaTC5LZTshCeQ1PZhwVSk5irpGghZ5hzSFrjYFf2Jt3po+OB1TID DTMW0G+UVNkI7qvLUT+jJQQ8HUzBRz9m8gN/ZEvmN05f87Z799slfw3Dq/iDaJ801k/o pofA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ZmClciiS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id yj8-20020a170907708800b008dd85c37895si8886671ejb.215.2023.03.06.15.20.31; Mon, 06 Mar 2023 15:20:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ZmClciiS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230233AbjCFXMo (ORCPT + 99 others); Mon, 6 Mar 2023 18:12:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230172AbjCFXMa (ORCPT ); Mon, 6 Mar 2023 18:12:30 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A7B76189A; Mon, 6 Mar 2023 15:12:28 -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 326Mbwtu000569; Mon, 6 Mar 2023 23:12:25 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-transfer-encoding : content-type; s=qcppdkim1; bh=tgUeJRW6YeP8ms6pJIH4nhb8rtNO+pEVzSfF6vJl3V4=; b=ZmClciiSynVUUaR8npF431iRXeiuJ3Ygu8nmLWK/fprs5qCreS1saaRyIf78phbJNX6G gi+WSTUlfTgMR/41syC0ABoxs28mbyXFnc+od7WYUz1jjXklhYeaEs5t0523EBO9TQM2 9pPVkn1Rf7gB77nhEm7Oi7Ts5TorfJozXIj0aIsZRpTbYS5FX8yiJNjOYsUPjRcPs2iL lKdvbBWrHXu1L+VlF+dtMtLljnWK+9tgtHEEFV49dIvpmZtWBL4d5cdkz5Z+EACUKJiu 19NKFIFcN2XkAZvakhEPn0lUNMuG8hlGgzG78OxxFpHaZjULurogTpE4RuIhSjrHMOgz qg== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p4g3mw23v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 23:12:25 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 326NCOJj015396 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 6 Mar 2023 23:12:24 GMT Received: from hu-molvera-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 6 Mar 2023 15:12:23 -0800 From: Melody Olvera To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jassi Brar , Mathieu Poirier , Robert Marko , Guru Das Srinagesh CC: Konrad Dybcio , Manivannan Sadhasivam , Melody Olvera , , , , Subject: [PATCH v2 6/7] remoteproc: qcom_q6v5_pas: Add support to attach a DSP Date: Mon, 6 Mar 2023 15:12:01 -0800 Message-ID: <20230306231202.12223-7-quic_molvera@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230306231202.12223-1-quic_molvera@quicinc.com> References: <20230306231202.12223-1-quic_molvera@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: u9CI-S1f_saK3Il5k0YmNWjdHI79_yty X-Proofpoint-GUID: u9CI-S1f_saK3Il5k0YmNWjdHI79_yty X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_14,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 mlxscore=0 clxscore=1015 adultscore=0 malwarescore=0 phishscore=0 mlxlogscore=891 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060202 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759662420800173736?= X-GMAIL-MSGID: =?utf-8?q?1759662420800173736?= Some chipsets will have DSPs which will have begun running prior to linux booting, so add support to late attach these DSPs by adding support for: - run-time checking of an offline or running DSP via rmb register - a late attach framework to attach to the running DSP - a handshake mechanism to ensure full and proper booting via rmb Signed-off-by: Melody Olvera --- drivers/remoteproc/qcom_q6v5_pas.c | 103 ++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 0871108fb4dc..e22be6a029a8 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -242,10 +242,89 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw) return ret; } +static int adsp_attach(struct rproc *rproc) +{ + struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; + int i, ret; + + ret = qcom_q6v5_prepare(&adsp->q6v5); + if (ret) + return ret; + + ret = adsp_pds_enable(adsp, adsp->proxy_pds, adsp->proxy_pd_count); + if (ret < 0) + goto disable_irqs; + + ret = clk_prepare_enable(adsp->xo); + if (ret) + goto disable_proxy_pds; + + ret = clk_prepare_enable(adsp->aggre2_clk); + if (ret) + goto disable_xo_clk; + + if (adsp->cx_supply) { + ret = regulator_enable(adsp->cx_supply); + if (ret) + goto disable_aggre2_clk; + } + + if (adsp->px_supply) { + ret = regulator_enable(adsp->px_supply); + if (ret) + goto disable_cx_supply; + } + + /* if needed, signal Q6 to continute booting */ + if (adsp->q6v5.rmb_base) { + for (i = 0; i < RMB_POLL_MAX_TIMES; i++) { + if (readl_relaxed(adsp->q6v5.rmb_base + RMB_BOOT_WAIT_REG)) { + writel_relaxed(1, adsp->q6v5.rmb_base + RMB_BOOT_CONT_REG); + break; + } + msleep(20); + } + + if (!readl_relaxed(adsp->q6v5.rmb_base + RMB_BOOT_WAIT_REG)) { + dev_err(adsp->dev, "Didn't get rmb signal from %s\n", rproc->name); + goto disable_px_supply; + } + } + + ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000)); + if (ret == -ETIMEDOUT) { + dev_err(adsp->dev, "start timed out\n"); + qcom_scm_pas_shutdown(adsp->pas_id); + goto disable_px_supply; + } + + return 0; + +disable_px_supply: + if (adsp->px_supply) + regulator_disable(adsp->px_supply); +disable_cx_supply: + if (adsp->cx_supply) + regulator_disable(adsp->cx_supply); +disable_aggre2_clk: + clk_disable_unprepare(adsp->aggre2_clk); +disable_xo_clk: + clk_disable_unprepare(adsp->xo); +disable_proxy_pds: + adsp_pds_disable(adsp, adsp->proxy_pds, adsp->proxy_pd_count); +disable_irqs: + qcom_q6v5_unprepare(&adsp->q6v5); + + /* Remove pointer to the loaded firmware, only valid in adsp_load() & adsp_start() */ + adsp->firmware = NULL; + + return ret; +} + static int adsp_start(struct rproc *rproc) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; - int ret; + int i, ret; ret = qcom_q6v5_prepare(&adsp->q6v5); if (ret) @@ -304,6 +383,22 @@ static int adsp_start(struct rproc *rproc) goto release_pas_metadata; } + /* if needed, signal Q6 to continute booting */ + if (adsp->q6v5.rmb_base) { + for (i = 0; i < RMB_POLL_MAX_TIMES; i++) { + if (readl_relaxed(adsp->q6v5.rmb_base + RMB_BOOT_WAIT_REG)) { + writel_relaxed(1, adsp->q6v5.rmb_base + RMB_BOOT_CONT_REG); + break; + } + msleep(20); + } + + if (!readl_relaxed(adsp->q6v5.rmb_base + RMB_BOOT_WAIT_REG)) { + dev_err(adsp->dev, "Didn't get rmb signal from %s\n", rproc->name); + goto release_pas_metadata; + } + } + ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000)); if (ret == -ETIMEDOUT) { dev_err(adsp->dev, "start timed out\n"); @@ -413,6 +508,7 @@ static unsigned long adsp_panic(struct rproc *rproc) static const struct rproc_ops adsp_ops = { .unprepare = adsp_unprepare, .start = adsp_start, + .attach = adsp_attach, .stop = adsp_stop, .da_to_va = adsp_da_to_va, .parse_fw = qcom_register_dump_segments, @@ -423,6 +519,7 @@ static const struct rproc_ops adsp_ops = { static const struct rproc_ops adsp_minidump_ops = { .unprepare = adsp_unprepare, .start = adsp_start, + .attach = adsp_attach, .stop = adsp_stop, .da_to_va = adsp_da_to_va, .load = adsp_load, @@ -728,6 +825,10 @@ static int adsp_probe(struct platform_device *pdev) if (ret) goto detach_proxy_pds; + if (adsp->q6v5.rmb_base && + readl_relaxed(adsp->q6v5.rmb_base + RMB_Q6_BOOT_STATUS_REG)) + rproc->state = RPROC_DETACHED; + qcom_add_glink_subdev(rproc, &adsp->glink_subdev, desc->ssr_name); qcom_add_smd_subdev(rproc, &adsp->smd_subdev); adsp->sysmon = qcom_add_sysmon_subdev(rproc, From patchwork Mon Mar 6 23:12:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melody Olvera X-Patchwork-Id: 65180 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2134337wrd; Mon, 6 Mar 2023 15:37:34 -0800 (PST) X-Google-Smtp-Source: AK7set+uLWPIxHtShnFAjXJ9sZoHanFCqHUURtZwXyzfAAbzPPgwcoRUp2J071FP3eIF1PbXKI9F X-Received: by 2002:a05:6a20:144d:b0:cd:c79:50e8 with SMTP id a13-20020a056a20144d00b000cd0c7950e8mr17629303pzi.62.1678145854441; Mon, 06 Mar 2023 15:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678145854; cv=none; d=google.com; s=arc-20160816; b=VqMyRqjMZTknM1f6U+KbD7f94ZzU7TGVzkIQdH4R84Rb1t3z7yNUMJirgDHK6oHT8W YPDIy86RzI0clZF6GCxwdDalor5K2hiLaxPYkCKiUEgOYwexz00r146xtVA2C/gWs6Z7 U6INQjVH11Mmk4eafLI+UGQ+LFrHTwJ6pHG8Rw+8W8p6kgj8vOo8hALPGcywtNKL+7UK SjjdgL2hlCBeiVs9NLTNdxoZDU17PyqZJ3IcGy5o1f99R2QoTDL04AvxsR/13YCT619b ItW3aLvJuJraC46C1LHNjxKkDCs6DTL5/WzD7nryq0rRSlo64zPGPtLwkoqXbLvdZlfL 99fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Prdjq3IJTndyT+uRyBQR2Oi93J1FBMJ5tw/vJckc6+4=; b=zJOkAjSlThZ0NYkIXdYyhE0unlUMLGZlMI7GxxNGFdKOH3sPnlxRH3pZ19azxxrCe6 iCRdofb47PcopxoIQ6v1sO08lLvWTtE6j4YgAPtiIWXb3Am5xZgQqkTOKMT25OwkljIU kl7Eouz1wm8vlFOGVRaAW3NNmuMZ9Y9FKHRqEuUdJ4LWtWSDqPY5E0quy0MkC32giW0V w/4NwE2LeEbJCrNY0obgWMo4KIQCe/hiRQ/3nLOOu8dxMQ+yMV0U3QZdOcxTO6I0cbCJ gYkRcXH3c9vLkH3o/7KpnE9+y4W80hlg8TBoTzx7EXI8/hGddAZd2Rlgucmo91InWOtz EiRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PGyMGgdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x131-20020a633189000000b00502d74a68bdsi10682394pgx.701.2023.03.06.15.37.22; Mon, 06 Mar 2023 15:37:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PGyMGgdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229870AbjCFXMu (ORCPT + 99 others); Mon, 6 Mar 2023 18:12:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbjCFXMb (ORCPT ); Mon, 6 Mar 2023 18:12:31 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AD8E6BDCB; Mon, 6 Mar 2023 15:12:29 -0800 (PST) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 326MSDIu003571; Mon, 6 Mar 2023 23:12:26 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-transfer-encoding : content-type; s=qcppdkim1; bh=Prdjq3IJTndyT+uRyBQR2Oi93J1FBMJ5tw/vJckc6+4=; b=PGyMGgdLp8vq9a9kI923xFw5Erqzy/LI9VkReF0CFL/UKgkUSEbC8Z75QVbr+LwKrlia iFWDKzemYwb5R9O1LTaZdzcyl4TWyoH6hKCfP5Y5I5bFEHrqud9t0rrJmaYlIz0BioNv FMmT52lkm5A/jj1Vmorz5AT+DP6Ll6b9+fK3yWnYSlpF0uBEBclnbLG2UMJrtRbbWcjb 9J0BpkvyimFcfPpSmZJTo46a55Qc5N5acyHOMf3iLFd2RvN+3pMMKsBHGcVuUyBO0l/t amSluTWhUiPdYl+Vg7P6YYXH/BN3Z+rDK0UKQE76Aaa20RlA0U0oAkV9h2AZiDPWpv/h aw== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p41j6e7rk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 23:12:26 +0000 Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 326NCOkP028073 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 6 Mar 2023 23:12:24 GMT Received: from hu-molvera-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 6 Mar 2023 15:12:24 -0800 From: Melody Olvera To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jassi Brar , Mathieu Poirier , Robert Marko , Guru Das Srinagesh CC: Konrad Dybcio , Manivannan Sadhasivam , Melody Olvera , , , , Subject: [PATCH v2 7/7] remoteproc: qcom_q6v5_pas: Add QDU1000/QRU1000 mpss compatible & data Date: Mon, 6 Mar 2023 15:12:02 -0800 Message-ID: <20230306231202.12223-8-quic_molvera@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230306231202.12223-1-quic_molvera@quicinc.com> References: <20230306231202.12223-1-quic_molvera@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 7O8bDZ16xJF6OHJvrj3NduEV8K0wfYc- X-Proofpoint-ORIG-GUID: 7O8bDZ16xJF6OHJvrj3NduEV8K0wfYc- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_14,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060202 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759663466989311324?= X-GMAIL-MSGID: =?utf-8?q?1759663466989311324?= Add the compatible and data for the mpss found in the QDU1000 and QRU1000 SoCs. These platforms require the driver to complete a modem handshake using the RMB registers provided. Signed-off-by: Melody Olvera --- drivers/remoteproc/qcom_q6v5_pas.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index e22be6a029a8..e7c40e757b86 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -972,6 +972,27 @@ static const struct adsp_data msm8996_adsp_resource = { .ssctl_id = 0x14, }; +static const struct adsp_data qdu1000_mpss_resource = { + .crash_reason_smem = 421, + .firmware_name = "modem.mdt", + .dtb_firmware_name = "modem_dtb.mdt", + .pas_id = 4, + .dtb_pas_id = 0x26, + .minidump_id = 3, + .auto_boot = false, + .decrypt_shutdown = true, + .proxy_pd_names = (char*[]) { + "cx", + "mss", + NULL + }, + .load_state = "modem", + .ssr_name = "mpss", + .sysmon_name = "modem", + .ssctl_id = 0x12, + .region_assign_idx = 2, +}; + static const struct adsp_data cdsp_resource_init = { .crash_reason_smem = 601, .firmware_name = "cdsp.mdt", @@ -1291,6 +1312,7 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init }, { .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init }, { .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init }, + { .compatible = "qcom,qdu1000-mpss-pas", .data = &qdu1000_mpss_resource }, { .compatible = "qcom,sc7180-mpss-pas", .data = &mpss_resource_init}, { .compatible = "qcom,sc7280-mpss-pas", .data = &mpss_resource_init}, { .compatible = "qcom,sc8180x-adsp-pas", .data = &sm8150_adsp_resource},