* [PATCH 1/2] clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs
@ 2015-06-01 18:23 Hans de Goede
[not found] ` <1433183008-13086-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Hans de Goede @ 2015-06-01 18:23 UTC (permalink / raw)
To: Maxime Ripard
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Mike Turquette, Hans de Goede
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 3th phy, but not exactly the same bits so we need
a new compatible for this.
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 | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
index 4fa11af..8a47b77 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -67,6 +67,7 @@ Required properties:
"allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20
"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,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 a86ed2f..3a25f95 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)
}
CLK_OF_DECLARE(sun6i_a31_usb, "allwinner,sun6i-a31-usb-clk", sun6i_a31_usb_setup);
+static const struct usb_clk_data sun8i_a23_usb_clk_data __initconst = {
+ .clk_mask = BIT(16) | BIT(11) | BIT(10) | BIT(9) | BIT(8),
+ .reset_mask = BIT(2) | BIT(1) | BIT(0),
+};
+
+static void __init sun8i_a23_usb_setup(struct device_node *node)
+{
+ sunxi_usb_clk_setup(node, &sun8i_a23_usb_clk_data, &sun4i_a10_usb_lock);
+}
+CLK_OF_DECLARE(sun8i_a23_usb, "allwinner,sun8i-a23-usb-clk", sun8i_a23_usb_setup);
+
static const struct usb_clk_data sun9i_a80_usb_mod_data __initconst = {
.clk_mask = BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1),
.reset_mask = BIT(19) | BIT(18) | BIT(17),
--
2.4.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread[parent not found: <1433183008-13086-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* [PATCH 2/2] ARM: dts: sun8i: Add usb_clk node for a23/a33 [not found] ` <1433183008-13086-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2015-06-01 18:23 ` Hans de Goede [not found] ` <1433183008-13086-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2015-06-01 23:39 ` [PATCH 1/2] clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs Julian Calaby ` (2 subsequent siblings) 3 siblings, 1 reply; 7+ messages in thread From: Hans de Goede @ 2015-06-01 18:23 UTC (permalink / raw) To: Maxime Ripard Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Mike Turquette, Hans de Goede Add an usb_clk node for a23/a33. Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> --- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi index c73d1d1..44dd7155 100644 --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi @@ -248,6 +248,16 @@ "mmc2_output", "mmc2_sample"; }; + + usb_clk: clk@01c200cc { + #clock-cells = <1>; + #reset-cells = <1>; + compatible = "allwinner,sun8i-a23-usb-clk"; + reg = <0x01c200cc 0x4>; + clocks = <&osc24M>; + clock-output-names = "usb_phy0", "usb_phy1", "hsic", + "hsic_12m", "usb_ohci0"; + }; }; soc@01c00000 { -- 2.4.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <1433183008-13086-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH 2/2] ARM: dts: sun8i: Add usb_clk node for a23/a33 [not found] ` <1433183008-13086-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2015-06-02 2:01 ` Chen-Yu Tsai 2015-06-02 8:27 ` Maxime Ripard 1 sibling, 0 replies; 7+ messages in thread From: Chen-Yu Tsai @ 2015-06-02 2:01 UTC (permalink / raw) To: Hans De Goede Cc: Maxime Ripard, linux-arm-kernel, devicetree, linux-sunxi, Mike Turquette On Tue, Jun 2, 2015 at 2:23 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: > Add an usb_clk node for a23/a33. > > Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > arch/arm/boot/dts/sun8i-a23-a33.dtsi | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi > index c73d1d1..44dd7155 100644 > --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi > +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi > @@ -248,6 +248,16 @@ > "mmc2_output", > "mmc2_sample"; > }; > + > + usb_clk: clk@01c200cc { > + #clock-cells = <1>; > + #reset-cells = <1>; > + compatible = "allwinner,sun8i-a23-usb-clk"; > + reg = <0x01c200cc 0x4>; > + clocks = <&osc24M>; > + clock-output-names = "usb_phy0", "usb_phy1", "hsic", > + "hsic_12m", "usb_ohci0"; Minor nitpicks: "hsic_12m" should be "hsic_12M". And maybe add the "usb_" prefix to the hsic clocks as well? Otherwise, Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> P.S. There's a new linux-clk mailing list that these 2 patches should be sent to as well. > + }; > }; > > soc@01c00000 { > -- > 2.4.2 > > -- > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] ARM: dts: sun8i: Add usb_clk node for a23/a33 [not found] ` <1433183008-13086-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2015-06-02 2:01 ` Chen-Yu Tsai @ 2015-06-02 8:27 ` Maxime Ripard 1 sibling, 0 replies; 7+ messages in thread From: Maxime Ripard @ 2015-06-02 8:27 UTC (permalink / raw) To: Hans de Goede Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Mike Turquette [-- Attachment #1: Type: text/plain, Size: 340 bytes --] On Mon, Jun 01, 2015 at 08:23:28PM +0200, Hans de Goede wrote: > Add an usb_clk node for a23/a33. > > Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Applied with Chen-Yu's comments. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs [not found] ` <1433183008-13086-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2015-06-01 18:23 ` [PATCH 2/2] ARM: dts: sun8i: Add usb_clk node for a23/a33 Hans de Goede @ 2015-06-01 23:39 ` Julian Calaby 2015-06-02 1:57 ` Chen-Yu Tsai 2015-06-02 8:24 ` Maxime Ripard 3 siblings, 0 replies; 7+ messages in thread From: Julian Calaby @ 2015-06-01 23:39 UTC (permalink / raw) To: Hans de Goede Cc: Maxime Ripard, Mailing List, Arm, devicetree, linux-sunxi, Mike Turquette Hi Hans, On Tue, Jun 2, 2015 at 4:23 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: > 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 3th phy, but not exactly the same bits so we need > a new compatible for this. Minor spelling note: it's "3rd" not "3th". Thanks, -- Julian Calaby Email: julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Profile: http://www.google.com/profiles/julian.calaby/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs [not found] ` <1433183008-13086-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2015-06-01 18:23 ` [PATCH 2/2] ARM: dts: sun8i: Add usb_clk node for a23/a33 Hans de Goede 2015-06-01 23:39 ` [PATCH 1/2] clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs Julian Calaby @ 2015-06-02 1:57 ` Chen-Yu Tsai 2015-06-02 8:24 ` Maxime Ripard 3 siblings, 0 replies; 7+ messages in thread From: Chen-Yu Tsai @ 2015-06-02 1:57 UTC (permalink / raw) To: Hans De Goede Cc: Maxime Ripard, linux-arm-kernel, devicetree, linux-sunxi, Mike Turquette On Tue, Jun 2, 2015 at 2:23 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: > 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 3th phy, but not exactly the same bits so we need > a new compatible for this. > > Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> I have almost the exact same patches in my old sun8i-otg branch. I was planning to rebase them onto the new musb patches today, but since you beat me to them, Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> My old patches are in https://github.com/wens/linux/tree/sun8i-usb I planned on testing EHCI/OHCI first before posting anything. Regards ChenYu > --- > Documentation/devicetree/bindings/clock/sunxi.txt | 1 + > drivers/clk/sunxi/clk-usb.c | 11 +++++++++++ > 2 files changed, 12 insertions(+) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs [not found] ` <1433183008-13086-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> ` (2 preceding siblings ...) 2015-06-02 1:57 ` Chen-Yu Tsai @ 2015-06-02 8:24 ` Maxime Ripard 3 siblings, 0 replies; 7+ messages in thread From: Maxime Ripard @ 2015-06-02 8:24 UTC (permalink / raw) To: Hans de Goede Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Mike Turquette [-- Attachment #1: Type: text/plain, Size: 601 bytes --] On Mon, Jun 01, 2015 at 08:23:27PM +0200, Hans de Goede wrote: > 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 3th phy, but not exactly the same bits so we need > a new compatible for this. > > Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Applied with Julian spelling fix. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-02 8:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-01 18:23 [PATCH 1/2] clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs Hans de Goede
[not found] ` <1433183008-13086-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-01 18:23 ` [PATCH 2/2] ARM: dts: sun8i: Add usb_clk node for a23/a33 Hans de Goede
[not found] ` <1433183008-13086-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-02 2:01 ` Chen-Yu Tsai
2015-06-02 8:27 ` Maxime Ripard
2015-06-01 23:39 ` [PATCH 1/2] clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs Julian Calaby
2015-06-02 1:57 ` Chen-Yu Tsai
2015-06-02 8:24 ` Maxime Ripard
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).