您尚未登录。

楼主 #1 2020-02-18 11:26:37

aodzip
会员
注册时间: 2019-10-15
已发帖子: 130
积分: 100

Allwinner S3 增加 AXP209 PMIC 的一些记录

以下是DTS的修改

/ {
        nmi_intc: interrupt-controller@1c000d0 {
            compatible = "allwinner,sun6i-a31-r-intc";
            interrupt-controller;
            #interrupt-cells = <2>;
            reg = <0x01c000d0 0x400>;
            interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
        };
};
&i2c0 {
    status = "okay";
    axp209: pmic@34 {
        reg = <0x34>;
        interrupt-parent = <&nmi_intc>;
        interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
    };
};

#include "axp209.dtsi"

&usb_power_supply {
    status = "okay";
};

&ac_power_supply {
    status = "okay";
};

&battery_power_supply {
    status = "okay";
};

&reg_dcdc2 {
    regulator-always-on;
    regulator-min-microvolt = <1250000>;
    regulator-max-microvolt = <1250000>;
    regulator-name = "vdd-cpu";
};

&reg_dcdc3 {
    regulator-always-on;
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-name = "vdd-device";
};

&reg_ldo1 {
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-name = "vdd-rtc";
};

&reg_ldo2 {
    regulator-always-on;
    regulator-min-microvolt = <3000000>;
    regulator-max-microvolt = <3000000>;
    regulator-name = "avcc";
};

make linux-menuconfig中和AXP209、AXP20X相关的宏的CONFIG都打开就好

读一下USB的电压和电流
photo_2020-02-18_11-22-46.jpg

离线

楼主 #3 2020-02-26 17:09:05

aodzip
会员
注册时间: 2019-10-15
已发帖子: 130
积分: 100

Re: Allwinner S3 增加 AXP209 PMIC 的一些记录

本帖子中对NMI Controller的dtsi修改有误,需要参考 https://whycan.cn/p_34557.html 中对NMI控制器驱动进行patch和dtsi修改axp209event.png
修改后按下AXP209的电源按钮时,Linux正确触发event

最近编辑记录 aodzip (2020-02-26 17:09:16)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn