2
0

107-clk-sunxi-add-h3-usbphy-clocks.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From 7bec0200ac214b5cba44e2c2c4385815be4b9f00 Mon Sep 17 00:00:00 2001
  2. From: Reinder de Haan <patchesrdh@mveas.com>
  3. Date: Sun, 15 Nov 2015 20:46:13 +0100
  4. Subject: [PATCH] clk: sunxi: Add support for the H3 usb phy clocks
  5. The H3 has a usb-phy clk register which is similar to that of earlier
  6. SoCs, but with support for a larger number of phys. So we can simply add
  7. a new set of clk-data and a new compatible and be done with it.
  8. Acked-by: Chen-Yu Tsai <wens@csie.org>
  9. Acked-by: Rob Herring <robh@kernel.org>
  10. Signed-off-by: Reinder de Haan <patchesrdh@mveas.com>
  11. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  12. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  13. ---
  14. Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
  15. drivers/clk/sunxi/clk-usb.c | 12 ++++++++++++
  16. 2 files changed, 13 insertions(+)
  17. --- a/Documentation/devicetree/bindings/clock/sunxi.txt
  18. +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
  19. @@ -70,6 +70,7 @@ Required properties:
  20. "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13
  21. "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31
  22. "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23
  23. + "allwinner,sun8i-h3-usb-clk" - for usb gates + resets on H3
  24. "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80
  25. "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80
  26. --- a/drivers/clk/sunxi/clk-usb.c
  27. +++ b/drivers/clk/sunxi/clk-usb.c
  28. @@ -243,3 +243,15 @@ static void __init sun9i_a80_usb_phy_set
  29. sunxi_usb_clk_setup(node, &sun9i_a80_usb_phy_data, &a80_usb_phy_lock);
  30. }
  31. CLK_OF_DECLARE(sun9i_a80_usb_phy, "allwinner,sun9i-a80-usb-phy-clk", sun9i_a80_usb_phy_setup);
  32. +
  33. +static const struct usb_clk_data sun8i_h3_usb_clk_data __initconst = {
  34. + .clk_mask = BIT(19) | BIT(18) | BIT(17) | BIT(16) |
  35. + BIT(11) | BIT(10) | BIT(9) | BIT(8),
  36. + .reset_mask = BIT(3) | BIT(2) | BIT(1) | BIT(0),
  37. +};
  38. +
  39. +static void __init sun8i_h3_usb_setup(struct device_node *node)
  40. +{
  41. + sunxi_usb_clk_setup(node, &sun8i_h3_usb_clk_data, &sun4i_a10_usb_lock);
  42. +}
  43. +CLK_OF_DECLARE(sun8i_h3_usb, "allwinner,sun8i-h3-usb-clk", sun8i_h3_usb_setup);