Re: [PATCH v2 12/12] rockchip: fix boot_devices constants

2022-03-11 Thread Simon Glass
Hi Johan,

On Thu, 3 Mar 2022 at 07:37, Johan Jonker  wrote:
>
> Hi Simon,
>
> Thank you for your test report.
> As I don't always have the hardware, could the board maintainers help me
> identify u-boot specific property differences with Linux that need to be
> moved to a dtsi file.
>
> Will send a new serie with fixes.
>
> Johan
>
> ===
>
> After I sync rk3288.dtsi I get this warning.
> fdt64_t is generated by a script and is not something that I can update
> the regmap_init_mem_plat function for.
> Any advice here?
>
> ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make chromebook_jerry_defconfig
>
>CC  spl/drivers/ram/rockchip/sdram_rk3288.o
> drivers/ram/rockchip/sdram_rk3288.c: In function ‘conv_of_plat’:
> drivers/ram/rockchip/sdram_rk3288.c:1032:41: warning: passing argument 2
> of ‘regmap_init_mem_plat’ from incompatible pointer type
> [-Wincompatible-pointer-types]
>   ret = regmap_init_mem_plat(dev, of_plat->reg,
>   ~~~^
> In file included from drivers/ram/rockchip/sdram_rk3288.c:18:
> include/regmap.h:391:58: note: expected ‘fdt_val_t *’ {aka ‘unsigned int
> *’} but argument is of type ‘fdt64_t *’ {aka ‘long long unsigned int *’}
>  int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count,
>
>
> On 3/3/22 04:37, Simon Glass wrote:
> > Hi Johan,
> >
> > On Mon, 28 Feb 2022 at 18:48, Johan Jonker  wrote:
> >>
> >> The DT node name pattern in mmc-controller.yaml for mmc
> >> is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced
> >> with Linux, so update the boot_devices constants as well.
> >>
> >> Signed-off-by: Johan Jonker 
> >> Reviewed-by: Simon Glass 
> >> ---
> >>  arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
> >>  arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
> >>  arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
> >>  arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
> >>  arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
> >>  5 files changed, 10 insertions(+), 10 deletions(-)
> >
>
> > I tested this series on snow and it seems fine.
> >
> > I tried it on jerry and got:
> >
> > DRAM init failed: -19
>
> noc: syscon@ffac {
> compatible = "rockchip,rk3288-noc", "syscon";
> reg = <0x0 0xffac 0x0 0x2000>;
>
> Forgot something. Does that help or is there more that needs to be fixed?
>
> ==> u-boot,dm-pre-reloc;

See my other reply for jerry.

I might be able to make my lab available to you somehow.

>
> };
>
> TODO: Must change/update dmc/noc reg size when I sync rk3288.dtsi.
>
> >
> > It also seemed fine on bob although my display is not coming up, for
> > different reasons.
>
> In SPL or full U-boot?

There is no display in SPL.

>
> rk3288-veyron-chromebook.dtsi:
>
> aliases {
> i2c20 = _tunnel;
> video0 = 
> video1 = 
> };
>
> Is this video alias something U-boot specific?
> Fixing U-boot video is beyond my U-boot knowledge.

Well that's OK, just keep the aliases around and perhaps upstream
them? I am not quite sure why we need an ordering for the video,
actually.

Regards,
Simon


Re: [PATCH v2 12/12] rockchip: fix boot_devices constants

2022-03-03 Thread Johan Jonker



On 3/3/22 15:37, Johan Jonker wrote:
> Hi Simon,
> 
> Thank you for your test report.
> As I don't always have the hardware, could the board maintainers help me
> identify u-boot specific property differences with Linux that need to be
> moved to a dtsi file.
> 
> Will send a new serie with fixes.
> 
> Johan
> 
> ===
> 
> After I sync rk3288.dtsi I get this warning.
> fdt64_t is generated by a script and is not something that I can update
> the regmap_init_mem_plat function for.
> Any advice here?


A possible solution with:

config ROCKCHIP_RK3288
select PHYS_64BIT

Adding PHYS_64BIT leads to other warning like this:

drivers/video/rockchip/rk_vop.c: In function ‘rk_vop_probe’:
drivers/video/rockchip/rk_vop.c:449:15: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
  priv->regs = (struct rk3288_vop *)dev_read_addr(dev);

Conclusion: a direct rk3288.dtsi sync from Linux with 64bit gives too
much work to drivers or DT reg changes.

Will look at a partial upgrade without reg size change.

Johan

> 
> ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make chromebook_jerry_defconfig
> 
>CC  spl/drivers/ram/rockchip/sdram_rk3288.o
> drivers/ram/rockchip/sdram_rk3288.c: In function ‘conv_of_plat’:
> drivers/ram/rockchip/sdram_rk3288.c:1032:41: warning: passing argument 2
> of ‘regmap_init_mem_plat’ from incompatible pointer type
> [-Wincompatible-pointer-types]
>   ret = regmap_init_mem_plat(dev, of_plat->reg,
>   ~~~^
> In file included from drivers/ram/rockchip/sdram_rk3288.c:18:
> include/regmap.h:391:58: note: expected ‘fdt_val_t *’ {aka ‘unsigned int
> *’} but argument is of type ‘fdt64_t *’ {aka ‘long long unsigned int *’}
>  int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count,
> 
> 
> On 3/3/22 04:37, Simon Glass wrote:
>> Hi Johan,
>>
>> On Mon, 28 Feb 2022 at 18:48, Johan Jonker  wrote:
>>>
>>> The DT node name pattern in mmc-controller.yaml for mmc
>>> is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced
>>> with Linux, so update the boot_devices constants as well.
>>>
>>> Signed-off-by: Johan Jonker 
>>> Reviewed-by: Simon Glass 
>>> ---
>>>  arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
>>>  arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
>>>  arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
>>>  arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
>>>  arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
>>>  5 files changed, 10 insertions(+), 10 deletions(-)
>>
> 
>> I tested this series on snow and it seems fine.
>>
>> I tried it on jerry and got:
>>
>> DRAM init failed: -19
> 
>   noc: syscon@ffac {
>   compatible = "rockchip,rk3288-noc", "syscon";
>   reg = <0x0 0xffac 0x0 0x2000>;
> 
> Forgot something. Does that help or is there more that needs to be fixed?
> 
> ==>   u-boot,dm-pre-reloc;
> 
>   };
> 
> TODO: Must change/update dmc/noc reg size when I sync rk3288.dtsi.
> 
>>
>> It also seemed fine on bob although my display is not coming up, for
>> different reasons.
> 
> In SPL or full U-boot?
> 
> rk3288-veyron-chromebook.dtsi:
> 
>   aliases {
>   i2c20 = _tunnel;
>   video0 = 
>   video1 = 
>   };
> 
> Is this video alias something U-boot specific?
> Fixing U-boot video is beyond my U-boot knowledge.
> 
>>
>> Regards
>>
>> Simon


Re: [PATCH v2 12/12] rockchip: fix boot_devices constants

2022-03-03 Thread Johan Jonker
Hi Simon,

Thank you for your test report.
As I don't always have the hardware, could the board maintainers help me
identify u-boot specific property differences with Linux that need to be
moved to a dtsi file.

Will send a new serie with fixes.

Johan

===

After I sync rk3288.dtsi I get this warning.
fdt64_t is generated by a script and is not something that I can update
the regmap_init_mem_plat function for.
Any advice here?

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make chromebook_jerry_defconfig

   CC  spl/drivers/ram/rockchip/sdram_rk3288.o
drivers/ram/rockchip/sdram_rk3288.c: In function ‘conv_of_plat’:
drivers/ram/rockchip/sdram_rk3288.c:1032:41: warning: passing argument 2
of ‘regmap_init_mem_plat’ from incompatible pointer type
[-Wincompatible-pointer-types]
  ret = regmap_init_mem_plat(dev, of_plat->reg,
  ~~~^
In file included from drivers/ram/rockchip/sdram_rk3288.c:18:
include/regmap.h:391:58: note: expected ‘fdt_val_t *’ {aka ‘unsigned int
*’} but argument is of type ‘fdt64_t *’ {aka ‘long long unsigned int *’}
 int regmap_init_mem_plat(struct udevice *dev, fdt_val_t *reg, int count,


On 3/3/22 04:37, Simon Glass wrote:
> Hi Johan,
> 
> On Mon, 28 Feb 2022 at 18:48, Johan Jonker  wrote:
>>
>> The DT node name pattern in mmc-controller.yaml for mmc
>> is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced
>> with Linux, so update the boot_devices constants as well.
>>
>> Signed-off-by: Johan Jonker 
>> Reviewed-by: Simon Glass 
>> ---
>>  arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
>>  arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
>>  arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
>>  arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
>>  arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
>>  5 files changed, 10 insertions(+), 10 deletions(-)
> 

> I tested this series on snow and it seems fine.
> 
> I tried it on jerry and got:
> 
> DRAM init failed: -19

noc: syscon@ffac {
compatible = "rockchip,rk3288-noc", "syscon";
reg = <0x0 0xffac 0x0 0x2000>;

Forgot something. Does that help or is there more that needs to be fixed?

==> u-boot,dm-pre-reloc;

};

TODO: Must change/update dmc/noc reg size when I sync rk3288.dtsi.

> 
> It also seemed fine on bob although my display is not coming up, for
> different reasons.

In SPL or full U-boot?

rk3288-veyron-chromebook.dtsi:

aliases {
i2c20 = _tunnel;
video0 = 
video1 = 
};

Is this video alias something U-boot specific?
Fixing U-boot video is beyond my U-boot knowledge.

> 
> Regards
> 
> Simon


Re: [PATCH v2 12/12] rockchip: fix boot_devices constants

2022-03-02 Thread Simon Glass
Hi Johan,

On Mon, 28 Feb 2022 at 18:48, Johan Jonker  wrote:
>
> The DT node name pattern in mmc-controller.yaml for mmc
> is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced
> with Linux, so update the boot_devices constants as well.
>
> Signed-off-by: Johan Jonker 
> Reviewed-by: Simon Glass 
> ---
>  arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
>  arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
>  arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
>  arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
>  arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
>  5 files changed, 10 insertions(+), 10 deletions(-)

I tested this series on snow and it seems fine.

I tried it on jerry and got:

DRAM init failed: -19

It also seemed fine on bob although my display is not coming up, for
different reasons.

Regards

Simon


[PATCH v2 12/12] rockchip: fix boot_devices constants

2022-02-28 Thread Johan Jonker
The DT node name pattern in mmc-controller.yaml for mmc
is "^mmc(@.*)?$". The Rockchip mmc nodes have been synced
with Linux, so update the boot_devices constants as well.

Signed-off-by: Johan Jonker 
Reviewed-by: Simon Glass 
---
 arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
 arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
 arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
 arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
 arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c 
b/arch/arm/mach-rockchip/rk3188/rk3188.c
index 5a02914e..df8fa156 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -21,8 +21,8 @@
 #define GRF_BASE   0x20008000
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@1021c000",
-   [BROM_BOOTSOURCE_SD] = "/dwmmc@10214000",
+   [BROM_BOOTSOURCE_EMMC] = "/mmc@1021c000",
+   [BROM_BOOTSOURCE_SD] = "/mmc@10214000",
 };
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c 
b/arch/arm/mach-rockchip/rk322x/rk322x.c
index ad4ac62e..a304795f 100644
--- a/arch/arm/mach-rockchip/rk322x/rk322x.c
+++ b/arch/arm/mach-rockchip/rk322x/rk322x.c
@@ -9,8 +9,8 @@
 #include 
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@3002",
-   [BROM_BOOTSOURCE_SD] = "/dwmmc@3000",
+   [BROM_BOOTSOURCE_EMMC] = "/mmc@3002",
+   [BROM_BOOTSOURCE_SD] = "/mmc@3000",
 };
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c 
b/arch/arm/mach-rockchip/rk3288/rk3288.c
index bc20bc5a..3ad28875 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -28,8 +28,8 @@ DECLARE_GLOBAL_DATA_PTR;
 #define GRF_BASE   0xff77
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f",
-   [BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c",
+   [BROM_BOOTSOURCE_EMMC] = "/mmc@ff0f",
+   [BROM_BOOTSOURCE_SD] = "/mmc@ff0c",
 };
 
 #ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c 
b/arch/arm/mach-rockchip/rk3328/rk3328.c
index ec3336cb..de17b886 100644
--- a/arch/arm/mach-rockchip/rk3328/rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
@@ -21,8 +21,8 @@ DECLARE_GLOBAL_DATA_PTR;
 #define FW_DDR_CON_REG 0xFF7C0040
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "/rksdmmc@ff52",
-   [BROM_BOOTSOURCE_SD] = "/rksdmmc@ff50",
+   [BROM_BOOTSOURCE_EMMC] = "/mmc@ff52",
+   [BROM_BOOTSOURCE_SD] = "/mmc@ff50",
 };
 
 static struct mm_region rk3328_mem_map[] = {
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c 
b/arch/arm/mach-rockchip/rk3368/rk3368.c
index 9b7132d4..d0a6107e 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -58,8 +58,8 @@ static struct mm_region rk3368_mem_map[] = {
 struct mm_region *mem_map = rk3368_mem_map;
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f",
-   [BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c",
+   [BROM_BOOTSOURCE_EMMC] = "/mmc@ff0f",
+   [BROM_BOOTSOURCE_SD] = "/mmc@ff0c",
 };
 
 #ifdef CONFIG_ARCH_EARLY_INIT_R
-- 
2.20.1