Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2599120rdb; Wed, 15 Nov 2023 05:39:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHtTq1fINoKVJfjcIaX+HkjqvzxQLORQ9bh6KPMNfd17qGzOPLzAG41ExiJ6NuxxhoKF86 X-Received: by 2002:a05:6a00:2310:b0:6be:4789:97ba with SMTP id h16-20020a056a00231000b006be478997bamr12422989pfh.3.1700055596626; Wed, 15 Nov 2023 05:39:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700055596; cv=none; d=google.com; s=arc-20160816; b=l+EVCSlvc8pJnQfRXBS3GqXnQVBYlys72lbFn5muSIqsQQwV9Kv9kkUIj7IJlnSlEy LbP6o2zIjCSc8Lh8Abgrd4J3QzmTuhQXyP8XyigcH9Eizm9RxmXoSKvGca3l72Q76dQF yxWaL/0w1Ya7sVsBzcH9xfDkflj38OLJocFNFqsjE3RJNtj0437Rj41qz81nT4mG/IZe Ph2t7OPT7BcacG9IO2VZ9ICms6JeUE/M+uUFbteLb+LyFg52LOUn7LywlJAw+XcWjTc2 CqAXzmsI4ULazeXvpuGSjLSue1IonVdP9rMEv7yo5rHmfbyO7IbRnI0f2fxlVFq2Ceeo wB3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=T3XXco9McqTdwGAHqxlLGFLs83T/+FSapOZuY1gE8Pc=; fh=RxWohcPhAto4sMsGeY/QLYmEWRJ+3jXtqwgdiwfa4Xs=; b=TUw60DZ/2fPliFwzOiYPlUAMPMcTGdS0VZZO4a8t+NGqPRevI1ugg+e/UqvAZ0GmfR NKG1/lIgQJnUcw26maIr912v1YPKDiho/YladmKJN4FrnDazffBgJZVfDk8SiuccWxW4 rSF89Ho+HFRQ4AzonlrryReNiI+zeYQrN2aTgWKlX1Tvrxu1hBCFuJEkWTZnc3KxhIv9 bYLUWlbaorrfKkMC1ttbWLyr7V+P7J3kw19VgNS8o5VBxCW9i+FjlNVmmldKVnBAh8kA j1Bbdbcm3ez59IOL46oX/ytYwM3Jvho7bJuhFEu1Kl0YECNxQG8UfXQN3ID9nH2Y2pNb ahzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sUTy4gSP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id w7-20020a056a0014c700b006be1d2ee8f9si10848274pfu.224.2023.11.15.05.39.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:39:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sUTy4gSP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6E0738095897; Wed, 15 Nov 2023 05:39:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343919AbjKONjp (ORCPT + 99 others); Wed, 15 Nov 2023 08:39:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343717AbjKONjo (ORCPT ); Wed, 15 Nov 2023 08:39:44 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69F8FA1 for ; Wed, 15 Nov 2023 05:39:37 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7EEAC433C8; Wed, 15 Nov 2023 13:39:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700055577; bh=+m5EkdsuFgk4M8NgYmYjSHFQr191uVxuI+jCtlMUOdw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sUTy4gSPEZVY1b1dUA7g3l2l1Pjx6h4pd44zta+k9/BLgrwu2g907HexbUKqb8p3L PXtWeBDSN5DsolmNPBeXwGGeNAv9DDOwap9o59WksBFGtsSsY3nq1iQaLKpeEC75zj deGYYaz8tRPiSJGmy2j+pj7JTfl4hGgic2/Hj2OVHP6wOiMgKxhHguNqGJi4NNNwXZ Wd2Yy1U8HX5jjhxvUMmXGRWEoHD5IHmjN/bHBoHpgZX6kwxRdGInAcXgS8bW8EeX59 M/2hXSw958zAWSyd7sp6oQ2KN3oZ6QzJdmipMODs3uc3P9Fw/zZChlAMjWVsfVdJgj RSPPd1UMxfigg== Date: Wed, 15 Nov 2023 21:27:14 +0800 From: Jisheng Zhang To: Krzysztof Kozlowski Cc: Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Chao Wei , Chen Wang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 1/4] dt-bindings: reset: Add binding for Sophgo CV1800B reset controller Message-ID: References: <20231113005503.2423-1-jszhang@kernel.org> <20231113005503.2423-2-jszhang@kernel.org> <44f21244-5bf1-4e0f-80a9-6ec76d65eea4@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <44f21244-5bf1-4e0f-80a9-6ec76d65eea4@linaro.org> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 05:39:53 -0800 (PST) On Tue, Nov 14, 2023 at 10:12:35PM +0100, Krzysztof Kozlowski wrote: > On 13/11/2023 01:55, Jisheng Zhang wrote: > ... > > > diff --git a/include/dt-bindings/reset/sophgo,cv1800b-reset.h b/include/dt-bindings/reset/sophgo,cv1800b-reset.h > > new file mode 100644 > > index 000000000000..28dda71369b4 > > --- /dev/null > > +++ b/include/dt-bindings/reset/sophgo,cv1800b-reset.h > > @@ -0,0 +1,96 @@ > > +/* SPDX-License-Identifier: GPL-2.0 OR MIT */ > > +/* > > + * Copyright (C) 2023 Sophgo Technology Inc. All rights reserved. > > + * Copyright (C) 2023 Jisheng Zhang > > + */ > > + > > +#ifndef _DT_BINDINGS_CV1800B_RESET_H > > +#define _DT_BINDINGS_CV1800B_RESET_H > > + > > +/* 0-1 */ > > +#define RST_DDR 2 > > +#define RST_H264C 3 > > +#define RST_JPEG 4 > > +#define RST_H265C 5 > > +#define RST_VIPSYS 6 > > +#define RST_TDMA 7 > > +#define RST_TPU 8 > > +#define RST_TPUSYS 9 > > +/* 10 */ > > Why do you have empty IDs? IDs start at 0 and are incremented by 1. there's 1:1 mapping between the ID and bit. Some bits are reserved, I.E no actions at all. Is "ID start at 0 and increment by 1" documented in some docs? From another side, I also notice some SoCs especially those which make use of reset-simple driver don't strictly follow this rule, for example, amlogic,meson-a1-reset.h and so on. What happened? And I'd like to ask a question here before cooking 2nd version: if the HW programming logic is the same as reset-simple, but some or many bits are reserved, what's the can-be-accepted way to support the reset controller? Use reset-simple? Obviously if we want the "ID start at 0 and increment by 1" rule, then we have to write a custom driver which almost use the reset-simple but with a customized mapping. Thanks