All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion
@ 2022-04-24 13:15 David Heidelberg
  2022-04-24 13:15 ` [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example David Heidelberg
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: David Heidelberg @ 2022-04-24 13:15 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, David S. Miller, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Alex Elder
  Cc: David Heidelberg, linux-arm-msm, netdev, devicetree, linux-kernel

Example of mpss was missing required properties.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 Documentation/devicetree/bindings/net/qcom,ipa.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
index 58ecc62adfaa..852658b4d05c 100644
--- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml
+++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml
@@ -182,6 +182,11 @@ examples:
 
         smp2p-mpss {
                 compatible = "qcom,smp2p";
+                mboxes = <&apss_shared 14>;
+                qcom,smem = <435>, <428>;
+                qcom,local-pid = <0>;
+                qcom,remote-pid = <1>;
+
                 ipa_smp2p_out: ipa-ap-to-modem {
                         qcom,entry-name = "ipa";
                         #qcom,smem-state-cells = <1>;
-- 
2.35.1


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

* [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example
  2022-04-24 13:15 [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion David Heidelberg
@ 2022-04-24 13:15 ` David Heidelberg
  2022-04-24 14:43   ` Krzysztof Kozlowski
  2022-04-25 13:31   ` Rob Herring
  2022-04-24 13:15 ` [PATCH v2 3/3] dt-bindings: soc: qcom: convert QCOM SMP2P binding to yaml David Heidelberg
  2022-04-24 14:41 ` [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion Krzysztof Kozlowski
  2 siblings, 2 replies; 8+ messages in thread
From: David Heidelberg @ 2022-04-24 13:15 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Andy Gross, Bjorn Andersson, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski
  Cc: David Heidelberg, Manivannan Sadhasivam, linux-arm-msm,
	linux-kernel, devicetree

These missing required properties are needed for
smp2p binding reference checks.

Misc: adjusted examples properties formatting from dtsi.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 .../devicetree/bindings/mailbox/qcom-ipcc.yaml        | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml b/Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml
index 866efb278813..d573d555f4c6 100644
--- a/Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml
+++ b/Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml
@@ -75,9 +75,14 @@ examples:
 
         smp2p-modem {
                 compatible = "qcom,smp2p";
-                interrupts-extended = <&ipcc_mproc IPCC_CLIENT_MPSS
-                                IPCC_MPROC_SIGNAL_SMP2P IRQ_TYPE_EDGE_RISING>;
-                mboxes = <&ipcc_mproc IPCC_CLIENT_MPSS IPCC_MPROC_SIGNAL_SMP2P>;
+                qcom,smem = <443>, <429>;
+                interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
+                                             IPCC_MPROC_SIGNAL_SMP2P
+                                             IRQ_TYPE_EDGE_RISING>;
+                mboxes = <&ipcc IPCC_CLIENT_LPASS
+                                IPCC_MPROC_SIGNAL_SMP2P>;
 
+                qcom,local-pid = <0>;
+                qcom,remote-pid = <2>;
                 /* Other SMP2P fields */
         };
-- 
2.35.1


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

* [PATCH v2 3/3] dt-bindings: soc: qcom: convert QCOM SMP2P binding to yaml
  2022-04-24 13:15 [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion David Heidelberg
  2022-04-24 13:15 ` [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example David Heidelberg
@ 2022-04-24 13:15 ` David Heidelberg
  2022-04-24 13:38   ` Krzysztof Kozlowski
  2022-04-24 14:41 ` [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion Krzysztof Kozlowski
  2 siblings, 1 reply; 8+ messages in thread
From: David Heidelberg @ 2022-04-24 13:15 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski
  Cc: David Heidelberg, linux-arm-msm, devicetree, linux-kernel

Convert Qualcomm SoC SMP2P binding to the yaml format.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
v2:
 - dropped constraints on sub-node names,
   converted patternProperties to additionalProperties
 - adjusted name from "Point 2 Point" to "Point to Point"
---
 .../bindings/soc/qcom/qcom,smp2p.txt          | 110 --------------
 .../bindings/soc/qcom/qcom,smp2p.yaml         | 136 ++++++++++++++++++
 2 files changed, 136 insertions(+), 110 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt
deleted file mode 100644
index 49e1d72d3648..000000000000
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-Qualcomm Shared Memory Point 2 Point binding
-
-The Shared Memory Point to Point (SMP2P) protocol facilitates communication of
-a single 32-bit value between two processors.  Each value has a single writer
-(the local side) and a single reader (the remote side).  Values are uniquely
-identified in the system by the directed edge (local processor ID to remote
-processor ID) and a string identifier.
-
-- compatible:
-	Usage: required
-	Value type: <string>
-	Definition: must be one of:
-		    "qcom,smp2p"
-
-- interrupts:
-	Usage: required
-	Value type: <prop-encoded-array>
-	Definition: one entry specifying the smp2p notification interrupt
-
-- mboxes:
-	Usage: required
-	Value type: <prop-encoded-array>
-	Definition: reference to the associated doorbell in APCS, as described
-		    in mailbox/mailbox.txt
-
-- qcom,ipc:
-	Usage: required, unless mboxes is specified
-	Value type: <prop-encoded-array>
-	Definition: three entries specifying the outgoing ipc bit used for
-		    signaling the remote end of the smp2p edge:
-		    - phandle to a syscon node representing the apcs registers
-		    - u32 representing offset to the register within the syscon
-		    - u32 representing the ipc bit within the register
-
-- qcom,smem:
-	Usage: required
-	Value type: <u32 array>
-	Definition: two identifiers of the inbound and outbound smem items used
-		    for this edge
-
-- qcom,local-pid:
-	Usage: required
-	Value type: <u32>
-	Definition: specifies the identifier of the local endpoint of this edge
-
-- qcom,remote-pid:
-	Usage: required
-	Value type: <u32>
-	Definition: specifies the identifier of the remote endpoint of this edge
-
-= SUBNODES
-Each SMP2P pair contain a set of inbound and outbound entries, these are
-described in subnodes of the smp2p device node. The node names are not
-important.
-
-- qcom,entry-name:
-	Usage: required
-	Value type: <string>
-	Definition: specifies the name of this entry, for inbound entries this
-		    will be used to match against the remotely allocated entry
-		    and for outbound entries this name is used for allocating
-		    entries
-
-- interrupt-controller:
-	Usage: required for incoming entries
-	Value type: <empty>
-	Definition: marks the entry as inbound; the node should be specified
-		    as a two cell interrupt-controller as defined in
-		    "../interrupt-controller/interrupts.txt"
-		    If not specified this node will denote the outgoing entry
-
-- #interrupt-cells:
-	Usage: required for incoming entries
-	Value type: <u32>
-	Definition: must be 2 - denoting the bit in the entry and IRQ flags
-
-- #qcom,smem-state-cells:
-	Usage: required for outgoing entries
-	Value type: <u32>
-	Definition: must be 1 - denoting the bit in the entry
-
-= EXAMPLE
-The following example shows the SMP2P setup with the wireless processor,
-defined from the 8974 apps processor's point-of-view. It encompasses one
-inbound and one outbound entry:
-
-wcnss-smp2p {
-	compatible = "qcom,smp2p";
-	qcom,smem = <431>, <451>;
-
-	interrupts = <0 143 1>;
-
-	qcom,ipc = <&apcs 8 18>;
-
-	qcom,local-pid = <0>;
-	qcom,remote-pid = <4>;
-
-	wcnss_smp2p_out: master-kernel {
-		qcom,entry-name = "master-kernel";
-
-		#qcom,smem-state-cells = <1>;
-	};
-
-	wcnss_smp2p_in: slave-kernel {
-		qcom,entry-name = "slave-kernel";
-
-		interrupt-controller;
-		#interrupt-cells = <2>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml
new file mode 100644
index 000000000000..9d728c76f7b0
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml
@@ -0,0 +1,136 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/qcom/qcom,smp2p.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Shared Memory Point to Point
+
+description: |
+  The Shared Memory Point to Point (SMP2P) protocol facilitates communication of
+  a single 32-bit value between two processors.  Each value has a single writer
+  (the local side) and a single reader (the remote side).  Values are uniquely
+  identified in the system by the directed edge (local processor ID to remote
+  processor ID) and a string identifier.
+
+maintainers:
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+properties:
+  compatible:
+    const: qcom,smp2p
+
+  interrupts:
+    maxItems: 1
+
+  mboxes:
+    description: >
+      reference to the associated doorbell in APCS, as described
+      in mailbox/mailbox.txt
+
+  qcom,ipc:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    description: >
+      three entries specifying the outgoing ipc bit used for
+      signaling the remote end of the smp2p edge
+    minItems: 1
+    maxItems: 32 # no hard limit
+    items:
+      items:
+        - description: phandle to a syscon node representing the apcs registers
+        - description: offset to the register within the syscon
+        - description: the IPC bit within the register
+
+  qcom,smem:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    description: indentifiers of the smem items used for this edge
+    items:
+      - items:
+          - description: identifier of inbound smem items
+      - items:
+          - description: identifier of outbound smem items
+
+  qcom,local-pid:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: specifies the identifier of the local endpoint of this edge
+
+  qcom,remote-pid:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: specifies the identifier of the remote endpoint of this edge
+
+additionalProperties:
+  type: object
+  properties:
+    interrupt-controller:
+      description: >
+        marks the entry as inbound, if not specified
+        this node will denote the outgoing entry
+
+    '#interrupt-cells':
+      const: 2
+
+    qcom,entry-name:
+      $ref: /schemas/types.yaml#/definitions/string
+      description: >
+        specifies the name of this entry, for inbound entries this will be
+        used to match against the remotely allocated entry and for outbound
+        entries this name is used for allocating entries
+
+    '#qcom,smem-state-cells':
+      $ref: /schemas/types.yaml#/definitions/uint32
+      description: required for outgoing entries
+      const: 1
+
+  required:
+    - qcom,entry-name
+
+  oneOf:
+    - required:
+        - interrupt-controller
+        - '#interrupt-cells'
+    - required:
+        - '#qcom,smem-state-cells'
+
+  additionalProperties: false
+
+required:
+  - compatible
+  - qcom,smem
+  - qcom,local-pid
+  - qcom,remote-pid
+
+anyOf:
+  - required:
+      - mboxes
+  - required:
+      - qcom,ipc
+
+examples:
+  # The following example shows the SMP2P setup with the wireless processor,
+  # defined from the 8974 apps processor's point-of-view. It encompasses one
+  # inbound and one outbound entry:
+  - |
+    wcnss-smp2p {
+        compatible = "qcom,smp2p";
+        qcom,smem = <431>, <451>;
+
+        interrupts = <0 143 1>;
+
+        qcom,ipc = <&apcs 8 18>;
+
+        qcom,local-pid = <0>;
+        qcom,remote-pid = <4>;
+
+        wcnss_smp2p_out: master-kernel {
+            qcom,entry-name = "master-kernel";
+
+            #qcom,smem-state-cells = <1>;
+        };
+
+        wcnss_smp2p_in: slave-kernel {
+            qcom,entry-name = "slave-kernel";
+
+            interrupt-controller;
+            #interrupt-cells = <2>;
+        };
+    };
-- 
2.35.1


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

* Re: [PATCH v2 3/3] dt-bindings: soc: qcom: convert QCOM SMP2P binding to yaml
  2022-04-24 13:15 ` [PATCH v2 3/3] dt-bindings: soc: qcom: convert QCOM SMP2P binding to yaml David Heidelberg
@ 2022-04-24 13:38   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-24 13:38 UTC (permalink / raw)
  To: David Heidelberg, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, linux-kernel

On 24/04/2022 15:15, David Heidelberg wrote:
> Convert Qualcomm SoC SMP2P binding to the yaml format.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> v2:
>  - dropped constraints on sub-node names,
>    converted patternProperties to additionalProperties
>  - adjusted name from "Point 2 Point" to "Point to Point"
> ---
>  .../bindings/soc/qcom/qcom,smp2p.txt          | 110 --------------
>  .../bindings/soc/qcom/qcom,smp2p.yaml         | 136 ++++++++++++++++++

This was already done. Sorry that I did not notice your earlier work, I
am usually checking for prior work but this was missed.


Best regards,
Krzysztof

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

* Re: [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion
  2022-04-24 13:15 [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion David Heidelberg
  2022-04-24 13:15 ` [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example David Heidelberg
  2022-04-24 13:15 ` [PATCH v2 3/3] dt-bindings: soc: qcom: convert QCOM SMP2P binding to yaml David Heidelberg
@ 2022-04-24 14:41 ` Krzysztof Kozlowski
  2 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-24 14:41 UTC (permalink / raw)
  To: David Heidelberg, Andy Gross, Bjorn Andersson, David S. Miller,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Alex Elder
  Cc: linux-arm-msm, netdev, devicetree, linux-kernel

On 24/04/2022 15:15, David Heidelberg wrote:
> Example of mpss was missing required properties.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  Documentation/devicetree/bindings/net/qcom,ipa.yaml | 5 +++++

This needs rebasing on linux-next and then probably won't be
correct/necessary.


Best regards,
Krzysztof

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

* Re: [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example
  2022-04-24 13:15 ` [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example David Heidelberg
@ 2022-04-24 14:43   ` Krzysztof Kozlowski
  2022-04-25  7:51     ` David Heidelberg
  2022-04-25 13:31   ` Rob Herring
  1 sibling, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-24 14:43 UTC (permalink / raw)
  To: David Heidelberg, Manivannan Sadhasivam, Andy Gross,
	Bjorn Andersson, Jassi Brar, Rob Herring, Krzysztof Kozlowski
  Cc: Manivannan Sadhasivam, linux-arm-msm, linux-kernel, devicetree

On 24/04/2022 15:15, David Heidelberg wrote:
> These missing required properties are needed for
> smp2p binding reference checks.
> 
> Misc: adjusted examples properties formatting from dtsi.

I don't get the "misc:" comment. What is it about?

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

Best regards,
Krzysztof

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

* Re: [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example
  2022-04-24 14:43   ` Krzysztof Kozlowski
@ 2022-04-25  7:51     ` David Heidelberg
  0 siblings, 0 replies; 8+ messages in thread
From: David Heidelberg @ 2022-04-25  7:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Manivannan Sadhasivam, Andy Gross,
	Bjorn Andersson, Jassi Brar, Rob Herring, Krzysztof Kozlowski
  Cc: Manivannan Sadhasivam, linux-arm-msm, linux-kernel, devicetree

On 24/04/2022 16:43, Krzysztof Kozlowski wrote:
> On 24/04/2022 15:15, David Heidelberg wrote:
>> These missing required properties are needed for
>> smp2p binding reference checks.
>>
>> Misc: adjusted examples properties formatting from dtsi.
> I don't get the "misc:" comment. What is it about?
I used same formatting as in dtsi where the node is used (cosmetic change).
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thanks
>
> Best regards,
> Krzysztof

-- 
David Heidelberg
Consultant Software Engineer

Signal: +420 608 26 33 76
Matrix: @okias:matrix.org


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

* Re: [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example
  2022-04-24 13:15 ` [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example David Heidelberg
  2022-04-24 14:43   ` Krzysztof Kozlowski
@ 2022-04-25 13:31   ` Rob Herring
  1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2022-04-25 13:31 UTC (permalink / raw)
  To: David Heidelberg
  Cc: linux-arm-msm, Manivannan Sadhasivam, Krzysztof Kozlowski,
	Manivannan Sadhasivam, devicetree, Jassi Brar, linux-kernel,
	Rob Herring, Andy Gross, Bjorn Andersson

On Sun, 24 Apr 2022 15:15:20 +0200, David Heidelberg wrote:
> These missing required properties are needed for
> smp2p binding reference checks.
> 
> Misc: adjusted examples properties formatting from dtsi.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  .../devicetree/bindings/mailbox/qcom-ipcc.yaml        | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


mailbox@ed18000: compatible:0: 'qcom,sm8450-ipcc' is not one of ['qcom,sm6350-ipcc', 'qcom,sm8250-ipcc', 'qcom,sm8350-ipcc', 'qcom,sc7280-ipcc']
	arch/arm64/boot/dts/qcom/sm8450-hdk.dtb
	arch/arm64/boot/dts/qcom/sm8450-qrd.dtb


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

end of thread, other threads:[~2022-04-25 13:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24 13:15 [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion David Heidelberg
2022-04-24 13:15 ` [PATCH v2 2/3] dt-bindings: mailbox: qcom-ipcc: add missing properties into example David Heidelberg
2022-04-24 14:43   ` Krzysztof Kozlowski
2022-04-25  7:51     ` David Heidelberg
2022-04-25 13:31   ` Rob Herring
2022-04-24 13:15 ` [PATCH v2 3/3] dt-bindings: soc: qcom: convert QCOM SMP2P binding to yaml David Heidelberg
2022-04-24 13:38   ` Krzysztof Kozlowski
2022-04-24 14:41 ` [PATCH v2 1/3] dt-bindings: net: qcom,ipa: fix example for upcomming smp2p conversion Krzysztof Kozlowski

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.