Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp921810imu; Wed, 28 Nov 2018 01:33:27 -0800 (PST) X-Google-Smtp-Source: AJdET5fpCT3iGlqfVNUnh2ulTuWfZWA+6h5t3KgY2a4BPVxj4QTTkOORIoYkFV3FowSj9u1hiBdO X-Received: by 2002:a62:8c11:: with SMTP id m17mr36762206pfd.224.1543397607119; Wed, 28 Nov 2018 01:33:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543397607; cv=none; d=google.com; s=arc-20160816; b=nL+e8/Jzee0g0A/ck4S/YzHC1ivFgvA8iRWtZancaCUG1hYMlB48EA1LQpnh1h7StV VVDLHo3BQp22qfKDpXweei+psg9lKySqA4LbcDMHWDatJruw0mN24/OuSj/bmPam1sLe DzPB8KO/CRGLtuMCcUSU51w/77Pnsi4c5BPyNTYzMexf+ix6ye4cXcDuyRbmja5wa9eu ef+VzV6y76EO5FHTQgizxsUu+WyGmH7kJQXgiMRYEuIi6/iAc8ZXWpl+sKq6O93gC9Oc OxrPpTgEld87f++ry1UThPhQ3IVmpaE6S6xj+jgCh+/qBqllSYai9EWFKSiMq+PmQln0 5y0g== 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; bh=X69QQ1ZRmNlB+XSnLiaCZ7WPLndNI0kY7cftUgQGB2k=; b=LV6RyaP9R3vnobwS8f7jlE5RNIjUgWrySj1+eJ/X/T3jX0iFhGX4FzAhk7J77Y0NiH +qjs4eSS9AiKycH9Mu1GXXRFrTnCxg/ZgUuGiWsC5qdS7X4wyytEomQ7lnAz6PKMr6dA GF4450LgM1CBH4mSAAF0SyQR4TF0ZCJyXdNrJzDyNcfqSzPX4nS7HBy/hgoTBGOTRSK1 fr7uuxGejlW/gL0JGPJSl0s8Z1YmHbgsXB1PJYv94d5TeOWQ3UG01aR3nevLh2rydkTD Cpu3Gj4hg40Zqi5402daeAV6KtOXmX9/jPi9Dz45Tbyf4GJkJjZKAbbg5ZJbqUrJsb/F z/yw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i198si7437427pfe.289.2018.11.28.01.33.12; Wed, 28 Nov 2018 01:33:27 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728355AbeK1UcD (ORCPT + 99 others); Wed, 28 Nov 2018 15:32:03 -0500 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76]:49324 "EHLO wens.csie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728216AbeK1Ubg (ORCPT ); Wed, 28 Nov 2018 15:31:36 -0500 Received: by wens.csie.org (Postfix, from userid 1000) id 947BB604F1; Wed, 28 Nov 2018 17:30:28 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Alexandre Belloni , Alessandro Zummo , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland Cc: Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, linux-rtc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 12/15] ARM: dts: sunxi: h3/h5: Fix up RTC device node and clock references Date: Wed, 28 Nov 2018 17:30:10 +0800 Message-Id: <20181128093013.24442-14-wens@csie.org> X-Mailer: git-send-email 2.20.0.rc1 In-Reply-To: <20181128093013.24442-1-wens@csie.org> References: <20181128093013.24442-1-wens@csie.org> 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 The RTC module on the H3 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The H5's RTC has some extra crypto-related registers compared to the H3. Their exact functions are not clear. Also the RTC-VIO regulator has different settings. This patch fixes the compatible string and clock properties to conform to the updated bindings. The device node for the internal oscillator is removed, as it is internalized into the RTC device. Clock references to the IOSC and LOSC are also fixed. Signed-off-by: Chen-Yu Tsai squash! ARM: dts: sunxi: h3/h5: Fix up RTC device node and clock references --- arch/arm/boot/dts/sun8i-h3.dtsi | 4 +++ arch/arm/boot/dts/sunxi-h3-h5.dtsi | 26 ++++++++------------ arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 4 +++ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi index 3ecfabb10151..9497d4076e65 100644 --- a/arch/arm/boot/dts/sun8i-h3.dtsi +++ b/arch/arm/boot/dts/sun8i-h3.dtsi @@ -241,3 +241,7 @@ &pio { compatible = "allwinner,sun8i-h3-pinctrl"; }; + +&rtc { + compatible = "allwinner,sun8i-h3-rtc"; +}; diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index bce3bf1d6ae5..3cc4366c07fd 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -95,15 +95,7 @@ compatible = "fixed-clock"; clock-frequency = <32768>; clock-accuracy = <50000>; - clock-output-names = "osc32k"; - }; - - iosc: internal-osc-clk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <16000000>; - clock-accuracy = <300000000>; - clock-output-names = "iosc"; + clock-output-names = "ext_osc32k"; }; }; @@ -377,7 +369,7 @@ ccu: clock@1c20000 { /* compatible is in per SoC .dtsi file */ reg = <0x01c20000 0x400>; - clocks = <&osc24M>, <&osc32k>; + clocks = <&osc24M>, <&rtc 0>; clock-names = "hosc", "losc"; #clock-cells = <1>; #reset-cells = <1>; @@ -388,7 +380,7 @@ reg = <0x01c20800 0x400>; interrupts = , ; - clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>; + clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&rtc 0>; clock-names = "apb", "hosc", "losc"; gpio-controller; #gpio-cells = <3>; @@ -813,17 +805,19 @@ }; rtc: rtc@1f00000 { - compatible = "allwinner,sun6i-a31-rtc"; - reg = <0x01f00000 0x54>; + /* compatible is in per SoC .dtsi file */ + reg = <0x01f00000 0x400>; interrupts = , ; + clock-output-names = "osc32k", "osc32k-out", "iosc"; + clocks = <&osc32k>; + #clock-cells = <1>; }; r_ccu: clock@1f01400 { compatible = "allwinner,sun8i-h3-r-ccu"; reg = <0x01f01400 0x100>; - clocks = <&osc24M>, <&osc32k>, <&iosc>, - <&ccu 9>; + clocks = <&osc24M>, <&rtc 0>, <&rtc 2>, <&ccu 9>; clock-names = "hosc", "losc", "iosc", "pll-periph"; #clock-cells = <1>; #reset-cells = <1>; @@ -861,7 +855,7 @@ compatible = "allwinner,sun8i-h3-r-pinctrl"; reg = <0x01f02c00 0x400>; interrupts = ; - clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>; + clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>, <&rtc 0>; clock-names = "apb", "hosc", "losc"; gpio-controller; #gpio-cells = <3>; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi index b41dc1aab67d..fe731b35f761 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi @@ -172,3 +172,7 @@ ; compatible = "allwinner,sun50i-h5-pinctrl"; }; + +&rtc { + compatible = "allwinner,sun50i-h5-rtc"; +}; -- 2.20.0.rc1