杨子玄 发表于 2021-3-8 14:50:22

OK1012访问GPIO1_28


系统gpio 下有如下文件:
root@localhost:~# cd /sys/class/gpio/
root@localhost:/sys/class/gpio# ls
exportgpiochip448gpiochip480unexport
root@localhost:/sys/class/gpio#


gpiochip448   对应GPIO1
gpiochip480对应GPIO2

gpiochip480 下有文件:
root@localhost:/sys/class/gpio# cd gpiochip480
root@localhost:/sys/class/gpio/gpiochip480# ls
basedevicelabelngpiopowersubsystemuevent
root@localhost:/sys/class/gpio/gpiochip480#

root@localhost:/sys/class/gpio/gpiochip480# cat base
480
root@localhost:/sys/class/gpio/gpiochip480# cat label
2300000.gpio
root@localhost:/sys/class/gpio/gpiochip480# cat ngpio
32
root@localhost:/sys/class/gpio/gpiochip480#


没有value文件, 要修改设备树么 ?该怎么修改

djh 发表于 2021-3-8 15:20:12

参考CPU手册将SDHC2_DAT3复用为GPIO,需要在RCW中修改相应字段SDHC2_BASE_DAT321,编译烧写镜像
RCW路径
OK10xx-linux-fs/flexbuild/packages/firmware/rcw/ls1012ardb/R_SPNH_3508/rcw_1000_default.rcw
可以参考知识库中的这篇文章:http://bbs.witech.com.cn/portal.php?mod=view&aid=458
页: [1]
查看完整版本: OK1012访问GPIO1_28