Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp328301iob; Tue, 3 May 2022 18:56:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6GO5xWzLDuowkADWWUGKPQRvrCGTAJ7UiJSHvXI8cmSUEhJU3kWaYXYrzMYEAbtfCjjJH X-Received: by 2002:a63:84c8:0:b0:3ab:180b:bb5a with SMTP id k191-20020a6384c8000000b003ab180bbb5amr16084296pgd.308.1651629409350; Tue, 03 May 2022 18:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651629409; cv=none; d=google.com; s=arc-20160816; b=TE771lICuoM3Xva61eF3q5M9VpRGu7PHOzZqSR/O+qHrSCdSoC/OjbeNs+VrlPaZFr iTZY9ErmSLUwlNPSv4WjM6veUrOlOPpFGKp+Tgy6ENrqhZEc0mHYRco0d39WQA32dHL/ 8HsWkLcHW+kJST9Lk/Eo5gdWrCX0c8/xrAm1QrEvyK0JV4YO4JRj/e/VFtnRx7VBoc/x kAc78+pZHd/0W7z05/NTik/08P6YhraXZHkdXsVMgbe61LzzBY8NqtJGBArlk/Ow/bma 22ObpKPDn4PnmsDBHxgxA72s36Ltsqaf+Xax1OIJHk3HFxe+MaRqRTJRY2UaXtHABR5k 3xVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bnaCh6YCRVM5tRtpXNIx8f4eF7oyzzBKQfTeqlVlqUA=; b=ux1f66LVmRQpboMP0AfsYd2u4BPTXAPZ+VXS3DxDVHJinWk7gXr+m3KqMaA49qw4iw hXVGJpCEzg5v+jUnTF//vTHmOf4fo+5ozY/zrNRHVyOdAaaIT7EevrOPoW1FMBcF+g0q USBczLKhbtq9gM4zUhhGfqv9gQ98oThm4LeukzyfTkWIAlnoNkcQXi4pXBVH8sZT16Ga Gr5VZp1o4yJ7ViunU4KbbXlHmGjAkR0f5aRskaMQNovYvZNCNveGDCqLFIj9XH3pWCHK vI/mUYIGizxFzjDeSpqrObJJc1yThY4LnZavW614FuaD3yQKpN2GDulO17BQAnE8ibAw 0qSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Jq2n3gj2; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a056a00238b00b0050d5b4ee692si4600121pfc.106.2022.05.03.18.56.35; Tue, 03 May 2022 18:56:49 -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=@collabora.com header.s=mail header.b=Jq2n3gj2; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238113AbiECUpI (ORCPT + 99 others); Tue, 3 May 2022 16:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbiECUpF (ORCPT ); Tue, 3 May 2022 16:45:05 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 105B615A08; Tue, 3 May 2022 13:41:31 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 321911F400A7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1651610490; bh=6LlYKh046C6Z3Am//641lVVpWpuYaRN/WaDnK7FKMPM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Jq2n3gj2aIDxNSouNUQgKaOCvhCEGcMWOhu/x9UZgaU5fCvDTXJL0gIzEF3qN1+J2 xYBwnPi72TT4R0uA+xJf3yAdRRUbPtKmLa0Be20hULZr/eIqCEa9VELb3/u2ToKL3m zeI/AoF3KTOT+3FCOXl16JABfhpRZlBudzc4pr8H2jhK3bCfGfjH5V9OO6SGaStLtZ s+C+IchA4wSnLgCbsleanjZ34/go6DvEUruGtSw4DTTpJrCNyKH0jUe1++SCfmSp8J Rxp7qbjoG8IujYBSJxxS4kUjsajdyfD09QrFSETDeLN7+B4KCU72ZpvCxq6HOGVeEu 6DuToMHDjadeA== Date: Tue, 3 May 2022 16:41:25 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: AngeloGioacchino Del Regno Cc: Krzysztof Kozlowski , Bjorn Andersson , kernel@collabora.com, Krzysztof Kozlowski , Mathieu Poirier , Matthias Brugger , Rob Herring , Tinghan Shen , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-remoteproc@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: remoteproc: mediatek: Fix optional reg-names for mtk,scp Message-ID: <20220503204125.a4xwd7a5e3fxf7et@notapiano> References: <20220429211111.2214119-1-nfraprado@collabora.com> <20220429211111.2214119-2-nfraprado@collabora.com> <4bf2343b-3760-6ebf-7463-0b25fe9d942e@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4bf2343b-3760-6ebf-7463-0b25fe9d942e@collabora.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham 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 On Tue, May 03, 2022 at 02:26:15PM +0200, AngeloGioacchino Del Regno wrote: > Il 03/05/22 14:19, Krzysztof Kozlowski ha scritto: > > On 29/04/2022 23:11, N?colas F. R. A. Prado wrote: > > > The SCP has three memory regions: sram, l1tcm and cfg. Only sram is > > > required, the other two are optional. Fix the dt-binding so that the > > > optional regions can be omitted and passed in any order. > > > > No, cannot be passed in any order. > > > > > > > > Also add the missing minItems to the reg property and update the > > > description. > > > > > > Signed-off-by: N?colas F. R. A. Prado > > > > > > --- > > > > > > .../devicetree/bindings/remoteproc/mtk,scp.yaml | 12 +++++++++--- > > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml > > > index 823a236242de..ec9ddeb6ca2c 100644 > > > --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml > > > +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml > > > @@ -24,14 +24,20 @@ properties: > > > reg: > > > description: > > > Should contain the address ranges for memory regions SRAM, CFG, and > > > - L1TCM. > > > + L1TCM. Only SRAM is required, while CFG and L1TCM are optional. > > > + minItems: 1 > > > maxItems: 3 > > > reg-names: > > > + minItems: 1 > > > items: > > > - const: sram > > > - - const: cfg > > > - - const: l1tcm > > > + - enum: > > > + - l1tcm > > > + - cfg > > > + - enum: > > > + - l1tcm > > > + - cfg > > > > This allows them in any combination which is not what we want. If both > > are optional and both can appear, then last should be a const:l1tcm. > > > > Best regards, > > Krzysztof > > Nicolas, I think that you weren't clear about what you're trying to solve with this > commit in the description. > > I remember you had this kind of instance, but I don't really remember if it was > about mtk,scp or (and?) something else.... so.... are you trying to fix issues > with devicetrees declaring > > reg-names = "sram", "l1tcm"; ? > > Was this giving dtbs_check errors? Hi Angelo, yes, some devicetrees (like mt8183) have reg-names = "sram", "cfg"; I'll include mention of this in the commit description for v3. This was also supposed to fix the warning for mt8192, where the order is different: "sram", "l1tcm", "cfg". But since Krzysztof said that we want a fixed order, then the mt8192 DT will need to be updated. (I also just noticed that it's just l1tcm that is optional, I was just being blind, so I'll also fix that in v3) Thanks, N?colas > > Cheers, > Angelo