您尚未登录。

楼主 #1 2021-05-12 21:40:19

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

tsc2007 设备树配置问题

tsc2007: tsc2007@48 {
                compatible = "ti,tsc2007";
                reg = <0x48>;
                interrupt-parent = <&pio>;
                interrupts = < 5 5 IRQ_TYPE_EDGE_FALLING>;
                gpios = <&pio 5 5 GPIO_ACTIVE_LOW>;
                ti,x-plate-ohms = <180>;
                status = "okay";
            };
中断用的PF5,照着 https://whycan.com/t_6318.html 配置的设备树,结果报错,求解
[    8.826962] OF: /soc@03000000/twi@0x05002c00/tsc2007@48: arguments longer than property
[    8.836297] tsc2007 3-0048: GPIO not specified in DT (of_get_gpio returned -22)
[    8.838913] input: TSC2007 Touchscreen as /devices/platform/soc/twi3/i2c-3/3-0048/input/input2

离线

#2 2021-05-13 16:10:24

sprintf
会员
注册时间: 2020-09-11
已发帖子: 50
积分: 45

Re: tsc2007 设备树配置问题

你这不是gpios设备树参数太多咩。报错了呗, 你用的sdk应该和他们用的不同,具体gpios的配置情况可以参考已有的例子,如果没有的话可以找下
Documentation\devicetree\bindings 下面对设备树描述的txt看例子怎么使用设备树。就拿贴子上晕哥说的那个buildroot-tiny200 这个的来说,你看你这句
gpios = <&pio 5 5 GPIO_ACTIVE_LOW>; 你这个应该就是这个sdk里面设备树写法。这个&pio中的pio你可以在suniv-f1c100s.dtsi这里找到pio的配置,其中就有compatible = "allwinner,suniv-f1c100s-pinctrl"这个。然后你在Documentation\devicetree\bindings这里面搜索"allwinner,suniv-f1c100s-pinctrl"你就可以打开allwinner,sunxi-pinctrl.txt。这里面就说明了每个参数是什么,并且有一个demo示例。不同的SDK是略有不同的。我知道的tina就不同。

离线

楼主 #3 2021-05-14 08:59:36

cris8259
会员
注册时间: 2019-09-25
已发帖子: 262
积分: 131

Re: tsc2007 设备树配置问题

sprintf 说:

你这不是gpios设备树参数太多咩。报错了呗, 你用的sdk应该和他们用的不同,具体gpios的配置情况可以参考已有的例子,如果没有的话可以找下
Documentation\devicetree\bindings 下面对设备树描述的txt看例子怎么使用设备树。就拿贴子上晕哥说的那个buildroot-tiny200 这个的来说,你看你这句
gpios = <&pio 5 5 GPIO_ACTIVE_LOW>; 你这个应该就是这个sdk里面设备树写法。这个&pio中的pio你可以在suniv-f1c100s.dtsi这里找到pio的配置,其中就有compatible = "allwinner,suniv-f1c100s-pinctrl"这个。然后你在Documentation\devicetree\bindings这里面搜索"allwinner,suniv-f1c100s-pinctrl"你就可以打开allwinner,sunxi-pinctrl.txt。这里面就说明了每个参数是什么,并且有一个demo示例。不同的SDK是略有不同的。我知道的tina就不同。

多谢,搞定

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn