[PATCH] rockchip: dts: rk3328: fix sdram params
Vagrant Cascadian
vagrant at debian.org
Wed Feb 22 22:42:44 CET 2023
On 2023-02-10, Jonas Karlman wrote:
> The rk3328 sdram driver read sdram parameters from the devicetree into a
> struct rk3328_sdram_params using dev_read_u32_array.
>
> After commit 5ab30c3176bf ("ram: rockchip: Update ddr pctl regs for px30")
> changed the size of struct ddr_pctl_regs, a member of struct
> rk3328_sdram_params, U-Boot TPL can no longer initialize DRAM on RK3328.
>
> Add ten u32 to the sdram parameter array in devicetree to align with
> this size change. This fixes DRAM initialization on RK3328.
>
> Fixes: 5ab30c3176bf ("ram: rockchip: Update ddr pctl regs for px30")
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
> Reviewed-by: Jagan Teki <jagan at amarulasolutions.com>
> Tested-by: Jagan Teki <jagan at amarulasolutions.com> # roc-rk3328-cc
Thanks! This allows booting the rock64-rk3328 with v2023.04-rc2, which
otherwise just hangs after loading TPL (or SPL?).
Tested-by: Vagrant Cascadian <vagrant at debian.org>
> ---
> arch/arm/dts/rk3328-sdram-ddr3-666.dtsi | 10 ++++++++++
> arch/arm/dts/rk3328-sdram-ddr4-666.dtsi | 10 ++++++++++
> arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi | 10 ++++++++++
> arch/arm/dts/rk3328-sdram-lpddr3-666.dtsi | 10 ++++++++++
> 4 files changed, 40 insertions(+)
>
> diff --git a/arch/arm/dts/rk3328-sdram-ddr3-666.dtsi b/arch/arm/dts/rk3328-sdram-ddr3-666.dtsi
> index 3e88ed443ba0..c5acfe4ac2a0 100644
> --- a/arch/arm/dts/rk3328-sdram-ddr3-666.dtsi
> +++ b/arch/arm/dts/rk3328-sdram-ddr3-666.dtsi
> @@ -92,6 +92,16 @@
> 0xffffffff
> 0xffffffff
> 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
>
> 0x00000004
> 0x0000000a
> diff --git a/arch/arm/dts/rk3328-sdram-ddr4-666.dtsi b/arch/arm/dts/rk3328-sdram-ddr4-666.dtsi
> index 0859649a6905..c5fa2903c5c1 100644
> --- a/arch/arm/dts/rk3328-sdram-ddr4-666.dtsi
> +++ b/arch/arm/dts/rk3328-sdram-ddr4-666.dtsi
> @@ -89,6 +89,16 @@
> 0xffffffff
> 0xffffffff
> 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
>
> 0x00000004
> 0x0000000c
> diff --git a/arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi b/arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi
> index d63c761a0283..07f27b2b7bab 100644
> --- a/arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi
> +++ b/arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi
> @@ -92,6 +92,16 @@
> 0xffffffff
> 0xffffffff
> 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
>
> 0x00000004
> 0x0000000b
> diff --git a/arch/arm/dts/rk3328-sdram-lpddr3-666.dtsi b/arch/arm/dts/rk3328-sdram-lpddr3-666.dtsi
> index df42bb29ce88..d53d3a0fdfb2 100644
> --- a/arch/arm/dts/rk3328-sdram-lpddr3-666.dtsi
> +++ b/arch/arm/dts/rk3328-sdram-lpddr3-666.dtsi
> @@ -92,6 +92,16 @@
> 0xffffffff
> 0xffffffff
> 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
> + 0xffffffff
>
> 0x00000004
> 0x0000000b
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230222/b499725d/attachment.sig>
More information about the U-Boot
mailing list