diff mbox series

[RFT,v2,14/14] arm64: dts: qcom: sm8150: switch TCSR mutex to MMIO

Message ID 20220817130342.568396-15-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 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/sm8150-mtp.dtb: hwlock: 'reg' is a required property
  qcom/sm8150-mtp.dtb: hwlock: 'syscon' does not match any of the regexes: 'pinctrl-[0-9]+'

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

Comments

Konrad Dybcio Aug. 17, 2022, 9:07 p.m. UTC | #1
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/sm8150-mtp.dtb: hwlock: 'reg' is a required property
>   qcom/sm8150-mtp.dtb: hwlock: 'syscon' does not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sm8150.dtsi | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> index 7d509ecd44da..dc6770391813 100644
> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> @@ -585,12 +585,6 @@ scm: scm {
>  		};
>  	};
>  
> -	tcsr_mutex: hwlock {
> -		compatible = "qcom,tcsr-mutex";
> -		syscon = <&tcsr_mutex_regs 0 0x1000>;
> -		#hwlock-cells = <1>;
> -	};
> -
>  	memory@80000000 {
>  		device_type = "memory";
>  		/* We expect the bootloader to fill in the size */
> @@ -2054,9 +2048,10 @@ ipa_virt: interconnect@1e00000 {
>  			qcom,bcm-voters = <&apps_bcm_voter>;
>  		};
>  
> -		tcsr_mutex_regs: syscon@1f40000 {
> -			compatible = "syscon";
> -			reg = <0x0 0x01f40000 0x0 0x40000>;
> +		tcsr_mutex: hwlock@1f40000 {
> +			compatible = "qcom,tcsr-mutex";
> +			reg = <0 0x01f40000 0 0x20000>;
> +			#hwlock-cells = <1>;
>  		};
No replacement for the trailing 0x20000?

Konrad
>  
>  		remoteproc_slpi: remoteproc@2400000 {
Krzysztof Kozlowski Aug. 18, 2022, 7:04 a.m. UTC | #2
On 18/08/2022 00:07, Konrad Dybcio wrote:
> 
> 
> 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/sm8150-mtp.dtb: hwlock: 'reg' is a required property
>>   qcom/sm8150-mtp.dtb: hwlock: 'syscon' does not match any of the regexes: 'pinctrl-[0-9]+'
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  arch/arm64/boot/dts/qcom/sm8150.dtsi | 13 ++++---------
>>  1 file changed, 4 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>> index 7d509ecd44da..dc6770391813 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>> @@ -585,12 +585,6 @@ scm: scm {
>>  		};
>>  	};
>>  
>> -	tcsr_mutex: hwlock {
>> -		compatible = "qcom,tcsr-mutex";
>> -		syscon = <&tcsr_mutex_regs 0 0x1000>;
>> -		#hwlock-cells = <1>;
>> -	};
>> -
>>  	memory@80000000 {
>>  		device_type = "memory";
>>  		/* We expect the bootloader to fill in the size */
>> @@ -2054,9 +2048,10 @@ ipa_virt: interconnect@1e00000 {
>>  			qcom,bcm-voters = <&apps_bcm_voter>;
>>  		};
>>  
>> -		tcsr_mutex_regs: syscon@1f40000 {
>> -			compatible = "syscon";
>> -			reg = <0x0 0x01f40000 0x0 0x40000>;
>> +		tcsr_mutex: hwlock@1f40000 {
>> +			compatible = "qcom,tcsr-mutex";
>> +			reg = <0 0x01f40000 0 0x20000>;
>> +			#hwlock-cells = <1>;
>>  		};
> No replacement for the trailing 0x20000?
> 

There is no user of it, so I did not add. I could add remaining block
just for completeness.


Best regards,
Krzysztof
Konrad Dybcio Aug. 18, 2022, noon UTC | #3
On 18.08.2022 09:04, Krzysztof Kozlowski wrote:
> On 18/08/2022 00:07, Konrad Dybcio wrote:
>>
>>
>> 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/sm8150-mtp.dtb: hwlock: 'reg' is a required property
>>>   qcom/sm8150-mtp.dtb: hwlock: 'syscon' does not match any of the regexes: 'pinctrl-[0-9]+'
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>> ---
>>>  arch/arm64/boot/dts/qcom/sm8150.dtsi | 13 ++++---------
>>>  1 file changed, 4 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>> index 7d509ecd44da..dc6770391813 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>>> @@ -585,12 +585,6 @@ scm: scm {
>>>  		};
>>>  	};
>>>  
>>> -	tcsr_mutex: hwlock {
>>> -		compatible = "qcom,tcsr-mutex";
>>> -		syscon = <&tcsr_mutex_regs 0 0x1000>;
>>> -		#hwlock-cells = <1>;
>>> -	};
>>> -
>>>  	memory@80000000 {
>>>  		device_type = "memory";
>>>  		/* We expect the bootloader to fill in the size */
>>> @@ -2054,9 +2048,10 @@ ipa_virt: interconnect@1e00000 {
>>>  			qcom,bcm-voters = <&apps_bcm_voter>;
>>>  		};
>>>  
>>> -		tcsr_mutex_regs: syscon@1f40000 {
>>> -			compatible = "syscon";
>>> -			reg = <0x0 0x01f40000 0x0 0x40000>;
>>> +		tcsr_mutex: hwlock@1f40000 {
>>> +			compatible = "qcom,tcsr-mutex";
>>> +			reg = <0 0x01f40000 0 0x20000>;
>>> +			#hwlock-cells = <1>;
>>>  		};
>> No replacement for the trailing 0x20000?
>>
> 
> There is no user of it, so I did not add. I could add remaining block
> just for completeness.

Please do, maybe even in a separate patch so as not to resend the entire
series needlessly.

Konrad
> 
> 
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 7d509ecd44da..dc6770391813 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -585,12 +585,6 @@  scm: scm {
 		};
 	};
 
-	tcsr_mutex: hwlock {
-		compatible = "qcom,tcsr-mutex";
-		syscon = <&tcsr_mutex_regs 0 0x1000>;
-		#hwlock-cells = <1>;
-	};
-
 	memory@80000000 {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the size */
@@ -2054,9 +2048,10 @@  ipa_virt: interconnect@1e00000 {
 			qcom,bcm-voters = <&apps_bcm_voter>;
 		};
 
-		tcsr_mutex_regs: syscon@1f40000 {
-			compatible = "syscon";
-			reg = <0x0 0x01f40000 0x0 0x40000>;
+		tcsr_mutex: hwlock@1f40000 {
+			compatible = "qcom,tcsr-mutex";
+			reg = <0 0x01f40000 0 0x20000>;
+			#hwlock-cells = <1>;
 		};
 
 		remoteproc_slpi: remoteproc@2400000 {