msm8953使用I2C4
1-devcfg.mbn中I2C4修改为AP使用
2-dtsi修改
使用高通默认的项目的话,没有前缀“项目名-”
项目名-msm8953.dtsi中
aliases {
i2c4 = &i2c_4;
};
i2c_4: i2c@78b8000 { /* BLSP1 QUP3 */
compatible = "qcom,i2c-msm-v2";
#address-cells = <1>;
#size-cells = <0>;
reg-names = "qup_phys_addr";
reg = <0x78b8000 0x600>;
interrupt-names = "qup_irq";
interrupts = <0 98 0>;
qcom,clk-freq-out = <400000>;
qcom,clk-freq-in = <19200000>;
clock-names = "iface_clk", "core_clk";
clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>,
<&clock_gcc clk_gcc_blsp1_qup4_i2c_apps_clk>;
pinctrl-names = "i2c_active", "i2c_sleep";
pinctrl-0 = <&i2c_4_active>;
pinctrl-1 = <&i2c_4_sleep>;
qcom,noise-rjct-scl = <0>;
qcom,noise-rjct-sda = <0>;
qcom,master-id = <86>;
dmas = <&dma_blsp1 10 64 0x20000020 0x20>,
<&dma_blsp1 11 32 0x20000020 0x20>;
dma-names = "tx", "rx";
};
项目名-msm8953-pinctrl.dtsi
i2c_4 {
i2c_4_active: i2c_4_active {
/* active state */
mux {
pins = "gpio14", "gpio15";
function = "blsp_i2c4";
};
config {
pins = "gpio14", "gpio15";
drive-strength = <2>;
bias-disable;
};
};
i2c_4_sleep: i2c_4_sleep {
/* suspended state */
mux {
pins = "gpio14", "gpio15";
function = "gpio";
};
config {
pins = "gpio14", "gpio15";
drive-strength = <2>;
bias-disable;
};
};
};
3- 下面文件内容置空
vendor/qcom/proprietary/sensors/dsps/reg_defaults/sensor_def_qcomdev.conf
修改后需要全编译,android7版本打包在system.img中,android8以后打包在vendor.img中。
补充1:
1点和3点要同步改,只改1,不改3开机会死机