Skip to contentSkip to conversation

OMAP serial device tree support

PATCH New Rajendra Nayak 9 participants 26 messages Dec 14, 2011 – Apr 11, 2012

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v3 cover OMAP serial device tree support

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

Patches can be found here..
git://gitorious.org/omap-pm/linux.git for-dt/serial

I also had to pull in a fix[2] for DT testing (already in linux-omap master) which was missing as the serial runtime branch[1] was based on an older master commit.

Changes in v3:
-1- Rebased on latest serial runtime patches
-2- Minor typr fixes

Changes in v2:
-1- Got rid of binding to define which uart is console -2- Added checks to default clock speed to 48Mhz -3- Added compatible for each OMAP family
-4- Used of_alias_get_id to populate port.line

[1] git://gitorious.org/runtime_3-0/runtime_3-0.git for_3_3/lo_rc4_uartruntime
[2] http://www.spinics.net/lists/arm-kernel/msg150751.html

Rajendra Nayak (4):
omap-serial: Get rid of all pdev->id usage
omap-serial: Use default clock speed (48Mhz) if not specified
omap-serial: Add minimal device tree support
ARM: omap: pass minimal SoC/board data for UART from dt

 .../devicetree/bindings/serial/omap_serial.txt     |   10 +++
 arch/arm/boot/dts/omap3.dtsi                       |   31 ++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   28 +++++++
 arch/arm/mach-omap2/board-generic.c                |    1 -
 drivers/tty/serial/omap-serial.c                   |   80 +++++++++++++++----
 5 files changed, 132 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt
#1 lore raw

PATCH v3 1/4 omap-serial: Get rid of all pdev->id usage

With Device tree, pdev->id would no longer be Valid. Hence get rid of all instances of its usage in the driver. Device tree support for the driver is added in subsequent patches.

---
 drivers/tty/serial/omap-serial.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
drivers/tty/serial/omap-serial.c +15 -15
index f3ff0ca..a02cc9f 100644
@@ -115,7 +115,7 @@ static void serial_omap_enable_ms(struct uart_port *port)
 {
 	struct uart_omap_port *up = (struct uart_omap_port *)port;
 
-	dev_dbg(up->port.dev, "serial_omap_enable_ms+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_enable_ms+%d\n", up->port.line);
 
 	pm_runtime_get_sync(&up->pdev->dev);
 	up->ier |= UART_IER_MSI;
@@ -418,7 +418,7 @@ static unsigned int serial_omap_tx_empty(struct uart_port *port)
 	unsigned int ret = 0;
 
 	pm_runtime_get_sync(&up->pdev->dev);
-	dev_dbg(up->port.dev, "serial_omap_tx_empty+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_tx_empty+%d\n", up->port.line);
 	spin_lock_irqsave(&up->port.lock, flags);
 	ret = serial_in(up, UART_LSR) & UART_LSR_TEMT ? TIOCSER_TEMT : 0;
 	spin_unlock_irqrestore(&up->port.lock, flags);
@@ -436,7 +436,7 @@ static unsigned int serial_omap_get_mctrl(struct uart_port *port)
 	status = check_modem_status(up);
 	pm_runtime_put(&up->pdev->dev);
 
-	dev_dbg(up->port.dev, "serial_omap_get_mctrl+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_get_mctrl+%d\n", up->port.line);
 
 	if (status & UART_MSR_DCD)
 		ret |= TIOCM_CAR;
@@ -454,7 +454,7 @@ static void serial_omap_set_mctrl(struct uart_port *port, unsigned int mctrl)
 	struct uart_omap_port *up = (struct uart_omap_port *)port;
 	unsigned char mcr = 0;
 
-	dev_dbg(up->port.dev, "serial_omap_set_mctrl+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_set_mctrl+%d\n", up->port.line);
 	if (mctrl & TIOCM_RTS)
 		mcr |= UART_MCR_RTS;
 	if (mctrl & TIOCM_DTR)
@@ -478,7 +478,7 @@ static void serial_omap_break_ctl(struct uart_port *port, int break_state)
 	struct uart_omap_port *up = (struct uart_omap_port *)port;
 	unsigned long flags = 0;
 
-	dev_dbg(up->port.dev, "serial_omap_break_ctl+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_break_ctl+%d\n", up->port.line);
 	pm_runtime_get_sync(&up->pdev->dev);
 	spin_lock_irqsave(&up->port.lock, flags);
 	if (break_state == -1)
@@ -504,7 +504,7 @@ static int serial_omap_startup(struct uart_port *port)
 	if (retval)
 		return retval;
 
-	dev_dbg(up->port.dev, "serial_omap_startup+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_startup+%d\n", up->port.line);
 
 	pm_runtime_get_sync(&up->pdev->dev);
 	/*
@@ -545,7 +545,7 @@ static int serial_omap_startup(struct uart_port *port)
 			0);
 		init_timer(&(up->uart_dma.rx_timer));
 		up->uart_dma.rx_timer.function = serial_omap_rxdma_poll;
-		up->uart_dma.rx_timer.data = up->pdev->id;
+		up->uart_dma.rx_timer.data = up->port.line;
 		/* Currently the buffer size is 4KB. Can increase it */
 		up->uart_dma.rx_buf = dma_alloc_coherent(NULL,
 			up->uart_dma.rx_buf_size,
@@ -573,7 +573,7 @@ static void serial_omap_shutdown(struct uart_port *port)
 	struct uart_omap_port *up = (struct uart_omap_port *)port;
 	unsigned long flags = 0;
 
-	dev_dbg(up->port.dev, "serial_omap_shutdown+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_shutdown+%d\n", up->port.line);
 
 	pm_runtime_get_sync(&up->pdev->dev);
 	/*
@@ -883,7 +883,7 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
 
 	spin_unlock_irqrestore(&up->port.lock, flags);
 	pm_runtime_put(&up->pdev->dev);
-	dev_dbg(up->port.dev, "serial_omap_set_termios+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_set_termios+%d\n", up->port.line);
 }
 
 static void
@@ -893,7 +893,7 @@ serial_omap_pm(struct uart_port *port, unsigned int state,
 	struct uart_omap_port *up = (struct uart_omap_port *)port;
 	unsigned char efr;
 
-	dev_dbg(up->port.dev, "serial_omap_pm+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_pm+%d\n", up->port.line);
 
 	pm_runtime_get_sync(&up->pdev->dev);
 	serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
@@ -932,7 +932,7 @@ static void serial_omap_config_port(struct uart_port *port, int flags)
 	struct uart_omap_port *up = (struct uart_omap_port *)port;
 
 	dev_dbg(up->port.dev, "serial_omap_config_port+%d\n",
-							up->pdev->id);
+							up->port.line);
 	up->port.type = PORT_OMAP;
 }
 
@@ -949,7 +949,7 @@ serial_omap_type(struct uart_port *port)
 {
 	struct uart_omap_port *up = (struct uart_omap_port *)port;
 
-	dev_dbg(up->port.dev, "serial_omap_type+%d\n", up->pdev->id);
+	dev_dbg(up->port.dev, "serial_omap_type+%d\n", up->port.line);
 	return up->name;
 }
 
@@ -1110,7 +1110,7 @@ static struct console serial_omap_console = {
 
 static void serial_omap_add_console_port(struct uart_omap_port *up)
 {
-	serial_omap_console_ports[up->pdev->id] = up;
+	serial_omap_console_ports[up->port.line] = up;
 }
 
 #define OMAP_CONSOLE	(&serial_omap_console)
@@ -1364,7 +1364,6 @@ static int serial_omap_probe(struct platform_device *pdev)
 		ret = -ENOMEM;
 		goto do_release_region;
 	}
-	sprintf(up->name, "OMAP UART%d", pdev->id);
 	up->pdev = pdev;
 	up->port.dev = &pdev->dev;
 	up->port.type = PORT_OMAP;
@@ -1375,6 +1374,7 @@ static int serial_omap_probe(struct platform_device *pdev)
 	up->port.fifosize = 64;
 	up->port.ops = &serial_omap_pops;
 	up->port.line = pdev->id;
+	sprintf(up->name, "OMAP UART%d", up->port.line);
 
 	up->port.mapbase = mem->start;
 	up->port.membase = ioremap(mem->start, resource_size(mem));
@@ -1417,7 +1417,7 @@ static int serial_omap_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	pm_runtime_get_sync(&pdev->dev);
 
-	ui[pdev->id] = up;
+	ui[up->port.line] = up;
 	serial_omap_add_console_port(up);
 
 	ret = uart_add_one_port(&serial_omap_reg, &up->port);
Signature · 1 line
1.7.1
#2 lore raw

PATCH v3 2/4 omap-serial: Use default clock speed (48Mhz) if not specified

In reply to Rajendra Nayak

Use a default clock speed of 48Mhz, instead of ending up with 0, if platforms fail to specify a valid clock speed.

---
 drivers/tty/serial/omap-serial.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/tty/serial/omap-serial.c +7 -0
index a02cc9f..f14b9c5 100644
@@ -43,6 +43,8 @@
 #include <plat/dmtimer.h>
 #include <plat/omap-serial.h>
 
+#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/
+
 static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];
 
 /* Forward declaration of functions */
@@ -1386,6 +1388,11 @@ static int serial_omap_probe(struct platform_device *pdev)
 
 	up->port.flags = omap_up_info->flags;
 	up->port.uartclk = omap_up_info->uartclk;
+	if (!up->port.uartclk) {
+		up->port.uartclk = DEFAULT_CLK_SPEED;
+		dev_warn(&pdev->dev, "No clock speed specified: using default:"
+						"%d\n", DEFAULT_CLK_SPEED);
+	}
 	up->uart_dma.uart_base = mem->start;
 	up->errata = omap_up_info->errata;
 
Signature · 1 line
1.7.1
#3 lore raw

PATCH v3 3/4 omap-serial: Add minimal device tree support

In reply to Rajendra Nayak

Adapt the driver to device tree and pass minimal platform data from device tree needed for console boot. No power management features will be suppported for now since it requires more tweaks around OCP settings to toggle forceidle/noidle/smartidle bits and handling remote wakeup and dynamic muxing.

---
 .../devicetree/bindings/serial/omap_serial.txt     |   10 ++++
 drivers/tty/serial/omap-serial.c                   |   45 ++++++++++++++++++-
 2 files changed, 52 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt
Documentation/devicetree/bindings/serial/omap_serial.txt new file +10 -0
new file mode 100644
index 0000000..342eedd
@@ -0,0 +1,10 @@
+OMAP UART controller
+
+Required properties:
+- compatible : should be "ti,omap2-uart" for OMAP2 controllers
+- compatible : should be "ti,omap3-uart" for OMAP3 controllers
+- compatible : should be "ti,omap4-uart" for OMAP4 controllers
+- ti,hwmods : Must be "uart<n>", n being the instance number (1-based)
+
+Optional properties:
+- clock-frequency : frequency of the clock input to the UART
drivers/tty/serial/omap-serial.c +42 -3

88 lines not on this page · raw message

Signature · 1 line
1.7.1
#4 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

In reply to Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

---
 arch/arm/boot/dts/omap3.dtsi        |   31 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/omap4.dtsi        |   28 ++++++++++++++++++++++++++++
 arch/arm/mach-omap2/board-generic.c |    1 -
 3 files changed, 59 insertions(+), 1 deletions(-)
arch/arm/boot/dts/omap3.dtsi +31 -0
index d202bb5..216c331 100644
@@ -13,6 +13,13 @@
 / {
 	compatible = "ti,omap3430", "ti,omap3";
 
+	aliases {
+		serial0 = &uart1;
+		serial1 = &uart2;
+		serial2 = &uart3;
+		serial3 = &uart4;
+	};
+
 	cpus {
 		cpu at 0 {
 			compatible = "arm,cortex-a8";
@@ -59,5 +66,29 @@
 			interrupt-controller;
 			#interrupt-cells = <1>;
 		};
+
+		uart1: serial at 0x4806a000 {
+			compatible = "ti,omap3-uart";
+			ti,hwmods = "uart1";
+			clock-frequency = <48000000>;
+		};
+
+		uart2: serial at 0x4806c000 {
+			compatible = "ti,omap3-uart";
+			ti,hwmods = "uart2";
+			clock-frequency = <48000000>;
+		};
+
+		uart3: serial at 0x49020000 {
+			compatible = "ti,omap3-uart";
+			ti,hwmods = "uart3";
+			clock-frequency = <48000000>;
+		};
+
+		uart4: serial at 0x49042000 {
+			compatible = "ti,omap3-uart";
+			ti,hwmods = "uart4";
+			clock-frequency = <48000000>;
+		};
 	};
 };
arch/arm/boot/dts/omap4.dtsi +28 -0
index 4c61c82..e8fe75f 100644
@@ -21,6 +21,10 @@
 	interrupt-parent = <&gic>;
 
 	aliases {
+		serial0 = &uart1;
+		serial1 = &uart2;
+		serial2 = &uart3;
+		serial3 = &uart4;
 	};
 
 	cpus {
@@ -99,5 +103,29 @@
 			reg = <0x48241000 0x1000>,
 			      <0x48240100 0x0100>;
 		};
+
+		uart1: serial at 0x4806a000 {
+			compatible = "ti,omap4-uart";
+			ti,hwmods = "uart1";
+			clock-frequency = <48000000>;
+		};
+
+		uart2: serial at 0x4806c000 {
+			compatible = "ti,omap4-uart";
+			ti,hwmods = "uart2";
+			clock-frequency = <48000000>;
+		};
+
+		uart3: serial at 0x48020000 {
+			compatible = "ti,omap4-uart";
+			ti,hwmods = "uart3";
+			clock-frequency = <48000000>;
+		};
+
+		uart4: serial at 0x4806e000 {
+			compatible = "ti,omap4-uart";
+			ti,hwmods = "uart4";
+			clock-frequency = <48000000>;
+		};
 	};
 };
arch/arm/mach-omap2/board-generic.c +0 -1
index 63b5416..a508ed5 100644
@@ -69,7 +69,6 @@ static void __init omap_generic_init(void)
 	if (node)
 		irq_domain_add_simple(node, 0);
 
-	omap_serial_init();
 	omap_sdrc_init(NULL, NULL);
 
 	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
Signature · 1 line
1.7.1
maintainer
#5 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 6 lines · Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

This we can't merge because this breaks serial console for omap2 because you're not adding the omap2 specific dtsi entries for omap2..

arch/arm/mach-omap2/board-generic.c static void __init omap_generic_init(void) · line 74

Quoted 10 lines
arch/arm/mach-omap2/board-generic.c +0 -1
@@ -69,7 +69,6 @@ static void __init omap_generic_init(void)
 	if (node)
 		irq_domain_add_simple(node, 0);
 
-	omap_serial_init();
 	omap_sdrc_init(NULL, NULL);
 
 	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);

..and you're removing the call for omap_serial_init.

Please just update this patch with the omap2 entries as well. Other than that looks good to me.

Tony

#6 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 11 lines · Tony Lindgren
Quoted 6 lines · Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

This we can't merge because this breaks serial console for omap2 because you're not adding the omap2 specific dtsi entries for omap2..

But we never had omap2 working with DT, because we never added a .dtsi file for omap2 or a .dts file for any omap2 board variants.

Until now the DT support on OMAP has been limited to OMAP3 and OMAP4 with boards limited to omap3beagle/omap4Panda and omap4sdp.

So when we do add base support for omap2, we could update those with the serial entries.

Quoted 18 lines

arch/arm/mach-omap2/board-generic.c static void __init omap_generic_init(void) · line 74

Quoted 11 lines
arch/arm/mach-omap2/board-generic.c +0 -1
@@ -69,7 +69,6 @@ static void __init omap_generic_init(void)
  	if (node)
  		irq_domain_add_simple(node, 0);
 
-	omap_serial_init();
  	omap_sdrc_init(NULL, NULL);
 
  	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);

..and you're removing the call for omap_serial_init.

Please just update this patch with the omap2 entries as well. Other than that looks good to me.

Tony

#7 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

Hi Tony,

Quoted 13 lines · Rajendra Nayak
Quoted 11 lines · Tony Lindgren
Quoted 6 lines · Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

This we can't merge because this breaks serial console for omap2 because you're not adding the omap2 specific dtsi entries for omap2..

Quoted 8 lines

But we never had omap2 working with DT, because we never added a .dtsi file for omap2 or a .dts file for any omap2 board variants.

Until now the DT support on OMAP has been limited to OMAP3 and OMAP4 with boards limited to omap3beagle/omap4Panda and omap4sdp.

So when we do add base support for omap2, we could update those with the serial entries.

I'm quite confused as well... Have you tried the current 3.2 kernel on an OMAP2 board?

So far I've been taking care of keeping the OMAP2 support into the board-generic.c file, but I've never added any omap2.dtsi or omap2-board.dts file to support it.

Regards,
Benoit

maintainer
#8 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 25 lines · Cousson, Benoit

Hi Tony,

Quoted 13 lines · Rajendra Nayak
Quoted 11 lines · Tony Lindgren
Quoted 6 lines · Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

This we can't merge because this breaks serial console for omap2 because you're not adding the omap2 specific dtsi entries for omap2..

Quoted 8 lines

But we never had omap2 working with DT, because we never added a .dtsi file for omap2 or a .dts file for any omap2 board variants.

Until now the DT support on OMAP has been limited to OMAP3 and OMAP4 with boards limited to omap3beagle/omap4Panda and omap4sdp.

So when we do add base support for omap2, we could update those with the serial entries.

Quoted 6 lines

I'm quite confused as well... Have you tried the current 3.2 kernel on an OMAP2 board?

So far I've been taking care of keeping the OMAP2 support into the board-generic.c file, but I've never added any omap2.dtsi or omap2-board.dts file to support it.

Yeah adding it is trivial, so let's just add it :)

How about we just add the following patch before the last patch in this series?

I don't have iva there as that's different between 2420 and 2430. But omap2.dtsi can be included later on into omap2420.dtsi and omap2430.dtsi.

Regards,

Tony

From: Tony Lindgren <[email protected]>
Date: Thu, 15 Dec 2011 12:48:43 -0800
Subject: [PATCH] arm/dts: Add minimal device tree support for omap2420 and omap2430

Add minimal device tree support for omap2420 and omap2430

arch/arm/boot/dts/omap2.dtsi new file +67 -0
@@ -0,0 +1,67 @@
+/*
+ * Device Tree Source for OMAP2 SoC
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,omap2430", "ti,omap2420", "ti,omap2";
+
+	aliases {
+		serial0 = &uart1;
+		serial1 = &uart2;
+		serial2 = &uart3;
+	};
+
+	cpus {
+		cpu at 0 {
+			compatible = "arm,arm1136jf-s";
+		};
+	};
+
+	soc {
+		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap2-mpu";
+			ti,hwmods = "mpu";
+		};
+	};
+
+	ocp {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		ti,hwmods = "l3_main";
+
+		intc: interrupt-controller at 1 {
+			compatible = "ti,omap2-intc";
+			interrupt-controller;
+			#interrupt-cells = <1>;
+		};
+
+		uart1: serial at 0x4806a000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart1";
+			clock-frequency = <48000000>;
+		};
+
+		uart2: serial at 0x4806c000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart2";
+			clock-frequency = <48000000>;
+		};
+
+		uart3: serial at 0x4806e000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart3";
+			clock-frequency = <48000000>;
+		};
+	};
+};
#9 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 26 lines · Tony Lindgren
Quoted 25 lines · Cousson, Benoit

Hi Tony,

Quoted 21 lines · Rajendra Nayak
Quoted 11 lines · Tony Lindgren
Quoted 6 lines · Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

This we can't merge because this breaks serial console for omap2 because you're not adding the omap2 specific dtsi entries for omap2..

But we never had omap2 working with DT, because we never added a .dtsi file for omap2 or a .dts file for any omap2 board variants.

Until now the DT support on OMAP has been limited to OMAP3 and OMAP4 with boards limited to omap3beagle/omap4Panda and omap4sdp.

So when we do add base support for omap2, we could update those with the serial entries.

Quoted 8 lines
Quoted 6 lines

I'm quite confused as well... Have you tried the current 3.2 kernel on an OMAP2 board?

So far I've been taking care of keeping the OMAP2 support into the board-generic.c file, but I've never added any omap2.dtsi or omap2-board.dts file to support it.

Yeah adding it is trivial, so let's just add it :)

Well, why not :-)

Quoted 62 lines

How about we just add the following patch before the last patch in this series?

I don't have iva there as that's different between 2420 and 2430. But omap2.dtsi can be included later on into omap2420.dtsi and omap2430.dtsi.

Regards,

Tony

From: Tony Lindgren<[email protected]>
Date: Thu, 15 Dec 2011 12:48:43 -0800
Subject: [PATCH] arm/dts: Add minimal device tree support for omap2420 and omap2430

Add minimal device tree support for omap2420 and omap2430

arch/arm/boot/dts/omap2.dtsi new file +39 -0
@@ -0,0 +1,67 @@
+/*
+ * Device Tree Source for OMAP2 SoC
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,omap2430", "ti,omap2420", "ti,omap2";
+
+	aliases {
+		serial0 =&uart1;
+		serial1 =&uart2;
+		serial2 =&uart3;
+	};
+
+	cpus {
+		cpu at 0 {
+			compatible = "arm,arm1136jf-s";
+		};
+	};
+
+	soc {
+		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap2-mpu";
+			ti,hwmods = "mpu";
+		};
+	};
+
+	ocp {
+		compatible = "simple-bus";
+		#address-cells =<1>;
+		#size-cells =<1>;

arch/arm/boot/dts/omap2.dtsi line 49

Quoted 10 lines
arch/arm/boot/dts/omap2.dtsi new file +10 -0
+		ranges;
+		ti,hwmods = "l3_main";
+
+		intc: interrupt-controller at 1 {
+			compatible = "ti,omap2-intc";
+			interrupt-controller;
+			#interrupt-cells =<1>;
+		};
+
+		uart1: serial at 0x4806a000 {

Nit: The convention is without the 0x prefix.

Beside that, that looks good top me. But I'll not be able to try it :-)

Regards,
Benoit

maintainer
#10 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 2 lines · Cousson, Benoit

Nit: The convention is without the 0x prefix.

OK will post an updated version as a reply to this email.

Quoted 1 line

Beside that, that looks good top me. But I'll not be able to try it :-)

Boots fine with the following n8x0.dts patch. Currently MMC of course won't mount and the file should be separate for n800 and and n810.. So this patch is not yet quite ready to go.

Regards,

Tony

From: Tony Lindgren <[email protected]>
Date: Thu, 15 Dec 2011 13:04:31 -0800
Subject: [PATCH] arm/dts: Add minimal n8x0 device tree support

Add minimal n8x0 device tree support

arch/arm/boot/dts/nokia-n8x0.dts new file +17 -0
@@ -0,0 +1,17 @@
+/dts-v1/;
+
+/include/ "omap2.dtsi"
+
+/ {
+	model = "Nokia N8x0";
+	compatible = "nokia,n8x0", "ti,omap2420", "ti,omap2";
+
+	chosen {
+		bootargs = "root=/dev/mmcblk2p2 rw console=ttyO2,115200n8 debug earlyprintk";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x08000000>; /* 128 MB */
+	};
+};
maintainer
#11 lore raw

