Message ID | 20230109165249.110279-4-jiajie.ho@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2264072wrt; Mon, 9 Jan 2023 08:58:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXs6XNkvrMh69038Hk8538MS0E3BmVB9FC/c/liOn2uOfU3sYArHn094fYeOQs3eZZiT/yCm X-Received: by 2002:aa7:d0d4:0:b0:461:ed76:cb45 with SMTP id u20-20020aa7d0d4000000b00461ed76cb45mr54591662edo.24.1673283488492; Mon, 09 Jan 2023 08:58:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673283488; cv=none; d=google.com; s=arc-20160816; b=B6Q1Y3hj10y0hKSk3vUlSNBsRoGRU+Ds7TFEU1rPWU0FbtFX1yVdxOI7OBtl0fM/Ek A52Wx0xQi3kKjuyMATxGxZ4VQpGCvvMydcZZk4S5HCkGFVorkFkkjcccftLu+DMM5ms4 Q4yr1kHRRwEzfYrCDfTIeBrecdIyK1QRtTDQPGMlg5u1ynOmipYFs0h6iUV/nduuZ+DC /xvn1EqcU3x+5v2JME+DYfXPeLHlaf7B0R6LZEiXUft5FSdmBnwPngpcWYiYZS1d4G9M TP9HjjzkY4QMvPLwvitB6ASzM47Hw6YNJpa8rbbk3kVw4tNmVFJ1qEFYSmHofmn8TPDr b7vA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=6ca+4wuFEdIlWgbijGgfe6/H3GDi9d0felVr10ZFOD8=; b=ET/rxB8WXS0TOD0L18uK3fi6gAqwX7Uy2zTEAiVFCM65cD64F4aW1NIKNKdz/G3x6K K+D9l51yDTBNaqvz0LR4f7n1cRAKjhq/FdJiV3VJXuJEs7BncXluovoZTGAKiODhqwPp n9gmPyPiqzEmUdM4ENInTFcE5KF1ekQR3DreecL1lZxUWPCLXf3JXkOcHFPEvUDfqoDQ J9Ys5r0yIPxr2F1gjD1pBtAHFQxuS9e7V82oNZLWCb1QR9SymvfXtxop+pn+GXuc/nLb 5SLF5flczhfAPmz9ZYxMHLksDUhabuTFEZAYvuYgfzfkm6HfnzY+maxYylLrrhituu7g 3guQ== 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 x5-20020a056402414500b0048102b658e6si9583178eda.216.2023.01.09.08.57.45; Mon, 09 Jan 2023 08:58:08 -0800 (PST) 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 S237253AbjAIQyf convert rfc822-to-8bit (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Mon, 9 Jan 2023 11:54:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237398AbjAIQxm (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Jan 2023 11:53:42 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60C9D22A; Mon, 9 Jan 2023 08:53:29 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 44B2524E1C9; Tue, 10 Jan 2023 00:53:28 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 10 Jan 2023 00:53:28 +0800 Received: from ubuntu.localdomain (202.190.108.220) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 10 Jan 2023 00:53:20 +0800 From: Jia Jie Ho <jiajie.ho@starfivetech.com> To: Olivia Mackall <olivia@selenic.com>, Herbert Xu <herbert@gondor.apana.org.au>, Rob Herring <robh+dt@kernel.org>, "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>, Emil Renner Berthing <kernel@esmil.dk>, Conor Dooley <conor.dooley@microchip.com> CC: <linux-crypto@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org> Subject: [PATCH v3 3/3] riscv: dts: starfive: Add TRNG node for VisionFive 2 Date: Tue, 10 Jan 2023 00:52:49 +0800 Message-ID: <20230109165249.110279-4-jiajie.ho@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230109165249.110279-1-jiajie.ho@starfivetech.com> References: <20230109165249.110279-1-jiajie.ho@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.190.108.220] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754564907501558090?= X-GMAIL-MSGID: =?utf-8?q?1754564907501558090?= |
Series |
hwrng: starfive: Add driver for TRNG module
|
|
Commit Message
JiaJie Ho
Jan. 9, 2023, 4:52 p.m. UTC
Adding StarFive TRNG controller node to VisionFive 2 SoC. Co-developed-by: Jenny Zhang <jenny.zhang@starfivetech.com> Signed-off-by: Jenny Zhang <jenny.zhang@starfivetech.com> Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> --- arch/riscv/boot/dts/starfive/jh7110.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
Comments
Hey folks, On Tue, Jan 10, 2023 at 12:52:49AM +0800, Jia Jie Ho wrote: > Adding StarFive TRNG controller node to VisionFive 2 SoC. > > Co-developed-by: Jenny Zhang <jenny.zhang@starfivetech.com> > Signed-off-by: Jenny Zhang <jenny.zhang@starfivetech.com> > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > --- > arch/riscv/boot/dts/starfive/jh7110.dtsi | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi > index 4ac159d79d66..3c29e0bc6246 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > @@ -455,5 +455,15 @@ uart5: serial@12020000 { > reg-shift = <2>; > status = "disabled"; > }; > + > + rng: rng@1600c000 { > + compatible = "starfive,jh7110-trng"; > + reg = <0x0 0x1600C000 0x0 0x4000>; > + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, > + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; Which clock source is this? I see syscrg and aoncrg in the v3 devicetree: https://lore.kernel.org/linux-riscv/20221220011247.35560-7-hal.feng@starfivetech.com/ Have a missed a patchset which adds support for this particular clock controller? At the very least, I don't think one has reached the linux-riscv mailing list. The clock driver patchset only has aoncrg & syscrg: https://lore.kernel.org/linux-riscv/20221220005054.34518-1-hal.feng@starfivetech.com/ > + clock-names = "hclk", "ahb"; > + resets = <&stgcrg JH7110_STGRST_SEC_TOP_HRESETN>; > + interrupts = <30>; > + }; > }; > }; Thanks, Conor.
> -----Original Message----- > From: Conor Dooley <conor@kernel.org> > Sent: 10 January, 2023 2:02 AM > To: JiaJie Ho <jiajie.ho@starfivetech.com> > Cc: Olivia Mackall <olivia@selenic.com>; Herbert Xu > <herbert@gondor.apana.org.au>; Rob Herring <robh+dt@kernel.org>; > Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Emil Renner > Berthing <kernel@esmil.dk>; Conor Dooley <conor.dooley@microchip.com>; > linux-crypto@vger.kernel.org; devicetree@vger.kernel.org; linux- > kernel@vger.kernel.org; linux-riscv@lists.infradead.org > Subject: Re: [PATCH v3 3/3] riscv: dts: starfive: Add TRNG node for VisionFive > 2 > > Hey folks, > > On Tue, Jan 10, 2023 at 12:52:49AM +0800, Jia Jie Ho wrote: > > Adding StarFive TRNG controller node to VisionFive 2 SoC. > > > > Co-developed-by: Jenny Zhang <jenny.zhang@starfivetech.com> > > Signed-off-by: Jenny Zhang <jenny.zhang@starfivetech.com> > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > > --- > > arch/riscv/boot/dts/starfive/jh7110.dtsi | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi > > b/arch/riscv/boot/dts/starfive/jh7110.dtsi > > index 4ac159d79d66..3c29e0bc6246 100644 > > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > > @@ -455,5 +455,15 @@ uart5: serial@12020000 { > > reg-shift = <2>; > > status = "disabled"; > > }; > > + > > + rng: rng@1600c000 { > > + compatible = "starfive,jh7110-trng"; > > + reg = <0x0 0x1600C000 0x0 0x4000>; > > + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, > > + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; > > Which clock source is this? I see syscrg and aoncrg in the v3 > devicetree: > https://lore.kernel.org/linux-riscv/20221220011247.35560-7- > hal.feng@starfivetech.com/ > > Have a missed a patchset which adds support for this particular clock > controller? At the very least, I don't think one has reached the linux-riscv > mailing list. > The clock driver patchset only has aoncrg & syscrg: > https://lore.kernel.org/linux-riscv/20221220005054.34518-1- > hal.feng@starfivetech.com/ > Hi Conor, Thanks for reviewing the patches. Yes, the patch for stg domain hasn't been submitted yet. In this case should I drop this patch from the series until the related patches reach the mailing list? Thanks ,Jia Jie
On 10 January 2023 00:59:58 GMT, JiaJie Ho <jiajie.ho@starfivetech.com> wrote: > > >> -----Original Message----- >> From: Conor Dooley <conor@kernel.org> >> Sent: 10 January, 2023 2:02 AM >> To: JiaJie Ho <jiajie.ho@starfivetech.com> >> Cc: Olivia Mackall <olivia@selenic.com>; Herbert Xu >> <herbert@gondor.apana.org.au>; Rob Herring <robh+dt@kernel.org>; >> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Emil Renner >> Berthing <kernel@esmil.dk>; Conor Dooley <conor.dooley@microchip.com>; >> linux-crypto@vger.kernel.org; devicetree@vger.kernel.org; linux- >> kernel@vger.kernel.org; linux-riscv@lists.infradead.org >> Subject: Re: [PATCH v3 3/3] riscv: dts: starfive: Add TRNG node for VisionFive >> 2 >> >> Hey folks, >> >> On Tue, Jan 10, 2023 at 12:52:49AM +0800, Jia Jie Ho wrote: >> > Adding StarFive TRNG controller node to VisionFive 2 SoC. >> > >> > Co-developed-by: Jenny Zhang <jenny.zhang@starfivetech.com> >> > Signed-off-by: Jenny Zhang <jenny.zhang@starfivetech.com> >> > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> >> > --- >> > arch/riscv/boot/dts/starfive/jh7110.dtsi | 10 ++++++++++ >> > 1 file changed, 10 insertions(+) >> > >> > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi >> > b/arch/riscv/boot/dts/starfive/jh7110.dtsi >> > index 4ac159d79d66..3c29e0bc6246 100644 >> > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi >> > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi >> > @@ -455,5 +455,15 @@ uart5: serial@12020000 { >> > reg-shift = <2>; >> > status = "disabled"; >> > }; >> > + >> > + rng: rng@1600c000 { >> > + compatible = "starfive,jh7110-trng"; >> > + reg = <0x0 0x1600C000 0x0 0x4000>; >> > + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, >> > + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; >> >> Which clock source is this? I see syscrg and aoncrg in the v3 >> devicetree: >> https://lore.kernel.org/linux-riscv/20221220011247.35560-7- >> hal.feng@starfivetech.com/ >> >> Have a missed a patchset which adds support for this particular clock >> controller? At the very least, I don't think one has reached the linux-riscv >> mailing list. >> The clock driver patchset only has aoncrg & syscrg: >> https://lore.kernel.org/linux-riscv/20221220005054.34518-1- >> hal.feng@starfivetech.com/ >> > >Hi Conor, > >Thanks for reviewing the patches. >Yes, the patch for stg domain hasn't been submitted yet. >In this case should I drop this patch from the series until the related patches reach the mailing list? Since it doesn't apply anyway, no harm keeping it IMO. Having the dts can make it easier, although not in this case, to look at the binding and driver. Just mention it in the cover letter if/when you send another version. Thanks, Conor.
> -----Original Message----- > From: Conor Dooley <conor@kernel.org> > Sent: 10 January, 2023 3:37 PM > To: JiaJie Ho <jiajie.ho@starfivetech.com> > Cc: Olivia Mackall <olivia@selenic.com>; Herbert Xu > <herbert@gondor.apana.org.au>; Rob Herring <robh+dt@kernel.org>; > Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Emil Renner > Berthing <kernel@esmil.dk>; Conor Dooley <conor.dooley@microchip.com>; > linux-crypto@vger.kernel.org; devicetree@vger.kernel.org; linux- > kernel@vger.kernel.org; linux-riscv@lists.infradead.org > Subject: RE: [PATCH v3 3/3] riscv: dts: starfive: Add TRNG node for VisionFive > 2 > > >> Which clock source is this? I see syscrg and aoncrg in the v3 > >> devicetree: > >> https://lore.kernel.org/linux-riscv/20221220011247.35560-7- > >> hal.feng@starfivetech.com/ > >> > >> Have a missed a patchset which adds support for this particular clock > >> controller? At the very least, I don't think one has reached the > >> linux-riscv mailing list. > >> The clock driver patchset only has aoncrg & syscrg: > >> https://lore.kernel.org/linux-riscv/20221220005054.34518-1- > >> hal.feng@starfivetech.com/ > >> > > > >Hi Conor, > > > >Thanks for reviewing the patches. > >Yes, the patch for stg domain hasn't been submitted yet. > >In this case should I drop this patch from the series until the related patches > reach the mailing list? > > Since it doesn't apply anyway, no harm keeping it IMO. > Having the dts can make it easier, although not in this case, to look at the > binding and driver. > Just mention it in the cover letter if/when you send another version. > Sure, I'll do this. Thanks, Jia Jie
diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 4ac159d79d66..3c29e0bc6246 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -455,5 +455,15 @@ uart5: serial@12020000 { reg-shift = <2>; status = "disabled"; }; + + rng: rng@1600c000 { + compatible = "starfive,jh7110-trng"; + reg = <0x0 0x1600C000 0x0 0x4000>; + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; + clock-names = "hclk", "ahb"; + resets = <&stgcrg JH7110_STGRST_SEC_TOP_HRESETN>; + interrupts = <30>; + }; }; };