I am trying to upgrade a yocto build to scarthgap. On kirkstone everything worked fine and we got a bootable image. While doing so, I struggle with u-boot. Already had to use 2023.07.02, because the default 2024.10 has removed the RK3399 from the Makefile. I may to address this later, since we would like to be up to date with the recent changes. Any way.
When trying to boot with 2023.07.02, I get the following debug output.
U-Boot TPL 2023.07.02 (Oct 24 2024 - 14:13:42)
ofnode_read_prop: assigned-clock-rates: <not found>
bind node aliases
Device 'aliases' has no compatible string
bind node mmc@fe320000
- attempt to match compatible string 'rockchip,rk3399-dw-mshc'
- attempt to match compatible string 'rockchip,rk3288-dw-mshc'
No match for node 'mmc@fe320000'
bind node mmc@fe330000
- attempt to match compatible string 'rockchip,rk3399-sdhci-5.1'
- attempt to match compatible string 'arasan,sdhci-5.1'
No match for node 'mmc@fe330000'
bind node serial@ff180000
- attempt to match compatible string 'rockchip,rk3399-uart'
- attempt to match compatible string 'snps,dw-apb-uart'
- found match at 'ns16550_serial': 'ns16550' matches 'snps,dw-apb-uart'
bind node serial@ff1a0000
- attempt to match compatible string 'rockchip,rk3399-uart'
- attempt to match compatible string 'snps,dw-apb-uart'
- found match at 'ns16550_serial': 'ns16550' matches 'snps,dw-apb-uart'
bind node power-management@ff310000
- attempt to match compatible string 'rockchip,rk3399-pmu'
- found match at 'rk3399_syscon': 'rockchip,rk3399-grf' matches 'rockchip,rk3399-pmu'
bind node syscon@ff320000
- attempt to match compatible string 'rockchip,rk3399-pmugrf'
- found match at 'rk3399_syscon': 'rockchip,rk3399-grf' matches 'rockchip,rk3399-pmugrf'
bind node pmu-clock-controller@ff750000
- attempt to match compatible string 'rockchip,rk3399-pmucru'
- found match at 'rockchip_rk3399_pmucru': 'rockchip,rk3399-pmucru' matches 'rockchip,rk3399-pmucru'
bind node clock-controller@ff760000
- attempt to match compatible string 'rockchip,rk3399-cru'
- found match at 'rockchip_rk3399_cru': 'rockchip,rk3399-cru' matches 'rockchip,rk3399-cru'
bind node syscon@ff770000
- attempt to match compatible string 'rockchip,rk3399-grf'
- found match at 'rk3399_syscon': 'rockchip,rk3399-grf' matches 'rockchip,rk3399-grf'
bind node phy@f780
- attempt to match compatible string 'rockchip,rk3399-emmc-phy'
No match for node 'phy@f780'
bind node vop@ff8f0000
- attempt to match compatible string 'rockchip,rk3399-vop-lit'
No match for node 'vop@ff8f0000'
bind node vop@ff900000
- attempt to match compatible string 'rockchip,rk3399-vop-big'
No match for node 'vop@ff900000'
bind node pinctrl
- attempt to match compatible string 'rockchip,rk3399-pinctrl'
No match for node 'pinctrl'
bind node chosen
Device 'chosen' has no compatible string
bind node syscon@ff620000
- attempt to match compatible string 'rockchip,rk3399-cic'
- found match at 'rk3399_syscon': 'rockchip,rk3399-grf' matches 'rockchip,rk3399-cic'
bind node dfi@ff630000
- attempt to match compatible string 'rockchip,rk3399-dfi'
No match for node 'dfi@ff630000'
bind node dmc
- attempt to match compatible string 'rockchip,rk3399-dmc'
- found match at 'rockchip_rk3399_dmc': 'rockchip,rk3399-dmc' matches 'rockchip,rk3399-dmc'
bind node syscon@ff330000
- attempt to match compatible string 'rockchip,rk3399-pmusgrf'
- found match at 'rk3399_syscon': 'rockchip,rk3399-grf' matches 'rockchip,rk3399-pmusgrf'
ofnode_read_u32_array: rockchip,sdram-params: ofnode_read_prop: reg: ofnode_read_bool: little-endian: false
ofnode_read_bool: big-endian: false
ofnode_read_bool: native-endian: false
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: reg: ofnode_read_bool: little-endian: false
ofnode_read_bool: big-endian: false
ofnode_read_bool: native-endian: false
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: reg: ofnode_read_bool: little-endian: false
ofnode_read_bool: big-endian: false
ofnode_read_bool: native-endian: false
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: reg: ofnode_read_bool: little-endian: false
ofnode_read_bool: big-endian: false
ofnode_read_bool: native-endian: false
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: reg: ofnode_read_bool: little-endian: false
ofnode_read_bool: big-endian: false
ofnode_read_bool: native-endian: false
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: reg: ofnode_read_bool: little-endian: false
ofnode_read_bool: big-endian: false
ofnode_read_bool: native-endian: false
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: assigned-clock-rates: <not found>
ofnode_read_prop: assigned-clock-rates: <not found>
Looking for clock-controller@ff760000
Looking for clock-controller@ff760000
- result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
- result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
One theory of mine is that somehow the normal device tree ends up in TPL, not the stripped down (flattened) version.
The defconfig contains CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
after all.
I just don't really understand how. Maybe I am also just dead wrong.
Found the solution to this issue. There is some weirdness in the RK3399 and how it handles LDDR4 while booting TPL.
In order to fix it, you have to set CONFIG_RAM_ROCKCHIP_LPDDR4=y
.
This variable is used in order to use a different initialization schedule than it would typically be.