RK3568开发板安卓系统之驱动调试(四)
10226 打赏
RK3568开发板安卓系统之驱动调试(四) 万万没想到 2022-10-08 14:09:42

4 驱动调试

4.1 电源配置

RK GPIO编号说明

A组: A0-A7对应0-7B组: B0-B7对应8-15C组: C0-C7对应16-23D组: D0-D7对应24-31

GPIO编号计算方法:
例如:GPIO4_C4 = 4*32+16+4 = 148

4.1.1 查看原理图

4.1.2 获取需要的配置信息,并在dts里配置

通过查看原理图,获取到相应的信息,然后在dts里配置
1、RK809和TCS4525是挂在I2C0下。输出电压VDD_CPU为0.9V, dts配置如下

    vdd_cpu: tcs4525@1c {
        compatible = "tcs,tcs452x";
        reg = <0x1c>;
        vin-supply = <&vcc5v0_sys>;
        regulator-compatible = "fan53555-reg";
        regulator-name = "vdd_cpu";
        ...
        regulator-init-microvolt = <900000>;
        ...
    };

2、RK809各输入电压的输入源

输入电压输入源
VCC1VCC5V0_SYS
VCC2VCC5V0_SYS
VCC3VCC5V0_SYS
VCC4VCC5V0_SYS
VCC5VCC3V3_SYS
VCC6VCC3V3_SYS
VCC7VCC3V3_SYS
VCC8VCC3V3_SYS
VCC9VCC3V3_SYS

dts配置如下:

    vcc1-supply = <&vcc5v0_SYS>;
    vcc2-supply = <&vcc5v0_SYS>;
    vcc3-supply = <&vcc5v0_SYS>;
    vcc4-supply = <&vcc5v0_SYS>;
    vcc5-supply = <&vcc3v3_sys>;
    vcc6-supply = <&vcc3v3_sys>;
    vcc7-supply = <&vcc3v3_sys>;
    vcc8-supply = <&vcc3v3_sys>;
    vcc9-supply = <&vcc3v3_sys>;

通过查看原理图,VCC5V0_SYS是底板给的,VCC3V3_SYS是由VCC5V0_SYS转的
3、RK809输出电压名及其电压值

电源名称电压值
BUCK1VDD_LOGIC0.9V
BUCK2VDD_GPU0.9V
BUCK3VCC_DDR硬件调节
BUCK4VDD_NPU0.9V
LDO1VDDA0V9_IMAGE0.9V
LDO2VDDA_0V90.9V
LDO3VDDA0V9_PMU0.9V
LDO4VCCIO_ACODEC3.3V
LDO5VCCIO_SD1.8-3.3V
LDO6VCC3V3_PMU3.3V
LDO7VCCA_1V81.8V
LDO8VCCA1V8_PMU1.8V
LDO9VCCA1V8_IMAGE1.8V
SWCUT1VCC_3V33.3V
SWCUT2VCC3V3_SD3.3V
BUCK5VCC_1V81.8V

dts里配置

regulators {
    vdd_logic: DCDC_REG1 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <500000>;
        regulator-max-microvolt = <1350000>;
        regulator-init-microvolt = <900000>;
        regulator-ramp-delay = <6001>;
        regulator-initial-mode = <0x2>;
        regulator-name = "vdd_logic";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vdd_gpu: DCDC_REG2 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <500000>;
        regulator-max-microvolt = <1350000>;
        regulator-init-microvolt = <900000>;
        regulator-ramp-delay = <6001>;
        regulator-initial-mode = <0x2>;
        regulator-name = "vdd_gpu";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc_ddr: DCDC_REG3 {
        regulator-always-on;
        regulator-boot-on;
        regulator-initial-mode = <0x2>;
        regulator-name = "vcc_ddr";
        regulator-state-mem {
            regulator-on-in-suspend;
        };
    };

    vdd_npu: DCDC_REG4 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <500000>;
        regulator-max-microvolt = <1350000>;
        regulator-init-microvolt = <900000>;
        regulator-ramp-delay = <6001>;
        regulator-initial-mode = <0x2>;
        regulator-name = "vdd_npu";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vdda0v9_image: LDO_REG1 {
        regulator-boot-on;
        regulator-always-on;
        regulator-min-microvolt = <900000>;
        regulator-max-microvolt = <900000>;
        regulator-name = "vdda0v9_image";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vdda_0v9: LDO_REG2 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <900000>;
        regulator-max-microvolt = <900000>;
        regulator-name = "vdda_0v9";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vdda0v9_pmu: LDO_REG3 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <900000>;
        regulator-max-microvolt = <900000>;
        regulator-name = "vdda0v9_pmu";
        regulator-state-mem {
            regulator-on-in-suspend;
            regulator-suspend-microvolt = <900000>;
        };
    };

    vccio_acodec: LDO_REG4 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        regulator-name = "vccio_acodec";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vccio_sd: LDO_REG5 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <3300000>;
        regulator-name = "vccio_sd";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc3v3_pmu: LDO_REG6 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        regulator-name = "vcc3v3_pmu";
        regulator-state-mem {
            regulator-on-in-suspend;
            regulator-suspend-microvolt = <3300000>;
        };
    };

    vcca_1v8: LDO_REG7 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "vcca_1v8";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcca1v8_pmu: LDO_REG8 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "vcca1v8_pmu";
        regulator-state-mem {
            regulator-on-in-suspend;
            regulator-suspend-microvolt = <1800000>;
        };
    };

    vcca1v8_image: LDO_REG9 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "vcca1v8_image";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc_1v8: DCDC_REG5 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "vcc_1v8";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc_3v3: SWITCH_REG1 {
        regulator-always-on;
        regulator-boot-on;
        regulator-name = "vcc_3v3";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc3v3_sd: SWITCH_REG2 {
        regulator-always-on;
        regulator-boot-on;
        regulator-name = "vcc3v3_sd";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };
};
在原有配置的基础上增加、删除、修改4 驱动调试
在原有配置的基础上增加、删除、修改4.1 电源配置
RK GPIO编号说明

A组: A0-A7对应0-7
B组: B0-B7对应8-15
C组: C0-C7对应16-23
D组: D0-D7对应24-31


GPIO编号计算方法:
例如:GPIO4_C4 = 4*32+16+4 = 148

4.1.1 查看原理图






4.1.2 获取需要的配置信息,并在dts里配置
通过查看原理图,获取到相应的信息,然后在dts里配置
1、RK809和TCS4525是挂在I2C0下。输出电压VDD_CPU为0.9V, dts配置如下

    vdd_cpu: tcs4525@1c {
        compatible = "tcs,tcs452x";
        reg = <0x1c>;
        vin-supply = <&vcc5v0_sys>;
        regulator-compatible = "fan53555-reg";
        regulator-name = "vdd_cpu";
        ...
        regulator-init-microvolt = <900000>;
        ...
    };

2、RK809各输入电压的输入源
|  输入电压  | 输入源      |
| ————- | —————- |
| VCC1      | VCC5V0_SYS  |
| VCC2      | VCC5V0_SYS  |
| VCC3      | VCC5V0_SYS  |
| VCC4      | VCC5V0_SYS  |
| VCC5      | VCC3V3_SYS  |
| VCC6      | VCC3V3_SYS  |
| VCC7      | VCC3V3_SYS  |
| VCC8      | VCC3V3_SYS  |
| VCC9      | VCC3V3_SYS  |
dts配置如下:

    vcc1-supply = <&vcc5v0_SYS>;
    vcc2-supply = <&vcc5v0_SYS>;
    vcc3-supply = <&vcc5v0_SYS>;
    vcc4-supply = <&vcc5v0_SYS>;
    vcc5-supply = <&vcc3v3_sys>;
    vcc6-supply = <&vcc3v3_sys>;
    vcc7-supply = <&vcc3v3_sys>;
    vcc8-supply = <&vcc3v3_sys>;
    vcc9-supply = <&vcc3v3_sys>;

通过查看原理图,VCC5V0_SYS是底板给的,VCC3V3_SYS是由VCC5V0_SYS转的
3、RK809输出电压名及其电压值
|        | 电压名称      | 电压值    |
| ———-| —————— | —————|
| BUCK1  | VDD_LOGIC    | 0.9V      |
| BUCK2  | VDD_GPU      | 0.9V      |
| BUCK3  | VCC_DDR      | 硬件调节   |
| BUCK4  | VDD_NPU      | 0.9V      |
| LDO1   | VDDA0V9_IMAGE| 0.9V      |
| LDO2   | VDDA_0V9     | 0.9V      |
| LDO3   | VDDA0V9_PMU  | 0.9V      |
| LDO4   | VCCIO_ACODEC | 3.3V      |
| LDO5   | VCCIO_SD     | 1.8-3.3V  |
| LDO6   | VCC3V3_PMU   | 3.3V      |
| LDO7   | VCCA_1V8     | 1.8V      |
| LDO8   | VCCA1V8_PMU  | 1.8V      |
| LDO9   | VCCA1V8_IMAGE| 1.8V      |
| SWCUT1 | VCC_3V3      | 3.3V      |
| SWCUT2 | VCC3V3_SD    | 3.3V      |
| BUCK5  | VCC_1V8      | 1.8V      |
dts里配置

regulators {
    vdd_logic: DCDC_REG1 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <500000>;
        regulator-max-microvolt = <1350000>;
        regulator-init-microvolt = <900000>;
        regulator-ramp-delay = <6001>;
        regulator-initial-mode = <0x2>;
        regulator-name = "vdd_logic";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vdd_gpu: DCDC_REG2 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <500000>;
        regulator-max-microvolt = <1350000>;
        regulator-init-microvolt = <900000>;
        regulator-ramp-delay = <6001>;
        regulator-initial-mode = <0x2>;
        regulator-name = "vdd_gpu";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc_ddr: DCDC_REG3 {
        regulator-always-on;
        regulator-boot-on;
        regulator-initial-mode = <0x2>;
        regulator-name = "vcc_ddr";
        regulator-state-mem {
            regulator-on-in-suspend;
        };
    };

    vdd_npu: DCDC_REG4 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <500000>;
        regulator-max-microvolt = <1350000>;
        regulator-init-microvolt = <900000>;
        regulator-ramp-delay = <6001>;
        regulator-initial-mode = <0x2>;
        regulator-name = "vdd_npu";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vdda0v9_image: LDO_REG1 {
        regulator-boot-on;
        regulator-always-on;
        regulator-min-microvolt = <900000>;
        regulator-max-microvolt = <900000>;
        regulator-name = "vdda0v9_image";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vdda_0v9: LDO_REG2 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <900000>;
        regulator-max-microvolt = <900000>;
        regulator-name = "vdda_0v9";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vdda0v9_pmu: LDO_REG3 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <900000>;
        regulator-max-microvolt = <900000>;
        regulator-name = "vdda0v9_pmu";
        regulator-state-mem {
            regulator-on-in-suspend;
            regulator-suspend-microvolt = <900000>;
        };
    };

    vccio_acodec: LDO_REG4 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        regulator-name = "vccio_acodec";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vccio_sd: LDO_REG5 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <3300000>;
        regulator-name = "vccio_sd";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc3v3_pmu: LDO_REG6 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        regulator-name = "vcc3v3_pmu";
        regulator-state-mem {
            regulator-on-in-suspend;
            regulator-suspend-microvolt = <3300000>;
        };
    };

    vcca_1v8: LDO_REG7 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "vcca_1v8";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcca1v8_pmu: LDO_REG8 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "vcca1v8_pmu";
        regulator-state-mem {
            regulator-on-in-suspend;
            regulator-suspend-microvolt = <1800000>;
        };
    };

    vcca1v8_image: LDO_REG9 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "vcca1v8_image";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc_1v8: DCDC_REG5 {
        regulator-always-on;
        regulator-boot-on;
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-name = "vcc_1v8";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc_3v3: SWITCH_REG1 {
        regulator-always-on;
        regulator-boot-on;
        regulator-name = "vcc_3v3";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };

    vcc3v3_sd: SWITCH_REG2 {
        regulator-always-on;
        regulator-boot-on;
        regulator-name = "vcc3v3_sd";
        regulator-state-mem {
            regulator-off-in-suspend;
        };
    };
};


声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
评论
0个
时间排序
内容存在敏感词
    0 条记录 第 0 /
    相关专栏
    打赏作者
    易百纳技术社区
    万万没想到
    您的支持将鼓励我继续创作!
    打赏金额:
    ¥1 易百纳技术社区
    ¥5 易百纳技术社区
    ¥10 易百纳技术社区
    ¥50 易百纳技术社区
    ¥100 易百纳技术社区
    支付方式:
    微信支付
    支付宝支付
    易百纳技术社区 微信支付
    易百纳技术社区
    打赏成功!

    感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~

    举报反馈

    举报类型

    • 内容涉黄/赌/毒
    • 内容侵权/抄袭
    • 政治相关
    • 涉嫌广告
    • 侮辱谩骂
    • 其他

    详细说明

    审核成功

    发布时间设置
    发布时间:
    是否关联周任务-专栏模块

    审核失败

    失败原因
    备注
    Loading...
    易百纳技术社区
    确定要删除此文章、专栏、评论吗?
    确定
    取消
    易百纳技术社区
    易百纳技术社区
    在专栏模块发布专栏,可获得其他E友的打赏
    易百纳技术社区
    回答悬赏问答,被题主采纳后即可获得悬赏金
    易百纳技术社区
    在上传资料时,有价值的资料可设置为付费资源
    易百纳技术社区
    达到一定金额,收益即可提现~
    收益也可用来充值ebc,下载资料、兑换礼品更容易
    易百纳技术社区
    活动规则
    • 1.周任务为周期性任务,每周周一00:00刷新,上周完成的任务不会累计到本周,本周需要从头开始任务,当前任务完成后才可以完成下一个任务
    • 2.发布的专栏与资料需要与平台的板块有相关性,禁止注水,专栏/资料任务以审核通过的篇数为准,专栏需为原创文章且首次在社区发布
    • 3.任务完成后,现金奖励直接打款到微信账户;EBC/收益将自动发放到个人账户,可前往“我的钱包”查看;其他奖励请联系客服兑换
    易百纳技术社区
    升级提醒
    升级

    恭喜您的社区称号由 升级为 “社区游民”

    同时为了感谢您对社区的支持,我们将送出xxx礼品一份, 记得领取哦~

    升级提醒
    易百纳技术社区