Jump to content

JianPian RK3566 TV Box (8G+32G) develop log


Recommended Posts

Posted

1, serial port:

 

open the box, on the backside, there are 3 hole, which is serail port, from right to left, they are TX, GND, RX, serial config is 150000n8.

 

first log:

 

Quote

DDR V1.14 b1f29a2a6f typ 22/09/02-16:40:04
ln
ddrconfig:7
LPDDR4X, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=8192MB
tdqss: cs0 dqs0: 72ps, dqs1: -96ps, dqs2: -72ps, dqs3: -144ps,
tdqss: cs1 dqs0: 48ps, dqs1: -96ps, dqs2: -48ps, dqs3: -144ps,

change to: 324MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x61

change to: 528MHz
PHY drv:clk:36,ca:36,DQ:29,odt:0
vrefinner:24%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58

we know the memory is 8GB Lp4x. Ddr version is V1.14.  freq=324Mhz? which is from rkbin repo.

 

Quote

Net:   eth1: ethernet@fe010000
Hit key to stop autoboot('CTRL+C'):  0
ANDROID: reboot reason: "(none)"

next step try to use ctrl+c to stop auto boot.

Posted

I quess this is an android boot so the kernel is 4.19 and ddr frequency is stored in DTB file. So don't care about freq. With kernel 5.x the frequency is given by the bootloader and then you must pay atention.

Posted

Yes, it's Android 4.19. do you mean, using mainline kernel it will lose dynamic memory freq change cap, to run at a fixed freq?

 

I would like to run kernel 6.6 on debian sid. 

Posted

2, interrupt auto boot

 

Yes, by Ctrl+C

 

env print result:

Quote

arch=arm
autoload=no
baudrate=1500000
board=evb_rk3568
board_name=evb_rk3568
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc1 mmc0 mtd2 mtd1 mtd0 usb0 pxe dhcp
bootargs=storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal  androidboot.dtb_idx=0 androidboot.dtbo_idx=0
bootcmd=boot_android ${devtype} ${devnum};boot_fit;bootrkp;run distro_bootcmd;
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_mtd0=setenv devnum 0; run mtd_boot
bootcmd_mtd1=setenv devnum 1; run mtd_boot
bootcmd_mtd2=setenv devnum 2; run mtd_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=0
cpu=armv8
devnum=0
devtype=mmc
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
eth1addr=2e:7c:75:70:80:17
ethaddr=2a:7c:75:70:80:17
fdt_addr_r=0x08300000
kernel_addr_c=0x04080000

kernel_addr_r=0x00280000
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
partitions=uuid_disk=${uuid_gpt_disk};name=uboot,start=8MB,size=4MB,uuid=${uuid_gpt_loader2};name=trust,size=4M,uuid=${uuid_gpt_atf};name=misc,size=4MB,uuid=${uuid_gpt_misc};name=resource,size=16MB,uuid=${uuid_gpt_resource};name=kernel,size=32M,uuid=${uuid_gpt_kernel};name=boot,size=32M,bootable,uuid=${uuid_gpt_boot};name=recovery,size=32M,uuid=${uuid_gpt_recovery};name=backup,size=112M,uuid=${uuid_gpt_backup};name=cache,size=512M,uuid=${uuid_gpt_cache};name=system,size=2048M,uuid=${uuid_gpt_system};name=metadata,size=16M,uuid=${uuid_gpt_metadata};name=vendor,size=32M,uuid=${uuid_gpt_vendor};name=oem,size=32M,uuid=${uuid_gpt_oem};name=frp,size=512K,uuid=${uuid_gpt_frp};name=security,size=2M,uuid=${uuid_gpt_security};name=userdata,size=-,uuid=${uuid_gpt_userdata};
pxefile_addr_r=0x00e00000
ramdisk_addr_r=0x0a200000
rkimg_bootdev=if mmc dev 1 && rkimgtest mmc 1; then setenv devtype mmc; setenv devnum 1; echo Boot from SDcard;elif mmc dev 0; then setenv devtype mmc; setenv devnum 0;elif mtd_blk dev 0; then setenv devtype mtd; setenv devnum 0;elif mtd_blk dev 1; then setenv devtype mtd; setenv devnum 1;elif mtd_blk dev 2; then setenv devtype mtd; setenv devnum 2;elif rknand dev 0; then setenv devtype rknand; setenv devnum 0;elif rksfc dev 0; then setenv devtype spinand; setenv devnum 0;elif rksfc dev 1; then setenv devtype spinor; setenv devnum 1;elsesetenv devtype ramdisk; setenv devnum 0;fi;
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x00c00000
serial#=0YL7OQGH52
soc=rockchip
stderr=serial,vidconsole
stdin=serial,usbkbd
stdout=serial,vidconsole

usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
vendor=rockchip

 

next step, try chainloader to mainline u-boot:2023.10 with patch.

Posted
11 minutes ago, ning said:

bootcmd=boot_android ${devtype} ${devnum};boot_fit;bootrkp;run distro_bootcmd;

this is entry point, need add 

setenv OLDBOOTCMD "boot_android ${devtype} ${devnum};boot_fit;bootrkp;run distro_bootcmd;"
setenv USBBOOTCMD "usb start;if fatload usb 0 0x1000000 u-boot.bin; then go 0x1000000; fi;"   <<-- TODO
setenv bootcmd "run USBBOOTCMD; run OLDBOOTCMD;"

 

to override current bootcmd. 

Posted
Quote

Lpddr4 starts DMC with 324mhz

Keep it on 528mhz until you kennel stabilize.

After kernel stable, test 1066mhz

 With ddr4 the best is 1506mhz

Posted
Quote

next step, try chainloader to mainline u-boot:2023.10 with patch.

You don't have to chainload, rk3566 is fully supported in mainline. You need a mainlined dts.

Posted

currently chainloader failed, it failed at a strange place.

 

I will move to next step try boot mainline kernel with vendor uboot. create a debian sid USB driver.

 

 

Posted

vendor uboot can boot mainline kenrel (6.5) 

sysboot usb 0 any 0x1080000 /boot/extlinux/extlinux.conf

 

but, no good dts, next step is find or develop a good dts

Posted

use rk3566-box-demo.dts

 

block at

Quote

[    3.651358] ohci-platform fd8c0000.usb: Generic Platform OHCI controller
[    3.651997] ohci-platform fd8c0000.usb: new USB bus registered, assigned bus number 2
[    3.653089] ohci-platform fd840000.usb: Generic Platform OHCI controller
[    3.653755] ohci-platform fd840000.usb: new USB bus registered, assigned bus number 3
[   24.010286] watchdog: Watchdog detected hard LOCKUP on cpu 1

I think issue in ohci-platform, let me blacklist it or disable related usb port in dts, and try next.

Posted

2 usb: 1 USB2.0, 1 USB3.0

 

do you mean, rk3566-box-demo.dts enabled usb port more than actual, this make hard LOCKUP?

Posted

aftr check dts dump, it only has 2 usb ports enabed.

 

        usb_host0_xhci: usb@fcc00000 {
                compatible = "rockchip,rk3568-dwc3", "snps,dwc3";
                reg = <0x0 0xfcc00000 0x0 0x400000>;
                interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&cru CLK_USB3OTG0_REF>, <&cru CLK_USB3OTG0_SUSPEND>,
                         <&cru ACLK_USB3OTG0>;
                clock-names = "ref_clk", "suspend_clk",
                              "bus_clk";
                dr_mode = "otg";
                phy_type = "utmi_wide";
                power-domains = <&power RK3568_PD_PIPE>;
                resets = <&cru SRST_USB3OTG0>;
                snps,dis_u2_susphy_quirk;
                status = "disabled";
        };

        usb_host1_xhci: usb@fd000000 {
                compatible = "rockchip,rk3568-dwc3", "snps,dwc3";
                reg = <0x0 0xfd000000 0x0 0x400000>;
                interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&cru CLK_USB3OTG1_REF>, <&cru CLK_USB3OTG1_SUSPEND>,
                         <&cru ACLK_USB3OTG1>;
                clock-names = "ref_clk", "suspend_clk",
                              "bus_clk";
                dr_mode = "host";
                phys = <&usb2phy0_host>, <&combphy1 PHY_TYPE_USB3>;
                phy-names = "usb2-phy", "usb3-phy";
                phy_type = "utmi_wide";
                power-domains = <&power RK3568_PD_PIPE>;
                resets = <&cru SRST_USB3OTG1>;
                snps,dis_u2_susphy_quirk;
                status = "disabled";
        };

let me disable others.

Posted (edited)
1 hour ago, ning said:

let me disable others.

 

# if the USB has Mipi CSi, let it disable forever :lol: dont touch it anymore.

 

status = "disabled";


mipi CSI usb is linked to the GPU and get disabled when you build server images.
and you will enable it when you use desktop images.  :wacko:

Edited by hotnikq
Posted
Quote

&usb2phy0_otg {
        phy-supply = <&vcc5v0_usb2_otg>;
        status = "okay";
};

&usb2phy0 {
        status = "okay";
};

&usb2phy0_host {
        phy-supply = <&vcc5v0_usb_host>;
        status = "okay";
};

&combphy1 {
        status = "okay";
};


&usb_host0_xhci {
        dr_mode = "host";
        status = "okay";
};

&usb_host1_xhci {
        status = "okay";
};

remove all usb related setting in rk3566-box-demo.dts, add above. success boot to shell.

 

next step verify others:

1, HDMI

2, HDMI sound

3, ethernet

4, WIFI/BT

5, SATA

6, LED??

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines