diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-06-01 14:23:27 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2015-06-02 04:24:39 -0400 |
commit | ec80749dfd859b560e8864d665d38d7a63e6a7f2 (patch) | |
tree | 446938263e27f215d20ce0501bd382885c9b4615 | |
parent | 5ac382c311fc12ccfb74832afe545ce8c38cc459 (diff) |
clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs
The usb-clk on sun8i a23 and a33 SoCs is similar to the ones found
on sun6i-a31 SoCs but instead of a 3th phy the a23 / a33 have a hsic
interface which gets enabled by almost the same bits as used on
the a31 for the 3rd phy, but not exactly the same bits so we need
a new compatible for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
-rw-r--r-- | Documentation/devicetree/bindings/clock/sunxi.txt | 1 | ||||
-rw-r--r-- | drivers/clk/sunxi/clk-usb.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index 4fa11af3d378..8a47b77abfca 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt | |||
@@ -67,6 +67,7 @@ Required properties: | |||
67 | "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20 | 67 | "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20 |
68 | "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13 | 68 | "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13 |
69 | "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31 | 69 | "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31 |
70 | "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23 | ||
70 | "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80 | 71 | "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80 |
71 | "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80 | 72 | "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80 |
72 | 73 | ||
diff --git a/drivers/clk/sunxi/clk-usb.c b/drivers/clk/sunxi/clk-usb.c index a86ed2f8d7af..3a25f9588e67 100644 --- a/drivers/clk/sunxi/clk-usb.c +++ b/drivers/clk/sunxi/clk-usb.c | |||
@@ -204,6 +204,17 @@ static void __init sun6i_a31_usb_setup(struct device_node *node) | |||
204 | } | 204 | } |
205 | CLK_OF_DECLARE(sun6i_a31_usb, "allwinner,sun6i-a31-usb-clk", sun6i_a31_usb_setup); | 205 | CLK_OF_DECLARE(sun6i_a31_usb, "allwinner,sun6i-a31-usb-clk", sun6i_a31_usb_setup); |
206 | 206 | ||
207 | static const struct usb_clk_data sun8i_a23_usb_clk_data __initconst = { | ||
208 | .clk_mask = BIT(16) | BIT(11) | BIT(10) | BIT(9) | BIT(8), | ||
209 | .reset_mask = BIT(2) | BIT(1) | BIT(0), | ||
210 | }; | ||
211 | |||
212 | static void __init sun8i_a23_usb_setup(struct device_node *node) | ||
213 | { | ||
214 | sunxi_usb_clk_setup(node, &sun8i_a23_usb_clk_data, &sun4i_a10_usb_lock); | ||
215 | } | ||
216 | CLK_OF_DECLARE(sun8i_a23_usb, "allwinner,sun8i-a23-usb-clk", sun8i_a23_usb_setup); | ||
217 | |||
207 | static const struct usb_clk_data sun9i_a80_usb_mod_data __initconst = { | 218 | static const struct usb_clk_data sun9i_a80_usb_mod_data __initconst = { |
208 | .clk_mask = BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1), | 219 | .clk_mask = BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1), |
209 | .reset_mask = BIT(19) | BIT(18) | BIT(17), | 220 | .reset_mask = BIT(19) | BIT(18) | BIT(17), |