public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
@ 2023-08-25 11:46 Macpaul Lin
  2023-08-25 11:46 ` [PATCH 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Macpaul Lin @ 2023-08-25 11:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Fabien Parent, Macpaul Lin,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, Chunfeng Yun, stable

The onboard dram of mt8195-demo board is 8GB.

Cc: stable@vger.kernel.org      # 6.1, 6.4
Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index b2485ddfd33b..ff363ab925e9 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -48,7 +48,7 @@
 
 	memory@40000000 {
 		device_type = "memory";
-		reg = <0 0x40000000 0 0x80000000>;
+		reg = <0 0x40000000 0x2 0x00000000>;
 	};
 
 	reserved-memory {
-- 
2.18.0


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

* [PATCH 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions
  2023-08-25 11:46 [PATCH 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
@ 2023-08-25 11:46 ` Macpaul Lin
  2023-08-30 11:15 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
  2023-09-05  3:45 ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
  2 siblings, 0 replies; 10+ messages in thread
From: Macpaul Lin @ 2023-08-25 11:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Fabien Parent, Macpaul Lin,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, Chunfeng Yun, stable

The dts file of the MediaTek MT8195 demo board has been updated to include
new reserved memory regions.
These reserved memory regions are:
 - SCP
 - VPU,
 - Sound DMA
 - APU.

These regions are defined with the "shared-dma-pool" compatible property.
In addition, the existing reserved memory regions have been reordered by
their addresses to improve readability and maintainability of the DTS
file.

Cc: stable@vger.kernel.org      # 6.1, 6.4
Fixes: e4a417520101 ("arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon")
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 38 ++++++++++++++++----
 1 file changed, 32 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index ff363ab925e9..8aea6f5d72b3 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -56,12 +56,6 @@
 		#size-cells = <2>;
 		ranges;
 
-		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
-		bl31_secmon_reserved: secmon@54600000 {
-			no-map;
-			reg = <0 0x54600000 0x0 0x200000>;
-		};
-
 		/* 12 MiB reserved for OP-TEE (BL32)
 		 * +-----------------------+ 0x43e0_0000
 		 * |      SHMEM 2MiB       |
@@ -75,6 +69,38 @@
 			no-map;
 			reg = <0 0x43200000 0 0x00c00000>;
 		};
+
+		scp_mem: memory@50000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x50000000 0 0x2900000>;
+			no-map;
+		};
+
+		vpu_mem: memory@53000000 {
+			compatible = "shared-dma-pool";
+			size = <0 0x1400000>; /* 20 MB */
+			alignment = <0 0x10000>;
+			reg = <0 0x53000000 0 0x1400000>;
+		};
+
+		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
+		bl31_secmon_mem: memory@54600000 {
+			no-map;
+			reg = <0 0x54600000 0x0 0x200000>;
+		};
+
+		snd_dma_mem: memory@60000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x60000000 0 0x1100000>;
+			no-map;
+		};
+
+		apu_mem: memory@62000000 {
+			compatible = "shared-dma-pool";
+			size = <0 0x1400000>; /* 20 MB */
+			alignment = <0 0x10000>;
+			reg = <0 0x62000000 0 0x1400000>;
+		};
 	};
 };
 
-- 
2.18.0


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

* [PATCH v2 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
  2023-08-25 11:46 [PATCH 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
  2023-08-25 11:46 ` [PATCH 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
@ 2023-08-30 11:15 ` Macpaul Lin
  2023-08-30 11:15   ` [PATCH v2 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
  2023-09-05  3:45 ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
  2 siblings, 1 reply; 10+ messages in thread
From: Macpaul Lin @ 2023-08-30 11:15 UTC (permalink / raw)
  To: Alexandre Mergnat, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno, Fabien Parent,
	Macpaul Lin, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, Chunfeng Yun, stable

The onboard dram of mt8195-demo board is 8GB.

Cc: stable@vger.kernel.org      # 6.1, 6.4
Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Changes for v2:
 - No change.

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index b2485ddfd33b..ff363ab925e9 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -48,7 +48,7 @@
 
 	memory@40000000 {
 		device_type = "memory";
-		reg = <0 0x40000000 0 0x80000000>;
+		reg = <0 0x40000000 0x2 0x00000000>;
 	};
 
 	reserved-memory {
-- 
2.18.0


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

* [PATCH v2 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions
  2023-08-30 11:15 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
@ 2023-08-30 11:15   ` Macpaul Lin
  0 siblings, 0 replies; 10+ messages in thread
From: Macpaul Lin @ 2023-08-30 11:15 UTC (permalink / raw)
  To: Alexandre Mergnat, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno, Fabien Parent,
	Macpaul Lin, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, Chunfeng Yun, stable

The dts file of the MediaTek MT8195 demo board has been updated to include
new reserved memory regions.
These reserved memory regions are:
 - SCP
 - VPU,
 - Sound DMA
 - APU.

These regions are defined with the "shared-dma-pool" compatible property.
In addition, the existing reserved memory regions have been reordered by
their addresses to improve readability and maintainability of the DTS
file.

Cc: stable@vger.kernel.org      # 6.1, 6.4
Fixes: e4a417520101 ("arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon")
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 38 ++++++++++++++++----
 1 file changed, 32 insertions(+), 6 deletions(-)

Changes for v2:
 - No change.

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index ff363ab925e9..8aea6f5d72b3 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -56,12 +56,6 @@
 		#size-cells = <2>;
 		ranges;
 
-		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
-		bl31_secmon_reserved: secmon@54600000 {
-			no-map;
-			reg = <0 0x54600000 0x0 0x200000>;
-		};
-
 		/* 12 MiB reserved for OP-TEE (BL32)
 		 * +-----------------------+ 0x43e0_0000
 		 * |      SHMEM 2MiB       |
@@ -75,6 +69,38 @@
 			no-map;
 			reg = <0 0x43200000 0 0x00c00000>;
 		};
+
+		scp_mem: memory@50000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x50000000 0 0x2900000>;
+			no-map;
+		};
+
+		vpu_mem: memory@53000000 {
+			compatible = "shared-dma-pool";
+			size = <0 0x1400000>; /* 20 MB */
+			alignment = <0 0x10000>;
+			reg = <0 0x53000000 0 0x1400000>;
+		};
+
+		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
+		bl31_secmon_mem: memory@54600000 {
+			no-map;
+			reg = <0 0x54600000 0x0 0x200000>;
+		};
+
+		snd_dma_mem: memory@60000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x60000000 0 0x1100000>;
+			no-map;
+		};
+
+		apu_mem: memory@62000000 {
+			compatible = "shared-dma-pool";
+			size = <0 0x1400000>; /* 20 MB */
+			alignment = <0 0x10000>;
+			reg = <0 0x62000000 0 0x1400000>;
+		};
 	};
 };
 
-- 
2.18.0


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

* [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
  2023-08-25 11:46 [PATCH 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
  2023-08-25 11:46 ` [PATCH 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
  2023-08-30 11:15 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
@ 2023-09-05  3:45 ` Macpaul Lin
  2023-09-05  3:45   ` [PATCH v3 2/2] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
                     ` (2 more replies)
  2 siblings, 3 replies; 10+ messages in thread
From: Macpaul Lin @ 2023-09-05  3:45 UTC (permalink / raw)
  To: Alexandre Mergnat, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno, Fabien Parent,
	Macpaul Lin, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, stable

The onboard dram of mt8195-demo board is 8GB.

Cc: stable@vger.kernel.org      # 6.1, 6.4, 6.5
Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Changes for v2:
Changes for v3:
 - No change.

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index b2485ddfd33b..ff363ab925e9 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -48,7 +48,7 @@
 
 	memory@40000000 {
 		device_type = "memory";
-		reg = <0 0x40000000 0 0x80000000>;
+		reg = <0 0x40000000 0x2 0x00000000>;
 	};
 
 	reserved-memory {
-- 
2.18.0


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

* [PATCH v3 2/2] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions
  2023-09-05  3:45 ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
@ 2023-09-05  3:45   ` Macpaul Lin
  2023-09-05  8:01     ` AngeloGioacchino Del Regno
  2023-09-05  8:00   ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB AngeloGioacchino Del Regno
  2023-09-07  9:15   ` AngeloGioacchino Del Regno
  2 siblings, 1 reply; 10+ messages in thread
From: Macpaul Lin @ 2023-09-05  3:45 UTC (permalink / raw)
  To: Alexandre Mergnat, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno, Fabien Parent,
	Macpaul Lin, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, stable

The dts file of the MediaTek MT8195 demo board has been updated to include
new reserved memory regions.
These reserved memory regions are:
 - SCP
 - VPU,
 - Sound DMA
 - APU.

These regions are defined with the "shared-dma-pool" compatible property.
In addition, the existing reserved memory regions have been reordered by
their addresses to improve readability and maintainability of the DTS
file.

Cc: stable@vger.kernel.org      # 6.1, 6.4, 6.5
Fixes: e4a417520101 ("arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon")
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 37 ++++++++++++++++----
 1 file changed, 30 insertions(+), 7 deletions(-)

Changes for v2:
 - No change.

Changes for v3:
 - Fix vpu_mem and apu_mem node according to the result of "make dtbs_check W=1"
 - Fix comment style to Linux for optee node.

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index ff363ab925e9..5d635085fe3f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -56,13 +56,8 @@
 		#size-cells = <2>;
 		ranges;
 
-		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
-		bl31_secmon_reserved: secmon@54600000 {
-			no-map;
-			reg = <0 0x54600000 0x0 0x200000>;
-		};
-
-		/* 12 MiB reserved for OP-TEE (BL32)
+		/*
+		 * 12 MiB reserved for OP-TEE (BL32)
 		 * +-----------------------+ 0x43e0_0000
 		 * |      SHMEM 2MiB       |
 		 * +-----------------------+ 0x43c0_0000
@@ -75,6 +70,34 @@
 			no-map;
 			reg = <0 0x43200000 0 0x00c00000>;
 		};
+
+		scp_mem: memory@50000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x50000000 0 0x2900000>;
+			no-map;
+		};
+
+		vpu_mem: memory@53000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x53000000 0 0x1400000>; /* 20 MB */
+		};
+
+		/* 2 MiB reserved for ARM Trusted Firmware (BL31) */
+		bl31_secmon_mem: memory@54600000 {
+			no-map;
+			reg = <0 0x54600000 0x0 0x200000>;
+		};
+
+		snd_dma_mem: memory@60000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x60000000 0 0x1100000>;
+			no-map;
+		};
+
+		apu_mem: memory@62000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x62000000 0 0x1400000>; /* 20 MB */
+		};
 	};
 };
 
-- 
2.18.0


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

* Re: [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
  2023-09-05  3:45 ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
  2023-09-05  3:45   ` [PATCH v3 2/2] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
@ 2023-09-05  8:00   ` AngeloGioacchino Del Regno
  2023-09-05  8:15     ` Macpaul Lin
  2023-09-07  9:15   ` AngeloGioacchino Del Regno
  2 siblings, 1 reply; 10+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-09-05  8:00 UTC (permalink / raw)
  To: Macpaul Lin, Alexandre Mergnat, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, Fabien Parent, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, stable

Il 05/09/23 05:45, Macpaul Lin ha scritto:
> The onboard dram of mt8195-demo board is 8GB.
> 
> Cc: stable@vger.kernel.org      # 6.1, 6.4, 6.5
> Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> ---
>   arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Changes for v2:
> Changes for v3:
>   - No change.
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> index b2485ddfd33b..ff363ab925e9 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> @@ -48,7 +48,7 @@
>   
>   	memory@40000000 {
>   		device_type = "memory";
> -		reg = <0 0x40000000 0 0x80000000>;
> +		reg = <0 0x40000000 0x2 0x00000000>;

Shouldn't this get automatically filled in by the bootloader?
Usually, that's the case: if it is, then the right thing to do here
is to change this property to

		/* The bootloader will fill in the size */
		reg = <0x0 0x40000000 0x0 0x0>;

Regards,
Angelo

>   	};
>   
>   	reserved-memory {



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

* Re: [PATCH v3 2/2] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions
  2023-09-05  3:45   ` [PATCH v3 2/2] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
@ 2023-09-05  8:01     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 10+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-09-05  8:01 UTC (permalink / raw)
  To: Macpaul Lin, Alexandre Mergnat, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, Fabien Parent, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, stable

Il 05/09/23 05:45, Macpaul Lin ha scritto:
> The dts file of the MediaTek MT8195 demo board has been updated to include
> new reserved memory regions.
> These reserved memory regions are:
>   - SCP
>   - VPU,
>   - Sound DMA
>   - APU.
> 
> These regions are defined with the "shared-dma-pool" compatible property.
> In addition, the existing reserved memory regions have been reordered by
> their addresses to improve readability and maintainability of the DTS
> file.
> 
> Cc: stable@vger.kernel.org      # 6.1, 6.4, 6.5
> Fixes: e4a417520101 ("arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon")
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>


Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
  2023-09-05  8:00   ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB AngeloGioacchino Del Regno
@ 2023-09-05  8:15     ` Macpaul Lin
  0 siblings, 0 replies; 10+ messages in thread
From: Macpaul Lin @ 2023-09-05  8:15 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Alexandre Mergnat, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	Fabien Parent, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, stable



On 9/5/23 16:00, AngeloGioacchino Del Regno wrote:
> Il 05/09/23 05:45, Macpaul Lin ha scritto:
>> The onboard dram of mt8195-demo board is 8GB.
>>
>> Cc: stable@vger.kernel.org      # 6.1, 6.4, 6.5
>> Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 
>> Demo board")
>> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
>> ---
>>   arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Changes for v2:
>> Changes for v3:
>>   - No change.
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts 
>> b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>> index b2485ddfd33b..ff363ab925e9 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>> +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>> @@ -48,7 +48,7 @@
>>       memory@40000000 {
>>           device_type = "memory";
>> -        reg = <0 0x40000000 0 0x80000000>;
>> +        reg = <0 0x40000000 0x2 0x00000000>;
> 
> Shouldn't this get automatically filled in by the bootloader?
> Usually, that's the case: if it is, then the right thing to do here
> is to change this property to
> 
>          /* The bootloader will fill in the size */
>          reg = <0x0 0x40000000 0x0 0x0>;
> 
> Regards,
> Angelo
> 

Thanks for the review. However, this value seems depends on the boot 
method. Take u-boot as the example, the total memory size which Linux 
kernel get will be different via EBBR boot or fitImage boot.

It the system is booted through EBBR, the memory size should be filled 
by u-boot's UEFI variables, which is from u-boot's dts file. If the 
system is booted from fitImage, the memory size should be filled by 
kernel's dts file which is usually packed with fitImage. That's why we 
still need this fix.

>>       };
>>       reserved-memory {
> 
> 

Thanks.
Macpaul Lin

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

* Re: [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
  2023-09-05  3:45 ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
  2023-09-05  3:45   ` [PATCH v3 2/2] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
  2023-09-05  8:00   ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB AngeloGioacchino Del Regno
@ 2023-09-07  9:15   ` AngeloGioacchino Del Regno
  2 siblings, 0 replies; 10+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-09-07  9:15 UTC (permalink / raw)
  To: Macpaul Lin, Alexandre Mergnat, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, Fabien Parent, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: Bear Wang, Pablo Sun, Macpaul Lin, stable

Il 05/09/23 05:45, Macpaul Lin ha scritto:
> The onboard dram of mt8195-demo board is 8GB.
> 
> Cc: stable@vger.kernel.org      # 6.1, 6.4, 6.5
> Fixes: 6147314aeedc ("arm64: dts: mediatek: Add device-tree for MT8195 Demo board")
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> ---
>   arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Changes for v2:
> Changes for v3:
>   - No change.
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> index b2485ddfd33b..ff363ab925e9 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> @@ -48,7 +48,7 @@
>   
>   	memory@40000000 {
>   		device_type = "memory";
> -		reg = <0 0x40000000 0 0x80000000>;
> +		reg = <0 0x40000000 0x2 0x00000000>;
>   	};
>   
>   	reserved-memory {


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

end of thread, other threads:[~2023-09-07 16:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 11:46 [PATCH 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
2023-08-25 11:46 ` [PATCH 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
2023-08-30 11:15 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
2023-08-30 11:15   ` [PATCH v2 2/4] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
2023-09-05  3:45 ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB Macpaul Lin
2023-09-05  3:45   ` [PATCH v3 2/2] arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions Macpaul Lin
2023-09-05  8:01     ` AngeloGioacchino Del Regno
2023-09-05  8:00   ` [PATCH v3 1/2] arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB AngeloGioacchino Del Regno
2023-09-05  8:15     ` Macpaul Lin
2023-09-07  9:15   ` AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox