Re: [PATCH v2 1/2] arm64: dts: qcom: msm8953: Set initial address for memory

2023-12-03 Thread Luca Weiss
On Sonntag, 3. Dezember 2023 05:20:23 CET Bjorn Andersson wrote:
> On Sat, Nov 25, 2023 at 01:19:27PM +0100, Luca Weiss wrote:
> > The dtbs_check really doesn't like having memory without reg set.
> > 
> > The base address depends on the amount of RAM you have:
> >   <= 2.00 GiB RAM: 0x8000
> >   
> >= 3.00 GiB RAM: 0x4000
> >= 3.75 GiB RAM: 0x1000
> >  
> >  (more does not fit into the 32-bit physical address space)
> > 
> > So, let's pick one of the values, 0x1000 which is used on devices
> > with 3.75 GiB RAM. Since the bootloader will update it to what's present
> > on the device it doesn't matter too much.
> > 
> > Signed-off-by: Luca Weiss 
> > ---
> > 
> >  arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> > b/arch/arm64/boot/dts/qcom/msm8953.dtsi index e7de7632669a..a3ba24ca599b
> > 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> > @@ -174,10 +174,10 @@ scm: scm {
> > 
> > };
> > 
> > };
> > 
> > -   memory {
> 
> Wouldn't it be sufficient to add @0 here, to please dtbs_check?

The checker itself also seems to be okay with memory@0 and no other change,
but there's this warning with W=1

arch/arm64/boot/dts/qcom/msm8953.dtsi:177.11-181.4: Warning 
(unique_unit_address_if_enabled): /memory@0: duplicate unit-address (also used 
in node /soc@0)

So probably we should still try to put it at a reasonable address like
0x1000?

Regards
Luca

> 
> Regards,
> Bjorn
> 
> > +   memory@1000 {
> > 
> > device_type = "memory";
> > /* We expect the bootloader to fill in the reg */
> > 
> > -   reg = <0 0 0 0>;
> > +   reg = <0 0x1000 0 0>;
> > 
> > };
> > 
> > pmu {







Re: [PATCH v2 1/2] arm64: dts: qcom: msm8953: Set initial address for memory

2023-12-02 Thread Bjorn Andersson
On Sat, Nov 25, 2023 at 01:19:27PM +0100, Luca Weiss wrote:
> The dtbs_check really doesn't like having memory without reg set.
> 
> The base address depends on the amount of RAM you have:
> 
>   <= 2.00 GiB RAM: 0x8000
>= 3.00 GiB RAM: 0x4000
>= 3.75 GiB RAM: 0x1000
>  (more does not fit into the 32-bit physical address space)
> 
> So, let's pick one of the values, 0x1000 which is used on devices
> with 3.75 GiB RAM. Since the bootloader will update it to what's present
> on the device it doesn't matter too much.
> 
> Signed-off-by: Luca Weiss 
> ---
>  arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi 
> b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> index e7de7632669a..a3ba24ca599b 100644
> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
> @@ -174,10 +174,10 @@ scm: scm {
>   };
>   };
>  
> - memory {

Wouldn't it be sufficient to add @0 here, to please dtbs_check?

Regards,
Bjorn

> + memory@1000 {
>   device_type = "memory";
>   /* We expect the bootloader to fill in the reg */
> - reg = <0 0 0 0>;
> + reg = <0 0x1000 0 0>;
>   };
>  
>   pmu {
> 
> -- 
> 2.43.0
> 



[PATCH v2 1/2] arm64: dts: qcom: msm8953: Set initial address for memory

2023-11-25 Thread Luca Weiss
The dtbs_check really doesn't like having memory without reg set.

The base address depends on the amount of RAM you have:

  <= 2.00 GiB RAM: 0x8000
   = 3.00 GiB RAM: 0x4000
   = 3.75 GiB RAM: 0x1000
 (more does not fit into the 32-bit physical address space)

So, let's pick one of the values, 0x1000 which is used on devices
with 3.75 GiB RAM. Since the bootloader will update it to what's present
on the device it doesn't matter too much.

Signed-off-by: Luca Weiss 
---
 arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi 
b/arch/arm64/boot/dts/qcom/msm8953.dtsi
index e7de7632669a..a3ba24ca599b 100644
--- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
@@ -174,10 +174,10 @@ scm: scm {
};
};
 
-   memory {
+   memory@1000 {
device_type = "memory";
/* We expect the bootloader to fill in the reg */
-   reg = <0 0 0 0>;
+   reg = <0 0x1000 0 0>;
};
 
pmu {

-- 
2.43.0