Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161968AbbKTVHG (ORCPT ); Fri, 20 Nov 2015 16:07:06 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:36346 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933740AbbKTVHD (ORCPT ); Fri, 20 Nov 2015 16:07:03 -0500 Subject: Re: [PATCH v2 6/6] arm64: dts: berlin4ct: add pll and clock nodes To: Jisheng Zhang , robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, catalin.marinas@arm.com, will.deacon@arm.com, mturquette@baylibre.com, sboyd@codeaurora.org, antoine.tenart@free-electrons.com References: <1448008952-1787-1-git-send-email-jszhang@marvell.com> <1448008952-1787-7-git-send-email-jszhang@marvell.com> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org From: Sebastian Hesselbarth X-Enigmail-Draft-Status: N1110 Message-ID: <564F8B73.7070403@gmail.com> Date: Fri, 20 Nov 2015 22:06:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <1448008952-1787-7-git-send-email-jszhang@marvell.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2826 Lines: 99 On 20.11.2015 09:42, Jisheng Zhang wrote: > Add syspll, mempll, cpupll, gateclk and berlin-clk nodes. > > Signed-off-by: Jisheng Zhang > --- > arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 38 ++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi > index a4a1876..808a997 100644 > --- a/arch/arm64/boot/dts/marvell/berlin4ct.dtsi > +++ b/arch/arm64/boot/dts/marvell/berlin4ct.dtsi > @@ -42,6 +42,7 @@ > * OTHER DEALINGS IN THE SOFTWARE. > */ > > +#include > #include > > / { > @@ -135,6 +136,22 @@ > interrupts = ; > }; > > + cpupll: cpupll { > + compatible = "marvell,berlin-pll"; > + reg = <0x922000 0x14>, <0xea0710 4>; > + #clock-cells = <0>; > + clocks = <&osc>, <&clk CLK_CPUFASTREF>; > + bypass-shift = /bits/ 8 <2>; > + }; > + > + mempll: mempll { > + compatible = "marvell,berlin-pll"; > + reg = <0x940034 0x14>, <0xea0710 4>; Whenever you see overlapping/repeating reg ranges, e.g. <0xea0710 4> you can be sure you are not representing HW structure but driver structure here. Please merge clocks/gates/plls to a single clock complex node and deal with the internals by using "simple-mfd" and "syscon" regmaps. > + #clock-cells = <0>; > + clocks = <&osc>, <&clk CLK_MEMFASTREF>; > + bypass-shift = /bits/ 8 <1>; > + }; > + > apb@e80000 { > compatible = "simple-bus"; > #address-cells = <1>; > @@ -225,6 +242,27 @@ > }; > }; > > + syspll: syspll { > + compatible = "marvell,berlin-pll"; > + reg = <0xea0200 0x14>, <0xea0710 4>; > + #clock-cells = <0>; > + clocks = <&osc>; > + bypass-shift = /bits/ 8 <0>; > + }; > + > + gateclk: gateclk { > + compatible = "marvell,berlin4ct-gateclk"; > + reg = <0xea0700 4>; > + #clock-cells = <1>; > + }; > + > + clk: clk { > + compatible = "marvell,berlin4ct-clk"; > + reg = <0xea0720 0x144>; Looking at the reg ranges, I'd say that they are all clock related and pretty close to each other: gateclk: reg = <0xea0700 4>; bypass: reg = <0xea0710 4>; clk: reg = <0xea0720 0x144>; So, please just follow the OF/driver structure we already have for Berlin2. Sebastian > + #clock-cells = <1>; > + clocks = <&syspll>; > + }; > + > soc_pinctrl: pin-controller@ea8000 { > compatible = "marvell,berlin4ct-soc-pinctrl"; > reg = <0xea8000 0x14>; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/