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 05315C38145 for ; Thu, 8 Sep 2022 09:59:58 +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=5fXeNjcEtKf9U6VRO6wcNN6dujot5XzyUrgfFuuL8Tk=; b=nbm4obi2MupOd3 cKSD4rdgiVI4J6uHfRBURSOfuJopb2/ZfooQ6bKhY6N2oL4sDAMcW6eA5vv+8VlrBzGjL/eBb9SzQ c7eY5sHtBtahwalhX5XUzF7cNfsPK2MrA7FLHBZLPsQtmVzNiFqbuxfaMQwfxN/dzxAM5vUKYIros L3YgrKxCDX8QaO/9y3HpMUtJ/XT+f/L63bac8NCWg+LJW9INoQe5rBwME62DhLTFOx44+LGza2024 RW3ForNUTE4EcgYoV3/wIcGuLcfAcD+PI3tqWgu1yyrSOxHbxx5LIz1pY7EcZqgSBBg22B0d8AE7D pFn2BGvLeu+YwaQ9vL3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWEJG-00237s-4Q; Thu, 08 Sep 2022 09:58:58 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWEJD-00235K-0V for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2022 09:58:56 +0000 Received: by mail-lf1-x12c.google.com with SMTP id a8so5256867lff.13 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=J3j2ZokQeGeoziUiVt4KSOIgUlklYN0jG8ojH4Ow9TSQLSfzI23175BHCO+iEyCfVC AnA2UTonyz623Ny9igSTkyxRknlFX+XmPH0fFwplRHw/aUErcq+EObaYfTKIMs3sQehM b+oIQrBIfeMnUGbZl4tupblNQtfAxAeh2kKccze1EmNmYVlf4VSoZrIphdeNWgNsw2a9 iJqbO1s/C4kYQXKNO9dYRA7dHpMzFdi3Jy/dH2n4lxwJQUHEV03hu/ks7rA/mCgAlCcD ME2bKo9E8HTY3DO2Ewkqgmg1iSdbR+0mKBhm4txoxpMLvb1eoCzfveBt8fKtKbJ58QVd ecYQ== X-Gm-Message-State: ACgBeo3kvzwm5tyZR133HzhkTAC/H2Dn+RDBMFa+vcEg4NKUTm1BeB3K xbGZ4iPRT/w47Ya4hCMT+x7zNax0ivpXEw== X-Google-Smtp-Source: AA6agR6CgZaTajebPQUOH5iqAoFXqxgOKthGiYBrugccy2VIqNTSCiEmbsu99H6J9ZujybyOrvMjCw== 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_025855_113307_131F7451 X-CRM114-Status: GOOD ( 19.77 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel