以下是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";
};
®_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
regulator-name = "vdd-cpu";
};
®_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vdd-device";
};
®_ldo1 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vdd-rtc";
};
®_ldo2 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "avcc";
};
make linux-menuconfig中和AXP209、AXP20X相关的宏的CONFIG都打开就好
读一下USB的电压和电流
离线
本帖子中对NMI Controller的dtsi修改有误,需要参考 https://whycan.cn/p_34557.html 中对NMI控制器驱动进行patch和dtsi修改
修改后按下AXP209的电源按钮时,Linux正确触发event
最近编辑记录 aodzip (2020-02-26 17:09:16)
离线