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: 9585541 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 31202600CA for ; Tue, 21 Feb 2017 20:19:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14B6D28634 for ; Tue, 21 Feb 2017 20:19:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 095CA28638; Tue, 21 Feb 2017 20:19:08 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 55BAB28634 for ; Tue, 21 Feb 2017 20:19:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DbXJjpFzQ1P+vTtsnmj7/qkgkK9Zw/QWH2XQ0RkFR+c=; b=neD5gznAQ+vF8i 5DoR/sm0V77CyN9i855/QFe/9G3IYtxLwaupZGXo8sqhoZgJe2qQ3ww4ciFPqhB/O+RWAUTl+DDI1 COGvhuV3elqAHKHTJDyXHrplfvPY/FZcLTIHaUu5/HhI1xVZRWJZyFMYTSE9Rdy/hJQmuLNwaXU+v 1CUB5LtCJCRSeyw6CESuurn1123Ro22noNqLB1S05I28c1CWqGexEbwChmSQzaq2cmJC3YYCCUCQX zQEbq58KcsVMEocCx+rRuT5w9y8eOnPxdL2iWMLu/PneXnKRj41XxRZhrdaPhnd03IQTFAZ2kI+8u QIZCsuw4k1Ws5Ezy4FlQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cgGtm-0007Qq-FJ; Tue, 21 Feb 2017 20:18:58 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cgGth-0007P5-UQ for linux-amlogic@lists.infradead.org; Tue, 21 Feb 2017 20:18:56 +0000 Received: by mail-wr0-x242.google.com with SMTP id s27so7293183wrb.0 for ; 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=Rs4rphCQ52rTX9gFjhz7G+EaxFe96Bb7ka0oPO6J71Wj/BkTuMs2/Qh2J3LTYos24J eixMay7bPtXj+/g+LeZ2Xy4glnv39tysnPhuMrRGYKRM+zOtHZXTM6eMg13E7C3sVvaS Ivi5XwgRRCBCqSTr3DpgpLHA98kJe1k7XIjuKhaJ1Ot6uSigEn8whi8KNrdXEmB1NDG/ vm7HyDa9qXsjFzjtuArYfWawb/HNHYQ4QGah3LMXHtJj1I21dE5C51172PX4GoGpxpau DTlmmX0au70qu4ONLVEH33nK0Y/OKzHaF8r4v9Fp5vSO10UG7DWJvX8PoRn1DPB4I4hI omFw== X-Gm-Message-State: AMke39nF+kSeVI8Q9psn6x37OtEegTZ2JK0SXUSMvv/usa8+ypj4TXZeUrUJTeSy3Z61OQ== 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: 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170221_121854_147548_ECD53590 X-CRM114-Status: UNSURE ( 7.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.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"; +};