简述
pca9548及vsc9548是iic拓展器件,主要是防止iic器件地址冲突
通过写其0x0寄存器可切换0-7路iic
设备树挂载
这里用到了vsc9548,且在第7路上挂在了eeprom器件
i2c@ff030000 {
compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";
status = "okay";
interrupt-parent = <0x4>;
interrupts = <0x0 0x12 0x4>;
reg = <0x0 0xff030000 0x0 0x1000>;
#address-cells = <0x1>;
#size-cells = <0x0>;
power-domains = <0x14>;
clocks = <0x3 0x3e>;
clock-frequency = <0x61a80>;
i2c-switch@70 {
compatible = "nxp,pca9548";
reg = <0x70>;
i2c@0 {
reg = <0>;
};
i2c@1 {
reg = <1>;
};
i2c@2 {
reg = <2>;
};
i2c@3 {
reg = <3>;
};
i2c@4 {
reg = <4>;
};
i2c@5 {
reg = <5>;
};
i2c@6 {
reg = <6>;
};
i2c@7 {
reg = <7>;
backboard_eeprom@50 {
compatible = "atmel,24c64";
reg = <0x50>;
};
};
};
};
同时可自定义虚拟iic