Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1275963rdg; Fri, 11 Aug 2023 16:21:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpT8g6XK6YYbyDgLy/fE+Y8Osln4mrJOS1bqMmd5uhdM9idU9KRyA5KLFY9a2y5aVlI+nX X-Received: by 2002:a17:907:2cce:b0:99c:ac84:663b with SMTP id hg14-20020a1709072cce00b0099cac84663bmr2759667ejc.65.1691796087672; Fri, 11 Aug 2023 16:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691796087; cv=none; d=google.com; s=arc-20160816; b=xecRBpxv9uZgrCTEvORDIV2wET/aJqLFjFJ+j7yklu99ACI5dRaFT4auA2eGML+oHS mLmnjuVpgRzkX7AJqvIS3cCJ27QH5he75ostKTP8t9OwfBYu6D1ioGgm9xCD29pPa7z/ sKIXpC+Olxld+IalX3zIqT56nI7MsF1Lirh5bsKxF0h474X+XB5RbJBVyNYm4SOwGTa0 7KtIMMTVkHty9IVZIEqlPZxjP/hPsZGh7PvHMXRftlzk/59LnlnVHOx+OEQaS2SW4Mto I6IMuR8Ien4ykiy9O9TCvOHn5e8DJPIJxrp6zJR031pwUHU6bSEPelXX6ZzNj/VV3k9J 7RMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=rx/ddZsTln6eHTE05YKYyI1a0Lzg0UQiNmAIHA95jYU=; fh=0vTlhKnPIkUYzarRizgRHItPsxVRvOhVC8HPOYhj7Gk=; b=mCJd2aaoYc8gCAlarrEK5mUjM+QEOfna1SCMsuY/a7xlYRcSR/2pcVr0MQSNlEBdzh 4O+J2QUM4g0lQGRZ91BCPt7GYRVMBBQGC4C0w5oV1ngAcKwvV9Yl2E2tcQ5tvquVV4OO pZzmvI50g+tYx081kH7h0doXTLgwTpYJhMCyP/KkngX58Mkd3Z3yLMiTdFkwcwO9Ug8Y yoJkExgl+v5hhuYnS6x6bmeV3ZnPtQ4zyVFTokczEjAw7hwQu3JhIV5Ubu7tl5ap282l MMZH2bKKf7sO+/E7e6hwTes4Qk96cbRbxwpirekmsSz6x+tCGrC7Oy27rgX9bYMJv6is fWpg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a1709065e0300b0099cd32bd549si4227996eju.606.2023.08.11.16.21.03; Fri, 11 Aug 2023 16:21:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236082AbjHKWnk (ORCPT + 99 others); Fri, 11 Aug 2023 18:43:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232083AbjHKWnj (ORCPT ); Fri, 11 Aug 2023 18:43:39 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D0292130; Fri, 11 Aug 2023 15:43:38 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7A20F113E; Fri, 11 Aug 2023 15:44:20 -0700 (PDT) Received: from slackpad.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C5C243F59C; Fri, 11 Aug 2023 15:43:35 -0700 (PDT) Date: Fri, 11 Aug 2023 23:42:37 +0100 From: Andre Przywara To: Srinivas Kandagatla , Maxime Ripard Cc: Martin Botka , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Alan Ma , Marijn Suijten , AngeloGioacchino Del Regno , Konrad Dybcio Subject: Re: [PATCH 2/3] nvmem: sunxi_sid: Add support for H616 SID Message-ID: <20230811234212.2236c814@slackpad.lan> In-Reply-To: References: <20230811-sid-h616-v1-0-d1dfc9f47b19@somainline.org> <20230811-sid-h616-v1-2-d1dfc9f47b19@somainline.org> <20230811121754.3a4dc270@donnerap.manchester.arm.com> Organization: Arm Ltd. X-Mailer: Claws Mail 4.1.1 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 Fri, 11 Aug 2023 15:12:34 +0200 Martin Botka wrote: Hi, Maxime, Srinivas, can you possibly shed some light on the exact scope of this nvmem DT binding? See below for more details ... > On Fri, Aug 11 2023 at 12:17:54 PM +01:00:00, Andre Przywara > wrote: > > On Fri, 11 Aug 2023 13:02:35 +0200 > > Martin Botka wrote: > > > > Hi Martin, > > > >> Add support for the H616 SID controller. > > > > thanks for upstreaming this! > > > >> > >> The config can be reused from A64. > >> > >> Signed-off-by: Martin Botka > >> --- > >> drivers/nvmem/sunxi_sid.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c > >> index a970f1741cc6..df6fb5e0b724 100644 > >> --- a/drivers/nvmem/sunxi_sid.c > >> +++ b/drivers/nvmem/sunxi_sid.c > >> @@ -216,6 +216,7 @@ static const struct of_device_id > >> sunxi_sid_of_match[] = { > >> { .compatible = "allwinner,sun50i-a64-sid", .data = > >> &sun50i_a64_cfg }, > >> { .compatible = "allwinner,sun50i-h5-sid", .data = > >> &sun50i_a64_cfg }, > >> { .compatible = "allwinner,sun50i-h6-sid", .data = &sun50i_h6_cfg > >> }, > >> + { .compatible = "allwinner,sun50i-h616-sid", .data = > >> &sun50i_a64_cfg }, > > > > You don't need a new compatible string, then. > > Just use > > compatible = "allwinner,sun50i-h616-sid", > > "allwinner,sun50i-a64-sid"; > > in the DT, and add that combo to the binding, then you don't need any > > driver patches at all - with the added benefit of that already working > > with existing kernels. > I added it cause H5 and A83T were added after their DT binding was in > and they also use A64 config. Yeah, I saw this, and going back in the commit messages I found this: "The H5 SoC have a SID controller that looks like the one in A64, the cells are in the same offset but doesn't contain the same data (thermal sensor calibration for example)." So does the compatible string for the NVMEM *controller* really encompass the location, encoding and meaning of all its NVMEM cells? Isn't that described independently by the child nodes, that put names to addresses, and that are referenced by other DT nodes? Or was it originally not the case, and the scope changed over time? It's certainly no biggie to use a single compatible string, and add a single line to the driver (like in this patch), but it would be good to know if this is really the intention. Cheers, Andre > But I will drop this patch and use a64 compatible if that is the > prefered way :) > > > > Though I wonder if that has really only 256 bytes of fuses? Do we > > have any > > evidence of that? > Datasheet has 0 info regarding this. The way i got the size and offset > was to check the vendor code. > The values matched A64. > > > > Cheers, > > Andre > > > >> {/* sentinel */}, > >> }; > >> MODULE_DEVICE_TABLE(of, sunxi_sid_of_match); > >> > > > > >