Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932557AbcLIJpK (ORCPT ); Fri, 9 Dec 2016 04:45:10 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36753 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbcLIJpF (ORCPT ); Fri, 9 Dec 2016 04:45:05 -0500 Subject: Re: [PATCH v1 2/2] crypto: mediatek - add DT bindings documentation To: Ryder Lee References: <1480921284-45827-1-git-send-email-ryder.lee@mediatek.com> <1480921284-45827-3-git-send-email-ryder.lee@mediatek.com> <4b0df417-825f-65c6-4c02-85fe1c20ce50@gmail.com> <1481188776.14860.26.camel@mtkswgap22> Cc: Herbert Xu , "David S. Miller" , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sean Wang , Roy Luo From: Matthias Brugger Message-ID: <826b263f-8963-11c9-0302-8048cd1dea8e@gmail.com> Date: Fri, 9 Dec 2016 10:45:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1481188776.14860.26.camel@mtkswgap22> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2688 Lines: 78 On 08/12/16 10:19, Ryder Lee wrote: > Hello, > > On Mon, 2016-12-05 at 11:18 +0100, Matthias Brugger wrote: >> >> On 05/12/16 08:01, Ryder Lee wrote: >>> Add DT bindings documentation for the crypto driver >>> >>> Signed-off-by: Ryder Lee >>> --- >>> .../devicetree/bindings/crypto/mediatek-crypto.txt | 32 ++++++++++++++++++++++ >>> 1 file changed, 32 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/crypto/mediatek-crypto.txt >>> >>> diff --git a/Documentation/devicetree/bindings/crypto/mediatek-crypto.txt b/Documentation/devicetree/bindings/crypto/mediatek-crypto.txt >>> new file mode 100644 >>> index 0000000..8b1db08 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/crypto/mediatek-crypto.txt >>> @@ -0,0 +1,32 @@ >>> +MediaTek cryptographic accelerators >>> + >>> +Required properties: >>> +- compatible: Should be "mediatek,mt7623-crypto" >> >> Do you know how big the difference is between the crypto engine for >> mt7623/mt2701/mt8521p in comparison, let's say mt8173 or mt6797? >> Do this SoCs have a crypot engine? If so and they are quite similar, we >> might think of adding a mtk-crypto binding and add soc specific bindings. > > This engine is just available in mt7623/mt2701/mt8521p series SoCs and > they have no difference. > > But there are still other crypto IPs in MTK, i think maybe we could use > "mediatek,{IP name}-cryptoā€¯ to distinguish them ? > Sounds good, thanks for the clarification. Matthias >> Regards, >> Matthias >> >>> +- reg: Address and length of the register set for the device >>> +- interrupts: Should contain the five crypto engines interrupts in numeric >>> + order. These are global system and four descriptor rings. >>> +- clocks: the clock used by the core >>> +- clock-names: the names of the clock listed in the clocks property. These are >>> + "ethif", "cryp" >>> +- power-domains: Must contain a reference to the PM domain. >>> + >>> + >>> +Optional properties: >>> +- interrupt-parent: Should be the phandle for the interrupt controller >>> + that services interrupts for this device >>> + >>> + >>> +Example: >>> + crypto: crypto@1b240000 { >>> + compatible = "mediatek,mt7623-crypto"; >>> + reg = <0 0x1b240000 0 0x20000>; >>> + interrupts = , >>> + , >>> + , >>> + , >>> + ; >>> + clocks = <&topckgen CLK_TOP_ETHIF_SEL>, >>> + <ðsys CLK_ETHSYS_CRYPTO>; >>> + clock-names = "ethif","cryp"; >>> + power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>; >>> + }; >>> > >