Firefly开源社区

12
发表新贴

请教求助: rk3288 + rk818 无法正常启动

338

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
338
发表于 2016-11-2 17:25:29     
各位好!

用RK3288 做了一个板子, PMIC用的是 RK818;
用的系统是android5.1的,内核中的dst文件开始时是没有添加rk818的相关的; 我参考其它的dts文件,添加了对rk818的支持;

这样改动后,把各个映像烧写进去,uboot启动能够识别到rk818,内核启动也能识别到rk818;
但是遇到了问题,就是系统只能进入到recovery模式,每次重启后,uboot引导内核,然后内核也是调到recovery模式下,无法正常进入系统。

以下是启动时uboot的打印:
U-Boot 2014.10-RK3288-10-g791753e-dirty (Oct 16 2016 - 16:37:12)

CPU: rk3288
cpu version = 0
CPU's clock information:
    arm pll = 600000000HZ
    periph pll = 297000000HZ
    ddr pll = 200000000HZ
    codec pll = 384000000HZ
Board:  Rockchip platform Board
DRAM:  Found dram banks: 1
Adding bank:0000000000000000(0000000100000000)
128 MiB
GIC CPU mask = 0x00000001
SdmmcInit = 0 400
SdmmcInit = 2 0
storage init OK!
Using default environment

GetParam
Load FDT from resource image.
power key: bank-0 pin-5
battery: gl=100 dl=100 rl=100, v=4400, m=0
pmic:rk818
DCDC vdd_logic has been used, pwm regulator not init it.
Can't find dts node for fuel guage cw201x
SecureBootEn = 0, SecureBootLock = 0

#Boot ver: 2016-10-16#2.30
empty serial no.
checkKey
vbus = 1
read logo on state from dts [1]
can't find power_ctr node for lcdc0
pll_src = 1, dclk_hz = 148500000, dclk_div = 2
got recovery cmd from misc.
load fdt from resouce.
ERROR: [get_entry_ram]: Cannot find logo_kernel.bmp!
Secure Boot state: 0
kernel   @ 0x02000000 (0x006a32e0)
ramdisk  @ 0x05bf0000 (0x002c6788)
bootrk: do_bootm_linux...
   Loading Device Tree to 05600000, end 0561cb7c ... OK
Add bank:0000000000000000, 00000000fe000000

Starting kernel ...

它应该是识别到rk818的;


以下内核的打印:
[    0.000000] ion_reserve: cma reserved base d3c00000 size 671088640
[    0.000000] cma: CMA: reserved 16 MiB at 1f000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] Boot mode: RECOVERY (2) flag: RECOVER (0xc3524203)
[    0.000000] PERCPU: Embedded 9 pages/cpu @c2edd000 s13376 r8192 d15296 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1039360
[    0.000000] Kernel command line: vmalloc=496M console=ttyS2 androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyS2 init=/init  mtdparts=rk29xxnand:0x00002000@0x000000002

......

[    1.056473] act8846_i2c_probe,line=898
[    1.057913] act8846 set 0xf4 error!
[    1.057997] act8846: probe of 0-005a failed with error -11
[    1.062510] vdd_arm: 712 <--> 1500 mV at 1000 mV
[    1.063534] The device is not syr82x fffffff5
[    1.063552] syr82x: probe of 0-0041 failed with error -11
[    1.064004] rk808_i2c_probe,line=1355
[    1.065336] The device is not rk808 -11
[    1.065407] rk808: probe of 0-001b failed with error -11
[    1.065480] rk818_i2c_probe,line=1239
[    1.065730] rk818_pre_init,line=1154
[    1.075607] vdd_logic: 712 <--> 1500 mV at 1100 mV
[    1.080434] rk818_dcdc2: 1200 mV
[    1.084013] rk818_dcdc3: 1200 mV
[    1.087755] vccio: 1800 <--> 3300 mV at 3300 mV
[    1.091332] rk818_ldo1: 3300 mV
[    1.094892] rk818_ldo2: 3300 mV
[    1.098477] rk818_ldo3: 1000 mV
[    1.102056] rk818_ldo4: 1800 mV
[    1.105632] rk818_ldo5: 3300 mV
[    1.109189] rk818_ldo6: 1000 mV
[    1.112757] rk818_ldo7: 1800 mV
[    1.116318] rk818_ldo8: 1800 mV
[    1.118799] vcc_sd: 1800 <--> 3300 mV at 3300 mV
[    1.120016] rk818_ldo10: at 3300 mV
[    1.121568] rk818_irq_init: rk818_pmic_irq=1
[    1.121929] i2c-core: driver [rk818] using legacy suspend method
[    1.121942] i2c-core: driver [rk818] using legacy resume method
[    1.122421] rk818_rtc_probe,line=542
[    1.131680] rk818-rtc rk818-rtc: rtc core: registered rk818 as rtc0
[    1.133649] rk818_rtc_probe:ok
[    1.135047] Switching to clocksource arch_sys_counter
[    1.143701] rk_battery_charger_detect_cb , battery_charger_detect 1

然后后面启动到recovery模式的命令行。

1)我把这些我改动后,编译出来的所有映像,下载到firefly3288 reload 板子, reload板子能够正常启动到android系统中; 并不会像我的板子那样一直进入recovery模式;

2)我查看了内核的代码,它是会读取cpu的pmu相关的寄存器来决定是进入recovery模式,还是 normal模式的, 我想咨询下,哪些方面会影响这些寄存器的值呢?  是不是我rk818配置的哪组电压不对吗?

3)一直进入recovery模式,我做了排除,应该是和我板子的recovery按键没关的,在uboot启动时,如果不按recovery按键,它是不会进入升级状态的;

4)有哪个朋友,也是用rk3288 + rk818 做板子的吗? 若有,能否给一下建议,是不是我的哪里的改动不对?

谢谢!

回复

使用道具 举报

152

积分

0

威望

6

贡献

社区版主

Rank: 7Rank: 7Rank: 7

积分
152
发表于 2016-11-2 17:41:24     
got recovery cmd from misc.

这个是否没有清空 misc 分区所致?

回复

使用道具 举报

338

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
338
发表于 2016-11-2 17:57:00     
busybee 发表于 2016-11-2 17:41
这个是否没有清空 misc 分区所致?

怎么清空 misc分区呢?   我有把misc.img也烧写进去;
回复

使用道具 举报

152

积分

0

威望

6

贡献

社区版主

Rank: 7Rank: 7Rank: 7

积分
152
发表于 2016-11-3 09:50:03     
dd if=/dev/zero of=misc_zero.img bs=16k count=3
然后把这个 misc_zero.img 烧写到 misc 分区即可。具体见

http://developer.t-firefly.com/f ... amp;page=1#pid25653
回复

使用道具 举报

338

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
338
发表于 2016-11-3 12:43:34     
busybee 发表于 2016-11-3 09:50
dd if=/dev/zero of=misc_zero.img bs=16k count=3
然后把这个 misc_zero.img 烧写到 misc 分区即可。具体 ...

谢谢;
我根据你的建议,改动了misc映像升级进去;
板子现在不会进入recovery模式下了;但是启动后,死掉了,停在以下的地方:(每次重启,基本是停在同样的地方)
In
Channel a: DDR3 200MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
Channel b: DDR3 200MHz
Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
Memory OK
Memory OK
OUT


U-Boot 2014.10-RK3288-10 (Oct 28 2016 - 17:10:59)

CPU: rk3288
david debug cpu version = 0
CPU's clock information:
    arm pll = 600000000HZ
    periph pll = 297000000HZ
    ddr pll = 200000000HZ
    codec pll = 384000000HZ
Board:  Rockchip platform Board
DRAM:  Found dram banks: 1
Adding bank:0000000000000000(0000000100000000)
128 MiB
david debug board_init_r
david debug board_init
GIC CPU mask = 0x00000001
SdmmcInit = 0 400
SdmmcInit = 2 0
storage init OK!
david debug initr_env env_relocate
Using default environment

david debug board_late_init
david debug getenv: bootdelay = 3
GetParam
Load FDT from resource image.
power key: bank-0 pin-5
david debug pmic_init
david debug pmic_init bus0 rk818.
battery: gl=100 dl=100 rl=100, v=4400, m=0
pmic:rk818
david debug pwm_regulator_init
DCDC vdd_logic has been used, pwm regulator not init it.
david debug fg_init
Can't find dts node for fuel guage cw201x
SecureBootEn = 0, SecureBootLock = 0

#Boot ver: 2016-10-28#2.30
empty serial no.
david debug fbt preboot
checkKey
vbus = 1
read logo on state from dts [1]
can't find power_ctr node for lcdc0
pll_src = 1, dclk_hz = 148500000, dclk_div = 2
david debug run_main_loop
david debug main loop
david debug bootdelay process 3s
david debug main loop autoboot
david debug ### main_loop: bootcmd="bootrk"
Hit any key to stop autoboot:  0
load fdt from resouce.
ERROR: [get_entry_ram]: Cannot find logo_kernel.bmp!
Secure Boot state: 0
kernel   @ 0x02000000 (0x006a3348)
ramdisk  @ 0x05bf0000 (0x001460a0)
bootrk: do_bootm_linux...
   Loading Device Tree to 05600000, end 0561cb7c ... OK
Add bank:0000000000000000, 00000000fe000000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x500
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.0 (david@david) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #17 SMP PREEMPT Thu Nov 3 09:59:41 CST 2016
[    0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Rockchip RK3288 (Flattened Device Tree), model: rockchip,rk3288
[    0.000000] rockchip_uboot_logo_setup: mem: 0x02000000@0xfbc00000, offset:0x00000000
[    0.000000] rockchip_uboot_mem_reserve: reserve 0x02000000@0xfbc00000 for uboot logo
[    0.000000] rockchip_ion_reserve
[    0.000000] ion heap(drm): base(0) size(0) align(0)
[    0.000000] ion heap(cma): base(0) size(28000000) align(0)
[    0.000000] ion heap(vmalloc): base(0) size(0) align(0)
[    0.000000] cma: CMA: reserved 640 MiB at d3c00000
[    0.000000] ion_reserve: cma reserved base d3c00000 size 671088640
[    0.000000] cma: CMA: reserved 16 MiB at 1f000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] david debug rk3288_boot_mode_init mode: 00000000, flag: c3524200, rst_st: 00000000
[    0.000000] david debug rockchip_boot_mode_init mode: 00000000, flag: c3524200
[    0.000000] PERCPU: Embedded 9 pages/cpu @c2edd000 s13376 r8192 d15296 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1039360
[    0.000000] Kernel command line: vmalloc=496M console=ttyS2 androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyS2 init=/init  mtdparts=rk29xxnand:0x00002000@0x000020009
[    0.000000] battery charged in loader
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] allocated 8323072 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] Memory: 4064MB = 4064MB total
[    0.000000] Memory: 3398908k/3398908k available, 762628k reserved, 2949120K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmemp   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0bab710   (11918 kB)
[    0.000000]       .init : 0xc0bac000 - 0xc0c05440   ( 358 kB)
[    0.000000]       .data : 0xc0c06000 - 0xc0d98840   (1611 kB)
[    0.000000]        .bss : 0xc0d98840 - 0xc0eb9afc   (1157 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] rk_clk_tree_init start!
[    0.000000] rkclk: _rkclk_add_provider: fail to get ehci1phy_12m_div
[    0.000000] rkclk: rkclk_cache_parents: ehci1phy_12m_div clk_get error
[    0.000000] rk_get_uboot_display_flag: uboot_logo_on = 1
[    0.000000] rkclk_init_clks: cnt_parent = 7
[    0.000000] rkclk_init_clks: cnt_rate = 28
[    0.000000] rk3288 set GPLL BW 20 for HDMI!
[    0.000000] Architected cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: ARM arch timer >56 bits at 24000kHz, resolution 41ns
[    0.000000] process version: 2
[    0.000000] channel:0, lkg:31
[    0.000000] channel:0, lkg:31
[    0.000000] channel:1, lkg:27
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[    0.855685] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.855700] pid_max: default: 32768 minimum: 301
[    0.855813] Security Framework initialized
[    0.855830] SELinux:  Initializing.
[    0.855903] Mount-cache hash table entries: 512
[    0.856544] Initializing cgroup subsys debug
[    0.856559] Initializing cgroup subsys memory
[    0.856585] Initializing cgroup subsys freezer
[    0.856614] CPU: Testing write buffer coherency: ok
[    0.856934] /cpus/cpu@0 missing clock-frequency property
[    0.856949] /cpus/cpu@1 missing clock-frequency property
[    0.856958] /cpus/cpu@2 missing clock-frequency property
[    0.856967] /cpus/cpu@3 missing clock-frequency property
[    0.857025] CPU0: thread -1, cpu 0, socket 5, mpidr 80000500
[    0.857078] Setting up static identity map for 0xc0858180 - 0xc08581d8
[    0.859260] last_log: 0x1e900000 map to 0xe0804000 and copy to 0xe0886000, size 0x80000 early 0x18d7 (version 3.1)
[    0.933776] CPU1: Booted secondary processor
[    0.933810] CPU1: thread -1, cpu 1, socket 5, mpidr 80000501
[    0.953455] CPU2: Booted secondary processor


