All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-24  6:54 ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-24  6:54 UTC (permalink / raw)
  To: linux-arm-kernel

According to the platform data for the legacy-C initialisation of sh-sci
for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
scscr needs to be set.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

With the approach taken by this patch sh-sci may be initialised using the
"renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
compat string.  An alternate approach would be to add a binding to allow
setting of this bit to be controlled directly from DT.
---
 .../devicetree/bindings/serial/renesas,sci-serial.txt          |  1 +
 drivers/tty/serial/sh-sci.c                                    | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 53e6c17..bba86de 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -12,6 +12,7 @@ Required properties:
     - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
     - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
     - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
+    - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
     - "renesas,scif" for generic SCIF compatible UART.
     - "renesas,scifa" for generic SCIFA compatible UART.
     - "renesas,scifb" for generic SCIFB compatible UART.
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 88236da..3b5d2f6 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev)
 struct sci_port_info {
 	unsigned int type;
 	unsigned int regtype;
+	unsigned int scscr_extra;
 };
 
 static const struct of_device_id of_sci_match[] = {
@@ -2429,6 +2430,13 @@ static const struct of_device_id of_sci_match[] = {
 			.regtype = SCIx_SH4_SCIF_REGTYPE,
 		},
 	}, {
+		.compatible = "renesas,scif-r8a7779",
+		.data = (void *)&(const struct sci_port_info) {
+			.type = PORT_SCIF,
+			.regtype = SCIx_SH4_SCIF_REGTYPE,
+			.scscr_extra = SCSCR_CKE1,
+		},
+	}, {
 		.compatible = "renesas,scifa",
 		.data = &(const struct sci_port_info) {
 			.type = PORT_SCIFA,
@@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id)
 	p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
 	p->type = info->type;
 	p->regtype = info->regtype;
-	p->scscr = SCSCR_RE | SCSCR_TE;
+	p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
 
 	return p;
 }
-- 
1.8.5.2


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-24  6:54 ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-24  6:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial, Laurent Pinchart
  Cc: Magnus Damm, linux-sh, linux-arm-kernel, devicetree, Simon Horman

According to the platform data for the legacy-C initialisation of sh-sci
for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
scscr needs to be set.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

With the approach taken by this patch sh-sci may be initialised using the
"renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
compat string.  An alternate approach would be to add a binding to allow
setting of this bit to be controlled directly from DT.
---
 .../devicetree/bindings/serial/renesas,sci-serial.txt          |  1 +
 drivers/tty/serial/sh-sci.c                                    | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 53e6c17..bba86de 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -12,6 +12,7 @@ Required properties:
     - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
     - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
     - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
+    - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
     - "renesas,scif" for generic SCIF compatible UART.
     - "renesas,scifa" for generic SCIFA compatible UART.
     - "renesas,scifb" for generic SCIFB compatible UART.
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 88236da..3b5d2f6 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev)
 struct sci_port_info {
 	unsigned int type;
 	unsigned int regtype;
+	unsigned int scscr_extra;
 };
 
 static const struct of_device_id of_sci_match[] = {
@@ -2429,6 +2430,13 @@ static const struct of_device_id of_sci_match[] = {
 			.regtype = SCIx_SH4_SCIF_REGTYPE,
 		},
 	}, {
+		.compatible = "renesas,scif-r8a7779",
+		.data = (void *)&(const struct sci_port_info) {
+			.type = PORT_SCIF,
+			.regtype = SCIx_SH4_SCIF_REGTYPE,
+			.scscr_extra = SCSCR_CKE1,
+		},
+	}, {
 		.compatible = "renesas,scifa",
 		.data = &(const struct sci_port_info) {
 			.type = PORT_SCIFA,
@@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id)
 	p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
 	p->type = info->type;
 	p->regtype = info->regtype;
-	p->scscr = SCSCR_RE | SCSCR_TE;
+	p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
 
 	return p;
 }
-- 
1.8.5.2


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-24  6:54 ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-24  6:54 UTC (permalink / raw)
  To: linux-arm-kernel

According to the platform data for the legacy-C initialisation of sh-sci
for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
scscr needs to be set.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

With the approach taken by this patch sh-sci may be initialised using the
"renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
compat string.  An alternate approach would be to add a binding to allow
setting of this bit to be controlled directly from DT.
---
 .../devicetree/bindings/serial/renesas,sci-serial.txt          |  1 +
 drivers/tty/serial/sh-sci.c                                    | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 53e6c17..bba86de 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -12,6 +12,7 @@ Required properties:
     - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
     - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
     - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
+    - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
     - "renesas,scif" for generic SCIF compatible UART.
     - "renesas,scifa" for generic SCIFA compatible UART.
     - "renesas,scifb" for generic SCIFB compatible UART.
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 88236da..3b5d2f6 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev)
 struct sci_port_info {
 	unsigned int type;
 	unsigned int regtype;
+	unsigned int scscr_extra;
 };
 
 static const struct of_device_id of_sci_match[] = {
@@ -2429,6 +2430,13 @@ static const struct of_device_id of_sci_match[] = {
 			.regtype = SCIx_SH4_SCIF_REGTYPE,
 		},
 	}, {
+		.compatible = "renesas,scif-r8a7779",
+		.data = (void *)&(const struct sci_port_info) {
+			.type = PORT_SCIF,
+			.regtype = SCIx_SH4_SCIF_REGTYPE,
+			.scscr_extra = SCSCR_CKE1,
+		},
+	}, {
 		.compatible = "renesas,scifa",
 		.data = &(const struct sci_port_info) {
 			.type = PORT_SCIFA,
@@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id)
 	p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
 	p->type = info->type;
 	p->regtype = info->regtype;
-	p->scscr = SCSCR_RE | SCSCR_TE;
+	p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
 
 	return p;
 }
-- 
1.8.5.2

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-24  6:54 ` Simon Horman
  (?)
@ 2014-04-24 23:33   ` Laurent Pinchart
  -1 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-24 23:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

Thank you for the patch.

On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> According to the platform data for the legacy-C initialisation of sh-sci
> for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> scscr needs to be set.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> ---
> 
> With the approach taken by this patch sh-sci may be initialised using the
> "renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
> compat string.  An alternate approach would be to add a binding to allow
> setting of this bit to be controlled directly from DT.

Handling the SCSCR bits properly with DT has been on my to-do list for some 
time. Thank you for volunteering to implement that :-D

The CKE bits control both the behaviour of the SCK pin and the SCIF input 
clock selection. The SCIF can use various internal and external clocks, with 
up to two baud rate generators (programmable dividers) chained. Whether the 
SoC is provided with an external clock for its serial ports is a board 
property, not an SoC property. I would thus like to implement support for this 
feature properly and avoid hardcoding the CKE bits like done below.

The Marzen board has an external clock generator connected to the SCIF_SCK pin 
that can be used as a clock source, but I don't really see a reason why we 
couldn't use the internal P clock instead. I don't want to delay integration 
of SCIF DT support until we have a proper solution to handle clock 
configuration, but couldn't we use the internal P clock on the Marzen board in 
the meantime ?

> ---
>  .../devicetree/bindings/serial/renesas,sci-serial.txt      |  1 +
>  drivers/tty/serial/sh-sci.c                                | 10  +++++++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index
> 53e6c17..bba86de 100644
> --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> @@ -12,6 +12,7 @@ Required properties:
>      - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
> - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. -
> "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. +   
> - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. -
> "renesas,scif" for generic SCIF compatible UART.
>      - "renesas,scifa" for generic SCIFA compatible UART.
>      - "renesas,scifb" for generic SCIFB compatible UART.
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> index 88236da..3b5d2f6 100644
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev)
>  struct sci_port_info {
>  	unsigned int type;
>  	unsigned int regtype;
> +	unsigned int scscr_extra;
>  };
> 
>  static const struct of_device_id of_sci_match[] = {
> @@ -2429,6 +2430,13 @@ static const struct of_device_id of_sci_match[] = {
>  			.regtype = SCIx_SH4_SCIF_REGTYPE,
>  		},
>  	}, {
> +		.compatible = "renesas,scif-r8a7779",
> +		.data = (void *)&(const struct sci_port_info) {
> +			.type = PORT_SCIF,
> +			.regtype = SCIx_SH4_SCIF_REGTYPE,
> +			.scscr_extra = SCSCR_CKE1,
> +		},
> +	}, {
>  		.compatible = "renesas,scifa",
>  		.data = &(const struct sci_port_info) {
>  			.type = PORT_SCIFA,
> @@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned
> int *dev_id) p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
>  	p->type = info->type;
>  	p->regtype = info->regtype;
> -	p->scscr = SCSCR_RE | SCSCR_TE;
> +	p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
> 
>  	return p;
>  }

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-24 23:33   ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-24 23:33 UTC (permalink / raw)
  To: Simon Horman
  Cc: Greg Kroah-Hartman, linux-serial, Laurent Pinchart, Magnus Damm,
	linux-sh, linux-arm-kernel, devicetree

