All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Geni based QUP controller binding cleanups
@ 2022-04-02  5:12 Kuldeep Singh
  2022-04-02  5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02  5:12 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski; +Cc: linux-kernel

Geni based QUP controller currently has child nodes bindings defined in
same parent schema. Documentation of few other properties were also
omitted intially. The list becomes too long with addition of these
properties. Therefore, move out child bindings from parent schema to
respective places as a part of cleanup process and update reference for
it. Please note, individual bindings will now stand complete as
previously some properties were defined in core and rest in parent
schema.

This patchset adds individual bindings for uart and i2c controller, spi
controller is taken care by Krzystof. SPI patches[1] are required for
complete changes. Once all bindings gets places correctly, remove common
properties defined in parent as the final step.

[1] https://lore.kernel.org/linux-spi/20220331175817.GA91341@9a2d8922b8f1/T/#m2ef266d9f5cf643bb5be17f3a175c638bde3a680

Looking forward for feeback and review comments. Thanks!

Kuldeep Singh (5):
  dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings
  dt-bindings: qcom: geni-se: Update i2c schema reference
  dt-bindings: serial: Update Qualcomm geni based QUP uart bindings
  dt-bindings: qcom: geni-se: Update uart schema reference
  dt-bindings: qcom: geni-se: Remove common controller properties

 .../bindings/i2c/qcom,i2c-geni-qcom.yaml      | 110 ++++++++++++++++++
 .../serial/qcom,serial-geni-qcom.yaml         |  86 ++++++++++++++
 .../bindings/soc/qcom/qcom,geni-se.yaml       |  77 +-----------
 3 files changed, 198 insertions(+), 75 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
 create mode 100644 Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml

-- 
2.25.1


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

* [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings
  2022-04-02  5:12 [PATCH 0/5] Geni based QUP controller binding cleanups Kuldeep Singh
@ 2022-04-02  5:12 ` Kuldeep Singh
  2022-04-02 12:29   ` Krzysztof Kozlowski
  2022-04-02 18:24   ` Krzysztof Kozlowski
  2022-04-02  5:12 ` [PATCH 2/5] dt-bindings: qcom: geni-se: Update i2c schema reference Kuldeep Singh
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02  5:12 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson
  Cc: linux-kernel, linux-arm-msm, linux-i2c, devicetree

GENI(generic interface) based Qualcomm Universal Peripheral controller
can support multiple serial interfaces like spi,uart and i2c.

Unlike other i2c controllers, QUP i2c bindings are present in parent
schema. Move it out from parent to an individual binding and let parent
refer to child schema later on.

Please note, current schema isn't complete as it misses out few
properties and thus, add these missing properties along the process.

Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
---
 .../bindings/i2c/qcom,i2c-geni-qcom.yaml      | 110 ++++++++++++++++++
 1 file changed, 110 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml

diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
new file mode 100644
index 000000000000..01a02e680ea3
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
@@ -0,0 +1,110 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Geni based QUP I2C Controller
+
+maintainers:
+  - Andy Gross <agross@kernel.org>
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - qcom,geni-i2c
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: se
+
+  clock-frequency:
+    description: Desired I2C bus clock frequency in Hz
+    default: 100000
+
+  interconnects:
+    maxItems: 3
+
+  interconnect-names:
+    items:
+      - const: qup-core
+      - const: qup-config
+      - const: qup-memory
+
+  interrupts:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+  required-opps:
+    maxItems: 1
+
+  dmas:
+    maxItems: 2
+
+  dma-names:
+    items:
+      - const: tx
+      - const: rx
+
+  pinctrl-0: true
+  pinctrl-1: true
+
+  pinctrl-names:
+    minItems: 1
+    items:
+      - const: default
+      - const: sleep
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+required:
+  - compatible
+  - interrupts
+  - clocks
+  - clock-names
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/qcom,gcc-sc7180.h>
+    #include <dt-bindings/interconnect/qcom,sc7180.h>
+    #include <dt-bindings/power/qcom-rpmpd.h>
+
+    i2c@88000 {
+        compatible = "qcom,geni-i2c";
+        reg = <0x00880000 0x4000>;
+        clock-names = "se";
+        clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&qup_i2c0_default>;
+        interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+        interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+                        <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>,
+                        <&aggre1_noc MASTER_QUP_0 0 &mc_virt SLAVE_EBI1 0>;
+        interconnect-names = "qup-core", "qup-config", "qup-memory";
+        power-domains = <&rpmhpd SC7180_CX>;
+        required-opps = <&rpmhpd_opp_low_svs>;
+    };
+...
-- 
2.25.1


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

* [PATCH 2/5] dt-bindings: qcom: geni-se: Update i2c schema reference
  2022-04-02  5:12 [PATCH 0/5] Geni based QUP controller binding cleanups Kuldeep Singh
  2022-04-02  5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh
@ 2022-04-02  5:12 ` Kuldeep Singh
  2022-04-02 12:30   ` Krzysztof Kozlowski
  2022-04-02  5:12 ` [PATCH 3/5] dt-bindings: serial: Update Qualcomm geni based QUP uart bindings Kuldeep Singh
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02  5:12 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Mukesh Savaliya, Akash Asthana
  Cc: linux-kernel, linux-arm-msm, devicetree

We now have geni based QUP i2c controller binding in place as
dt-bindigs/i2c/qcom,i2c-geni-qcom.yaml similar to other controllers,
update reference in parent schema and while at it, also remove
properties defined for the controller from commown wrapper.

Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
---
 .../bindings/soc/qcom/qcom,geni-se.yaml       | 26 +------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
index 95fcb43675d6..e6073923e03a 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
@@ -128,31 +128,7 @@ patternProperties:
   "i2c@[0-9a-f]+$":
     type: object
     description: GENI serial engine based I2C controller.
-    $ref: /schemas/i2c/i2c-controller.yaml#
-
-    properties:
-      compatible:
-        enum:
-          - qcom,geni-i2c
-
-      interrupts:
-        maxItems: 1
-
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
-      clock-frequency:
-        description: Desired I2C bus clock frequency in Hz.
-        default: 100000
-
-    required:
-      - compatible
-      - interrupts
-      - "#address-cells"
-      - "#size-cells"
+    $ref: /schemas/i2c/qcom,i2c-geni-qcom.yaml#
 
   "serial@[0-9a-f]+$":
     type: object
-- 
2.25.1


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

* [PATCH 3/5] dt-bindings: serial: Update Qualcomm geni based QUP uart bindings
  2022-04-02  5:12 [PATCH 0/5] Geni based QUP controller binding cleanups Kuldeep Singh
  2022-04-02  5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh
  2022-04-02  5:12 ` [PATCH 2/5] dt-bindings: qcom: geni-se: Update i2c schema reference Kuldeep Singh
@ 2022-04-02  5:12 ` Kuldeep Singh
  2022-04-02 15:37   ` Krzysztof Kozlowski
  2022-04-02  5:12 ` [PATCH 4/5] dt-bindings: qcom: geni-se: Update uart schema reference Kuldeep Singh
  2022-04-02  5:12 ` [PATCH 5/5] dt-bindings: qcom: geni-se: Remove common controller properties Kuldeep Singh
  4 siblings, 1 reply; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02  5:12 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Greg Kroah-Hartman
  Cc: linux-kernel, linux-arm-msm, linux-serial, devicetree

Similar to i2c controller, move geni based QUP uart controller bindings
out from parent schema to an individual binding and let parent refer to
child schema later on. Uart bindings also stand incomplete right now
similar to i2c, complete it along this process.

Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
---
 .../serial/qcom,serial-geni-qcom.yaml         | 86 +++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml

diff --git a/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml
new file mode 100644
index 000000000000..717b0909280a
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/serial/qcom,serial-geni-qcom.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Geni based QUP UART interface
+
+maintainers:
+  - Andy Gross <agross@kernel.org>
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+allOf:
+  - $ref: /schemas/serial/serial.yaml#
+
+properties:
+  compatible:
+    enum:
+      - qcom,geni-uart
+      - qcom,geni-debug-uart
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: se
+
+  interconnects:
+    maxItems: 2
+
+  interconnect-names:
+    items:
+      - const: qup-core
+      - const: qup-config
+
+  interrupts:
+    minItems: 1
+    items:
+      - description: UART core irq
+      - description: Wakeup irq (RX GPIO)
+
+  operating-points-v2: true
+
+  power-domains:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+  pinctrl-0: true
+  pinctrl-1: true
+
+  pinctrl-names:
+    minItems: 1
+    items:
+      - const: default
+      - const: sleep
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - interrupts
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/qcom,gcc-sc7180.h>
+    #include <dt-bindings/interconnect/qcom,sc7180.h>
+
+    serial@a88000 {
+        compatible = "qcom,geni-uart";
+        reg = <0xa88000 0x7000>;
+        interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+        clock-names = "se";
+        clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>;
+        pinctrl-0 = <&qup_uart0_default>;
+        pinctrl-names = "default";
+        interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>,
+                        <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>;
+        interconnect-names = "qup-core", "qup-config";
+    };
+...
-- 
2.25.1


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

* [PATCH 4/5] dt-bindings: qcom: geni-se: Update uart schema reference
  2022-04-02  5:12 [PATCH 0/5] Geni based QUP controller binding cleanups Kuldeep Singh
                   ` (2 preceding siblings ...)
  2022-04-02  5:12 ` [PATCH 3/5] dt-bindings: serial: Update Qualcomm geni based QUP uart bindings Kuldeep Singh
@ 2022-04-02  5:12 ` Kuldeep Singh
  2022-04-02 15:39   ` Krzysztof Kozlowski
  2022-04-02  5:12 ` [PATCH 5/5] dt-bindings: qcom: geni-se: Remove common controller properties Kuldeep Singh
  4 siblings, 1 reply; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02  5:12 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Mukesh Savaliya, Akash Asthana
  Cc: linux-kernel, linux-arm-msm, devicetree

We now have geni based QUP uart controller binding in place as
dt-bindings/serial/qcom,serial-geni-qcom.yaml similar to other
controllers, update reference in parent schema and while at it, also
remove properties defined for the controller from commown wrapper.

Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
---
 .../bindings/soc/qcom/qcom,geni-se.yaml        | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
index e6073923e03a..9f72c676b22c 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
@@ -133,23 +133,7 @@ patternProperties:
   "serial@[0-9a-f]+$":
     type: object
     description: GENI Serial Engine based UART Controller.
-    $ref: /schemas/serial.yaml#
-
-    properties:
-      compatible:
-        enum:
-          - qcom,geni-uart
-          - qcom,geni-debug-uart
-
-      interrupts:
-        minItems: 1
-        items:
-          - description: UART core irq
-          - description: Wakeup irq (RX GPIO)
-
-    required:
-      - compatible
-      - interrupts
+    $ref: /schemas/serial/qcom,serial-geni-qcom.yaml#
 
 additionalProperties: false
 
-- 
2.25.1


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

* [PATCH 5/5] dt-bindings: qcom: geni-se: Remove common controller properties
  2022-04-02  5:12 [PATCH 0/5] Geni based QUP controller binding cleanups Kuldeep Singh
                   ` (3 preceding siblings ...)
  2022-04-02  5:12 ` [PATCH 4/5] dt-bindings: qcom: geni-se: Update uart schema reference Kuldeep Singh
@ 2022-04-02  5:12 ` Kuldeep Singh
  2022-04-02 15:41   ` Krzysztof Kozlowski
  4 siblings, 1 reply; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02  5:12 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Mukesh Savaliya, Akash Asthana
  Cc: linux-kernel, linux-arm-msm, devicetree

Now that Geni serial engine controllers(spi, i2c and uart) have their
own individual bindings, it's time to remove all common properties of
the controllers from parent schema.

Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
---
 .../bindings/soc/qcom/qcom,geni-se.yaml       | 33 -------------------
 1 file changed, 33 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
index 9f72c676b22c..c8e1a4a87ba8 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml
@@ -64,39 +64,6 @@ required:
   - ranges
 
 patternProperties:
-  "^.*@[0-9a-f]+$":
-    type: object
-    description: Common properties for GENI Serial Engine based I2C, SPI and
-                 UART controller.
-
-    properties:
-      reg:
-        description: GENI Serial Engine register address and length.
-        maxItems: 1
-
-      clock-names:
-        const: se
-
-      clocks:
-        description: Serial engine core clock needed by the device.
-        maxItems: 1
-
-      interconnects:
-        minItems: 2
-        maxItems: 3
-
-      interconnect-names:
-        minItems: 2
-        items:
-          - const: qup-core
-          - const: qup-config
-          - const: qup-memory
-
-    required:
-      - reg
-      - clock-names
-      - clocks
-
   "spi@[0-9a-f]+$":
     type: object
     description: GENI serial engine based SPI controller. SPI in master mode
-- 
2.25.1


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

* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings
  2022-04-02  5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh
@ 2022-04-02 12:29   ` Krzysztof Kozlowski
  2022-04-02 19:44     ` Kuldeep Singh
  2022-04-02 18:24   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 12:29 UTC (permalink / raw)
  To: Kuldeep Singh, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson
  Cc: linux-kernel, linux-arm-msm, linux-i2c, devicetree

On 02/04/2022 07:12, Kuldeep Singh wrote:
> GENI(generic interface) based Qualcomm Universal Peripheral controller
> can support multiple serial interfaces like spi,uart and i2c.
> 
> Unlike other i2c controllers, QUP i2c bindings are present in parent
> schema. Move it out from parent to an individual binding and let parent
> refer to child schema later on.
> 
> Please note, current schema isn't complete as it misses out few
> properties and thus, add these missing properties along the process.
> 
> Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> ---
>  .../bindings/i2c/qcom,i2c-geni-qcom.yaml      | 110 ++++++++++++++++++
>  1 file changed, 110 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
> 
> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
> new file mode 100644
> index 000000000000..01a02e680ea3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
> @@ -0,0 +1,110 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Qualcomm Geni based QUP I2C Controller
> +
> +maintainers:
> +  - Andy Gross <agross@kernel.org>
> +  - Bjorn Andersson <bjorn.andersson@linaro.org>
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,geni-i2c

Just const, no enum. There are no other flavors of this (unless you
think there are?).

> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: se
> +
> +  clock-frequency:
> +    description: Desired I2C bus clock frequency in Hz
> +    default: 100000
> +
> +  interconnects:
> +    maxItems: 3
> +
> +  interconnect-names:
> +    items:
> +      - const: qup-core
> +      - const: qup-config
> +      - const: qup-memory
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  power-domains:
> +    maxItems: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +  required-opps:
> +    maxItems: 1

I have doubts this is correct property. Usually it is part of the
opp-table. I see sc7180 needs this, but I think it is a mistake. Do you
know how it is supposed to work?


Best regards,
Krzysztof

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

* Re: [PATCH 2/5] dt-bindings: qcom: geni-se: Update i2c schema reference
  2022-04-02  5:12 ` [PATCH 2/5] dt-bindings: qcom: geni-se: Update i2c schema reference Kuldeep Singh
@ 2022-04-02 12:30   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 12:30 UTC (permalink / raw)
  To: Kuldeep Singh, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Mukesh Savaliya, Akash Asthana
  Cc: linux-kernel, linux-arm-msm, devicetree

On 02/04/2022 07:12, Kuldeep Singh wrote:
> We now have geni based QUP i2c controller binding in place as
> dt-bindigs/i2c/qcom,i2c-geni-qcom.yaml similar to other controllers,
> update reference in parent schema and while at it, also remove
> properties defined for the controller from commown wrapper.
> 
> Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> ---
>  .../bindings/soc/qcom/qcom,geni-se.yaml       | 26 +------------------
>  1 file changed, 1 insertion(+), 25 deletions(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH 3/5] dt-bindings: serial: Update Qualcomm geni based QUP uart bindings
  2022-04-02  5:12 ` [PATCH 3/5] dt-bindings: serial: Update Qualcomm geni based QUP uart bindings Kuldeep Singh
@ 2022-04-02 15:37   ` Krzysztof Kozlowski
  2022-04-02 19:24     ` Kuldeep Singh
  0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 15:37 UTC (permalink / raw)
  To: Kuldeep Singh, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Greg Kroah-Hartman
  Cc: linux-kernel, linux-arm-msm, linux-serial, devicetree

On 02/04/2022 07:12, Kuldeep Singh wrote:
> Similar to i2c controller, move geni based QUP uart controller bindings

s/i2c/I2C/
s/uart/UART/

> out from parent schema to an individual binding and let parent refer to
> child schema later on. Uart bindings also stand incomplete right now

s/Uart/UART/

> similar to i2c, complete it along this process.

s/i2c/I2C/



Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH 4/5] dt-bindings: qcom: geni-se: Update uart schema reference
  2022-04-02  5:12 ` [PATCH 4/5] dt-bindings: qcom: geni-se: Update uart schema reference Kuldeep Singh
@ 2022-04-02 15:39   ` Krzysztof Kozlowski
  2022-04-02 19:28     ` Kuldeep Singh
  0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 15:39 UTC (permalink / raw)
  To: Kuldeep Singh, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Mukesh Savaliya, Akash Asthana
  Cc: linux-kernel, linux-arm-msm, devicetree

On 02/04/2022 07:12, Kuldeep Singh wrote:
> We now have geni based QUP uart controller binding in place as

s/uart/UART/

Similar to your previous commit - this could be one, max two sentences...

> dt-bindings/serial/qcom,serial-geni-qcom.yaml similar to other
> controllers, update reference in parent schema and while at it, also
> remove properties defined for the controller from commown wrapper.

s/commown/common/

> 
> Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> ---
>  .../bindings/soc/qcom/qcom,geni-se.yaml        | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH 5/5] dt-bindings: qcom: geni-se: Remove common controller properties
  2022-04-02  5:12 ` [PATCH 5/5] dt-bindings: qcom: geni-se: Remove common controller properties Kuldeep Singh
@ 2022-04-02 15:41   ` Krzysztof Kozlowski
  2022-04-02 19:32     ` Kuldeep Singh
  0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 15:41 UTC (permalink / raw)
  To: Kuldeep Singh, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Mukesh Savaliya, Akash Asthana
  Cc: linux-kernel, linux-arm-msm, devicetree

On 02/04/2022 07:12, Kuldeep Singh wrote:
> Now that Geni serial engine controllers(spi, i2c and uart) have their
> own individual bindings, it's time to remove all common properties of
> the controllers from parent schema.
> 
> Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> ---
>  .../bindings/soc/qcom/qcom,geni-se.yaml       | 33 -------------------
>  1 file changed, 33 deletions(-)
> 

This should be squashed with your previous commit, because removal of
last direct child schema, makes the common parts obsolete. IOW, the
common parts are only because there is children are open-coded here.

Best regards,
Krzysztof

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

* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings
  2022-04-02  5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh
  2022-04-02 12:29   ` Krzysztof Kozlowski
