比如以下设备树中,gt911为何要两个,地址0x5d 和 0x14是怎么确定的,为什么是0x5d和0x14?
&i2c0 {
pinctrl-0 = <&i2c0_pins>;
pinctrl-names = "default";
status = "okay";
gt9115d: touchscreen@5d {
compatible = "goodix,gt911";
reg = <0x5d>;
interrupt-parent = <&pio>;
interrupts = <4 3 IRQ_TYPE_EDGE_FALLING>; /* (PE3) */
pinctrl-names = "default";
pinctrl-0 = <&ts_reset_pin>;
irq-gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>; /* (PE3) */
reset-gpios = <&pio 4 9 GPIO_ACTIVE_HIGH>; /* RST (PE9) */
touchscreen-swapped-x-y;
};
gt91114: touchscreen@14 {
compatible = "goodix,gt911";
reg = <0x14>;
interrupt-parent = <&pio>;
interrupts = <4 3 IRQ_TYPE_EDGE_FALLING>; /* (PE3) */
pinctrl-names = "default";
pinctrl-0 = <&ts_reset_pin>;
irq-gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>; /* (PE3) */
reset-gpios = <&pio 4 9 GPIO_ACTIVE_HIGH>; /* RST (PE9) */
touchscreen-swapped-x-y;
};
};
再比如以下设备树,0x48,0x40,0x4a 是怎么来的,还有一个i2c0可以同时接三个设备吗
&i2c0 {
status = "okay";
ns2009: ns2009@48 {
compatible = "nsiway,ns2009";
reg = <0x48>;
};
sht21: sht21@40 {
compatible = "sht21";
reg = <0x40>;
};
atmel_mxt_ts@4a {
compatible = "atmel,atmel_mxt_ts";
reg = <0x4a>;
/*interrupt-parent = <&pio>;
interrupts = <6 5 IRQ_TYPE_LEVEL_LOW>;*/ //省引脚,使用轮训方式
};
};
离线
晕哥,0x48,0x40,0x4a 这些地址是怎么来的
离线
gt911 等芯片手册上面有。
懂了,多谢
离线