Message ID | 20230811-sid-h616-v1-2-d1dfc9f47b19@somainline.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1022148vqi; Fri, 11 Aug 2023 04:38:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZKD7LzVTw1Z4ix/IME113nyx+sJic+UmMiZqPxeTd88lPe5A1C6uuuG3BqqWKIdQy20f8 X-Received: by 2002:a05:6512:3124:b0:4fd:d92e:31ca with SMTP id p4-20020a056512312400b004fdd92e31camr1113197lfd.36.1691753931994; Fri, 11 Aug 2023 04:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691753931; cv=none; d=google.com; s=arc-20160816; b=DgNcJXUL1gUh0vXVWk2RwWU2kvUO1+rzLhldg+3H5ZtMBdRJdHfj2aX50MD+98QjQY 0sZ4TiVRfN9VQ6HQEyEuupxhq0WDgCSmUwOBSMGh2PR043eiCgWqTGNVLwtCVuPEVrk3 JJIbZM1FrCcxx/rhNsJYeS5b24xepluj1lUfe43mBuXUkDip5POGk0dmsSWc6IgcZ8Nn NEDpUqoewmnwALUa9o+eWf4bG01PynIVcxIjJU6b5QI477YKi9uTCfBhZ6+k8LlkOZXt CQZ5u6SjawzjrI7K1plZQc2VzbJLck6XRa8+GFN/OtJj79o3zGnIt9bWG3gQcvMJgq/G ukxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=+KLrW/4s/tlUhEootx1Y9+W0K5p3npDUcImn9/hTL1A=; fh=pGlr5PEmUKkcB3UomjjQX4SWMTPS92E0F7Vbj9ZIOEo=; b=sqGWsdNV4yaX6ckjqVihJ/VG0UeUTR6jLtnYJEgPb/X67Sa7NgrPQjBoSFwLcK1RTN /c61IKeRVVi1l4sGgdOQNYeN31XES0598cJGEXH6ILczGLDM6RR+rXs7jn/G8TWU30uT vIgNGojo9Y5RrbRf4NUOnFmfIko7riGcT8gSEIQrpaCvuxx+6h7VsHvinQUSwEp5QKdM ZJC5Wzmjm2ORoifTpd58S/iJ2XgnxIzAmG8t9sLTwXOV0Ddu6Be7VOwtSbkJmUGQFvBD wzJ+yIITISlFgPInzEuOv52h1pXXAekhA1U7yyqHkoLO7OpM5Y77Rb6jAsGeXVX7LqOV Dp5w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020aa7d3c3000000b005236885749csi3357004edr.431.2023.08.11.04.38.25; Fri, 11 Aug 2023 04:38:51 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236101AbjHKLLs (ORCPT <rfc822;shaohuahua6@gmail.com> + 99 others); Fri, 11 Aug 2023 07:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231745AbjHKLLm (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Aug 2023 07:11:42 -0400 X-Greylist: delayed 526 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 11 Aug 2023 04:11:41 PDT Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [5.144.164.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B6B4FD for <linux-kernel@vger.kernel.org>; Fri, 11 Aug 2023 04:11:41 -0700 (PDT) Received: from [127.0.0.1] (bband-dyn221.178-41-211.t-com.sk [178.41.211.221]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 6EE5E1F6CD; Fri, 11 Aug 2023 13:02:52 +0200 (CEST) From: Martin Botka <martin.botka@somainline.org> Date: Fri, 11 Aug 2023 13:02:35 +0200 Subject: [PATCH 2/3] nvmem: sunxi_sid: Add support for H616 SID MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230811-sid-h616-v1-2-d1dfc9f47b19@somainline.org> References: <20230811-sid-h616-v1-0-d1dfc9f47b19@somainline.org> In-Reply-To: <20230811-sid-h616-v1-0-d1dfc9f47b19@somainline.org> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Maxime Ripard <mripard@kernel.org> Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Andre Przywara <andre.przywara@arm.com>, Alan Ma <tech@biqu3d.com>, Marijn Suijten <marijn.suijten@somainline.org>, AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Martin Botka <martin.botka@somainline.org> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691751771; l=851; i=martin.botka@somainline.org; s=20230811; h=from:subject:message-id; bh=gMHCxqgi4YwQ9D8pchBHMnIgAOKw9tONOR5pmmXSDH8=; b=hZ3vSClPmzmhvFYP1YXc3lkvXLc5QdKp/p8EMkXkI7IJBbm8XpGdyyFh4e/nW7ShUyJiaM2JI nACWxrD5rweB6sy50fA2Ut+ojbpq3/mXMZbRPXF7qM4yO7i/dDa+Oje X-Developer-Key: i=martin.botka@somainline.org; a=ed25519; pk=aTCd3jmwU8GrJidWg3DSKLpdVMcpFzXzCSLXLR6NtWU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773932571022410133 X-GMAIL-MSGID: 1773932571022410133 |
Series |
Enable Security ID for H616
|
|
Commit Message
Martin Botka
Aug. 11, 2023, 11:02 a.m. UTC
Add support for the H616 SID controller.
The config can be reused from A64.
Signed-off-by: Martin Botka <martin.botka@somainline.org>
---
drivers/nvmem/sunxi_sid.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Fri, 11 Aug 2023 13:02:35 +0200 Martin Botka <martin.botka@somainline.org> 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 <martin.botka@somainline.org> > --- > 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. Though I wonder if that has really only 256 bytes of fuses? Do we have any evidence of that? Cheers, Andre > {/* sentinel */}, > }; > MODULE_DEVICE_TABLE(of, sunxi_sid_of_match); >
On Fri, Aug 11 2023 at 12:17:54 PM +01:00:00, Andre Przywara <andre.przywara@arm.com> wrote: > On Fri, 11 Aug 2023 13:02:35 +0200 > Martin Botka <martin.botka@somainline.org> 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 <martin.botka@somainline.org> >> --- >> 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. 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); >> >
On Fri, 11 Aug 2023 15:12:34 +0200 Martin Botka <martin.botka@somainline.org> 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 > <andre.przywara@arm.com> wrote: > > On Fri, 11 Aug 2023 13:02:35 +0200 > > Martin Botka <martin.botka@somainline.org> 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 <martin.botka@somainline.org> > >> --- > >> 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); > >> > > > > >
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 }, {/* sentinel */}, }; MODULE_DEVICE_TABLE(of, sunxi_sid_of_match);