From patchwork Wed Mar 15 17:28:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9626285 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 2CC4060244 for ; Wed, 15 Mar 2017 17:32:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A1EB1FFC9 for ; Wed, 15 Mar 2017 17:32:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B3E6201F5; Wed, 15 Mar 2017 17:32:50 +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 808D01FFC9 for ; Wed, 15 Mar 2017 17:32:49 +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=PsCtLuDhT7EDflzwzQ2BNLzkIv7jXuNtVzN+AGHAKC4=; b=HvmD291uNNJnRPaIQD5leuG5vH 7QSCA7VH1labXD1zGtWTNI9/S5j75VGZwiQnPozzgfxfFDtYW55yXkK3OgFbfOgaMfrgg/wyp02tG HPkos6lwoOKm8iZ0eVy28286dzKoeRr1QN/ZneHLkLghNuHHaw/oyk2c+NVN8kqRroJHA2T8owbxY 8BXNIYDOy+RXs5oY3ZdhWF6AQ0lGGxVuBtUPsx/TNhx7s1oe2QhbZr/yDt00497j7iOn2TVOJl1dc BGTFobjt42x9rsjJJHGtkD5ZCT5XzbO49NkD0TM6z/NxcnW1FZ9VrO3AGHO0i0P1Ss2N5BXXMzJVn X/REpkJw==; 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 1coCmz-0003fZ-F3; Wed, 15 Mar 2017 17:32:45 +0000 Received: from forward19p.cmail.yandex.net ([77.88.31.22]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1coCmA-0002Pp-Iw for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2017 17:32:35 +0000 Received: from smtp3j.mail.yandex.net (smtp3j.mail.yandex.net [95.108.130.68]) by forward19p.cmail.yandex.net (Yandex) with ESMTP id 776E022624; Wed, 15 Mar 2017 20:31:29 +0300 (MSK) Received: from smtp3j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3j.mail.yandex.net (Yandex) with ESMTP id A07076241016; Wed, 15 Mar 2017 20:31:24 +0300 (MSK) Received: by smtp3j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id h5rYtCXTcK-VILiSWXo; Wed, 15 Mar 2017 20:31:23 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1489599084; bh=ToymV8gk3MIeGnh9FqJq5eYb/9WaHUJ4OUJ4W7iUTMk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=paKERyk54YOuBku/ndyS6bcTr6V/2bgKe2Ezag8lENg3eLJLfqcgy1EDWMWMFRuIy RKUSbxpcesfj7jCHmBcjozDqWklNVN8qKO+TIKK+6GDE2PFO9NXllrFLRWJZiXzEtz j5v+W7GkBgSXp/JSIQRz20l8KdUY9bEmmCJZKA6c= Authentication-Results: smtp3j.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0,1 0,1 0,1 0,1 1130000036118848 From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v2 4/5] ARM: sun8i: h3: switch apb0-related clocks to r_ccu Date: Thu, 16 Mar 2017 01:28:07 +0800 Message-Id: <20170315172808.64011-5-icenowy@aosc.xyz> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170315172808.64011-1-icenowy@aosc.xyz> References: <20170315172808.64011-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170315_103155_821520_5C6FA8A0 X-CRM114-Status: UNSURE ( 9.36 ) 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-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 Now we have driver for the PRCM CCU, switch to use it instead of old-style clock nodes for apb0-related clocks in sunxi-h3-h5.dtsi . Signed-off-by: Icenowy Zheng --- New patch in v2. arch/arm/boot/dts/sunxi-h3-h5.dtsi | 46 +++++++++++++------------------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 2494ea063cd4..710e429a3d03 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -41,8 +41,10 @@ */ #include +#include #include #include +#include / { interrupt-parent = <&gic>; @@ -68,31 +70,11 @@ clock-output-names = "osc32k"; }; - apb0: apb0_clk { - compatible = "fixed-factor-clock"; + osc32000: osc32000_clk { #clock-cells = <0>; - clock-div = <1>; - clock-mult = <1>; - clocks = <&osc24M>; - clock-output-names = "apb0"; - }; - - apb0_gates: clk@01f01428 { - compatible = "allwinner,sun8i-h3-apb0-gates-clk", - "allwinner,sun4i-a10-gates-clk"; - reg = <0x01f01428 0x4>; - #clock-cells = <1>; - clocks = <&apb0>; - clock-indices = <0>, <1>; - clock-output-names = "apb0_pio", "apb0_ir"; - }; - - ir_clk: ir_clk@01f01454 { - compatible = "allwinner,sun4i-a10-mod0-clk"; - reg = <0x01f01454 0x4>; - #clock-cells = <0>; - clocks = <&osc32k>, <&osc24M>; - clock-output-names = "ir"; + compatible = "fixed-clock"; + clock-frequency = <32000>; + clock-output-names = "osc32000"; }; }; @@ -544,9 +526,12 @@ ; }; - apb0_reset: reset@01f014b0 { - reg = <0x01f014b0 0x4>; - compatible = "allwinner,sun6i-a31-clock-reset"; + r_ccu: clock@1f01400 { + compatible = "allwinner,sun50i-a64-r-ccu"; + reg = <0x01f01400 0x100>; + clocks = <&osc24M>, <&osc32k>, <&osc32000>; + clock-names = "hosc", "losc", "iosc"; + #clock-cells = <1>; #reset-cells = <1>; }; @@ -557,9 +542,9 @@ ir: ir@01f02000 { compatible = "allwinner,sun5i-a13-ir"; - clocks = <&apb0_gates 1>, <&ir_clk>; + clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>; clock-names = "apb", "ir"; - resets = <&apb0_reset 1>; + resets = <&r_ccu RST_APB0_IR>; interrupts = ; reg = <0x01f02000 0x40>; status = "disabled"; @@ -569,9 +554,8 @@ compatible = "allwinner,sun8i-h3-r-pinctrl"; reg = <0x01f02c00 0x400>; interrupts = ; - clocks = <&apb0_gates 0>, <&osc24M>, <&osc32k>; + clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>; clock-names = "apb", "hosc", "losc"; - resets = <&apb0_reset 0>; gpio-controller; #gpio-cells = <3>; interrupt-controller;