From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4E51AC433F5 for ; Mon, 29 Nov 2021 21:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=elwuVCnsf/XGXQHdR1hy5OC2C66PYCberEtugbPiJ74=; b=OTOWcxRYA4fwop BCjL3CXwshHNFlbXt28TgrpTHEjv25NKTgeriu9OgnNUdr3Qp8cGPNVW8xNkp/zfynVyw6u1adm42 UyHDSWqzlggvSsTsyd0XLQ2RcSW2Ddbd/l+rDFJFgKjOViSk4sW+xF4bIE9ibv8OSisOZYeR1Wj+8 d4UyvPzM+iOV49uTFGnH4wbchbFz7OhEn1awddTaMY1HVbjI0imOaUpkCOihRiC69y66y7zpu5JQo O2QmeSBejg1AKtujcCH8O1DkxMdCQ0whWogp8Zn0oB67QSvNGcEdw5YyMWXfyogl1Pqp351ahWJe+ XM8wziU6kM2pcGWIVRIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrnt0-002cGL-H4; Mon, 29 Nov 2021 21:08:30 +0000 Received: from mail-oi1-f170.google.com ([209.85.167.170]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrmxI-002FvG-3t for linux-riscv@lists.infradead.org; Mon, 29 Nov 2021 20:08:53 +0000 Received: by mail-oi1-f170.google.com with SMTP id n66so36743969oia.9 for ; Mon, 29 Nov 2021 12:08:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Z6xdOSQsfsaoPSj9BpA6Xmod/xwiCQkOb+qTA/iCb/o=; b=MBqibd1/Qqki4uQgDsqyMKvXcieO5JqCr2rhGo2PeX3Rgl6lmzMxvvBB95xueRkbSm 7YMfYemli+lDc3jGN+g0NANlvobo3xJDO6Xl9pNZwB0hjYvPumbhTY/eIYlOO+R25nZC DScBOg3JWrbXut1PCEouP+MgBDzCkeE96+x+MiMWZdlK7hPhX1b6m6r7aImUnRoWQyCe UIjAT92AzKgr2lQhBq8LHGbqvtH2oN4WxR6H1vktV3i/wIcVtV+ojF2D/jY6x/MlZ6DQ DTGUwDO9WTOzSPwFKhk2cpBjlBwGKJ+uBBzyUD7J0bU/d1hVaj4AjzWG/1fOPuPsNK2j PV3g== X-Gm-Message-State: AOAM5316OOJb8KZrMlGpc0mmSAiHc4iOSP28jJ4OOWonOZwf/kDdpnw+ Zyqr9TDJBg09bpRIg+7cJA== X-Google-Smtp-Source: ABdhPJy2T7U5QNpYE8mKhDs4Y0kpsY4X+RruhTn7EbB9g52UuWIuwRJoXI1gDNqGmpcZq9IEms65YQ== X-Received: by 2002:a05:6808:3c2:: with SMTP id o2mr241205oie.112.1638216529867; Mon, 29 Nov 2021 12:08:49 -0800 (PST) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id n6sm2837920otj.78.2021.11.29.12.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 12:08:49 -0800 (PST) Received: (nullmailer pid 520021 invoked by uid 1000); Mon, 29 Nov 2021 20:08:47 -0000 Date: Mon, 29 Nov 2021 14:08:47 -0600 From: Rob Herring To: Conor.Dooley@microchip.com Cc: krzysztof.kozlowski@canonical.com, broonie@kernel.org, aou@eecs.berkeley.edu, linus.walleij@linaro.org, bgolaszewski@baylibre.com, palmer@dabbelt.com, paul.walmsley@sifive.com, jassisinghbrar@gmail.com, atish.patra@wdc.com, Daire.McNamara@microchip.com, Lewis.Hanly@microchip.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, geert@linux-m68k.org, linux-gpio@vger.kernel.org, linux-riscv@lists.infradead.org, linux-crypto@vger.kernel.org, linux-usb@vger.kernel.org, bin.meng@windriver.com, linux-i2c@vger.kernel.org, alexandre.belloni@bootlin.com, Ivan.Griffin@microchip.com, linux-rtc@vger.kernel.org, linux-spi@vger.kernel.org, a.zummo@towertech.it, gregkh@linuxfoundation.org Subject: Re: [PATCH 06/13] dt-bindings: rng: add bindings for microchip mpfs rng Message-ID: References: <20211108150554.4457-1-conor.dooley@microchip.com> <20211108150554.4457-7-conor.dooley@microchip.com> <71c6917e-1463-c708-550a-726e5fe1566d@microchip.com> <9d6f2e66-860c-2b8a-0b45-7dc56dd5298f@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9d6f2e66-860c-2b8a-0b45-7dc56dd5298f@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_120852_211288_32AF3401 X-CRM114-Status: GOOD ( 27.65 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, Nov 10, 2021 at 09:46:23AM +0000, Conor.Dooley@microchip.com wrote: > On 10/11/2021 07:43, Krzysztof Kozlowski wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > > On 09/11/2021 14:36, Conor.Dooley@microchip.com wrote: > >> On 09/11/2021 12:56, Krzysztof Kozlowski wrote: > >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >>> > >>> On 09/11/2021 13:54, Conor.Dooley@microchip.com wrote: > >>>> On 08/11/2021 21:16, Krzysztof Kozlowski wrote: > >>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > >>>>> > >>>>> On 08/11/2021 16:05, conor.dooley@microchip.com wrote: > >>>>>> From: Conor Dooley > >>>>>> > >>>>>> Add device tree bindings for the hardware rng device accessed via > >>>>>> the system services on the Microchip PolarFire SoC. > >>>>>> > >>>>>> Signed-off-by: Conor Dooley > >>>>>> --- > >>>>>> .../bindings/rng/microchip,mpfs-rng.yaml | 31 +++++++++++++++++++ > >>>>>> 1 file changed, 31 insertions(+) > >>>>>> create mode 100644 Documentation/devicetree/bindings/rng/microchip,mpfs-rng.yaml > >>>>>> > >>>>>> diff --git a/Documentation/devicetree/bindings/rng/microchip,mpfs-rng.yaml b/Documentation/devicetree/bindings/rng/microchip,mpfs-rng.yaml > >>>>>> new file mode 100644 > >>>>>> index 000000000000..e8ecb3538a86 > >>>>>> --- /dev/null > >>>>>> +++ b/Documentation/devicetree/bindings/rng/microchip,mpfs-rng.yaml > >>>>>> @@ -0,0 +1,31 @@ > >>>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >>>>>> +%YAML 1.2 > >>>>>> +--- > >>>>>> +$id: "http://devicetree.org/schemas/rng/microchip,mpfs-rng.yaml#" > >>>>>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > >>>>>> + > >>>>>> +title: Microchip MPFS random number generator > >>>>>> + > >>>>>> +maintainers: > >>>>>> + - Conor Dooley > >>>>>> + > >>>>>> +properties: > >>>>>> + compatible: > >>>>>> + const: microchip,polarfire-soc-rng > >>>>>> + > >>>>>> + syscontroller: > >>>>>> + maxItems: 1 > >>>>>> + description: name of the system controller device node > >>>>> > >>>>> There are several issues with this: > >>>>> 1. You need to describe the type. > >>>>> 2. Description is not helpful (just copying the name of property) and > >>>>> actually misleading because you do not put there the name of device node. > >>>>> 3. What is it? Looks like syscon (or sometimes called sysreg). If yes, > >>>>> please use existing syscon bindings. > >>>> 1 & 2 - Correct, it is bad & I'll write a better description for it. > >>>> 3 - Its a system controller implemented as a mailbox. The syscontroller > >>>> is the mailbox client, which the rng and generic drivers both use. > >>> > >>> I understood that pointed device node is a mailbox, not this node. But > >>> here, what is it here? How do you use it here? > >> The system controller is the means of access to the random number > >> generator. The phandle to the sys controller is provided here so that > >> the rng driver can locate the mailbox client through which it requests > >> random numbers. > > > > I am asking this to understand whether there is a generic or existing > > property which should be used instead. > > > > If I understand correctly, the rng driver needs a mailbox client? > Correct, it needs one. Binding for that is here: > Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml The rng node and others should be a child of the sys controller node. Rob _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv