From patchwork Tue Feb 21 20:18:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9585537 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B4485600CA for ; Tue, 21 Feb 2017 20:18:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 965C72862A for ; Tue, 21 Feb 2017 20:18:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89EAA28630; Tue, 21 Feb 2017 20:18:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 807072862A for ; Tue, 21 Feb 2017 20:18:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751565AbdBUUSe (ORCPT ); Tue, 21 Feb 2017 15:18:34 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34501 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbdBUUSd (ORCPT ); Tue, 21 Feb 2017 15:18:33 -0500 Received: by mail-wr0-f193.google.com with SMTP id 89so9778298wrr.1; Tue, 21 Feb 2017 12:18:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=CDGrbvgy+U7dNCSr2d9m5ZfFAo/XI/uOb3GTM09WuKI=; b=KXKzaq5Fjnk6TokIILTGhyaoyCuS/8pTCweRrg1R7KtSH1gAmj6NC8g8dSdY1AJTVI quxe8TeICVRwyb1ythGsUr5INbngBQC3pap80b+5bWHEtJIYl/tkwAHD1AD1gPCUznRJ 4WkWaAmsZU910TQEfEWO9mBPNWb7TB0Qsuk7GG6sU24nnKlLUprtodKL8SWhMEqxR49M hQs/Ib9YkFb7MPT5uR4ypzAsTzixbmVesIHf0TW8bAqZTiSgAgLnHY9m22lztoeu1v5R EignM082OfaXiPCrptV50MtILT3w1eOv/ukigFsxBdNWYrey8JjixIixyFZRc02FWHla ALIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=CDGrbvgy+U7dNCSr2d9m5ZfFAo/XI/uOb3GTM09WuKI=; b=cuq9LUidsp67tHjnThvRri8K8eewKT5OmLQbU3EUxIQAWiufCEkRouuCoA5xsJDf2Z BZwUlxn+BK6bfotGjT9tTJGr8es4AkkWycd2muvz4aZeACJwoFup/FrtclInO8iBx4F/ +No1RgTX83zDPf7Jrb5tMCSGxoTAEGnAyEPjlmREGFmJcC+baEtLeVLZAcNjGICdDM4i 45JBt8f0NwqYbHCi7M/snQJlVGPsoFGckaAPmgrzYuals+TfahxoEB1k3UUa2qSYtNF9 91nHJra8+UkwZ51eRgKePQtXwB8cziE8Ugxwte0ARuy/ZFjIyGOj6kPHseAhkSrtM7kV PeiA== X-Gm-Message-State: AMke39myrJqPoceBE7DK40hVuPqAE6zLVGFdsXz5IP3NY18hPIKEQe7r54J8yEysBNe2LQ== X-Received: by 10.223.171.66 with SMTP id r2mr20327637wrc.71.1487708311421; Tue, 21 Feb 2017 12:18:31 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:bd34:27cb:45ef:f408? (p200300C6EBDC4000BD3427CB45EFF408.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:bd34:27cb:45ef:f408]) by smtp.googlemail.com with ESMTPSA id w16sm751028wmd.4.2017.02.21.12.18.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 12:18:30 -0800 (PST) Subject: [PATCH v2 2/3] ARM64: dts: meson-gx: add clock CLKID_RNG0 to hwrng node To: Jerome Brunet , Kevin Hilman , Herbert Xu , Neil Armstrong , linux-amlogic@lists.infradead.org, linux-crypto@vger.kernel.org, Stephen Boyd , Michael Turquette References: Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org From: Heiner Kallweit Message-ID: <8bf052e3-de8f-dbdf-be76-369a7bb1ed15@gmail.com> Date: Tue, 21 Feb 2017 21:18:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add clock CLKID_RNG0 to HW randon number generator node and extend the DT binding documentation accordingly. Signed-off-by: Heiner Kallweit Acked-by: Rob Herring --- v2: - splitted first version of patch into two - add DT binding documentation - mention that clock is optional - replace spaces with tabs in DT binding example --- Documentation/devicetree/bindings/rng/amlogic,meson-rng.txt | 8 ++++++-- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/rng/amlogic,meson-rng.txt b/Documentation/devicetree/bindings/rng/amlogic,meson-rng.txt index 202f2d09..4c012a04 100644 --- a/Documentation/devicetree/bindings/rng/amlogic,meson-rng.txt +++ b/Documentation/devicetree/bindings/rng/amlogic,meson-rng.txt @@ -5,10 +5,14 @@ Required properties: - compatible : should be "amlogic,meson-rng" - reg : Specifies base physical address and size of the registers. +- clocks : Optional core clock +- clock-names: Name of core clock, must be "core" Example: rng { - compatible = "amlogic,meson-rng"; - reg = <0x0 0xc8834000 0x0 0x4>; + compatible = "amlogic,meson-rng"; + reg = <0x0 0xc8834000 0x0 0x4>; + clocks = <&clkc CLKID_RNG0>; + clock-names = "core"; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi index 5d995f77..620495a4 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi @@ -380,7 +380,7 @@ #size-cells = <2>; ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>; - rng { + hwrng: rng { compatible = "amlogic,meson-rng"; reg = <0x0 0x0 0x0 0x4>; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi index 04b3324b..a375cb21 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi @@ -524,3 +524,8 @@ &vpu { compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu"; }; + +&hwrng { + clocks = <&clkc CLKID_RNG0>; + clock-names = "core"; +};