From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB6F1EB64DC for ; Tue, 11 Jul 2023 16:22:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sgImqWEdiDxNqIHqNazvRWF0mJme9AVSGPPYVxGmcvE=; b=qUcHLAc/Vw88Na 1WnVZY4XIcGc+v0VPUHxlj6OkpBCPO9+rENXZtAgYLm1jhuorxPctgLPPbHQcidy+x5iW1RvOcK/Z QILWFsOg5TzegyP6mUbg7hPivPBMUW2RPGS2s2m2+9NKCBN1dLre+h+lchF6aSP/PRAqi73VZBkOI hDGf9UY5p6uAmuxHZd+MB5FUSI2qe73Nbc+uXoAoccgKZqkRM2jpnNgTrOFo2KKIFXbR+kM4GJiOF FwhJyFSHVVF5uHvilKU6+oevJn8HbL0pmbBzXb/mjekad4EwyVqaiQjWNG/4Po6vCz/diJanAM/Fs NfbULxPopYNVx+ontRsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJG7j-00FNiQ-1A; Tue, 11 Jul 2023 16:21:59 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJG7g-00FNh7-0R for linux-arm-kernel@lists.infradead.org; Tue, 11 Jul 2023 16:21:58 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6687446eaccso5190826b3a.3 for ; Tue, 11 Jul 2023 09:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689092510; x=1691684510; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=TtjXHdKsE2iuLzK+Rx+EWNqyx747GyLkw9RD1FtZZME=; b=OEX+nN6ncXbpy5gEYPkKKM7dr6Dbpw8pystpzEoogPHh57TDIchQx+dphi57F0HTf4 dkhI7aFGleaeaW0VEtueEeKA1GSvEe/7XB0uQ3z6jSaH+pmAdcHMqTrEtcj/JGoH/kAP bqdLSBIeLDCMTBgg4ECOZ5AcPORv4FbEOkwyNhjOe4dDusi4KaUG79yV2hG/aCtoudC9 j1LilfvW9UrTkKoVlmd6nK+ii46DWN7Rx0NLJa+GnE37glHP6mUrcnC1t9oqLrYx7JlN mLZOqtG5xqxh7w3Blz+y06UZSGWvhhgrffk9VubASgMMu4oxJmGqIHoZ5PhLy7qCx78z enpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689092510; x=1691684510; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TtjXHdKsE2iuLzK+Rx+EWNqyx747GyLkw9RD1FtZZME=; b=OcvkG8vRo9NRJk3+zUWL4gvZ/GxfuE6frnAEQexAhdDpJl4FGD+GwegeMlQZLsvwOi UQCX8jxljYqWhyWTMlNbzgCR+xqK34IuaO5YIRh7+GBkzAmhqGvgVYrP2fYcYft8hPt6 aCI7EDA3pgG8zpVYIDucHCXcRG2006QG24j0xELpismxMK2khADtBn3ExrUm9+VCZlxP zB8GpsysZQfC26zz/tPOFzdB3ikHUavrfLrKKEoclj0X6lyrj1mfOXTBivuf9bGLs7Tc kizDT7j5n6hyIKYMh7nQaEt6V6V9kGsylXUDkgsBqMAPB/eDYAal4KYN5TiZwmRsZzh5 3qQA== X-Gm-Message-State: ABy/qLbeeXsvyLgAOZsaD1Nb9pO9xK9nKhkCmm/ZZVNlFRkyeloA7cw1 gs0atLvm/Nx2hjtsxTHrYUqfZg== X-Google-Smtp-Source: APBJJlGKmw67Dth+0p4Ril1WIdRmyHic0qRvUUZz5kC1ydPJ32L7Is9vh1Zb093pb05ujhDmR+B5gg== X-Received: by 2002:a17:902:f7d2:b0:1b6:9fec:8134 with SMTP id h18-20020a170902f7d200b001b69fec8134mr14304780plw.46.1689092510205; Tue, 11 Jul 2023 09:21:50 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:9b4d:d526:6948:59a2]) by smtp.gmail.com with ESMTPSA id h9-20020a170902748900b001b8062c1db3sm2124946pll.82.2023.07.11.09.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 09:21:49 -0700 (PDT) Date: Tue, 11 Jul 2023 10:21:46 -0600 From: Mathieu Poirier To: Marek Vasut Cc: Krzysztof Kozlowski , linux-remoteproc@vger.kernel.org, Bjorn Andersson , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Peng Fan , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/2] dt-bindings: remoteproc: imx_rproc: Document fsl,startup-delay-ms Message-ID: References: <20230707232444.374431-1-marex@denx.de> <8f40484e-1721-a2bc-2344-f9e59e51a935@linaro.org> <7a1d7a67-0a0c-8527-d430-30a1cb40de48@denx.de> <51a1c2e9-1165-c7ff-809d-b09e09d776e2@linaro.org> <6e2e16be-1f83-70d2-4c5d-c2e89a7d017f@denx.de> <38b62bf0-018a-03b9-3107-23f91fe3fa35@denx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <38b62bf0-018a-03b9-3107-23f91fe3fa35@denx.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230711_092156_251009_CAC82F18 X-CRM114-Status: GOOD ( 40.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 11, 2023 at 12:23:02AM +0200, Marek Vasut wrote: > On 7/11/23 00:01, Mathieu Poirier wrote: > > On Mon, 10 Jul 2023 at 15:53, Marek Vasut wrote: > > > > > > On 7/10/23 22:00, Krzysztof Kozlowski wrote: > > > > On 10/07/2023 15:46, Marek Vasut wrote: > > > > > On 7/10/23 14:52, Krzysztof Kozlowski wrote: > > > > > > On 10/07/2023 11:18, Marek Vasut wrote: > > > > > > > On 7/10/23 10:12, Krzysztof Kozlowski wrote: > > > > > > > > On 08/07/2023 01:24, Marek Vasut wrote: > > > > > > > > > Document fsl,startup-delay-ms property which indicates how long > > > > > > > > > the system software should wait until attempting to communicate > > > > > > > > > with the CM firmware. This gives the CM firmware a bit of time > > > > > > > > > to boot and get ready for communication. > > > > > > > > > > > > > > > > > > Signed-off-by: Marek Vasut > > > > > > > > > --- > > > > > > > > > Cc: Bjorn Andersson > > > > > > > > > Cc: Conor Dooley > > > > > > > > > Cc: Fabio Estevam > > > > > > > > > Cc: Krzysztof Kozlowski > > > > > > > > > Cc: Mathieu Poirier > > > > > > > > > Cc: NXP Linux Team > > > > > > > > > Cc: Peng Fan > > > > > > > > > Cc: Pengutronix Kernel Team > > > > > > > > > Cc: Rob Herring > > > > > > > > > Cc: Sascha Hauer > > > > > > > > > Cc: Shawn Guo > > > > > > > > > Cc: devicetree@vger.kernel.org > > > > > > > > > Cc: linux-arm-kernel@lists.infradead.org > > > > > > > > > Cc: linux-remoteproc@vger.kernel.org > > > > > > > > > --- > > > > > > > > > .../devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 5 +++++ > > > > > > > > > 1 file changed, 5 insertions(+) > > > > > > > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > > > > > > > > > index 0c3910f152d1d..c940199ce89df 100644 > > > > > > > > > --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > > > > > > > > > +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml > > > > > > > > > @@ -76,6 +76,11 @@ properties: > > > > > > > > > This property is to specify the resource id of the remote processor in SoC > > > > > > > > > which supports SCFW > > > > > > > > > > > > > > > > > > + fsl,startup-delay-ms: > > > > > > > > > + default: 0 > > > > > > > > > + description: > > > > > > > > > + CM firmware start up delay. > > > > > > > > > > > > > > > > I don't see particular improvements from v2 and no responses addressing > > > > > > > > my comment: > > > > > > > > https://lore.kernel.org/all/20221102112451.128110-2-peng.fan@oss.nxp.com/ > > > > > > > > > > > > > > I wasn't aware of this being submitted before, esp. since I wrote the > > > > > > > binding document from scratch. Which comment is not addressed, the type > > > > > > > ref is not present and the sentence starts with caps, so what is missing ? > > > > > > > > > > > > > > > > > > That the property looks like a hacky solution to some SW problem. Why > > > > > > this delay should be different on different boards? > > > > > > > > > > It probably depends more on the CM4 firmware that is being launched. The > > > > > ones I tested were fine with 50..500ms delay, but the delay was always > > > > > needed. > > > > > > > > If this is for some official remoteproc FW running on M4 > > > > > > It is not, it is some SDK which can be downloaded from NXP website, > > > which can then be used to compile the firmware blob. The license is > > > BSD-3 however, so it is conductive to producing binaries without > > > matching sources ... > > > > > > > Why can't the SDK be upgraded to provide some kind of hand-shake > > mechanism, as suggested when I first reviewed this patchset? > > I'd argue because of legacy firmware that is already deployed. > New firmware builds can, old ones probably cannot be fixed. > > Do you have a suggestion how such a mechanism should look like? > As far as I can tell, the MX8M SDK stuff looks very similar to the STM32 > Cube stuff, so maybe the mechanism is already there ? Either with a flag in the config space of the resource table or implicit synchronization using the mailbox. I suggest to have a look at struct mbox_client where tx_block, knows_txdone and tx_done should be useful. I'd use those with a completion in rproc::ops::prepare() or rproc_ops::start(). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel