Skip to contentSkip to conversation

Document msm_serial bindings and support newer uartdms

PATCH New Stephen Boyd 1 participant 3 messages Aug 28, 2013

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

v4 cover Document msm_serial bindings and support newer uartdms

This patchset aligns the msm_serial driver more with downstream usage and updates the driver's DT bindings.

Changes since v3:
* Moved bindings to serial instead of tty/serial

Changes since v2:
* Fixed up DT review comments
* Dropped patches that were picked up in tty tree

Changes since v1:
* Dropped _clk postfix from {core,iface}_clk
* Split DT binding into two files
* Renamed DT binding files to match compatible strings
* Fixed up DT review comments
* Added new patch 5/5 (more than 1 char for UARTDM)

Stephen Boyd (2):
devicetree: serial: Document msm_serial bindings
ARM: dts: msm: Update uartdm compatible strings

 .../devicetree/bindings/serial/qcom,msm-uart.txt   | 25 ++++++++++
 .../devicetree/bindings/serial/qcom,msm-uartdm.txt | 53 ++++++++++++++++++++++
 .../devicetree/bindings/tty/serial/msm_serial.txt  | 27 -----------
 arch/arm/boot/dts/msm8660-surf.dts                 |  2 +-
 arch/arm/boot/dts/msm8960-cdp.dts                  |  2 +-
 5 files changed, 80 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/qcom,msm-uart.txt
 create mode 100644 Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
 delete mode 100644 Documentation/devicetree/bindings/tty/serial/msm_serial.txt
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#1 lore raw

PATCH v4 1/2 devicetree: serial: Document msm_serial bindings

Let's fix up the msm serial device bindings so that it's clearer what hardware is supported. Instead of using hsuart (for high speed uart) let's use uartdm because that matches the actual name of the hardware. Also, let's add the version information in case we need to differentiate between different versions of the hardware in the future. Finally, lets specify that clocks are required (the clock bindings didn't exist when the original binding was written) and also specify dma bindings just in case we want to use it in software. We split the binding into two files to make it clearer what's required and not required.

---
 .../devicetree/bindings/serial/qcom,msm-uart.txt   | 25 ++++++++++
 .../devicetree/bindings/serial/qcom,msm-uartdm.txt | 53 ++++++++++++++++++++++
 .../devicetree/bindings/tty/serial/msm_serial.txt  | 27 -----------
 3 files changed, 78 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/qcom,msm-uart.txt
 create mode 100644 Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
 delete mode 100644 Documentation/devicetree/bindings/tty/serial/msm_serial.txt
Documentation/devicetree/bindings/serial/qcom,msm-uart.txt new file +25 -0
new file mode 100644
index 0000000..ce8c901
@@ -0,0 +1,25 @@
+* MSM Serial UART
+
+The MSM serial UART hardware is designed for low-speed use cases where a
+dma-engine isn't needed. From a software perspective it's mostly compatible
+with the MSM serial UARTDM except that it only supports reading and writing one
+character at a time.
+
+Required properties:
+- compatible: Should contain "qcom,msm-uart"
+- reg: Should contain UART register location and length.
+- interrupts: Should contain UART interrupt.
+- clocks: Should contain the core clock.
+- clock-names: Should be "core".
+
+Example:
+
+A uart device at 0xa9c00000 with interrupt 11.
+
+serial at a9c00000 {
+	compatible = "qcom,msm-uart";
+	reg = <0xa9c00000 0x1000>;
+	interrupts = <11>;
+	clocks = <&uart_cxc>;
+	clock-names = "core";
+};
Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt new file +53 -0

53 lines not on this page · raw message

Documentation/devicetree/bindings/tty/serial/msm_serial.txt deleted +0 -27
deleted file mode 100644
index aef383e..0000000
@@ -1,27 +0,0 @@
-* Qualcomm MSM UART
-
-Required properties:
-- compatible :
-	- "qcom,msm-uart", and one of "qcom,msm-hsuart" or
-	  "qcom,msm-lsuart".
-- reg : offset and length of the register set for the device
-	for the hsuart operating in compatible mode, there should be a
-	second pair describing the gsbi registers.
-- interrupts : should contain the uart interrupt.
-
-There are two different UART blocks used in MSM devices,
-"qcom,msm-hsuart" and "qcom,msm-lsuart".  The msm-serial driver is
-able to handle both of these, and matches against the "qcom,msm-uart"
-as the compatibility.
-
-The registers for the "qcom,msm-hsuart" device need to specify both
-register blocks, even for the common driver.
-
-Example:
-
-	uart at 19c400000 {
-		compatible = "qcom,msm-hsuart", "qcom,msm-uart";
-		reg = <0x19c40000 0x1000>,
-		      <0x19c00000 0x1000>;
-		interrupts = <195>;
-	};
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#2 lore raw

PATCH v4 2/2 ARM: dts: msm: Update uartdm compatible strings

In reply to Stephen Boyd

Let's follow the ratified DT binding and use uartdm instead of hsuart. This does break backwards compatibility but this shouldn't be a problem because the uart driver isn't probing on these devices without adding clock support (which isn't merged so far).

---
 arch/arm/boot/dts/msm8660-surf.dts | 2 +-
 arch/arm/boot/dts/msm8960-cdp.dts  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/msm8660-surf.dts +1 -1
index cdc010e..386d428 100644
@@ -38,7 +38,7 @@
 	};
 
 	serial at 19c40000 {
-		compatible = "qcom,msm-hsuart", "qcom,msm-uart";
+		compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
 		reg = <0x19c40000 0x1000>,
 		      <0x19c00000 0x1000>;
 		interrupts = <0 195 0x0>;
arch/arm/boot/dts/msm8960-cdp.dts +1 -1
index db2060c..532050b 100644
@@ -38,7 +38,7 @@
 	};
 
 	serial at 16440000 {
-		compatible = "qcom,msm-hsuart", "qcom,msm-uart";
+		compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
 		reg = <0x16440000 0x1000>,
 		      <0x16400000 0x1000>;
 		interrupts = <0 154 0x0>;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation