Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4198397ybl; Tue, 20 Aug 2019 08:20:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfpPw8uiwp16pfQ0srnMyK3O+w9sgkzxK8aPunlKxKBduT88aqrXspPoXj1GwEy8W/W12A X-Received: by 2002:a63:e213:: with SMTP id q19mr24971572pgh.180.1566314457151; Tue, 20 Aug 2019 08:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566314457; cv=none; d=google.com; s=arc-20160816; b=GIsl+lAsjt36NqqJ+tEl3lNEBBrf5ePtXd4gciA+BaxEPk314fseKEzLpkAhyZRSp7 U+wputCFKFnPJ3p3r3T8l1ZWdRkm2keSxRuy7kEOcHUJhGgC58h+VCQ9QGJERRqR0c5K LDjhtvuA2VG5+P94ttXanE4S0+LuY7L4QvZ6jy8CfwVtxt2Px1fC2yFC50JvIVPOJl1E HU4ECofwUdZjUaSKHY7VVrSVlGrfbivSqGoM0q52xxzmTGsEMyYZNlO/BOpeBd0qtcI8 CRgC5a3RZZXY63LoyjuUPeYpD6B9VbE9gmZtTmKJGILewH1T7oifM4P7n9x1OUiaQ2Hs XtRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+b+5QVzrgOiWY1IWDm3QznVcGI5TvYjAIAE7W2ypk8E=; b=FfkSct4cH/Cx5YiyeatcgRHmX0zhQ3N0OjBBcqKLGdyZl4HJvH3q+pV2fhBHG37zAx TS2OojXemQ0+mmYdlNvBBPNaMyrpfAyF4O/hWLyQzNtzHqXLMYm59RhuEtYFVwOkFQhI moqW7gMTYnjKx4MiLMt2gyiTvhQZNShp1Sg0F4j/BzUSJHJeNRpL8XILbR8gJUchxeUg hYilA7k//p8Hmdhi8k7vNI1bsImg+suajzPpTCdbIj5aIccmommILRSGDt0DDIfQNiQQ RVeTtuEcBxD0OS6AEpXBK6A7oRrb536akD03MjbxtUHs3DvbDIQ+H5X4UiblTjrEOzY3 dEzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=S0zEwvsr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si12273179pgm.167.2019.08.20.08.20.41; Tue, 20 Aug 2019 08:20:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=S0zEwvsr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730515AbfHTPTj (ORCPT + 99 others); Tue, 20 Aug 2019 11:19:39 -0400 Received: from vps.xff.cz ([195.181.215.36]:32850 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730430AbfHTPTi (ORCPT ); Tue, 20 Aug 2019 11:19:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1566314376; bh=P46Ks+pSwFh8evjNR4bT2iq74D9QpPdX+LOP4bcJrNU=; h=From:To:Cc:Subject:Date:References:From; b=S0zEwvsraRLL0ynpgWwffXnzhAvK37c2ssuZ1jfScVV5/W/7DvdbJ9nEYAiW5Fpbe yNcm7wJWYtw9eK2ZU69+TU6nxJ6YCFBmeEEJuBU03A2Kx2uWma0OiQ0ib2NGHf6YwM PkDZleYTPeFKpkCHOkfBo3lLRsf/s/t7kmrQyt6w= From: megous@megous.com To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai Cc: Ondrej Jirman , linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v2 3/3] arm64: dts: sun50i-h6: Add support for RTC and fix the clock tree Date: Tue, 20 Aug 2019 17:19:34 +0200 Message-Id: <20190820151934.3860-4-megous@megous.com> In-Reply-To: <20190820151934.3860-1-megous@megous.com> References: <20190820151934.3860-1-megous@megous.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ondrej Jirman This patch adds RTC node and fixes the clock properties and nodes to reflect the real clock tree. The device nodes for the internal oscillator and osc32k are removed, as these clocks are now provided by the RTC device. Clock references are fixed accordingly, too. Signed-off-by: Ondrej Jirman --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 30 +++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 67b732e34091..67f920e0fc33 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -56,14 +56,6 @@ status = "disabled"; }; - iosc: internal-osc-clk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <16000000>; - clock-accuracy = <300000000>; - clock-output-names = "iosc"; - }; - osc24M: osc24M_clk { #clock-cells = <0>; compatible = "fixed-clock"; @@ -71,11 +63,11 @@ clock-output-names = "osc24M"; }; - osc32k: osc32k_clk { + ext_osc32k: ext_osc32k_clk { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <32768>; - clock-output-names = "osc32k"; + clock-output-names = "ext_osc32k"; }; psci { @@ -197,7 +189,7 @@ ccu: clock@3001000 { compatible = "allwinner,sun50i-h6-ccu"; reg = <0x03001000 0x1000>; - clocks = <&osc24M>, <&osc32k>, <&iosc>; + clocks = <&osc24M>, <&rtc 0>, <&rtc 2>; clock-names = "hosc", "losc", "iosc"; #clock-cells = <1>; #reset-cells = <1>; @@ -236,7 +228,7 @@ , , ; - clocks = <&ccu CLK_APB1>, <&osc24M>, <&osc32k>; + clocks = <&ccu CLK_APB1>, <&osc24M>, <&rtc 0>; clock-names = "apb", "hosc", "losc"; gpio-controller; #gpio-cells = <3>; @@ -710,10 +702,20 @@ }; }; + rtc: rtc@7000000 { + compatible = "allwinner,sun50i-h6-rtc"; + reg = <0x07000000 0x400>; + interrupts = , + ; + clock-output-names = "osc32k", "osc32k-out", "iosc"; + clocks = <&ext_osc32k>; + #clock-cells = <1>; + }; + r_ccu: clock@7010000 { compatible = "allwinner,sun50i-h6-r-ccu"; reg = <0x07010000 0x400>; - clocks = <&osc24M>, <&osc32k>, <&iosc>, + clocks = <&osc24M>, <&rtc 0>, <&rtc 2>, <&ccu CLK_PLL_PERIPH0>; clock-names = "hosc", "losc", "iosc", "pll-periph"; #clock-cells = <1>; @@ -741,7 +743,7 @@ reg = <0x07022000 0x400>; interrupts = , ; - clocks = <&r_ccu CLK_R_APB1>, <&osc24M>, <&osc32k>; + clocks = <&r_ccu CLK_R_APB1>, <&osc24M>, <&rtc 0>; clock-names = "apb", "hosc", "losc"; gpio-controller; #gpio-cells = <3>; -- 2.22.1