我正在尝试与我的笔记本电脑中列出的触摸板/触控板进行对话设备树。触摸板根本不像我的 USB 鼠标那样显示在 /dev/ 中。我使用的是华硕 C201 Chromebook(代号 veyron speedy),运行 Debian 9、主线内核,从各方面来看,触摸板应该可以工作,但我什至在 /dev/ 中看不到它。我想知道 Debian 是否看到了它。
这是该计算机设备树的相关部分:
trackpad {
trackpad-int {
rockchip,pins = <0x7 0x3 0x0 0x6a>;
linux,phandle = <0x31>;
phandle = <0x31>;
};
};
这是以下的输出cat /sys/kernel/debug/gpio
:
gpiochip0: GPIOs 0-23, parent: platform/pinctrl, gpio0:
gpio-5 ( |Power ) in hi
gpio-6 ( |Lid ) in hi
gpio-8 ( |gpio-charger ) in lo
gpio-11 ( |vcc5_host1 ) out hi
gpio-12 ( |vcc5_host2 ) out hi
gpio-13 ( |? ) out lo
gpiochip1: GPIOs 24-55, parent: platform/pinctrl, gpio1:
gpiochip2: GPIOs 56-87, parent: platform/pinctrl, gpio2:
gpio-65 ( |reset ) in lo
gpio-68 ( |backlight_regulator ) out hi
gpio-69 ( |vcc18_lcd ) out hi
gpiochip3: GPIOs 88-119, parent: platform/pinctrl, gpio3:
gpiochip4: GPIOs 120-151, parent: platform/pinctrl, gpio4:
gpio-148 ( |reset ) in lo
gpiochip5: GPIOs 152-183, parent: platform/pinctrl, gpio5:
gpio-171 ( |vcc50_hdmi ) out hi
gpiochip6: GPIOs 184-215, parent: platform/pinctrl, gpio6:
gpiochip7: GPIOs 216-247, parent: platform/pinctrl, gpio7:
gpio-218 ( |enable ) out hi
gpio-221 ( |cd ) in hi
gpio-230 ( |panel_regulator ) out hi
gpio-237 ( |vcc_5v ) out hi
gpiochip8: GPIOs 248-263, parent: platform/pinctrl, gpio8:
这些 GPIO 之一是 dtb 中列出的触摸板吗?
答案1
完整的声明rk3288-veyron-chromebook.dtsi
是
&i2c4 {
trackpad@15 {
compatible = "elan,ekth3000";
reg = <0x15>;
interrupt-parent = <&gpio7>;
interrupts = <RK_PA3 IRQ_TYPE_EDGE_FALLING>;
pinctrl-names = "default";
pinctrl-0 = <&trackpad_int>;
vcc-supply = <&vcc33_io>;
wakeup-source;
};
};
查看包含的文件rk3288-veyron.dtsi
,有
&i2c4 {
status = "okay";
clock-frequency = <400000>;
i2c-scl-falling-time-ns = <50>; /* 11ns measured */
i2c-scl-rising-time-ns = <300>; /* 225ns measured */
};
并进一步在rk3288.dtsi
i2c4: i2c@ff160000 {
compatible = "rockchip,rk3288-i2c";
reg = <0x0 0xff160000 0x0 0x1000>;
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
clock-names = "i2c";
clocks = <&cru PCLK_I2C4>;
pinctrl-names = "default";
pinctrl-0 = <&i2c4_xfer>;
status = "disabled";
};
所以这看起来很像 I2C 接口不是GPIO 接口,但使用 rockchip 中的一系列专用寄存器。
您是否尝试过寻找 I2C 总线/sys/bus
?/sys/class
?