Skip to contentSkip to conversation

dt-bindings: geni-se: Convert QUP geni-se bindings to YAML

PATCH Superseded Akash Asthana 2 participants 3 messages Dec 16, 2019 – Dec 17, 2019

Subsystems (3)

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: geni-se: Convert QUP geni-se bindings to YAML

Convert QUP geni-se bindings to DT schema format using json-schema.

---
 .../devicetree/bindings/soc/qcom/qcom,geni-se.txt  |  94 ----------
 .../devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 196 +++++++++++++++++++++
 2 files changed, 196 insertions(+), 94 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt deleted +0 -94
deleted file mode 100644
index dab7ca9..0000000
@@ -1,94 +0,0 @@
-Qualcomm Technologies, Inc. GENI Serial Engine QUP Wrapper Controller
-
-Generic Interface (GENI) based Qualcomm Universal Peripheral (QUP) wrapper
-is a programmable module for supporting a wide range of serial interfaces
-like UART, SPI, I2C, I3C, etc. A single QUP module can provide upto 8 Serial
-Interfaces, using its internal Serial Engines. The GENI Serial Engine QUP
-Wrapper controller is modeled as a node with zero or more child nodes each
-representing a serial engine.
-
-Required properties:
-- compatible:		Must be "qcom,geni-se-qup".
-- reg:			Must contain QUP register address and length.
-- clock-names:		Must contain "m-ahb" and "s-ahb".
-- clocks:		AHB clocks needed by the device.
-
-Required properties if child node exists:
-- #address-cells: 	Must be <1> for Serial Engine Address
-- #size-cells: 		Must be <1> for Serial Engine Address Size
-- ranges: 		Must be present
-
-Properties for children:
-
-A GENI based QUP wrapper controller node can contain 0 or more child nodes
-representing serial devices.  These serial devices can be a QCOM UART, I2C
-controller, SPI controller, or some combination of aforementioned devices.
-Please refer below the child node definitions for the supported serial
-interface protocols.
-
-Qualcomm Technologies Inc. GENI Serial Engine based I2C Controller
-
-Required properties:
-- compatible:		Must be "qcom,geni-i2c".
-- reg: 			Must contain QUP register address and length.
-- interrupts: 		Must contain I2C interrupt.
-- clock-names: 		Must contain "se".
-- clocks: 		Serial engine core clock needed by the device.
-- #address-cells:	Must be <1> for I2C device address.
-- #size-cells:		Must be <0> as I2C addresses have no size component.
-
-Optional property:
-- clock-frequency:	Desired I2C bus clock frequency in Hz.
-			When missing default to 100000Hz.
-
-Child nodes should conform to I2C bus binding as described in i2c.txt.
-
-Qualcomm Technologies Inc. GENI Serial Engine based UART Controller
-
-Required properties:
-- compatible:		Must be "qcom,geni-debug-uart" or "qcom,geni-uart".
-- reg: 			Must contain UART register location and length.
-- interrupts: 		Must contain UART core interrupts.
-- clock-names:		Must contain "se".
-- clocks:		Serial engine core clock needed by the device.
-
-Qualcomm Technologies Inc. GENI Serial Engine based SPI Controller
-node binding is described in
-Documentation/devicetree/bindings/spi/qcom,spi-geni-qcom.txt.
-
-Example:
-	geniqup@8c0000 {
-		compatible = "qcom,geni-se-qup";
-		reg = <0x8c0000 0x6000>;
-		clock-names = "m-ahb", "s-ahb";
-		clocks = <&clock_gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>,
-			<&clock_gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-
-		i2c0: i2c@a94000 {
-			compatible = "qcom,geni-i2c";
-			reg = <0xa94000 0x4000>;
-			interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "se";
-			clocks = <&clock_gcc GCC_QUPV3_WRAP0_S5_CLK>;
-			pinctrl-names = "default", "sleep";
-			pinctrl-0 = <&qup_1_i2c_5_active>;
-			pinctrl-1 = <&qup_1_i2c_5_sleep>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-		};
-
-		uart0: serial@a88000 {
-			compatible = "qcom,geni-debug-uart";
-			reg = <0xa88000 0x7000>;
-			interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
-			clock-names = "se";
-			clocks = <&clock_gcc GCC_QUPV3_WRAP0_S0_CLK>;
-			pinctrl-names = "default", "sleep";
-			pinctrl-0 = <&qup_1_uart_3_active>;
-			pinctrl-1 = <&qup_1_uart_3_sleep>;
-		};
-
-	}
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml new file +196 -0

196 lines not on this page · raw message

Signature · 1 line
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
#1 lore raw

Quoting Akash Asthana (2019-12-16 01:25:51)

Quoted 6 lines
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml new file +0 -0
new file mode 100644
index 0000000..2c3b911
@@ -0,0 +1,196 @@

[...]

Quoted 9 lines
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml new file +9 -0
+
+  "serial@[0-9]+$":
+    type: object
+    description: GENI Serial Engine based UART Controller.
+
+    properties:
+      compatible:
+        enum:
+          - qcom,geni-uart

Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml line 122

Quoted 10 lines
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml new file +10 -0
+          - qcom,geni-debug-uart
+
+      reg:
+        description: GENI Serial Engine register address and length.
+
+      interrupts:
+        description: Contains UART core and wakeup interrupts for wakeup
+                     capable UART devices. We configure wakeup interrupt
+                     on UART RX line using TLMM interrupt controller.
+        maxItems: 2

Shouldn't there be a minItems: 1 here? And then you should specify the order? Presumably something like

interrupts:
minItems: 1
maxItems: 2
items:
- description: UART core irq
- description: Wakeup irq (RX GPIO)

#2 lore raw
Quoted 30 lines · Stephen Boyd

Quoting Akash Asthana (2019-12-16 01:25:51)

Quoted 6 lines
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml new file +0 -0
new file mode 100644
index 0000000..2c3b911
@@ -0,0 +1,196 @@

[...]

Quoted 9 lines
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml new file +9 -0
+
+  "serial@[0-9]+$":
+    type: object
+    description: GENI Serial Engine based UART Controller.
+
+    properties:
+      compatible:
+        enum:
+          - qcom,geni-uart

Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml line 122

Quoted 10 lines
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml new file +10 -0
+          - qcom,geni-debug-uart
+
+      reg:
+        description: GENI Serial Engine register address and length.
+
+      interrupts:
+        description: Contains UART core and wakeup interrupts for wakeup
+                     capable UART devices. We configure wakeup interrupt
+                     on UART RX line using TLMM interrupt controller.
+        maxItems: 2

Shouldn't there be a minItems: 1 here? And then you should specify the order? Presumably something like

Quoted 6 lines

interrupts:
minItems: 1
maxItems: 2
items:
- description: UART core irq
- description: Wakeup irq (RX GPIO)

Yeah ok, Thanks for correction.

I will update this in next version.

Signature · 1 line
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project