From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Brezillon Subject: Re: [PATCH 1/8] MIPS: DTS: CI20: Set BCH clock to 200 MHz Date: Fri, 18 Jan 2019 09:07:36 +0100 Message-ID: <20190118090736.6f1283bd@bbrezillon> References: <20190118010634.27399-1-paul@crapouillou.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190118010634.27399-1-paul@crapouillou.net> Sender: linux-kernel-owner@vger.kernel.org To: Paul Cercueil Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , Miquel Raynal , Harvey Hunt , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org List-Id: devicetree@vger.kernel.org Hi Paul, On Thu, 17 Jan 2019 22:06:27 -0300 Paul Cercueil wrote: > This is currently done inside the jz4780-bch driver, but it really > should be done here instead. > I disagree with that statement. If it's a per-SoC constraint then you can select the appropriate rate based on the compatible in the driver. If the clock rate depends on the NAND chip it probably means it's used to generate the RE/WE pulse and should depend on the NAND timings passed to ->setup_data_interface(). In either case, this should not be specified in the DT. Regards, Boris > Signed-off-by: Paul Cercueil > --- > arch/mips/boot/dts/ingenic/ci20.dts | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts > index 50cff3cbcc6d..aa892ec54d0a 100644 > --- a/arch/mips/boot/dts/ingenic/ci20.dts > +++ b/arch/mips/boot/dts/ingenic/ci20.dts > @@ -111,6 +111,9 @@ > pinctrl-names = "default"; > pinctrl-0 = <&pins_nemc>; > > + assigned-clocks = <&cgu JZ4780_CLK_BCH>; > + assigned-clock-rates = <200000000>; > + > nand@1 { > reg = <1>; >