@ 2022-04-02 18:24   ` Krzysztof Kozlowski
  2022-04-02 19:34     ` Kuldeep Singh
  1 sibling, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 18:24 UTC (permalink / raw)
  To: Kuldeep Singh, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson
  Cc: linux-kernel, linux-arm-msm, linux-i2c, devicetree

On 02/04/2022 07:12, Kuldeep Singh wrote:
> GENI(generic interface) based Qualcomm Universal Peripheral controller
> can support multiple serial interfaces like spi,uart and i2c.
> 

Few more comments.

(...)

> +
> +  clock-frequency:
> +    description: Desired I2C bus clock frequency in Hz

Skip description, it's common for I2C controllers.

> +    default: 100000
> +
> +  interconnects:
> +    maxItems: 3
> +
> +  interconnect-names:
> +    items:
> +      - const: qup-core
> +      - const: qup-config
> +      - const: qup-memory
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  power-domains:
> +    maxItems: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +  required-opps:
> +    maxItems: 1
> +
> +  dmas:
> +    maxItems: 2
> +
> +  dma-names:
> +    items:
> +      - const: tx
> +      - const: rx
> +
> +  pinctrl-0: true
> +  pinctrl-1: true
> +
> +  pinctrl-names:
> +    minItems: 1
> +    items:
> +      - const: default
> +      - const: sleep
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0

