2022-08-17 13:15:31

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RFT PATCH v2 00/14] arm64: dts: qcom: improvements to TCSR mutex in DTS

Hi,

Changes since v1
================
1. Correct order of compatibles in the binding.

Description
===========
Set of improvements for TCSR mutex to match the bindings after conversion to DT schema.

Tested briefly on SDM845. Please kindly test on other platformss (therefore RFT).

Best regards,
Krzysztof

Krzysztof Kozlowski (14):
dt-bindings: mfd: qcom,tcsr: add SC7x80, SDM845 and MSM8996/8
arm64: dts: qcom: msm8996: split TCSR halt regs out of mutex
arm64: dts: qcom: msm8996: switch TCSR mutex to MMIO
arm64: dts: qcom: msm8998: split TCSR halt regs out of mutex
arm64: dts: qcom: msm8998: switch TCSR mutex to MMIO
arm64: dts: qcom: sc7180: add missing TCSR syscon compatible
arm64: dts: qcom: sc7180: split TCSR halt regs out of mutex
arm64: dts: qcom: sc7180: switch TCSR mutex to MMIO
arm64: dts: qcom: sc7280: split TCSR halt regs out of mutex
arm64: dts: qcom: sdm845: split TCSR halt regs out of mutex
arm64: dts: qcom: sdm845: switch TCSR mutex to MMIO
arm64: dts: qcom: qcs404: switch TCSR mutex to MMIO
arm64: dts: qcom: sdm630: switch TCSR mutex to MMIO
arm64: dts: qcom: sm8150: switch TCSR mutex to MMIO

.../devicetree/bindings/mfd/qcom,tcsr.yaml | 5 ++++
arch/arm64/boot/dts/qcom/msm8996.dtsi | 24 ++++++++---------
arch/arm64/boot/dts/qcom/msm8998.dtsi | 20 +++++++-------
arch/arm64/boot/dts/qcom/qcs404.dtsi | 11 +++-----
arch/arm64/boot/dts/qcom/sc7180.dtsi | 26 +++++++++----------
arch/arm64/boot/dts/qcom/sc7280.dtsi | 19 +++++++++-----
arch/arm64/boot/dts/qcom/sdm630.dtsi | 13 +++-------
arch/arm64/boot/dts/qcom/sdm845.dtsi | 20 +++++++-------
arch/arm64/boot/dts/qcom/sm8150.dtsi | 13 +++-------
9 files changed, 73 insertions(+), 78 deletions(-)

--
2.34.1


2022-08-17 13:17:05

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RFT PATCH v2 06/14] arm64: dts: qcom: sc7180: add missing TCSR syscon compatible

TCSR syscon node should come with dedicated compatible.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index b82c335c25af..49f28cb531f6 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -1468,7 +1468,7 @@ tcsr_mutex_regs: syscon@1f40000 {
};

tcsr_regs: syscon@1fc0000 {
- compatible = "syscon";
+ compatible = "qcom,sc7180-tcsr", "syscon";
reg = <0 0x01fc0000 0 0x40000>;
};

--
2.34.1

2022-08-17 13:34:51

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RFT PATCH v2 01/14] dt-bindings: mfd: qcom,tcsr: add SC7x80, SDM845 and MSM8996/8

Document existing (MSM8996, SC7280) and new compatibles for TCSR syscon
registers.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Changes since v1:
1. Correct order of compatibles.
---
Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
index 2f816fd0c9ec..e1c4936a0352 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
@@ -18,6 +18,10 @@ properties:
oneOf:
- items:
- enum:
+ - qcom,msm8998-tcsr
+ - qcom,sc7180-tcsr
+ - qcom,sc7280-tcsr
+ - qcom,sdm845-tcsr
- qcom,tcsr-apq8064
- qcom,tcsr-apq8084
- qcom,tcsr-ipq8064
@@ -27,6 +31,7 @@ properties:
- qcom,tcsr-msm8953
- qcom,tcsr-msm8960
- qcom,tcsr-msm8974
+ - qcom,tcsr-msm8996
- const: syscon
- items:
- const: qcom,tcsr-ipq6018
--
2.34.1

2022-08-17 13:34:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RFT PATCH v2 08/14] arm64: dts: qcom: sc7180: switch TCSR mutex to MMIO

The TCSR mutex bindings allow device to be described only with address
space (so it uses MMIO, not syscon regmap). This seems reasonable as
TCSR mutex is actually a dedicated IO address space and it also fixes DT
schema checks:

qcom/sc7180-trogdor-wormdingler-rev1-inx.dtb: hwlock: 'reg' is a required property
qcom/sc7180-trogdor-wormdingler-rev1-inx.dtb: hwlock: 'syscon' does not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/sc7180.dtsi | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 5d2dd21da79c..e8debb0da411 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -555,12 +555,6 @@ scm {
};
};

- tcsr_mutex: hwlock {
- compatible = "qcom,tcsr-mutex";
- syscon = <&tcsr_mutex_regs 0 0x1000>;
- #hwlock-cells = <1>;
- };
-
smem {
compatible = "qcom,smem";
memory-region = <&smem_mem>;
@@ -1462,9 +1456,10 @@ ipa: ipa@1e40000 {
status = "disabled";
};

- tcsr_mutex_regs: syscon@1f40000 {
- compatible = "syscon";
+ tcsr_mutex: hwlock@1f40000 {
+ compatible = "qcom,tcsr-mutex";
reg = <0 0x01f40000 0 0x20000>;
+ #hwlock-cells = <1>;
};

tcsr_regs_1: sycon@1f60000 {
--
2.34.1

2022-08-17 13:36:40

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [RFT PATCH v2 09/14] arm64: dts: qcom: sc7280: split TCSR halt regs out of mutex

The TCSR halt regs are next to TCSR mutex, so before converting the TCSR
mutex into device with address space, we need to split the halt regs to
its own syscon device. This also describes more accurately the devices
and their IO address space, and allows to remove incorrect syscon
compatible from TCSR mutex:

qcom/sc7280-herobrine-crd.dtb: hwlock@1f40000: compatible: ['qcom,tcsr-mutex', 'syscon'] is too long

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
arch/arm64/boot/dts/qcom/sc7280.dtsi | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 13d7f267b289..89a8e6b9822a 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -2155,12 +2155,17 @@ ipa: ipa@1e40000 {
};

tcsr_mutex: hwlock@1f40000 {
- compatible = "qcom,tcsr-mutex", "syscon";
- reg = <0 0x01f40000 0 0x40000>;
+ compatible = "qcom,tcsr-mutex";
+ reg = <0 0x01f40000 0 0x20000>;
#hwlock-cells = <1>;
};

- tcsr: syscon@1fc0000 {
+ tcsr_1: sycon@1f60000 {
+ compatible = "qcom,sc7280-tcsr", "syscon";
+ reg = <0 0x01f60000 0 0x20000>;
+ };
+
+ tcsr_2: syscon@1fc0000 {
compatible = "qcom,sc7280-tcsr", "syscon";
reg = <0 0x01fc0000 0 0x30000>;
};
@@ -2522,9 +2527,9 @@ remoteproc_mpss: remoteproc@4080000 {
<&pdc_reset PDC_MODEM_SYNC_RESET>;
reset-names = "mss_restart", "pdc_reset";

- qcom,halt-regs = <&tcsr_mutex 0x23000 0x25000 0x28000 0x33000>;
- qcom,ext-regs = <&tcsr 0x10000 0x10004 &tcsr_mutex 0x26004 0x26008>;
- qcom,qaccept-regs = <&tcsr_mutex 0x23030 0x23040 0x23020>;
+ qcom,halt-regs = <&tcsr_1 0x3000 0x5000 0x8000 0x13000>;
+ qcom,ext-regs = <&tcsr_2 0x10000 0x10004 &tcsr_1 0x6004 0x6008>;
+ qcom,qaccept-regs = <&tcsr_1 0x3030 0x3040 0x3020>;

status = "disabled";

@@ -3259,7 +3264,7 @@ remoteproc_wpss: remoteproc@8a00000 {
<&pdc_reset PDC_WPSS_SYNC_RESET>;
reset-names = "restart", "pdc_sync";

- qcom,halt-regs = <&tcsr_mutex 0x37000>;
+ qcom,halt-regs = <&tcsr_1 0x17000>;

status = "disabled";

--
2.34.1

2022-08-17 21:06:06

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [RFT PATCH v2 09/14] arm64: dts: qcom: sc7280: split TCSR halt regs out of mutex



On 17.08.2022 15:03, Krzysztof Kozlowski wrote:
> The TCSR halt regs are next to TCSR mutex, so before converting the TCSR
> mutex into device with address space, we need to split the halt regs to
> its own syscon device. This also describes more accurately the devices
> and their IO address space, and allows to remove incorrect syscon
> compatible from TCSR mutex:
>
> qcom/sc7280-herobrine-crd.dtb: hwlock@1f40000: compatible: ['qcom,tcsr-mutex', 'syscon'] is too long
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
Not tested on a device, but looks good to the eye:
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc7280.dtsi | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> index 13d7f267b289..89a8e6b9822a 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> @@ -2155,12 +2155,17 @@ ipa: ipa@1e40000 {
> };
>
> tcsr_mutex: hwlock@1f40000 {
> - compatible = "qcom,tcsr-mutex", "syscon";
> - reg = <0 0x01f40000 0 0x40000>;
> + compatible = "qcom,tcsr-mutex";
> + reg = <0 0x01f40000 0 0x20000>;
> #hwlock-cells = <1>;
> };
>
> - tcsr: syscon@1fc0000 {
> + tcsr_1: sycon@1f60000 {
> + compatible = "qcom,sc7280-tcsr", "syscon";
> + reg = <0 0x01f60000 0 0x20000>;
> + };
> +
> + tcsr_2: syscon@1fc0000 {
> compatible = "qcom,sc7280-tcsr", "syscon";
> reg = <0 0x01fc0000 0 0x30000>;
> };
> @@ -2522,9 +2527,9 @@ remoteproc_mpss: remoteproc@4080000 {
> <&pdc_reset PDC_MODEM_SYNC_RESET>;
> reset-names = "mss_restart", "pdc_reset";
>
> - qcom,halt-regs = <&tcsr_mutex 0x23000 0x25000 0x28000 0x33000>;
> - qcom,ext-regs = <&tcsr 0x10000 0x10004 &tcsr_mutex 0x26004 0x26008>;
> - qcom,qaccept-regs = <&tcsr_mutex 0x23030 0x23040 0x23020>;
> + qcom,halt-regs = <&tcsr_1 0x3000 0x5000 0x8000 0x13000>;
> + qcom,ext-regs = <&tcsr_2 0x10000 0x10004 &tcsr_1 0x6004 0x6008>;
> + qcom,qaccept-regs = <&tcsr_1 0x3030 0x3040 0x3020>;
>
> status = "disabled";
>
> @@ -3259,7 +3264,7 @@ remoteproc_wpss: remoteproc@8a00000 {
> <&pdc_reset PDC_WPSS_SYNC_RESET>;
> reset-names = "restart", "pdc_sync";
>
> - qcom,halt-regs = <&tcsr_mutex 0x37000>;
> + qcom,halt-regs = <&tcsr_1 0x17000>;
>
> status = "disabled";
>

2022-08-17 21:27:13

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [RFT PATCH v2 06/14] arm64: dts: qcom: sc7180: add missing TCSR syscon compatible



On 17.08.2022 15:03, Krzysztof Kozlowski wrote:
> TCSR syscon node should come with dedicated compatible.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index b82c335c25af..49f28cb531f6 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -1468,7 +1468,7 @@ tcsr_mutex_regs: syscon@1f40000 {
> };
>
> tcsr_regs: syscon@1fc0000 {
> - compatible = "syscon";
> + compatible = "qcom,sc7180-tcsr", "syscon";
> reg = <0 0x01fc0000 0 0x40000>;
> };
>

2022-08-17 21:30:18

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [RFT PATCH v2 08/14] arm64: dts: qcom: sc7180: switch TCSR mutex to MMIO



On 17.08.2022 15:03, Krzysztof Kozlowski wrote:
> The TCSR mutex bindings allow device to be described only with address
> space (so it uses MMIO, not syscon regmap). This seems reasonable as
> TCSR mutex is actually a dedicated IO address space and it also fixes DT
> schema checks:
>
> qcom/sc7180-trogdor-wormdingler-rev1-inx.dtb: hwlock: 'reg' is a required property
> qcom/sc7180-trogdor-wormdingler-rev1-inx.dtb: hwlock: 'syscon' does not match any of the regexes: 'pinctrl-[0-9]+'
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
Not tested on a device, but looks good to the eye:
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index 5d2dd21da79c..e8debb0da411 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -555,12 +555,6 @@ scm {
> };
> };
>
> - tcsr_mutex: hwlock {
> - compatible = "qcom,tcsr-mutex";
> - syscon = <&tcsr_mutex_regs 0 0x1000>;
> - #hwlock-cells = <1>;
> - };
> -
> smem {
> compatible = "qcom,smem";
> memory-region = <&smem_mem>;
> @@ -1462,9 +1456,10 @@ ipa: ipa@1e40000 {
> status = "disabled";
> };
>
> - tcsr_mutex_regs: syscon@1f40000 {
> - compatible = "syscon";
> + tcsr_mutex: hwlock@1f40000 {
> + compatible = "qcom,tcsr-mutex";
> reg = <0 0x01f40000 0 0x20000>;
> + #hwlock-cells = <1>;
> };
>
> tcsr_regs_1: sycon@1f60000 {

2022-09-08 08:27:26

by Lee Jones

[permalink] [raw]
Subject: Re: [RFT PATCH v2 01/14] dt-bindings: mfd: qcom,tcsr: add SC7x80, SDM845 and MSM8996/8

On Wed, 17 Aug 2022, Krzysztof Kozlowski wrote:

> Document existing (MSM8996, SC7280) and new compatibles for TCSR syscon
> registers.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> Changes since v1:
> 1. Correct order of compatibles.
> ---
> Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 5 +++++
> 1 file changed, 5 insertions(+)

Doesn't apply.

--
Lee Jones [李琼斯]