gpioset is not working with 6.1 kernel on imx8mp but gpioinfo is working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gpioset is not working with 6.1 kernel on imx8mp but gpioinfo is working

372 Views
Chandrasekhar-carrier
Contributor II

gpioset is not working as expected on IMX8MP

root@gryphon:~# cat /sys/class/gpio/
export gpiochip0/ gpiochip128/ gpiochip32/ gpiochip453/ gpiochip470/ gpiochip478/ gpiochip495/ gpiochip64/ gpiochip96/ unexport
root@gryphon:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/30200000.gpio, 30200000.gpio:
gpio-6 ( |wdt-in ) out lo
gpio-14 ( |regulator-vbus ) out hi

gpiochip1: GPIOs 32-63, parent: platform/30210000.gpio, 30210000.gpio:
gpio-44 ( |cd ) in lo IRQ ACTIVE LOW
gpio-51 ( |regulator-usdhc2 ) out hi

gpiochip2: GPIOs 64-95, parent: platform/30220000.gpio, 30220000.gpio:
gpio-80 ( |sys_status ) out hi

gpiochip3: GPIOs 96-127, parent: platform/30230000.gpio, 30230000.gpio:
gpio-100 ( |PHY reset ) out hi ACTIVE LOW
gpio-116 ( |PCIe reset ) out hi
gpio-118 ( |PHY reset ) out hi ACTIVE LOW

gpiochip4: GPIOs 128-159, parent: platform/30240000.gpio, 30240000.gpio:
gpio-137 ( |spi1 CS0 ) out hi ACTIVE LOW
gpio-141 ( |spi2 CS0 ) out hi ACTIVE LOW

gpiochip8: GPIOs 453-469, parent: i2c/1-003e, sx1509q, can sleep:
gpio-464 ( |wdt-set0 ) out hi
gpio-465 ( |wdt-set1 ) out hi
gpio-466 ( |wdt-set2 ) out lo

gpiochip7: GPIOs 470-477, parent: spi/spi1.0, spi1.0, can sleep:

gpiochip6: GPIOs 478-494, parent: i2c/5-0070, sx1509q, can sleep:
gpio-483 ( |soc_status ) out hi
gpio-493 ( |fixed-regulators:reg) out hi

gpiochip5: GPIOs 495-511, parent: i2c/5-003f, sx1509q, can sleep:
root@gryphon:~# gpioinfo
gpiochip0 - 32 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input consumer=interrupt
line 4: unnamed input
line 5: unnamed input
line 6: unnamed output consumer=wdt-in
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input consumer=interrupt
line 13: unnamed input
line 14: unnamed output consumer=regulator-vbus
line 15: unnamed input consumer=interrupt
line 16: unnamed input
line 17: unnamed input
line 18: unnamed input
line 19: unnamed input
line 20: unnamed input
line 21: unnamed input
line 22: unnamed input
line 23: unnamed input
line 24: unnamed input
line 25: unnamed input
line 26: unnamed input
line 27: unnamed input
line 28: unnamed input
line 29: unnamed input
line 30: unnamed input
line 31: unnamed input
gpiochip1 - 32 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input active-low consumer=cd
line 13: unnamed input
line 14: unnamed input
line 15: unnamed input
line 16: unnamed input
line 17: unnamed input
line 18: unnamed input
line 19: unnamed output consumer=regulator-usdhc2
line 20: unnamed input
line 21: unnamed input
line 22: unnamed input
line 23: unnamed input
line 24: unnamed input
line 25: unnamed input
line 26: unnamed input
line 27: unnamed input
line 28: unnamed input
line 29: unnamed input
line 30: unnamed input
line 31: unnamed input
gpiochip2 - 32 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input
line 13: unnamed input
line 14: unnamed input
line 15: unnamed input
line 16: unnamed output consumer=sys_status
line 17: unnamed input
line 18: unnamed input
line 19: unnamed input
line 20: unnamed input
line 21: unnamed input
line 22: unnamed input
line 23: unnamed input
line 24: unnamed input
line 25: unnamed input
line 26: unnamed input
line 27: unnamed input
line 28: unnamed input
line 29: unnamed input
line 30: unnamed input
line 31: unnamed input
gpiochip3 - 32 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed output
line 3: unnamed input consumer=interrupt
line 4: unnamed output active-low consumer=PHY reset
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input
line 13: unnamed input
line 14: unnamed input
line 15: unnamed input
line 16: unnamed input
line 17: unnamed input
line 18: unnamed input
line 19: unnamed input consumer=interrupt
line 20: unnamed output consumer=PCIe reset
line 21: unnamed input consumer=interrupt
line 22: unnamed output active-low consumer=PHY reset
line 23: unnamed input
line 24: unnamed input
line 25: unnamed input
line 26: unnamed input
line 27: unnamed input
line 28: unnamed input
line 29: unnamed input
line 30: unnamed input
line 31: unnamed input
gpiochip4 - 32 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed output active-low consumer=spi1 CS0
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input
line 13: unnamed output active-low consumer=spi2 CS0
line 14: unnamed output
line 15: unnamed output
line 16: unnamed input
line 17: unnamed input
line 18: unnamed input
line 19: unnamed input
line 20: unnamed input
line 21: unnamed input
line 22: unnamed input
line 23: unnamed input
line 24: unnamed input
line 25: unnamed input
line 26: unnamed input
line 27: unnamed input
line 28: unnamed input
line 29: unnamed input
line 30: unnamed input
line 31: unnamed input
gpiochip5 - 17 lines:
line 0: unnamed input
line 1: unnamed input consumer=interrupt
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input
line 13: unnamed input
line 14: unnamed input
line 15: unnamed input
line 16: unnamed output
gpiochip6 - 17 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed output consumer=soc_status
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input
line 13: unnamed input
line 14: unnamed input
line 15: unnamed output consumer=fixed-regulators:regulator-enet
line 16: unnamed output
gpiochip7 - 8 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
gpiochip8 - 17 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed output consumer=wdt-set0
line 12: unnamed output consumer=wdt-set1
line 13: unnamed output consumer=wdt-set2
line 14: unnamed input
line 15: unnamed input
line 16: unnamed output
root@gryphon:~# gpioset gpiochip1 6=0
gpioset: invalid line value: 'gpiochip1'
root@gryphon:~# gpiodetect
gpiochip0 [30200000.gpio] (32 lines)
gpiochip1 [30210000.gpio] (32 lines)
gpiochip2 [30220000.gpio] (32 lines)
gpiochip3 [30230000.gpio] (32 lines)
gpiochip4 [30240000.gpio] (32 lines)
gpiochip5 [sx1509q] (17 lines)
gpiochip6 [sx1509q] (17 lines)
gpiochip7 [spi1.0] (8 lines)
gpiochip8 [sx1509q] (17 lines)
root@gryphon:~# gpioset gpiochip1 6=0
gpioset: invalid line value: 'gpiochip1'
root@gryphon:~# dmesg | grep gpio
[ 2.321207] gpio gpiochip5: (sx1509q): not an immutable chip, please consider fixing it!
[ 2.339559] gpio gpiochip6: (sx1509q): not an immutable chip, please consider fixing it!
[ 2.749684] gpio gpiochip8: (sx1509q): not an immutable chip, please consider fixing it!
root@gryphon:~#



 

0 Kudos
Reply
1 Reply

248 Views
elFunko
Contributor III

Hi, have you tried using gpioset with the -c argument? You could try running the command as gpioset -c gpiochip1 6=0. For some reason, I encounter the same error when I don't include the -c argument. 

0 Kudos
Reply