• Lucas Stach's avatar
    clk: imx6q: handle ENET PLL bypass · 3cc48976
    Lucas Stach authored
    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: default avatarLucas Stach <l.stach@pengutronix.de>
    Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
    3cc48976
clk-imx6q.c 56.9 KB