From patchwork Sat Apr 1 17:35:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Van Assche X-Patchwork-Id: 78153 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1351170vqo; Sat, 1 Apr 2023 10:37:11 -0700 (PDT) X-Google-Smtp-Source: AKy350afAyHGreb33z9m1KY4QJSZLfTM+iAfqIYLkEpXZ/zZTXd7qHNZ3cqv0FOe5QIwshiQLsdS X-Received: by 2002:a17:907:846:b0:944:6b03:7840 with SMTP id ww6-20020a170907084600b009446b037840mr25932427ejb.70.1680370630806; Sat, 01 Apr 2023 10:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680370630; cv=none; d=google.com; s=arc-20160816; b=oP5LXqHWlfJppjFEzzEF4Eh9ygLfmnvIQOkQZQueOwqiIqs1tiwUBLBHmIBopBDjnL TdhfkoMF3i1DDDmeXd9u+THrlEmNmTeOfaAIVbwO7wNVYqSGvJwRGExAsyjB6t4bi8CK whJDOj7efs+cTPW6DVYt9RHskiEsJmRLBoNV9wmLmPGB+qJDq28yWfhWgUECWHc+WMF3 bdNQTp08k4OZTO/UQCwRO67+XXReH+DedItXYMeM4PPzpS3vjDXMb2ZS1o3aCo1dDj1P CqFMJJfIS4gSqiVsbCRB8AvQEsM4qrdAJ/y2fVYt9WbiL9aFC3f8DtX2aq+1A6rqZDoc Sp1Q== 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=89+6K5+dVh1rTgHK8yIcdKeIjnxl4WNbv71lKIaqsj0=; b=cts/ZAMkk0RD223vW0BOdz97vT3ogmieTCMc7Fx7u5mEdcam12xnowVX5CFbuD4guK nbl79afKW+QhxJ0OuURqsSAOWFsfFtOQPek6hd0OBidoHKwX65H2AYA/dhnNRAnVveaI k14bxPAUYWhiImxkr/88JKj76yPx5guwPDjgqJ0MMJCqfX5EUP+7XtGhg5t51x39xzjV iiaAuvbDeqtQeCCKrXftl1LX5XvvlvRNxwWFRrQJqlYR+SdFjyCUqWkjmghf+PFqrZlA KE1ZU9aVUTZWsVRrUh6pnCyWKKD/XIeHq6reEdPnLILv19uuEOS+iupTgtESR1Iw7JIc j9UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b=pEh8pqHc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a170906694d00b0093297d89d19si482274ejs.979.2023.04.01.10.36.47; Sat, 01 Apr 2023 10:37:10 -0700 (PDT) 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=@dylanvanassche.be header.s=MBO0001 header.b=pEh8pqHc; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=dylanvanassche.be Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230073AbjDARfs (ORCPT + 99 others); Sat, 1 Apr 2023 13:35:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjDARfo (ORCPT ); Sat, 1 Apr 2023 13:35:44 -0400 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050:0:465::102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92C82B443; Sat, 1 Apr 2023 10:35:42 -0700 (PDT) Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Ppkp32z4Dz9sdM; Sat, 1 Apr 2023 19:35:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dylanvanassche.be; s=MBO0001; t=1680370539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=89+6K5+dVh1rTgHK8yIcdKeIjnxl4WNbv71lKIaqsj0=; b=pEh8pqHcDFh18aR1HJrl4bhFuJmxk60BiaRkdRqduKqBbdoiuX01KlT44t65eEJuZE37m9 gWBLmMZDO5VjRhNRGrQJlj+djddQP7VWE0iYigKFRSPY53rF43rl8tCFo32jb58dePwWQu 3j2qQm6GKRj2l0lHFViaWtoy9KdzJeOr5fMnqjcVqmXUxsclctZoUZQRVfdAQ3La8MBUtD KBvpTi8kGISeaB2dFwcUSamwgkzq/bHTGTRriAb53u3V6NvGP+1xEOjDK1mXQnKfThB773 6l2jiWP8p38u33ivO+pnJR+zV4MHknvo15QNObjA/pOl9qwbRH3KU1wnipWluA== From: Dylan Van Assche To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski Cc: Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Dylan Van Assche Subject: [PATCH v4 2/6] dts: arm64: qcom: sdm845: add SLPI FastRPC support Date: Sat, 1 Apr 2023 19:35:19 +0200 Message-Id: <20230401173523.15244-3-me@dylanvanassche.be> In-Reply-To: <20230401173523.15244-1-me@dylanvanassche.be> References: <20230401173523.15244-1-me@dylanvanassche.be> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1761996314424683220?= X-GMAIL-MSGID: =?utf-8?q?1761996314424683220?= Qualcomm SDM845 SoC features a SLPI DSP which uses FastRPC through an allocated memory region to load files from the host filesystem such as sensor configuration files. Add a FastRPC node at /dev/fastrpc-sdsp and a DMA region, similar to downstream, to allow userspace to communicate with the SLPI via the FastRPC interface for initializing the sensors on the SLPI. Signed-off-by: Dylan Van Assche --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 338a715d110a..1f25a7f4e02b 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -878,6 +878,14 @@ mdata_mem: mpss-metadata { size = <0 0x4000>; no-map; }; + + fastrpc_mem: fastrpc { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + alignment = <0x0 0x400000>; + size = <0x0 0x1000000>; + reusable; + }; }; adsp_pas: remoteproc-adsp { @@ -3358,6 +3366,22 @@ glink-edge { label = "dsps"; qcom,remote-pid = <3>; mboxes = <&apss_shared 24>; + + fastrpc { + compatible = "qcom,fastrpc"; + qcom,glink-channels = "fastrpcglink-apps-dsp"; + label = "sdsp"; + qcom,non-secure-domain; + qcom,vmids = <0x3 0xF 0x5 0x6>; + memory-region = <&fastrpc_mem>; + #address-cells = <1>; + #size-cells = <0>; + + compute-cb@0 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <0>; + }; + }; }; };