Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp409224rwn; Thu, 8 Sep 2022 03:37:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR6GrhDEnFlz5gvpbr2CyGx4uriBYtL6sfY8m47M5FrkGhZfga7D8MR3twZGHjIX3N7l3d9x X-Received: by 2002:a63:8a4a:0:b0:438:6a17:f0bb with SMTP id y71-20020a638a4a000000b004386a17f0bbmr603542pgd.267.1662633429919; Thu, 08 Sep 2022 03:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662633429; cv=none; d=google.com; s=arc-20160816; b=tcUhP1OWkPuEy778BO+QltMXUKY7zOjcyKk3GkIl0QPVkMNQlMxd5K8LrETQQ3bEAM 96FmgYqx3HN3KOVENUXVgeou9igWBcO6sD6PhWw2lEyv5fOX+r85TxRGGrOXVh1JI0wC 0Dc3qsZsvdxl7G5PQEgWl1OVv2Rxb4lXZOOHXLHsQTc0BR8WoB64qILcG3l9dfkv7I3h RdpV9xq87h6S6mFd74ZG+qku32zd+8zxbfl07jgQPTnoB28mzN67C7mDxkpiYBrhaEwZ pLnAFhqHkGguKk39ixocDA3LCFZpuBZvFOkwAxrBpUvDq7/5b/QpMgzKwhrako4Omjdm /koA== 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=mGgTz1J985wOQ7/4ni4tOp0M5zo/7OMTnLwttaIHVEg=; b=p5xsyk7Y5Ha++D2/9ITJRamw+uCJngzlBrK8sIhrow+Ic2nvGAgVAAAF0oqCLoCMdL ngihGSF4W//rBi2C7/XzbqN22pHv6JkdsU/Swf/2Io6dGjk+pSvM3GHmSNW06RntiVt2 dwaFsSlMUO++8DdYyiqO9h51Gx6h1oVdIrmDRnD87ZQV8XtyMJlJiPQjQcGGEJEqOPCS UB8+kq5jM0sP/vllsSb2B1c+3EDCJgqVt4PVf7Uhqvrup6RiDxD/IyL1XHZT94BR/sLf jZ2/nQlNH+k2ge4H3usgfYM9yKBjTpLB0wnLPSkX5/nBN9ITudtcsfo1xauIRcigJqFb EzMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RA9r7H6N; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l192-20020a6391c9000000b00435b250994csi2127369pge.712.2022.09.08.03.36.58; Thu, 08 Sep 2022 03:37:09 -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=@linaro.org header.s=google header.b=RA9r7H6N; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbiIHJ7A (ORCPT + 99 others); Thu, 8 Sep 2022 05:59:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbiIHJ64 (ORCPT ); Thu, 8 Sep 2022 05:58:56 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 446BAE4DCC for ; Thu, 8 Sep 2022 02:58:55 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id k10so12238358lfm.4 for ; Thu, 08 Sep 2022 02:58:54 -0700 (PDT) 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; bh=mGgTz1J985wOQ7/4ni4tOp0M5zo/7OMTnLwttaIHVEg=; b=RA9r7H6NxX7Fb79kxbBp/QSXm3U0ZozJxWhRKZ/WJcTBSAvmuhOSPCrF9zBzvD2+ML CjAGTEObRORY/YslobjTGOpkca7vEp8lZyfe/mQYUThCdJadkB6d0BJzoOY0Qs1ijZso 9AoTbXStFSttLbrvgyFpl0mdB/klKjYjRRUPdJ9Gz51RfU//ZE1jQyHSt7LwijQFKgz/ q8gmRld/z1JPnqMaNyfSKri1LHjAv7TaWBv6W/vGD+iZ81Q+3EasZBs5aVRxT45gY9A1 AGCzLW8mWovDaqM7YodpneA4AWDiYYju7ZOwjI5MsGLq+5qIJMd5Y2jBRZwdG4rVzyVu IWWw== 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; bh=mGgTz1J985wOQ7/4ni4tOp0M5zo/7OMTnLwttaIHVEg=; b=v9JMYYnHhs4tEfMX9MYqPQNrO8FGvqvKS47unIfBoH+03sShISCJRwL74XN8/ShWVr tQaNDfpZmyvTgQiRmS23vWUjWxe9hqOuA6WjDYhcDyrwq3pygI+TvU0/iHI12rw0FfW3 q8egQoy0dYSmzOolJPmqVWMz+KY/XGBcnYwS7yo08a/hIlvjw8ofl4Zfl3bT4nOIneRD NMRPZztLIz9lKDQWVtWoG3SoWylva4rl4Z7tWlnybJE9rHw9d9Oksb7b+g8XPLnpfe/S vt1+FeHgD9DD4viErrSjDkB7YVIY+9C2n0esnapQdJ1jHopc9SlQu97CeA0nYCRT/xR9 oEcQ== X-Gm-Message-State: ACgBeo1gtnv/QsL4adSIHpwiUuKnG+ZDWhFGWbf0bAfspAVxJ1Byfynt j+YV5hWg7BvIPtTenFTVmSnwyQ== X-Received: by 2002:a05:6512:131f:b0:494:5d2f:c34b with SMTP id x31-20020a056512131f00b004945d2fc34bmr2480212lfu.324.1662631133327; Thu, 08 Sep 2022 02:58:53 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id d10-20020a056512368a00b0049876c1bb24sm288753lfs.225.2022.09.08.02.58.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 02:58:52 -0700 (PDT) Message-ID: Date: Thu, 8 Sep 2022 11:58:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH 02/13] dt-bindings: memory: snps: Add Baikal-T1 DDRC support Content-Language: en-US To: Serge Semin Cc: Serge Semin , Michal Simek , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , Rob Herring , Manish Narani , Alexey Malahov , Michail Ivanov , Pavel Parkhomenko , Punnaiah Choudary Kalluri , Dinh Nguyen , James Morse , Robert Richter , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220822191957.28546-1-Sergey.Semin@baikalelectronics.ru> <20220822191957.28546-3-Sergey.Semin@baikalelectronics.ru> <0bda4ff9-fc08-77f2-0e06-7469dcaec6d8@linaro.org> <20220826095447.qxfvty6xq4tufe75@mobilestation> <36b2b6d9-9ab4-a4bc-6476-bd5b5d3ef77e@linaro.org> <20220908094307.civtqiwxadas3ys3@mobilestation> From: Krzysztof Kozlowski In-Reply-To: <20220908094307.civtqiwxadas3ys3@mobilestation> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 08/09/2022 11:46, Serge Semin wrote: > On Mon, Sep 05, 2022 at 12:14:21PM +0200, Krzysztof Kozlowski wrote: >> On 26/08/2022 11:54, Serge Semin wrote: >>> On Tue, Aug 23, 2022 at 11:12:28AM +0300, Krzysztof Kozlowski wrote: >>>> On 22/08/2022 22:19, Serge Semin wrote: >>>>> Baikal-T1 DDR controller is based on the DW uMCTL2 DDRC IP-core v2.51a >>>>> with up to DDR3 protocol capability and 32-bit data bus + 8-bit ECC. There >>>>> are individual IRQs for each ECC and DFI events.The dedicated scrubber >>>> >>> >>>> Missing space before "The". >>> >>> Ok. Thanks. >>> >>>> >>>>> clock source is absent since it's fully synchronous to the core clock. >>>> >>> >>>> You need allOf:if-then restricting this per variant. >>> >>> I really don't like the allOf-if-if-etc pattern because it gets to be >>> very bulky if all the vendor-specific and generic platform >>> peculiarities are placed in there. I am more keen of having a >>> generic DT-schema which would be then allOf-ed by the vendor-specific >>> device bindings. What do you think I'd provide such design in this >>> case too? >> >> Sure, it would work. >> >>> >>> But I'll need to move the compatible property definition to the >>> "select" property. Like this: >>> >>> Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml: >>> +[...] >>> +# Please create a separate DT-schema for your DW uMCTL2 DDR controller >>> +# and make sure it's assigned with the vendor-specific compatible string. >>> +select: >>> + properties: >>> + compatible: >>> + oneOf: >>> + - deprecated: true >>> + description: Synopsys DW uMCTL2 DDR controller v3.80a >>> + const: snps,ddrc-3.80a >>> + - description: Synopsys DW uMCTL2 DDR controller >>> + const: snps,dw-umctl2-ddrc >>> + - description: Xilinx ZynqMP DDR controller v2.40a >>> + const: xlnx,zynqmp-ddrc-2.40a >>> + required: >>> + - compatible >> > >> Not entirely. If you need select, then add it with compatibles, but all >> descriptions and deprecated are staying in properties. > > Ok. But note in such case the compatible string constraints will get > to be opened for any non-common string. Like this: > > + properties: > + compatible: > + oneOf: > + - const: snps,ddrc-3.80a > + - {} Not really. If you define here specific device compatibles in select, they must be here as well. > > It's required for the DT-schemas referencing the common one, otherwise > they will fail DT-nodes evaluation due to the "compatible" property > missing the vendor-specific string. o you probably mix here purposes. Either you define common schema or device specific one. If you define common, usually it does not enforce any compatibles. You do not need select, no need for compatibles either, although you can add above syntax if it is valid. If you write here specific device bindings, then compatibles should be listed. Judging from what you wrote it's neither this nor that... Best regards, Krzysztof