天天看点

[RK3288][Android6.0] 移植笔记 --- RK818配置不正确导致无法开机调试

Platform: ROCKCHIP

OS: Android 6.0

Kernel: 3.10.92

现象:

在成功Download之后又遇到了无法开机的问题,kernel打印几条log就停住了.

log如下:

Starting kernel ...

<hit enter to activate fiq debugger>

[    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 ([email protected]) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #35 SMP PREEMPT Fri Oct 28 14:37:53 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: [email protected], offset:0x01000000

[    0.000000] rockchip_uboot_mem_reserve: reserve [email protected] 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

分析:

相对之前能正常开机的sdk板,主要的改动有eMMC/LPDDR3型号升级,PMU从ACT8846改成了RK818.

Log每次停在同一位置,所以基本上不会是LPDDR3的原因,而eMMC也不应该是此现象.

针对RK818,手上暂时没datasheet,dts配置是参考rk3288-tb.dts

凑巧测试了使用RK818的Android5.1, 可以正常开机.

后来对比替换使用了Android5.1的rk818.c驱动,系统也能起来了,但是还有问题,比如touch

模块无电压输出,直接拿掉rk818驱动后虽然系统使用u-boot中的初始化配置也能工作,但是像dvfs模块

调节频率要改变电压就不能正常工作了.

后来更新代码后,发现有个VR产品主dts也用的是rk818,替换之后能终于能正常开机!

解决办法:

使用rk3288-vr.dts而不是rk3288-tb.dts中的rk818配置, 添加如下:

/include/ "rk818.dtsi"

&rk818 {

    gpios = <&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,

        <&gpio0 GPIO_A0 GPIO_ACTIVE_LOW>;

    rk818,system-power-controller;

    regulators {

        rk818_dcdc1_reg: [email protected]{

            regulator-name= "vdd_logic";

            regulator-min-microvolt = <700000>;

            regulator-max-microvolt = <1500000>;

            regulator-initial-mode = <0x2>;

            regulator-initial-state = <3>;

            regulator-boot-on-volt = <1150000>;

            regulator-state-mem {

                regulator-state-mode = <0x2>;

                regulator-state-enabled;

                regulator-state-uv = <1000000>;

            };

        };

        rk818_dcdc2_reg: [email protected] {

            regulator-name= "vdd_gpu";

            regulator-min-microvolt = <700000>;

            regulator-max-microvolt = <1500000>;

            regulator-initial-mode = <0x2>;

            regulator-initial-state = <3>;

            regulator-boot-on-volt = <1150000>;

            regulator-state-mem {

                regulator-state-mode = <0x2>;

                regulator-state-disabled;

                regulator-state-uv = <900000>;

            };

        };

        rk818_dcdc3_reg: [email protected] {

            regulator-name= "rk818_dcdc3";

            regulator-min-microvolt = <1200000>;

            regulator-max-microvolt = <1200000>;

            regulator-initial-mode = <0x2>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-mode = <0x2>;

                regulator-state-enabled;

                regulator-state-uv = <1200000>;

            };

        };

        rk818_dcdc4_reg: [email protected] {

            regulator-name= "vccio";

            regulator-min-microvolt = <1800000>;

            regulator-max-microvolt = <3300000>;

            regulator-initial-mode = <0x2>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-mode = <0x2>;

                regulator-state-enabled;

                regulator-state-uv = <3000000>;

            };

        };

        rk818_ldo1_reg: [email protected] {

            regulator-name= "rk818_ldo1";

            regulator-min-microvolt = <3300000>;

            regulator-max-microvolt = <3300000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-enabled;

                regulator-state-uv = <3300000>;

            };

        };

        rk818_ldo2_reg: [email protected] {

            regulator-name= "rk818_ldo2";

            regulator-always-on;

            regulator-min-microvolt = <3300000>;

            regulator-max-microvolt = <3300000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-enabled;

                regulator-state-uv = <3300000>;

            };

        };

        rk818_ldo3_reg: [email protected] {

            regulator-name= "rk818_ldo3";

            regulator-min-microvolt = <1000000>;

            regulator-max-microvolt = <1000000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-enabled;

                regulator-state-uv = <1000000>;

            };

        };

        rk818_ldo4_reg:[email protected] {

            regulator-name= "rk818_ldo4";

            regulator-min-microvolt = <1800000>;

            regulator-max-microvolt = <1800000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-disabled;

                regulator-state-uv = <1800000>;

            };

        };

        rk818_ldo5_reg: [email protected] {

            regulator-name= "rk818_ldo5";

            regulator-min-microvolt = <3300000>;

            regulator-max-microvolt = <3300000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-disabled;

                regulator-state-uv = <3300000>;

            };

        };

        rk818_ldo6_reg: [email protected] {

            regulator-name= "rk818_ldo6";

            regulator-min-microvolt = <1000000>;

            regulator-max-microvolt = <1000000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-disabled;

                regulator-state-uv = <1000000>;

            };

        };

        rk818_ldo7_reg: [email protected] {

            regulator-name= "rk818_ldo7";

            regulator-min-microvolt = <1800000>;

            regulator-max-microvolt = <1800000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-enabled;

                regulator-state-uv = <1800000>;

            };

        };

        rk818_ldo8_reg: [email protected] {

            regulator-name= "rk818_ldo8";

            regulator-min-microvolt = <3300000>;

            regulator-max-microvolt = <3300000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-enabled;

                regulator-state-uv = <3300000>;

            };

        };

        rk818_ldo9_reg: [email protected] {

            regulator-name= "vcc_sd";

            regulator-min-microvolt = <3300000>;

            regulator-max-microvolt = <3300000>;

            regulator-initial-state = <3>;

            regulator-state-mem {

                regulator-state-enabled;

                regulator-state-uv = <3300000>;

            };

        };

        rk818_ldo10_reg: [email protected] {

            regulator-name= "rk818_ldo10";

            regulator-state-mem {

                regulator-state-disabled;

            };

        };

    };

    battery {

        ocv_table =

            <3400 3599 3671 3701 3728 3746 3762 3772 3781 3792 3816 3836

            3866 3910 3942 3971 4002 4050 4088 4132 4183 >;

        design_capacity = <4000>;

        design_qmax = <4100>;

        bat_res = <100>;

        max_input_current = <2000>;

        max_chrg_current = <1800>;

        max_chrg_voltage = <4200>;

        sleep_enter_current = <300>;

        sleep_exit_current = <300>;

        power_off_thresd = <3400>;

        zero_algorithm_vol = <3850>;

        fb_temperature = <115>;

        max_soc_offset = <60>;

        monitor_sec = <5>;

        virtual_power = <0>;

        power_dc2otg = <0>;

        dc_det_adc = <0>;

    };

};

此问题花了我不少时间,希望对遇到同样问题的朋友有帮助.

继续阅读