[PATCH] arm64: dts: qcom: sm8450: Add TCSR halt register space

Mukesh Ojha posted 1 patch 3 years, 2 months ago
arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
[PATCH] arm64: dts: qcom: sm8450: Add TCSR halt register space
Posted by Mukesh Ojha 3 years, 2 months ago
Add TCSR register space and refer it from scm node, so that
it can be used by SCM driver.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 5704750..e0fa733 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -270,6 +270,7 @@
 	firmware {
 		scm: scm {
 			compatible = "qcom,scm-sm8450", "qcom,scm";
+			qcom,dload-mode = <&tcsr 0x13000>;
 			interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
 			#reset-cells = <1>;
 		};
@@ -1986,6 +1987,11 @@
 			#hwlock-cells = <1>;
 		};
 
+		tcsr: syscon@1fc0000 {
+			compatible = "syscon";
+			reg = <0x0 0x1fc0000 0x0 0x30000>;
+		};
+
 		usb_1_hsphy: phy@88e3000 {
 			compatible = "qcom,sm8450-usb-hs-phy",
 				     "qcom,usb-snps-hs-7nm-phy";
-- 
2.7.4
Re: [PATCH] arm64: dts: qcom: sm8450: Add TCSR halt register space
Posted by Krzysztof Kozlowski 3 years, 2 months ago
On 11/01/2023 10:20, Mukesh Ojha wrote:
> Add TCSR register space and refer it from scm node, so that
> it can be used by SCM driver.
> 
> Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index 5704750..e0fa733 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> @@ -270,6 +270,7 @@
>  	firmware {
>  		scm: scm {
>  			compatible = "qcom,scm-sm8450", "qcom,scm";
> +			qcom,dload-mode = <&tcsr 0x13000>;
>  			interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
>  			#reset-cells = <1>;
>  		};
> @@ -1986,6 +1987,11 @@
>  			#hwlock-cells = <1>;
>  		};
>  
> +		tcsr: syscon@1fc0000 {
> +			compatible = "syscon";

This is not allowed by itself. You should have warnings when running
dtbs_check.

Best regards,
Krzysztof
Re: [PATCH] arm64: dts: qcom: sm8450: Add TCSR halt register space
Posted by Krzysztof Kozlowski 3 years, 2 months ago
On 11/01/2023 10:59, Krzysztof Kozlowski wrote:
> On 11/01/2023 10:20, Mukesh Ojha wrote:
>> Add TCSR register space and refer it from scm node, so that
>> it can be used by SCM driver.
>>
>> Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
>> ---
>>  arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
>> index 5704750..e0fa733 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
>> @@ -270,6 +270,7 @@
>>  	firmware {
>>  		scm: scm {
>>  			compatible = "qcom,scm-sm8450", "qcom,scm";
>> +			qcom,dload-mode = <&tcsr 0x13000>;
>>  			interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
>>  			#reset-cells = <1>;
>>  		};
>> @@ -1986,6 +1987,11 @@
>>  			#hwlock-cells = <1>;
>>  		};
>>  
>> +		tcsr: syscon@1fc0000 {
>> +			compatible = "syscon";
> 
> This is not allowed by itself. 

Eh, that was not proper English... I wanted to say: This is not allowed
on its own. You need specific compatible. ALWAYS.

> You should have warnings when running
> dtbs_check.
> 
> Best regards,
> Krzysztof
> 

Best regards,
Krzysztof
Re: [PATCH] arm64: dts: qcom: sm8450: Add TCSR halt register space
Posted by Mukesh Ojha 3 years, 2 months ago
Hi,

On 1/11/2023 3:30 PM, Krzysztof Kozlowski wrote:
> On 11/01/2023 10:59, Krzysztof Kozlowski wrote:
>> On 11/01/2023 10:20, Mukesh Ojha wrote:
>>> Add TCSR register space and refer it from scm node, so that
>>> it can be used by SCM driver.
>>>
>>> Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
>>> ---
>>>   arch/arm64/boot/dts/qcom/sm8450.dtsi | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
>>> index 5704750..e0fa733 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
>>> @@ -270,6 +270,7 @@
>>>   	firmware {
>>>   		scm: scm {
>>>   			compatible = "qcom,scm-sm8450", "qcom,scm";
>>> +			qcom,dload-mode = <&tcsr 0x13000>;
>>>   			interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
>>>   			#reset-cells = <1>;
>>>   		};
>>> @@ -1986,6 +1987,11 @@
>>>   			#hwlock-cells = <1>;
>>>   		};
>>>   
>>> +		tcsr: syscon@1fc0000 {
>>> +			compatible = "syscon";
>>
>> This is not allowed by itself.
> 
> Eh, that was not proper English... I wanted to say: This is not allowed
> on its own. You need specific compatible. ALWAYS.

Sorry, it was my first DT patch, I did not run dtbs_check.
Thanks for correcting.

I think, i have missed adding qcom,tcsr-sm8450 in
Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
also need to add qcom,tcsr-sm8450 in above compatible.

-Mukesh
> 
>> You should have warnings when running
>> dtbs_check.
>>
>> Best regards,
>> Krzysztof
>>
> 
> Best regards,
> Krzysztof
>