Hi Simon,

Thank you for the patch.

On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> According to the platform data for the legacy-C initialisation of sh-sci
> for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> scscr needs to be set.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> ---
> 
> With the approach taken by this patch sh-sci may be initialised using the
> "renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
> compat string.  An alternate approach would be to add a binding to allow
> setting of this bit to be controlled directly from DT.

Handling the SCSCR bits properly with DT has been on my to-do list for some 
time. Thank you for volunteering to implement that :-D

The CKE bits control both the behaviour of the SCK pin and the SCIF input 
clock selection. The SCIF can use various internal and external clocks, with 
up to two baud rate generators (programmable dividers) chained. Whether the 
SoC is provided with an external clock for its serial ports is a board 
property, not an SoC property. I would thus like to implement support for this 
feature properly and avoid hardcoding the CKE bits like done below.

The Marzen board has an external clock generator connected to the SCIF_SCK pin 
that can be used as a clock source, but I don't really see a reason why we 
couldn't use the internal P clock instead. I don't want to delay integration 
of SCIF DT support until we have a proper solution to handle clock 
configuration, but couldn't we use the internal P clock on the Marzen board in 
the meantime ?

> ---
>  .../devicetree/bindings/serial/renesas,sci-serial.txt      |  1 +
>  drivers/tty/serial/sh-sci.c                                | 10  +++++++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index
> 53e6c17..bba86de 100644
> --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> @@ -12,6 +12,7 @@ Required properties:
>      - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
> - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. -
> "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. +   
> - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. -
> "renesas,scif" for generic SCIF compatible UART.
>      - "renesas,scifa" for generic SCIFA compatible UART.
>      - "renesas,scifb" for generic SCIFB compatible UART.
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> index 88236da..3b5d2f6 100644
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev)
>  struct sci_port_info {
>  	unsigned int type;
>  	unsigned int regtype;
> +	unsigned int scscr_extra;
>  };
> 
>  static const struct of_device_id of_sci_match[] = {
> @@ -2429,6 +2430,13 @@ static const struct of_device_id of_sci_match[] = {
>  			.regtype = SCIx_SH4_SCIF_REGTYPE,
>  		},
>  	}, {
> +		.compatible = "renesas,scif-r8a7779",
> +		.data = (void *)&(const struct sci_port_info) {
> +			.type = PORT_SCIF,
> +			.regtype = SCIx_SH4_SCIF_REGTYPE,
> +			.scscr_extra = SCSCR_CKE1,
> +		},
> +	}, {
>  		.compatible = "renesas,scifa",
>  		.data = &(const struct sci_port_info) {
>  			.type = PORT_SCIFA,
> @@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned
> int *dev_id) p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
>  	p->type = info->type;
>  	p->regtype = info->regtype;
> -	p->scscr = SCSCR_RE | SCSCR_TE;
> +	p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
> 
>  	return p;
>  }

-- 
Regards,

Laurent Pinchart


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-24 23:33   ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-24 23:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

Thank you for the patch.

On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> According to the platform data for the legacy-C initialisation of sh-sci
> for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> scscr needs to be set.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> ---
> 
> With the approach taken by this patch sh-sci may be initialised using the
> "renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
> compat string.  An alternate approach would be to add a binding to allow
> setting of this bit to be controlled directly from DT.

Handling the SCSCR bits properly with DT has been on my to-do list for some 
time. Thank you for volunteering to implement that :-D

The CKE bits control both the behaviour of the SCK pin and the SCIF input 
clock selection. The SCIF can use various internal and external clocks, with 
up to two baud rate generators (programmable dividers) chained. Whether the 
SoC is provided with an external clock for its serial ports is a board 
property, not an SoC property. I would thus like to implement support for this 
feature properly and avoid hardcoding the CKE bits like done below.

The Marzen board has an external clock generator connected to the SCIF_SCK pin 
that can be used as a clock source, but I don't really see a reason why we 
couldn't use the internal P clock instead. I don't want to delay integration 
of SCIF DT support until we have a proper solution to handle clock 
configuration, but couldn't we use the internal P clock on the Marzen board in 
the meantime ?

> ---
>  .../devicetree/bindings/serial/renesas,sci-serial.txt      |  1 +
>  drivers/tty/serial/sh-sci.c                                | 10  +++++++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index
> 53e6c17..bba86de 100644
> --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> @@ -12,6 +12,7 @@ Required properties:
>      - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
> - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. -
> "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. +   
> - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. -
> "renesas,scif" for generic SCIF compatible UART.
>      - "renesas,scifa" for generic SCIFA compatible UART.
>      - "renesas,scifb" for generic SCIFB compatible UART.
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> index 88236da..3b5d2f6 100644
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev)
>  struct sci_port_info {
>  	unsigned int type;
>  	unsigned int regtype;
> +	unsigned int scscr_extra;
>  };
> 
>  static const struct of_device_id of_sci_match[] = {
> @@ -2429,6 +2430,13 @@ static const struct of_device_id of_sci_match[] = {
>  			.regtype = SCIx_SH4_SCIF_REGTYPE,
>  		},
>  	}, {
> +		.compatible = "renesas,scif-r8a7779",
> +		.data = (void *)&(const struct sci_port_info) {
> +			.type = PORT_SCIF,
> +			.regtype = SCIx_SH4_SCIF_REGTYPE,
> +			.scscr_extra = SCSCR_CKE1,
> +		},
> +	}, {
>  		.compatible = "renesas,scifa",
>  		.data = &(const struct sci_port_info) {
>  			.type = PORT_SCIFA,
> @@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned
> int *dev_id) p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
>  	p->type = info->type;
>  	p->regtype = info->regtype;
> -	p->scscr = SCSCR_RE | SCSCR_TE;
> +	p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
> 
>  	return p;
>  }

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-24 23:33   ` Laurent Pinchart
  (?)
@ 2014-04-25  0:26     ` Simon Horman
  -1 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-25  0:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 25, 2014 at 01:33:29AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> Thank you for the patch.
> 
> On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> > According to the platform data for the legacy-C initialisation of sh-sci
> > for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> > scscr needs to be set.
> > 
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > 
> > ---
> > 
> > With the approach taken by this patch sh-sci may be initialised using the
> > "renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
> > compat string.  An alternate approach would be to add a binding to allow
> > setting of this bit to be controlled directly from DT.
> 
> Handling the SCSCR bits properly with DT has been on my to-do list for some 
> time. Thank you for volunteering to implement that :-D
> 
> The CKE bits control both the behaviour of the SCK pin and the SCIF input 
> clock selection. The SCIF can use various internal and external clocks, with 
> up to two baud rate generators (programmable dividers) chained. Whether the 
> SoC is provided with an external clock for its serial ports is a board 
> property, not an SoC property. I would thus like to implement support for this 
> feature properly and avoid hardcoding the CKE bits like done below.
> 
> The Marzen board has an external clock generator connected to the SCIF_SCK pin 
> that can be used as a clock source, but I don't really see a reason why we 
> couldn't use the internal P clock instead. I don't want to delay integration 
> of SCIF DT support until we have a proper solution to handle clock 
> configuration, but couldn't we use the internal P clock on the Marzen board in 
> the meantime ?

I think that approach sounds reasonable and I seem to have it working
without any driver changes. Could you confirm that the following
DT snippet is what you have in mind? (I intend to update it as per any
relevant changes you make when reposting your DT sci patch for the
r8a7791.)


diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index e924f96..3e9cca4 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -203,6 +203,66 @@
 		status = "disabled";
 	};
 
+	scif0: serial@ffe40000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe40000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif1: serial@ffe41000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe41000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif2: serial@ffe42000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe42000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif3: serial@ffe43000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe43000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif4: serial@ffe44000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe44000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif5: serial@ffe45000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe45000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
 	pfc: pfc@fffc0000 {
 		compatible = "renesas,pfc-r8a7779";
 		reg = <0xfffc0000 0x23c>;



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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-25  0:26     ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-25  0:26 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Greg Kroah-Hartman, linux-serial, Laurent Pinchart, Magnus Damm,
	linux-sh, linux-arm-kernel, devicetree

On Fri, Apr 25, 2014 at 01:33:29AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> Thank you for the patch.
> 
> On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> > According to the platform data for the legacy-C initialisation of sh-sci
> > for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> > scscr needs to be set.
> > 
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > 
> > ---
> > 
> > With the approach taken by this patch sh-sci may be initialised using the
> > "renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
> > compat string.  An alternate approach would be to add a binding to allow
> > setting of this bit to be controlled directly from DT.
> 
> Handling the SCSCR bits properly with DT has been on my to-do list for some 
> time. Thank you for volunteering to implement that :-D
> 
> The CKE bits control both the behaviour of the SCK pin and the SCIF input 
> clock selection. The SCIF can use various internal and external clocks, with 
> up to two baud rate generators (programmable dividers) chained. Whether the 
> SoC is provided with an external clock for its serial ports is a board 
> property, not an SoC property. I would thus like to implement support for this 
> feature properly and avoid hardcoding the CKE bits like done below.
> 
> The Marzen board has an external clock generator connected to the SCIF_SCK pin 
> that can be used as a clock source, but I don't really see a reason why we 
> couldn't use the internal P clock instead. I don't want to delay integration 
> of SCIF DT support until we have a proper solution to handle clock 
> configuration, but couldn't we use the internal P clock on the Marzen board in 
> the meantime ?

I think that approach sounds reasonable and I seem to have it working
without any driver changes. Could you confirm that the following
DT snippet is what you have in mind? (I intend to update it as per any
relevant changes you make when reposting your DT sci patch for the
r8a7791.)


diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index e924f96..3e9cca4 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -203,6 +203,66 @@
 		status = "disabled";
 	};
 
