From patchwork Mon Dec 13 08:22:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12673239 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 706F9C433F5 for ; Mon, 13 Dec 2021 08:24:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232860AbhLMIX7 (ORCPT ); Mon, 13 Dec 2021 03:23:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232873AbhLMIX6 (ORCPT ); Mon, 13 Dec 2021 03:23:58 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFBDEC0613F8 for ; Mon, 13 Dec 2021 00:23:57 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id l25so49745510eda.11 for ; Mon, 13 Dec 2021 00:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=prdIKNnTakLOgVKu5DwjlMlxlY+xXSOXQoSYxRJLrP4=; b=omQsxrb+Hxg41SF9UDWEMcgy6P46VVzeouGujn1lDMF8O+GeOW3PgJh2U+Kdrq+uTu 6agorY7fL8XCzr+MzyZKQclJ1So8D6Eo3ZIaK3drrcVw3chGMRVlO5WZGT8JsQ4RyD4G pWVMby9jENNOskqdPb5LKRMH7Bf1QiwDG9aa11CGCK5+iwXbH9rjws5t7w7cTxRi6LPh CoN/dFPng9qTB5kBMwNfO/KHbpDkf9s3bx7wlR3fruTQ38tOAqJOfuz9jISDkeryo/L6 Q3MPMqmV1jHZ+miaETOOSLJ00rJs/utX5DcSzpJZOIOf1+S7+YBILyBRdQIz/e65zwnd VUDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=prdIKNnTakLOgVKu5DwjlMlxlY+xXSOXQoSYxRJLrP4=; b=j4BwiYn1dNTARLjqoU0/1qKnKrLrrAWl0fDrcChB0jS3vO1E7BPAcIAHIQpuQSGOUh B2csY14usXNX39x4O/B+agzShsr2DxEOMsoQL3t6WuHkgwrfxiZ55eOC1xsz2Ki/fFJh lQEGv4cPNYL+whHAIBN2Y8VGPotAqm+qYpqjDnkEffm4HZbFqGrC3EZ0x6BVaSNs4PAi Yw1NdZsbYVx+4ugOV6pTI6vS64CkwRDWeTsXbuKgcdZWKpLybpkg2RxNoNQZZktLJEyK QVPT3bvqdb7wpwSzQXibzMeA/3cZIUzFWni3GlHwA1b2W+ftVOr41WoDGDd3IobDTrM+ 4c1Q== X-Gm-Message-State: AOAM5312rMz1ccGY9BkB8nieY9ivqghKYco5Z2BqY6UN2hzvIlUyeKf6 1PJtSGiAlsamBtQYIV6CqjMPc8MzSo/UhG+9I9o= X-Google-Smtp-Source: ABdhPJwiRLHKvdYVxS22gwZ8U7nNlkzXgH1/4EzTGwRcfsJd31TNLz8JwyPZS3Fi5kMN3gVhwklzJg== X-Received: by 2002:a05:6402:2547:: with SMTP id l7mr62557623edb.301.1639383836134; Mon, 13 Dec 2021 00:23:56 -0800 (PST) Received: from localhost.localdomain ([2a02:a210:20c5:8c80:7d0a:cd68:c339:f426]) by smtp.gmail.com with ESMTPSA id nb17sm5535561ejc.7.2021.12.13.00.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 00:23:55 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Konrad Dybcio , Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , Rob Herring , Manivannan Sadhasivam , linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/8] dt-bindings: remoteproc: qcom: pas: Add SM6350 adsp, cdsp & mpss Date: Mon, 13 Dec 2021 09:22:01 +0100 Message-Id: <20211213082208.21492-2-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213082208.21492-1-luca.weiss@fairphone.com> References: <20211213082208.21492-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add compatibles for the remoteprocs found in SM6350. Signed-off-by: Luca Weiss Acked-by: Konrad Dybcio Reviewed-by: Rob Herring --- .../bindings/remoteproc/qcom,adsp.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml index 63e06d93bca3..c635c181d2c2 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml @@ -33,6 +33,9 @@ properties: - qcom,sdm845-adsp-pas - qcom,sdm845-cdsp-pas - qcom,sdx55-mpss-pas + - qcom,sm6350-adsp-pas + - qcom,sm6350-cdsp-pas + - qcom,sm6350-mpss-pas - qcom,sm8150-adsp-pas - qcom,sm8150-cdsp-pas - qcom,sm8150-mpss-pas @@ -158,6 +161,9 @@ allOf: - qcom,sc8180x-mpss-pas - qcom,sdm845-adsp-pas - qcom,sdm845-cdsp-pas + - qcom,sm6350-adsp-pas + - qcom,sm6350-cdsp-pas + - qcom,sm6350-mpss-pas - qcom,sm8150-adsp-pas - qcom,sm8150-cdsp-pas - qcom,sm8150-mpss-pas @@ -266,6 +272,8 @@ allOf: - qcom,sc8180x-cdsp-pas - qcom,sdm845-adsp-pas - qcom,sdm845-cdsp-pas + - qcom,sm6350-adsp-pas + - qcom,sm6350-cdsp-pas - qcom,sm8150-adsp-pas - qcom,sm8150-cdsp-pas - qcom,sm8150-slpi-pas @@ -301,6 +309,7 @@ allOf: - qcom,sc7280-mpss-pas - qcom,sc8180x-mpss-pas - qcom,sdx55-mpss-pas + - qcom,sm6350-mpss-pas - qcom,sm8150-mpss-pas - qcom,sm8350-mpss-pas then: @@ -385,6 +394,23 @@ allOf: - const: mx - const: mss + - if: + properties: + compatible: + contains: + enum: + - qcom,sm6350-cdsp-pas + then: + properties: + power-domains: + items: + - description: CX power domain + - description: MX power domain + power-domain-names: + items: + - const: cx + - const: mx + - if: properties: compatible: @@ -405,6 +431,7 @@ allOf: enum: - qcom,sc7280-mpss-pas - qcom,sdx55-mpss-pas + - qcom,sm6350-mpss-pas - qcom,sm8150-mpss-pas - qcom,sm8350-mpss-pas then: @@ -425,6 +452,7 @@ allOf: enum: - qcom,sc8180x-adsp-pas - qcom,sc8180x-cdsp-pas + - qcom,sm6350-adsp-pas - qcom,sm8150-slpi-pas - qcom,sm8250-adsp-pas - qcom,sm8250-slpi-pas From patchwork Mon Dec 13 08:22:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12673231 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 CAF90C433EF for ; Mon, 13 Dec 2021 08:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232917AbhLMIYC (ORCPT ); Mon, 13 Dec 2021 03:24:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232877AbhLMIX7 (ORCPT ); Mon, 13 Dec 2021 03:23:59 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7EA1C0617A2 for ; Mon, 13 Dec 2021 00:23:58 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id x15so50164480edv.1 for ; Mon, 13 Dec 2021 00:23:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eWVA6ZsYWEHpo4tPzSv+DObTmIZqBTZN1doDEY7feJ4=; b=A1CwDN5DROdNZy+tYAVQgJNRgQoGBNkcm994Wg1C/OwC6hiUAJTMyIges93UG1MHtE /38tm7oyuY6fSTE225Kg2rAom8rxXZc+fNQiigMJJSTVVU9MwC7bca7HWwlsjrZ9Fv9k erEW8ylz3aDlUqcGULZtOHFXJeI+dfWe8DbZDGBBYMDEvUbWqdQcd+a0QfKCTfcS0U9E JY8DEZLNeoLR1qCpTpPAXm1lX6TXeOyy6T2vnOWCO3Q+dPq4jrVO8vdUxzWQmTejyNN9 D0mMcq1pHhuoDYTsWt4roJAyTGHFPpwczmxKDXS7JPR60ABueTVRfQtJkAax4lbDe2bN BZJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eWVA6ZsYWEHpo4tPzSv+DObTmIZqBTZN1doDEY7feJ4=; b=8Eh9M0JgyXCdpxouRmQrKMNT4eLsrR2FZa497zlj1EGKVhGapNcA3m+OR6lh+ZMoYZ qHOpi9WBcd+bxSZNXdlAq/eeYIeVCYfJYOSrWkKdAgf/15Qviph7QNaPId5E3ILDDnWz +Ay9VmisbxvsoDbfRoPA4uAaZT7hHDa7hjqZ7d3ydCPPkY8qiZrCH7AOGFoGhoNIronl 3FdiQHN4ybS4OPIR6v8iXH5skZ1w/ov0sWZKbqqpXWz/rTwoIxnNvY9J4Jd7AArc73dK DCyDS4rxBDtp3zn35v4eBRijqFxSraGRwUt62paDa8VHHBUlBDjLVx/8YxP7lz/P+Qu8 e7Tw== X-Gm-Message-State: AOAM532nzINRx4/A9a23ThkHt2PCdisAiYw3xs18xoTMDezjOBCtKSU4 6s64fjxoPLmLy0xAJr+7wzAYMKQJsbiZPx4S4Nk= X-Google-Smtp-Source: ABdhPJzqseDodTFGiVcwKAZ0+WEQQShfRm4wrCMlTqzPu1nhqzycrYKYDNrLdc20GYA8/1uq9sWN2Q== X-Received: by 2002:a50:d710:: with SMTP id t16mr61915231edi.50.1639383837382; Mon, 13 Dec 2021 00:23:57 -0800 (PST) Received: from localhost.localdomain ([2a02:a210:20c5:8c80:7d0a:cd68:c339:f426]) by smtp.gmail.com with ESMTPSA id nb17sm5535561ejc.7.2021.12.13.00.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 00:23:57 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Konrad Dybcio , Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/8] remoteproc: qcom: pas: Add SM6350 MPSS support Date: Mon, 13 Dec 2021 09:22:02 +0100 Message-Id: <20211213082208.21492-3-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213082208.21492-1-luca.weiss@fairphone.com> References: <20211213082208.21492-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a config for the MPSS present on SM6350. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- drivers/remoteproc/qcom_q6v5_pas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 03857dc9cdc1..2d43aa0dfeb7 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -804,6 +804,7 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init}, { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init}, { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource}, + { .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init}, { .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource}, { .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource}, { .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init}, From patchwork Mon Dec 13 08:22:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12673225 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 675CBC4332F for ; Mon, 13 Dec 2021 08:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232930AbhLMIYD (ORCPT ); Mon, 13 Dec 2021 03:24:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232897AbhLMIYA (ORCPT ); Mon, 13 Dec 2021 03:24:00 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22C8EC061756 for ; Mon, 13 Dec 2021 00:24:00 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id y13so48911681edd.13 for ; Mon, 13 Dec 2021 00:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5OtucOCvawfobrbHcXVhOtvyWLxWDxqsfH1lQJQrnfY=; b=b2PnGSWuGINO6Kc06wSvWB/2KCgGI1Az2mtYpXIZCMN2+N0W8TtaNbUh6bTa+tgDXr RhJXlZEtaUPFOshl3lbnvtuJQqxr0wz1lcZwIy0m/ev1DWIbOFsxJgKeOw76dOa3ag/5 m+69i4aAyXaPYW8FOG4plEEPf3cGnYMmbiCgapwRK4NhQobjmPTsTwSCvNrbIKFzVTNv KcDVJkVQLxMY+VJbHP8JFRCZWHZoCDE51XFmPSoIdnyoyY4rBLUU2dcza2ameZPm949T 8htFzJ6SYgEp04PXNUCGatNJbxyfbijnyfX4i+ESzBZ5PJgsB9q6uUIkubmj9cZzSZ4C MS5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5OtucOCvawfobrbHcXVhOtvyWLxWDxqsfH1lQJQrnfY=; b=B0L4J/ZRrEn3a2QOsYFAIsB+jFtPxkqzRQYah+HYsBdiJ8QnH+rcjR5U/2W4gUW+9z Viph8VEJXPuaYTzBbk07mB5n7mDWJIMRnOvwfpnQvoEwqCOgz/ejWn7yRiwGkRd+zbF8 tEvCZLyDWTQPRRTnWVic1u12iHFZ20pOkrSpsHkQo/Wk1YrlYTADJZDT8i041NrBXvfX rZPiKI4NijRIi7kuX4XZKeIJuPxRQ+0ls1JeqLXldl3RHBBYyLrihIk7LUz1cqh0NWHN K41zJeqZKa/K000riFapH67Q10t/V0vm12Q1sCwthny7+onzyXg3M9TrM5gSLTJP6FsQ apbA== X-Gm-Message-State: AOAM530PpgllnYZfLXA7AE9b3gkq8KSsq5KjQyhiWxt6H2BpxLDiJRGX PTuilI83cinDkBGG/P63F8tXx1iCZ6Cuu5g3jgM= X-Google-Smtp-Source: ABdhPJwyA674Z/gyNKbInlldO/YhsQlOpSnq6T2TT3dlZZhrUq306LEmGAxdtjaueTbkS45BuyAgCA== X-Received: by 2002:a05:6402:1453:: with SMTP id d19mr59965489edx.388.1639383838538; Mon, 13 Dec 2021 00:23:58 -0800 (PST) Received: from localhost.localdomain ([2a02:a210:20c5:8c80:7d0a:cd68:c339:f426]) by smtp.gmail.com with ESMTPSA id nb17sm5535561ejc.7.2021.12.13.00.23.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 00:23:58 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Konrad Dybcio , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/8] arm64: dts: qcom: sm6350: Add MPSS nodes Date: Mon, 13 Dec 2021 09:22:03 +0100 Message-Id: <20211213082208.21492-4-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213082208.21492-1-luca.weiss@fairphone.com> References: <20211213082208.21492-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the required nodes for booting the MPSS on sm6350. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 973e18fe3b67..9f9d4d916470 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -361,6 +361,32 @@ smem { hwlocks = <&tcsr_mutex 3>; }; + smp2p-mpss { + compatible = "qcom,smp2p"; + qcom,smem = <435>, <428>; + + interrupts-extended = <&ipcc IPCC_CLIENT_MPSS + IPCC_MPROC_SIGNAL_SMP2P + IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc IPCC_CLIENT_MPSS + IPCC_MPROC_SIGNAL_SMP2P>; + + qcom,local-pid = <0>; + qcom,remote-pid = <1>; + + modem_smp2p_out: master-kernel { + qcom,entry-name = "master-kernel"; + #qcom,smem-state-cells = <1>; + }; + + modem_smp2p_in: slave-kernel { + qcom,entry-name = "slave-kernel"; + + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + soc: soc@0 { #address-cells = <2>; #size-cells = <2>; @@ -473,6 +499,46 @@ tcsr_mutex: hwlock@1f40000 { #hwlock-cells = <1>; }; + mpss: remoteproc@4080000 { + compatible = "qcom,sm6350-mpss-pas"; + reg = <0x0 0x04080000 0x0 0x4040>; + + interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_EDGE_RISING>, + <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, + <&modem_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, + <&modem_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, + <&modem_smp2p_in 3 IRQ_TYPE_EDGE_RISING>, + <&modem_smp2p_in 7 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", "handover", + "stop-ack", "shutdown-ack"; + + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-names = "xo"; + + power-domains = <&rpmhpd SM6350_CX>, + <&rpmhpd SM6350_MSS>; + power-domain-names = "cx", "mss"; + + memory-region = <&pil_modem_mem>; + + qcom,qmp = <&aoss_qmp>; + + qcom,smem-states = <&modem_smp2p_out 0>; + qcom,smem-state-names = "stop"; + + status = "disabled"; + + 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 = <1>; + }; + }; + sdhc_2: sdhci@8804000 { compatible = "qcom,sm6350-sdhci", "qcom,sdhci-msm-v5"; reg = <0 0x08804000 0 0x1000>; From patchwork Mon Dec 13 08:22:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12673233 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 12B71C433F5 for ; Mon, 13 Dec 2021 08:24:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232888AbhLMIYR (ORCPT ); Mon, 13 Dec 2021 03:24:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232908AbhLMIYB (ORCPT ); Mon, 13 Dec 2021 03:24:01 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBECBC0617A1 for ; Mon, 13 Dec 2021 00:24:00 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id x10so31963163edd.5 for ; Mon, 13 Dec 2021 00:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zo1R0GM0UXlhxwBbFfCIG2U5SV/xuvwi3CEgGxo6XA0=; b=B6ILK7l7/R7BR8pTA4+BupjqBADlYwCTcMt3Bb7D6HSxt+u3Udgd5hZ7n1CFG+w6sK jxhdDDDtJAg6TM174W14DSF+Y5aBybvOaOYPwIzKOZRziIz/5QPZx/8sJdavS2M8ulow DfCdzZNH+zaP9FYaxSYHc5dUwzML6gzAwS/moPb2KPEER3MlWsS3fa765ewY+TQedlsl HLa4Fzv0bjSUIFJUUeL3LtKAYLg0EzMfM8f1lndEUd73BUWHnraJKyhsZxdGxPPfH9/m 9weDbSEcSm32QyFCjXL7K56OeYmxAKjqj+IdiyzEDPh3NIU9Z/jHbUo3tolSQaBZHh+M qAyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zo1R0GM0UXlhxwBbFfCIG2U5SV/xuvwi3CEgGxo6XA0=; b=MUDiTmK2sqRLgWRbJ6YG+LmS6fPDMS4xfkcXPLO+gJvQO2R1zU/bqx+zuzTGMv4iER dOvr4gyi9oNw4B8Mq0Caw3FUNc4CSDbIbqiZwfqiUZ+nTlVhuIXm3c9IVTaj6ifpqhYq Y+/pR0vOsPRhjnQpmxztrvXc+IVLtImhsHlvIbKKpLVSZDdEoJamQHDI/CUyGfzIm07L oHqaaCLM/745FG3Qxs9T2D5GoNXheqYTqU+pPTV3nacpLUgL+/xp4xS/FqqQkV0egZ3Z xUOFOsjv2aejzjGpcbC5rmwXxHV8Zs6TYf939riSPGGI+raQZpsY8YDp3q0UF25+xvxy 3Qwg== X-Gm-Message-State: AOAM530UvzqtO2D3VIBG0HL7jvMLJcZzp6W+cDpnW3p5Vt4jFKXChxUu 1GARQzmlAXhjimbrPGQ6x0qGgsPA6jyh5Lpo8f4= X-Google-Smtp-Source: ABdhPJyYyNjcuIuTB/ROUCBIZHl4H+Qh26CqBC52TIvpgxft68UMqmbXVXjZkT9DOw0iI17lns/QtQ== X-Received: by 2002:a17:907:160b:: with SMTP id hb11mr43410450ejc.336.1639383839256; Mon, 13 Dec 2021 00:23:59 -0800 (PST) Received: from localhost.localdomain ([2a02:a210:20c5:8c80:7d0a:cd68:c339:f426]) by smtp.gmail.com with ESMTPSA id nb17sm5535561ejc.7.2021.12.13.00.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 00:23:58 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Konrad Dybcio , Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/8] remoteproc: qcom: pas: Add SM6350 ADSP support Date: Mon, 13 Dec 2021 09:22:04 +0100 Message-Id: <20211213082208.21492-5-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213082208.21492-1-luca.weiss@fairphone.com> References: <20211213082208.21492-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a config for the ADSP present on SM6350. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- drivers/remoteproc/qcom_q6v5_pas.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 2d43aa0dfeb7..1d28036e0265 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -524,6 +524,23 @@ static const struct adsp_data sdm845_adsp_resource_init = { .ssctl_id = 0x14, }; +static const struct adsp_data sm6350_adsp_resource = { + .crash_reason_smem = 423, + .firmware_name = "adsp.mdt", + .pas_id = 1, + .has_aggre2_clk = false, + .auto_boot = true, + .proxy_pd_names = (char*[]){ + "lcx", + "lmx", + NULL + }, + .load_state = "adsp", + .ssr_name = "lpass", + .sysmon_name = "adsp", + .ssctl_id = 0x14, +}; + static const struct adsp_data sm8150_adsp_resource = { .crash_reason_smem = 423, .firmware_name = "adsp.mdt", @@ -804,6 +821,7 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init}, { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init}, { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource}, + { .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource}, { .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init}, { .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource}, { .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource}, From patchwork Mon Dec 13 08:22:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12673227 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 C3D6DC433F5 for ; Mon, 13 Dec 2021 08:24:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232673AbhLMIYH (ORCPT ); Mon, 13 Dec 2021 03:24:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232919AbhLMIYC (ORCPT ); Mon, 13 Dec 2021 03:24:02 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA68CC061748 for ; Mon, 13 Dec 2021 00:24:01 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id r11so48742651edd.9 for ; Mon, 13 Dec 2021 00:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZhOSSwiixjkQaiUtFoSNPK59bnogS0Q2CCvpwHx2IiQ=; b=Zucq++Xv88DeQ1iG38WCmwhZw4g3OMp2CU8lPbjyjN1/kryBxu22+MVoKHkACuqxxM D5CQB8WLAglQX2qBqG2k7UA6SqKI91GmyDzaNrMBzfeN/fhlZsz6X7HD6banWanJH2ou elOMqfsNeeBtOJ4Ep7OvHE5RlKdcpFSEnSKT+d1DLT0SigccI9bhdXJFGL8ZU1E7QF6e 4fAzW1e2V0IpL3fWJ3y/tNwrk0i0tspOH0M45RpoEoaofTr4AM7uu6VjDZMTiIrwAXi8 CsYQScHhpobZVG3W766C9h2UreUbB/AvvE2U5X7FahD26sjVuzHfLGErr9JQsOWqgz+6 vI4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZhOSSwiixjkQaiUtFoSNPK59bnogS0Q2CCvpwHx2IiQ=; b=eq90SmG1xKSeRldIFh5VWQ281PIQGbM1hUCB+FJEZ8wrWGE9RT5o80/VVixfvfYksV 2KwjAZCq6UbkHnOeZ9Bf7cVLl/73cqOfafmSo4P/c0iDcWsuWsWomlVm8UJPsT4zuJxo w4yCmJ2uia5ByZQVkCzyXgr/b3hwQfhGDbDNJXryb0S0xPqQ2rKXTLnvJUfn1uwFJQzX IRDAHsZ4XIxsS5jDNuUq3xDe9ShZap2ATd5eHjaF83AxPqbRjtSkEiUZOB/fxIGgQgQC CKWvqm2q4b/2V/8IXCosVaaIIE1PosdnROJQl2GhfOVlVOQlq87Y9IYZRuUzwLpGx8bU 9qVw== X-Gm-Message-State: AOAM531F2q1LZZa8J4/04AOJeKDeARO4fWrep+sNOdhrbk5sXjIR9UTP JzfnB3E7WLGL+KExsQVEBFKoLvo5Nh9BOn8fX14= X-Google-Smtp-Source: ABdhPJwCQHgH3NZYftawTh8HdD1J/sqHJn1qgoXM77QB+mKBiiAUDyKshgkAdIkYGpscW++IuYcy3A== X-Received: by 2002:a17:906:388c:: with SMTP id q12mr41543245ejd.281.1639383839994; Mon, 13 Dec 2021 00:23:59 -0800 (PST) Received: from localhost.localdomain ([2a02:a210:20c5:8c80:7d0a:cd68:c339:f426]) by smtp.gmail.com with ESMTPSA id nb17sm5535561ejc.7.2021.12.13.00.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 00:23:59 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Konrad Dybcio , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] arm64: dts: qcom: sm6350: Add ADSP nodes Date: Mon, 13 Dec 2021 09:22:05 +0100 Message-Id: <20211213082208.21492-6-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213082208.21492-1-luca.weiss@fairphone.com> References: <20211213082208.21492-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the required nodes for booting the ADSP on sm6350. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 91 ++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 9f9d4d916470..2ae7899bdc39 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -361,6 +361,30 @@ smem { hwlocks = <&tcsr_mutex 3>; }; + smp2p-adsp { + compatible = "qcom,smp2p"; + qcom,smem = <443>, <429>; + interrupts-extended = <&ipcc IPCC_CLIENT_LPASS + IPCC_MPROC_SIGNAL_SMP2P + IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc IPCC_CLIENT_LPASS + IPCC_MPROC_SIGNAL_SMP2P>; + + qcom,local-pid = <0>; + qcom,remote-pid = <2>; + + smp2p_adsp_out: master-kernel { + qcom,entry-name = "master-kernel"; + #qcom,smem-state-cells = <1>; + }; + + smp2p_adsp_in: slave-kernel { + qcom,entry-name = "slave-kernel"; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + smp2p-mpss { compatible = "qcom,smp2p"; qcom,smem = <435>, <428>; @@ -499,6 +523,73 @@ tcsr_mutex: hwlock@1f40000 { #hwlock-cells = <1>; }; + adsp: remoteproc@3000000 { + compatible = "qcom,sm6350-adsp-pas"; + reg = <0 0x03000000 0 0x100>; + + interrupts-extended = <&pdc 6 IRQ_TYPE_LEVEL_HIGH>, + <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>, + <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>, + <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>, + <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", + "handover", "stop-ack"; + + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-names = "xo"; + + power-domains = <&rpmhpd SM6350_LCX>, + <&rpmhpd SM6350_LMX>; + power-domain-names = "lcx", "lmx"; + + memory-region = <&pil_adsp_mem>; + + qcom,qmp = <&aoss_qmp>; + + qcom,smem-states = <&smp2p_adsp_out 0>; + qcom,smem-state-names = "stop"; + + status = "disabled"; + + glink-edge { + interrupts-extended = <&ipcc IPCC_CLIENT_LPASS + IPCC_MPROC_SIGNAL_GLINK_QMP + IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc IPCC_CLIENT_LPASS + IPCC_MPROC_SIGNAL_GLINK_QMP>; + + label = "lpass"; + qcom,remote-pid = <2>; + + fastrpc { + compatible = "qcom,fastrpc"; + qcom,glink-channels = "fastrpcglink-apps-dsp"; + label = "adsp"; + #address-cells = <1>; + #size-cells = <0>; + + compute-cb@3 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <3>; + iommus = <&apps_smmu 0x1003 0x0>; + }; + + compute-cb@4 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <4>; + iommus = <&apps_smmu 0x1004 0x0>; + }; + + compute-cb@5 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <5>; + iommus = <&apps_smmu 0x1005 0x0>; + qcom,nsessions = <5>; + }; + }; + }; + }; + mpss: remoteproc@4080000 { compatible = "qcom,sm6350-mpss-pas"; reg = <0x0 0x04080000 0x0 0x4040>; From patchwork Mon Dec 13 08:22:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12673229 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 5FAC1C433FE for ; Mon, 13 Dec 2021 08:24:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232911AbhLMIYI (ORCPT ); Mon, 13 Dec 2021 03:24:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232925AbhLMIYD (ORCPT ); Mon, 13 Dec 2021 03:24:03 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ACC3C061756 for ; Mon, 13 Dec 2021 00:24:02 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id o20so49746737eds.10 for ; Mon, 13 Dec 2021 00:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q70cqgRzfvObsCs+O+QFL42xSmUpXSY80Ymp8MHcdZQ=; b=EFzn7U/+mwtWjf5xkkkE06o/niQokFoi2Fx14MUC8OKWWMATpB9c2l83Qn07BXoaOt I3EMOddYLFb2Kv2z748a/GsJSgKeVaO/oiW6olIBJARQpQmTTkzcl39Y9r/7FBTwTZuL aCaXSBFN7XFgbspmenBailI7V1yXLoh2u7w3iA4wUcC5hZZJSEm//YwHY1mgIvwJ1GK2 McDuGfVPryKNQ8116msD2qlk42pKu+7XO0B/3SWF8C5rxGg6EKxX3DchJG8VF90soSAr IH6RnBIfkU3zAlEt8l2c4eUnQewEE+2K9v8fRvx6zz5q63Pe5gFRDTSyBGEnQ7ptpQ5j wnYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q70cqgRzfvObsCs+O+QFL42xSmUpXSY80Ymp8MHcdZQ=; b=V8h56FaZLAH0QPKQvaoZAQVz1W91Peuj7IhHbXXtyYd61jzCIrPGGnIuZD8TN7SU84 r+fc02HAWv77i+NkTzFMBJNDhMjAl/JsblGpbMfCWHuvyt+tQBkcXhhTgWkuDMDREvQG Dnu6Pe33qPmM8o7SwtOm8IVEgb4qWK5vyi7rMVHGYUVOsr6Cj/JT4c3+yKyVzapDIdsn KINlvbekYuTefb/D/gPunyis1rVU5yT5Xr0yD+IHtADzyR6qJBatXm/i9RzTNEsA2+1X gXYfEVOGe777qbMQ5/DzsmEjporxosUWZK0xsVPw1RuzXGIjT4WA8fI0QYJki3kcwSWG dQqQ== X-Gm-Message-State: AOAM53035ez+FQFdZA6vv5/eigwe7gSP1wIJJMECa3NV0nGW+Qtp2aA5 V6UjA9l0qkzrCTNIEhdz6GfOnFJMQNgmuEoD8jk= X-Google-Smtp-Source: ABdhPJwtE5pGQIQmXqQUzOYbMwH3b8byTp68AFBCdLBBW3Yc746D0mV7/1A9RWzE3iPlj5QtafkuQg== X-Received: by 2002:a05:6402:11d2:: with SMTP id j18mr64910013edw.318.1639383840837; Mon, 13 Dec 2021 00:24:00 -0800 (PST) Received: from localhost.localdomain ([2a02:a210:20c5:8c80:7d0a:cd68:c339:f426]) by smtp.gmail.com with ESMTPSA id nb17sm5535561ejc.7.2021.12.13.00.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 00:24:00 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Konrad Dybcio , Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] remoteproc: qcom: pas: Add SM6350 CDSP support Date: Mon, 13 Dec 2021 09:22:06 +0100 Message-Id: <20211213082208.21492-7-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213082208.21492-1-luca.weiss@fairphone.com> References: <20211213082208.21492-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a config for the CDSP present on SM6350. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- drivers/remoteproc/qcom_q6v5_pas.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 1d28036e0265..370a70e25722 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -629,6 +629,23 @@ static const struct adsp_data sdm845_cdsp_resource_init = { .ssctl_id = 0x17, }; +static const struct adsp_data sm6350_cdsp_resource = { + .crash_reason_smem = 601, + .firmware_name = "cdsp.mdt", + .pas_id = 18, + .has_aggre2_clk = false, + .auto_boot = true, + .proxy_pd_names = (char*[]){ + "cx", + "mx", + NULL + }, + .load_state = "cdsp", + .ssr_name = "cdsp", + .sysmon_name = "cdsp", + .ssctl_id = 0x17, +}; + static const struct adsp_data sm8150_cdsp_resource = { .crash_reason_smem = 601, .firmware_name = "cdsp.mdt", @@ -822,6 +839,7 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init}, { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource}, { .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource}, + { .compatible = "qcom,sm6350-cdsp-pas", .data = &sm6350_cdsp_resource}, { .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init}, { .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource}, { .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource}, From patchwork Mon Dec 13 08:22:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12673237 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 17F72C43217 for ; Mon, 13 Dec 2021 08:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232983AbhLMIYS (ORCPT ); Mon, 13 Dec 2021 03:24:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232936AbhLMIYD (ORCPT ); Mon, 13 Dec 2021 03:24:03 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44033C0613FE for ; Mon, 13 Dec 2021 00:24:03 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id x15so50165013edv.1 for ; Mon, 13 Dec 2021 00:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8/8AKmWnw90DFb6B7PF4iq5fumUb+K6Z3Aw6VBfY+z8=; b=D9HefLZt+ts1nXZQn800eebajloSDymutWYMnZJwmzVTRpSnijW8g0RKq6BPaTS/q8 CNTTtb1V9MPaeRnB3V57I+s2Qd7kmoKuATz1JJNWD4MZpCNfQsWQG9+4qfc8U6CFsyri YcYroSunyDeXypuGgG280DhT1podBpYMw4VPZMijTV1gGHUip7e3XIEfr6FElmrbOO/F eHWhQDGfb+jBeYBMrO2jBJ5piEX5jmTbm1LuQ3xfAqWU5n72DXXOnbR9MGvpSz8OX5xt ln7mKOdz2vOVrs+M+cTfdnK1tc5WiNrTW2s2t0Fot5JcK4AdTKxokH9ZYvPBpzSSusdp GSIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8/8AKmWnw90DFb6B7PF4iq5fumUb+K6Z3Aw6VBfY+z8=; b=Qj1KNSm7mo/MiufUxNzYqwTQMvJt9ejlISneNtacvN5l6AzM9yPQm34x1TjF4ugNHB Th5LM+neCuocpkJqms1np/C11Mc6Oh8WG/N1bspPo6i6CWaWxUl3pWd390ogksE842qK KsE8mgiSblv7YslUOHs4wAOhE+KlPtyPo9/IwUKFX+eNaCvKfHFLD4P4MKmYBKP77SfN 8PGD+5jbMooQ+8XY1uFGs9/l7tjfkHie4/3U9jgXsnJj0wgTeC0nkyyV5cMQeOUv2hY0 X8KECQyxVsfI8Sv8JqjGfT4i5RU6CBkh0hzFtnRo9imT3Pt+2xmuSubH4olbU8oR1tTY Xpng== X-Gm-Message-State: AOAM5325snMTLcvOj/+QvlLmz+IqjnYJ8TqaW7fT8jBjJj87hwrsv5yp xyQWUgSIRZGePA76NytKvNxiiLrwZsQS/nPcFF0= X-Google-Smtp-Source: ABdhPJx/KKlVqiepCCfPU+AAbJjN0Qv76YpnNjgnYbuAI8eYXASvrOr/cgVyAjFV8pn7/FxbMl7xmw== X-Received: by 2002:a05:6402:40d2:: with SMTP id z18mr61860198edb.395.1639383841650; Mon, 13 Dec 2021 00:24:01 -0800 (PST) Received: from localhost.localdomain ([2a02:a210:20c5:8c80:7d0a:cd68:c339:f426]) by smtp.gmail.com with ESMTPSA id nb17sm5535561ejc.7.2021.12.13.00.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 00:24:01 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Konrad Dybcio , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/8] arm64: dts: qcom: sm6350: Add CDSP nodes Date: Mon, 13 Dec 2021 09:22:07 +0100 Message-Id: <20211213082208.21492-8-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213082208.21492-1-luca.weiss@fairphone.com> References: <20211213082208.21492-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the required nodes for booting the CDSP on sm6350. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 122 +++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 2ae7899bdc39..a7158fe9e192 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -385,6 +385,30 @@ smp2p_adsp_in: slave-kernel { }; }; + smp2p-cdsp { + compatible = "qcom,smp2p"; + qcom,smem = <94>, <432>; + interrupts-extended = <&ipcc IPCC_CLIENT_CDSP + IPCC_MPROC_SIGNAL_SMP2P + IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc IPCC_CLIENT_CDSP + IPCC_MPROC_SIGNAL_SMP2P>; + + qcom,local-pid = <0>; + qcom,remote-pid = <5>; + + smp2p_cdsp_out: master-kernel { + qcom,entry-name = "master-kernel"; + #qcom,smem-state-cells = <1>; + }; + + smp2p_cdsp_in: slave-kernel { + qcom,entry-name = "slave-kernel"; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + smp2p-mpss { compatible = "qcom,smp2p"; qcom,smem = <435>, <428>; @@ -630,6 +654,104 @@ IPCC_MPROC_SIGNAL_GLINK_QMP }; }; + cdsp: remoteproc@8300000 { + compatible = "qcom,sm6350-cdsp-pas"; + reg = <0 0x08300000 0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_LEVEL_HIGH>, + <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>, + <&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>, + <&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>, + <&smp2p_cdsp_in 3 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", + "handover", "stop-ack"; + + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-names = "xo"; + + power-domains = <&rpmhpd SM6350_CX>, + <&rpmhpd SM6350_MX>; + power-domain-names = "cx", "mx"; + + memory-region = <&pil_cdsp_mem>; + + qcom,qmp = <&aoss_qmp>; + + qcom,smem-states = <&smp2p_cdsp_out 0>; + qcom,smem-state-names = "stop"; + + status = "disabled"; + + glink-edge { + interrupts-extended = <&ipcc IPCC_CLIENT_CDSP + IPCC_MPROC_SIGNAL_GLINK_QMP + IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc IPCC_CLIENT_CDSP + IPCC_MPROC_SIGNAL_GLINK_QMP>; + + label = "cdsp"; + qcom,remote-pid = <5>; + + fastrpc { + compatible = "qcom,fastrpc"; + qcom,glink-channels = "fastrpcglink-apps-dsp"; + label = "cdsp"; + #address-cells = <1>; + #size-cells = <0>; + + compute-cb@1 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <1>; + iommus = <&apps_smmu 0x1401 0x20>; + }; + + compute-cb@2 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <2>; + iommus = <&apps_smmu 0x1402 0x20>; + }; + + compute-cb@3 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <3>; + iommus = <&apps_smmu 0x1403 0x20>; + }; + + compute-cb@4 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <4>; + iommus = <&apps_smmu 0x1404 0x20>; + }; + + compute-cb@5 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <5>; + iommus = <&apps_smmu 0x1405 0x20>; + }; + + compute-cb@6 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <6>; + iommus = <&apps_smmu 0x1406 0x20>; + }; + + compute-cb@7 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <7>; + iommus = <&apps_smmu 0x1407 0x20>; + }; + + compute-cb@8 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <8>; + iommus = <&apps_smmu 0x1408 0x20>; + }; + + /* note: secure cb9 in downstream */ + }; + }; + }; + sdhc_2: sdhci@8804000 { compatible = "qcom,sm6350-sdhci", "qcom,sdhci-msm-v5"; reg = <0 0x08804000 0 0x1000>; From patchwork Mon Dec 13 08:22:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12673235 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 512D8C43219 for ; Mon, 13 Dec 2021 08:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232906AbhLMIYT (ORCPT ); Mon, 13 Dec 2021 03:24:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232946AbhLMIYE (ORCPT ); Mon, 13 Dec 2021 03:24:04 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06FECC061748 for ; Mon, 13 Dec 2021 00:24:04 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id l25so49746275eda.11 for ; Mon, 13 Dec 2021 00:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wJEEqyKISVmLwrKECRv9O+FIMtzdnCM3vrfkv5xHbbc=; b=sEYiyL1t89Df2d2P9CNXHEX3r/4uu2WX6F+I0KEAC+I7PCIernl8hkV7r+MEwiKTRR RqZS/NVJjvek2//+pd2bvuIxaaO99wbk7KF5DHUWLwEh5eWgy+ZV+u5ycLeF51OuJWxu 1zpWFPEOmFmaOq5I4y9FEcgpK9qEaDirikActt/MrVdhqXlT5qsPIdwwjaA2E3klstyq 5F6VxXlilh6cXL2MC8HFYnMtRJujRBqvp7aIqTMFkj6Rv09cSN7mF6sPVASZ35M3yZ+n Epq13luQ+2oHZgtk5wml7yedMgZOfHm5xjB401+oZ2ptZxcsU4qNtDiJ8vr3G6825HIl Me3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wJEEqyKISVmLwrKECRv9O+FIMtzdnCM3vrfkv5xHbbc=; b=CdkLftczbVI45qYIQQUUaDVcIpq7axs8++8EplcAmxGBcttgoGI3tVxvcJrIbuR7DF w19dK2zpZP3k7V3FnWdjfl23rpuW5z8/U1kH9ttkx+u6iQQIWw/q7OS0DpPhdQo0740Z yVfch3KGezGvikKtyRKtuHOnWy+qOQHyLkXMcO6dQPnCDZaWeQSFPXBbZEl2Lgq73b/w 9yvyK+dbCzA7ndD/Gyv54UMRJW5PrTn/rhVjJTFzcJ/f3yr4j6ukoxFqZJeF81HYR92p gXrce4pvIkb5nbHqxUVHVCbibZsIevljnO7yiYAhPWYFRl8SuKkoi/NTgeY1kZodKRQO u/OQ== X-Gm-Message-State: AOAM5331Jibas8DYlRdDKo3kJlxsMpPDpikGQDJa/bWd15Mdkb0xRf/b nEyAXbmqhzTN4DIiRolKlcTWwUPhVyH2sULpdVM= X-Google-Smtp-Source: ABdhPJxXH0Xjx9BHfJBCZNxrhpzIndXfY4yXe4yX22wm5K4vyrOQfvlwQcXd5uuh0zbYEkjW+Is7gQ== X-Received: by 2002:a17:906:c156:: with SMTP id dp22mr42976858ejc.36.1639383842380; Mon, 13 Dec 2021 00:24:02 -0800 (PST) Received: from localhost.localdomain ([2a02:a210:20c5:8c80:7d0a:cd68:c339:f426]) by smtp.gmail.com with ESMTPSA id nb17sm5535561ejc.7.2021.12.13.00.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 00:24:02 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Konrad Dybcio , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/8] arm64: dts: qcom: sm7225-fairphone-fp4: Enable ADSP, CDSP & MPSS Date: Mon, 13 Dec 2021 09:22:08 +0100 Message-Id: <20211213082208.21492-9-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213082208.21492-1-luca.weiss@fairphone.com> References: <20211213082208.21492-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Enable the remoteprocs found on the SoC and add a qcom,rmtfs-mem node. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- .../boot/dts/qcom/sm7225-fairphone-fp4.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts index ff07b7e8d64f..1ce606e66474 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -53,6 +53,27 @@ volume-up { gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; }; }; + + reserved-memory { + /* + * The rmtfs memory region in downstream is 'dynamically allocated' + * but given the same address every time. Hard code it as this address is + * where the modem firmware expects it to be. + */ + memory@efe01000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0xefe01000 0 0x600000>; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <15>; + }; + }; +}; + +&adsp { + status = "okay"; + firmware-name = "qcom/sm7225/fairphone4/adsp.mdt"; }; &apps_rsc { @@ -269,6 +290,16 @@ vreg_bob: bob { }; }; +&cdsp { + status = "okay"; + firmware-name = "qcom/sm7225/fairphone4/cdsp.mdt"; +}; + +&mpss { + status = "okay"; + firmware-name = "qcom/sm7225/fairphone4/modem.mdt"; +}; + &pm6150l_wled { status = "okay";