AnsweredAssumed Answered

Use space GPIO sysfs interface not working

Question asked by Michael Chen on Nov 29, 2018

Dear NXP Yiping Wang ufedor ,

 

Currently in our project, which is base on LS1048A, GPIO sysfs interface cannot work probably, and we need your help.

 

Here is the detail.

We can manually control the GPIO through devmem2 tool. For example, PHY_RESET is GPIO3_23 and SFP_LED is GPIO3_27,so we can use devmem2 to control both GPIOs

 

devmem2 0x2320000 w 0x00000110

devmem2 0x2320008 w 0x00000110

devmem2 0x2320018 w 0x00000110

 

But, when wen use GPIO sysfs interface, it's didn't work, and when we operate SFP_LED, it has impact on PHY_RESET, and we can see lots of abnormal print as followed.

 

root@ls1088ardb:~# echo 443 > /sys/class/gpio/export

root@ls1088ardb:~# echo out > /sys/class/gpio/gpio443/direction

root@ls1088ardb:~# [ 161.276474] mdio_bus 8b96000: Error while reading PHY1 reg at 1.1 [ 161.282669] mdio_bus 8b96000: Error while reading PHY1 reg at 1.1 [ 161.288864] mdio_bus 8b96000: Error while reading PHY1 reg at 10.10 [ 161.295219] mdio_bus 8b96000: Error while reading PHY1 reg at 9.9 [ 161.301406] mdio_bus 8b96000: Error while reading PHY1 reg at 5.5 [ 161.307587] mdio_bus 8b96000: Error while reading PHY1 reg at 4.4 [ 161.313772] mdio_bus 8b96000: Error while reading PHY1 reg at 1.1

 

Looking forward to hear from you soon.

 

Best regards

Chen Feng

Outcomes