+	scif0: serial@ffe40000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe40000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif1: serial@ffe41000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe41000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif2: serial@ffe42000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe42000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif3: serial@ffe43000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe43000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif4: serial@ffe44000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe44000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif5: serial@ffe45000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe45000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
 	pfc: pfc@fffc0000 {
 		compatible = "renesas,pfc-r8a7779";
 		reg = <0xfffc0000 0x23c>;



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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-25  0:26     ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-25  0:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 25, 2014 at 01:33:29AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> Thank you for the patch.
> 
> On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> > According to the platform data for the legacy-C initialisation of sh-sci
> > for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> > scscr needs to be set.
> > 
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > 
> > ---
> > 
> > With the approach taken by this patch sh-sci may be initialised using the
> > "renesas,scif-r8a7779" compat string but not the generic "renesas,scif"
> > compat string.  An alternate approach would be to add a binding to allow
> > setting of this bit to be controlled directly from DT.
> 
> Handling the SCSCR bits properly with DT has been on my to-do list for some 
> time. Thank you for volunteering to implement that :-D
> 
> The CKE bits control both the behaviour of the SCK pin and the SCIF input 
> clock selection. The SCIF can use various internal and external clocks, with 
> up to two baud rate generators (programmable dividers) chained. Whether the 
> SoC is provided with an external clock for its serial ports is a board 
> property, not an SoC property. I would thus like to implement support for this 
> feature properly and avoid hardcoding the CKE bits like done below.
> 
> The Marzen board has an external clock generator connected to the SCIF_SCK pin 
> that can be used as a clock source, but I don't really see a reason why we 
> couldn't use the internal P clock instead. I don't want to delay integration 
> of SCIF DT support until we have a proper solution to handle clock 
> configuration, but couldn't we use the internal P clock on the Marzen board in 
> the meantime ?

I think that approach sounds reasonable and I seem to have it working
without any driver changes. Could you confirm that the following
DT snippet is what you have in mind? (I intend to update it as per any
relevant changes you make when reposting your DT sci patch for the
r8a7791.)


diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index e924f96..3e9cca4 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -203,6 +203,66 @@
 		status = "disabled";
 	};
 
+	scif0: serial at ffe40000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe40000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif1: serial at ffe41000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe41000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif2: serial at ffe42000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe42000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif3: serial at ffe43000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe43000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif4: serial at ffe44000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe44000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
+	scif5: serial at ffe45000 {
+		compatible = "renesas,scif", "renesas,scif-r8a7779";
+		reg = <0xffe45000 265>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cpg_clocks R8A7779_CLK_P>;
+		clock-names = "sci_ick";
+		status = "disabled";
+	};
+
 	pfc: pfc at fffc0000 {
 		compatible = "renesas,pfc-r8a7779";
 		reg = <0xfffc0000 0x23c>;

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-25  0:26     ` Simon Horman
  (?)
@ 2014-04-25  7:05       ` Laurent Pinchart
  -1 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-25  7:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Friday 25 April 2014 09:26:42 Simon Horman wrote:
> On Fri, Apr 25, 2014 at 01:33:29AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> > 
> > Thank you for the patch.
> > 
> > On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> > > According to the platform data for the legacy-C initialisation of sh-sci
> > > for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> > > scscr needs to be set.
> > > 
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > 
> > > ---
> > > 
> > > With the approach taken by this patch sh-sci may be initialised using
> > > the "renesas,scif-r8a7779" compat string but not the generic
> > > "renesas,scif" compat string.  An alternate approach would be to add a
> > > binding to allow setting of this bit to be controlled directly from DT.
> > 
> > Handling the SCSCR bits properly with DT has been on my to-do list for
> > some time. Thank you for volunteering to implement that :-D
> > 
> > The CKE bits control both the behaviour of the SCK pin and the SCIF input
> > clock selection. The SCIF can use various internal and external clocks,
> > with up to two baud rate generators (programmable dividers) chained.
> > Whether the SoC is provided with an external clock for its serial ports
> > is a board property, not an SoC property. I would thus like to implement
> > support for this feature properly and avoid hardcoding the CKE bits like
> > done below.
> > 
> > The Marzen board has an external clock generator connected to the SCIF_SCK
> > pin that can be used as a clock source, but I don't really see a reason
> > why we couldn't use the internal P clock instead. I don't want to delay
> > integration of SCIF DT support until we have a proper solution to handle
> > clock configuration, but couldn't we use the internal P clock on the
> > Marzen board in the meantime ?
> 
> I think that approach sounds reasonable and I seem to have it working
> without any driver changes. Could you confirm that the following
> DT snippet is what you have in mind? (I intend to update it as per any
> relevant changes you make when reposting your DT sci patch for the
> r8a7791.)

That's what I have in mind, but please see below for a small comment.

> diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
> index e924f96..3e9cca4 100644
> --- a/arch/arm/boot/dts/r8a7779.dtsi
> +++ b/arch/arm/boot/dts/r8a7779.dtsi
> @@ -203,6 +203,66 @@
>  		status = "disabled";
>  	};
> 
> +	scif0: serial@ffe40000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe40000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";

Clock handling in the sh-sci driver should probably be improved. The driver 
currently requires an "sci_ick" interface clock and supports an optional 
"sci_fck" functional clock. In practice, as far as I can see, platforms that 
provide both sci_ick and sci_fck set the two clocks to the same source. 
Furthermore, some SCI* instances support a second internal clock source for 
the baud rate generator. We don't support that at the moment.

This leads me to believe that we should merge the "sci_ick" and "sci_fck" 
clocks for the DT case into a single clock that I would call "fck" (no need 
for a "sci_" prefix), and later add support for the second baud rate clock. 
This would require a small driver change. I can try to submit patches in the 
next couple of days if you agree with the approach.

> +		status = "disabled";
> +	};
> +
> +	scif1: serial@ffe41000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe41000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif2: serial@ffe42000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe42000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif3: serial@ffe43000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe43000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif4: serial@ffe44000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe44000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif5: serial@ffe45000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe45000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
>  	pfc: pfc@fffc0000 {
>  		compatible = "renesas,pfc-r8a7779";
>  		reg = <0xfffc0000 0x23c>;

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-25  7:05       ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-25  7:05 UTC (permalink / raw)
  To: Simon Horman
  Cc: Greg Kroah-Hartman, linux-serial, Laurent Pinchart, Magnus Damm,
	linux-sh, linux-arm-kernel, devicetree

Hi Simon,

On Friday 25 April 2014 09:26:42 Simon Horman wrote:
> On Fri, Apr 25, 2014 at 01:33:29AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> > 
> > Thank you for the patch.
> > 
> > On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> > > According to the platform data for the legacy-C initialisation of sh-sci
> > > for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> > > scscr needs to be set.
> > > 
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > 
> > > ---
> > > 
> > > With the approach taken by this patch sh-sci may be initialised using
> > > the "renesas,scif-r8a7779" compat string but not the generic
> > > "renesas,scif" compat string.  An alternate approach would be to add a
> > > binding to allow setting of this bit to be controlled directly from DT.
> > 
> > Handling the SCSCR bits properly with DT has been on my to-do list for
> > some time. Thank you for volunteering to implement that :-D
> > 
> > The CKE bits control both the behaviour of the SCK pin and the SCIF input
> > clock selection. The SCIF can use various internal and external clocks,
> > with up to two baud rate generators (programmable dividers) chained.
> > Whether the SoC is provided with an external clock for its serial ports
> > is a board property, not an SoC property. I would thus like to implement
> > support for this feature properly and avoid hardcoding the CKE bits like
> > done below.
> > 
> > The Marzen board has an external clock generator connected to the SCIF_SCK
> > pin that can be used as a clock source, but I don't really see a reason
> > why we couldn't use the internal P clock instead. I don't want to delay
> > integration of SCIF DT support until we have a proper solution to handle
> > clock configuration, but couldn't we use the internal P clock on the
> > Marzen board in the meantime ?
> 
> I think that approach sounds reasonable and I seem to have it working
> without any driver changes. Could you confirm that the following
> DT snippet is what you have in mind? (I intend to update it as per any
> relevant changes you make when reposting your DT sci patch for the
> r8a7791.)

That's what I have in mind, but please see below for a small comment.

> diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
> index e924f96..3e9cca4 100644
> --- a/arch/arm/boot/dts/r8a7779.dtsi
> +++ b/arch/arm/boot/dts/r8a7779.dtsi
> @@ -203,6 +203,66 @@
>  		status = "disabled";
>  	};
> 
> +	scif0: serial@ffe40000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe40000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";