These are not needed, they come from schema.

Best regards,
Krzysztof

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

* Re: [PATCH 3/5] dt-bindings: serial: Update Qualcomm geni based QUP uart bindings
  2022-04-02 15:37   ` Krzysztof Kozlowski
@ 2022-04-02 19:24     ` Kuldeep Singh
  0 siblings, 0 replies; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02 19:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Greg Kroah-Hartman, linux-kernel, linux-arm-msm, linux-serial,
	devicetree

On Sat, Apr 02, 2022 at 05:37:57PM +0200, Krzysztof Kozlowski wrote:
> On 02/04/2022 07:12, Kuldeep Singh wrote:
> > Similar to i2c controller, move geni based QUP uart controller bindings
> 
> s/i2c/I2C/
> s/uart/UART/
> 
> > out from parent schema to an individual binding and let parent refer to
> > child schema later on. Uart bindings also stand incomplete right now
> 
> s/Uart/UART/
> 
> > similar to i2c, complete it along this process.
> 
> s/i2c/I2C/
> 
> 
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Great thanks!
Will update accordingly.

-Kuldeep

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

* Re: [PATCH 4/5] dt-bindings: qcom: geni-se: Update uart schema reference
  2022-04-02 15:39   ` Krzysztof Kozlowski
@ 2022-04-02 19:28     ` Kuldeep Singh
  0 siblings, 0 replies; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02 19:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Mukesh Savaliya, Akash Asthana, linux-kernel, linux-arm-msm,
	devicetree

On Sat, Apr 02, 2022 at 05:39:18PM +0200, Krzysztof Kozlowski wrote:
> On 02/04/2022 07:12, Kuldeep Singh wrote:
> > We now have geni based QUP uart controller binding in place as
> 
> s/uart/UART/
> 
> Similar to your previous commit - this could be one, max two sentences...
> 
> > dt-bindings/serial/qcom,serial-geni-qcom.yaml similar to other
> > controllers, update reference in parent schema and while at it, also
> > remove properties defined for the controller from commown wrapper.
> 
> s/commown/common/
> 
> > 
> > Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> > ---
> >  .../bindings/soc/qcom/qcom,geni-se.yaml        | 18 +-----------------
> >  1 file changed, 1 insertion(+), 17 deletions(-)
> > 
> 
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks, will update.

-Kuldeep

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

* Re: [PATCH 5/5] dt-bindings: qcom: geni-se: Remove common controller properties
  2022-04-02 15:41   ` Krzysztof Kozlowski
@ 2022-04-02 19:32     ` Kuldeep Singh
  0 siblings, 0 replies; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02 19:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Mukesh Savaliya, Akash Asthana, linux-kernel, linux-arm-msm,
	devicetree

On Sat, Apr 02, 2022 at 05:41:57PM +0200, Krzysztof Kozlowski wrote:
> On 02/04/2022 07:12, Kuldeep Singh wrote:
> > Now that Geni serial engine controllers(spi, i2c and uart) have their
> > own individual bindings, it's time to remove all common properties of
> > the controllers from parent schema.
> > 
> > Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> > ---
> >  .../bindings/soc/qcom/qcom,geni-se.yaml       | 33 -------------------
> >  1 file changed, 33 deletions(-)
> > 
> 
> This should be squashed with your previous commit, because removal of
> last direct child schema, makes the common parts obsolete. IOW, the
> common parts are only because there is children are open-coded here.

Initially I thought the same, but then this patch will do more than what
commit description says, that's why I kept separate patch.

Nevermind, I will squash it with previous one.

-Kuldeep

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

* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings
  2022-04-02 18:24   ` Krzysztof Kozlowski
@ 2022-04-02 19:34     ` Kuldeep Singh
  0 siblings, 0 replies; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02 19:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	linux-kernel, linux-arm-msm, linux-i2c, devicetree

On Sat, Apr 02, 2022 at 08:24:25PM +0200, Krzysztof Kozlowski wrote:
> On 02/04/2022 07:12, Kuldeep Singh wrote:
> > GENI(generic interface) based Qualcomm Universal Peripheral controller
> > can support multiple serial interfaces like spi,uart and i2c.
> > 
> 
> Few more comments.
> 
> (...)
> 
> > +
> > +  clock-frequency:
> > +    description: Desired I2C bus clock frequency in Hz
> 
> Skip description, it's common for I2C controllers.

ok.

> 
> > +    default: 100000
> > +
> > +  interconnects:
> > +    maxItems: 3
> > +
> > +  interconnect-names:
> > +    items:
> > +      - const: qup-core
> > +      - const: qup-config
> > +      - const: qup-memory
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  required-opps:
> > +    maxItems: 1
> > +
> > +  dmas:
> > +    maxItems: 2
> > +
> > +  dma-names:
> > +    items:
> > +      - const: tx
> > +      - const: rx
> > +
> > +  pinctrl-0: true
> > +  pinctrl-1: true
> > +
> > +  pinctrl-names:
> > +    minItems: 1
> > +    items:
> > +      - const: default
> > +      - const: sleep
> > +
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 0
> 
> These are not needed, they come from schema.

Yes. I will update in v2. Thanks!

-Kuldeep

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

* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings
  2022-04-02 12:29   ` Krzysztof Kozlowski
@ 2022-04-02 19:44     ` Kuldeep Singh
  2022-04-02 19:57       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 18+ messages in thread
From: Kuldeep Singh @ 2022-04-02 19:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	linux-kernel, linux-arm-msm, linux-i2c, devicetree

On Sat, Apr 02, 2022 at 02:29:59PM +0200, Krzysztof Kozlowski wrote:
> On 02/04/2022 07:12, Kuldeep Singh wrote:
> > GENI(generic interface) based Qualcomm Universal Peripheral controller
> > can support multiple serial interfaces like spi,uart and i2c.
> > 
> > Unlike other i2c controllers, QUP i2c bindings are present in parent
> > schema. Move it out from parent to an individual binding and let parent
> > refer to child schema later on.
> > 
> > Please note, current schema isn't complete as it misses out few
> > properties and thus, add these missing properties along the process.
> > 
> > Signed-off-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
> > ---
> >  .../bindings/i2c/qcom,i2c-geni-qcom.yaml      | 110 ++++++++++++++++++
> >  1 file changed, 110 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
> > new file mode 100644
> > index 000000000000..01a02e680ea3
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
> > @@ -0,0 +1,110 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: "http://devicetree.org/schemas/i2c/qcom,i2c-geni-qcom.yaml#"
> > +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> > +
> > +title: Qualcomm Geni based QUP I2C Controller
> > +
> > +maintainers:
> > +  - Andy Gross <agross@kernel.org>
> > +  - Bjorn Andersson <bjorn.andersson@linaro.org>
> > +
> > +allOf:
> > +  - $ref: /schemas/i2c/i2c-controller.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - qcom,geni-i2c
> 
> Just const, no enum. There are no other flavors of this (unless you
> think there are?).

