Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3261012rwa; Tue, 23 Aug 2022 01:24:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR7hs416XuLIfMjDsPY9yi45fSJd1EAtJ/J+H+SIgDqpSuupwfc8UE9jQgBEoQKuBf8h4HyS X-Received: by 2002:a17:907:97cd:b0:731:5d0:4434 with SMTP id js13-20020a17090797cd00b0073105d04434mr14794700ejc.603.1661243087084; Tue, 23 Aug 2022 01:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661243087; cv=none; d=google.com; s=arc-20160816; b=MmiE6kQbUqeuZ4hTex63Y+iZO5bqks7LnZNJiH9N5jngM3GUMsIvLZ0tN4jfkIMY2F boe10z1/fRmiE0NcZjDMQTqywh+ejkgI9L5iJdDZgWVBPWdiGoLX7NgY5xGGqEty+qIi TWYBL/nEKxWi8PwMtH5sXG8jlNDa9Jx6Mu6wEITwcYiNMaz6BEw7IaJhr6XyTTkm0gxM 1Ga8+fxCCmdjYpkwTXLj/QTZI4nePy7Ia4XhAkzNB/jmxIfDa8P/MiMIcjEs5wpzgyUW Z1CH1vREBkNJBxDZU2UP/jGchIeAvli0J6Medbij04DZNR11wi8eHAIFNHMeXFQOOB1H Ku7A== 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=HFRkd6+GWv944FyJVUBe4iftku17LMXFRqWaLXS9n3M=; b=hqvHppcII5B0yizAdtrhTtrOHZMEMXMMMGrQgkwaudmkOnb+wOOHZW/+iSvMi5jYOz YMXMkaSUrTaY5qg6+s3uINtfwg4Q+Abrtzt9og75lh4CCtZbKfNokJOvTgHpJe3NIJXS ykagQFCodlOK/0apznQVMxG14uIDzOENIgHpWWcZ44/qC6gbLbW0cV67brLLDbIVP6GN fsHEbWr10gJi7qwVqHqwZyOYagrq5INqlE8LlhMqd6j6bSY5JfBGDjwnvHyMGHQc2NsB QQwkEg2+2ZQKCX1B9lpAGY1+oeR8wqlrKrdHi+cM5H0KBSghzvKFwx4/p2P3HQkd/L9U aITg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VpgaNmVg; 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 dm5-20020a170907948500b007303db545e6si11065878ejc.786.2022.08.23.01.24.21; Tue, 23 Aug 2022 01:24:47 -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=VpgaNmVg; 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 S243098AbiHWIW4 (ORCPT + 99 others); Tue, 23 Aug 2022 04:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243072AbiHWIQd (ORCPT ); Tue, 23 Aug 2022 04:16:33 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B7E1F13 for ; Tue, 23 Aug 2022 01:11:12 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id z20so12797130ljq.3 for ; Tue, 23 Aug 2022 01:11:12 -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; bh=HFRkd6+GWv944FyJVUBe4iftku17LMXFRqWaLXS9n3M=; b=VpgaNmVgn5wH2Q3FQgcpkx4MnWNXe49SeT0FaMxhOY6HoTzKBanqTCO5Nw6LhAJN1v goPIrfr9lkaxbTliET0kVj90wVaBW/8I9h69rKgjYt4qsiH0pYrkM3UVUUmR0YM4F24P LtuLDE1QFEnbzD7XKrE27xq30DHCaolSr8MNW/uzY7l3CZgnXza1OcI2WtitBIirM3O9 9IQh3wklF+kXvv3o1tqEt8XXnvZyqiuP7fqkRbdXtDk0hq4vHi37xNSR1UAT1S8Ac4gG s/5CFrQ5yh6D50x+r2jhlPwM64UzIVVyKFZ0kFUvzTtOJtdbORJ+2vscorSmZ6CDDsFb feaw== 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; bh=HFRkd6+GWv944FyJVUBe4iftku17LMXFRqWaLXS9n3M=; b=3O7vPAGfZcaLS4Aa71FANQnFsJhjV9gDnklfXuypZo5jBXBx6dtZPPx7GOIeX6gHpY Mgd90d3KyCB1YO6tvGgcqclkwvpYlnkOfHj3XCf+TZVXz2gd39OkYLuEy3xLvgRVsIxB mxhYC8wzoupsWc2H0pTt6QeNVHA+lI4V63JG9VHMtiusXWIvYdaz3WX1iNIu7f8hhjpN iugcnRw0qX4Kvvg5upYa/pBcmufkJ9h9fJcXBSz/fYJi4utvCSBV1Z4VBacsYD5X4tSX L6NteZqHCQAjAoj3BSBi114Np72ajq7YztLCamtF5AgpeIvxxnSJ/iSnqdpUQAugvfiy +wpA== X-Gm-Message-State: ACgBeo39H7QcTnC/CDdAvoGciCFosfXwNLjWlNpntSBMJ3eF+M4FZMaP SrgnMVqIbt4F8cYoo1AmAy9unQ== X-Received: by 2002:a05:651c:2387:b0:261:de7f:f662 with SMTP id bk7-20020a05651c238700b00261de7ff662mr79352ljb.110.1661242270317; Tue, 23 Aug 2022 01:11:10 -0700 (PDT) Received: from [192.168.0.11] (89-27-92-210.bb.dnainternet.fi. [89.27.92.210]) by smtp.gmail.com with ESMTPSA id a16-20020a056512391000b0048aa9d67483sm2379557lfu.160.2022.08.23.01.11.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Aug 2022 01:11:09 -0700 (PDT) Message-ID: <6a803554-bc1a-9f53-b7e2-7571fffea7e0@linaro.org> Date: Tue, 23 Aug 2022 11:11:08 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 01/13] dt-bindings: memory: snps: Extend schema with IRQs/resets/clocks props Content-Language: en-US To: Serge Semin , Michal Simek , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , Krzysztof Kozlowski , Rob Herring , Manish Narani Cc: Serge Semin , 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-2-Sergey.Semin@baikalelectronics.ru> From: Krzysztof Kozlowski In-Reply-To: <20220822191957.28546-2-Sergey.Semin@baikalelectronics.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 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=unavailable 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 22/08/2022 22:19, Serge Semin wrote: > First of all the DW uMCTL2 DDRC IP-core supports the individual IRQ lines > for each standard event: ECC Corrected Error, ECC Uncorrected Error, ECC > Address Protection, Scrubber-Done signal, DFI Parity/CRC Error. It's > possible that the platform engineers merge them up in the IRQ controller > level. So let's add both configuration support to the DT-schema. > > Secondly each IP-core interface is supplied with a clock source like APB > reference clock, AXI-ports clock, main DDRC core reference clock and > Scrubber low-power clock. In addition to that each clock domain can have a > dedicated reset signal. Let's add the properties for at least the denoted > clock sources and the corresponding reset controls. > > Signed-off-by: Serge Semin > --- > .../snps,dw-umctl2-ddrc.yaml | 65 +++++++++++++++++-- > 1 file changed, 60 insertions(+), 5 deletions(-) > > diff --git a/Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml b/Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml > index 787d91d64eee..8db92210cfe1 100644 > --- a/Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml > +++ b/Documentation/devicetree/bindings/memory-controllers/snps,dw-umctl2-ddrc.yaml > @@ -13,13 +13,13 @@ maintainers: > > description: | > Synopsys DesignWare Enhanced uMCTL2 DDR Memory Controller is cappable of Typo in original text: capable > - working with DDR devices up to (LP)DDR4 protocol. It can be equipped > + working with DDR devices upporting to (LP)DDR4 protocol. It can be equipped Typo - supporting? > with SEC/DEC ECC feature if DRAM data bus width is either 16-bits or > 32-bits or 64-bits wide. > > - The ZynqMP DDR controller is based on the DW uMCTL2 v2.40a controller. > - It has an optional SEC/DEC ECC support in 64-bit and 32-bit bus width > - configurations. > + For instance the ZynqMP DDR controller is based on the DW uMCTL2 v2.40a > + controller. It has an optional SEC/DEC ECC support in 64-bit and 32-bit > + bus width configurations. These changes do not look related to your patch, so split them. > > properties: > compatible: > @@ -28,11 +28,55 @@ properties: > - xlnx,zynqmp-ddrc-2.40a > > interrupts: > - maxItems: 1 > + description: > + DW uMCTL2 DDRC IP-core provides individual IRQ signal for each event":" > + ECC Corrected Error, ECC Uncorrected Error, ECC Address Protection, > + Scrubber-Done signal, DFI Parity/CRC Error. Some platforms may have the > + signals merged before they reach the IRQ controller or have some of them > + absent in case if the corresponding feature is unavailable/disabled. > + minItems: 1 > + maxItems: 5 List has to be strictly ordered, so instead list and describe the items... unless you are sure that any of these interrupt lines can be merged into any other one? > + > + interrupt-names: > + minItems: 1 > + maxItems: 5 > + oneOf: > + - description: Common ECC CE/UE/Scrubber/DFI Errors IRQ > + items: > + - const: ecc > + - description: Individual ECC CE/UE/Scrubber/DFI Errors IRQs > + items: > + enum: [ ecc_ce, ecc_ue, ecc_ap, ecc_sbr, dfi_e ] > > reg: > maxItems: 1 > > + clocks: > + description: > + A standard set of the clock sources contains CSRs bus clock, AXI-ports > + reference clock, DDRC core clock, Scrubber standalone clock > + (synchronous to the DDRC clock). > + minItems: 1 > + maxItems: 4 I expect list to be strictly defined, not flexible. > + > + clock-names: > + minItems: 1 > + maxItems: 4 > + items: > + enum: [ pclk, aclk, core, sbr ] > + > + resets: > + description: > + Each clock domain can have separate reset signal. > + minItems: 1 > + maxItems: 4 > + > + reset-names: > + minItems: 1 > + maxItems: 4 > + items: > + enum: [ prst, arst, core, sbr ] The same. > + > required: > - compatible > - reg > @@ -48,4 +92,15 @@ examples: > interrupt-parent = <&gic>; > interrupts = <0 112 4>; > }; > + - | > + memory-controller@fd070000 { > + compatible = "snps,ddrc-3.80a"; > + reg = <0x3d400000 0x400000>; > + > + interrupts = <0 147 4>, <0 148 4>, <0 149 4>, <0 150 4>; Use proper defines. > + interrupt-names = "ecc_ce", "ecc_ue", "ecc_sbr", "dfi_e"; > + > + clocks = <&rcu 0>, <&rcu 5>, <&rcu 6>, <&rcu 7>; > + clock-names = "pclk", "aclk", "core", "sbr"; > + }; > ... Best regards, Krzysztof