Clock handling in the sh-sci driver should probably be improved. The driver 
currently requires an "sci_ick" interface clock and supports an optional 
"sci_fck" functional clock. In practice, as far as I can see, platforms that 
provide both sci_ick and sci_fck set the two clocks to the same source. 
Furthermore, some SCI* instances support a second internal clock source for 
the baud rate generator. We don't support that at the moment.

This leads me to believe that we should merge the "sci_ick" and "sci_fck" 
clocks for the DT case into a single clock that I would call "fck" (no need 
for a "sci_" prefix), and later add support for the second baud rate clock. 
This would require a small driver change. I can try to submit patches in the 
next couple of days if you agree with the approach.

> +		status = "disabled";
> +	};
> +
> +	scif1: serial@ffe41000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe41000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif2: serial@ffe42000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe42000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif3: serial@ffe43000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe43000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif4: serial@ffe44000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe44000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif5: serial@ffe45000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe45000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
>  	pfc: pfc@fffc0000 {
>  		compatible = "renesas,pfc-r8a7779";
>  		reg = <0xfffc0000 0x23c>;

-- 
Regards,

Laurent Pinchart


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-25  7:05       ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-25  7:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Friday 25 April 2014 09:26:42 Simon Horman wrote:
> On Fri, Apr 25, 2014 at 01:33:29AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> > 
> > Thank you for the patch.
> > 
> > On Thursday 24 April 2014 15:54:44 Simon Horman wrote:
> > > According to the platform data for the legacy-C initialisation of sh-sci
> > > for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
> > > scscr needs to be set.
> > > 
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > 
> > > ---
> > > 
> > > With the approach taken by this patch sh-sci may be initialised using
> > > the "renesas,scif-r8a7779" compat string but not the generic
> > > "renesas,scif" compat string.  An alternate approach would be to add a
> > > binding to allow setting of this bit to be controlled directly from DT.
> > 
> > Handling the SCSCR bits properly with DT has been on my to-do list for
> > some time. Thank you for volunteering to implement that :-D
> > 
> > The CKE bits control both the behaviour of the SCK pin and the SCIF input
> > clock selection. The SCIF can use various internal and external clocks,
> > with up to two baud rate generators (programmable dividers) chained.
> > Whether the SoC is provided with an external clock for its serial ports
> > is a board property, not an SoC property. I would thus like to implement
> > support for this feature properly and avoid hardcoding the CKE bits like
> > done below.
> > 
> > The Marzen board has an external clock generator connected to the SCIF_SCK
> > pin that can be used as a clock source, but I don't really see a reason
> > why we couldn't use the internal P clock instead. I don't want to delay
> > integration of SCIF DT support until we have a proper solution to handle
> > clock configuration, but couldn't we use the internal P clock on the
> > Marzen board in the meantime ?
> 
> I think that approach sounds reasonable and I seem to have it working
> without any driver changes. Could you confirm that the following
> DT snippet is what you have in mind? (I intend to update it as per any
> relevant changes you make when reposting your DT sci patch for the
> r8a7791.)

That's what I have in mind, but please see below for a small comment.

> diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
> index e924f96..3e9cca4 100644
> --- a/arch/arm/boot/dts/r8a7779.dtsi
> +++ b/arch/arm/boot/dts/r8a7779.dtsi
> @@ -203,6 +203,66 @@
>  		status = "disabled";
>  	};
> 
> +	scif0: serial at ffe40000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe40000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";

Clock handling in the sh-sci driver should probably be improved. The driver 
currently requires an "sci_ick" interface clock and supports an optional 
"sci_fck" functional clock. In practice, as far as I can see, platforms that 
provide both sci_ick and sci_fck set the two clocks to the same source. 
Furthermore, some SCI* instances support a second internal clock source for 
the baud rate generator. We don't support that at the moment.

This leads me to believe that we should merge the "sci_ick" and "sci_fck" 
clocks for the DT case into a single clock that I would call "fck" (no need 
for a "sci_" prefix), and later add support for the second baud rate clock. 
This would require a small driver change. I can try to submit patches in the 
next couple of days if you agree with the approach.

