linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: Add SDM845 SMEM nodes
@ 2018-04-25 14:46 Sibi Sankar
  2018-04-25 22:06 ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Sibi Sankar @ 2018-04-25 14:46 UTC (permalink / raw)
  To: andy.gross, david.brown, robh+dt, bjorn.andersson
  Cc: mark.rutland, catalin.marinas, will.deacon, linux-arm-msm,
	linux-kernel, devicetree, linux-soc, Sibi Sankar

Add all the necessary dt nodes to support SMEM driver
on SDM845. It also adds the required memory carveouts
so that the kernel does not access memory that is in
use.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---

This patch depends on:
https://patchwork.kernel.org/patch/10276419/
https://patchwork.kernel.org/patch/10363361/

 arch/arm64/boot/dts/qcom/sdm845.dtsi | 38 ++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 9be763da0664..bea985045759 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -21,6 +21,27 @@
 		reg = <0 0x80000000 0 0>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		memory@85fc0000 {
+			reg = <0 0x85fc0000 0 0x40000>;
+			no-map;
+		};
+
+		smem_mem: smem-mem@86000000 {
+			reg = <0x0 0x86000000 0x0 0x200000>;
+			no-map;
+		};
+
+		memory@86000000 {
+			reg = <0 0x86200000 0 0x2d00000>;
+			no-map;
+		};
+	};
+
 	cpus {
 		#address-cells = <2>;
 		#size-cells = <0>;
@@ -147,6 +168,18 @@
 		};
 	};
 
+	tcsr_mutex: hwlock {
+		compatible = "qcom,tcsr-mutex";
+		syscon = <&tcsr_mutex_regs 0 0x1000>;
+		#hwlock-cells = <1>;
+	};
+
+	smem {
+		compatible = "qcom,smem";
+		memory-region = <&smem_mem>;
+		hwlocks = <&tcsr_mutex 3>;
+	};
+
 	psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";
@@ -339,6 +372,11 @@
 			};
 		};
 
+		tcsr_mutex_regs: syscon@1f40000 {
+			compatible = "syscon";
+			reg = <0x1f40000 0x40000>;
+		};
+
 		apss_shared: mailbox@17990000 {
 			compatible = "qcom,sdm845-apss-shared";
 			reg = <0x17990000 0x1000>;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add SDM845 SMEM nodes
  2018-04-25 14:46 [PATCH] arm64: dts: qcom: Add SDM845 SMEM nodes Sibi Sankar
@ 2018-04-25 22:06 ` Bjorn Andersson
  2018-04-26 14:25   ` Sibi S
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Andersson @ 2018-04-25 22:06 UTC (permalink / raw)
  To: Sibi Sankar
  Cc: andy.gross, david.brown, robh+dt, mark.rutland, catalin.marinas,
	will.deacon, linux-arm-msm, linux-kernel, devicetree, linux-soc

On Wed 25 Apr 07:46 PDT 2018, Sibi Sankar wrote:
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 9be763da0664..bea985045759 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -21,6 +21,27 @@
>  		reg = <0 0x80000000 0 0>;
>  	};
>  
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		memory@85fc0000 {
> +			reg = <0 0x85fc0000 0 0x40000>;

The region 0x85fe0000 + 0x20000 seems to be command db, which should be
described on its own. So please reduce the size to 0x20000.

> +			no-map;
> +		};
> +
> +		smem_mem: smem-mem@86000000 {

smem_mem: memory@86000000 ?

> +			reg = <0x0 0x86000000 0x0 0x200000>;
> +			no-map;
> +		};
> +
> +		memory@86000000 {

memory@86200000

> +			reg = <0 0x86200000 0 0x2d00000>;
> +			no-map;
> +		};
> +	};
> +

The rest looks good.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add SDM845 SMEM nodes
  2018-04-25 22:06 ` Bjorn Andersson
@ 2018-04-26 14:25   ` Sibi S
  0 siblings, 0 replies; 3+ messages in thread
From: Sibi S @ 2018-04-26 14:25 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: andy.gross, david.brown, robh+dt, mark.rutland, catalin.marinas,
	will.deacon, linux-arm-msm, linux-kernel, devicetree, linux-soc

Hi Bjorn,

Thanks for the review

On 04/26/2018 03:36 AM, Bjorn Andersson wrote:
> On Wed 25 Apr 07:46 PDT 2018, Sibi Sankar wrote:
>> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>> index 9be763da0664..bea985045759 100644
>> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>> @@ -21,6 +21,27 @@
>>   		reg = <0 0x80000000 0 0>;
>>   	};
>>   
>> +	reserved-memory {
>> +		#address-cells = <2>;
>> +		#size-cells = <2>;
>> +		ranges;
>> +
>> +		memory@85fc0000 {
>> +			reg = <0 0x85fc0000 0 0x40000>;
> 
> The region 0x85fe0000 + 0x20000 seems to be command db, which should be
> described on its own. So please reduce the size to 0x20000.
> 
>> +			no-map;
>> +		};
>> +
>> +		smem_mem: smem-mem@86000000 {
> 
> smem_mem: memory@86000000 ?

Should I update kernel docs as well to say all nodes should
have memory has default name? Just followed what was done in
msm8916 and msm8996.

> 
>> +			reg = <0x0 0x86000000 0x0 0x200000>;
>> +			no-map;
>> +		};
>> +
>> +		memory@86000000 {
> 
> memory@86200000
> 
>> +			reg = <0 0x86200000 0 0x2d00000>;
>> +			no-map;
>> +		};
>> +	};
>> +
> 
> The rest looks good.
> 
> Regards,
> Bjorn
> 

-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc, is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-26 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 14:46 [PATCH] arm64: dts: qcom: Add SDM845 SMEM nodes Sibi Sankar
2018-04-25 22:06 ` Bjorn Andersson
2018-04-26 14:25   ` Sibi S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).