1、同样在firefly3288 reload中用了一样的固件,reload的正常;

2、请教,能从这个启动的打印判断问题出在哪里吗? 谢谢;
回复

使用道具 举报

152

积分

0

威望

6

贡献

社区版主

Rank: 7Rank: 7Rank: 7

积分
152
发表于 2016-11-4 09:24:52     
从内核日志上确实看不出哪里出问题了。仔细比对一下硬件吧。
回复

使用道具 举报

350

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
350
发表于 2016-11-4 10:10:09     
我現在在弄 RK3128 + RK818
發現有兩組電源不知道源碼在哪裡被 disable掉了
在內核中打印並略過 disable動作
FILE: ./driver/mfd/rk818.c
FUNC: static int rk818_ldo_disable(struct regulator_dev *dev)

printk("### %s> ldo=%d\n",__func__, ldo);
if (ldo == 3 || ldo == 7) return 0;

看看這樣去加印一些訊息, 對你有沒有幫助
回复

使用道具 举报

338

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
338
发表于 2016-11-4 11:10:58     
woody.lee 发表于 2016-11-4 10:10
我現在在弄 RK3128 + RK818
發現有兩組電源不知道源碼在哪裡被 disable掉了
在內核中打印並略過 disable ...

谢谢;

你现在的板子能正常跑起来了吗?
回复

使用道具 举报

350

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
350
发表于 2016-11-4 12:21:27     
本帖最后由 woody.lee 于 2016-11-4 12:23 编辑

是的,
因為目前遇到了 開機不穩定的現象, 有先將 dvfs ddr 的部分 在 dts檔案中 先做 disable的動作,

也有試著根據下方連結嘗試做修改驗證
http://www.voidcn.com/blog/huangkaiyue1/article/p-6112359.html
仍然無解,

目前 ddr Freq 固定跑在 300M,
持續驗證釐清中...


回复

使用道具 举报

338

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
338
发表于 2016-11-4 17:23:23     
woody.lee 发表于 2016-11-4 12:21
是的,
因為目前遇到了 開機不穩定的現象, 有先將 dvfs ddr 的部分 在 dts檔案中 先做 disable的動作,

我看到有3128的dts文件,关于rk818部分,有以下的设置:
&rk818 {
        gpios =<&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>,<&gpio1 GPIO_A1 GPIO_ACTIVE_LOW>;
        cpu_det_gpio = <&gpio0 GPIO_D0 GPIO_ACTIVE_HIGH>;
        power_hold_gpio = <&gpio0 GPIO_D6 GPIO_ACTIVE_HIGH>;
        rk818,system-power-controller;
        rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/


而我现在用的,只是:
&rk818 {
        gpios =<&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>,<&gpio1 GPIO_A1 GPIO_ACTIVE_LOW>;
        rk818,system-power-controller;
        rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/


没有这两句:

        cpu_det_gpio = <&gpio0 GPIO_D0 GPIO_ACTIVE_HIGH>;
        power_hold_gpio = <&gpio0 GPIO_D6 GPIO_ACTIVE_HIGH>;


这个有什么影响吗?

我看到我的电路没有这两路管脚接过去;
回复

使用道具 举报

返回列表
12
*滑块验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表