Part of My GPIO Interface Doesn't Work

GPIO number 154 156 157 … and more.
These were work several days ago. I have a simple script to enable the LED:

from periphery import GPIO
import time

RED_PIN = 154
AMBER_PIN = 156
GREEN_PIN = 157

# Open GPIO /dev/gpiochip0 line 10 with input direction
led_red = GPIO(RED_PIN, "out")
# Open GPIO /dev/gpiochip0 line 12 with output direction
led_amber = GPIO(AMBER_PIN, "out")
led_green = GPIO(GREEN_PIN, "out")

while True:
    led_red.write(True)
    time.sleep(1)
    led_red.write(False)
    led_amber.write(True)
    time.sleep(1)
    led_amber.write(False)
    led_green.write(True)
    time.sleep(1)
    led_green.write(False)

Same code, I have try different OS , like Debian and Ubuntu.
My gpioinfo output doesn’t show any PinName, just like this:

gpiochip0 - 32 lines:
        line   0:      unnamed       unused   input  active-high
        line   1:      unnamed       unused   input  active-high
        line   2:      unnamed       unused   input  active-high
        line   3:      unnamed       unused   input  active-high
        line   4:      unnamed "host-wakeup" input active-high [used]
        line   5:      unnamed       unused   input  active-high
        line   6:      unnamed       unused   input  active-high
        line   7:      unnamed         "cd"   input   active-low [used]
        line   8:      unnamed       unused   input  active-high
        line   9:      unnamed   "shutdown"  output  active-high [used]
        line  10:      unnamed      "reset"  output   active-low [used]
        line  11:      unnamed       unused   input  active-high
        line  12:      unnamed       unused   input  active-high
        line  13:      unnamed       unused   input  active-high
        line  14:      unnamed       unused   input  active-high
        line  15:      unnamed       unused   input  active-high
        line  16:      unnamed       unused   input  active-high
        line  17:      unnamed       unused   input  active-high
        line  18:      unnamed       unused   input  active-high
        line  19:      unnamed       unused   input  active-high
        line  20:      unnamed       unused   input  active-high
        line  21:      unnamed       unused   input  active-high
        line  22:      unnamed       unused   input  active-high
        line  23:      unnamed       unused   input  active-high
        line  24:      unnamed       unused   input  active-high
        line  25:      unnamed       unused   input  active-high
        line  26:      unnamed       unused   input  active-high
        line  27:      unnamed       unused   input  active-high
        line  28:      unnamed       unused   input  active-high
        line  29:      unnamed       unused   input  active-high
        line  30:      unnamed       unused   input  active-high
        line  31:      unnamed       unused   input  active-high

I am start wondering does my rock pi 4 plus broken.

I start feel this is because of somewhere broken. Because I tired CircuitPython, same behavior.

Some of the Pin just doesn’t work.

example:

