devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback
@ 2023-03-14  8:09 Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks Krzysztof Kozlowski
                   ` (13 more replies)
  0 siblings, 14 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

Hi,

Changes since v1
================
1. Rebase
2. Make msm8994 fallback for several variants, not msm8953, because the latter
   actually might take some clocks.
3. Two new patches for SDX55.
4. Minor corrections in bindings style.
v1: https://lore.kernel.org/all/20230202161856.385825-1-krzysztof.kozlowski@linaro.org/

Description
===========

If entire approach is accepted (and correct), there are no dependencies and
patches can be picked independently.  Although the best in the same cycle, so
there will be no new `dtbs_check` warnings.

Best regards,
Krzysztof

Krzysztof Kozlowski (13):
  dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks
  dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match
  dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks
  mailbox: qcom-apcs-ipc: do not grow the of_device_id
  arm64: dts: qcom: ipq8074: add compatible fallback to mailbox
  arm64: dts: qcom: msm8976: add compatible fallback to mailbox
  arm64: dts: qcom: msm8998: add compatible fallback to mailbox
  arm64: dts: qcom: sdm630: add compatible fallback to mailbox
  arm64: dts: qcom: sm6115: add compatible fallback to mailbox
  arm64: dts: qcom: sm6125: add compatible fallback to mailbox
  arm64: dts: qcom: qcs404: add compatible fallback to mailbox
  arm64: dts: qcom: sc7180: add compatible fallback to mailbox
  arm64: dts: qcom: sm8150: add compatible fallback to mailbox

 .../mailbox/qcom,apcs-kpss-global.yaml        | 67 ++++++++++---------
 arch/arm64/boot/dts/qcom/ipq8074.dtsi         |  3 +-
 arch/arm64/boot/dts/qcom/msm8976.dtsi         |  3 +-
 arch/arm64/boot/dts/qcom/msm8998.dtsi         |  3 +-
 arch/arm64/boot/dts/qcom/qcs404.dtsi          |  3 +-
 arch/arm64/boot/dts/qcom/sc7180.dtsi          |  3 +-
 arch/arm64/boot/dts/qcom/sdm630.dtsi          |  3 +-
 arch/arm64/boot/dts/qcom/sm6115.dtsi          |  3 +-
 arch/arm64/boot/dts/qcom/sm6125.dtsi          |  3 +-
 arch/arm64/boot/dts/qcom/sm8150.dtsi          |  3 +-
 drivers/mailbox/qcom-apcs-ipc-mailbox.c       | 11 +--
 11 files changed, 60 insertions(+), 45 deletions(-)

-- 
2.34.1


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

* [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-17 21:07   ` Rob Herring
                     ` (2 more replies)
  2023-03-14  8:09 ` [PATCH v2 02/13] dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match Krzysztof Kozlowski
                   ` (12 subsequent siblings)
  13 siblings, 3 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

SDX55 and SDX65 DTS takes clocks in a bit different order.  Adjust
bindings to the DTS.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
index d888ead09282..2992227631c4 100644
--- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
+++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
@@ -97,14 +97,14 @@ allOf:
       properties:
         clocks:
           items:
+            - description: reference clock
             - description: primary pll parent of the clock driver
             - description: auxiliary parent
-            - description: reference clock
         clock-names:
           items:
+            - const: ref
             - const: pll
             - const: aux
-            - const: ref
   - if:
       properties:
         compatible:
-- 
2.34.1


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

* [PATCH v2 02/13] dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-17 21:07   ` Rob Herring
  2023-03-20 10:40   ` Manivannan Sadhasivam
  2023-03-14  8:09 ` [PATCH v2 03/13] dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks Krzysztof Kozlowski
                   ` (11 subsequent siblings)
  13 siblings, 2 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

The qcom,sdx55-apcs-gcc is followed by another compatible (syscon), thus
the 'if' clause must match by contains.

Fixes: 0d17014e9189 ("dt-bindings: mailbox: Add binding for SDX55 APCS")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
index 2992227631c4..4d2f408a5efb 100644
--- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
+++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
@@ -91,8 +91,9 @@ allOf:
   - if:
       properties:
         compatible:
-          enum:
-            - qcom,sdx55-apcs-gcc
+          contains:
+            enum:
+              - qcom,sdx55-apcs-gcc
     then:
       properties:
         clocks:
-- 
2.34.1


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

* [PATCH v2 03/13] dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 02/13] dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-17 21:08   ` Rob Herring
  2023-03-14  8:09 ` [PATCH v2 04/13] mailbox: qcom-apcs-ipc: do not grow the of_device_id Krzysztof Kozlowski
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

Rework the compatibles and group devices which have similar interface
(same from Linux driver point of view) as compatible.  This allows
smaller of_device_id table in the Linux driver and smaller
allOf:if:then: constraints.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../mailbox/qcom,apcs-kpss-global.yaml        | 58 ++++++++++---------
 1 file changed, 31 insertions(+), 27 deletions(-)

diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
index 4d2f408a5efb..792778924eb3 100644
--- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
+++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
@@ -19,32 +19,46 @@ properties:
       - items:
           - enum:
               - qcom,ipq5332-apcs-apps-global
+              - qcom,ipq8074-apcs-apps-global
           - const: qcom,ipq6018-apcs-apps-global
       - items:
           - enum:
-              - qcom,ipq6018-apcs-apps-global
-              - qcom,ipq8074-apcs-apps-global
-              - qcom,msm8996-apcs-hmss-global
+              - qcom,msm8939-apcs-kpss-global
+              - qcom,qcs404-apcs-apps-global
+          - const: qcom,msm8916-apcs-kpss-global
+          - const: syscon
+      - items:
+          - enum:
+              - qcom,msm8976-apcs-kpss-global
+          - const: qcom,msm8994-apcs-kpss-global
+          - const: syscon
+      - items:
+          - enum:
               - qcom,msm8998-apcs-hmss-global
               - qcom,qcm2290-apcs-hmss-global
-              - qcom,sc7180-apss-shared
-              - qcom,sc8180x-apss-shared
               - qcom,sdm660-apcs-hmss-global
-              - qcom,sdm845-apss-shared
               - qcom,sm4250-apcs-hmss-global
-              - qcom,sm6125-apcs-hmss-global
               - qcom,sm6115-apcs-hmss-global
+              - qcom,sm6125-apcs-hmss-global
+          - const: qcom,msm8994-apcs-kpss-global
+      - items:
+          - enum:
+              - qcom,sc7180-apss-shared
+              - qcom,sc8180x-apss-shared
               - qcom,sm8150-apss-shared
+          - const: qcom,sdm845-apss-shared
       - items:
           - enum:
               - qcom,msm8916-apcs-kpss-global
-              - qcom,msm8939-apcs-kpss-global
               - qcom,msm8953-apcs-kpss-global
-              - qcom,msm8976-apcs-kpss-global
               - qcom,msm8994-apcs-kpss-global
-              - qcom,qcs404-apcs-apps-global
               - qcom,sdx55-apcs-gcc
           - const: syscon
+      - enum:
+          - qcom,ipq6018-apcs-apps-global
+          - qcom,msm8996-apcs-hmss-global
+          - qcom,sdm845-apss-shared
+
   reg:
     maxItems: 1
 
@@ -74,10 +88,9 @@ allOf:
   - if:
       properties:
         compatible:
-          enum:
-            - qcom,msm8916-apcs-kpss-global
-            - qcom,msm8939-apcs-kpss-global
-            - qcom,qcs404-apcs-apps-global
+          contains:
+            enum:
+              - qcom,msm8916-apcs-kpss-global
     then:
       properties:
         clocks:
@@ -88,6 +101,7 @@ allOf:
           items:
             - const: pll
             - const: aux
+
   - if:
       properties:
         compatible:
@@ -106,13 +120,13 @@ allOf:
             - const: ref
             - const: pll
             - const: aux
+
   - if:
       properties:
         compatible:
           contains:
             enum:
               - qcom,ipq6018-apcs-apps-global
-              - qcom,ipq8074-apcs-apps-global
     then:
       properties:
         clocks:
@@ -129,19 +143,9 @@ allOf:
         compatible:
           enum:
             - qcom,msm8953-apcs-kpss-global
-            - qcom,msm8976-apcs-kpss-global
             - qcom,msm8994-apcs-kpss-global
             - qcom,msm8996-apcs-hmss-global
-            - qcom,msm8998-apcs-hmss-global
-            - qcom,qcm2290-apcs-hmss-global
-            - qcom,sc7180-apss-shared
-            - qcom,sc8180x-apss-shared
-            - qcom,sdm660-apcs-hmss-global
             - qcom,sdm845-apss-shared
-            - qcom,sm4250-apcs-hmss-global
-            - qcom,sm6115-apcs-hmss-global
-            - qcom,sm6125-apcs-hmss-global
-            - qcom,sm8150-apss-shared
     then:
       properties:
         clocks: false
@@ -153,7 +157,6 @@ allOf:
           contains:
             enum:
               - qcom,ipq6018-apcs-apps-global
-              - qcom,ipq8074-apcs-apps-global
     then:
       properties:
         '#clock-cells':
@@ -188,7 +191,8 @@ examples:
     #define GCC_APSS_AHB_CLK_SRC  1
     #define GCC_GPLL0_AO_OUT_MAIN 123
     apcs: mailbox@b011000 {
-        compatible = "qcom,qcs404-apcs-apps-global", "syscon";
+        compatible = "qcom,qcs404-apcs-apps-global",
+                     "qcom,msm8916-apcs-kpss-global", "syscon";
         reg = <0x0b011000 0x1000>;
         #mbox-cells = <1>;
         clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>;
-- 
2.34.1


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

* [PATCH v2 04/13] mailbox: qcom-apcs-ipc: do not grow the of_device_id
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 03/13] dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 05/13] arm64: dts: qcom: ipq8074: add compatible fallback to mailbox Krzysztof Kozlowski
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

Re-organize the compatible devices and add a comment to avoid unneeded
of_device_id growth with every new SoC.  These devices have quite a lot
of similarities and they can use only one compatible fallback for driver
binding.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/mailbox/qcom-apcs-ipc-mailbox.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
index 6bbf87c6d60b..f3ac0b035945 100644
--- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c
+++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
@@ -143,17 +143,19 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev)
 static const struct of_device_id qcom_apcs_ipc_of_match[] = {
 	{ .compatible = "qcom,ipq5332-apcs-apps-global", .data = &ipq6018_apcs_data },
 	{ .compatible = "qcom,ipq6018-apcs-apps-global", .data = &ipq6018_apcs_data },
-	{ .compatible = "qcom,ipq8074-apcs-apps-global", .data = &ipq6018_apcs_data },
 	{ .compatible = "qcom,msm8916-apcs-kpss-global", .data = &msm8916_apcs_data },
-	{ .compatible = "qcom,msm8939-apcs-kpss-global", .data = &msm8916_apcs_data },
 	{ .compatible = "qcom,msm8953-apcs-kpss-global", .data = &msm8994_apcs_data },
+	{ .compatible = "qcom,msm8996-apcs-hmss-global", .data = &msm8996_apcs_data },
+	{ .compatible = "qcom,sc7180-apss-shared", .data = &apps_shared_apcs_data },
+	{ .compatible = "qcom,sdx55-apcs-gcc", .data = &sdx55_apcs_data },
+	/* Do not add any more entries using existing driver data */
+	{ .compatible = "qcom,ipq8074-apcs-apps-global", .data = &ipq6018_apcs_data },
+	{ .compatible = "qcom,msm8939-apcs-kpss-global", .data = &msm8916_apcs_data },
 	{ .compatible = "qcom,msm8976-apcs-kpss-global", .data = &msm8994_apcs_data },
 	{ .compatible = "qcom,msm8994-apcs-kpss-global", .data = &msm8994_apcs_data },
-	{ .compatible = "qcom,msm8996-apcs-hmss-global", .data = &msm8996_apcs_data },
 	{ .compatible = "qcom,msm8998-apcs-hmss-global", .data = &msm8994_apcs_data },
 	{ .compatible = "qcom,qcm2290-apcs-hmss-global", .data = &msm8994_apcs_data },
 	{ .compatible = "qcom,qcs404-apcs-apps-global", .data = &msm8916_apcs_data },
-	{ .compatible = "qcom,sc7180-apss-shared", .data = &apps_shared_apcs_data },
 	{ .compatible = "qcom,sc8180x-apss-shared", .data = &apps_shared_apcs_data },
 	{ .compatible = "qcom,sdm660-apcs-hmss-global", .data = &msm8994_apcs_data },
 	{ .compatible = "qcom,sdm845-apss-shared", .data = &apps_shared_apcs_data },
@@ -161,7 +163,6 @@ static const struct of_device_id qcom_apcs_ipc_of_match[] = {
 	{ .compatible = "qcom,sm6125-apcs-hmss-global", .data = &msm8994_apcs_data },
 	{ .compatible = "qcom,sm8150-apss-shared", .data = &apps_shared_apcs_data },
 	{ .compatible = "qcom,sm6115-apcs-hmss-global", .data = &msm8994_apcs_data },
-	{ .compatible = "qcom,sdx55-apcs-gcc", .data = &sdx55_apcs_data },
 	{}
 };
 MODULE_DEVICE_TABLE(of, qcom_apcs_ipc_of_match);
-- 
2.34.1


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

* [PATCH v2 05/13] arm64: dts: qcom: ipq8074: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 04/13] mailbox: qcom-apcs-ipc: do not grow the of_device_id Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 06/13] arm64: dts: qcom: msm8976: " Krzysztof Kozlowski
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

IPQ8074 mailbox is compatible with IPQ6018.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 62d05d740646..3fa7a63db74e 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -687,7 +687,8 @@ watchdog: watchdog@b017000 {
 		};
 
 		apcs_glb: mailbox@b111000 {
-			compatible = "qcom,ipq8074-apcs-apps-global";
+			compatible = "qcom,ipq8074-apcs-apps-global",
+				     "qcom,ipq6018-apcs-apps-global";
 			reg = <0x0b111000 0x1000>;
 			clocks = <&a53pll>, <&xo>;
 			clock-names = "pll", "xo";
-- 
2.34.1


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

* [PATCH v2 06/13] arm64: dts: qcom: msm8976: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 05/13] arm64: dts: qcom: ipq8074: add compatible fallback to mailbox Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 07/13] arm64: dts: qcom: msm8998: " Krzysztof Kozlowski
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

MSM8976 mailbox is compatible with MSM8994.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8976.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi
index 2d360d05aa5e..c726d879d6f1 100644
--- a/arch/arm64/boot/dts/qcom/msm8976.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi
@@ -1027,7 +1027,8 @@ intc: interrupt-controller@b000000 {
 		};
 
 		apcs: mailbox@b011000 {
-			compatible = "qcom,msm8976-apcs-kpss-global", "syscon";
+			compatible = "qcom,msm8976-apcs-kpss-global",
+				     "qcom,msm8994-apcs-kpss-global", "syscon";
 			reg = <0x0b011000 0x1000>;
 			#mbox-cells = <1>;
 		};
-- 
2.34.1


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

* [PATCH v2 07/13] arm64: dts: qcom: msm8998: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 06/13] arm64: dts: qcom: msm8976: " Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 08/13] arm64: dts: qcom: sdm630: " Krzysztof Kozlowski
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

MSM8998 mailbox is compatible with MSM8994.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8998.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 8bc1c59127e5..65f9b56e1dda 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2490,7 +2490,8 @@ glink-edge {
 		};
 
 		apcs_glb: mailbox@17911000 {
-			compatible = "qcom,msm8998-apcs-hmss-global";
+			compatible = "qcom,msm8998-apcs-hmss-global",
+				     "qcom,msm8994-apcs-kpss-global";
 			reg = <0x17911000 0x1000>;
 
 			#mbox-cells = <1>;
-- 
2.34.1


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

* [PATCH v2 08/13] arm64: dts: qcom: sdm630: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (6 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 07/13] arm64: dts: qcom: msm8998: " Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 09/13] arm64: dts: qcom: sm6115: " Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

SDM630 mailbox is compatible with MSM8994.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 5827cda270a0..e9169876da6f 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -2268,7 +2268,8 @@ gnoc: interconnect@17900000 {
 		};
 
 		apcs_glb: mailbox@17911000 {
-			compatible = "qcom,sdm660-apcs-hmss-global";
+			compatible = "qcom,sdm660-apcs-hmss-global",
+				     "qcom,msm8994-apcs-kpss-global";
 			reg = <0x17911000 0x1000>;
 
 			#mbox-cells = <1>;
-- 
2.34.1


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

* [PATCH v2 09/13] arm64: dts: qcom: sm6115: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (7 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 08/13] arm64: dts: qcom: sdm630: " Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 10/13] arm64: dts: qcom: sm6125: " Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

SM6115 mailbox is compatible with MSM8994.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index fbd67d2c8d78..2feaf9c831fe 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -2038,7 +2038,8 @@ watchdog@f017000 {
 		};
 
 		apcs_glb: mailbox@f111000 {
-			compatible = "qcom,sm6115-apcs-hmss-global";
+			compatible = "qcom,sm6115-apcs-hmss-global",
+				     "qcom,msm8994-apcs-kpss-global";
 			reg = <0x0 0x0f111000 0x0 0x1000>;
 
 			#mbox-cells = <1>;
-- 
2.34.1


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

* [PATCH v2 10/13] arm64: dts: qcom: sm6125: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (8 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 09/13] arm64: dts: qcom: sm6115: " Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 11/13] arm64: dts: qcom: qcs404: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

SM6125 mailbox is compatible with MSM8994.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6125.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
index 65033227718a..225c03f4e669 100644
--- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
@@ -1211,7 +1211,8 @@ apps_smmu: iommu@c600000 {
 		};
 
 		apcs_glb: mailbox@f111000 {
-			compatible = "qcom,sm6125-apcs-hmss-global";
+			compatible = "qcom,sm6125-apcs-hmss-global",
+				     "qcom,msm8994-apcs-kpss-global";
 			reg = <0x0f111000 0x1000>;
 
 			#mbox-cells = <1>;
-- 
2.34.1


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

* [PATCH v2 11/13] arm64: dts: qcom: qcs404: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (9 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 10/13] arm64: dts: qcom: sm6125: " Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 12/13] arm64: dts: qcom: sc7180: " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

QCS404 mailbox is compatible with MSM8916.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi
index bc2ed73afb74..e4fdc40be821 100644
--- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
@@ -1302,7 +1302,8 @@ intc: interrupt-controller@b000000 {
 		};
 
 		apcs_glb: mailbox@b011000 {
-			compatible = "qcom,qcs404-apcs-apps-global", "syscon";
+			compatible = "qcom,qcs404-apcs-apps-global",
+				     "qcom,msm8916-apcs-kpss-global", "syscon";
 			reg = <0x0b011000 0x1000>;
 			#mbox-cells = <1>;
 			clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>;
-- 
2.34.1


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

* [PATCH v2 12/13] arm64: dts: qcom: sc7180: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (10 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 11/13] arm64: dts: qcom: qcs404: " Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14  8:09 ` [PATCH v2 13/13] arm64: dts: qcom: sm8150: " Krzysztof Kozlowski
  2023-03-14 12:16 ` [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Dmitry Baryshkov
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

SC7180 mailbox is compatible with SDM845.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index ebfa21e9ed8a..61d99c02a290 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3407,7 +3407,8 @@ msi-controller@17a40000 {
 		};
 
 		apss_shared: mailbox@17c00000 {
-			compatible = "qcom,sc7180-apss-shared";
+			compatible = "qcom,sc7180-apss-shared",
+				     "qcom,sdm845-apss-shared";
 			reg = <0 0x17c00000 0 0x10000>;
 			#mbox-cells = <1>;
 		};
-- 
2.34.1


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

* [PATCH v2 13/13] arm64: dts: qcom: sm8150: add compatible fallback to mailbox
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (11 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 12/13] arm64: dts: qcom: sc7180: " Krzysztof Kozlowski
@ 2023-03-14  8:09 ` Krzysztof Kozlowski
  2023-03-14 12:16 ` [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Dmitry Baryshkov
  13 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14  8:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

SC8150 mailbox is compatible with SDM845.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 13e0ce828606..fa58ba82faf2 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -4097,7 +4097,8 @@ intc: interrupt-controller@17a00000 {
 		};
 
 		apss_shared: mailbox@17c00000 {
-			compatible = "qcom,sm8150-apss-shared";
+			compatible = "qcom,sm8150-apss-shared",
+				     "qcom,sdm845-apss-shared";
 			reg = <0x0 0x17c00000 0x0 0x1000>;
 			#mbox-cells = <1>;
 		};
-- 
2.34.1


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

* Re: [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback
  2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
                   ` (12 preceding siblings ...)
  2023-03-14  8:09 ` [PATCH v2 13/13] arm64: dts: qcom: sm8150: " Krzysztof Kozlowski
@ 2023-03-14 12:16 ` Dmitry Baryshkov
  2023-03-16  6:52   ` Krzysztof Kozlowski
  13 siblings, 1 reply; 27+ messages in thread
From: Dmitry Baryshkov @ 2023-03-14 12:16 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Jassi Brar, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel, devicetree

On 14/03/2023 10:09, Krzysztof Kozlowski wrote:
> Hi,
> 
> Changes since v1
> ================
> 1. Rebase
> 2. Make msm8994 fallback for several variants, not msm8953, because the latter
>     actually might take some clocks.

Although the approach looks correct, I think that in some cases it tries 
to mark devices compatible judging from the current driver, not from the 
hardware itself.

For the reference, on msm8994 the apcs is a clock controller for the l2 
clocks (which we do not support yet). If I'm not mistaken, on msm8976 
the apcs region contains a mux for the cluster1 clocks. On sdm630/660 
the apcs region also seems to be involved in CPU clocks scaling.

On the other hand, the sc7180/sm8150 part seems logical.

> 3. Two new patches for SDX55.
> 4. Minor corrections in bindings style.
> v1: https://lore.kernel.org/all/20230202161856.385825-1-krzysztof.kozlowski@linaro.org/
> 
> Description
> ===========
> 
> If entire approach is accepted (and correct), there are no dependencies and
> patches can be picked independently.  Although the best in the same cycle, so
> there will be no new `dtbs_check` warnings.
> 
> Best regards,
> Krzysztof
> 
> Krzysztof Kozlowski (13):
>    dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks
>    dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match
>    dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks
>    mailbox: qcom-apcs-ipc: do not grow the of_device_id
>    arm64: dts: qcom: ipq8074: add compatible fallback to mailbox
>    arm64: dts: qcom: msm8976: add compatible fallback to mailbox
>    arm64: dts: qcom: msm8998: add compatible fallback to mailbox
>    arm64: dts: qcom: sdm630: add compatible fallback to mailbox
>    arm64: dts: qcom: sm6115: add compatible fallback to mailbox
>    arm64: dts: qcom: sm6125: add compatible fallback to mailbox
>    arm64: dts: qcom: qcs404: add compatible fallback to mailbox
>    arm64: dts: qcom: sc7180: add compatible fallback to mailbox
>    arm64: dts: qcom: sm8150: add compatible fallback to mailbox
> 
>   .../mailbox/qcom,apcs-kpss-global.yaml        | 67 ++++++++++---------
>   arch/arm64/boot/dts/qcom/ipq8074.dtsi         |  3 +-
>   arch/arm64/boot/dts/qcom/msm8976.dtsi         |  3 +-
>   arch/arm64/boot/dts/qcom/msm8998.dtsi         |  3 +-
>   arch/arm64/boot/dts/qcom/qcs404.dtsi          |  3 +-
>   arch/arm64/boot/dts/qcom/sc7180.dtsi          |  3 +-
>   arch/arm64/boot/dts/qcom/sdm630.dtsi          |  3 +-
>   arch/arm64/boot/dts/qcom/sm6115.dtsi          |  3 +-
>   arch/arm64/boot/dts/qcom/sm6125.dtsi          |  3 +-
>   arch/arm64/boot/dts/qcom/sm8150.dtsi          |  3 +-
>   drivers/mailbox/qcom-apcs-ipc-mailbox.c       | 11 +--
>   11 files changed, 60 insertions(+), 45 deletions(-)
> 

-- 
With best wishes
Dmitry


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

* Re: [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback
  2023-03-14 12:16 ` [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Dmitry Baryshkov
@ 2023-03-16  6:52   ` Krzysztof Kozlowski
  2023-03-22 17:37     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-16  6:52 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Jassi Brar, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel, devicetree

On 14/03/2023 13:16, Dmitry Baryshkov wrote:
> On 14/03/2023 10:09, Krzysztof Kozlowski wrote:
>> Hi,
>>
>> Changes since v1
>> ================
>> 1. Rebase
>> 2. Make msm8994 fallback for several variants, not msm8953, because the latter
>>     actually might take some clocks.
> 
> Although the approach looks correct, I think that in some cases it tries 
> to mark devices compatible judging from the current driver, not from the 
> hardware itself.

Which is what compatibility is about...

> 
> For the reference, on msm8994 the apcs is a clock controller for the l2 
> clocks (which we do not support yet). If I'm not mistaken, on msm8976 
> the apcs region contains a mux for the cluster1 clocks. On sdm630/660 
> the apcs region also seems to be involved in CPU clocks scaling.

The question is this means they are incompatible?

> 
> On the other hand, the sc7180/sm8150 part seems logical.
> 


Best regards,
Krzysztof


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

* Re: [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks
  2023-03-14  8:09 ` [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks Krzysztof Kozlowski
@ 2023-03-17 21:07   ` Rob Herring
  2023-03-17 21:07   ` Rob Herring
  2023-03-20 10:39   ` Manivannan Sadhasivam
  2 siblings, 0 replies; 27+ messages in thread
From: Rob Herring @ 2023-03-17 21:07 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Krzysztof Kozlowski, Manivannan Sadhasivam, linux-arm-msm,
	linux-kernel, devicetree

On Tue, Mar 14, 2023 at 09:09:05AM +0100, Krzysztof Kozlowski wrote:
> SDX55 and SDX65 DTS takes clocks in a bit different order.  Adjust
> bindings to the DTS.
> 

Fixes: ?

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml    | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> index d888ead09282..2992227631c4 100644
> --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> @@ -97,14 +97,14 @@ allOf:
>        properties:
>          clocks:
>            items:
> +            - description: reference clock
>              - description: primary pll parent of the clock driver
>              - description: auxiliary parent
> -            - description: reference clock
>          clock-names:
>            items:
> +            - const: ref
>              - const: pll
>              - const: aux
> -            - const: ref
>    - if:
>        properties:
>          compatible:
> -- 
> 2.34.1
> 

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

* Re: [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks
  2023-03-14  8:09 ` [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks Krzysztof Kozlowski
  2023-03-17 21:07   ` Rob Herring
@ 2023-03-17 21:07   ` Rob Herring
  2023-03-20 10:39   ` Manivannan Sadhasivam
  2 siblings, 0 replies; 27+ messages in thread
From: Rob Herring @ 2023-03-17 21:07 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Konrad Dybcio,
	Manivannan Sadhasivam, devicetree, Bjorn Andersson, linux-arm-msm,
	Andy Gross, linux-kernel, Jassi Brar


On Tue, 14 Mar 2023 09:09:05 +0100, Krzysztof Kozlowski wrote:
> SDX55 and SDX65 DTS takes clocks in a bit different order.  Adjust
> bindings to the DTS.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml    | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH v2 02/13] dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match
  2023-03-14  8:09 ` [PATCH v2 02/13] dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match Krzysztof Kozlowski
@ 2023-03-17 21:07   ` Rob Herring
  2023-03-20 10:40   ` Manivannan Sadhasivam
  1 sibling, 0 replies; 27+ messages in thread
From: Rob Herring @ 2023-03-17 21:07 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, linux-kernel, Konrad Dybcio, linux-arm-msm,
	Manivannan Sadhasivam, Andy Gross, devicetree, Jassi Brar,
	Bjorn Andersson, Krzysztof Kozlowski


On Tue, 14 Mar 2023 09:09:06 +0100, Krzysztof Kozlowski wrote:
> The qcom,sdx55-apcs-gcc is followed by another compatible (syscon), thus
> the 'if' clause must match by contains.
> 
> Fixes: 0d17014e9189 ("dt-bindings: mailbox: Add binding for SDX55 APCS")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml   | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH v2 03/13] dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks
  2023-03-14  8:09 ` [PATCH v2 03/13] dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks Krzysztof Kozlowski
@ 2023-03-17 21:08   ` Rob Herring
  0 siblings, 0 replies; 27+ messages in thread
From: Rob Herring @ 2023-03-17 21:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Konrad Dybcio, devicetree, Manivannan Sadhasivam, Bjorn Andersson,
	linux-arm-msm, Rob Herring, linux-kernel, Jassi Brar, Andy Gross,
	Krzysztof Kozlowski


On Tue, 14 Mar 2023 09:09:07 +0100, Krzysztof Kozlowski wrote:
> Rework the compatibles and group devices which have similar interface
> (same from Linux driver point of view) as compatible.  This allows
> smaller of_device_id table in the Linux driver and smaller
> allOf:if:then: constraints.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../mailbox/qcom,apcs-kpss-global.yaml        | 58 ++++++++++---------
>  1 file changed, 31 insertions(+), 27 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks
  2023-03-14  8:09 ` [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks Krzysztof Kozlowski
  2023-03-17 21:07   ` Rob Herring
  2023-03-17 21:07   ` Rob Herring
@ 2023-03-20 10:39   ` Manivannan Sadhasivam
  2 siblings, 0 replies; 27+ messages in thread
From: Manivannan Sadhasivam @ 2023-03-20 10:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	devicetree

On Tue, Mar 14, 2023 at 09:09:05AM +0100, Krzysztof Kozlowski wrote:
> SDX55 and SDX65 DTS takes clocks in a bit different order.  Adjust
> bindings to the DTS.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Manivannan Sadhasivam <mani@kernel.org>

Thanks,
Mani

> ---
>  .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml    | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> index d888ead09282..2992227631c4 100644
> --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> @@ -97,14 +97,14 @@ allOf:
>        properties:
>          clocks:
>            items:
> +            - description: reference clock
>              - description: primary pll parent of the clock driver
>              - description: auxiliary parent
> -            - description: reference clock
>          clock-names:
>            items:
> +            - const: ref
>              - const: pll
>              - const: aux
> -            - const: ref
>    - if:
>        properties:
>          compatible:
> -- 
> 2.34.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH v2 02/13] dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match
  2023-03-14  8:09 ` [PATCH v2 02/13] dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match Krzysztof Kozlowski
  2023-03-17 21:07   ` Rob Herring
@ 2023-03-20 10:40   ` Manivannan Sadhasivam
  1 sibling, 0 replies; 27+ messages in thread
From: Manivannan Sadhasivam @ 2023-03-20 10:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, linux-arm-msm, linux-kernel,
	devicetree

On Tue, Mar 14, 2023 at 09:09:06AM +0100, Krzysztof Kozlowski wrote:
> The qcom,sdx55-apcs-gcc is followed by another compatible (syscon), thus
> the 'if' clause must match by contains.
> 
> Fixes: 0d17014e9189 ("dt-bindings: mailbox: Add binding for SDX55 APCS")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Manivannan Sadhasivam <mani@kernel.org>

Thanks,
Mani

> ---
>  .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml   | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> index 2992227631c4..4d2f408a5efb 100644
> --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> @@ -91,8 +91,9 @@ allOf:
>    - if:
>        properties:
>          compatible:
> -          enum:
> -            - qcom,sdx55-apcs-gcc
> +          contains:
> +            enum:
> +              - qcom,sdx55-apcs-gcc
>      then:
>        properties:
>          clocks:
> -- 
> 2.34.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback
  2023-03-16  6:52   ` Krzysztof Kozlowski
@ 2023-03-22 17:37     ` Krzysztof Kozlowski
  2023-03-22 22:28       ` Dmitry Baryshkov
  0 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-22 17:37 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Jassi Brar, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, linux-kernel, devicetree

On 16/03/2023 07:52, Krzysztof Kozlowski wrote:
> On 14/03/2023 13:16, Dmitry Baryshkov wrote:
>> On 14/03/2023 10:09, Krzysztof Kozlowski wrote:
>>> Hi,
>>>
>>> Changes since v1
>>> ================
>>> 1. Rebase
>>> 2. Make msm8994 fallback for several variants, not msm8953, because the latter
>>>     actually might take some clocks.
>>
>> Although the approach looks correct, I think that in some cases it tries 
>> to mark devices compatible judging from the current driver, not from the 
>> hardware itself.
> 
> Which is what compatibility is about...
> 
>>
>> For the reference, on msm8994 the apcs is a clock controller for the l2 
>> clocks (which we do not support yet). If I'm not mistaken, on msm8976 
>> the apcs region contains a mux for the cluster1 clocks. On sdm630/660 
>> the apcs region also seems to be involved in CPU clocks scaling.
> 
> The question is this means they are incompatible?

Since there are no more comments I assume they are actually compatible
in the terms of SW interface.

Best regards,
Krzysztof


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

* Re: [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback
  2023-03-22 17:37     ` Krzysztof Kozlowski
@ 2023-03-22 22:28       ` Dmitry Baryshkov
  2023-03-23  6:33         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Baryshkov @ 2023-03-22 22:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree

On Wed, 22 Mar 2023 at 19:37, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 16/03/2023 07:52, Krzysztof Kozlowski wrote:
> > On 14/03/2023 13:16, Dmitry Baryshkov wrote:
> >> On 14/03/2023 10:09, Krzysztof Kozlowski wrote:
> >>> Hi,
> >>>
> >>> Changes since v1
> >>> ================
> >>> 1. Rebase
> >>> 2. Make msm8994 fallback for several variants, not msm8953, because the latter
> >>>     actually might take some clocks.
> >>
> >> Although the approach looks correct, I think that in some cases it tries
> >> to mark devices compatible judging from the current driver, not from the
> >> hardware itself.
> >
> > Which is what compatibility is about...

Well, I was trying to say that once we update the driver, the devices
will not be compatible. But probably our definitions of being
compatible differ.

> >
> >>
> >> For the reference, on msm8994 the apcs is a clock controller for the l2
> >> clocks (which we do not support yet). If I'm not mistaken, on msm8976
> >> the apcs region contains a mux for the cluster1 clocks. On sdm630/660
> >> the apcs region also seems to be involved in CPU clocks scaling.
> >
> > The question is this means they are incompatible?
>
> Since there are no more comments I assume they are actually compatible
> in the terms of SW interface.

-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback
  2023-03-22 22:28       ` Dmitry Baryshkov
@ 2023-03-23  6:33         ` Krzysztof Kozlowski
  2023-03-23  9:44           ` Dmitry Baryshkov
  0 siblings, 1 reply; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-23  6:33 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree

On 22/03/2023 23:28, Dmitry Baryshkov wrote:
> On Wed, 22 Mar 2023 at 19:37, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 16/03/2023 07:52, Krzysztof Kozlowski wrote:
>>> On 14/03/2023 13:16, Dmitry Baryshkov wrote:
>>>> On 14/03/2023 10:09, Krzysztof Kozlowski wrote:
>>>>> Hi,
>>>>>
>>>>> Changes since v1
>>>>> ================
>>>>> 1. Rebase
>>>>> 2. Make msm8994 fallback for several variants, not msm8953, because the latter
>>>>>     actually might take some clocks.
>>>>
>>>> Although the approach looks correct, I think that in some cases it tries
>>>> to mark devices compatible judging from the current driver, not from the
>>>> hardware itself.
>>>
>>> Which is what compatibility is about...
> 
> Well, I was trying to say that once we update the driver, the devices
> will not be compatible. But probably our definitions of being
> compatible differ.

What do you want to update in the driver? What's going to happen with
it? What is missing?

Best regards,
Krzysztof


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

* Re: [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback
  2023-03-23  6:33         ` Krzysztof Kozlowski
@ 2023-03-23  9:44           ` Dmitry Baryshkov
  2023-03-27 13:43             ` Krzysztof Kozlowski
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry Baryshkov @ 2023-03-23  9:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree

On Thu, 23 Mar 2023 at 08:33, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 22/03/2023 23:28, Dmitry Baryshkov wrote:
> > On Wed, 22 Mar 2023 at 19:37, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> On 16/03/2023 07:52, Krzysztof Kozlowski wrote:
> >>> On 14/03/2023 13:16, Dmitry Baryshkov wrote:
> >>>> On 14/03/2023 10:09, Krzysztof Kozlowski wrote:
> >>>>> Hi,
> >>>>>
> >>>>> Changes since v1
> >>>>> ================
> >>>>> 1. Rebase
> >>>>> 2. Make msm8994 fallback for several variants, not msm8953, because the latter
> >>>>>     actually might take some clocks.
> >>>>
> >>>> Although the approach looks correct, I think that in some cases it tries
> >>>> to mark devices compatible judging from the current driver, not from the
> >>>> hardware itself.
> >>>
> >>> Which is what compatibility is about...
> >
> > Well, I was trying to say that once we update the driver, the devices
> > will not be compatible. But probably our definitions of being
> > compatible differ.
>
> What do you want to update in the driver? What's going to happen with
> it? What is missing?

Some of these platforms do not have CPUfreq support, which will most
likely require programming of cluster and L2/L3 clocks being part of
this region.

For the reference, I think that sc7180/sm8150/other new platforms are
proper examples of 'compatible' devices, so the patchset itself has a
correct/good idea beneath. It's just that additional research might be
required for the older platforms.


--
With best wishes
Dmitry

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

* Re: [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback
  2023-03-23  9:44           ` Dmitry Baryshkov
@ 2023-03-27 13:43             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 27+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-27 13:43 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Jassi Brar,
	Rob Herring, Krzysztof Kozlowski, Manivannan Sadhasivam,
	linux-arm-msm, linux-kernel, devicetree

On 23/03/2023 10:44, Dmitry Baryshkov wrote:
> On Thu, 23 Mar 2023 at 08:33, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 22/03/2023 23:28, Dmitry Baryshkov wrote:
>>> On Wed, 22 Mar 2023 at 19:37, Krzysztof Kozlowski
>>> <krzysztof.kozlowski@linaro.org> wrote:
>>>>
>>>> On 16/03/2023 07:52, Krzysztof Kozlowski wrote:
>>>>> On 14/03/2023 13:16, Dmitry Baryshkov wrote:
>>>>>> On 14/03/2023 10:09, Krzysztof Kozlowski wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Changes since v1
>>>>>>> ================
>>>>>>> 1. Rebase
>>>>>>> 2. Make msm8994 fallback for several variants, not msm8953, because the latter
>>>>>>>     actually might take some clocks.
>>>>>>
>>>>>> Although the approach looks correct, I think that in some cases it tries
>>>>>> to mark devices compatible judging from the current driver, not from the
>>>>>> hardware itself.
>>>>>
>>>>> Which is what compatibility is about...
>>>
>>> Well, I was trying to say that once we update the driver, the devices
>>> will not be compatible. But probably our definitions of being
>>> compatible differ.
>>
>> What do you want to update in the driver? What's going to happen with
>> it? What is missing?
> 
> Some of these platforms do not have CPUfreq support, which will most
> likely require programming of cluster and L2/L3 clocks being part of
> this region.
> 
> For the reference, I think that sc7180/sm8150/other new platforms are
> proper examples of 'compatible' devices, so the patchset itself has a
> correct/good idea beneath. It's just that additional research might be
> required for the older platforms.

I'll split the series so the sc7180/so on bits can go in and we'll
figure out compatibility for the rest later...

Best regards,
Krzysztof


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

end of thread, other threads:[~2023-03-27 13:43 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14  8:09 [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 01/13] dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks Krzysztof Kozlowski
2023-03-17 21:07   ` Rob Herring
2023-03-17 21:07   ` Rob Herring
2023-03-20 10:39   ` Manivannan Sadhasivam
2023-03-14  8:09 ` [PATCH v2 02/13] dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match Krzysztof Kozlowski
2023-03-17 21:07   ` Rob Herring
2023-03-20 10:40   ` Manivannan Sadhasivam
2023-03-14  8:09 ` [PATCH v2 03/13] dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks Krzysztof Kozlowski
2023-03-17 21:08   ` Rob Herring
2023-03-14  8:09 ` [PATCH v2 04/13] mailbox: qcom-apcs-ipc: do not grow the of_device_id Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 05/13] arm64: dts: qcom: ipq8074: add compatible fallback to mailbox Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 06/13] arm64: dts: qcom: msm8976: " Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 07/13] arm64: dts: qcom: msm8998: " Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 08/13] arm64: dts: qcom: sdm630: " Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 09/13] arm64: dts: qcom: sm6115: " Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 10/13] arm64: dts: qcom: sm6125: " Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 11/13] arm64: dts: qcom: qcs404: " Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 12/13] arm64: dts: qcom: sc7180: " Krzysztof Kozlowski
2023-03-14  8:09 ` [PATCH v2 13/13] arm64: dts: qcom: sm8150: " Krzysztof Kozlowski
2023-03-14 12:16 ` [PATCH v2 00/13] mailbox/arm64/ qcom: rework compatibles for fallback Dmitry Baryshkov
2023-03-16  6:52   ` Krzysztof Kozlowski
2023-03-22 17:37     ` Krzysztof Kozlowski
2023-03-22 22:28       ` Dmitry Baryshkov
2023-03-23  6:33         ` Krzysztof Kozlowski
2023-03-23  9:44           ` Dmitry Baryshkov
2023-03-27 13:43             ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).