diff mbox series

[RFT,v2,02/14] arm64: dts: qcom: msm8996: split TCSR halt regs out of mutex

Message ID 20220817130342.568396-3-krzysztof.kozlowski@linaro.org
State Superseded
Headers show
Series arm64: dts: qcom: improvements to TCSR mutex in DTS | expand

Commit Message

Krzysztof Kozlowski Aug. 17, 2022, 1:03 p.m. UTC
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.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Comments

Krzysztof Kozlowski Aug. 18, 2022, 7:02 a.m. UTC | #1
On 17/08/2022 23:57, Konrad Dybcio wrote:
> 
> 
> 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.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
> Not tested on a device, but looks good to the eye:
> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> 
> On a note, are they really named TCSR_1 and TCSR_2 in the docs?
> Qualcomm is usually more exquisite in their naming :P

This is not entirely separate address space, therefore it does not have
a separate name. The address space name is still TCSR_MUTEX which
consists of actual MUTEX regs, halt regs and bunch of others. The second
one 0x7a0000 (where label I renamed to tcsr_2) is called TCSR_REGS.

This applies to other patches as well, so maybe you prefer to have
labels matching the spec? The first would be tcsr_mutex_regs, although
it is not entirely correct, because it does not include now the TCSR
mutex regs...



Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 742eac4ce9b3..3411ced96db6 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -359,7 +359,7 @@  opp-2150400000 {
 	firmware {
 		scm {
 			compatible = "qcom,scm-msm8996", "qcom,scm";
-			qcom,dload-mode = <&tcsr 0x13000>;
+			qcom,dload-mode = <&tcsr_2 0x13000>;
 		};
 	};
 
@@ -840,10 +840,15 @@  pnoc: interconnect@5c0000 {
 
 		tcsr_mutex_regs: syscon@740000 {
 			compatible = "syscon";
-			reg = <0x00740000 0x40000>;
+			reg = <0x00740000 0x20000>;
 		};
 
-		tcsr: syscon@7a0000 {
+		tcsr_1: sycon@760000 {
+			compatible = "qcom,tcsr-msm8996", "syscon";
+			reg = <0x00760000 0x20000>;
+		};
+
+		tcsr_2: syscon@7a0000 {
 			compatible = "qcom,tcsr-msm8996", "syscon";
 			reg = <0x007a0000 0x18000>;
 		};
@@ -2413,7 +2418,7 @@  mss_pil: remoteproc@2080000 {
 			qcom,smem-states = <&mpss_smp2p_out 0>;
 			qcom,smem-state-names = "stop";
 
-			qcom,halt-regs = <&tcsr_mutex_regs 0x23000 0x25000 0x24000>;
+			qcom,halt-regs = <&tcsr_1 0x3000 0x5000 0x4000>;
 
 			status = "disabled";