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 D283AC4332F for ; Tue, 15 Nov 2022 13:49:28 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=umdxNdPyqO/KchGi5Q/B6L+eQUlQgRpzfXvoAK/i5cY=; b=HOVagk6VjrgD1o 0mjlDN5RnQ/pE+mbsgGDblJ3AvphgQtnjbnE/fqV1PtqkfjgL0rzYb9kTFuvWycfxoLCPDjGUGKH4 CuCDY8ia+cQKd+eIzjV8BWoTVxHeaeTrCcQGWCNcDDCMFNxr0QS00tnJTEA2wxXQyUPHIq7VhgHjj G5GBezemiCXhZpedIdNOr7BHv6xlh4A38hufQdx4pRQaHDZ5HV1tG9DWp5E9LHQ+8n/+mJZOWd9/8 rQJo2rnzu7hhen0tHXBPzrEeJhDQNQW5JFo5CY97G95tVdEMBWq/RnyZnwXQi7LCbeQajS38TcLUj oeXTj3GhiMPZyP7v/TmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouwIc-00BZZe-2E; Tue, 15 Nov 2022 13:48:26 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouwIZ-00BZUr-Lw for linux-arm-kernel@lists.infradead.org; Tue, 15 Nov 2022 13:48:25 +0000 Received: by mail-lf1-x12d.google.com with SMTP id g12so24542385lfh.3 for ; Tue, 15 Nov 2022 05:48:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PyQQsmdB9p1iCbGlgrbpIM/umuy2agle/uOgcxWJaw0=; b=ifGbpBcqd+1nCUiyTrYte34kDBWXyRIYNmNA/HCI0elOYiAzLvI010U5mZ1NaqUCIr PO/fHVmh7JB+FX+3TAHtpuM0QWLqfRib8Ymr3wAauhli56Dm77ENoOYnzuinHPc3H1cV B9TY/9dQbZi2UcigQna6+JW6cvs6SYJjKXj8peTnDPLMT1cszxjjTIBBwjXHfSnkNwTA 9P0ZNihkfIEwMSr7/bIhf23XcMgXqi7v1gr/Q8aWCAe5KlBXny9Fx3GHdUW/TD88wsgg 1U6kX5uHrW47sF0n6w99xKMwCP1/w+sWvmuCqTuxz/MdeW6QRCy3rSBUgNEATjjB3mxd GtMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PyQQsmdB9p1iCbGlgrbpIM/umuy2agle/uOgcxWJaw0=; b=Qui9q4p40ToiMhLn7okEHC19O+eMpmAonZLz4aSHn1XI5s7APHve1dZDXne0i+JeYX eH/J17AeBlsGgPzCxTANonzaMrsyV2AIgO0q2wIA2L8MaSny0FFN67rj0OXgqPYPcC3Y 07EfccN1uynR1XRsBDgSbRFz7Nk2NYBsL5uYrWjx15p5/wN61LiusifBOGXTrXNxgww0 dqsylwftMjOdxvC/hLWzotCHzZ18winHcXCsRBQKMtc6k5SNqaUG3z5zl13T/Mum+9sX 5sTzSGErcctJF9cAPQK0XFYHQYgaygfcxUGJjYO0VOqBQLe4uOnG+me0DBlYG7FCCj6P JtfA== X-Gm-Message-State: ANoB5pknr1zpdnlMU73OqRukoy3t/PNMCYrb6vPsIsv5w3LzAICUlxn5 u0r5qAe69luUCGHwVyJ3LgeJaAH2x9wEjmZL X-Google-Smtp-Source: AA0mqf7NzmaJ1S8z7UNAq0GcGiVsV6Ak7vPyFfGsvevSVpg2e8K8g3+r2D+3QVfW/6/DuccuYbUTvg== X-Received: by 2002:a19:5051:0:b0:499:8e29:2763 with SMTP id z17-20020a195051000000b004998e292763mr6406317lfj.137.1668520100303; Tue, 15 Nov 2022 05:48:20 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id c8-20020ac24148000000b00492c663bba2sm2207122lfi.124.2022.11.15.05.48.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Nov 2022 05:48:19 -0800 (PST) Message-ID: <3fd767c3-84c3-7155-9e05-cc124e3b3d2f@linaro.org> Date: Tue, 15 Nov 2022 14:48:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2 1/9] dt-bindings: arm-smmu: Allow up to 3 power-domains Content-Language: en-US To: Konrad Dybcio , linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org Cc: patches@linaro.org, Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221114104222.36329-1-konrad.dybcio@linaro.org> <20221114104222.36329-2-konrad.dybcio@linaro.org> <6fa8e3ea-2113-d930-96bc-3726d53e5bcd@linaro.org> <0121fc03-b027-7659-5e6e-b42089c9888d@linaro.org> <12578e05-ced9-e5f7-7922-0af2f2159333@linaro.org> <878402e7-7f80-31c7-3a6b-989a6ca29841@linaro.org> <4b4ca3ba-8e4d-088e-8b3e-a47ad6ecb965@linaro.org> From: Krzysztof Kozlowski In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221115_054823_752049_D1101244 X-CRM114-Status: GOOD ( 13.40 ) 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 15/11/2022 14:06, Konrad Dybcio wrote:>> diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >>> b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >>> index 28f5720824cd..55759aebc4a0 100644 >>> --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >>> +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >>> @@ -200,7 +200,7 @@ properties: >>> maxItems: 7 >>> >>> power-domains: >> >> As I mentioned before - minItems: 1. > But not all SMMUs require a power domain :/ It does not matter. This does not require power-domains. > >> >> Just like the link I gave you. >> >>> - maxItems: 1 >>> + maxItems: 3 >>> >>> nvidia,memory-controller: >>> description: | >>> @@ -364,6 +364,26 @@ allOf: >>> - description: interface clock required to access smmu's >>> registers >>> through the TCU's programming interface. >>> >>> + - if: >>> + properties: >>> + compatible: >>> + contains: >>> + const: qcom,sm6375-smmu-500 >>> + then: >>> + properties: >>> + power-domains: >>> + items: >>> + - description: SNoC MMU TBU RT GDSC >>> + - description: SNoC MMU TBU NRT GDSC >>> + - description: SNoC TURING MMU TBU0 GDSC >>> + >>> + required: >>> + - power-domains >>> + else: >>> + properties: >>> + power-domains: >>> + maxItems: 1 >>> + >>> examples: >>> - |+ >>> /* SMMU with stream matching or stream indexing */ >>> >>> >>> In my eyes, this should work, but I still get errors like: >>> >>> /home/konrad/linux/arch/arm64/boot/dts/qcom/sm8250-hdk.dtb: >>> iommu@3da0000: power-domains: [[108, 0]] is too short >>> >>> as if the else: path was never taken.. >> >> It was, but the top-level property said that minItems=3 (implicitly), so >> it is too short. > So the top-level properties take precedence over the ones that come from > the if-then-else?? Ugh. It's a sum of them. Top level is expected to define the widest constraints and if-then-else narrows them per variants. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel