|
板凳

楼主 |
发表于 2019-5-24 13:48:35
|
只看该作者
梁工您好
dts文件相关部分:
ads7846reg: ads7846-reg { /* 4 line touch screen driver */
compatible = "regulator-fixed";
regulator-name = "ads7846-reg";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
#if 0
pixcir_ts_pins: pixcir_ts_pins {
pinctrl-single,pins = <
AM4372_IOPAD(0xa64, PIN_INPUT_PULLUP | MUX_MODE7) /* spi2_d0.gpio3_22 */
>;
};
#endif
spi2_pins: spi2_pins { /*4 wire touch screen driver chip */
pinctrl-single,pins = <
AM4372_IOPAD(0xa60, INPUT_EN | MUX_MODE0) /* mcspi2_sclk mode 0*/
AM4372_IOPAD(0xa64, INPUT_EN | MUX_MODE0) /* 268 mcspi2_d0 mode 0*/
AM4372_IOPAD(0xa68, INPUT_EN | MUX_MODE0) /* 264 mcspi2_d1 mode 0*/
AM4372_IOPAD(0xa6c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcspi2_cs0 mode 0*/
>;
};
ads7846_pins: ads7846_pins {
pinctrl-single,pins = <
AM4372_IOPAD(0xa5c, PIN_INPUT_PULLUP | MUX_MODE7) /* spi4_cs0..gpio5_7 */
>;
};
&spi2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi2_pins>;
ads7846@0 {
pinctrl-names = "default";
pinctrl-0 = <&ads7846_pins>;
compatible = "ti,ads7846";
vcc-supply = <&ads7846reg>;
reg = <0>; /* CS0 */
spi-max-frequency = <1500000>;
interrupt-parent = <&gpio5>;
interrupts = <7 0>; /* gpio5_7 */
pendown-gpio = <&gpio5 7 0>;
ti,x-min = /bits/ 16 <0x0>;
ti,x-max = /bits/ 16 <0x0fff>;
ti,y-min = /bits/ 16 <0x0>;
ti,y-max = /bits/ 16 <0x0fff>;
ti,x-plate-ohms = /bits/ 16 <180>;
ti,pressure-max = /bits/ 16 <255>;
ti,debounce-max = /bits/ 16 <10>;
ti,debounce-tol = /bits/ 16 <30>;
ti,debounce-rep = /bits/ 16 <1>;
ti,settle-delay-usec = /bits/ 16 <150>;
ti,keep-vref-on = <1>;
linux,wakeup;
};
};
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|