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 8D61EC88CB6 for ; Tue, 13 Jun 2023 06:55:24 +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=Mqsopfr9KvSdgw4BWZgPxRoA9cCHvfBePzDlQc8K27o=; b=Pfyc1wIPTtY+of Z+HgyGow9nyZI7S7QrkjWx1XXjWhQNRxxxzB9PU4GLZH0bvnuKqpK19fzMi0UfvGzirfy6WtiGLWj N2XtGQEnh/YQ3mADgS39UBJbp+x0983z9+0xcOI76C1+1DXMyHQFgca1cm0cKKVctVCeMaCyXySN3 9fLmD+c6lhNF6IYGVrvf1H3lp9y++UQEQ+fI/9foPqEpL7qJVANcHr6+IRR1AN62bEohRc3f1YopE wrwput1mdTq2pFqEIolKh8S1pvLQORXkVmQgq+9N387sTdzxwSpj1uTvkemdaH/TpzPQbqqMi3BO8 Tttv9vUROKku2UgwIz0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q8xw4-0078lW-0T; Tue, 13 Jun 2023 06:55:24 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q8xw1-0078jx-0p for linux-phy@lists.infradead.org; Tue, 13 Jun 2023 06:55:22 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-51874324c2aso574019a12.1 for ; Mon, 12 Jun 2023 23:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686639317; x=1689231317; 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=Ya0JGjGnBFucsPDfp7+4IKVKKt1JIYfCsKyVruiNX70=; b=ciJ7aMVZ0GMKfRE1QHEWHJ/+hTTifJDeM3EguhxbExT8jSMBHgJBzCzbDyf2dV0YlV 6Az9PZ1PjlmWE9kiCF4mSwx3ku/IhIVP9jpKpd7CU2hwdvKez9vJFZDoUgwFU1TTjhs5 ysrzafMzuJgWPrr0J97gKj0VSHV1EQS1VzYxb0rp0FXCNo2j+Z6mjlxx/txj5BTeMF/L Sok6htd3FsAkXor9p22+afi0Cqvo0d/r6F55y1AVmgmjRImKqjMjxV7qN+sFsesKF0aP i/hAc/VFHqMJiJO2qu6CyPufIR+23CAViqgaWiwAeV5uMJy/Cu2eIt4xNUu2/8Rn8Pn2 lzmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686639317; x=1689231317; 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=Ya0JGjGnBFucsPDfp7+4IKVKKt1JIYfCsKyVruiNX70=; b=VvnuvEnEJUkMM0Ux5yMc1O4+sW4NsifvXUO1j+yBexYsTH1dJS+c5ifZKTDEXLvbX+ Bh1IxSVMjvDAr1aoOu7RWpeCsEIHzRe1N1lhC1eQUie5it/KdgU5KsaX3LS3KXv/wSgJ h10Ul7dvOkcoHH7GnLPgkKDl2PjJJXm+UbJXkjBA8xFGsk1lEMlQsruy0LmWizumRqS+ sNHyW7PYdxwbAYvjxVTh4aNQtRdUhl90THAoBUZK4CA2vIArc2dwjcAeXAfz8Lx0lGkF 6EKdTT806OzJTm3r6iN1/ul1WbnL6AZqBu8FnpT+0yRIUQoM/AJ1x27uyU0yYy7ohT0D jppg== X-Gm-Message-State: AC+VfDzkz0fideiJFAZG1UhicsHQqdi6brPIpjfw16sChkPE+vwgE1LI h3fySKrbus7VjypYtTJG7xr6tzjfYNv1gZBiZb0= X-Google-Smtp-Source: ACHHUZ7TaDo55fN/TkO5Knr4heKEa4OgXNTHGx+AyyWww42lHuT5Covk8wTO1ijncHvSxtUPa8TbRQ== X-Received: by 2002:a17:907:3fa4:b0:977:da9d:b842 with SMTP id hr36-20020a1709073fa400b00977da9db842mr12121149ejc.74.1686639316733; Mon, 12 Jun 2023 23:55:16 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id k14-20020a1709061c0e00b0096f6e2f4d9esm6115589ejg.83.2023.06.12.23.55.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 23:55:16 -0700 (PDT) Message-ID: <399ac8fd-b5b1-50ae-c1bd-88951679cf83@linaro.org> Date: Tue, 13 Jun 2023 08:55:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v3 2/5] dt-bindings: ata: dwc-ahci: add Rockchip RK3588 Content-Language: en-US To: Serge Semin Cc: Sebastian Reichel , Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Damien Le Moal , Vinod Koul , Kishon Vijay Abraham I , linux-ide@vger.kernel.org, linux-phy@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com References: <20230608162238.50078-1-sebastian.reichel@collabora.com> <20230608162238.50078-3-sebastian.reichel@collabora.com> <4c914503-c2e5-a5d8-97af-daaee0b4ec7c@linaro.org> <20230612083536.q3sq7w6cyiuxaqtv@mobilestation> <838ed0e6-985d-9a45-7ece-c607bda15871@linaro.org> <20230612085200.5okxcipiw5sofo62@mobilestation> From: Krzysztof Kozlowski In-Reply-To: <20230612085200.5okxcipiw5sofo62@mobilestation> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230612_235521_296787_A0F63AA7 X-CRM114-Status: GOOD ( 16.90 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On 12/06/2023 10:52, Serge Semin wrote: > On Mon, Jun 12, 2023 at 10:39:57AM +0200, Krzysztof Kozlowski wrote: >> On 12/06/2023 10:35, Serge Semin wrote: >>> On Mon, Jun 12, 2023 at 10:24:06AM +0200, Krzysztof Kozlowski wrote: >>>> On 08/06/2023 18:22, Sebastian Reichel wrote: >>>>> This adds Rockchip RK3588 AHCI binding. In order to narrow down the >>>>> allowed clocks without bloating the generic binding, the description >>>>> of Rockchip's AHCI controllers has been moved to its own file. >>>>> >>>>> Signed-off-by: Sebastian Reichel >>>>> --- >>>> >>>> ... >>>> >>>>> + >>>>> +properties: >>>>> + compatible: >>>>> + items: >>>>> + - enum: >>>>> + - rockchip,rk3568-dwc-ahci >>>>> + - rockchip,rk3588-dwc-ahci >>>>> + - const: snps,dwc-ahci >>>>> + >>>>> + ports-implemented: >>>>> + const: 1 >>>>> + >>>>> +patternProperties: >>>>> + "^sata-port@[0-9a-e]$": >>>>> + $ref: /schemas/ata/snps,dwc-ahci-common.yaml#/$defs/dwc-ahci-port >>>>> + >>>>> + unevaluatedProperties: false >>>> >>> >>>> You should be able to skip this patternProperties entirely, because it >>>> comes from dwc-ahci-common -> ahci-common schema. Did you try the patch >>>> without it? >>> > >>> Please see my message about this. The "sata-port@[0-9a-e]$" sub-node >>> bindings could be updated with the "reg" property constraint which, >>> based on the "ports-implemented" property value, most likely is >>> supposed to be always set to const: 1. >> >> Then anyway the pattern is wrong as it should be @1 always. > > * I miscalculated a bit, it should have been zero but in general > the pattern-property is indeed redundant. > > As a conclusion the change should look like this: > > +properties: > + compatible: > + items: > + - enum: > + - rockchip,rk3568-dwc-ahci > + - rockchip,rk3588-dwc-ahci > + - const: snps,dwc-ahci > + > + ports-implemented: > + const: 1 > + > + "sata-port@0": > + $ref: /schemas/ata/snps,dwc-ahci-common.yaml#/$defs/dwc-ahci-port > + > + properties: > + reg: > + const: 0 > + > + unevaluatedProperties: false > + > + ... > > Right? Code is correct but as I said - probably meaningless. All other ports are also accepted via referenced schema. You would need to disallow other ports or switch to additionalProperties: false in top-level. Best regards, Krzysztof -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy