1, 首先需要在dtsi文件加上节点
i2c-gpio: i2c-gpio {
compatible = "i2c-gpio";
status = "disabled";
};
在dts文件加上器件描述:
&i2c-gpio {
pinctrl-names = "default";
status = "okay";
eeprom: m24c08@23 {
compatible = "st,m24512";
reg = <0x23>;
status = "okay";
};
};
2, 在make menuconfig 中选中i2c-gpio