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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4093FC636CC for ; Thu, 16 Feb 2023 09:19:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbjBPJTX (ORCPT ); Thu, 16 Feb 2023 04:19:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjBPJTT (ORCPT ); Thu, 16 Feb 2023 04:19:19 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EEA01D913; Thu, 16 Feb 2023 01:19:16 -0800 (PST) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pSaPz-0007OX-0D; Thu, 16 Feb 2023 10:19:07 +0100 Date: Thu, 16 Feb 2023 09:19:01 +0000 From: Daniel Golle To: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, Sean Wang , Olivia Mackall , Herbert Xu , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Conor Dooley , Mingming Su , linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] dt-bindings: rng: Add MediaTek MT7981 TRNG Message-ID: References: <89865515728cb937b6591160ad9c30b4bcc8dd41.1676467500.git.daniel@makrotopia.org> <5341d0fa-1415-b711-30f0-f0a867af0bc4@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5341d0fa-1415-b711-30f0-f0a867af0bc4@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 16, 2023 at 10:14:33AM +0100, Krzysztof Kozlowski wrote: > On 15/02/2023 14:27, Daniel Golle wrote: > > Add documentation to describe the MediaTek true random number generator > > which is provided by ARM TrustedFirmware-A of the MT7981. > > > > Signed-off-by: Daniel Golle > > --- > > .../bindings/rng/mediatek,mt7981-rng.yaml | 39 +++++++++++++++++++ > > MAINTAINERS | 1 + > > 2 files changed, 40 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/rng/mediatek,mt7981-rng.yaml > > > > diff --git a/Documentation/devicetree/bindings/rng/mediatek,mt7981-rng.yaml b/Documentation/devicetree/bindings/rng/mediatek,mt7981-rng.yaml > > new file mode 100644 > > index 000000000000..d577d60538d8 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/rng/mediatek,mt7981-rng.yaml > > @@ -0,0 +1,39 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/rng/mediatek,mt7981-rng.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: MediaTek Random number generator (v2/SMC) > > + > > +maintainers: > > + - Daniel Golle > > + > > +properties: > > + $nodename: > > + pattern: "^rng$" > > 1. We don't enforce it in device bindings, so drop it. Ack. > 2. It's not even correct. You have reg. No, there isn't any reg, as this driver does not access a MMIO mapped resource but rather uses Secure Monitor Call interface to access the TRNG via ARM TrustedFirmware-A. > > > > + > > + compatible: > > + enum: > > + - mediatek,mt7981-rng > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 1 > > + > > + clock-names: > > + items: > > + - const: rng > > Drop clock-names and rely on index. Will drop, reg, clocks and clock-names, that slipped in from the document I used as template for this one. The driver uses neither of those. > > > + > > +required: > > + - compatible > > and reg? > > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + rng { > > + compatible = "mediatek,mt7981-rng"; > > + }; > > Best regards, > Krzysztof > >