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/[email protected]/
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
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 <[email protected]>
---
.../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
SDX55 and SDX65 DTS takes clocks in a bit different order. Adjust
bindings to the DTS.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../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
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 <[email protected]>
---
.../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
IPQ8074 mailbox is compatible with IPQ6018.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
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 <[email protected]>
---
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
MSM8976 mailbox is compatible with MSM8994.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
MSM8998 mailbox is compatible with MSM8994.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
SDM630 mailbox is compatible with MSM8994.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
SM6115 mailbox is compatible with MSM8994.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
SM6125 mailbox is compatible with MSM8994.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
QCS404 mailbox is compatible with MSM8916.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
SC7180 mailbox is compatible with SDM845.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
SC8150 mailbox is compatible with SDM845.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
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
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/[email protected]/
>
> 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
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
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 <[email protected]>
> ---
> .../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
>
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 <[email protected]>
> ---
> .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Acked-by: Rob Herring <[email protected]>
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 <[email protected]>
> ---
> .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
Acked-by: Rob Herring <[email protected]>
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 <[email protected]>
> ---
> .../mailbox/qcom,apcs-kpss-global.yaml | 58 ++++++++++---------
> 1 file changed, 31 insertions(+), 27 deletions(-)
>
Acked-by: Rob Herring <[email protected]>
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 <[email protected]>
Acked-by: Manivannan Sadhasivam <[email protected]>
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
>
--
மணிவண்ணன் சதாசிவம்
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 <[email protected]>
Acked-by: Manivannan Sadhasivam <[email protected]>
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
>
--
மணிவண்ணன் சதாசிவம்
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
On Wed, 22 Mar 2023 at 19:37, Krzysztof Kozlowski
<[email protected]> 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
On 22/03/2023 23:28, Dmitry Baryshkov wrote:
> On Wed, 22 Mar 2023 at 19:37, Krzysztof Kozlowski
> <[email protected]> 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
On Thu, 23 Mar 2023 at 08:33, Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 22/03/2023 23:28, Dmitry Baryshkov wrote:
> > On Wed, 22 Mar 2023 at 19:37, Krzysztof Kozlowski
> > <[email protected]> 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
On 23/03/2023 10:44, Dmitry Baryshkov wrote:
> On Thu, 23 Mar 2023 at 08:33, Krzysztof Kozlowski
> <[email protected]> wrote:
>>
>> On 22/03/2023 23:28, Dmitry Baryshkov wrote:
>>> On Wed, 22 Mar 2023 at 19:37, Krzysztof Kozlowski
>>> <[email protected]> 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