Skip to contentSkip to conversation

Convert QUP bindings to YAML and add ICC, pin swap doc

PATCH Superseded Akash Asthana 4 participants 10 messages Mar 13, 2020 – May 7, 2020

Subsystems (3)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v5 cover Convert QUP bindings to YAML and add ICC, pin swap doc

Changes in V4:
- Add interconnect binding patch.
- Add UART pin swap binding patch.

Akash Asthana (3):
dt-bindings: geni-se: Convert QUP geni-se bindings to YAML
dt-bindings: geni-se: Add interconnect binding for GENI QUP
dt-bindings: geni-se: Add binding for UART pin swap

 .../devicetree/bindings/soc/qcom/qcom,geni-se.txt  |  94 ---------
 .../devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 231 +++++++++++++++++++++
 2 files changed, 231 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
Signature · 1 line
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
#1 lore raw

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

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

---
Changes in V2:
- As per Stephen's comment corrected defintion of interrupts for UART node. Any valid UART node must contain atleast 1 interrupts.

Changes in V3:
- As per Rob's comment, added number of reg entries for reg property.
- As per Rob's comment, corrected unit address to hex.
- As per Rob's comment, created a pattern which matches everything common to geni based I2C, SPI and UART controller and then one pattern for each.
- As per Rob's comment, restored original example.

Changes in V4:
- Resolve below compilation error reported from bot.

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/ qcom,geni-se.yaml: properties:clocks:minItems: False schema does not allow 2 /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/ qcom,geni-se.yaml: properties:clocks:maxItems: False schema does not allow 2 Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.example.dts' failed make[1]: *** [Documentation/devicetree/bindings/soc/qcom/ qcom,geni-se.example.dts] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

 .../devicetree/bindings/soc/qcom/qcom,geni-se.txt  |  94 ---------
 .../devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 209 +++++++++++++++++++++
 2 files changed, 209 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

Changes in V5
- No change

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 +209 -0

209 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
#2 lore raw

PATCH v5 2/3 dt-bindings: geni-se: Add interconnect binding for GENI QUP

In reply to Akash Asthana

Add documentation for the interconnect and interconnect-names properties for the GENI QUP.

---
Changes in V5:
- Add interconnect property for QUP wrapper (parent node).
- Add minItems = 2 for interconnect property in child nodes

 .../devicetree/bindings/soc/qcom/qcom,geni-se.yaml       | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml +16 -0
index 23282ab..533400b 100644
@@ -46,6 +46,12 @@ properties:
 
   ranges: true
 
+  interconnects:
+    maxItems: 1
+
+  interconnect-names:
+    const: qup-core
+
 required:
   - compatible
   - reg
@@ -73,6 +79,16 @@ patternProperties:
         description: Serial engine core clock needed by the device.
         maxItems: 1
 
+      interconnects:
+         minItems: 2
+         maxItems: 3
+
+      interconnect-names:
+         items:
+           - const: qup-core
+           - const: qup-config
+           - const: qup-memory
+
     required:
       - reg
       - clock-names
Signature · 1 line
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
maintainer
#3 lore raw

Re: [PATCH V5 2/3] dt-bindings: geni-se: Add interconnect binding for GENI QUP

Quoted 32 lines · Akash Asthana

Add documentation for the interconnect and interconnect-names properties for the GENI QUP.

---
Changes in V5:
- Add interconnect property for QUP wrapper (parent node).
- Add minItems = 2 for interconnect property in child nodes

 .../devicetree/bindings/soc/qcom/qcom,geni-se.yaml       | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml +6 -0
index 23282ab..533400b 100644
@@ -46,6 +46,12 @@ properties:
 
   ranges: true
 
+  interconnects:
+    maxItems: 1
+
+  interconnect-names:
+    const: qup-core
+
 required:
   - compatible
   - reg
@@ -73,6 +79,16 @@ patternProperties:
         description: Serial engine core clock needed by the device.
         maxItems: 1

Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml patternProperties: · line 90

Quoted 10 lines
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml +9 -0
 
+      interconnects:
+         minItems: 2
+         maxItems: 3
+
+      interconnect-names:
+         items:
+           - const: qup-core
+           - const: qup-config
+           - const: qup-memory

Don't you need 'minItems: 2' here?

Rob

#4 lore raw

Re: [PATCH V5 2/3] dt-bindings: geni-se: Add interconnect binding for GENI QUP

Hi Rob,

Quoted 11 lines

Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml patternProperties: · line 90

Quoted 10 lines
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml +9 -0
+      interconnects:
+         minItems: 2
+         maxItems: 3
+
+      interconnect-names:
+         items:
+           - const: qup-core
+           - const: qup-config
+           - const: qup-memory

Don't you need 'minItems: 2' here?

Yeah I need minItems: 2 here, thanks for reviewing.

regards,

Akash

Quoted 2 lines

Rob

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

PATCH v5 3/3 dt-bindings: geni-se: Add binding for UART pin swap

In reply to Akash Asthana

Add documentation to support RX/TX/CTS/RTS pin swap in HW.

---
Changes in V5:
- As per Matthias's comment, remove rx-tx-cts-rts-swap property from UART child node.

 Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml +6 -0
index 533400b..85f9028 100644
@@ -172,6 +172,12 @@ patternProperties:
           - description: UART core irq
           - description: Wakeup irq (RX GPIO)
 
+      rx-tx-swap:
+        description: RX and TX pins are swapped
+
+      cts-rts-swap:
+        description: CTS and RTS pins are swapped
+
     required:
       - compatible
       - interrupts
Signature · 1 line
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
#6 lore raw

Re: [PATCH V5 3/3] dt-bindings: geni-se: Add binding for UART pin swap

Quoted 11 lines · Akash Asthana

Add documentation to support RX/TX/CTS/RTS pin swap in HW.

---
Changes in V5:
- As per Matthias's comment, remove rx-tx-cts-rts-swap property from UART child node.

 Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

STM32 folks need something similar. Can you move this to a common location. That's serial.txt, but that is being converted to DT schema.

Rob

#7 lore raw

Re: [PATCH V5 3/3] dt-bindings: geni-se: Add binding for UART pin swap

Hi Rob,

Quoted 9 lines · Rob Herring
Quoted 8 lines · Akash Asthana

Add documentation to support RX/TX/CTS/RTS pin swap in HW.

---
Changes in V5:
- As per Matthias's comment, remove rx-tx-cts-rts-swap property from UART child node.

Quoted 6 lines
Quoted 2 lines
  Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 6 ++++++
  1 file changed, 6 insertions(+)

STM32 folks need something similar. Can you move this to a common location. That's serial.txt, but that is being converted to DT schema.

Rob

Okay, once serial.txt is converted to DT schema, I will move it there.

Regards,

Akash

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

Re: [PATCH V5 3/3] dt-bindings: geni-se: Add binding for UART pin swap

Hi Akash,

Quoted 12 lines · Akash Asthana

Hi Rob,

Quoted 9 lines · Rob Herring
Quoted 8 lines · Akash Asthana

Add documentation to support RX/TX/CTS/RTS pin swap in HW.

---
Changes in V5:
- As per Matthias's comment, remove rx-tx-cts-rts-swap property from UART child node.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
  Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 6 ++++++
  1 file changed, 6 insertions(+)

STM32 folks need something similar. Can you move this to a common location. That's serial.txt, but that is being converted to DT schema.

Rob

Okay, once serial.txt is converted to DT schema, I will move it there.

It has landed upstream:

175a7427bb72 dt-bindings: serial: Convert generic bindings to json-schema

#9 lore raw

Re: [PATCH V5 3/3] dt-bindings: geni-se: Add binding for UART pin swap

Hi Matthias

Thanks for notifying, I will make the changes.

Regards,

Akash

Quoted 25 lines · Matthias Kaehlcke

Hi Akash,

Quoted 12 lines · Akash Asthana

Hi Rob,

Quoted 9 lines · Rob Herring
Quoted 8 lines · Akash Asthana

Add documentation to support RX/TX/CTS/RTS pin swap in HW.

---
Changes in V5:
- As per Matthias's comment, remove rx-tx-cts-rts-swap property from UART child node.

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
   Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml | 6 ++++++
   1 file changed, 6 insertions(+)

STM32 folks need something similar. Can you move this to a common location. That's serial.txt, but that is being converted to DT schema.

Rob

Okay, once serial.txt is converted to DT schema, I will move it there.

It has landed upstream:

175a7427bb72 dt-bindings: serial: Convert generic bindings to json-schema

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