AnsweredAssumed Answered

i.MX6 sysfs GPIO value report error on MCIMX6Q-SDP with yocto 3.14.28

Question asked by m.c on Apr 6, 2016

We use below command to test and found error.

 

memtool IOMUXC.SW_MUX_CTL_PAD_ENET_TXD0.MUX_MODE

cd /sys/class/gpio

echo 30 > export

cd gpio30

echo out > direction

cat value

memtool GPIO1.DR

echo 1 > value

cat value

cat value

cat value

memtool GPIO1.DR

 

 

memtool IOMUXC.SW_MUX_CTL_PAD_EIM_EB2.MUX_MODE

cd /sys/class/gpio

echo 62 > export

cd gpio62

echo out > direction

cat value

memtool GPIO2.DR

echo 1 > value

cat value

cat value

cat value

memtool GPIO2.DR

 

 

 

 

Test result

root@imx6qsabresd:~# memtool IOMUXC.SW_MUX_CTL_PAD_ENET_TXD0.MUX_MODE

SOC: i.MX6Q

IOMUXC   Addr:0x20e0000

  IOMUXC.SW_MUX_CTL_PAD_ENET_TXD0 Addr:0x020E01F0 Value:0x00000005 -

     IOMUXC.SW_MUX_CTL_PAD_ENET_TXD0.MUX_MODE(0..2)     :0x5

             MUX Mode Select Field.

 

 

root@imx6qsabresd:~# cd /sys/class/gpio

root@imx6qsabresd:/sys/class/gpio# echo 30 > export

root@imx6qsabresd:/sys/class/gpio# cd gpio30

root@imx6qsabresd:/sys/class/gpio/gpio30# echo out > direction

root@imx6qsabresd:/sys/class/gpio/gpio30# cat value

!!!!!! drivers/gpio/gpio-generic.c:143:bgpio_get() gpio=30

!!!!!! drivers/gpio/gpio-generic.c:144:bgpio_get() bgc->reg_dat=0xc0820008

!!!!!! drivers/gpio/gpio-generic.c:145:bgpio_get() bgc->read_reg()=0x1c1f03f8

!!!!!! drivers/gpio/gpio-generic.c:146:bgpio_get() bgc->pin2mask()=0x40000000

0

root@imx6qsabresd:/sys/class/gpio/gpio30# memtool GPIO1.DR

SOC: i.MX6Q

GPIO1    Addr:0x209c000

  GPIO1.DR Addr:0x0209C000 Value:0x3E1F03F8 - The 32-bit GPIO_DR register stores data that is ready to be driven to the output lines.

     GPIO1.DR.DR(0..31)         :0x3e1f03f8

             Data bits.

 

 

root@imx6qsabresd:/sys/class/gpio/gpio30# echo 1 > value

root@imx6qsabresd:/sys/class/gpio/gpio30# cat value

!!!!!! drivers/gpio/gpio-generic.c:143:bgpio_get() gpio=30

!!!!!! drivers/gpio/gpio-generic.c:144:bgpio_get() bgc->reg_dat=0xc0820008

!!!!!! drivers/gpio/gpio-generic.c:145:bgpio_get() bgc->read_reg()=0x1c1f03f8

!!!!!! drivers/gpio/gpio-generic.c:146:bgpio_get() bgc->pin2mask()=0x40000000

0

root@imx6qsabresd:/sys/class/gpio/gpio30# cat value

!!!!!! drivers/gpio/gpio-generic.c:143:bgpio_get() gpio=30

!!!!!! drivers/gpio/gpio-generic.c:144:bgpio_get() bgc->reg_dat=0xc0820008

!!!!!! drivers/gpio/gpio-generic.c:145:bgpio_get() bgc->read_reg()=0x1c1f03f8

!!!!!! drivers/gpio/gpio-generic.c:146:bgpio_get() bgc->pin2mask()=0x40000000

0

root@imx6qsabresd:/sys/class/gpio/gpio30# cat value

!!!!!! drivers/gpio/gpio-generic.c:143:bgpio_get() gpio=30

!!!!!! drivers/gpio/gpio-generic.c:144:bgpio_get() bgc->reg_dat=0xc0820008

!!!!!! drivers/gpio/gpio-generic.c:145:bgpio_get() bgc->read_reg()=0x1c1f03f8

!!!!!! drivers/gpio/gpio-generic.c:146:bgpio_get() bgc->pin2mask()=0x40000000

0

root@imx6qsabresd:/sys/class/gpio/gpio30# memtool GPIO1.DR

SOC: i.MX6Q

GPIO1    Addr:0x209c000

  GPIO1.DR Addr:0x0209C000 Value:0x7E1F03F8 - The 32-bit GPIO_DR register stores data that is ready to be driven to the output lines.

     GPIO1.DR.DR(0..31)         :0x7e1f03f8

             Data bits.

 

 

root@imx6qsabresd:~# memtool IOMUXC.SW_MUX_CTL_PAD_EIM_EB2.MUX_MODE

PIO2.DR

SOC: i.MX6Q

IOMUXC   Addr:0x20e0000

  IOMUXC.SW_MUX_CTL_PAD_EIM_EB2 Addr:0x020E008C Value:0x00000005 -

     IOMUXC.SW_MUX_CTL_PAD_EIM_EB2.MUX_MODE(0..2)       :0x5

             MUX Mode Select Field.

 

 

root@imx6qsabresd:~# cd /sys/class/gpio

root@imx6qsabresd:/sys/class/gpio# echo 62 > export

root@imx6qsabresd:/sys/class/gpio# cd gpio62

root@imx6qsabresd:/sys/class/gpio/gpio62# echo out > direction

root@imx6qsabresd:/sys/class/gpio/gpio62# cat value

!!!!!! drivers/gpio/gpio-generic.c:143:bgpio_get() gpio=30

!!!!!! drivers/gpio/gpio-generic.c:144:bgpio_get() bgc->reg_dat=0xc0828008

!!!!!! drivers/gpio/gpio-generic.c:145:bgpio_get() bgc->read_reg()=0x0100000c

!!!!!! drivers/gpio/gpio-generic.c:146:bgpio_get() bgc->pin2mask()=0x40000000

0

root@imx6qsabresd:/sys/class/gpio/gpio62# memtool GPIO2.DR

SOC: i.MX6Q

GPIO2    Addr:0x20a0000

  GPIO2.DR Addr:0x020A0000 Value:0x8100000C - The 32-bit GPIO_DR register stores data that is ready to be driven to the output lines.

     GPIO2.DR.DR(0..31)         :0x8100000c

             Data bits.

 

 

root@imx6qsabresd:/sys/class/gpio/gpio62# echo 1 > value

root@imx6qsabresd:/sys/class/gpio/gpio62# cat value

!!!!!! drivers/gpio/gpio-generic.c:143:bgpio_get() gpio=30

!!!!!! drivers/gpio/gpio-generic.c:144:bgpio_get() bgc->reg_dat=0xc0828008

!!!!!! drivers/gpio/gpio-generic.c:145:bgpio_get() bgc->read_reg()=0x0100000c

!!!!!! drivers/gpio/gpio-generic.c:146:bgpio_get() bgc->pin2mask()=0x40000000

0

root@imx6qsabresd:/sys/class/gpio/gpio62# cat value

!!!!!! drivers/gpio/gpio-generic.c:143:bgpio_get() gpio=30

!!!!!! drivers/gpio/gpio-generic.c:144:bgpio_get() bgc->reg_dat=0xc0828008

!!!!!! drivers/gpio/gpio-generic.c:145:bgpio_get() bgc->read_reg()=0x0100000c

!!!!!! drivers/gpio/gpio-generic.c:146:bgpio_get() bgc->pin2mask()=0x40000000

0

root@imx6qsabresd:/sys/class/gpio/gpio62# cat value

!!!!!! drivers/gpio/gpio-generic.c:143:bgpio_get() gpio=30

!!!!!! drivers/gpio/gpio-generic.c:144:bgpio_get() bgc->reg_dat=0xc0828008

!!!!!! drivers/gpio/gpio-generic.c:145:bgpio_get() bgc->read_reg()=0x0100000c

!!!!!! drivers/gpio/gpio-generic.c:146:bgpio_get() bgc->pin2mask()=0x40000000

0

root@imx6qsabresd:/sys/class/gpio/gpio62# memtool GPIO2.DR

SOC: i.MX6Q

GPIO2    Addr:0x20a0000

  GPIO2.DR Addr:0x020A0000 Value:0xC100000C - The 32-bit GPIO_DR register stores data that is ready to be driven to the output lines.

     GPIO2.DR.DR(0..31)         :0xc100000c

             Data bits.

Original Attachment has been moved to: 20160407-mcimx6qsdp-debug_gpio-10.txt.zip

Original Attachment has been moved to: L3.14.28-debug-gpio.diff.zip

Outcomes