Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6077416ybe; Tue, 17 Sep 2019 19:40:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0d3deiianOCi82vLYsNyuMbl5JxgO+wROTctQi203ucy05XsPSN06URjBdiCqSa2NVIkK X-Received: by 2002:a17:906:6d52:: with SMTP id a18mr7845909ejt.56.1568774430981; Tue, 17 Sep 2019 19:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568774430; cv=none; d=google.com; s=arc-20160816; b=gSnXvD85gcEu7BM85CIm4Y13L1S9ZoHeUnTz+ErSIO/g6zQZ5A8jRcfOTMM454KqCi 1aGgQYnsgizCkPyOeAlwU7TKh+dTp9hGmzBTZmY6iqjk9voKVl9gWVvx/nY605nKF/DN NvmJ2CKGXzaR8mRJhE3Dn6ZC6feUtg9gu0k92Xrcd5EnfWBeu0bu5BtId2y/BeMjjjVk pFlFc6bmE3odR6noI1wIUvCtEAA1LwfsiTR9dTt9VLZOa6vD+I/7FL2zXrxmKALh/bpC 0TialtmL8j/gxYadSo1tckmFy/BVaKnmJZBGQv0g7PeiPVo6/x5FiFHGLfHr26Ek4nEl V3Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=gLcAl4pgQwHdFOmh9vl39CZW3vU1+gKn/6c4UaEjoxY=; b=fMEfBpDmA/VMRoh2DA6cHwbhqFcSQEZVtazkgj5Oew6Q3lJc6NgowqWYfbROh4Pt1E T5b8zIOjfOGBrHK7VEb4NcmtnmOD7hiNLPv2pAyEcb1vPh/wKxhbPO7RLaw1Qd34NMRB Jlfi1wV9P3Kr7tdPrtcfeA83NsML/xU0Ogf5W+/L30pKbqBVwcHpiFT6PMXV3FKIDK0u Adp0Bf475QakgvPavclgADmTcDBd9d//mXkd+8aKzHqU7/JId+MiVZb1yQfEMNvEE6yL VtP0oNICx0nHi0CYwimKmT3kGOwTDHSZtdRkKFCgcgVsszL6v7XmFw3mRUUSXub8C+YZ VvAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x51si2429331edd.193.2019.09.17.19.39.55; Tue, 17 Sep 2019 19:40:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726234AbfIRBoY (ORCPT + 99 others); Tue, 17 Sep 2019 21:44:24 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:3615 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725943AbfIRBoY (ORCPT ); Tue, 17 Sep 2019 21:44:24 -0400 X-UUID: ea1a39deb5f24d4bb57402fa54c802a7-20190918 X-UUID: ea1a39deb5f24d4bb57402fa54c802a7-20190918 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1909629750; Wed, 18 Sep 2019 09:44:18 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 18 Sep 2019 09:44:16 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 18 Sep 2019 09:44:16 +0800 Message-ID: <1568771054.21700.7.camel@mtkswgap22> Subject: Re: [PATCH v4 2/3] dt-bindings: rng: add bindings for MediaTek ARMv8 SoCs From: Neal Liu To: Rob Herring CC: Mark Rutland , "devicetree@vger.kernel.org" , Herbert Xu , wsd_upstream , Sean Wang , "linux-kernel@vger.kernel.org" , Crystal Guo =?UTF-8?Q?=28=E9=83=AD=E6=99=B6=29?= , "linux-crypto@vger.kernel.org" , Matt Mackall , Matthias Brugger , "linux-mediatek@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , Neal Liu Date: Wed, 18 Sep 2019 09:44:14 +0800 In-Reply-To: References: <1561361052-13072-1-git-send-email-neal.liu@mediatek.com> <1561361052-13072-3-git-send-email-neal.liu@mediatek.com> <20190722171320.GA9806@bogus> <1563848465.31451.4.camel@mtkswgap22> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, 2019-07-23 at 22:35 +0800, Rob Herring wrote: > On Mon, Jul 22, 2019 at 8:21 PM Neal Liu wrote: > > > > Please don't top post to lists. > > > Dear Rob, > > You can check my driver for detail: > > http://patchwork.kernel.org/patch/11012475/ or patchset 3/3 > > I could, or you could just answer my question. > > > > > This driver is registered as hardware random number generator, and > > combines with rng-core. > > We want to add one rng hw based on the dts. Is this proper or do you > > have other suggestion to meet this requirement? > > It depends. There doesn't appear to be any resource configuration, so > why does it need to be in DT. DT is not the only way instantiate > drivers. > > Rob > We would like to consult more about this patch. We cannot figure out what method should be used instead of DT. The interface to access firmware is "smc" and firmware function only exists on certain platforms. Some DT has similar way, like: http://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts#L470 firmware { optee { compatible = "linaro,optee-tz"; method = "smc"; }; }; Is there any way to instantiate driver on certain platforms without DT? Could you give us some examples? Thanks > > > > Thanks > > > > > > On Tue, 2019-07-23 at 01:13 +0800, Rob Herring wrote: > > > On Mon, Jun 24, 2019 at 03:24:11PM +0800, Neal Liu wrote: > > > > Document the binding used by the MediaTek ARMv8 SoCs random > > > > number generator with TrustZone enabled. > > > > > > > > Signed-off-by: Neal Liu > > > > --- > > > > .../devicetree/bindings/rng/mtk-sec-rng.txt | 10 ++++++++++ > > > > 1 file changed, 10 insertions(+) > > > > create mode 100644 Documentation/devicetree/bindings/rng/mtk-sec-rng.txt > > > > > > > > diff --git a/Documentation/devicetree/bindings/rng/mtk-sec-rng.txt b/Documentation/devicetree/bindings/rng/mtk-sec-rng.txt > > > > new file mode 100644 > > > > index 0000000..c04ce15 > > > > --- /dev/null > > > > +++ b/Documentation/devicetree/bindings/rng/mtk-sec-rng.txt > > > > @@ -0,0 +1,10 @@ > > > > +MediaTek random number generator with TrustZone enabled > > > > + > > > > +Required properties: > > > > +- compatible : Should be "mediatek,mtk-sec-rng" > > > > > > What's the interface to access this? > > > > > > A node with a 'compatible' and nothing else is a sign of something that > > > a parent device should instantiate and doesn't need to be in DT. IOW, > > > what do complete bindings for firmware functions look like? > > > > > > > + > > > > +Example: > > > > + > > > > +hwrng: hwrng { > > > > + compatible = "mediatek,mtk-sec-rng"; > > > > +} > > > > -- > > > > 1.7.9.5 > > > > > > > > > > _______________________________________________ > > > Linux-mediatek mailing list > > > Linux-mediatek@lists.infradead.org > > > http://lists.infradead.org/mailman/listinfo/linux-mediatek > > > >