devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] clk: sunxi: Add support for the H3 usb phy clocks
@ 2015-11-15 19:46 Hans de Goede
       [not found] ` <1447616777-24660-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Hans de Goede @ 2015-11-15 19:46 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Greg Kroah-Hartman, Mike Turquette
  Cc: Alan Stern, Tony Prisk, Reinder de Haan, linux-usb, Maxime Ripard,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	Hans de Goede

From: Reinder de Haan <patchesrdh-I1/eAgTnXDYAvxtiuMwx3w@public.gmane.org>

The H3 has a usb-phy clk register which is similar to that of earlier
SoCs, but with support for a larger number of phys. So we can simply add
a new set of clk-data and a new compatible and be done with it.

Signed-off-by: Reinder de Haan <patchesrdh-I1/eAgTnXDYAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 Documentation/devicetree/bindings/clock/sunxi.txt |  1 +
 drivers/clk/sunxi/clk-usb.c                       | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
index d303dec..23e7bce 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -70,6 +70,7 @@ Required properties:
 	"allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13
 	"allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31
 	"allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23
+	"allwinner,sun8i-h3-usb-clk" - for usb gates + resets on H3
 	"allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80
 	"allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80
 
diff --git a/drivers/clk/sunxi/clk-usb.c b/drivers/clk/sunxi/clk-usb.c
index 1a72cd6..67b8e38 100644
--- a/drivers/clk/sunxi/clk-usb.c
+++ b/drivers/clk/sunxi/clk-usb.c
@@ -243,3 +243,15 @@ static void __init sun9i_a80_usb_phy_setup(struct device_node *node)
 	sunxi_usb_clk_setup(node, &sun9i_a80_usb_phy_data, &a80_usb_phy_lock);
 }
 CLK_OF_DECLARE(sun9i_a80_usb_phy, "allwinner,sun9i-a80-usb-phy-clk", sun9i_a80_usb_phy_setup);
+
+static const struct usb_clk_data sun8i_h3_usb_clk_data __initconst = {
+	.clk_mask =  BIT(19) | BIT(18) | BIT(17) | BIT(16) |
+		     BIT(11) | BIT(10) | BIT(9) | BIT(8),
+	.reset_mask = BIT(3) | BIT(2) | BIT(1) | BIT(0),
+};
+
+static void __init sun8i_h3_usb_setup(struct device_node *node)
+{
+	sunxi_usb_clk_setup(node, &sun8i_h3_usb_clk_data, &sun4i_a10_usb_lock);
+}
+CLK_OF_DECLARE(sun8i_h3_usb, "allwinner,sun8i-h3-usb-clk", sun8i_h3_usb_setup);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-11-27  3:56 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-15 19:46 [PATCH 1/5] clk: sunxi: Add support for the H3 usb phy clocks Hans de Goede
     [not found] ` <1447616777-24660-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-15 19:46   ` [PATCH 2/5] phy-sun4i-usb: Add support for the host usb-phys found on the H3 SoC Hans de Goede
     [not found]     ` <1447616777-24660-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-16 15:29       ` Rob Herring
2015-11-20 19:49       ` Priit Laes
     [not found]         ` <1448048951.1560.5.camel-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
2015-11-22 11:29           ` Hans de Goede
2015-11-15 19:46   ` [PATCH 3/5] ARM: dts: sun8i: Add support for H3 usb clocks Hans de Goede
     [not found]     ` <1447616777-24660-3-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-16  2:41       ` Chen-Yu Tsai
2015-11-15 19:46   ` [PATCH 4/5] ARM: dts: sun8i: Add usbphy and usb host controller nodes Hans de Goede
2015-11-15 19:46   ` [PATCH 5/5] ARM: dts: sun8i-h3-orangepi-plus: Enable USB host controllers Hans de Goede
     [not found]     ` <1447616777-24660-5-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-16  3:00       ` Chen-Yu Tsai
     [not found]         ` <CAGb2v669Cu6+G=P8yH-g5KbOsWTHBgnYUYf2fGt+jKXbqVAKfQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-16  8:11           ` Hans de Goede
     [not found]             ` <56498FA8.3050908-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-17 16:12               ` [PATCH] " Jens Kuske
     [not found]                 ` <564B51D7.7090500-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-11-20 14:38                   ` Hans de Goede
     [not found]                     ` <564F3077.7020104-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-24  7:44                       ` Maxime Ripard
2015-11-23 22:20                   ` Troy Dack
     [not found]                     ` <fff9e78a-e23e-4226-9cec-67550bf09efb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-24  8:50                       ` Hans de Goede
     [not found]                         ` <565424B9.5010601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-27  3:56                           ` Troy Dack
2015-11-16  2:36   ` [linux-sunxi] [PATCH 1/5] clk: sunxi: Add support for the H3 usb phy clocks Chen-Yu Tsai
     [not found]     ` <CAGb2v65x5z4Svn+PAmm1W6xZKxP0iFjCodeA0xbf0VLxx5qiWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-20 12:49       ` Maxime Ripard
2015-11-16 15:30   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).