&pio {
twi0_pins_c: twi0@0 {
pins = "PG12", "PG13"; /*sck sda*/
function = "twi0";
muxsel = <3>;
drive-strength = <10>;
};
twi0_pins_d: twi0@1 {
pins = "PG12", "PG13";
function = "gpio_in";
};
}
&twi0 {
clock-frequency = <400000>;
pinctrl-0 = <&twi0_pins_c>;
pinctrl-1 = <&twi0_pins_d>;
pinctrl-names = "default", "sleep";
status = "okay";
tsc2007@48 {
compatible = "ti,tsc2007";
reg = <0x48>;
interrupt-parent = <&pio>;
interrupts = <PB 2 IRQ_TYPE_EDGE_FALLING>;
ti,x-plate-ohms = <400>;
};
};
kernel 配置勾选 tsc2007,然后用 evtest 测试电阻触摸屏,一切OK了。