PATCH 1/1 arm/dts: Add minimal device tree support for omap2420 and omap2430

Add minimal device tree support for omap2420 and omap2430

arch/arm/boot/dts/omap2.dtsi new file +67 -0
@@ -0,0 +1,67 @@
+/*
+ * Device Tree Source for OMAP2 SoC
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,omap2430", "ti,omap2420", "ti,omap2";
+
+	aliases {
+		serial0 = &uart1;
+		serial1 = &uart2;
+		serial2 = &uart3;
+	};
+
+	cpus {
+		cpu at 0 {
+			compatible = "arm,arm1136jf-s";
+		};
+	};
+
+	soc {
+		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap2-mpu";
+			ti,hwmods = "mpu";
+		};
+	};
+
+	ocp {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		ti,hwmods = "l3_main";
+
+		intc: interrupt-controller at 1 {
+			compatible = "ti,omap2-intc";
+			interrupt-controller;
+			#interrupt-cells = <1>;
+		};
+
+		uart1: serial at 4806a000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart1";
+			clock-frequency = <48000000>;
+		};
+
+		uart2: serial at 4806c000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart2";
+			clock-frequency = <48000000>;
+		};
+
+		uart3: serial at 4806e000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart3";
+			clock-frequency = <48000000>;
+		};
+	};
+};
#12 lore raw

PATCH 1/1 arm/dts: Add minimal device tree support for omap2420 and omap2430

Quoted 1 line · Tony Lindgren

Add minimal device tree support for omap2420 and omap2430

Looks good to me.

Quoted 73 lines
arch/arm/boot/dts/omap2.dtsi new file +67 -0
@@ -0,0 +1,67 @@
+/*
+ * Device Tree Source for OMAP2 SoC
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,omap2430", "ti,omap2420", "ti,omap2";
+
+	aliases {
+		serial0 =&uart1;
+		serial1 =&uart2;
+		serial2 =&uart3;
+	};
+
+	cpus {
+		cpu at 0 {
+			compatible = "arm,arm1136jf-s";
+		};
+	};
+
+	soc {
+		compatible = "ti,omap-infra";
+		mpu {
+			compatible = "ti,omap2-mpu";
+			ti,hwmods = "mpu";
+		};
+	};
+
+	ocp {
+		compatible = "simple-bus";
+		#address-cells =<1>;
+		#size-cells =<1>;
+		ranges;
+		ti,hwmods = "l3_main";
+
+		intc: interrupt-controller at 1 {
+			compatible = "ti,omap2-intc";
+			interrupt-controller;
+			#interrupt-cells =<1>;
+		};
+
+		uart1: serial at 4806a000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart1";
+			clock-frequency =<48000000>;
+		};
+
+		uart2: serial at 4806c000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart2";
+			clock-frequency =<48000000>;
+		};
+
+		uart3: serial at 4806e000 {
+			compatible = "ti,omap2-uart";
+			ti,hwmods = "uart3";
+			clock-frequency =<48000000>;
+		};
+	};
+};
#13 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

In reply to Rajendra Nayak

Hi Rajendra,

Just one minor comment if you plan to repost.

Quoted 6 lines · Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

Quoted 24 lines
  arch/arm/boot/dts/omap3.dtsi        |   31 +++++++++++++++++++++++++++++++
  arch/arm/boot/dts/omap4.dtsi        |   28 ++++++++++++++++++++++++++++
  arch/arm/mach-omap2/board-generic.c |    1 -
  3 files changed, 59 insertions(+), 1 deletions(-)
arch/arm/boot/dts/omap3.dtsi +7 -0
index d202bb5..216c331 100644
@@ -13,6 +13,13 @@
  / {
  	compatible = "ti,omap3430", "ti,omap3";
 
+	aliases {
+		serial0 =&uart1;
+		serial1 =&uart2;
+		serial2 =&uart3;
+		serial3 =&uart4;
+	};
+
  	cpus {
  		cpu at 0 {
  			compatible = "arm,cortex-a8";

arch/arm/boot/dts/omap3.dtsi line 70

Quoted 5 lines
arch/arm/boot/dts/omap3.dtsi +2 -0
@@ -59,5 +66,29 @@
  			interrupt-controller;
  			#interrupt-cells =<1>;
  		};
+
+		uart1: serial at 0x4806a000 {

Could you get rid of the 0x prefix for consistency? This is applicable for the omap4.dtsi as well.

Thanks,
Benoit

#14 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

In reply to Rajendra Nayak

Hi,

Quoted 3 lines · Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

...

Quoted 13 lines
arch/arm/mach-omap2/board-generic.c +0 -2
index 63b5416..a508ed5 100644
@@ -69,7 +69,6 @@ static void __init omap_generic_init(void)
 ? ? ? ?if (node)
 ? ? ? ? ? ? ? ?irq_domain_add_simple(node, 0);
 
- ? ? ? omap_serial_init();
 ? ? ? ?omap_sdrc_init(NULL, NULL);
 
 ? ? ? ?of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
--
Quoted 1 line

1.7.1

I'm fairly new to DT and I'm trying to boot it with pandaboard and k3.3, however above hunk deletes omap serial initialization, which causes a panic on boot, because pdata is NULL:

static void serial_omap_start_tx(struct uart_port *port) {
...

                if (pdata->set_noidle)

Perhaps because this change skips the following path:

omap_serial_init->omap_serial_board_init->omap_serial_init_port

Where pdata is built in omap_device_build.

I'm just trying to confirm that I'm not alone or doing some silly thing before getting in depth with the code.

Here it is the panic:

[    2.024688] Unable to handle kernel NULL pointer dereference at
virtual address 00000028
[    2.031005] pgd = ed6f0000
[    2.036315] [00000028] *pgd=af339831, *pte=00000000, *ppte=00000000
[    2.042907] Internal error: Oops: 17 [#1] SMP
[    2.046630] Modules linked in:
[    2.046630] CPU: 0    Not tainted  (3.3.0-00002-gda19af1-dirty #11)
[    2.046630] PC is at serial_omap_start_tx+0x1cc/0x218
[    2.046630] LR is at serial_omap_start_tx+0x1b8/0x218
[    2.067840] pc : [<c02b3a54>]    lr : [<c02b3a40>]    psr: 60000193
[    2.067840] sp : c21cbe70  ip : 00000001  fp : a0000113
[    2.073699] r10: ef107000  r9 : ed684600  r8 : 0000001c
[    2.085327] r7 : 00000002  r6 : 00000007  r5 : 00000000  r4 : ed684600
[    2.086029] r3 : ef1281c0  r2 : fa020000  r1 : 00000004  r0 : c02b3a40
[    2.086029] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment user
[    2.101684] Control: 10c53c7d  Table: ad6f004a  DAC: 00000015
[    2.101684] Process S10udev (pid: 497, stack limit = 0xc21ca2f8)
[    2.116973] Stack: (0xc21cbe70 to 0xc21cc000)
[    2.123443] be60:                                     a0000113
c0475b74 00000002 00000000
[    2.126007] be80: c02ac7e0 ef107000 ed684600 20000113 00000000
c02ac830 00000000 ed690ad0
[    2.139099] bea0: ed6e981c c02ae348 c02ae288 ef107000 c21ca000
0000001c ed6e9800 ef1074fc
[    2.145385] bec0: c049cab4 ef1dcd80 ed6e9800 c0296aa8 60000113
c02925e8 ef107194 ef107120
[    2.152191] bee0: ef0003c0 00000000 ef1281c0 c0076214 ef1071b4
ef1071b4 ef1074b4 ef1dcd80
[    2.159790] bf00: ef107000 b6f5c000 0000001c c21ca000 00000400
00000000 c02968c8 c0292638
[    2.159790] bf20: c06e3ea0 0000001c c02968c8 ef168b80 c21cbf80
00000000 ef1281c0 ef1dcd80
[    2.175811] bf40: 0000001c b6f5c000 c21cbf80 00000000 00000000
00000000 00000000 c010841c
[    2.188476] bf60: c0014400 ef1281c0 ef1dcd80 b6f5c000 0000001c
00000004 00000000 c0108570
[    2.195068] bf80: 00000000 00000000 0000001c 00000000 0000001c
b6f345c8 0000001c c00144a8
[    2.195068] bfa0: c21ca000 c00142e0 0000001c b6f345c8 00000001
b6f5c000 0000001c 00000000
[    2.210723] bfc0: 0000001c b6f345c8 0000001c 00000004 b6f5c000
00000000 00000001 00000000
[    2.210723] bfe0: 00000000 be988948 b6e5ae98 b6eb7adc 60000110
00000001 89389af9 fef855e7
[    2.226379] [<c02b3a54>] (serial_omap_start_tx+0x1cc/0x218) from
[<c02ac830>] (uart_start+0x68/0x6c)
[    2.241973] [<c02ac830>] (uart_start+0x68/0x6c) from [<c02ae348>]
(uart_write+0xc0/0xe4)
[    2.241973] [<c02ae348>] (uart_write+0xc0/0xe4) from [<c0296aa8>]
(n_tty_write+0x1e0/0x42c)
[    2.257629] [<c0296aa8>] (n_tty_write+0x1e0/0x42c) from
[<c0292638>] (tty_write+0x140/0x23c)
[    2.270446] [<c0292638>] (tty_write+0x140/0x23c) from [<c010841c>]
(vfs_write+0xb0/0x134)
[    2.278594] [<c010841c>] (vfs_write+0xb0/0x134) from [<c0108570>]
(sys_write+0x40/0x70)
[    2.281311] [<c0108570>] (sys_write+0x40/0x70) from [<c00142e0>]

(ret_fast_syscall+0x0/0x3c)

Regards,

Omar

#15 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

Hi Omar,

Quoted 31 lines · Omar

Hi,

Quoted 3 lines · Rajendra Nayak

Pass minimal data needed for console boot, from dt, for OMAP4 panda/sdp and OMAP3 beagle boards, and get rid of the static initialization from generic board file.

...

Quoted 13 lines
arch/arm/mach-omap2/board-generic.c +0 -2
index 63b5416..a508ed5 100644
@@ -69,7 +69,6 @@ static void __init omap_generic_init(void)
        if (node)
                irq_domain_add_simple(node, 0);
 
-       omap_serial_init();
        omap_sdrc_init(NULL, NULL);
 
        of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
--
Quoted 1 line

1.7.1

I'm fairly new to DT and I'm trying to boot it with pandaboard and k3.3, however above hunk deletes omap serial initialization, which causes a panic on boot, because pdata is NULL:

static void serial_omap_start_tx(struct uart_port *port) {
...

                 if (pdata->set_noidle)
Quoted 8 lines

Perhaps because this change skips the following path:

omap_serial_init->omap_serial_board_init->omap_serial_init_port

Where pdata is built in omap_device_build.

I'm just trying to confirm that I'm not alone or doing some silly thing before getting in depth with the code.

Yes, it is a known issue and the fix was unfortunately was not merged during -rc phases but is fixed in 3.4 and should be fixed in 3.3 stable branch as well. I received the notification from Greg KH 2 weeks ago about the stable: Patch "tty: serial: OMAP: Fix oops due to NULL pdata in DT boot" has been added to the 3.3-stable tree

You should just switch to 3.4-rc2 or get the patch if you are stuck to 3.3.

Regards,
Benoit

#16 lore raw

PATCH v3 4/4 ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 7 lines · Benoit

Yes, it is a known issue and the fix was unfortunately was not merged during -rc phases but is fixed in 3.4 and should be fixed in 3.3 stable branch as well. I received the notification from Greg KH 2 weeks ago about the stable:
Patch "tty: serial: OMAP: Fix oops due to NULL pdata in DT boot" has been added to the 3.3-stable tree

You should just switch to 3.4-rc2 or get the patch if you are stuck to 3.3.

Thanks, switching to 3.4-rc kernels fixed the problem (for cramfs), and right now this works for me.

Regards,

Omar

#17 lore raw

v3 cover OMAP serial device tree support

In reply to Rajendra Nayak
Quoted 30 lines · Rajendra Nayak

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

Patches can be found here..
git://gitorious.org/omap-pm/linux.git for-dt/serial

I also had to pull in a fix[2] for DT testing (already in linux-omap master) which was missing as the serial runtime branch[1] was based on an older master commit.

Changes in v3:
-1- Rebased on latest serial runtime patches
-2- Minor typr fixes

Changes in v2:
-1- Got rid of binding to define which uart is console -2- Added checks to default clock speed to 48Mhz -3- Added compatible for each OMAP family
-4- Used of_alias_get_id to populate port.line

[1] git://gitorious.org/runtime_3-0/runtime_3-0.git for_3_3/lo_rc4_uartruntime
[2] http://www.spinics.net/lists/arm-kernel/msg150751.html

Rajendra Nayak (4):
omap-serial: Get rid of all pdev->id usage
omap-serial: Use default clock speed (48Mhz) if not specified
omap-serial: Add minimal device tree support
ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 7 lines
 .../devicetree/bindings/serial/omap_serial.txt     |   10 +++
 arch/arm/boot/dts/omap3.dtsi                       |   31 ++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   28 +++++++
 arch/arm/mach-omap2/board-generic.c                |    1 -
 drivers/tty/serial/omap-serial.c                   |   80 +++++++++++++++----
 5 files changed, 132 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt

Looks good. For the series:

maintainer
#18 lore raw

v3 cover OMAP serial device tree support

Rob,

Quoted 39 lines · Rob Herring
Quoted 30 lines · Rajendra Nayak

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

Patches can be found here..
git://gitorious.org/omap-pm/linux.git for-dt/serial

I also had to pull in a fix[2] for DT testing (already in linux-omap master) which was missing as the serial runtime branch[1] was based on an older master commit.

Changes in v3:
-1- Rebased on latest serial runtime patches
-2- Minor typr fixes

Changes in v2:
-1- Got rid of binding to define which uart is console -2- Added checks to default clock speed to 48Mhz -3- Added compatible for each OMAP family
-4- Used of_alias_get_id to populate port.line

[1] git://gitorious.org/runtime_3-0/runtime_3-0.git for_3_3/lo_rc4_uartruntime
[2] http://www.spinics.net/lists/arm-kernel/msg150751.html

Rajendra Nayak (4):
omap-serial: Get rid of all pdev->id usage
omap-serial: Use default clock speed (48Mhz) if not specified
omap-serial: Add minimal device tree support
ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 7 lines
 .../devicetree/bindings/serial/omap_serial.txt     |   10 +++
 arch/arm/boot/dts/omap3.dtsi                       |   31 ++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   28 +++++++
 arch/arm/mach-omap2/board-generic.c                |    1 -
 drivers/tty/serial/omap-serial.c                   |   80 +++++++++++++++----
 5 files changed, 132 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt
Quoted 3 lines

Looks good. For the series:

Care to check if your Reviewed-by can also be applied to the additional patch "[PATCH] arm/dts: Add minimal device tree support for omap2420 and omap2430" that's needed to keep serial port working for omap2 with this series?

Regards,

Tony

#19 lore raw

v3 cover OMAP serial device tree support

Tony,

Quoted 42 lines · Tony Lindgren

Rob,

Quoted 39 lines · Rob Herring
Quoted 37 lines · Rajendra Nayak

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

Patches can be found here..
git://gitorious.org/omap-pm/linux.git for-dt/serial

I also had to pull in a fix[2] for DT testing (already in linux-omap master) which was missing as the serial runtime branch[1] was based on an older master commit.

Changes in v3:
-1- Rebased on latest serial runtime patches
-2- Minor typr fixes

Changes in v2:
-1- Got rid of binding to define which uart is console -2- Added checks to default clock speed to 48Mhz -3- Added compatible for each OMAP family
-4- Used of_alias_get_id to populate port.line

[1] git://gitorious.org/runtime_3-0/runtime_3-0.git for_3_3/lo_rc4_uartruntime
[2] http://www.spinics.net/lists/arm-kernel/msg150751.html

Rajendra Nayak (4):
omap-serial: Get rid of all pdev->id usage
omap-serial: Use default clock speed (48Mhz) if not specified
omap-serial: Add minimal device tree support
ARM: omap: pass minimal SoC/board data for UART from dt

 .../devicetree/bindings/serial/omap_serial.txt     |   10 +++
 arch/arm/boot/dts/omap3.dtsi                       |   31 ++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   28 +++++++
 arch/arm/mach-omap2/board-generic.c                |    1 -
 drivers/tty/serial/omap-serial.c                   |   80 +++++++++++++++----
 5 files changed, 132 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt
Quoted 8 lines
Quoted 3 lines

Looks good. For the series:

Care to check if your Reviewed-by can also be applied to the additional patch "[PATCH] arm/dts: Add minimal device tree support for omap2420 and omap2430" that's needed to keep serial port working for omap2 with this series?

It looks fine.

Rob

maintainer
#20 lore raw

v3 cover OMAP serial device tree support

Quoted 47 lines · Rob Herring

Tony,

Quoted 44 lines · Tony Lindgren

Rob,

Quoted 41 lines · Rob Herring
Quoted 30 lines · Rajendra Nayak

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

Patches can be found here..
git://gitorious.org/omap-pm/linux.git for-dt/serial

I also had to pull in a fix[2] for DT testing (already in linux-omap master) which was missing as the serial runtime branch[1] was based on an older master commit.

Changes in v3:
-1- Rebased on latest serial runtime patches
-2- Minor typr fixes

Changes in v2:
-1- Got rid of binding to define which uart is console -2- Added checks to default clock speed to 48Mhz -3- Added compatible for each OMAP family
-4- Used of_alias_get_id to populate port.line

[1] git://gitorious.org/runtime_3-0/runtime_3-0.git for_3_3/lo_rc4_uartruntime
[2] http://www.spinics.net/lists/arm-kernel/msg150751.html

Rajendra Nayak (4):
omap-serial: Get rid of all pdev->id usage
omap-serial: Use default clock speed (48Mhz) if not specified
omap-serial: Add minimal device tree support
ARM: omap: pass minimal SoC/board data for UART from dt

Quoted 7 lines
 .../devicetree/bindings/serial/omap_serial.txt     |   10 +++
 arch/arm/boot/dts/omap3.dtsi                       |   31 ++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   28 +++++++
 arch/arm/mach-omap2/board-generic.c                |    1 -
 drivers/tty/serial/omap-serial.c                   |   80 +++++++++++++++----
 5 files changed, 132 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt

Looks good. For the series:

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Care to check if your Reviewed-by can also be applied to the additional patch "[PATCH] arm/dts: Add minimal device tree support for omap2420 and omap2430" that's needed to keep serial port working for omap2 with this series?

It looks fine.

OK thanks.

Tony

#21 lore raw

v3 cover OMAP serial device tree support

In reply to Rajendra Nayak

Hi Rajendra,

Quoted 15 lines · Rajendra Nayak

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

Patches can be found here..
git://gitorious.org/omap-pm/linux.git for-dt/serial

I also had to pull in a fix[2] for DT testing (already in linux-omap master) which was missing as the serial runtime branch[1] was based on an older master commit.

Changes in v3:
-1- Rebased on latest serial runtime patches
-2- Minor typr fixes

Quoted 9 lines

Changes in v2:
-1- Got rid of binding to define which uart is console -2- Added checks to default clock speed to 48Mhz -3- Added compatible for each OMAP family
-4- Used of_alias_get_id to populate port.line

[1] git://gitorious.org/runtime_3-0/runtime_3-0.git for_3_3/lo_rc4_uartruntime
[2] http://www.spinics.net/lists/arm-kernel/msg150751.html

I merged this patch series to a tmp_intg branch [1] having uart runtime changes and sanity tested on 3430sdp/zoom3/panda seems fine.

--
Thanks,
Govindraj.R

[1]:
git://gitorious.org/runtime_3-0/runtime_3-0.git
for_3_3/tmp_rc4_uart_pm_intg

#22 lore raw

v3 cover OMAP serial device tree support

In reply to Rajendra Nayak

Greg, Alan,

Quoted 3 lines · Rajendra Nayak

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

With your ack on the drivers/tty/* stuff, I can queue this via the OMAP tree on top of the runtime PM conversion that it depends on.

Thanks,

Kevin

Quoted 38 lines

Patches can be found here..
git://gitorious.org/omap-pm/linux.git for-dt/serial

I also had to pull in a fix[2] for DT testing (already in linux-omap master) which was missing as the serial runtime branch[1] was based on an older master commit.

Changes in v3:
-1- Rebased on latest serial runtime patches
-2- Minor typr fixes

Changes in v2:
-1- Got rid of binding to define which uart is console -2- Added checks to default clock speed to 48Mhz -3- Added compatible for each OMAP family
-4- Used of_alias_get_id to populate port.line

[1] git://gitorious.org/runtime_3-0/runtime_3-0.git for_3_3/lo_rc4_uartruntime
[2] http://www.spinics.net/lists/arm-kernel/msg150751.html

Rajendra Nayak (4):
omap-serial: Get rid of all pdev->id usage
omap-serial: Use default clock speed (48Mhz) if not specified
omap-serial: Add minimal device tree support
ARM: omap: pass minimal SoC/board data for UART from dt

 .../devicetree/bindings/serial/omap_serial.txt     |   10 +++
 arch/arm/boot/dts/omap3.dtsi                       |   31 ++++++++
 arch/arm/boot/dts/omap4.dtsi                       |   28 +++++++
 arch/arm/mach-omap2/board-generic.c                |    1 -
 drivers/tty/serial/omap-serial.c                   |   80 +++++++++++++++----
 5 files changed, 132 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#23 lore raw

v3 cover OMAP serial device tree support

Quoted 10 lines · On Wed, 14 Dec 2011 07:20:13 -0800 Kevin Hilman <[email protected]> wrote:

Greg, Alan,

Quoted 3 lines · Rajendra Nayak

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

With your ack on the drivers/tty/* stuff, I can queue this via the OMAP tree on top of the runtime PM conversion that it depends on.

Go for it

#24 lore raw

v3 cover OMAP serial device tree support

Quoted 7 lines · Alan Cox
Quoted 4 lines · On Wed, 14 Dec 2011 07:20:13 -0800 Kevin Hilman <[email protected]> wrote:

Greg, Alan,

Rajendra Nayak <[email protected]> writes:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

With your ack on the drivers/tty/* stuff, I can queue this via the OMAP tree on top of the runtime PM conversion that it depends on.

Go for it

Fine with me as well.

greg k-h

maintainer
#25 lore raw

v3 cover OMAP serial device tree support

Quoted 12 lines · Greg KH
Quoted 11 lines · Alan Cox
Quoted 8 lines · On Wed, 14 Dec 2011 07:20:13 -0800 Kevin Hilman <[email protected]> wrote:

Greg, Alan,

Quoted 3 lines · Rajendra Nayak

v3 is rebased on top of the latest serial runtime patches[1] and boot tested with/without DT on OMAP4 SDP and OMAP4 Panda boards.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

With your ack on the drivers/tty/* stuff, I can queue this via the OMAP tree on top of the runtime PM conversion that it depends on.

Go for it

Fine with me as well.

For the record, I'll apply these directly into the omap uart branch as Kevin is on vacation.

Regards,

Tony