UPSTREAM: phy: rockchip-usb: expose the phy-internal PLLs
authorHeiko Stuebner <heiko@sntech.de>
Thu, 19 Nov 2015 21:22:26 +0000 (22:22 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 25 Feb 2016 08:11:34 +0000 (16:11 +0800)
commit01e482c2d7ce4c13a11f577f6bc656f566b96d07
tree5ba1308e6551c9a0ff5d79e3fee2b8ad075381ba
parentc1536abe40e981f6e64cdbd63b577cb85542c851
UPSTREAM: phy: rockchip-usb: expose the phy-internal PLLs

The USB phys on Rockchip SoCs contain their own internal PLLs to create
the 480MHz needed. Additionally this PLL output is also fed back into the
core clock-controller as possible source for clocks like the GPU or others.

Until now this was modelled incorrectly with a "virtual" factor clock in
the clock controller. The one big caveat is that if we turn off the usb phy
via the siddq signal, all analog components get turned off, including the
PLLs. It is therefore possible that a source clock gets disabled without
the clock driver ever knowing, possibly making the system hang.

Therefore register the phy-plls as real clocks that the clock driver can
then reference again normally, making the clock hirarchy finally reflect
the actual hardware.

The phy-ops get converted to simply turning that new clock on and off
which in turn controls the siddq signal of the phy.

Through this the driver gains handling for platform-specific data, to
handle the phy->clock name association.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit b74fe7c7617fd267c10d53e525984df81a5f317f)

Change-Id: Ie05464a9523af86b602d4801cb9b842f65d08670
Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
drivers/phy/phy-rockchip-usb.c