linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] clocksource: Augment bindings for Faraday timer
@ 2017-03-24 21:32 Linus Walleij
  2017-03-24 21:32 ` [PATCH 2/3] clocksource: rename Gemini timer to Faraday Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Linus Walleij @ 2017-03-24 21:32 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner; +Cc: linux-kernel, Linus Walleij

It turns out that the Cortina Gemini timer block is just a
standard IP block from Faraday Technology named FTTMR010.

In order to make things clear and understandable, we rename the
bindings with a Faraday compatible as primary and the Cortina
gemini as a more specific case.

For the plain Faraday timer we require two clock references,
while the Gemini can keep it's syscon lookup pattern.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 .../bindings/timer/cortina,gemini-timer.txt        | 22 ---------------
 .../devicetree/bindings/timer/faraday,fttmr010.txt | 33 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 22 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/cortina,gemini-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/faraday,fttmr010.txt

diff --git a/Documentation/devicetree/bindings/timer/cortina,gemini-timer.txt b/Documentation/devicetree/bindings/timer/cortina,gemini-timer.txt
deleted file mode 100644
index 16ea1d3b2e9e..000000000000
--- a/Documentation/devicetree/bindings/timer/cortina,gemini-timer.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Cortina Systems Gemini timer
-
-This timer is embedded in the Cortina Systems Gemini SoCs.
-
-Required properties:
-
-- compatible : Must be "cortina,gemini-timer"
-- reg : Should contain registers location and length
-- interrupts : Should contain the three timer interrupts with
-  flags for rising edge
-- syscon : a phandle to the global Gemini system controller
-
-Example:
-
-timer@43000000 {
-	compatible = "cortina,gemini-timer";
-	reg = <0x43000000 0x1000>;
-	interrupts = <14 IRQ_TYPE_EDGE_RISING>, /* Timer 1 */
-		   <15 IRQ_TYPE_EDGE_RISING>, /* Timer 2 */
-		   <16 IRQ_TYPE_EDGE_RISING>; /* Timer 3 */
-	syscon = <&syscon>;
-};
diff --git a/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt b/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
new file mode 100644
index 000000000000..b73ca6cd07f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
@@ -0,0 +1,33 @@
+Faraday Technology timer
+
+This timer is a generic IP block from Faraday Technology, embedded in the
+Cortina Systems Gemini SoCs and other designs.
+
+Required properties:
+
+- compatible : Must be one of
+  "faraday,fttmr010"
+  "cortina,gemini-timer"
+- reg : Should contain registers location and length
+- interrupts : Should contain the three timer interrupts usually with
+  flags for falling edge
+
+Optionally required properties:
+
+- clocks : a clock to provide the tick rate for "faraday,fttmr010"
+- clock-names : should be "EXTCLK" and "PCLK" for the external tick timer
+  and peripheral clock respectively, for "faraday,fttmr010"
+- syscon : a phandle to the global Gemini system controller if the compatible
+  type is "cortina,gemini-timer"
+
+Example:
+
+timer@43000000 {
+	compatible = "faraday,fttmr010";
+	reg = <0x43000000 0x1000>;
+	interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */
+		   <15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */
+		   <16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */
+	clocks = <&extclk>, <&pclk>;
+	clock-names = "EXTCLK", "PCLK";
+};
-- 
2.9.3

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

* [PATCH 2/3] clocksource: rename Gemini timer to Faraday
  2017-03-24 21:32 [PATCH 1/3] clocksource: Augment bindings for Faraday timer Linus Walleij
@ 2017-03-24 21:32 ` Linus Walleij
  2017-03-24 21:32 ` [PATCH 3/3] clocksource: fttmr010: refactor to handle clock Linus Walleij
  2017-04-07 13:41 ` [PATCH 1/3] clocksource: Augment bindings for Faraday timer Daniel Lezcano
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2017-03-24 21:32 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner; +Cc: linux-kernel, Linus Walleij

After some research it turns out that the "Gemini" timer is
actually a generic IP block from Faraday Technology named
FTTMR010, so as to not make things too confusing we need to
rename the driver and its symbols to make sense.

The implementation remains the same in this patch but we fix
the copy-paste error in the timer name "nomadik_mtu" as we're
at it.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/clocksource/Kconfig                        |  7 ++--
 drivers/clocksource/Makefile                       |  2 +-
 .../{timer-gemini.c => timer-fttmr010.c}           | 45 +++++++++++-----------
 3 files changed, 27 insertions(+), 27 deletions(-)
 rename drivers/clocksource/{timer-gemini.c => timer-fttmr010.c} (83%)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 3356ab821624..b2d98346b28b 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -67,15 +67,16 @@ config DW_APB_TIMER_OF
 	select DW_APB_TIMER
 	select CLKSRC_OF
 
-config GEMINI_TIMER
-	bool "Cortina Gemini timer driver" if COMPILE_TEST
+config FTTMR010_TIMER
+	bool "Faraday Technology timer driver" if COMPILE_TEST
 	depends on GENERIC_CLOCKEVENTS
 	depends on HAS_IOMEM
 	select CLKSRC_MMIO
 	select CLKSRC_OF
 	select MFD_SYSCON
 	help
-	  Enables support for the Gemini timer
+	  Enables support for the Faraday Technology timer block
+	  FTTMR010.
 
 config ROCKCHIP_TIMER
 	bool "Rockchip timer driver" if COMPILE_TEST
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index d227d1314f14..2b5b56a6f00f 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -17,7 +17,7 @@ obj-$(CONFIG_CLKSRC_MMIO)	+= mmio.o
 obj-$(CONFIG_DIGICOLOR_TIMER)	+= timer-digicolor.o
 obj-$(CONFIG_DW_APB_TIMER)	+= dw_apb_timer.o
 obj-$(CONFIG_DW_APB_TIMER_OF)	+= dw_apb_timer_of.o
-obj-$(CONFIG_GEMINI_TIMER)	+= timer-gemini.o
+obj-$(CONFIG_FTTMR010_TIMER)	+= timer-fttmr010.o
 obj-$(CONFIG_ROCKCHIP_TIMER)      += rockchip_timer.o
 obj-$(CONFIG_CLKSRC_NOMADIK_MTU)	+= nomadik-mtu.o
 obj-$(CONFIG_CLKSRC_DBX500_PRCMU)	+= clksrc-dbx500-prcmu.o
diff --git a/drivers/clocksource/timer-gemini.c b/drivers/clocksource/timer-fttmr010.c
similarity index 83%
rename from drivers/clocksource/timer-gemini.c
rename to drivers/clocksource/timer-fttmr010.c
index dda27b7bf1a1..e37ec3d69a7e 100644
--- a/drivers/clocksource/timer-gemini.c
+++ b/drivers/clocksource/timer-fttmr010.c
@@ -1,5 +1,5 @@
 /*
- * Gemini timer driver
+ * Faraday Technology FTTMR010 timer driver
  * Copyright (C) 2017 Linus Walleij <linus.walleij@linaro.org>
  *
  * Based on a rewrite of arch/arm/mach-gemini/timer.c:
@@ -77,12 +77,12 @@
 static unsigned int tick_rate;
 static void __iomem *base;
 
-static u64 notrace gemini_read_sched_clock(void)
+static u64 notrace fttmr010_read_sched_clock(void)
 {
 	return readl(base + TIMER3_COUNT);
 }
 
-static int gemini_timer_set_next_event(unsigned long cycles,
+static int fttmr010_timer_set_next_event(unsigned long cycles,
 				       struct clock_event_device *evt)
 {
 	u32 cr;
@@ -96,7 +96,7 @@ static int gemini_timer_set_next_event(unsigned long cycles,
 	return 0;
 }
 
-static int gemini_timer_shutdown(struct clock_event_device *evt)
+static int fttmr010_timer_shutdown(struct clock_event_device *evt)
 {
 	u32 cr;
 
@@ -127,7 +127,7 @@ static int gemini_timer_shutdown(struct clock_event_device *evt)
 	return 0;
 }
 
-static int gemini_timer_set_periodic(struct clock_event_device *evt)
+static int fttmr010_timer_set_periodic(struct clock_event_device *evt)
 {
 	u32 period = DIV_ROUND_CLOSEST(tick_rate, HZ);
 	u32 cr;
@@ -158,35 +158,35 @@ static int gemini_timer_set_periodic(struct clock_event_device *evt)
 }
 
 /* Use TIMER1 as clock event */
-static struct clock_event_device gemini_clockevent = {
+static struct clock_event_device fttmr010_clockevent = {
 	.name			= "TIMER1",
 	/* Reasonably fast and accurate clock event */
 	.rating			= 300,
 	.shift                  = 32,
 	.features		= CLOCK_EVT_FEAT_PERIODIC |
 				  CLOCK_EVT_FEAT_ONESHOT,
-	.set_next_event		= gemini_timer_set_next_event,
-	.set_state_shutdown	= gemini_timer_shutdown,
-	.set_state_periodic	= gemini_timer_set_periodic,
-	.set_state_oneshot	= gemini_timer_shutdown,
-	.tick_resume		= gemini_timer_shutdown,
+	.set_next_event		= fttmr010_timer_set_next_event,
+	.set_state_shutdown	= fttmr010_timer_shutdown,
+	.set_state_periodic	= fttmr010_timer_set_periodic,
+	.set_state_oneshot	= fttmr010_timer_shutdown,
+	.tick_resume		= fttmr010_timer_shutdown,
 };
 
 /*
  * IRQ handler for the timer
  */
-static irqreturn_t gemini_timer_interrupt(int irq, void *dev_id)
+static irqreturn_t fttmr010_timer_interrupt(int irq, void *dev_id)
 {
-	struct clock_event_device *evt = &gemini_clockevent;
+	struct clock_event_device *evt = &fttmr010_clockevent;
 
 	evt->event_handler(evt);
 	return IRQ_HANDLED;
 }
 
-static struct irqaction gemini_timer_irq = {
-	.name		= "Gemini Timer Tick",
+static struct irqaction fttmr010_timer_irq = {
+	.name		= "Faraday FTTMR010 Timer Tick",
 	.flags		= IRQF_TIMER,
-	.handler	= gemini_timer_interrupt,
+	.handler	= fttmr010_timer_interrupt,
 };
 
 static int __init gemini_timer_of_init(struct device_node *np)
@@ -255,9 +255,9 @@ static int __init gemini_timer_of_init(struct device_node *np)
 	writel(0, base + TIMER3_MATCH1);
 	writel(0, base + TIMER3_MATCH2);
 	clocksource_mmio_init(base + TIMER3_COUNT,
-			      "gemini_clocksource", tick_rate,
+			      "fttmr010_clocksource", tick_rate,
 			      300, 32, clocksource_mmio_readl_up);
-	sched_clock_register(gemini_read_sched_clock, 32, tick_rate);
+	sched_clock_register(fttmr010_read_sched_clock, 32, tick_rate);
 
 	/*
 	 * Setup clockevent timer (interrupt-driven.)
@@ -266,12 +266,11 @@ static int __init gemini_timer_of_init(struct device_node *np)
 	writel(0, base + TIMER1_LOAD);
 	writel(0, base + TIMER1_MATCH1);
 	writel(0, base + TIMER1_MATCH2);
-	setup_irq(irq, &gemini_timer_irq);
-	gemini_clockevent.cpumask = cpumask_of(0);
-	clockevents_config_and_register(&gemini_clockevent, tick_rate,
+	setup_irq(irq, &fttmr010_timer_irq);
+	fttmr010_clockevent.cpumask = cpumask_of(0);
+	clockevents_config_and_register(&fttmr010_clockevent, tick_rate,
 					1, 0xffffffff);
 
 	return 0;
 }
-CLOCKSOURCE_OF_DECLARE(nomadik_mtu, "cortina,gemini-timer",
-		       gemini_timer_of_init);
+CLOCKSOURCE_OF_DECLARE(gemini, "cortina,gemini-timer", gemini_timer_of_init);
-- 
2.9.3

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

* [PATCH 3/3] clocksource: fttmr010: refactor to handle clock
  2017-03-24 21:32 [PATCH 1/3] clocksource: Augment bindings for Faraday timer Linus Walleij
  2017-03-24 21:32 ` [PATCH 2/3] clocksource: rename Gemini timer to Faraday Linus Walleij
@ 2017-03-24 21:32 ` Linus Walleij
  2017-04-07 13:41 ` [PATCH 1/3] clocksource: Augment bindings for Faraday timer Daniel Lezcano
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2017-03-24 21:32 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner; +Cc: linux-kernel, Linus Walleij

The plain Faraday FTTMR010 timer needs a clock to figure out its
tick rate, and the gemini reads it directly from the system
controller set-up. Split the init function and add two paths for
the two compatible-strings. We only support clocking using PCLK
because of lack of documentation on how EXTCLK works.

The Gemini still works like before, but we can also support a
generic, clock-based version.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/clocksource/timer-fttmr010.c | 119 +++++++++++++++++++++--------------
 1 file changed, 73 insertions(+), 46 deletions(-)

diff --git a/drivers/clocksource/timer-fttmr010.c b/drivers/clocksource/timer-fttmr010.c
index e37ec3d69a7e..b4a6f1e4bc54 100644
--- a/drivers/clocksource/timer-fttmr010.c
+++ b/drivers/clocksource/timer-fttmr010.c
@@ -16,17 +16,7 @@
 #include <linux/clockchips.h>
 #include <linux/clocksource.h>
 #include <linux/sched_clock.h>
-
-/*
- * Relevant registers in the global syscon
- */
-#define GLOBAL_STATUS		0x04
-#define CPU_AHB_RATIO_MASK	(0x3 << 18)
-#define CPU_AHB_1_1		(0x0 << 18)
-#define CPU_AHB_3_2		(0x1 << 18)
-#define CPU_AHB_24_13		(0x2 << 18)
-#define CPU_AHB_2_1		(0x3 << 18)
-#define REG_TO_AHB_SPEED(reg)	((((reg) >> 15) & 0x7) * 10 + 130)
+#include <linux/clk.h>
 
 /*
  * Register definitions for the timers
@@ -189,23 +179,9 @@ static struct irqaction fttmr010_timer_irq = {
 	.handler	= fttmr010_timer_interrupt,
 };
 
-static int __init gemini_timer_of_init(struct device_node *np)
+static int __init fttmr010_timer_common_init(struct device_node *np)
 {
-	static struct regmap *map;
 	int irq;
-	int ret;
-	u32 val;
-
-	map = syscon_regmap_lookup_by_phandle(np, "syscon");
-	if (IS_ERR(map)) {
-		pr_err("Can't get regmap for syscon handle");
-		return -ENODEV;
-	}
-	ret = regmap_read(map, GLOBAL_STATUS, &val);
-	if (ret) {
-		pr_err("Can't read syscon status register");
-		return -ENXIO;
-	}
 
 	base = of_iomap(np, 0);
 	if (!base) {
@@ -219,26 +195,6 @@ static int __init gemini_timer_of_init(struct device_node *np)
 		return -EINVAL;
 	}
 
-	tick_rate = REG_TO_AHB_SPEED(val) * 1000000;
-	printk(KERN_INFO "Bus: %dMHz", tick_rate / 1000000);
-
-	tick_rate /= 6;		/* APB bus run AHB*(1/6) */
-
-	switch (val & CPU_AHB_RATIO_MASK) {
-	case CPU_AHB_1_1:
-		printk(KERN_CONT "(1/1)\n");
-		break;
-	case CPU_AHB_3_2:
-		printk(KERN_CONT "(3/2)\n");
-		break;
-	case CPU_AHB_24_13:
-		printk(KERN_CONT "(24/13)\n");
-		break;
-	case CPU_AHB_2_1:
-		printk(KERN_CONT "(2/1)\n");
-		break;
-	}
-
 	/*
 	 * Reset the interrupt mask and status
 	 */
@@ -273,4 +229,75 @@ static int __init gemini_timer_of_init(struct device_node *np)
 
 	return 0;
 }
+
+static int __init fttmr010_timer_of_init(struct device_node *np)
+{
+	/*
+	 * These implementations require a clock reference.
+	 * FIXME: we currently only support clocking using PCLK
+	 * and using EXTCLK is not supported in the driver.
+	 */
+	struct clk *clk;
+
+	clk = of_clk_get_by_name(np, "PCLK");
+	if (IS_ERR(clk)) {
+		pr_err("could not get PCLK");
+		return PTR_ERR(clk);
+	}
+	tick_rate = clk_get_rate(clk);
+
+	return fttmr010_timer_common_init(np);
+}
+CLOCKSOURCE_OF_DECLARE(fttmr010, "faraday,fttmr010", fttmr010_timer_of_init);
+
+/*
+ * Gemini-specific: relevant registers in the global syscon
+ */
+#define GLOBAL_STATUS		0x04
+#define CPU_AHB_RATIO_MASK	(0x3 << 18)
+#define CPU_AHB_1_1		(0x0 << 18)
+#define CPU_AHB_3_2		(0x1 << 18)
+#define CPU_AHB_24_13		(0x2 << 18)
+#define CPU_AHB_2_1		(0x3 << 18)
+#define REG_TO_AHB_SPEED(reg)	((((reg) >> 15) & 0x7) * 10 + 130)
+
+static int __init gemini_timer_of_init(struct device_node *np)
+{
+	static struct regmap *map;
+	int ret;
+	u32 val;
+
+	map = syscon_regmap_lookup_by_phandle(np, "syscon");
+	if (IS_ERR(map)) {
+		pr_err("Can't get regmap for syscon handle\n");
+		return -ENODEV;
+	}
+	ret = regmap_read(map, GLOBAL_STATUS, &val);
+	if (ret) {
+		pr_err("Can't read syscon status register\n");
+		return -ENXIO;
+	}
+
+	tick_rate = REG_TO_AHB_SPEED(val) * 1000000;
+	pr_info("Bus: %dMHz ", tick_rate / 1000000);
+
+	tick_rate /= 6;		/* APB bus run AHB*(1/6) */
+
+	switch (val & CPU_AHB_RATIO_MASK) {
+	case CPU_AHB_1_1:
+		pr_cont("(1/1)\n");
+		break;
+	case CPU_AHB_3_2:
+		pr_cont("(3/2)\n");
+		break;
+	case CPU_AHB_24_13:
+		pr_cont("(24/13)\n");
+		break;
+	case CPU_AHB_2_1:
+		pr_cont("(2/1)\n");
+		break;
+	}
+
+	return fttmr010_timer_common_init(np);
+}
 CLOCKSOURCE_OF_DECLARE(gemini, "cortina,gemini-timer", gemini_timer_of_init);
-- 
2.9.3

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

* Re: [PATCH 1/3] clocksource: Augment bindings for Faraday timer
  2017-03-24 21:32 [PATCH 1/3] clocksource: Augment bindings for Faraday timer Linus Walleij
  2017-03-24 21:32 ` [PATCH 2/3] clocksource: rename Gemini timer to Faraday Linus Walleij
  2017-03-24 21:32 ` [PATCH 3/3] clocksource: fttmr010: refactor to handle clock Linus Walleij
@ 2017-04-07 13:41 ` Daniel Lezcano
  2017-04-07 14:27   ` Rob Herring
  2 siblings, 1 reply; 6+ messages in thread
From: Daniel Lezcano @ 2017-04-07 13:41 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Thomas Gleixner, linux-kernel, robh

On Fri, Mar 24, 2017 at 10:32:33PM +0100, Linus Walleij wrote:
> It turns out that the Cortina Gemini timer block is just a
> standard IP block from Faraday Technology named FTTMR010.
> 
> In order to make things clear and understandable, we rename the
> bindings with a Faraday compatible as primary and the Cortina
> gemini as a more specific case.
> 
> For the plain Faraday timer we require two clock references,
> while the Gemini can keep it's syscon lookup pattern.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---

Rob ? Is this change ok for you?

Thanks.

  -- Daniel

>  .../bindings/timer/cortina,gemini-timer.txt        | 22 ---------------
>  .../devicetree/bindings/timer/faraday,fttmr010.txt | 33 ++++++++++++++++++++++
>  2 files changed, 33 insertions(+), 22 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/timer/cortina,gemini-timer.txt
>  create mode 100644 Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
> 
> diff --git a/Documentation/devicetree/bindings/timer/cortina,gemini-timer.txt b/Documentation/devicetree/bindings/timer/cortina,gemini-timer.txt
> deleted file mode 100644
> index 16ea1d3b2e9e..000000000000
> --- a/Documentation/devicetree/bindings/timer/cortina,gemini-timer.txt
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -Cortina Systems Gemini timer
> -
> -This timer is embedded in the Cortina Systems Gemini SoCs.
> -
> -Required properties:
> -
> -- compatible : Must be "cortina,gemini-timer"
> -- reg : Should contain registers location and length
> -- interrupts : Should contain the three timer interrupts with
> -  flags for rising edge
> -- syscon : a phandle to the global Gemini system controller
> -
> -Example:
> -
> -timer@43000000 {
> -	compatible = "cortina,gemini-timer";
> -	reg = <0x43000000 0x1000>;
> -	interrupts = <14 IRQ_TYPE_EDGE_RISING>, /* Timer 1 */
> -		   <15 IRQ_TYPE_EDGE_RISING>, /* Timer 2 */
> -		   <16 IRQ_TYPE_EDGE_RISING>; /* Timer 3 */
> -	syscon = <&syscon>;
> -};
> diff --git a/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt b/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
> new file mode 100644
> index 000000000000..b73ca6cd07f8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
> @@ -0,0 +1,33 @@
> +Faraday Technology timer
> +
> +This timer is a generic IP block from Faraday Technology, embedded in the
> +Cortina Systems Gemini SoCs and other designs.
> +
> +Required properties:
> +
> +- compatible : Must be one of
> +  "faraday,fttmr010"
> +  "cortina,gemini-timer"
> +- reg : Should contain registers location and length
> +- interrupts : Should contain the three timer interrupts usually with
> +  flags for falling edge
> +
> +Optionally required properties:
> +
> +- clocks : a clock to provide the tick rate for "faraday,fttmr010"
> +- clock-names : should be "EXTCLK" and "PCLK" for the external tick timer
> +  and peripheral clock respectively, for "faraday,fttmr010"
> +- syscon : a phandle to the global Gemini system controller if the compatible
> +  type is "cortina,gemini-timer"
> +
> +Example:
> +
> +timer@43000000 {
> +	compatible = "faraday,fttmr010";
> +	reg = <0x43000000 0x1000>;
> +	interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */
> +		   <15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */
> +		   <16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */
> +	clocks = <&extclk>, <&pclk>;
> +	clock-names = "EXTCLK", "PCLK";
> +};
> -- 
> 2.9.3
> 

-- 

 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: [PATCH 1/3] clocksource: Augment bindings for Faraday timer
  2017-04-07 13:41 ` [PATCH 1/3] clocksource: Augment bindings for Faraday timer Daniel Lezcano
@ 2017-04-07 14:27   ` Rob Herring
  2017-04-07 21:52     ` Linus Walleij
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2017-04-07 14:27 UTC (permalink / raw)
  To: Daniel Lezcano, Linus Walleij; +Cc: Thomas Gleixner, linux-kernel

On Fri, Apr 7, 2017 at 8:41 AM, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
> On Fri, Mar 24, 2017 at 10:32:33PM +0100, Linus Walleij wrote:
>> It turns out that the Cortina Gemini timer block is just a
>> standard IP block from Faraday Technology named FTTMR010.
>>
>> In order to make things clear and understandable, we rename the
>> bindings with a Faraday compatible as primary and the Cortina
>> gemini as a more specific case.
>>
>> For the plain Faraday timer we require two clock references,
>> while the Gemini can keep it's syscon lookup pattern.
>>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>
> Rob ? Is this change ok for you?

Send to the DT list please. And use the -M option.

Rob

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

* Re: [PATCH 1/3] clocksource: Augment bindings for Faraday timer
  2017-04-07 14:27   ` Rob Herring
@ 2017-04-07 21:52     ` Linus Walleij
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2017-04-07 21:52 UTC (permalink / raw)
  To: Rob Herring; +Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel

On Fri, Apr 7, 2017 at 4:27 PM, Rob Herring <robh@kernel.org> wrote:
> On Fri, Apr 7, 2017 at 8:41 AM, Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>> On Fri, Mar 24, 2017 at 10:32:33PM +0100, Linus Walleij wrote:
>>> It turns out that the Cortina Gemini timer block is just a
>>> standard IP block from Faraday Technology named FTTMR010.
>>>
>>> In order to make things clear and understandable, we rename the
>>> bindings with a Faraday compatible as primary and the Cortina
>>> gemini as a more specific case.
>>>
>>> For the plain Faraday timer we require two clock references,
>>> while the Gemini can keep it's syscon lookup pattern.
>>>
>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>> ---
>>
>> Rob ? Is this change ok for you?
>
> Send to the DT list please. And use the -M option.

Sorry missed it :(

Resending this patch.

Yours,
Linus Walleij

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

end of thread, other threads:[~2017-04-07 21:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-24 21:32 [PATCH 1/3] clocksource: Augment bindings for Faraday timer Linus Walleij
2017-03-24 21:32 ` [PATCH 2/3] clocksource: rename Gemini timer to Faraday Linus Walleij
2017-03-24 21:32 ` [PATCH 3/3] clocksource: fttmr010: refactor to handle clock Linus Walleij
2017-04-07 13:41 ` [PATCH 1/3] clocksource: Augment bindings for Faraday timer Daniel Lezcano
2017-04-07 14:27   ` Rob Herring
2017-04-07 21:52     ` Linus Walleij

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).