From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 19 Jul 2017 11:10:26 +0300 From: Peter De Schrijver To: Joel Stanley CC: Philipp Zabel , Michael Turquette , Stephen Boyd , , Ryan Chen , "Linus Walleij" , Benjamin Herrenschmidt , Andrew Jeffery , Jeremy Kerr Subject: Re: Coupled clk/reset Message-ID: <20170719081026.GE1002@tbergstrom-lnx.Nvidia.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" In-Reply-To: Return-Path: pdeschrijver@nvidia.com List-ID: On Tue, Jul 18, 2017 at 07:53:09PM +0930, Joel Stanley wrote: > Hello! > > I'm taking a stab at a clk and reset driver for the Aspeed SoCs. I've > used the Gemini driver for inspiration so far, which looks to be a > good fit for the clock gating and important clocks (those we need in > order to get the uart and timer source going). > > One tricky bit is the datasheet specifies the following for enabling > an IP block ('engine'), whenever the engine is started from the > clocked stopped state: > > 1. Enable engine reset > 2. Delay 100us > 3. Enable clock > 4. Delay 10ms > 5. Disable engine reset > This is a pretty standard sequence. The reset is synchronous, so the module clock needs to be running for the reset toggling to take effect. And it takes some time for the reset propagate through all the logic, hence the second delay, although 10ms seems large to me. Peter.