Closed argrento closed 1 year ago
The default baud rate of RK3566 is 1500000.
Omg, for some reason I missed that. At 1500000 I can see output. But Linux does not boot.
=> DDR Version V1.11 20211103
ln
ddrconfig:0
LP4 MR14:0x4d
LPDDR4, 324MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
tdqss: cs0 dqs0: 458ps, dqs1: 361ps, dqs2: 385ps, dqs3: 289ps,
change to: 324MHz
PHY drv:clk:38,ca:38,DQ:30,odt:0
vrefinner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
change to: 528MHz
PHY drv:clk:38,ca:38,DQ:30,odt:0
vrefinner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x72
change to: 780MHz
PHY drv:clk:38,ca:38,DQ:30,odt:0
vrefinner:41%, vrefout:41%
dram drv:40,odt:0
clk skew:0x58
change to: 1560MHz(final freq)
PHY drv:clk:38,ca:38,DQ:30,odt:60
vrefinner:16%, vrefout:29%
dram drv:40,odt:80
vref_ca:00000068
clk skew:0x12
cs 0:
the read training result:
DQS0:0x3d, DQS1:0x3a, DQS2:0x41, DQS3:0x3a,
min :0x13 0x16 0x17 0x12 0x3 0x6 0xa 0x4 , 0xa 0xc 0x9 0x5 0xd 0x9 0x11 0x7 ,
0x1d 0x19 0x17 0x10 0x6 0x2 0x8 0x7 ,0x14 0xe 0xc 0x3 0x15 0x14 0x12 0x14 ,
mid :0x31 0x32 0x34 0x30 0x22 0x25 0x28 0x23 ,0x29 0x2b 0x27 0x24 0x2b 0x29 0x2d 0x26 ,
0x39 0x37 0x32 0x2e 0x25 0x20 0x25 0x25 ,0x30 0x2b 0x29 0x22 0x32 0x32 0x2f 0x32 ,
max :0x4f 0x4f 0x52 0x4e 0x42 0x45 0x47 0x43 ,0x49 0x4a 0x46 0x44 0x49 0x49 0x49 0x46 ,
0x56 0x56 0x4d 0x4c 0x44 0x3f 0x43 0x44 ,0x4c 0x48 0x47 0x42 0x4f 0x50 0x4c 0x50 ,
range:0x3c 0x39 0x3b 0x3c 0x3f 0x3f 0x3d 0x3f ,0x3f 0x3e 0x3d 0x3f 0x3c 0x40 0x38 0x3f ,
0x39 0x3d 0x36 0x3c 0x3e 0x3d 0x3b 0x3d ,0x38 0x3a 0x3b 0x3f 0x3a 0x3c 0x3a 0x3c ,
the write training result:
DQS0:0x6d, DQS1:0x5a, DQS2:0x5e, DQS3:0x4b,
min :0xb1 0xb5 0xb9 0xb6 0xa5 0xa7 0xab 0xab 0xab ,0x97 0x9c 0x97 0x99 0x9d 0x9f 0x9f 0x9d 0x98 ,
0xa7 0xa6 0xa2 0xa2 0x97 0x95 0x97 0x9d 0x9d ,0x95 0x94 0x90 0x8b 0x99 0x99 0x94 0x9c 0x93 ,
mid :0xcc 0xcf 0xd2 0xcf 0xbd 0xc0 0xc5 0xc3 0xc3 ,0xb0 0xb2 0xaf 0xb0 0xb4 0xb4 0xb4 0xb3 0xae ,
0xc1 0xbf 0xb9 0xb9 0xb0 0xac 0xaf 0xb3 0xb4 ,0xaf 0xab 0xa9 0xa3 0xb1 0xb1 0xad 0xb4 0xab ,
max :0xe7 0xe9 0xec 0xe9 0xd6 0xda 0xdf 0xdb 0xdc ,0xca 0xc9 0xc8 0xc7 0xcc 0xc9 0xc9 0xc9 0xc4 ,
0xdb 0xd9 0xd1 0xd1 0xc9 0xc3 0xc7 0xc9 0xcc ,0xc9 0xc3 0xc3 0xbc 0xca 0xca 0xc6 0xcc 0xc4 ,
range:0x36 0x34 0x33 0x33 0x31 0x33 0x34 0x30 0x31 ,0x33 0x2d 0x31 0x2e 0x2f 0x2a 0x2a 0x2c 0x2c ,
0x34 0x33 0x2f 0x2f 0x32 0x2e 0x30 0x2c 0x2f ,0x34 0x2f 0x33 0x31 0x31 0x31 0x32 0x30 0x31 ,
CA Training result:
cs:0 min :0x4b 0x40 0x40 0x36 0x41 0x38 0x40 ,0x4b 0x3c 0x40 0x39 0x40 0x2e 0x3d ,
cs:0 mid :0x83 0x82 0x75 0x76 0x75 0x77 0x6a ,0x80 0x7d 0x74 0x75 0x73 0x6e 0x69 ,
cs:0 max :0xbb 0xc4 0xab 0xb7 0xaa 0xb6 0x94 ,0xb6 0xbf 0xa8 0xb1 0xa6 0xae 0x95 ,
cs:0 range:0x70 0x84 0x6b 0x81 0x69 0x7e 0x54 ,0x6b 0x83 0x68 0x78 0x66 0x80 0x58 ,
out
U-Boot SPL board init
U-Boot SPL 2017.09-gaaca6ffec1-211203 #zzz (Dec 03 2021 - 18:42:16)
unknown raw ID phN
unrecognized JEDEC id bytes: 00, 00, 00
Trying to boot from MMC2
MMC error: The cmd index is 1, ret is -110
Card did not respond to voltage select!
mmc_init: -95, time 9
spl: mmc init failed with error: -95
Trying to boot from MMC1
No misc partition
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(fe4f274c06...) + OK
## Checking uboot 0x00a00000 ... sha256(4bd19ecd0b...) + OK
## Checking fdt 0x00b43a18 ... sha256(036cca5880...) + OK
## Checking atf-2 0x00068000 ... sha256(8d44036095...) + OK
## Checking atf-3 0xfdcd0000 ... sha256(e410275b51...) + OK
## Checking atf-4 0xfdcc9000 ... sha256(990c53fc01...) + OK
## Checking atf-5 0x00066000 ... sha256(315a4195a9...) + OK
## Checking optee 0x08400000 ... sha256(f3f0302d4c...) + OK
Jumping to U-Boot(0x00a00000) via ARM Trusted Firmware(0x00040000)
Total: 277.423 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-181-gc9a647cae:cl
NOTICE: BL31: Built : 10:55:41, Oct 18 2021
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: pmu v1 is valid
INFO: dfs DDR fsp_param[0].freq_mhz= 1560MHz
INFO: dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO: dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO: dfs DDR fsp_param[3].freq_mhz= 780MHz
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
I/TC:
I/TC: OP-TEE version: 3.13.0-619-g48b7c13e2 #hisping.lin (gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16))) #7 Thu Jan 6 17:13:25 CST 2022 aarch64
I/TC: Primary CPU initializing
I/TC: Primary CPU switching to normal world boot
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0xa00000
INFO: SPSR = 0x3c9
U-Boot 2017.09 (Apr 03 2023 - 06:43:01 +0000)
Model: Rockchip RK3568 Evaluation Board
PreSerial: 2, raw, 0xfe660000
DRAM: 2 GiB
Sysmem: init
Relocation Offset: 7d21c000
Relocation fdt: 7b9f86e8 - 7b9fecd0
CR: M/C/I
Using default environment
DM: v1
dwmmc@fe2b0000: 1, dwmmc@fe2c0000: 2, sdhci@fe310000: 0
Bootdev(atags): mmc 0
MMC0: HS200, 200Mhz
PartType: EFI
No misc partition
boot mode: None
ces... oller
USB XHCI 1Failed to load DTB, ret=-19
No valid DTB, ret=-22
Failed to get kernel dtb, ret=-22
io-domain: OK
Failed to get scmi clk dev
dmc_fsp failed, ret=-19
Model: Rockchip RK3568 Evaluation Board
rockchip_set_serialno: could not find efuse/otp device
CLK:ces... cannot reset port 1!?
1 USB Device(s) found
scanning bus dwc3@fd000000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rockchip
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.
=>
Failed to load DTB, ret=-19 No valid DTB, ret=-22
maybe try to revert: https://github.com/JeffyCN/meta-rockchip/commit/dcdacdc1ab42cb3b0738be548c00d6d66f821c9f
or check the local conf has: https://github.com/JeffyCN/yocto-conf/commit/53a3ecd9481c3ec18c56e515fee04121b8ac39a8
if still not working, maybe try to upload your .wic image somewhere then i will check it
….. U-Boot 2017.09 (Apr 03 2023 - 06:43:01 +0000)
Model: Rockchip RK3568 Evaluation Board PreSerial: 2, raw, 0xfe660000 …..
Did you compile for RK3568?
Did you compile for RK3568?
No, in my config i have MACHINE ??= "rockchip-rk3566-evb"
maybe try to revert:
That helped, thanks! Now kernel boots, but stuck in bootloop.
so you are using evb's kernel and dts on a custom board?
normally the kernel(including code/defconfig/dts) should match the physic board... please check the readme of meta-rockchip to use a custom kernel
so you are using evb's kernel and dts on a custom board?
I hoped that will work to have a good starting point. Bootloop is pretty ok for me.
use a custom kernel
I contacted the board manufacturer and asked if they can provide sources. No answer yet.
Luckily I was able to find all sources and device trees. Luckfox provides them: https://wiki.luckfox.com/Core3566/Core3566-SDK/ The download link: https://drive.google.com/drive/folders/1HCNYaVqQMv0vGc4630fmHkq2Eldi9Y2z?usp=sharing
Now I need somehow to figure out what to take from Luckfox and where to put it.
I managed to solve this. I took dts files from the Luckfox and created bbappend for linux kernel. Now Core3566 boots normally.
But wifi does not work. On board there is an AP6256. So in my layer I created rkwifibt-firmware.bbappend:
PACKAGES =+ " \
${PN}-ap6256-wifi \
${PN}-ap6256-bt \
"
FILES:${PN}-ap6256-wifi = " \
lib/firmware/fw_bcm43456c5_ag.bin \
lib/firmware/fw_bcm43456c5_ag_mfg.bin \
lib/firmware/nvram_ap6256.txt \
"
FILES:${PN}-ap6256-bt = " \
lib/firmware/BCM43430B0.hcd \
"
And this is my machine config:
#@TYPE: Machine
#@NAME: Core3566
require conf/machine/include/rk356x.inc
KERNEL_DEVICETREE = "rockchip/core3566-hdmi-lp4x-v1-linux.dtb"
UBOOT_MACHINE = "rk3568_defconfig"
RK_WIFIBT_FIRMWARES = " \
rkwifibt-firmware-ap6256-wifi11 \
rkwifibt-firmware-ap6256-bt11 \
brcm-tools \
"
MACHINE_EXTRA_RRECOMMENDS:append = " \
drm-cursor \
"
MACHINE_FEATURES:append = " \
wifi \
bluetooth \
"
Some logs:
root@core3566-luckfox:~# dmesg | grep wlan
[ 0.411760] usbcore: registered new interface driver rndis_wlan
[ 0.535883] [WLAN_RFKILL]: Enter rfkill_wlan_init
[ 0.536414] [WLAN_RFKILL]: Enter rfkill_wlan_probe
[ 0.536470] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi_chip_type = ap6256
[ 0.536486] [WLAN_RFKILL]: wlan_platdata_parse_dt: enable wifi power control.
[ 0.536499] [WLAN_RFKILL]: wlan_platdata_parse_dt: wifi power controled by gpio.
[ 0.536540] [WLAN_RFKILL]: wlan_platdata_parse_dt: WIFI,host_wake_irq = 74, flags = 0.
[ 0.536559] [WLAN_RFKILL]: wlan_platdata_parse_dt: The ref_wifi_clk not found !
[ 0.536571] [WLAN_RFKILL]: rfkill_wlan_probe: init gpio
[ 0.536623] [WLAN_RFKILL]: Exit rfkill_wlan_probe
root@core3566-luckfox:~# dmesg | grep bt
[ 0.431414] usbcore: registered new interface driver usbtouchscreen
[ 0.477892] usbcore: registered new interface driver btusb
[ 0.536585] [WLAN_RFKILL]: rfkill_set_wifi_bt_power: 1
[ 0.537394] [BT_RFKILL]: Request irq for bt wakeup host
[ 0.537616] [BT_RFKILL]: bt_default device registered.
root@core3566-luckfox:~# rfkill list all
0: bt_default: Bluetooth
Soft blocked: yes
Hard blocked: no
Not sure what's wrong there/
the firmware is at here: https://github.com/JeffyCN/mirrors/tree/rkwifibt/firmware/broadcom/AP6256
and on rockchip bsp kernel, the wifibt driver should be built into module(.ko) from: https://github.com/JeffyCN/mirrors/tree/rkwifibt/drivers
normally the wifi should be enabled after insmod, but bt needs extra tools to download firmwares
Hi, I am trying to build a os image for this board (https://wiki.luckfox.com/cn/Core3566/Core3566-quick-start/). I use rk3566-evb as starting point. I build core-image-minimal and flashed it with 'upgrade_tool wl 0 core-image-minimal-rockchip-rk3566-evb.wic' It seems that board is booting as I see output in uart. But seems that something is wrong, because it's garbage.
Output sample:
In board config it is 115200, in my serial app it is 115200 too. Maybe something is different (cpu quartz for example). Could you please help me finding out what's the problem?