Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp334672rdf; Fri, 3 Nov 2023 02:00:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRez11/3DHLTTnwoATMcpl77EsgUvJeZurcWfOXBCLCbLm+KOlpbBOxfJKljmtLxcDju1/ X-Received: by 2002:a05:6a21:4841:b0:181:a52:3162 with SMTP id au1-20020a056a21484100b001810a523162mr10199899pzc.46.1699002043443; Fri, 03 Nov 2023 02:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699002043; cv=none; d=google.com; s=arc-20160816; b=QAEZNK1ysvj6Zgyu1tAFdxIPcFxhW7v2IQC+OHcREO/t0uLXpAL+yUHgn1fFtyJNxq aMJJpoK0pzuHQPIT+2MfSmPWO3UAnXSpUHI4XZ1cWEsStPmCjUFEfccbC9m3PhuUtZ1W puUf3qfj5AhQ8hfksZ+NhtKElZfsPzCqzo7fWHUFpQDFrBDG7hJbFRiQrd7e8TTyxhzV xF2+NNRAdNHbV6HmoEQ+OhjZG/aW5+Vc4BE6VbOfD5CkkmE/tS7nbkPH6806Ycdvp7/L hrE/pIvnkPwq074UeCOzMfyB4F+r9wa8YsZpQEzzaywy2al5S+HD1VnNiHwJgYE5ERpp F0vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YzyWTc1pRrj3uRag5HK4W7N0vQLNMoxo5Y5iSoS05/g=; fh=mkXFXIICHMH0dzMY1ieSWVmHRCoH1gO0cshMcuu55o4=; b=aGpi2UODxpiOImH0XGW2lNp1FC8w23w5rxnIbI1nJ0wKMjZqFgCXogJoq8rz+hTJ3Y vWlbZlih8KGQARM6wucuLQmPe7RmZuFJlpmfP82KS+sbbHYeLFbu/xDOTZcBx+Ame7u/ YyzIk4TRbg3xBMNZSuh6O4JCm1AeFSFfwvb+XpY7gFkb39lNlRoutyrESdlaNtIs/6VG lZ+kEnLTIRxO797qabX+WMVzP7/9EzcuJyOI5oX3Mitg9nRKkElHa/KnynQM4Pu8R9e1 mNcMbqBv3heB5i94BfVQEgZTIAydi/DCuyirm06VTwEHdjdujHlWrUbMhXep1wiXHbaZ fsQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@phytec.de header.s=a4 header.b=Hp4iMuMv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bn3-20020a056a02030300b005b92fb731a9si1179730pgb.834.2023.11.03.02.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 02:00:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=fail header.i=@phytec.de header.s=a4 header.b=Hp4iMuMv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 51D5482E1E0F; Fri, 3 Nov 2023 02:00:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346539AbjKCJA2 (ORCPT + 99 others); Fri, 3 Nov 2023 05:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234731AbjKCJA1 (ORCPT ); Fri, 3 Nov 2023 05:00:27 -0400 Received: from mickerik.phytec.de (mickerik.phytec.de [91.26.50.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1448E187 for ; Fri, 3 Nov 2023 02:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=phytec.de; s=a4; c=relaxed/simple; q=dns/txt; i=@phytec.de; t=1699002013; x=1701594013; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wPaIaKEwhq9fF5yJIn7fquUjgqFfNUfDP0ZOFvXkcsk=; b=Hp4iMuMv9WqcWgZuJGWfMK+NNXJeB367h8YbTnM0i8U/REsfKv4EST3cCoLCQqt5 Lep3aP/+iQnbvkJok7KdFkAkxEDJS4NOeUy+pozas1qivj6IH1xz1Y34oIlhg6mO tHeTPHu0s4jQIgUNkfpOMvProUuyQ8pK9IEbGxHC/kU=; X-AuditID: ac14000a-b234a700000074e4-ea-6544b69da743 Received: from berlix.phytec.de (Unknown_Domain [172.25.0.12]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mickerik.phytec.de (PHYTEC Mail Gateway) with SMTP id 19.D5.29924.D96B4456; Fri, 3 Nov 2023 10:00:13 +0100 (CET) Received: from [172.25.39.28] (172.25.0.11) by Berlix.phytec.de (172.25.0.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.6; Fri, 3 Nov 2023 10:00:12 +0100 Message-ID: <5effa700-480b-4030-8335-304ebc4444b7@phytec.de> Date: Fri, 3 Nov 2023 10:00:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] arm64: dts: ti: phycore-am64: Add R5F DMA Region and Mailboxes Content-Language: en-US To: Nishanth Menon , Garrett Giordano CC: , , , , , , , , , References: <20231102201216.3771589-1-ggiordano@phytec.com> <20231103001707.2ktwfgtqegpfiijy@subpanel> From: Wadim Egorov In-Reply-To: <20231103001707.2ktwfgtqegpfiijy@subpanel> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [172.25.0.11] X-ClientProxiedBy: Florix.phytec.de (172.25.0.13) To Berlix.phytec.de (172.25.0.12) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJIsWRmVeSWpSXmKPExsWyRpKBR3fuNpdUg0uzVSzW7D3HZDH/yDlW i/VbfrNZLP88m92i78VDZotNj6+xWlzeNYfN4s2Ps0wWXa/b2S1a9x5ht+h+p27x/+wHdgce j02rOtk87lzbw+axeUm9R393C6vHn4vvWD2O39jO5PF5k1wAexSXTUpqTmZZapG+XQJXxoZf y1gKXqpXfPng3cB4TL6LkZNDQsBE4nbXJcYuRi4OIYHFTBI9X/6xQDh3GCUeL/zFCFLFK2Aj 0bfsMVCCnYNFQEWiVw0iKihxcuYTFhBbVEBe4v6tGewgtrBAqMSBWSvA4swC4hK3nsxn6mLk 4BARcJdouiEDMp1ZYB6TxN1bR8CmCwlkSHR8g+hlE1CXuLPhGyuIzSlgLvHl2C52iDkWEovf HISy5SWat85mhuiVl3hxaTkLxC/yEtPOvWaGsEMljmxazTSBUXgWklNnITlpFpKxs5CMXcDI sopRKDczOTu1KDNbryCjsiQ1WS8ldRMjKPpEGLh2MPbN8TjEyMTBeIhRgoNZSYTX0dslVYg3 JbGyKrUoP76oNCe1+BCjNAeLkjjv/R6mRCGB9MSS1OzU1ILUIpgsEwenVAPjeomg3qbaTxHb el9oBLNmK7/aFNK+6ZddaGZQ7qHXbG4vzEuT69blXDrwYIeSSOfFF45Wd6aVSmg7ZD9ley3v uUTH+deZY0vWdb/bNHvNPAd7p2fOfW27DTKvdt5pmhlv/tFsT1CV7aOJFeJ8a/033TqRf6jk c/nVbVP4ozz9ZHrEyvpsEs4qsRRnJBpqMRcVJwIA9Nc5DKwCAAA= X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 02:00:38 -0700 (PDT) Hi Nishanth, Am 03.11.23 um 01:17 schrieb Nishanth Menon: > On 13:12-20231102, Garrett Giordano wrote: >> Communication between the R5F subsystem and Linux takes place using DMA >> memory regions and mailboxes. Here we add DT nodes for the memory >> regions and mailboxes to facilitate communication between the R5 >> clusters and Linux as remoteproc will fail to start if no memory >> regions or mailboxes are provided. >> >> Fixes: c48ac0efe6d7 ("arm64: dts: ti: Add support for phyBOARD-Electra-AM642") > is this fixes? Sounds more or less like rproc support is added in? I would say it is also a fix, as the R5 cores are enabled by default at the SoC level devicetree and also require mboxes & memory regions to be configured. The docs mention both as mandatory. Otherwise, we will encounter errors such as   platform 78000000.r5f: device does not have reserved memory regions, ret = -22 Regards, Wadim > >> Signed-off-by: Garrett Giordano >> --- >> .../boot/dts/ti/k3-am64-phycore-som.dtsi | 102 +++++++++++++++++- >> 1 file changed, 101 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi b/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi >> index 1c2c8f0daca9..37a33006c1fc 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi >> @@ -29,7 +29,7 @@ memory@80000000 { >> reg = <0x00000000 0x80000000 0x00000000 0x80000000>; >> }; >> >> - reserved-memory { >> + reserved_memory: reserved-memory { >> #address-cells = <2>; >> #size-cells = <2>; >> ranges; >> @@ -39,6 +39,54 @@ secure_ddr: optee@9e800000 { >> alignment = <0x1000>; >> no-map; >> }; >> + >> + main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 { >> + compatible = "shared-dma-pool"; >> + reg = <0x00 0xa0000000 0x00 0x100000>; >> + no-map; >> + }; >> + >> + main_r5fss0_core0_memory_region: r5f-memory@a0100000 { >> + compatible = "shared-dma-pool"; >> + reg = <0x00 0xa0100000 0x00 0xf00000>; >> + no-map; >> + }; >> + >> + main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 { >> + compatible = "shared-dma-pool"; >> + reg = <0x00 0xa1000000 0x00 0x100000>; >> + no-map; >> + }; >> + >> + main_r5fss0_core1_memory_region: r5f-memory@a1100000 { >> + compatible = "shared-dma-pool"; >> + reg = <0x00 0xa1100000 0x00 0xf00000>; >> + no-map; >> + }; >> + >> + main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a2000000 { >> + compatible = "shared-dma-pool"; >> + reg = <0x00 0xa2000000 0x00 0x100000>; >> + no-map; >> + }; >> + >> + main_r5fss1_core0_memory_region: r5f-memory@a2100000 { >> + compatible = "shared-dma-pool"; >> + reg = <0x00 0xa2100000 0x00 0xf00000>; >> + no-map; >> + }; >> + >> + main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a3000000 { >> + compatible = "shared-dma-pool"; >> + reg = <0x00 0xa3000000 0x00 0x100000>; >> + no-map; >> + }; >> + >> + main_r5fss1_core1_memory_region: r5f-memory@a3100000 { >> + compatible = "shared-dma-pool"; >> + reg = <0x00 0xa3100000 0x00 0xf00000>; >> + no-map; >> + }; >> }; >> >> leds { >> @@ -160,6 +208,34 @@ &cpsw_port2 { >> status = "disabled"; >> }; >> >> +&mailbox0_cluster2 { >> + status = "okay"; >> + >> + mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 { >> + ti,mbox-rx = <0 0 2>; >> + ti,mbox-tx = <1 0 2>; >> + }; >> + >> + mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 { >> + ti,mbox-rx = <2 0 2>; >> + ti,mbox-tx = <3 0 2>; >> + }; >> +}; >> + >> +&mailbox0_cluster4 { >> + status = "okay"; >> + >> + mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 { >> + ti,mbox-rx = <0 0 2>; >> + ti,mbox-tx = <1 0 2>; >> + }; >> + >> + mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 { >> + ti,mbox-rx = <2 0 2>; >> + ti,mbox-tx = <3 0 2>; >> + }; >> +}; >> + >> &main_i2c0 { >> status = "okay"; >> pinctrl-names = "default"; >> @@ -180,6 +256,30 @@ i2c_som_rtc: rtc@52 { >> }; >> }; >> >> +&main_r5fss0_core0 { >> + mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core0>; >> + memory-region = <&main_r5fss0_core0_dma_memory_region>, >> + <&main_r5fss0_core0_memory_region>; >> +}; >> + >> +&main_r5fss0_core1 { >> + mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core1>; >> + memory-region = <&main_r5fss0_core1_dma_memory_region>, >> + <&main_r5fss0_core1_memory_region>; >> +}; >> + >> +&main_r5fss1_core0 { >> + mboxes = <&mailbox0_cluster4 &mbox_main_r5fss1_core0>; >> + memory-region = <&main_r5fss1_core0_dma_memory_region>, >> + <&main_r5fss1_core0_memory_region>; >> +}; >> + >> +&main_r5fss1_core1 { >> + mboxes = <&mailbox0_cluster4 &mbox_main_r5fss1_core1>; >> + memory-region = <&main_r5fss1_core1_dma_memory_region>, >> + <&main_r5fss1_core1_memory_region>; >> +}; >> + >> &ospi0 { >> status = "okay"; >> pinctrl-names = "default"; >> -- >> 2.25.1 >>