From patchwork Tue Apr 4 09:50:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9661119 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 8522D60352 for ; Tue, 4 Apr 2017 10:07:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 759FC28488 for ; Tue, 4 Apr 2017 10:07:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A34A284CB; Tue, 4 Apr 2017 10:07:57 +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_SIGNED, DKIM_VALID autolearn=ham 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 F372928488 for ; Tue, 4 Apr 2017 10:07:56 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=eWzmYRbCxfXFEK1y5feq+VEprJuQ+LfGZ7acyoFxAM8=; b=jlOYNTU1exaY9ctZ7M71h2/aZx ndjaqhS7dwgGWvgyW+c9P8lpF5CIRYtNEpVfbVvYLC3c9g36d5Rz6o7UKdroYGzvq0ul06Tjxj3/R D/qou1yGrcL2h7CWSpd8F+qHNgV/PdWIw9OfPKrKKMAl502UnI4wJ8Y0loj4qGPvl5+PKdSPhji87 jJt2M1flGkLGD8IORFhYKOniFNly5MWcxjzoCM8DlEBAKKckzkzU4u8XI1turreZLNWRJj8sj2daM aqKKNB2dOSQihkEu8CUgBOnnxu7EglciuUIEuM1vtY9iBmGN0MAzEssppD86AqmtEB4jlCKLLnAeA 1or11Aig==; 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 1cvLNS-0001Yb-Nb; Tue, 04 Apr 2017 10:07:54 +0000 Received: from nov-007-i623.relay.mailchannels.net ([46.232.183.177]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cvL8y-0001zz-Ov for linux-arm-kernel@lists.infradead.org; Tue, 04 Apr 2017 09:53:11 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 477F57C3186; Tue, 4 Apr 2017 09:52:32 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.133.151]) by relay.mailchannels.net (Postfix) with ESMTPA id 9C3BD7C2980; Tue, 4 Apr 2017 09:52:31 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.20.107.195]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.37); Tue, 04 Apr 2017 09:52:32 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Whimsical-Befitting: 4d80eab44109e2b5_1491299552155_1668033119 X-MC-Loop-Signature: 1491299552155:1906252788 X-MC-Ingress-Time: 1491299552154 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 5454443D31; Tue, 4 Apr 2017 09:52:27 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , Rob Herring Subject: [PATCH v4 3/5] arm64: allwinner: a64: add r_ccu node Date: Tue, 4 Apr 2017 17:50:58 +0800 Message-Id: <20170404095100.18649-4-icenowy@aosc.io> In-Reply-To: <20170404095100.18649-1-icenowy@aosc.io> References: <20170404095100.18649-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170404_025257_889869_78F9B1B6 X-CRM114-Status: UNSURE ( 8.08 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Icenowy Zheng A64 SoC have a CCU (r_ccu) in PRCM block. Add the device node for it. The mux 3 of R_CCU is an internal oscillator, which is 16MHz according to the user manual, and has only 30% accuracy based on our experience on older SoCs. The real mesaured value of it on two Pine64 boards is around 11MHz, which is around 70% of 16MHz. Signed-off-by: Icenowy Zheng --- Changes in v4: - Temporarily dropped the CCU headers. Changes in v3: - Change osc32000 to iosc, which is 16MHz plus minus 30%, according to the RTC chapter of the user manual and our experiences on A33. Changes in v2: - Add osc32000. arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1c64ea2d23f9..1d4e5bcced0c 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -98,6 +98,14 @@ clock-output-names = "osc32k"; }; + iosc: internal-osc-clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <16000000>; + clock-accuracy = <300000000>; + clock-output-names = "iosc"; + }; + psci { compatible = "arm,psci-0.2"; method = "smc"; @@ -392,5 +400,14 @@ interrupts = , ; }; + + r_ccu: clock@1f01400 { + compatible = "allwinner,sun50i-a64-r-ccu"; + reg = <0x01f01400 0x100>; + clocks = <&osc24M>, <&osc32k>, <&iosc>; + clock-names = "hosc", "losc", "iosc"; + #clock-cells = <1>; + #reset-cells = <1>; + }; }; };