[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board
>>> board.
board.ADC_IN0   board.D15       board.D23       board.D31       board.D38       board.MISO      board.SCL2      board.SDA6      board.UART4_TX  board.pin
board.CS        board.D16       board.D24       board.D32       board.D40       board.MOSI      board.SCL6      board.SDA7      board.UART_RX   board.sys
board.D10       board.D18       board.D27       board.D33       board.D5        board.PWM0      board.SCL7      board.SPI(      board.UART_TX
board.D11       board.D19       board.D28       board.D35       board.D7        board.PWM1      board.SCLK      board.UART2_RX  board.ap_board
board.D12       board.D21       board.D29       board.D36       board.D8        board.SCK       board.SDA       board.UART2_TX  board.board_id
board.D13       board.D22       board.D3        board.D37       board.I2C(      board.SCL       board.SDA2      board.UART4_RX  board.detector
>>> led = digitalio.DigitalInOut(board.D18)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'digitalio' is not defined
>>> import digitalio
>>> led = digitalio.DigitalInOut(board.D18)
>>> led.direction = digitalio.Direction.OUTPUT
>>> led.value = True
>>> led = digitalio.DigitalInOut(board.D3)
>>> led = digitalio.DigitalInOut(board.D6)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'board' has no attribute 'D6'
>>> led = digitalio.DigitalInOut(board.D16)
>>> led.value = True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/digitalio.py", line 210, in value
    raise AttributeError("Not an output")
AttributeError: Not an output
>>> led.direction = digitalio.Direction.OUTPUT
>>> led.value = True
>>> led = digitalio.DigitalInOut(board.D3)
>>> led.direction = digitalio.Direction.OUTPUT
>>> led.value = False
>>>

For D3 , it works fine , but for D16(154) D18(156) it just doesn’t work.

Hi guys,
i’ve the same issue but on all GPIO lines… i’can’t do anything… Below my gpioinfo command:

gpiochip0 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	line   1:      unnamed       unused   input  active-high 
	line   2:      unnamed       unused   input  active-high 
	line   3:      unnamed       unused   input  active-high 
	line   4:      unnamed       unused   input  active-high 
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed       unused   input  active-high 
	line   7:      unnamed       unused   input  active-high 
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed       unused   input  active-high 
	line  10:      unnamed      "reset"  output   active-low [used]
	line  11:      unnamed       unused   input  active-high 
	line  12:      unnamed       unused   input  active-high 
	line  13:      unnamed       unused   input  active-high 
	line  14:      unnamed       unused   input  active-high 
	line  15:      unnamed       unused   input  active-high 
	line  16:      unnamed       unused   input  active-high 
	line  17:      unnamed       unused   input  active-high 
	line  18:      unnamed       unused   input  active-high 
	line  19:      unnamed       unused   input  active-high 
	line  20:      unnamed       unused   input  active-high 
	line  21:      unnamed       unused   input  active-high 
	line  22:      unnamed       unused   input  active-high 
	line  23:      unnamed       unused   input  active-high 
	line  24:      unnamed       unused   input  active-high 
	line  25:      unnamed       unused   input  active-high 
	line  26:      unnamed       unused   input  active-high 
	line  27:      unnamed       unused   input  active-high 
	line  28:      unnamed       unused   input  active-high 
	line  29:      unnamed       unused   input  active-high 
	line  30:      unnamed       unused   input  active-high 
	line  31:      unnamed       unused   input  active-high 
gpiochip1 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	line   1:      unnamed       unused   input  active-high 
	line   2:      unnamed       unused   input  active-high 
	line   3:      unnamed "vcc5v0-typec-regulator" output active-high [used]
	line   4:      unnamed       unused   input  active-high 
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed       unused   input  active-high 
	line   7:      unnamed       unused   input  active-high 
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed       unused   input  active-high 
	line  10:      unnamed       unused   input  active-high 
	line  11:      unnamed       unused   input  active-high 
	line  12:      unnamed       unused   input  active-high 
	line  13:      unnamed       unused   input  active-high 
	line  14:      unnamed       unused   input  active-high 
	line  15:      unnamed       unused   input  active-high 
	line  16:      unnamed       unused   input  active-high 
	line  17:      unnamed       unused   input  active-high 
	line  18:      unnamed       unused   input  active-high 
	line  19:      unnamed       unused   input  active-high 
	line  20:      unnamed       unused   input  active-high 
	line  21:      unnamed       unused   input  active-high 
	line  22:      unnamed       unused   input  active-high 
	line  23:      unnamed       unused   input  active-high 
	line  24:      unnamed       unused   input  active-high 
	line  25:      unnamed       unused   input  active-high 
	line  26:      unnamed       unused   input  active-high 
	line  27:      unnamed       unused   input  active-high 
	line  28:      unnamed       unused   input  active-high 
	line  29:      unnamed       unused   input  active-high 
	line  30:      unnamed       unused   input  active-high 
	line  31:      unnamed       unused   input  active-high 
gpiochip2 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	line   1:      unnamed       unused   input  active-high 
	line   2:      unnamed       unused   input  active-high 
	line   3:      unnamed       unused   input  active-high 
	line   4:      unnamed       unused   input  active-high 
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed       unused   input  active-high 
	line   7:      unnamed       unused   input  active-high 
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed       unused   input  active-high 
	line  10:      unnamed       unused   input  active-high 
	line  11:      unnamed       unused   input  active-high 
	line  12:      unnamed       unused   input  active-high 
	line  13:      unnamed       unused   input  active-high 
	line  14:      unnamed       unused   input  active-high 
	line  15:      unnamed       unused   input  active-high 
	line  16:      unnamed       unused   input  active-high 
	line  17:      unnamed       unused   input  active-high 
	line  18:      unnamed       unused   input  active-high 
	line  19:      unnamed       unused   input  active-high 
	line  20:      unnamed       unused   input  active-high 
	line  21:      unnamed       unused   input  active-high 
	line  22:      unnamed       unused   input  active-high 
	line  23:      unnamed       unused   input  active-high 
	line  24:      unnamed       unused   input  active-high 
	line  25:      unnamed       unused   input  active-high 
	line  26:      unnamed       unused   input  active-high 
	line  27:      unnamed       unused   input  active-high 
	line  28:      unnamed       unused   input  active-high 
	line  29:      unnamed       unused   input  active-high 
	line  30:      unnamed       unused   input  active-high 
	line  31:      unnamed       unused   input  active-high 
gpiochip3 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	line   1:      unnamed       unused   input  active-high 
	line   2:      unnamed       unused   input  active-high 
	line   3:      unnamed       unused   input  active-high 
	line   4:      unnamed       unused   input  active-high 
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed       unused   input  active-high 
	line   7:      unnamed       unused   input  active-high 
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed       unused   input  active-high 
	line  10:      unnamed       unused   input  active-high 
	line  11:      unnamed       unused   input  active-high 
	line  12:      unnamed       unused   input  active-high 
	line  13:      unnamed       unused   input  active-high 
	line  14:      unnamed       unused   input  active-high 
	line  15:      unnamed "snps,reset"  output   active-low [used]
	line  16:      unnamed       unused   input  active-high 
	line  17:      unnamed       unused   input  active-high 
	line  18:      unnamed       unused   input  active-high 
	line  19:      unnamed       unused   input  active-high 
	line  20:      unnamed       unused   input  active-high 
	line  21:      unnamed       unused   input  active-high 
	line  22:      unnamed       unused   input  active-high 
	line  23:      unnamed       unused   input  active-high 
	line  24:      unnamed       unused   input  active-high 
	line  25:      unnamed "vcc3v3-pcie-regulator" output active-high [used]
	line  26:      unnamed       unused   input  active-high 
	line  27:      unnamed       unused   input  active-high 
	line  28:      unnamed  "user-led1"  output   active-low [used]
	line  29:      unnamed  "user-led2"  output  active-high [used]
	line  30:      unnamed  "vbus-host"  output  active-high [used]
	line  31:      unnamed       unused   input  active-high 
gpiochip4 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	line   1:      unnamed       unused   input  active-high 
	line   2:      unnamed       unused   input  active-high 
	line   3:      unnamed       unused   input  active-high 
	line   4:      unnamed       unused   input  active-high 
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed       unused   input  active-high 
	line   7:      unnamed       unused   input  active-high 
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed       unused   input  active-high 
	line  10:      unnamed       unused   input  active-high 
	line  11:      unnamed       unused   input  active-high 
	line  12:      unnamed       unused   input  active-high 
	line  13:      unnamed       unused   input  active-high 
	line  14:      unnamed       unused   input  active-high 
	line  15:      unnamed       unused   input  active-high 
	line  16:      unnamed       unused   input  active-high 
	line  17:      unnamed       unused   input  active-high 
	line  18:      unnamed       unused   input  active-high 
	line  19:      unnamed       unused   input  active-high 
	line  20:      unnamed       unused   input  active-high 
	line  21:      unnamed       unused   input  active-high 
	line  22:      unnamed       unused   input  active-high 
	line  23:      unnamed       unused   input  active-high 
	line  24:      unnamed       unused   input  active-high 
	line  25:      unnamed       unused   input  active-high 
	line  26:      unnamed       unused   input  active-high 
	line  27:      unnamed       unused  output  active-high 
	line  28:      unnamed       unused   input  active-high 
	line  29:      unnamed       unused   input  active-high 
	line  30:      unnamed       unused   input  active-high 
	line  31:      unnamed       unused   input  active-high 

Anyone can help me to understand the issue?.. the board is broken?.. i bought this board for replace rpi 4b…

In my case , it was work several days ago.
In the recent days , I upgraded the kernel to latest 5.10.110-11 with apt command.

I don’t recall I did anything else.
After I found the problem, I downgrade to 5.10.110-8. Still doesn’t work.

Hi @St3fano83, I am wondering did you do the same upgrade?

now i’m on armbian and my kernel version is 5.15.93-rockchip64

I tried armbian as well, but it doesn’t works.

It looks like we didn’t do libgpiod support before on the board of rock4 series, and i’ll check and fix this issue later.

Maybe worth nothing , I uninstall libgpiod package, still can not light LED through these PINs.

Is it also uncontrollable with the sysfs interface?

for example:

echo 154 > /sys/class/gpio/export
echo output > /sys/class/gpio/gpio154/direction
echo 1 > /sys/class/gpio/gpio154/value
echo 0 > /sys/class/gpio/gpio154/value

if it doesn’t work, maybe the hardware broken.

Unfortunately, it doesn’t work. As my testing, all GPIO Pins which in GPIO4 died.

Can I send my board to your company to repair it?

Are you in China ? If so, you can find our maintenance engineer in the wechat group and ask him to help take a look.

Yes, I do.
Where can I find the QRCode for the wechat group?

Thanks !

I have joined the wechat group which found here: 关于 | Radxa Docs

Also the QQ group.

But I am the only customer in the wechat group and no one answer my question yet.

And I didn’t get approval for the QQ group so far.

You can @ our team member in the WeChat group.

收到!非常感谢!
我会随机器附上一张说明纸条。