RK3568开发板安卓系统之驱动调试(四)
15935
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各输入电压的输入源

输入电压 输入源
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;
        };
    };
};
在原有配置的基础上增加、删除、修改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 = <&amp;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 = <&amp;vcc5v0_SYS>;
    vcc2-supply = <&amp;vcc5v0_SYS>;
    vcc3-supply = <&amp;vcc5v0_SYS>;
    vcc4-supply = <&amp;vcc5v0_SYS>;
    vcc5-supply = <&amp;vcc3v3_sys>;
    vcc6-supply = <&amp;vcc3v3_sys>;
    vcc7-supply = <&amp;vcc3v3_sys>;
    vcc8-supply = <&amp;vcc3v3_sys>;
    vcc9-supply = <&amp;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 /
    相关专栏
    置顶时间设置
    结束时间
    删除原因
    • 广告/SPAM
    • 恶意灌水
    • 违规内容
    • 文不对题
    • 重复发帖
    打赏作者
    易百纳技术社区
    万万没想到
    您的支持将鼓励我继续创作!
    打赏金额:
    ¥1 易百纳技术社区
    ¥5 易百纳技术社区
    ¥10 易百纳技术社区
    ¥50 易百纳技术社区
    ¥100 易百纳技术社区
    支付方式:
    微信支付
    支付宝支付
    易百纳技术社区 微信支付
    易百纳技术社区
    打赏成功!

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

    举报反馈

    举报类型

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

    详细说明

    审核成功

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

    审核失败

    失败原因
    备注
    易百纳技术社区
    确定要删除此文章、专栏、评论吗?
    确定
    取消
    易百纳技术社区
    每周任务
      去完成
      活动规则
      易百纳技术社区
      升级提醒
      升级

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

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

      升级提醒
      易百纳技术社区

      惊喜礼包

      拼手气红包 红包规则
      祝福语
      恭喜发财,大吉大利!
      红包金额
      红包最小金额不能低于5元
      红包数量
      红包数量范围10~50个
      余额支付
      当前余额:
      可前往问答、专栏板块获取收益 去获取
      取 消 确 定

      小包子的红包

      恭喜发财,大吉大利

      已领取20/40,共1.6元 红包规则

        avatar