public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND v4 1/8] clk: sunxi: Implement A31 USB clock
  2014-05-13 15:44 [PATCH RESEND v4 0/8] Add Allwinner A31 USB support Maxime Ripard
@ 2014-05-13 15:44 ` Maxime Ripard
  2014-05-13 16:40   ` Emilio López
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2014-05-13 15:44 UTC (permalink / raw)
  To: Emilio Lopez, Mike Turquette, stern, kishon, hdegoede,
	Greg Kroah-Hartman
  Cc: Boris Brezillon, linux-kernel, linux-arm-kernel, linux-usb,
	kevin.z.m.zh, sunny, shuge, zhuzhenhua, linux-sunxi,
	Maxime Ripard

The A31 USB clock slightly differ from its older counterparts, mostly because
it has a different gate for each PHY, while the older one had a single gate for
all the phy.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/sunxi/clk-sunxi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index bd7dc733c1ca..d9bab75f128b 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -972,6 +972,11 @@ static const struct gates_data sun5i_a13_usb_gates_data __initconst = {
 	.reset_mask = 0x03,
 };
 
+static const struct gates_data sun6i_a31_usb_gates_data __initconst = {
+	.mask = { BIT(18) | BIT(17) | BIT(16) | BIT(10) | BIT(9) | BIT(8) },
+	.reset_mask = BIT(2) | BIT(1) | BIT(0),
+};
+
 static void __init sunxi_gates_clk_setup(struct device_node *node,
 					 struct gates_data *data)
 {
@@ -1267,6 +1272,7 @@ static const struct of_device_id clk_gates_match[] __initconst = {
 	{.compatible = "allwinner,sun6i-a31-apb2-gates-clk", .data = &sun6i_a31_apb2_gates_data,},
 	{.compatible = "allwinner,sun4i-a10-usb-clk", .data = &sun4i_a10_usb_gates_data,},
 	{.compatible = "allwinner,sun5i-a13-usb-clk", .data = &sun5i_a13_usb_gates_data,},
+	{.compatible = "allwinner,sun6i-a31-usb-clk", .data = &sun6i_a31_usb_gates_data,},
 	{}
 };
 
-- 
1.9.3


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

* Re: [PATCH RESEND v4 1/8] clk: sunxi: Implement A31 USB clock
  2014-05-13 15:44 ` [PATCH RESEND v4 1/8] clk: sunxi: Implement A31 USB clock Maxime Ripard
@ 2014-05-13 16:40   ` Emilio López
  0 siblings, 0 replies; 4+ messages in thread
From: Emilio López @ 2014-05-13 16:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mike Turquette, stern, kishon, hdegoede, Greg Kroah-Hartman,
	Boris Brezillon, linux-kernel, linux-arm-kernel, linux-usb,
	kevin.z.m.zh, sunny, shuge, zhuzhenhua, linux-sunxi

Hi Maxime,

El 13/05/14 12:44, Maxime Ripard escribió:
> The A31 USB clock slightly differ from its older counterparts, mostly because
> it has a different gate for each PHY, while the older one had a single gate for
> all the phy.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Acked-by: Mike Turquette <mturquette@linaro.org>

I have queued this commit in sunxi-clk-for-mike for my 3.16 pull. I have 
also queued the trivial patch below to keep the new compatible documented.

Cheers,

Emilio

--->8---

clk: sunxi: document new A31 USB clock compatible

Support for the USB gates and resets on A31 has been recently added
using a new compatible, so let's document it here.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
---
  Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
  1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt 
b/Documentation/devicetree/bindings/clock/sunxi.txt
index a5160d8..1f6d3f4 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -41,6 +41,7 @@ Required properties:
  	"allwinner,sun7i-a20-gmac-clk" - for the GMAC clock module on A20/A31
  	"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

  Required properties for all clocks:
  - reg : shall be the control register address for the clock.
-- 
1.9.2

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

* [PATCH RESEND v4 1/8] clk: sunxi: Implement A31 USB clock
       [not found] <1400072167-29631-1-git-send-email-maxime.ripard@free-electrons.com>
@ 2014-05-14 12:56 ` Maxime Ripard
  2014-05-14 13:02   ` Maxime Ripard
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2014-05-14 12:56 UTC (permalink / raw)
  To: kishon, hdegoede
  Cc: Boris Brezillon, linux-kernel, linux-arm-kernel, kevin.z.m.zh,
	sunny, shuge, zhuzhenhua, linux-sunxi, Maxime Ripard

The A31 USB clock slightly differ from its older counterparts, mostly because
it has a different gate for each PHY, while the older one had a single gate for
all the phy.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/sunxi/clk-sunxi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index bd7dc733c1ca..d9bab75f128b 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -972,6 +972,11 @@ static const struct gates_data sun5i_a13_usb_gates_data __initconst = {
 	.reset_mask = 0x03,
 };
 
+static const struct gates_data sun6i_a31_usb_gates_data __initconst = {
+	.mask = { BIT(18) | BIT(17) | BIT(16) | BIT(10) | BIT(9) | BIT(8) },
+	.reset_mask = BIT(2) | BIT(1) | BIT(0),
+};
+
 static void __init sunxi_gates_clk_setup(struct device_node *node,
 					 struct gates_data *data)
 {
@@ -1267,6 +1272,7 @@ static const struct of_device_id clk_gates_match[] __initconst = {
 	{.compatible = "allwinner,sun6i-a31-apb2-gates-clk", .data = &sun6i_a31_apb2_gates_data,},
 	{.compatible = "allwinner,sun4i-a10-usb-clk", .data = &sun4i_a10_usb_gates_data,},
 	{.compatible = "allwinner,sun5i-a13-usb-clk", .data = &sun5i_a13_usb_gates_data,},
+	{.compatible = "allwinner,sun6i-a31-usb-clk", .data = &sun6i_a31_usb_gates_data,},
 	{}
 };
 
-- 
1.9.3


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

* Re: [PATCH RESEND v4 1/8] clk: sunxi: Implement A31 USB clock
  2014-05-14 12:56 ` [PATCH RESEND v4 1/8] clk: sunxi: Implement A31 USB clock Maxime Ripard
@ 2014-05-14 13:02   ` Maxime Ripard
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2014-05-14 13:02 UTC (permalink / raw)
  To: kishon, hdegoede
  Cc: Boris Brezillon, linux-kernel, linux-arm-kernel, kevin.z.m.zh,
	sunny, shuge, zhuzhenhua, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

On Wed, May 14, 2014 at 02:56:00PM +0200, Maxime Ripard wrote:
> The A31 USB clock slightly differ from its older counterparts, mostly because
> it has a different gate for each PHY, while the older one had a single gate for
> all the phy.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Acked-by: Mike Turquette <mturquette@linaro.org>

Sorry for this one... PEBKAC...

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2014-05-15  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1400072167-29631-1-git-send-email-maxime.ripard@free-electrons.com>
2014-05-14 12:56 ` [PATCH RESEND v4 1/8] clk: sunxi: Implement A31 USB clock Maxime Ripard
2014-05-14 13:02   ` Maxime Ripard
2014-05-13 15:44 [PATCH RESEND v4 0/8] Add Allwinner A31 USB support Maxime Ripard
2014-05-13 15:44 ` [PATCH RESEND v4 1/8] clk: sunxi: Implement A31 USB clock Maxime Ripard
2014-05-13 16:40   ` Emilio López

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox