From patchwork Mon Mar 27 18:48:09 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: 75629 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1729200vqo; Mon, 27 Mar 2023 12:07:44 -0700 (PDT) X-Google-Smtp-Source: AKy350YMdCnt8QvNrE3r8YJOt9njajiwQhgoHgeD7xj+IW5WMGZQbXUQDjs7xzRiaXInLFfsx0Pt X-Received: by 2002:a17:902:e851:b0:1a0:549d:399e with SMTP id t17-20020a170902e85100b001a0549d399emr14066154plg.21.1679944063748; Mon, 27 Mar 2023 12:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679944063; cv=none; d=google.com; s=arc-20160816; b=cRFVn5SdzQRsuesARM+hr9Vp3zwNFTV4pIc04JMm4sjgdLXi23R3qJjMxLe0pVPsr3 pXdULghpqkO3t4p1sq+CvEn5iXXl2riBf3eljNwTBoBiAhIfSO7BNGpFBVKOYGSq5APG KhCZMq7/3KBoXNnpt8Dh/udpHLfgOyIBfiR+wLvDRotMDTXVqzC/5emgAMSYI0TO3xyz u7+qRikTQQV/5enS4O/8z5BCTH2WZIoSLj3/gSGYsvBaX8pnMgquayo0gexJalJUjW8z DNlwT2gqoobvdFYhXJn7xn7tYcOzq8miNw/aIiWMSkWW/Y2HtawSGTyCAurJSzDirDiO ra0A== 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=EIxYTRkWdFJzwZh6BFhtloQnwXCEz34/zKyQod3D784=; b=Im7YysFoF46AwueIadCXIiUfN5DsdFurM/8cr5oEYrN4aVdHAEaiL0jEDTgLcUtX7V RhE0YpQeMNHGxhfuaKIKXp39A8cLmspThOZ4KRl2tAQSBPb6PPpvKHZXg9NIxwu/OwUi eBmeOu5s00XPhhjFsg5+4N3LWacAtbklcZG1sW3Wo2Kbq35KfjS8w2zodSiZ6veQCHsu gIZoui6PI0Dt5cZBjdqrd6T0JP3FM8EAwksnarES35+jMDXhhpVSelon/wlcTKA0m0EM ra7w1jzJRoWmgEfYwTwhbzj09FlpsbC29I82/pgXzxpPg1hChV3UG2sEixVfqa0JVZEm qAZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dylanvanassche.be header.s=MBO0001 header.b=NqZ9lQCz; 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 r20-20020a6560d4000000b0050f636b4d40si22713987pgv.373.2023.03.27.12.07.30; Mon, 27 Mar 2023 12:07:43 -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=NqZ9lQCz; 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 S232237AbjC0Sso (ORCPT + 99 others); Mon, 27 Mar 2023 14:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230328AbjC0Ssg (ORCPT ); Mon, 27 Mar 2023 14:48:36 -0400 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0717B173C; Mon, 27 Mar 2023 11:48:34 -0700 (PDT) Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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-201.mailbox.org (Postfix) with ESMTPS id 4PlhfR2gpbz9slF; Mon, 27 Mar 2023 20:48:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dylanvanassche.be; s=MBO0001; t=1679942911; 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=EIxYTRkWdFJzwZh6BFhtloQnwXCEz34/zKyQod3D784=; b=NqZ9lQCzcg1y1zaoCxrDmE28FPiQ6vPVZ9Lvtevm6SnCn1P7xdwNmRKuUmpYQxf4v6SqGU 2IrpXjaHyYr0DTN2SEKuJ6WRZibBowy7QwTQGfCfytiw33U+/JX0XJKk6N1EeKMkho9VTS y0oHEB+6DfbJ5hOs/odorGBDTXDIkbW945egaedihmusjwrkI2zp1dlDAmofDlnr0RHNwi 9n9+i3ok3l8RLdcbN/kcblWoNz9Jft8gnqg8Vf+nqb310uL9U4ZmWeLiqnOE3WsTnTy9PW mDMWZ3Z1+YvDcjnRnF7y34+YYqDIeLIBbfELcflirMjZn4nDNlZA5W8/Ud+5ZQ== From: Dylan Van Assche To: Andy Gross , Bjorn Andersson , Srinivas Kandagatla , Amol Maheshwari , 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 v2 3/5] dts: arm64: qcom: sdm845: add SLPI FastRPC support Date: Mon, 27 Mar 2023 20:48:09 +0200 Message-Id: <20230327184811.499553-4-me@dylanvanassche.be> In-Reply-To: <20230327184811.499553-1-me@dylanvanassche.be> References: <20230327184811.499553-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?1761549026800515832?= X-GMAIL-MSGID: =?utf-8?q?1761549026800515832?= 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 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 3b547cb7aeb8..7412ea938765 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"; + reusable; + alloc-ranges = <0 0x00000000 0 0xffffffff>; + alignment = <0 0x400000>; + size = <0 0x1000000>; + }; }; adsp_pas: remoteproc-adsp { @@ -3344,6 +3352,21 @@ 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 { + compatible = "qcom,fastrpc-compute-cb"; + }; + }; }; };