Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1974947ioo; Mon, 23 May 2022 07:24:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh7Ftx379TZo2jOxF96Q4/Bs8W7O++MIu61ZaVTbj8uVdGsYs5rVVUtUgx6KxhN15oOssV X-Received: by 2002:a63:531c:0:b0:3fa:5856:2fa2 with SMTP id h28-20020a63531c000000b003fa58562fa2mr4360524pgb.198.1653315841664; Mon, 23 May 2022 07:24:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653315841; cv=none; d=google.com; s=arc-20160816; b=0OvGOzMbrEYDYYIyoqZjwLp9jWnDw+jA6kBhGWyjpNYVKLFwUS+Vp/QSHOqJPHXA4Z M6tVWuzzrHgsSKGHmhKzU/m0lKhHo/gTSdcIv4v2DInBTnzs+qzrE09T88OCY46onhbO jE9NHTKbaJRfR/N7WAYOa0URn6ERpJ0aOVKfGhKJW46Amjj+h53ddANuFlUpm4ELdF9C iC07+rDytPYCgVgIloCyordgrpZMlLxR4MbMIq7NfJDNP6pMB+1rEtfRFIcqfEOkIIQe UJPD7sQJKoNsqo32fBNlotDqQUKh0A8pz0mMQzwQSixh99D0HVFR8czseEMR1kqBCsx/ DRag== 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=OyHM0isO5wTAezh/ODRy2XOY7z3TjUO73U16dlah2Lg=; b=M2m12kfjwQBIQg3n7uA5/bfpcgi/52d1iaAKg3CE7ggYWUcAmidG+YPnyYpA9arcHI hOi4GiR2gFXQd+tBPknr5ZLu4H2kIAPNcYlA/TPpqvF7lACZwH/yb0H9kQ/z56RN9BEH Vza7Sl+Ka60GiQLWuj/BCr3KZGqv/fOayeiG9urqs/ZeiqNHHxT1e5OSqyZCL5WCEcti wnrYcBh82HSJbdjtVNzlu23vnZ0bdaJQeowZtzqoFLYkkB1vOEsa0IjtM0lSq27ECmgk arQcSxXCXm+sgjQNrguht0xZqQ7ZFm7gDoI/Vtl9rkJ2sL2cIbwodvtGYvdj95zSXTlV eWaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D+KH/Mba"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n7-20020a63a507000000b003aa5155f4e8si10203974pgf.128.2022.05.23.07.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 07:24:01 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D+KH/Mba"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 49C7254689; Mon, 23 May 2022 07:23:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237000AbiEWOXu (ORCPT + 99 others); Mon, 23 May 2022 10:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237005AbiEWOXs (ORCPT ); Mon, 23 May 2022 10:23:48 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 022FD2DF3 for ; Mon, 23 May 2022 07:23:46 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id g16so17417864lja.3 for ; Mon, 23 May 2022 07:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=OyHM0isO5wTAezh/ODRy2XOY7z3TjUO73U16dlah2Lg=; b=D+KH/MbaKM1Om37PloyJ8FEP0G0r8HIIgD1a9k9OJsHUHaBc52/jowGD5pw4CYYN8h oIWc704WFK7X3+KVKTS1IAGeWcURqmYZKUcDkHuV4mP1DWL6bb04ECgHFPfIeCBw8CJX iZMDqlRMytJ7AkpEn0hcqSyvj+5fLmxWDEXPRkGBkVsPkGrcDwMJieeJxl/47Xktpi3E rQPyyVvtPzNpE6w0ZIIahgxyc+DrCYm8LKL9UfxvD3hwOKByGv0Tq35FHfKxnxM1ReXJ ieCsXLForVSIkGc4vUYq7iQp7IctkU6bNYVy8TKA4H/TkDRENjsRNyMrAb6ErPakBDAu Uexw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=OyHM0isO5wTAezh/ODRy2XOY7z3TjUO73U16dlah2Lg=; b=wbzQVKNDjiUvoHYEAgtIA8li7uTHIZTWm+rF4Sni7RY0x4TXdtFhIq9q59+dyNL8p+ qg+nNKYUTzDq3Vf5msLI+2RQiuAZFDBSs8FcmnpCJXRT9vd+fZW3F8/Id1+zjxxa9fbX h8FW46JCZb878RW8GizmpZek6CMrjVTHiC0ASjM/P/JcLS0DBpW4bPIWlY2hS43MLcLw Dj4SyWiRqHu2aO2W2faP0M75i//QvfcEMzxFovlul5086i0gb1kQ0kojhkPuo3EsNY4h lcNGS4zbfBCz04ogpN8SBdeiMYMiBJm4RPwnsI8kQjYX2Vb4GxRHFbdB5rCnwSzlr8V2 8/xg== X-Gm-Message-State: AOAM532iu6t2v0KDRnxhFov8m+GC6ZwjUMsaG4A/EpIHyutWDaqtQ+to 4B/v4p8fsuFtjTO10yQHs1hsQA== X-Received: by 2002:a05:651c:1792:b0:235:1df3:7b8e with SMTP id bn18-20020a05651c179200b002351df37b8emr13338743ljb.464.1653315824311; Mon, 23 May 2022 07:23:44 -0700 (PDT) Received: from [192.168.0.17] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id s9-20020ac25fa9000000b0047255d211ffsm1996118lfe.302.2022.05.23.07.23.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 07:23:43 -0700 (PDT) Message-ID: <96ab5563-ea03-806b-f38e-39ef1ed04093@linaro.org> Date: Mon, 23 May 2022 16:23:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v1 11/19] dt-bindings: reset: npcm: Add support for NPCM8XX Content-Language: en-US To: Tomer Maimon Cc: Avi Fishman , Tali Perry , Joel Stanley , Patrick Venture , Nancy Yuen , Benjamin Fair , Rob Herring , krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, Philipp Zabel , Greg KH , Daniel Lezcano , Thomas Gleixner , Wim Van Sebroeck , Guenter Roeck , catalin.marinas@arm.com, will@kernel.org, Arnd Bergmann , Olof Johansson , jirislaby@kernel.org, shawnguo@kernel.org, bjorn.andersson@linaro.org, geert+renesas@glider.be, marcel.ziswiler@toradex.com, Vinod Koul , biju.das.jz@bp.renesas.com, nobuhiro1.iwamatsu@toshiba.co.jp, robert.hancock@calian.com, =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= , lkundrak@v3.sk, soc@kernel.org, devicetree , Linux Kernel Mailing List , linux-clk@vger.kernel.org, linux-serial@vger.kernel.org, linux-watchdog@vger.kernel.org, Linux ARM References: <20220522155046.260146-1-tmaimon77@gmail.com> <20220522155046.260146-12-tmaimon77@gmail.com> <86cd6a37-70ad-3a90-bc8a-dcd8b41f1175@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, 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 23/05/2022 16:03, Tomer Maimon wrote: > Hi Krzysztof, > > Thanks for your comments. Please stop replying in HTML. It's not the format of emails used in the Linux. It makes very difficult to read your replies. > > > On Mon, 23 May 2022 at 12:01, Krzysztof Kozlowski > > > wrote: > > On 22/05/2022 17:50, Tomer Maimon wrote: > > Add binding document and device tree binding > > constants for Nuvoton BMC NPCM8XX reset controller. > > > > Signed-off-by: Tomer Maimon > > > --- > >  .../bindings/reset/nuvoton,npcm-reset.txt     |  17 ++- > >  .../dt-bindings/reset/nuvoton,npcm8xx-reset.h | 124 > ++++++++++++++++++ > >  2 files changed, 139 insertions(+), 2 deletions(-) > >  create mode 100644 include/dt-bindings/reset/nuvoton,npcm8xx-reset.h > > > > diff --git > a/Documentation/devicetree/bindings/reset/nuvoton,npcm-reset.txt > b/Documentation/devicetree/bindings/reset/nuvoton,npcm-reset.txt > > index cb1613092ee7..b7eb8615b68b 100644 > > --- a/Documentation/devicetree/bindings/reset/nuvoton,npcm-reset.txt > > +++ b/Documentation/devicetree/bindings/reset/nuvoton,npcm-reset.txt > > @@ -1,14 +1,15 @@ > >  Nuvoton NPCM Reset controller > >  > >  Required properties: > > -- compatible : "nuvoton,npcm750-reset" for NPCM7XX BMC > > +- compatible : "nuvoton,npcm750-reset" for Poleg NPCM7XX BMC. > > +               "nuvoton,npcm845-reset" for Arbel NPCM8XX BMC. > >  - reg : specifies physical base address and size of the register. > >  - #reset-cells: must be set to 2 > >  - syscon: a phandle to access GCR registers. > >  > >  Optional property: > >  - nuvoton,sw-reset-number - Contains the software reset number to > restart the SoC. > > -  NPCM7xx contain four software reset that represent numbers 1 to 4. > > +  NPCM7xx and NPCM8xx contain four software reset that represent > numbers 1 to 4. > >  > >    If 'nuvoton,sw-reset-number' is not specified software reset is > disabled. > >  > > @@ -32,3 +33,15 @@ example: > >          }; > >  > >  The index could be found in > . > > + > > +Specifying reset lines connected to IP NPCM8XX modules > > +====================================================== > > we prefer to use the same explanation as the NPCM7XX reset explanation > in the reset binding document. ?? > > No need to document consumers. Just mention the header. What explanation? Consumers are trivial. Once you convert it to DT schema there should be no such code at all. > > > +example: > > + > > +        spi0: spi@..... { > > +                ... > > +                resets = <&rstc NPCM8XX_RESET_IPSRST2 > NPCM8XX_RESET_PSPI1>; > > +                ... > > +        }; > > + > > +The index could be found in > . > > diff --git a/include/dt-bindings/reset/nuvoton,npcm8xx-reset.h > b/include/dt-bindings/reset/nuvoton,npcm8xx-reset.h > > new file mode 100644 > > index 000000000000..4b832a0fd1dd > > --- /dev/null > > +++ b/include/dt-bindings/reset/nuvoton,npcm8xx-reset.h > > @@ -0,0 +1,124 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > Dual license. > > O.K.  > > > > +// Copyright (c) 2022 Nuvoton Technology corporation. > > + > > +#ifndef _DT_BINDINGS_NPCM8XX_RESET_H > > +#define _DT_BINDINGS_NPCM8XX_RESET_H > > + > > +#define NPCM8XX_RESET_IPSRST1                0x20 > > +#define NPCM8XX_RESET_IPSRST2                0x24 > > +#define NPCM8XX_RESET_IPSRST3                0x34 > > +#define NPCM8XX_RESET_IPSRST4                0x74 > > What are these? All IDs should be incremental, decimal and start from 0. > > Register offset, we use the same method in NPCM7xx. please refer > https://elixir.bootlin.com/linux/v5.18/source/include/dt-bindings/reset/nuvoton,npcm7xx-reset.h > > > and the driver asserts the reset according to the reset include definitions  Register offsets, a device programming model, are not part of bindings. Bindings should be independent of programming model, so only IDs are allowed. Why did you add register offsets to bindings at the first place? > > > > + > > +/* Reset lines on IP1 reset module (NPCM8XX_RESET_IPSRST1) */ > > +#define NPCM8XX_RESET_GDMA0          3 > > IDs start from 0 and do not have holes. > > This represents the reset BIT in the reset register.  Again, not programming model in the bindings. No bits, not register values, no register offsets. Best regards, Krzysztof