> +		status = "disabled";
> +	};
> +
> +	scif1: serial at ffe41000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe41000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif2: serial at ffe42000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe42000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif3: serial at ffe43000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe43000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif4: serial at ffe44000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe44000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
> +	scif5: serial at ffe45000 {
> +		compatible = "renesas,scif", "renesas,scif-r8a7779";
> +		reg = <0xffe45000 265>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cpg_clocks R8A7779_CLK_P>;
> +		clock-names = "sci_ick";
> +		status = "disabled";
> +	};
> +
>  	pfc: pfc at fffc0000 {
>  		compatible = "renesas,pfc-r8a7779";
>  		reg = <0xfffc0000 0x23c>;

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-25  7:05       ` Laurent Pinchart
  (?)
@ 2014-04-25  7:11         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2014-04-25  7:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> +     scif0: serial@ffe40000 {
>> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
>> +             reg = <0xffe40000 265>;
>> +             interrupt-parent = <&gic>;
>> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
>> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
>> +             clock-names = "sci_ick";
>
> Clock handling in the sh-sci driver should probably be improved. The driver
> currently requires an "sci_ick" interface clock and supports an optional
> "sci_fck" functional clock. In practice, as far as I can see, platforms that
> provide both sci_ick and sci_fck set the two clocks to the same source.

That's right. As a consequence, the clock's enable count is incremented
3 times:
  - once for fck,
  - once for ick,
  - once for generic Runtime PM using the "NULL" clock.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-25  7:11         ` Geert Uytterhoeven
  0 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2014-04-25  7:11 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Simon Horman, Greg Kroah-Hartman, linux-serial, Laurent Pinchart,
	Magnus Damm, Linux-sh list, linux-arm-kernel, devicetree

On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> +     scif0: serial@ffe40000 {
>> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
>> +             reg = <0xffe40000 265>;
>> +             interrupt-parent = <&gic>;
>> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
>> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
>> +             clock-names = "sci_ick";
>
> Clock handling in the sh-sci driver should probably be improved. The driver
> currently requires an "sci_ick" interface clock and supports an optional
> "sci_fck" functional clock. In practice, as far as I can see, platforms that
> provide both sci_ick and sci_fck set the two clocks to the same source.

That's right. As a consequence, the clock's enable count is incremented
3 times:
  - once for fck,
  - once for ick,
  - once for generic Runtime PM using the "NULL" clock.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-25  7:11         ` Geert Uytterhoeven
  0 siblings, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2014-04-25  7:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> +     scif0: serial at ffe40000 {
>> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
>> +             reg = <0xffe40000 265>;
>> +             interrupt-parent = <&gic>;
>> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
>> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
>> +             clock-names = "sci_ick";
>
> Clock handling in the sh-sci driver should probably be improved. The driver
> currently requires an "sci_ick" interface clock and supports an optional
> "sci_fck" functional clock. In practice, as far as I can see, platforms that
> provide both sci_ick and sci_fck set the two clocks to the same source.

That's right. As a consequence, the clock's enable count is incremented
3 times:
  - once for fck,
  - once for ick,
  - once for generic Runtime PM using the "NULL" clock.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-25  7:11         ` Geert Uytterhoeven
  (?)
@ 2014-04-28  0:03           ` Simon Horman
  -1 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  0:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >> +     scif0: serial@ffe40000 {
> >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> >> +             reg = <0xffe40000 265>;
> >> +             interrupt-parent = <&gic>;
> >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> >> +             clock-names = "sci_ick";
> >
> > Clock handling in the sh-sci driver should probably be improved. The driver
> > currently requires an "sci_ick" interface clock and supports an optional
> > "sci_fck" functional clock. In practice, as far as I can see, platforms that
> > provide both sci_ick and sci_fck set the two clocks to the same source.
> 
> That's right. As a consequence, the clock's enable count is incremented
> 3 times:
>   - once for fck,
>   - once for ick,
>   - once for generic Runtime PM using the "NULL" clock.

This approach is fine by me.
But I think you need to maintain compatibility with the old
binding ("sci_ick" required, "sci_fsk") as it seems that
was included in v3.14.

> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> 

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-28  0:03           ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  0:03 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Laurent Pinchart, Greg Kroah-Hartman, linux-serial,
	Laurent Pinchart, Magnus Damm, Linux-sh list, linux-arm-kernel,
	devicetree

On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >> +     scif0: serial@ffe40000 {
> >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> >> +             reg = <0xffe40000 265>;
> >> +             interrupt-parent = <&gic>;
> >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> >> +             clock-names = "sci_ick";
> >
> > Clock handling in the sh-sci driver should probably be improved. The driver
> > currently requires an "sci_ick" interface clock and supports an optional
> > "sci_fck" functional clock. In practice, as far as I can see, platforms that
> > provide both sci_ick and sci_fck set the two clocks to the same source.
> 
> That's right. As a consequence, the clock's enable count is incremented
> 3 times:
>   - once for fck,
>   - once for ick,
>   - once for generic Runtime PM using the "NULL" clock.

This approach is fine by me.
But I think you need to maintain compatibility with the old
binding ("sci_ick" required, "sci_fsk") as it seems that
was included in v3.14.

> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> 

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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-28  0:03           ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  0:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >> +     scif0: serial at ffe40000 {
> >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> >> +             reg = <0xffe40000 265>;
> >> +             interrupt-parent = <&gic>;
> >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> >> +             clock-names = "sci_ick";
> >
> > Clock handling in the sh-sci driver should probably be improved. The driver
> > currently requires an "sci_ick" interface clock and supports an optional
> > "sci_fck" functional clock. In practice, as far as I can see, platforms that
> > provide both sci_ick and sci_fck set the two clocks to the same source.
> 
> That's right. As a consequence, the clock's enable count is incremented
> 3 times:
>   - once for fck,
>   - once for ick,
>   - once for generic Runtime PM using the "NULL" clock.

This approach is fine by me.
But I think you need to maintain compatibility with the old
binding ("sci_ick" required, "sci_fsk") as it seems that
was included in v3.14.

> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> 

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-28  0:03           ` Simon Horman
  (?)
@ 2014-04-28  0:08             ` Laurent Pinchart
  -1 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-28  0:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > >> +     scif0: serial@ffe40000 {
> > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > >> +             reg = <0xffe40000 265>;
> > >> +             interrupt-parent = <&gic>;
> > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > >> +             clock-names = "sci_ick";
> > > 
> > > Clock handling in the sh-sci driver should probably be improved. The
> > > driver currently requires an "sci_ick" interface clock and supports an
> > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > the same source.
>
> > That's right. As a consequence, the clock's enable count is incremented
> > 
> > 3 times:
> >   - once for fck,
> >   - once for ick,
> >   - once for generic Runtime PM using the "NULL" clock.
> 
> This approach is fine by me.
> But I think you need to maintain compatibility with the old
> binding ("sci_ick" required, "sci_fsk") as it seems that
> was included in v3.14.

sci_fck isn't part of the DT bindings, so we can at least drop that one.

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-28  0:08             ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-28  0:08 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, Greg Kroah-Hartman, linux-serial,
	Laurent Pinchart, Magnus Damm, Linux-sh list, linux-arm-kernel,
	devicetree

Hi Simon,

On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > >> +     scif0: serial@ffe40000 {
> > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > >> +             reg = <0xffe40000 265>;
> > >> +             interrupt-parent = <&gic>;
> > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > >> +             clock-names = "sci_ick";
> > > 
> > > Clock handling in the sh-sci driver should probably be improved. The
> > > driver currently requires an "sci_ick" interface clock and supports an
> > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > the same source.
>
> > That's right. As a consequence, the clock's enable count is incremented
> > 
> > 3 times:
> >   - once for fck,
> >   - once for ick,
> >   - once for generic Runtime PM using the "NULL" clock.
> 
> This approach is fine by me.
> But I think you need to maintain compatibility with the old
> binding ("sci_ick" required, "sci_fsk") as it seems that
> was included in v3.14.

sci_fck isn't part of the DT bindings, so we can at least drop that one.

-- 
Regards,

Laurent Pinchart


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-28  0:08             ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-28  0:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > >> +     scif0: serial at ffe40000 {
> > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > >> +             reg = <0xffe40000 265>;
> > >> +             interrupt-parent = <&gic>;
> > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > >> +             clock-names = "sci_ick";
> > > 
> > > Clock handling in the sh-sci driver should probably be improved. The
> > > driver currently requires an "sci_ick" interface clock and supports an
> > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > the same source.
>
> > That's right. As a consequence, the clock's enable count is incremented
> > 
> > 3 times:
> >   - once for fck,
> >   - once for ick,
> >   - once for generic Runtime PM using the "NULL" clock.
> 
> This approach is fine by me.
> But I think you need to maintain compatibility with the old
> binding ("sci_ick" required, "sci_fsk") as it seems that
> was included in v3.14.

sci_fck isn't part of the DT bindings, so we can at least drop that one.

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-28  0:08             ` Laurent Pinchart
  (?)
@ 2014-04-28  1:13               ` Simon Horman
  -1 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  1:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > >> +     scif0: serial@ffe40000 {
> > > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > > >> +             reg = <0xffe40000 265>;
> > > >> +             interrupt-parent = <&gic>;
> > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > >> +             clock-names = "sci_ick";
> > > > 
> > > > Clock handling in the sh-sci driver should probably be improved. The
> > > > driver currently requires an "sci_ick" interface clock and supports an
> > > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > > the same source.
> >
> > > That's right. As a consequence, the clock's enable count is incremented
> > > 
> > > 3 times:
> > >   - once for fck,
> > >   - once for ick,
> > >   - once for generic Runtime PM using the "NULL" clock.
> > 
> > This approach is fine by me.
> > But I think you need to maintain compatibility with the old
> > binding ("sci_ick" required, "sci_fsk") as it seems that
> > was included in v3.14.
> 
> sci_fck isn't part of the DT bindings, so we can at least drop that one.

So long as its not used anywhere in-tree, which I believe is the case,
then that is fine by me.

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-28  1:13               ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  1:13 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Geert Uytterhoeven, Greg Kroah-Hartman, linux-serial,
	Laurent Pinchart, Magnus Damm, Linux-sh list, linux-arm-kernel,
	devicetree

On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > >> +     scif0: serial@ffe40000 {
> > > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > > >> +             reg = <0xffe40000 265>;
> > > >> +             interrupt-parent = <&gic>;
> > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > >> +             clock-names = "sci_ick";
> > > > 
> > > > Clock handling in the sh-sci driver should probably be improved. The
> > > > driver currently requires an "sci_ick" interface clock and supports an
> > > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > > the same source.
> >
> > > That's right. As a consequence, the clock's enable count is incremented
> > > 
> > > 3 times:
> > >   - once for fck,
> > >   - once for ick,
> > >   - once for generic Runtime PM using the "NULL" clock.
> > 
> > This approach is fine by me.
> > But I think you need to maintain compatibility with the old
> > binding ("sci_ick" required, "sci_fsk") as it seems that
> > was included in v3.14.
> 
> sci_fck isn't part of the DT bindings, so we can at least drop that one.

So long as its not used anywhere in-tree, which I believe is the case,
then that is fine by me.

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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-28  1:13               ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  1:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > >> +     scif0: serial at ffe40000 {
> > > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > > >> +             reg = <0xffe40000 265>;
> > > >> +             interrupt-parent = <&gic>;
> > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > >> +             clock-names = "sci_ick";
> > > > 
> > > > Clock handling in the sh-sci driver should probably be improved. The
> > > > driver currently requires an "sci_ick" interface clock and supports an
> > > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > > the same source.
> >
> > > That's right. As a consequence, the clock's enable count is incremented
> > > 
> > > 3 times:
> > >   - once for fck,
> > >   - once for ick,
> > >   - once for generic Runtime PM using the "NULL" clock.
> > 
> > This approach is fine by me.
> > But I think you need to maintain compatibility with the old
> > binding ("sci_ick" required, "sci_fsk") as it seems that
> > was included in v3.14.
> 
> sci_fck isn't part of the DT bindings, so we can at least drop that one.

So long as its not used anywhere in-tree, which I believe is the case,
then that is fine by me.

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-28  1:13               ` Simon Horman
  (?)
@ 2014-04-28  7:07                 ` Simon Horman
  -1 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  7:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> > 
> > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > >> +     scif0: serial@ffe40000 {
> > > > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > > > >> +             reg = <0xffe40000 265>;
> > > > >> +             interrupt-parent = <&gic>;
> > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > >> +             clock-names = "sci_ick";
> > > > > 
> > > > > Clock handling in the sh-sci driver should probably be improved. The
> > > > > driver currently requires an "sci_ick" interface clock and supports an
> > > > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > > > the same source.
> > >
> > > > That's right. As a consequence, the clock's enable count is incremented
> > > > 
> > > > 3 times:
> > > >   - once for fck,
> > > >   - once for ick,
> > > >   - once for generic Runtime PM using the "NULL" clock.
> > > 
> > > This approach is fine by me.
> > > But I think you need to maintain compatibility with the old
> > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > was included in v3.14.
> > 
> > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> 
> So long as its not used anywhere in-tree, which I believe is the case,
> then that is fine by me.

BTW, are you planning to make the above mentioned driver update
before or after re-posting enablement patches for Koelsch and/or Lager?
I ask because I would like to make such patches the basis for
a patch for Marzen.

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-28  7:07                 ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  7:07 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Geert Uytterhoeven, Greg Kroah-Hartman, linux-serial,
	Laurent Pinchart, Magnus Damm, Linux-sh list, linux-arm-kernel,
	devicetree

On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> > 
> > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > >> +     scif0: serial@ffe40000 {
> > > > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > > > >> +             reg = <0xffe40000 265>;
> > > > >> +             interrupt-parent = <&gic>;
> > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > >> +             clock-names = "sci_ick";
> > > > > 
> > > > > Clock handling in the sh-sci driver should probably be improved. The
> > > > > driver currently requires an "sci_ick" interface clock and supports an
> > > > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > > > the same source.
> > >
> > > > That's right. As a consequence, the clock's enable count is incremented
> > > > 
> > > > 3 times:
> > > >   - once for fck,
> > > >   - once for ick,
> > > >   - once for generic Runtime PM using the "NULL" clock.
> > > 
> > > This approach is fine by me.
> > > But I think you need to maintain compatibility with the old
> > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > was included in v3.14.
> > 
> > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> 
> So long as its not used anywhere in-tree, which I believe is the case,
> then that is fine by me.

BTW, are you planning to make the above mentioned driver update
before or after re-posting enablement patches for Koelsch and/or Lager?
I ask because I would like to make such patches the basis for
a patch for Marzen.

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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-28  7:07                 ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-28  7:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> > 
> > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > >> +     scif0: serial at ffe40000 {
> > > > >> +             compatible = "renesas,scif", "renesas,scif-r8a7779";
> > > > >> +             reg = <0xffe40000 265>;
> > > > >> +             interrupt-parent = <&gic>;
> > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > >> +             clock-names = "sci_ick";
> > > > > 
> > > > > Clock handling in the sh-sci driver should probably be improved. The
> > > > > driver currently requires an "sci_ick" interface clock and supports an
> > > > > optional "sci_fck" functional clock. In practice, as far as I can see,
> > > > > platforms that provide both sci_ick and sci_fck set the two clocks to
> > > > > the same source.
> > >
> > > > That's right. As a consequence, the clock's enable count is incremented
> > > > 
> > > > 3 times:
> > > >   - once for fck,
> > > >   - once for ick,
> > > >   - once for generic Runtime PM using the "NULL" clock.
> > > 
> > > This approach is fine by me.
> > > But I think you need to maintain compatibility with the old
> > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > was included in v3.14.
> > 
> > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> 
> So long as its not used anywhere in-tree, which I believe is the case,
> then that is fine by me.

BTW, are you planning to make the above mentioned driver update
before or after re-posting enablement patches for Koelsch and/or Lager?
I ask because I would like to make such patches the basis for
a patch for Marzen.

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-28  7:07                 ` Simon Horman
  (?)
@ 2014-04-29 13:44                   ` Laurent Pinchart
  -1 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-29 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> > On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > > >> +     scif0: serial@ffe40000 {
> > > > > >> +             compatible = "renesas,scif",
> > > > > >> "renesas,scif-r8a7779";
> > > > > >> +             reg = <0xffe40000 265>;
> > > > > >> +             interrupt-parent = <&gic>;
> > > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > > >> +             clock-names = "sci_ick";
> > > > > > 
> > > > > > Clock handling in the sh-sci driver should probably be improved.
> > > > > > The driver currently requires an "sci_ick" interface clock and
> > > > > > supports an optional "sci_fck" functional clock. In practice, as
> > > > > > far as I can see, platforms that provide both sci_ick and sci_fck
> > > > > > set the two clocks to the same source.
> > > > > 
> > > > > That's right. As a consequence, the clock's enable count is
> > > > > incremented
> > > > > 
> > > > > 3 times:
> > > > >   - once for fck,
> > > > >   - once for ick,
> > > > >   - once for generic Runtime PM using the "NULL" clock.
> > > > 
> > > > This approach is fine by me.
> > > > But I think you need to maintain compatibility with the old
> > > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > > was included in v3.14.
> > > 
> > > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> > 
> > So long as its not used anywhere in-tree, which I believe is the case,
> > then that is fine by me.
> 
> BTW, are you planning to make the above mentioned driver update
> before or after re-posting enablement patches for Koelsch and/or Lager?
> I ask because I would like to make such patches the basis for
> a patch for Marzen.

I'll try to do so today, after my talk at the ELC :-)

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-29 13:44                   ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-29 13:44 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, Greg Kroah-Hartman, linux-serial,
	Laurent Pinchart, Magnus Damm, Linux-sh list, linux-arm-kernel,
	devicetree

Hi Simon,

On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> > On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > > >> +     scif0: serial@ffe40000 {
> > > > > >> +             compatible = "renesas,scif",
> > > > > >> "renesas,scif-r8a7779";
> > > > > >> +             reg = <0xffe40000 265>;
> > > > > >> +             interrupt-parent = <&gic>;
> > > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > > >> +             clock-names = "sci_ick";
> > > > > > 
> > > > > > Clock handling in the sh-sci driver should probably be improved.
> > > > > > The driver currently requires an "sci_ick" interface clock and
> > > > > > supports an optional "sci_fck" functional clock. In practice, as
> > > > > > far as I can see, platforms that provide both sci_ick and sci_fck
> > > > > > set the two clocks to the same source.
> > > > > 
> > > > > That's right. As a consequence, the clock's enable count is
> > > > > incremented
> > > > > 
> > > > > 3 times:
> > > > >   - once for fck,
> > > > >   - once for ick,
> > > > >   - once for generic Runtime PM using the "NULL" clock.
> > > > 
> > > > This approach is fine by me.
> > > > But I think you need to maintain compatibility with the old
> > > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > > was included in v3.14.
> > > 
> > > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> > 
> > So long as its not used anywhere in-tree, which I believe is the case,
> > then that is fine by me.
> 
> BTW, are you planning to make the above mentioned driver update
> before or after re-posting enablement patches for Koelsch and/or Lager?
> I ask because I would like to make such patches the basis for
> a patch for Marzen.

I'll try to do so today, after my talk at the ELC :-)

-- 
Regards,

Laurent Pinchart


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-29 13:44                   ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-29 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> > On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > > >> +     scif0: serial at ffe40000 {
> > > > > >> +             compatible = "renesas,scif",
> > > > > >> "renesas,scif-r8a7779";
> > > > > >> +             reg = <0xffe40000 265>;
> > > > > >> +             interrupt-parent = <&gic>;
> > > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > > >> +             clock-names = "sci_ick";
> > > > > > 
> > > > > > Clock handling in the sh-sci driver should probably be improved.
> > > > > > The driver currently requires an "sci_ick" interface clock and
> > > > > > supports an optional "sci_fck" functional clock. In practice, as
> > > > > > far as I can see, platforms that provide both sci_ick and sci_fck
> > > > > > set the two clocks to the same source.
> > > > > 
> > > > > That's right. As a consequence, the clock's enable count is
> > > > > incremented
> > > > > 
> > > > > 3 times:
> > > > >   - once for fck,
> > > > >   - once for ick,
> > > > >   - once for generic Runtime PM using the "NULL" clock.
> > > > 
> > > > This approach is fine by me.
> > > > But I think you need to maintain compatibility with the old
> > > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > > was included in v3.14.
> > > 
> > > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> > 
> > So long as its not used anywhere in-tree, which I believe is the case,
> > then that is fine by me.
> 
> BTW, are you planning to make the above mentioned driver update
> before or after re-posting enablement patches for Koelsch and/or Lager?
> I ask because I would like to make such patches the basis for
> a patch for Marzen.

I'll try to do so today, after my talk at the ELC :-)

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-29 13:44                   ` Laurent Pinchart
  (?)
@ 2014-04-29 21:48                     ` Simon Horman
  -1 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-29 21:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> > On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> > > On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > > > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > > > >> +     scif0: serial@ffe40000 {
> > > > > > >> +             compatible = "renesas,scif",
> > > > > > >> "renesas,scif-r8a7779";
> > > > > > >> +             reg = <0xffe40000 265>;
> > > > > > >> +             interrupt-parent = <&gic>;
> > > > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > > > >> +             clock-names = "sci_ick";
> > > > > > > 
> > > > > > > Clock handling in the sh-sci driver should probably be improved.
> > > > > > > The driver currently requires an "sci_ick" interface clock and
> > > > > > > supports an optional "sci_fck" functional clock. In practice, as
> > > > > > > far as I can see, platforms that provide both sci_ick and sci_fck
> > > > > > > set the two clocks to the same source.
> > > > > > 
> > > > > > That's right. As a consequence, the clock's enable count is
> > > > > > incremented
> > > > > > 
> > > > > > 3 times:
> > > > > >   - once for fck,
> > > > > >   - once for ick,
> > > > > >   - once for generic Runtime PM using the "NULL" clock.
> > > > > 
> > > > > This approach is fine by me.
> > > > > But I think you need to maintain compatibility with the old
> > > > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > > > was included in v3.14.
> > > > 
> > > > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> > > 
> > > So long as its not used anywhere in-tree, which I believe is the case,
> > > then that is fine by me.
> > 
> > BTW, are you planning to make the above mentioned driver update
> > before or after re-posting enablement patches for Koelsch and/or Lager?
> > I ask because I would like to make such patches the basis for
> > a patch for Marzen.
> 
> I'll try to do so today, after my talk at the ELC :-)

I thought you might be a bit busy with ELC so I went
ahead and made my Marzen patches. Hopefully they aren't
too far away from what you have in mind for the Koelsch and Lager.

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-29 21:48                     ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-29 21:48 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Geert Uytterhoeven, Greg Kroah-Hartman, linux-serial,
	Laurent Pinchart, Magnus Damm, Linux-sh list, linux-arm-kernel,
	devicetree

On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> > On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> > > On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > > > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > > > >> +     scif0: serial@ffe40000 {
> > > > > > >> +             compatible = "renesas,scif",
> > > > > > >> "renesas,scif-r8a7779";
> > > > > > >> +             reg = <0xffe40000 265>;
> > > > > > >> +             interrupt-parent = <&gic>;
> > > > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > > > >> +             clock-names = "sci_ick";
> > > > > > > 
> > > > > > > Clock handling in the sh-sci driver should probably be improved.
> > > > > > > The driver currently requires an "sci_ick" interface clock and
> > > > > > > supports an optional "sci_fck" functional clock. In practice, as
> > > > > > > far as I can see, platforms that provide both sci_ick and sci_fck
> > > > > > > set the two clocks to the same source.
> > > > > > 
> > > > > > That's right. As a consequence, the clock's enable count is
> > > > > > incremented
> > > > > > 
> > > > > > 3 times:
> > > > > >   - once for fck,
> > > > > >   - once for ick,
> > > > > >   - once for generic Runtime PM using the "NULL" clock.
> > > > > 
> > > > > This approach is fine by me.
> > > > > But I think you need to maintain compatibility with the old
> > > > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > > > was included in v3.14.
> > > > 
> > > > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> > > 
> > > So long as its not used anywhere in-tree, which I believe is the case,
> > > then that is fine by me.
> > 
> > BTW, are you planning to make the above mentioned driver update
> > before or after re-posting enablement patches for Koelsch and/or Lager?
> > I ask because I would like to make such patches the basis for
> > a patch for Marzen.
> 
> I'll try to do so today, after my talk at the ELC :-)

I thought you might be a bit busy with ELC so I went
ahead and made my Marzen patches. Hopefully they aren't
too far away from what you have in mind for the Koelsch and Lager.

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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-29 21:48                     ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-29 21:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> > On Mon, Apr 28, 2014 at 10:13:55AM +0900, Simon Horman wrote:
> > > On Mon, Apr 28, 2014 at 02:08:16AM +0200, Laurent Pinchart wrote:
> > > > On Monday 28 April 2014 09:03:14 Simon Horman wrote:
> > > > > On Fri, Apr 25, 2014 at 09:11:06AM +0200, Geert Uytterhoeven wrote:
> > > > > > On Fri, Apr 25, 2014 at 9:05 AM, Laurent Pinchart wrote:
> > > > > > >> +     scif0: serial at ffe40000 {
> > > > > > >> +             compatible = "renesas,scif",
> > > > > > >> "renesas,scif-r8a7779";
> > > > > > >> +             reg = <0xffe40000 265>;
> > > > > > >> +             interrupt-parent = <&gic>;
> > > > > > >> +             interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
> > > > > > >> +             clocks = <&cpg_clocks R8A7779_CLK_P>;
> > > > > > >> +             clock-names = "sci_ick";
> > > > > > > 
> > > > > > > Clock handling in the sh-sci driver should probably be improved.
> > > > > > > The driver currently requires an "sci_ick" interface clock and
> > > > > > > supports an optional "sci_fck" functional clock. In practice, as
> > > > > > > far as I can see, platforms that provide both sci_ick and sci_fck
> > > > > > > set the two clocks to the same source.
> > > > > > 
> > > > > > That's right. As a consequence, the clock's enable count is
> > > > > > incremented
> > > > > > 
> > > > > > 3 times:
> > > > > >   - once for fck,
> > > > > >   - once for ick,
> > > > > >   - once for generic Runtime PM using the "NULL" clock.
> > > > > 
> > > > > This approach is fine by me.
> > > > > But I think you need to maintain compatibility with the old
> > > > > binding ("sci_ick" required, "sci_fsk") as it seems that
> > > > > was included in v3.14.
> > > > 
> > > > sci_fck isn't part of the DT bindings, so we can at least drop that one.
> > > 
> > > So long as its not used anywhere in-tree, which I believe is the case,
> > > then that is fine by me.
> > 
> > BTW, are you planning to make the above mentioned driver update
> > before or after re-posting enablement patches for Koelsch and/or Lager?
> > I ask because I would like to make such patches the basis for
> > a patch for Marzen.
> 
> I'll try to do so today, after my talk at the ELC :-)

I thought you might be a bit busy with ELC so I went
ahead and made my Marzen patches. Hopefully they aren't
too far away from what you have in mind for the Koelsch and Lager.

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-29 21:48                     ` Simon Horman
  (?)
@ 2014-04-30  0:59                       ` Laurent Pinchart
  -1 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-30  0:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Wednesday 30 April 2014 06:48:50 Simon Horman wrote:
> On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> > On Monday 28 April 2014 16:07:49 Simon Horman wrote:

[snip]

> > > BTW, are you planning to make the above mentioned driver update
> > > before or after re-posting enablement patches for Koelsch and/or Lager?
> > > I ask because I would like to make such patches the basis for
> > > a patch for Marzen.
> > 
> > I'll try to do so today, after my talk at the ELC :-)
> 
> I thought you might be a bit busy with ELC so I went
> ahead and made my Marzen patches. Hopefully they aren't
> too far away from what you have in mind for the Koelsch and Lager.

I was busy, but I've just sent the patches :-) Could you please test them ? If 
no problem is found I'd like the SCI patch to go in before this series, to 
avoid adding a dependency on sci_ick in the marzen DT.

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-30  0:59                       ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-30  0:59 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, Greg Kroah-Hartman, linux-serial,
	Laurent Pinchart, Magnus Damm, Linux-sh list, linux-arm-kernel,
	devicetree

Hi Simon,

On Wednesday 30 April 2014 06:48:50 Simon Horman wrote:
> On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> > On Monday 28 April 2014 16:07:49 Simon Horman wrote:

[snip]

> > > BTW, are you planning to make the above mentioned driver update
> > > before or after re-posting enablement patches for Koelsch and/or Lager?
> > > I ask because I would like to make such patches the basis for
> > > a patch for Marzen.
> > 
> > I'll try to do so today, after my talk at the ELC :-)
> 
> I thought you might be a bit busy with ELC so I went
> ahead and made my Marzen patches. Hopefully they aren't
> too far away from what you have in mind for the Koelsch and Lager.

I was busy, but I've just sent the patches :-) Could you please test them ? If 
no problem is found I'd like the SCI patch to go in before this series, to 
avoid adding a dependency on sci_ick in the marzen DT.

-- 
Regards,

Laurent Pinchart


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-30  0:59                       ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-04-30  0:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Wednesday 30 April 2014 06:48:50 Simon Horman wrote:
> On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> > On Monday 28 April 2014 16:07:49 Simon Horman wrote:

[snip]

> > > BTW, are you planning to make the above mentioned driver update
> > > before or after re-posting enablement patches for Koelsch and/or Lager?
> > > I ask because I would like to make such patches the basis for
> > > a patch for Marzen.
> > 
> > I'll try to do so today, after my talk at the ELC :-)
> 
> I thought you might be a bit busy with ELC so I went
> ahead and made my Marzen patches. Hopefully they aren't
> too far away from what you have in mind for the Koelsch and Lager.

I was busy, but I've just sent the patches :-) Could you please test them ? If 
no problem is found I'd like the SCI patch to go in before this series, to 
avoid adding a dependency on sci_ick in the marzen DT.

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
  2014-04-30  0:59                       ` Laurent Pinchart
  (?)
@ 2014-04-30  1:45                         ` Simon Horman
  -1 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-30  1:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 30, 2014 at 02:59:46AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Wednesday 30 April 2014 06:48:50 Simon Horman wrote:
> > On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> > > On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> 
> [snip]
> 
> > > > BTW, are you planning to make the above mentioned driver update
> > > > before or after re-posting enablement patches for Koelsch and/or Lager?
> > > > I ask because I would like to make such patches the basis for
> > > > a patch for Marzen.
> > > 
> > > I'll try to do so today, after my talk at the ELC :-)
> > 
> > I thought you might be a bit busy with ELC so I went
> > ahead and made my Marzen patches. Hopefully they aren't
> > too far away from what you have in mind for the Koelsch and Lager.
> 
> I was busy, but I've just sent the patches :-) Could you please test them ? If 
> no problem is found I'd like the SCI patch to go in before this series, to 
> avoid adding a dependency on sci_ick in the marzen DT.

Sure, will do.

As mentioned else where I'd prefer not do depend
on the SCI patch. But lets continue that discussion elsewhere.

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-30  1:45                         ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-30  1:45 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Geert Uytterhoeven, Greg Kroah-Hartman, linux-serial,
	Laurent Pinchart, Magnus Damm, Linux-sh list, linux-arm-kernel,
	devicetree

On Wed, Apr 30, 2014 at 02:59:46AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Wednesday 30 April 2014 06:48:50 Simon Horman wrote:
> > On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> > > On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> 
> [snip]
> 
> > > > BTW, are you planning to make the above mentioned driver update
> > > > before or after re-posting enablement patches for Koelsch and/or Lager?
> > > > I ask because I would like to make such patches the basis for
> > > > a patch for Marzen.
> > > 
> > > I'll try to do so today, after my talk at the ELC :-)
> > 
> > I thought you might be a bit busy with ELC so I went
> > ahead and made my Marzen patches. Hopefully they aren't
> > too far away from what you have in mind for the Koelsch and Lager.
> 
> I was busy, but I've just sent the patches :-) Could you please test them ? If 
> no problem is found I'd like the SCI patch to go in before this series, to 
> avoid adding a dependency on sci_ick in the marzen DT.

Sure, will do.

As mentioned else where I'd prefer not do depend
on the SCI patch. But lets continue that discussion elsewhere.

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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779
@ 2014-04-30  1:45                         ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-04-30  1:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 30, 2014 at 02:59:46AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Wednesday 30 April 2014 06:48:50 Simon Horman wrote:
> > On Tue, Apr 29, 2014 at 03:44:46PM +0200, Laurent Pinchart wrote:
> > > On Monday 28 April 2014 16:07:49 Simon Horman wrote:
> 
> [snip]
> 
> > > > BTW, are you planning to make the above mentioned driver update
> > > > before or after re-posting enablement patches for Koelsch and/or Lager?
> > > > I ask because I would like to make such patches the basis for
> > > > a patch for Marzen.
> > > 
> > > I'll try to do so today, after my talk at the ELC :-)
> > 
> > I thought you might be a bit busy with ELC so I went
> > ahead and made my Marzen patches. Hopefully they aren't
> > too far away from what you have in mind for the Koelsch and Lager.
> 
> I was busy, but I've just sent the patches :-) Could you please test them ? If 
> no problem is found I'd like the SCI patch to go in before this series, to 
> avoid adding a dependency on sci_ick in the marzen DT.

Sure, will do.

As mentioned else where I'd prefer not do depend
on the SCI patch. But lets continue that discussion elsewhere.

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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7778
@ 2014-07-02  4:19   ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-07-02  4:19 UTC (permalink / raw)
  To: linux-arm-kernel

Simply document a new compat string.
There appears to be no need for a driver updates.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 64fd7de..8a50a2e 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -4,6 +4,7 @@ Required properties:
 
   - compatible: Must contain one of the following:
 
+    - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
     - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
     - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
     - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
-- 
2.0.0.rc2


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7778
@ 2014-07-02  4:19   ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-07-02  4:19 UTC (permalink / raw)
  To: Laurent Pinchart, linux-sh
  Cc: Magnus Damm, linux-arm-kernel, linux-serial, Simon Horman

Simply document a new compat string.
There appears to be no need for a driver updates.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 64fd7de..8a50a2e 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -4,6 +4,7 @@ Required properties:
 
   - compatible: Must contain one of the following:
 
+    - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
     - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
     - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
     - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
-- 
2.0.0.rc2


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7778
@ 2014-07-02  4:19   ` Simon Horman
  0 siblings, 0 replies; 45+ messages in thread
From: Simon Horman @ 2014-07-02  4:19 UTC (permalink / raw)
  To: linux-arm-kernel

Simply document a new compat string.
There appears to be no need for a driver updates.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 64fd7de..8a50a2e 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -4,6 +4,7 @@ Required properties:
 
   - compatible: Must contain one of the following:
 
+    - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
     - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
     - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
     - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
-- 
2.0.0.rc2

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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7778
  2014-07-02  4:19   ` Simon Horman
  (?)
@ 2014-07-02  8:01     ` Laurent Pinchart
  -1 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-07-02  8:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

Thank you for the patch.

On Wednesday 02 July 2014 06:19:06 Simon Horman wrote:
> Simply document a new compat string.
> There appears to be no need for a driver updates.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index
> 64fd7de..8a50a2e 100644
> --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> @@ -4,6 +4,7 @@ Required properties:
> 
>    - compatible: Must contain one of the following:
> 
> +    - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
>      - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
>      - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
>      - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7778
@ 2014-07-02  8:01     ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-07-02  8:01 UTC (permalink / raw)
  To: Simon Horman; +Cc: linux-sh, Magnus Damm, linux-arm-kernel, linux-serial

Hi Simon,

Thank you for the patch.

On Wednesday 02 July 2014 06:19:06 Simon Horman wrote:
> Simply document a new compat string.
> There appears to be no need for a driver updates.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index
> 64fd7de..8a50a2e 100644
> --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> @@ -4,6 +4,7 @@ Required properties:
> 
>    - compatible: Must contain one of the following:
> 
> +    - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
>      - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
>      - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
>      - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.

-- 
Regards,

Laurent Pinchart


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

* [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7778
@ 2014-07-02  8:01     ` Laurent Pinchart
  0 siblings, 0 replies; 45+ messages in thread
From: Laurent Pinchart @ 2014-07-02  8:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

Thank you for the patch.

On Wednesday 02 July 2014 06:19:06 Simon Horman wrote:
> Simply document a new compat string.
> There appears to be no need for a driver updates.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index
> 64fd7de..8a50a2e 100644
> --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> @@ -4,6 +4,7 @@ Required properties:
> 
>    - compatible: Must contain one of the following:
> 
> +    - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
>      - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
>      - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
>      - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.

-- 
Regards,

Laurent Pinchart

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

end of thread, other threads:[~2014-07-02  8:01 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24  6:54 [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7779 Simon Horman
2014-04-24  6:54 ` Simon Horman
2014-04-24  6:54 ` Simon Horman
2014-04-24 23:33 ` Laurent Pinchart
2014-04-24 23:33   ` Laurent Pinchart
2014-04-24 23:33   ` Laurent Pinchart
2014-04-25  0:26   ` Simon Horman
2014-04-25  0:26     ` Simon Horman
2014-04-25  0:26     ` Simon Horman
2014-04-25  7:05     ` Laurent Pinchart
2014-04-25  7:05       ` Laurent Pinchart
2014-04-25  7:05       ` Laurent Pinchart
2014-04-25  7:11       ` Geert Uytterhoeven
2014-04-25  7:11         ` Geert Uytterhoeven
2014-04-25  7:11         ` Geert Uytterhoeven
2014-04-28  0:03         ` Simon Horman
2014-04-28  0:03           ` Simon Horman
2014-04-28  0:03           ` Simon Horman
2014-04-28  0:08           ` Laurent Pinchart
2014-04-28  0:08             ` Laurent Pinchart
2014-04-28  0:08             ` Laurent Pinchart
2014-04-28  1:13             ` Simon Horman
2014-04-28  1:13               ` Simon Horman
2014-04-28  1:13               ` Simon Horman
2014-04-28  7:07               ` Simon Horman
2014-04-28  7:07                 ` Simon Horman
2014-04-28  7:07                 ` Simon Horman
2014-04-29 13:44                 ` Laurent Pinchart
2014-04-29 13:44                   ` Laurent Pinchart
2014-04-29 13:44                   ` Laurent Pinchart
2014-04-29 21:48                   ` Simon Horman
2014-04-29 21:48                     ` Simon Horman
2014-04-29 21:48                     ` Simon Horman
2014-04-30  0:59                     ` Laurent Pinchart
2014-04-30  0:59                       ` Laurent Pinchart
2014-04-30  0:59                       ` Laurent Pinchart
2014-04-30  1:45                       ` Simon Horman
2014-04-30  1:45                         ` Simon Horman
2014-04-30  1:45                         ` Simon Horman
2014-07-02  4:19 ` [PATCH/RFC] serial: sh-sci: Add device tree support for r8a7778 Simon Horman
2014-07-02  4:19   ` Simon Horman
2014-07-02  4:19   ` Simon Horman
2014-07-02  8:01   ` Laurent Pinchart
2014-07-02  8:01     ` Laurent Pinchart
2014-07-02  8:01     ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.