There are no other users. Will change it to const.

> 
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    const: se
> > +
> > +  clock-frequency:
> > +    description: Desired I2C bus clock frequency in Hz
> > +    default: 100000
> > +
> > +  interconnects:
> > +    maxItems: 3
> > +
> > +  interconnect-names:
> > +    items:
> > +      - const: qup-core
> > +      - const: qup-config
> > +      - const: qup-memory
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  required-opps:
> > +    maxItems: 1
> 
> I have doubts this is correct property. Usually it is part of the
> opp-table. I see sc7180 needs this, but I think it is a mistake. Do you
> know how it is supposed to work?

Not sure how exactly it works. I took reference from
Documentation/devicetree/bindings/clock/qcom,videocc.yaml on how to add
required-opps.

-Kuldeep

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

* Re: [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings
  2022-04-02 19:44     ` Kuldeep Singh
@ 2022-04-02 19:57       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 19:57 UTC (permalink / raw)
  To: Kuldeep Singh
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	linux-kernel, linux-arm-msm, linux-i2c, devicetree

On 02/04/2022 21:44, Kuldeep Singh wrote:
> On Sat, Apr 02, 2022 at 02:29:59PM +0200, Krzysztof Kozlowski wrote:
>> On 02/04/2022 07:12, Kuldeep Singh wrote:
>>> GENI(generic interface) based Qualcomm Universal Peripheral controller
>>> can support multiple serial interfaces like spi,uart and i2c.
>>>
	
>>> +
>>> +  power-domains:
>>> +    maxItems: 1
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  required-opps:
>>> +    maxItems: 1
>>
>> I have doubts this is correct property. Usually it is part of the
>> opp-table. I see sc7180 needs this, but I think it is a mistake. Do you
>> know how it is supposed to work?
> 
> Not sure how exactly it works. I took reference from
> Documentation/devicetree/bindings/clock/qcom,videocc.yaml on how to add
> required-opps.
>

I see now that power domains consumer bindings also mention it:
Documentation/devicetree/bindings/power/power_domain.txt
and it might be actually used via __genpd_dev_pm_attach().

Let's keep it then.

Best regards,
Krzysztof

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

end of thread, other threads:[~2022-04-02 19:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02  5:12 [PATCH 0/5] Geni based QUP controller binding cleanups Kuldeep Singh
2022-04-02  5:12 ` [PATCH 1/5] dt-bindings: i2c: Add Qualcomm Geni based QUP i2c bindings Kuldeep Singh
2022-04-02 12:29   ` Krzysztof Kozlowski
2022-04-02 19:44     ` Kuldeep Singh
2022-04-02 19:57       ` Krzysztof Kozlowski
2022-04-02 18:24   ` Krzysztof Kozlowski
2022-04-02 19:34     ` Kuldeep Singh
2022-04-02  5:12 ` [PATCH 2/5] dt-bindings: qcom: geni-se: Update i2c schema reference Kuldeep Singh
2022-04-02 12:30   ` Krzysztof Kozlowski
2022-04-02  5:12 ` [PATCH 3/5] dt-bindings: serial: Update Qualcomm geni based QUP uart bindings Kuldeep Singh
2022-04-02 15:37   ` Krzysztof Kozlowski
2022-04-02 19:24     ` Kuldeep Singh
2022-04-02  5:12 ` [PATCH 4/5] dt-bindings: qcom: geni-se: Update uart schema reference Kuldeep Singh
2022-04-02 15:39   ` Krzysztof Kozlowski
2022-04-02 19:28     ` Kuldeep Singh
2022-04-02  5:12 ` [PATCH 5/5] dt-bindings: qcom: geni-se: Remove common controller properties Kuldeep Singh
2022-04-02 15:41   ` Krzysztof Kozlowski
2022-04-02 19:32     ` Kuldeep Singh

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.