All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Allowing UART DMA to be configured on i.MX53
@ 2016-08-03 14:13 ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-03 14:13 UTC (permalink / raw)
  Cc: Martyn Welch, Fabien Lahoudere, Greg Kroah-Hartman, Jiri Slaby,
	open list:SERIAL DRIVERS, open list

From: Martyn Welch <martyn.welch@collabora.co.uk>

The UART DMA was only being configured on i.MX6Q compatible devices. We
know that the DMA also works for i.MX53 devices, so allow DMA to be
configured on those devices too.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 drivers/tty/serial/imx.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index c190986..11afe58 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -190,6 +190,7 @@
 enum imx_uart_type {
 	IMX1_UART,
 	IMX21_UART,
+	IMX53_UART,
 	IMX6Q_UART,
 };
 
@@ -247,6 +248,10 @@ static struct imx_uart_data imx_uart_devdata[] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX21_UART,
 	},
+	[IMX53_UART] = {
+		.uts_reg = IMX21_UTS,
+		.devtype = IMX53_UART,
+	},
 	[IMX6Q_UART] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX6Q_UART,
@@ -261,6 +266,9 @@ static const struct platform_device_id imx_uart_devtype[] = {
 		.name = "imx21-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX21_UART],
 	}, {
+		.name = "imx53-uart",
+		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX53_UART],
+	}, {
 		.name = "imx6q-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX6Q_UART],
 	}, {
@@ -271,6 +279,7 @@ MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
 
 static const struct of_device_id imx_uart_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
+	{ .compatible = "fsl,imx53-uart", .data = &imx_uart_devdata[IMX53_UART], },
 	{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
 	{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
 	{ /* sentinel */ }
@@ -292,6 +301,11 @@ static inline int is_imx21_uart(struct imx_port *sport)
 	return sport->devdata->devtype == IMX21_UART;
 }
 
+static inline int is_imx53_uart(struct imx_port *sport)
+{
+	return sport->devdata->devtype == IMX53_UART;
+}
+
 static inline int is_imx6q_uart(struct imx_port *sport)
 {
 	return sport->devdata->devtype == IMX6Q_UART;
@@ -1254,8 +1268,8 @@ static int imx_startup(struct uart_port *port)
 	writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
 
 	/* Can we enable the DMA support? */
-	if (is_imx6q_uart(sport) && !uart_console(port) &&
-	    !sport->dma_is_inited) {
+	if ((is_imx6q_uart(sport) || is_imx53_uart(sport)) &&
+	    !uart_console(port) && !sport->dma_is_inited) {
 		retval = imx_uart_dma_init(sport);
 		if (retval) {
 			clk_disable_unprepare(sport->clk_per);
-- 
2.7.4

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

* [PATCH 1/2] Allowing UART DMA to be configured on i.MX53
@ 2016-08-03 14:13 ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-03 14:13 UTC (permalink / raw)
  Cc: Martyn Welch, Fabien Lahoudere, Greg Kroah-Hartman, Jiri Slaby,
	open list:SERIAL DRIVERS, open list

From: Martyn Welch <martyn.welch@collabora.co.uk>

The UART DMA was only being configured on i.MX6Q compatible devices. We
know that the DMA also works for i.MX53 devices, so allow DMA to be
configured on those devices too.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 drivers/tty/serial/imx.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index c190986..11afe58 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -190,6 +190,7 @@
 enum imx_uart_type {
 	IMX1_UART,
 	IMX21_UART,
+	IMX53_UART,
 	IMX6Q_UART,
 };
 
@@ -247,6 +248,10 @@ static struct imx_uart_data imx_uart_devdata[] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX21_UART,
 	},
+	[IMX53_UART] = {
+		.uts_reg = IMX21_UTS,
+		.devtype = IMX53_UART,
+	},
 	[IMX6Q_UART] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX6Q_UART,
@@ -261,6 +266,9 @@ static const struct platform_device_id imx_uart_devtype[] = {
 		.name = "imx21-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX21_UART],
 	}, {
+		.name = "imx53-uart",
+		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX53_UART],
+	}, {
 		.name = "imx6q-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX6Q_UART],
 	}, {
@@ -271,6 +279,7 @@ MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
 
 static const struct of_device_id imx_uart_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
+	{ .compatible = "fsl,imx53-uart", .data = &imx_uart_devdata[IMX53_UART], },
 	{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
 	{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
 	{ /* sentinel */ }
@@ -292,6 +301,11 @@ static inline int is_imx21_uart(struct imx_port *sport)
 	return sport->devdata->devtype == IMX21_UART;
 }
 
+static inline int is_imx53_uart(struct imx_port *sport)
+{
+	return sport->devdata->devtype == IMX53_UART;
+}
+
 static inline int is_imx6q_uart(struct imx_port *sport)
 {
 	return sport->devdata->devtype == IMX6Q_UART;
@@ -1254,8 +1268,8 @@ static int imx_startup(struct uart_port *port)
 	writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
 
 	/* Can we enable the DMA support? */
-	if (is_imx6q_uart(sport) && !uart_console(port) &&
-	    !sport->dma_is_inited) {
+	if ((is_imx6q_uart(sport) || is_imx53_uart(sport)) &&
+	    !uart_console(port) && !sport->dma_is_inited) {
 		retval = imx_uart_dma_init(sport);
 		if (retval) {
 			clk_disable_unprepare(sport->clk_per);
-- 
2.7.4

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

* [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
  2016-08-03 14:13 ` Fabien Lahoudere
  (?)
@ 2016-08-03 14:13   ` Fabien Lahoudere
  -1 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-03 14:13 UTC (permalink / raw)
  Cc: Fabien Lahoudere, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Rob Herring, Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

In order to use sdma with UART, we need to add DMA configuration in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..de545e2 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -508,6 +510,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +595,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +627,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-03 14:13   ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-03 14:13 UTC (permalink / raw)
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Fabien Lahoudere, Russell King, open list, Rob Herring,
	Sascha Hauer, Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

In order to use sdma with UART, we need to add DMA configuration in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..de545e2 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -508,6 +510,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +595,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +627,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-03 14:13   ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-03 14:13 UTC (permalink / raw)
  To: linux-arm-kernel

In order to use sdma with UART, we need to add DMA configuration in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..de545e2 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -508,6 +510,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +595,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +627,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* Re: [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-03 14:26     ` Fabio Estevam
  0 siblings, 0 replies; 37+ messages in thread
From: Fabio Estevam @ 2016-08-03 14:26 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Fabien,

On Wed, Aug 3, 2016 at 11:13 AM, Fabien Lahoudere
<fabien.lahoudere@collabora.co.uk> wrote:
> In order to use sdma with UART, we need to add DMA configuration in device tree.
>
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> ---
>  arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
> index cd17037..de545e2 100644
> --- a/arch/arm/boot/dts/imx53.dtsi
> +++ b/arch/arm/boot/dts/imx53.dtsi
> @@ -217,6 +217,8 @@
>                                         clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
>                                                  <&clks IMX5_CLK_UART3_PER_GATE>;
>                                         clock-names = "ipg", "per";
> +                                       dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
> +                                       dma-names = "rx", "tx";
>                                         status = "disabled";
>                                 };

Care to add the dma channels for uart1 as well?

Thanks

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

* Re: [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-03 14:26     ` Fabio Estevam
  0 siblings, 0 replies; 37+ messages in thread
From: Fabio Estevam @ 2016-08-03 14:26 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Fabien,

On Wed, Aug 3, 2016 at 11:13 AM, Fabien Lahoudere
<fabien.lahoudere-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org> wrote:
> In order to use sdma with UART, we need to add DMA configuration in device tree.
>
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
> ---
>  arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
> index cd17037..de545e2 100644
> --- a/arch/arm/boot/dts/imx53.dtsi
> +++ b/arch/arm/boot/dts/imx53.dtsi
> @@ -217,6 +217,8 @@
>                                         clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
>                                                  <&clks IMX5_CLK_UART3_PER_GATE>;
>                                         clock-names = "ipg", "per";
> +                                       dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
> +                                       dma-names = "rx", "tx";
>                                         status = "disabled";
>                                 };

Care to add the dma channels for uart1 as well?

Thanks
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-03 14:26     ` Fabio Estevam
  0 siblings, 0 replies; 37+ messages in thread
From: Fabio Estevam @ 2016-08-03 14:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Fabien,

On Wed, Aug 3, 2016 at 11:13 AM, Fabien Lahoudere
<fabien.lahoudere@collabora.co.uk> wrote:
> In order to use sdma with UART, we need to add DMA configuration in device tree.
>
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> ---
>  arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
> index cd17037..de545e2 100644
> --- a/arch/arm/boot/dts/imx53.dtsi
> +++ b/arch/arm/boot/dts/imx53.dtsi
> @@ -217,6 +217,8 @@
>                                         clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
>                                                  <&clks IMX5_CLK_UART3_PER_GATE>;
>                                         clock-names = "ipg", "per";
> +                                       dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
> +                                       dma-names = "rx", "tx";
>                                         status = "disabled";
>                                 };

Care to add the dma channels for uart1 as well?

Thanks

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

* [PATCH v2 1/2] Allowing UART DMA to be configured on i.MX53
  2016-08-03 14:26     ` Fabio Estevam
@ 2016-08-04 10:22       ` Fabien Lahoudere
  -1 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-04 10:22 UTC (permalink / raw)
  Cc: Martyn Welch, Fabien Lahoudere, Greg Kroah-Hartman, Jiri Slaby,
	open list:SERIAL DRIVERS, open list

From: Martyn Welch <martyn.welch@collabora.co.uk>

The UART DMA was only being configured on i.MX6Q compatible devices. We
know that the DMA also works for i.MX53 devices, so allow DMA to be
configured on those devices too.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 drivers/tty/serial/imx.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index c190986..11afe58 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -190,6 +190,7 @@
 enum imx_uart_type {
 	IMX1_UART,
 	IMX21_UART,
+	IMX53_UART,
 	IMX6Q_UART,
 };
 
@@ -247,6 +248,10 @@ static struct imx_uart_data imx_uart_devdata[] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX21_UART,
 	},
+	[IMX53_UART] = {
+		.uts_reg = IMX21_UTS,
+		.devtype = IMX53_UART,
+	},
 	[IMX6Q_UART] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX6Q_UART,
@@ -261,6 +266,9 @@ static const struct platform_device_id imx_uart_devtype[] = {
 		.name = "imx21-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX21_UART],
 	}, {
+		.name = "imx53-uart",
+		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX53_UART],
+	}, {
 		.name = "imx6q-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX6Q_UART],
 	}, {
@@ -271,6 +279,7 @@ MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
 
 static const struct of_device_id imx_uart_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
+	{ .compatible = "fsl,imx53-uart", .data = &imx_uart_devdata[IMX53_UART], },
 	{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
 	{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
 	{ /* sentinel */ }
@@ -292,6 +301,11 @@ static inline int is_imx21_uart(struct imx_port *sport)
 	return sport->devdata->devtype == IMX21_UART;
 }
 
+static inline int is_imx53_uart(struct imx_port *sport)
+{
+	return sport->devdata->devtype == IMX53_UART;
+}
+
 static inline int is_imx6q_uart(struct imx_port *sport)
 {
 	return sport->devdata->devtype == IMX6Q_UART;
@@ -1254,8 +1268,8 @@ static int imx_startup(struct uart_port *port)
 	writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
 
 	/* Can we enable the DMA support? */
-	if (is_imx6q_uart(sport) && !uart_console(port) &&
-	    !sport->dma_is_inited) {
+	if ((is_imx6q_uart(sport) || is_imx53_uart(sport)) &&
+	    !uart_console(port) && !sport->dma_is_inited) {
 		retval = imx_uart_dma_init(sport);
 		if (retval) {
 			clk_disable_unprepare(sport->clk_per);
-- 
2.7.4

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

* [PATCH v2 1/2] Allowing UART DMA to be configured on i.MX53
@ 2016-08-04 10:22       ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-04 10:22 UTC (permalink / raw)
  Cc: Martyn Welch, Fabien Lahoudere, Greg Kroah-Hartman, Jiri Slaby,
	open list:SERIAL DRIVERS, open list

From: Martyn Welch <martyn.welch@collabora.co.uk>

The UART DMA was only being configured on i.MX6Q compatible devices. We
know that the DMA also works for i.MX53 devices, so allow DMA to be
configured on those devices too.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 drivers/tty/serial/imx.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index c190986..11afe58 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -190,6 +190,7 @@
 enum imx_uart_type {
 	IMX1_UART,
 	IMX21_UART,
+	IMX53_UART,
 	IMX6Q_UART,
 };
 
@@ -247,6 +248,10 @@ static struct imx_uart_data imx_uart_devdata[] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX21_UART,
 	},
+	[IMX53_UART] = {
+		.uts_reg = IMX21_UTS,
+		.devtype = IMX53_UART,
+	},
 	[IMX6Q_UART] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX6Q_UART,
@@ -261,6 +266,9 @@ static const struct platform_device_id imx_uart_devtype[] = {
 		.name = "imx21-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX21_UART],
 	}, {
+		.name = "imx53-uart",
+		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX53_UART],
+	}, {
 		.name = "imx6q-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX6Q_UART],
 	}, {
@@ -271,6 +279,7 @@ MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
 
 static const struct of_device_id imx_uart_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
+	{ .compatible = "fsl,imx53-uart", .data = &imx_uart_devdata[IMX53_UART], },
 	{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
 	{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
 	{ /* sentinel */ }
@@ -292,6 +301,11 @@ static inline int is_imx21_uart(struct imx_port *sport)
 	return sport->devdata->devtype == IMX21_UART;
 }
 
+static inline int is_imx53_uart(struct imx_port *sport)
+{
+	return sport->devdata->devtype == IMX53_UART;
+}
+
 static inline int is_imx6q_uart(struct imx_port *sport)
 {
 	return sport->devdata->devtype == IMX6Q_UART;
@@ -1254,8 +1268,8 @@ static int imx_startup(struct uart_port *port)
 	writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
 
 	/* Can we enable the DMA support? */
-	if (is_imx6q_uart(sport) && !uart_console(port) &&
-	    !sport->dma_is_inited) {
+	if ((is_imx6q_uart(sport) || is_imx53_uart(sport)) &&
+	    !uart_console(port) && !sport->dma_is_inited) {
 		retval = imx_uart_dma_init(sport);
 		if (retval) {
 			clk_disable_unprepare(sport->clk_per);
-- 
2.7.4

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

* [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
  2016-08-04 10:22       ` Fabien Lahoudere
  (?)
@ 2016-08-04 10:22         ` Fabien Lahoudere
  -1 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-04 10:22 UTC (permalink / raw)
  Cc: Fabien Lahoudere, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Rob Herring, Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

In order to use sdma with UART, we need to add DMA configuration in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..c1bc97c 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -498,6 +500,8 @@
 				clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
 				         <&clks IMX5_CLK_UART1_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 18 4 0>, <&sdma 19 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -508,6 +512,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +597,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +629,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-04 10:22         ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-04 10:22 UTC (permalink / raw)
  Cc: Fabien Lahoudere, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Rob Herring, Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

In order to use sdma with UART, we need to add DMA configuration in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..c1bc97c 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -498,6 +500,8 @@
 				clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
 				         <&clks IMX5_CLK_UART1_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 18 4 0>, <&sdma 19 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -508,6 +512,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +597,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +629,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-04 10:22         ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-04 10:22 UTC (permalink / raw)
  To: linux-arm-kernel

In order to use sdma with UART, we need to add DMA configuration in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..c1bc97c 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -498,6 +500,8 @@
 				clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
 				         <&clks IMX5_CLK_UART1_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 18 4 0>, <&sdma 19 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -508,6 +512,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +597,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +629,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
  2016-08-04 10:22         ` Fabien Lahoudere
  (?)
@ 2016-08-04 10:49           ` Alexander Shiyan
  -1 siblings, 0 replies; 37+ messages in thread
From: Alexander Shiyan @ 2016-08-04 10:49 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

>Четверг,  4 августа 2016, 13:22 +03:00 от Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>:
>
>In order to use sdma with UART, we need to add DMA configuration in device tree.
>
>Signed-off-by: Fabien Lahoudere < fabien.lahoudere@collabora.co.uk >
>---
> arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
...

Hello.

UART SDMA has been tested by me for i.MX51.
So, on my opinion, In the first part of the patch, we just need to remove is_imx6q_uart()
check on and always let the devicetree decide about DMA usage.

Thanks.
---

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

* Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-04 10:49           ` Alexander Shiyan
  0 siblings, 0 replies; 37+ messages in thread
From: Alexander Shiyan @ 2016-08-04 10:49 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

>Четверг,  4 августа 2016, 13:22 +03:00 от Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>:
>
>In order to use sdma with UART, we need to add DMA configuration in device tree.
>
>Signed-off-by: Fabien Lahoudere < fabien.lahoudere@collabora.co.uk >
>---
> arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
...

Hello.

UART SDMA has been tested by me for i.MX51.
So, on my opinion, In the first part of the patch, we just need to remove is_imx6q_uart()
check on and always let the devicetree decide about DMA usage.

Thanks.
---

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-04 10:49           ` Alexander Shiyan
  0 siblings, 0 replies; 37+ messages in thread
From: Alexander Shiyan @ 2016-08-04 10:49 UTC (permalink / raw)
  To: linux-arm-kernel

>???????,  4 ??????? 2016, 13:22 +03:00 ?? Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>:
>
>In order to use sdma with UART, we need to add DMA configuration in device tree.
>
>Signed-off-by: Fabien Lahoudere < fabien.lahoudere@collabora.co.uk >
>---
>?arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
>?1 file changed, 10 insertions(+)
...

Hello.

UART SDMA has been tested by me for i.MX51.
So, on my opinion, In the first part of the patch, we just need to remove is_imx6q_uart()
check on and always let the devicetree decide about DMA usage.

Thanks.
---

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

* [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
  2016-08-03 14:26     ` Fabio Estevam
  (?)
@ 2016-08-04 13:47       ` Fabien Lahoudere
  -1 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-04 13:47 UTC (permalink / raw)
  Cc: Fabien Lahoudere, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Rob Herring, Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

We have the following messages that tell csi devices are not used:
imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0
imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1

So we add them in the common device tree to make CSI ports available on
imx53 boards.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index c1bc97c..0777b41 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -136,6 +136,14 @@
 			clock-names = "bus", "di0", "di1";
 			resets = <&src 2>;
 
+			ipu_csi0: port@0 {
+				reg = <0>;
+			};
+
+			ipu_csi1: port@1 {
+				reg = <1>;
+			};
+
 			ipu_di0: port@2 {
 				#address-cells = <1>;
 				#size-cells = <0>;
-- 
2.7.4

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

* [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
@ 2016-08-04 13:47       ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-04 13:47 UTC (permalink / raw)
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Fabien Lahoudere, Russell King, open list, Rob Herring,
	Sascha Hauer, Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

We have the following messages that tell csi devices are not used:
imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0
imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1

So we add them in the common device tree to make CSI ports available on
imx53 boards.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index c1bc97c..0777b41 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -136,6 +136,14 @@
 			clock-names = "bus", "di0", "di1";
 			resets = <&src 2>;
 
+			ipu_csi0: port@0 {
+				reg = <0>;
+			};
+
+			ipu_csi1: port@1 {
+				reg = <1>;
+			};
+
 			ipu_di0: port@2 {
 				#address-cells = <1>;
 				#size-cells = <0>;
-- 
2.7.4

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

* [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
@ 2016-08-04 13:47       ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-04 13:47 UTC (permalink / raw)
  To: linux-arm-kernel

We have the following messages that tell csi devices are not used:
imx-ipuv3 18000000.ipu: no port at 0 node in /soc/ipu at 18000000, not using CSI0
imx-ipuv3 18000000.ipu: no port at 1 node in /soc/ipu at 18000000, not using CSI1

So we add them in the common device tree to make CSI ports available on
imx53 boards.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index c1bc97c..0777b41 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -136,6 +136,14 @@
 			clock-names = "bus", "di0", "di1";
 			resets = <&src 2>;
 
+			ipu_csi0: port at 0 {
+				reg = <0>;
+			};
+
+			ipu_csi1: port at 1 {
+				reg = <1>;
+			};
+
 			ipu_di0: port at 2 {
 				#address-cells = <1>;
 				#size-cells = <0>;
-- 
2.7.4

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

* Re: [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
  2016-08-04 13:47       ` Fabien Lahoudere
  (?)
@ 2016-08-05  9:33         ` Philipp Zabel
  -1 siblings, 0 replies; 37+ messages in thread
From: Philipp Zabel @ 2016-08-05  9:33 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Am Donnerstag, den 04.08.2016, 15:47 +0200 schrieb Fabien Lahoudere:
> We have the following messages that tell csi devices are not used:
> imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0
> imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1
> 
> So we add them in the common device tree to make CSI ports available on
> imx53 boards.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> ---
>  arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
> index c1bc97c..0777b41 100644
> --- a/arch/arm/boot/dts/imx53.dtsi
> +++ b/arch/arm/boot/dts/imx53.dtsi
> @@ -136,6 +136,14 @@
>  			clock-names = "bus", "di0", "di1";
>  			resets = <&src 2>;
>  
> +			ipu_csi0: port@0 {
> +				reg = <0>;
> +			};
> +
> +			ipu_csi1: port@1 {
> +				reg = <1>;
> +			};
> +
>  			ipu_di0: port@2 {
>  				#address-cells = <1>;
>  				#size-cells = <0>;

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

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

* Re: [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
@ 2016-08-05  9:33         ` Philipp Zabel
  0 siblings, 0 replies; 37+ messages in thread
From: Philipp Zabel @ 2016-08-05  9:33 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Am Donnerstag, den 04.08.2016, 15:47 +0200 schrieb Fabien Lahoudere:
> We have the following messages that tell csi devices are not used:
> imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0
> imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1
> 
> So we add them in the common device tree to make CSI ports available on
> imx53 boards.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> ---
>  arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
> index c1bc97c..0777b41 100644
> --- a/arch/arm/boot/dts/imx53.dtsi
> +++ b/arch/arm/boot/dts/imx53.dtsi
> @@ -136,6 +136,14 @@
>  			clock-names = "bus", "di0", "di1";
>  			resets = <&src 2>;
>  
> +			ipu_csi0: port@0 {
> +				reg = <0>;
> +			};
> +
> +			ipu_csi1: port@1 {
> +				reg = <1>;
> +			};
> +
>  			ipu_di0: port@2 {
>  				#address-cells = <1>;
>  				#size-cells = <0>;

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

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

* [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
@ 2016-08-05  9:33         ` Philipp Zabel
  0 siblings, 0 replies; 37+ messages in thread
From: Philipp Zabel @ 2016-08-05  9:33 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, den 04.08.2016, 15:47 +0200 schrieb Fabien Lahoudere:
> We have the following messages that tell csi devices are not used:
> imx-ipuv3 18000000.ipu: no port at 0 node in /soc/ipu at 18000000, not using CSI0
> imx-ipuv3 18000000.ipu: no port at 1 node in /soc/ipu at 18000000, not using CSI1
> 
> So we add them in the common device tree to make CSI ports available on
> imx53 boards.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> ---
>  arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
> index c1bc97c..0777b41 100644
> --- a/arch/arm/boot/dts/imx53.dtsi
> +++ b/arch/arm/boot/dts/imx53.dtsi
> @@ -136,6 +136,14 @@
>  			clock-names = "bus", "di0", "di1";
>  			resets = <&src 2>;
>  
> +			ipu_csi0: port at 0 {
> +				reg = <0>;
> +			};
> +
> +			ipu_csi1: port at 1 {
> +				reg = <1>;
> +			};
> +
>  			ipu_di0: port at 2 {
>  				#address-cells = <1>;
>  				#size-cells = <0>;

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

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

* Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
  2016-08-04 10:49           ` Alexander Shiyan
  (?)
@ 2016-08-06 13:59             ` Fabio Estevam
  -1 siblings, 0 replies; 37+ messages in thread
From: Fabio Estevam @ 2016-08-06 13:59 UTC (permalink / raw)
  To: Alexander Shiyan
  Cc: Fabien Lahoudere, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thu, Aug 4, 2016 at 7:49 AM, Alexander Shiyan <shc_work@mail.ru> wrote:

> Hello.
>
> UART SDMA has been tested by me for i.MX51.
> So, on my opinion, In the first part of the patch, we just need to remove is_imx6q_uart()
> check on and always let the devicetree decide about DMA usage.

Yes, agreed.

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

* Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-06 13:59             ` Fabio Estevam
  0 siblings, 0 replies; 37+ messages in thread
From: Fabio Estevam @ 2016-08-06 13:59 UTC (permalink / raw)
  To: Alexander Shiyan
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Fabien Lahoudere, Russell King, open list, Rob Herring,
	Sascha Hauer, Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thu, Aug 4, 2016 at 7:49 AM, Alexander Shiyan <shc_work@mail.ru> wrote:

> Hello.
>
> UART SDMA has been tested by me for i.MX51.
> So, on my opinion, In the first part of the patch, we just need to remove is_imx6q_uart()
> check on and always let the devicetree decide about DMA usage.

Yes, agreed.

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

* [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-06 13:59             ` Fabio Estevam
  0 siblings, 0 replies; 37+ messages in thread
From: Fabio Estevam @ 2016-08-06 13:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 4, 2016 at 7:49 AM, Alexander Shiyan <shc_work@mail.ru> wrote:

> Hello.
>
> UART SDMA has been tested by me for i.MX51.
> So, on my opinion, In the first part of the patch, we just need to remove is_imx6q_uart()
> check on and always let the devicetree decide about DMA usage.

Yes, agreed.

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

* [PATCH 1/2] Allowing UART DMA to be configured on i.MX53
  2016-08-06 13:59             ` Fabio Estevam
@ 2016-08-08  9:29               ` Fabien Lahoudere
  -1 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-08  9:29 UTC (permalink / raw)
  To: festevam
  Cc: Martyn Welch, Fabien Lahoudere, Greg Kroah-Hartman, Jiri Slaby,
	open list:SERIAL DRIVERS, open list

From: Martyn Welch <martyn.welch@collabora.co.uk>

The UART DMA was only being configured on i.MX6Q compatible devices. We
know that the DMA also works for i.MX53 devices, so allow DMA to be
configured on those devices too.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 drivers/tty/serial/imx.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 08ccfe1..1c9315a 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -190,6 +190,7 @@
 enum imx_uart_type {
 	IMX1_UART,
 	IMX21_UART,
+	IMX53_UART,
 	IMX6Q_UART,
 };
 
@@ -247,6 +248,10 @@ static struct imx_uart_data imx_uart_devdata[] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX21_UART,
 	},
+	[IMX53_UART] = {
+		.uts_reg = IMX21_UTS,
+		.devtype = IMX53_UART,
+	},
 	[IMX6Q_UART] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX6Q_UART,
@@ -261,6 +266,9 @@ static const struct platform_device_id imx_uart_devtype[] = {
 		.name = "imx21-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX21_UART],
 	}, {
+		.name = "imx53-uart",
+		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX53_UART],
+	}, {
 		.name = "imx6q-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX6Q_UART],
 	}, {
@@ -271,6 +279,7 @@ MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
 
 static const struct of_device_id imx_uart_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
+	{ .compatible = "fsl,imx53-uart", .data = &imx_uart_devdata[IMX53_UART], },
 	{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
 	{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
 	{ /* sentinel */ }
@@ -292,6 +301,11 @@ static inline int is_imx21_uart(struct imx_port *sport)
 	return sport->devdata->devtype == IMX21_UART;
 }
 
+static inline int is_imx53_uart(struct imx_port *sport)
+{
+	return sport->devdata->devtype == IMX53_UART;
+}
+
 static inline int is_imx6q_uart(struct imx_port *sport)
 {
 	return sport->devdata->devtype == IMX6Q_UART;
@@ -1254,8 +1268,7 @@ static int imx_startup(struct uart_port *port)
 	writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
 
 	/* Can we enable the DMA support? */
-	if (is_imx6q_uart(sport) && !uart_console(port) &&
-	    !sport->dma_is_inited)
+	if (!uart_console(port) && !sport->dma_is_inited)
 		imx_uart_dma_init(sport);
 
 	spin_lock_irqsave(&sport->port.lock, flags);
-- 
2.7.4

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

* [PATCH 1/2] Allowing UART DMA to be configured on i.MX53
@ 2016-08-08  9:29               ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-08  9:29 UTC (permalink / raw)
  To: festevam
  Cc: Martyn Welch, Fabien Lahoudere, Greg Kroah-Hartman, Jiri Slaby,
	open list:SERIAL DRIVERS, open list

From: Martyn Welch <martyn.welch@collabora.co.uk>

The UART DMA was only being configured on i.MX6Q compatible devices. We
know that the DMA also works for i.MX53 devices, so allow DMA to be
configured on those devices too.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 drivers/tty/serial/imx.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 08ccfe1..1c9315a 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -190,6 +190,7 @@
 enum imx_uart_type {
 	IMX1_UART,
 	IMX21_UART,
+	IMX53_UART,
 	IMX6Q_UART,
 };
 
@@ -247,6 +248,10 @@ static struct imx_uart_data imx_uart_devdata[] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX21_UART,
 	},
+	[IMX53_UART] = {
+		.uts_reg = IMX21_UTS,
+		.devtype = IMX53_UART,
+	},
 	[IMX6Q_UART] = {
 		.uts_reg = IMX21_UTS,
 		.devtype = IMX6Q_UART,
@@ -261,6 +266,9 @@ static const struct platform_device_id imx_uart_devtype[] = {
 		.name = "imx21-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX21_UART],
 	}, {
+		.name = "imx53-uart",
+		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX53_UART],
+	}, {
 		.name = "imx6q-uart",
 		.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX6Q_UART],
 	}, {
@@ -271,6 +279,7 @@ MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
 
 static const struct of_device_id imx_uart_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
+	{ .compatible = "fsl,imx53-uart", .data = &imx_uart_devdata[IMX53_UART], },
 	{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
 	{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
 	{ /* sentinel */ }
@@ -292,6 +301,11 @@ static inline int is_imx21_uart(struct imx_port *sport)
 	return sport->devdata->devtype == IMX21_UART;
 }
 
+static inline int is_imx53_uart(struct imx_port *sport)
+{
+	return sport->devdata->devtype == IMX53_UART;
+}
+
 static inline int is_imx6q_uart(struct imx_port *sport)
 {
 	return sport->devdata->devtype == IMX6Q_UART;
@@ -1254,8 +1268,7 @@ static int imx_startup(struct uart_port *port)
 	writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
 
 	/* Can we enable the DMA support? */
-	if (is_imx6q_uart(sport) && !uart_console(port) &&
-	    !sport->dma_is_inited)
+	if (!uart_console(port) && !sport->dma_is_inited)
 		imx_uart_dma_init(sport);
 
 	spin_lock_irqsave(&sport->port.lock, flags);
-- 
2.7.4

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

* [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
  2016-08-08  9:29               ` Fabien Lahoudere
  (?)
@ 2016-08-08  9:29                 ` Fabien Lahoudere
  -1 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-08  9:29 UTC (permalink / raw)
  To: festevam
  Cc: Fabien Lahoudere, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Rob Herring, Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

In order to use sdma with UART, we need to add DMA configuration
in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..c1bc97c 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -498,6 +500,8 @@
 				clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
 				         <&clks IMX5_CLK_UART1_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 18 4 0>, <&sdma 19 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -508,6 +512,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +597,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +629,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-08  9:29                 ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-08  9:29 UTC (permalink / raw)
  To: festevam
  Cc: Fabien Lahoudere, Shawn Guo, Sascha Hauer, Fabio Estevam,
	Rob Herring, Mark Rutland, Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

In order to use sdma with UART, we need to add DMA configuration
in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..c1bc97c 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -498,6 +500,8 @@
 				clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
 				         <&clks IMX5_CLK_UART1_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 18 4 0>, <&sdma 19 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -508,6 +512,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +597,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +629,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-08  9:29                 ` Fabien Lahoudere
  0 siblings, 0 replies; 37+ messages in thread
From: Fabien Lahoudere @ 2016-08-08  9:29 UTC (permalink / raw)
  To: linux-arm-kernel

In order to use sdma with UART, we need to add DMA configuration
in device tree.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
 arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index cd17037..c1bc97c 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -217,6 +217,8 @@
 					clocks = <&clks IMX5_CLK_UART3_IPG_GATE>,
 					         <&clks IMX5_CLK_UART3_PER_GATE>;
 					clock-names = "ipg", "per";
+					dmas = <&sdma 42 4 0>, <&sdma 43 4 0>;
+					dma-names = "rx", "tx";
 					status = "disabled";
 				};
 
@@ -498,6 +500,8 @@
 				clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
 				         <&clks IMX5_CLK_UART1_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 18 4 0>, <&sdma 19 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -508,6 +512,8 @@
 				clocks = <&clks IMX5_CLK_UART2_IPG_GATE>,
 				         <&clks IMX5_CLK_UART2_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 12 4 0>, <&sdma 13 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
@@ -591,6 +597,8 @@
 				clocks = <&clks IMX5_CLK_UART4_IPG_GATE>,
 				         <&clks IMX5_CLK_UART4_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 2 4 0>, <&sdma 3 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 		};
@@ -621,6 +629,8 @@
 				clocks = <&clks IMX5_CLK_UART5_IPG_GATE>,
 				         <&clks IMX5_CLK_UART5_PER_GATE>;
 				clock-names = "ipg", "per";
+				dmas = <&sdma 16 4 0>, <&sdma 17 4 0>;
+				dma-names = "rx", "tx";
 				status = "disabled";
 			};
 
-- 
2.7.4

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

* Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-09 13:35           ` Shawn Guo
  0 siblings, 0 replies; 37+ messages in thread
From: Shawn Guo @ 2016-08-09 13:35 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Sascha Hauer, Fabio Estevam, Rob Herring, Mark Rutland,
	Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

On Thu, Aug 04, 2016 at 12:22:37PM +0200, Fabien Lahoudere wrote:
> In order to use sdma with UART, we need to add DMA configuration in device tree.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>

Changed subject prefix to 'ARM: dts: imx53: ', and applied patch.

Shawn

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

* Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-09 13:35           ` Shawn Guo
  0 siblings, 0 replies; 37+ messages in thread
From: Shawn Guo @ 2016-08-09 13:35 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Sascha Hauer, Fabio Estevam, Rob Herring, Mark Rutland,
	Russell King,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

On Thu, Aug 04, 2016 at 12:22:37PM +0200, Fabien Lahoudere wrote:
> In order to use sdma with UART, we need to add DMA configuration in device tree.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>

Changed subject prefix to 'ARM: dts: imx53: ', and applied patch.

Shawn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART
@ 2016-08-09 13:35           ` Shawn Guo
  0 siblings, 0 replies; 37+ messages in thread
From: Shawn Guo @ 2016-08-09 13:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 04, 2016 at 12:22:37PM +0200, Fabien Lahoudere wrote:
> In order to use sdma with UART, we need to add DMA configuration in device tree.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>

Changed subject prefix to 'ARM: dts: imx53: ', and applied patch.

Shawn

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

* Re: [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
  2016-08-04 13:47       ` Fabien Lahoudere
  (?)
@ 2016-08-09 13:38         ` Shawn Guo
  -1 siblings, 0 replies; 37+ messages in thread
From: Shawn Guo @ 2016-08-09 13:38 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thu, Aug 04, 2016 at 03:47:32PM +0200, Fabien Lahoudere wrote:
> We have the following messages that tell csi devices are not used:
> imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0
> imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1
> 
> So we add them in the common device tree to make CSI ports available on
> imx53 boards.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>

Updated subject 'ARM: dts: imx53: ...', and applied patch.

Shawn

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

* Re: [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
@ 2016-08-09 13:38         ` Shawn Guo
  0 siblings, 0 replies; 37+ messages in thread
From: Shawn Guo @ 2016-08-09 13:38 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Russell King, open list, Rob Herring, Sascha Hauer,
	Fabio Estevam,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Thu, Aug 04, 2016 at 03:47:32PM +0200, Fabien Lahoudere wrote:
> We have the following messages that tell csi devices are not used:
> imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0
> imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1
> 
> So we add them in the common device tree to make CSI ports available on
> imx53 boards.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>

Updated subject 'ARM: dts: imx53: ...', and applied patch.

Shawn

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

* [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi
@ 2016-08-09 13:38         ` Shawn Guo
  0 siblings, 0 replies; 37+ messages in thread
From: Shawn Guo @ 2016-08-09 13:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Aug 04, 2016 at 03:47:32PM +0200, Fabien Lahoudere wrote:
> We have the following messages that tell csi devices are not used:
> imx-ipuv3 18000000.ipu: no port at 0 node in /soc/ipu at 18000000, not using CSI0
> imx-ipuv3 18000000.ipu: no port at 1 node in /soc/ipu at 18000000, not using CSI1
> 
> So we add them in the common device tree to make CSI ports available on
> imx53 boards.
> 
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>

Updated subject 'ARM: dts: imx53: ...', and applied patch.

Shawn

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

* Re: [PATCH 1/2] Allowing UART DMA to be configured on i.MX53
  2016-08-08  9:29               ` Fabien Lahoudere
  (?)
  (?)
@ 2016-08-31 13:53               ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2016-08-31 13:53 UTC (permalink / raw)
  To: Fabien Lahoudere
  Cc: festevam, Martyn Welch, Jiri Slaby, open list:SERIAL DRIVERS, open list

On Mon, Aug 08, 2016 at 11:29:25AM +0200, Fabien Lahoudere wrote:
> From: Martyn Welch <martyn.welch@collabora.co.uk>
> 
> The UART DMA was only being configured on i.MX6Q compatible devices. We
> know that the DMA also works for i.MX53 devices, so allow DMA to be
> configured on those devices too.
> 
> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> ---
>  drivers/tty/serial/imx.c | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)

You sent 3 copies of this?  Which do I apply?

Please resend your whole series, linked together, so that I know what
ones to apply, I've dropped all of your patches from my queue.

thanks,

greg k-h

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

end of thread, other threads:[~2016-08-31 13:53 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-03 14:13 [PATCH 1/2] Allowing UART DMA to be configured on i.MX53 Fabien Lahoudere
2016-08-03 14:13 ` Fabien Lahoudere
2016-08-03 14:13 ` [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART Fabien Lahoudere
2016-08-03 14:13   ` Fabien Lahoudere
2016-08-03 14:13   ` Fabien Lahoudere
2016-08-03 14:26   ` Fabio Estevam
2016-08-03 14:26     ` Fabio Estevam
2016-08-03 14:26     ` Fabio Estevam
2016-08-04 10:22     ` [PATCH v2 1/2] Allowing UART DMA to be configured on i.MX53 Fabien Lahoudere
2016-08-04 10:22       ` Fabien Lahoudere
2016-08-04 10:22       ` [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART Fabien Lahoudere
2016-08-04 10:22         ` Fabien Lahoudere
2016-08-04 10:22         ` Fabien Lahoudere
2016-08-04 10:49         ` Alexander Shiyan
2016-08-04 10:49           ` Alexander Shiyan
2016-08-04 10:49           ` Alexander Shiyan
2016-08-06 13:59           ` Fabio Estevam
2016-08-06 13:59             ` Fabio Estevam
2016-08-06 13:59             ` Fabio Estevam
2016-08-08  9:29             ` [PATCH 1/2] Allowing UART DMA to be configured on i.MX53 Fabien Lahoudere
2016-08-08  9:29               ` Fabien Lahoudere
2016-08-08  9:29               ` [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART Fabien Lahoudere
2016-08-08  9:29                 ` Fabien Lahoudere
2016-08-08  9:29                 ` Fabien Lahoudere
2016-08-31 13:53               ` [PATCH 1/2] Allowing UART DMA to be configured on i.MX53 Greg Kroah-Hartman
2016-08-09 13:35         ` [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART Shawn Guo
2016-08-09 13:35           ` Shawn Guo
2016-08-09 13:35           ` Shawn Guo
2016-08-04 13:47     ` [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi Fabien Lahoudere
2016-08-04 13:47       ` Fabien Lahoudere
2016-08-04 13:47       ` Fabien Lahoudere
2016-08-05  9:33       ` Philipp Zabel
2016-08-05  9:33         ` Philipp Zabel
2016-08-05  9:33         ` Philipp Zabel
2016-08-09 13:38       ` Shawn Guo
2016-08-09 13:38         ` Shawn Guo
2016-08-09 13:38         ` Shawn Guo

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.