]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
clk: imx6q: handle ENET PLL bypass
authorLucas Stach <l.stach@pengutronix.de>
Thu, 15 Nov 2018 14:30:28 +0000 (15:30 +0100)
committerStephen Boyd <sboyd@kernel.org>
Mon, 10 Dec 2018 19:39:16 +0000 (11:39 -0800)
commit3cc48976e9763209ccf0ccc47c8e3e5fc464c557
treec8a544e82ec0a0d99f5b98ce72aebf253611a72e
parenta29be9185d195bf5abd5ff5482a26800d58bac19
clk: imx6q: handle ENET PLL bypass

The ENET PLL is different from the other i.MX6 PLLs, as it has
multiple outputs with different post-dividers, which are all
bypassed if the single bypass bit is activated. The hardware setup
looks something like this:
                                _
refclk-o---PLL---o----DIV1-----| \
       |         |             |M |----OUT1
       o-----------------------|_/
       |         |              _
       |         o----DIV2-----| \
       |         |             |M |----OUT2
       o-----------------------|_/
       |         |              _
       |         `----DIV3-----| \
       |                       |M |----OUT3
       `-----------------------|_/

The bypass bit not only bypasses the PLL, but also the attached
post-dividers. This would be reasonbly straight forward to model
with a single output, or with different bypass bits for each output,
but sadly the HW guys decided that it would be good to actuate all
3 muxes with a single bit.

So the need to have the PLL bypassed for one of the outputs always
affects 2 other (in our model) independent branches of the clock
tree.

This means the decision to bypass this PLL is a system wide design
choice and should not be changed on-the-fly, so we can treat any
bapass configuration as static. As such we can just register the
post-dividiers with a ratio that reflects the bypass status, which
allows us to bypass the PLL without breaking our abstraction model
and with it DT stability.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/imx/clk-imx6q.c