From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleksij Rempel Subject: Re: [PATCH v2 4/6] dt: bindings: add mt7621-pll dt binding documentation Date: Sun, 18 Aug 2019 09:59:08 +0200 Message-ID: <6426d4d2-9961-83f2-d3bc-5834ff36b40d@rempel-privat.de> References: <20190724022310.28010-1-gch981213@gmail.com> <20190724022310.28010-5-gch981213@gmail.com> <20190813155143.GA19830@bogus> <2d48f4a4-7d30-547b-21ee-6aadabe7d7c3@gmx.net> <6b6ee744-61d3-8848-19e7-0a301fe4d1b3@rempel-privat.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-GB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Chuanhong Guo Cc: "open list:STAGING SUBSYSTEM" , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Stephen Boyd , James Hogan , Michael Turquette , "open list:MIPS" , Ralf Baechle , open list , Paul Fertser , Paul Burton , Weijie Gao , Greg Kroah-Hartman , John Crispin , NeilBrown , Mark Rutland , "open list:COMMON CLK FRAMEWORK" List-Id: devicetree@vger.kernel.org Am 18.08.19 um 09:19 schrieb Chuanhong Guo: > Hi! > > On Sun, Aug 18, 2019 at 2:10 PM Oleksij Rempel wrote: >> >>>> We have at least 2 know registers: >>>> SYSC_REG_CPLL_CLKCFG0 - it provides some information about boostrapped >>>> refclock. PLL and dividers used for CPU and some sort of BUS (AHB?). >>>> SYSC_REG_CPLL_CLKCFG1 - a banch of gates to enable/disable clocks for >>>> all or some ip cores. >>>> What is probably missing is a set of dividers for >>>> each ip core. From your words it is not document. >>> >>> The specific missing part I was referring to, is parent clocks for >>> every gates. I'm not going to assume this with current openwrt device >>> tree because some peripherals doesn't have a clock binding at all or >>> have a dummy one there. >> >> Ok, then I do not understand what is the motivation to upstream >> something what is not nearly ready for use. > > Why isn't it "ready for use" then? > A complete mt7621-pll driver will contain two parts: > 1. A clock provider which outputs several clocks > 2. A clock gate with parent clocks properly configured > > Two clocks provided here are just two clocks that can't be controlled > in kernel no matter where it goes (arch/mips/ralink or drivers/clk). > Having a working CPU clock provider is better than defining a fixed > clock in dts because CPU clock can be controlled by bootloader. > (BTW description for CPU PLL register is also missing in datasheet.) > Clock gate is an unrelated part and there is no information to > properly implement it unless MTK decided to release a clock plan > somehow. With other words, your complete system is running with unknown clock rates. The source clock in the clock three can be configured differently by bootloader but you don't know how it is done how and it is not documented. >> This code is currently on prototyping phase > > Code for clock calculation is done, not "prototyping". > >> It means, we cannot expect that this driver will be fixed any time soon. > > I think clock gating is a separated feature instead of a broken part > that has to be fixed. Ok, i would agree with it. But from what you said, this feature will be never implemented. So, I repeat my question. What is the point to upstream code for a system, which has not enough information to get proper clock rate even for uart? or is uart running with cpu or bus clock rate? -- Regards, Oleksij