Jump to content

Weird GPIOs on Tinker Board


Gaaarfild

Recommended Posts

Hello everyone.

Tried to use GPIO. Installed the necessary C library.

 

# ls -l /sys/class/gpio/      
total 0
--w------- 1 root root 4096 Jul  9 23:40 export
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1000 -> ../../devices/platform/pinctrl/gpio/gpiochip1000
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1024 -> ../../devices/platform/pinctrl/gpio/gpiochip1024
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1056 -> ../../devices/platform/pinctrl/gpio/gpiochip1056
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1088 -> ../../devices/platform/pinctrl/gpio/gpiochip1088
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1120 -> ../../devices/platform/pinctrl/gpio/gpiochip1120
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1152 -> ../../devices/platform/pinctrl/gpio/gpiochip1152
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1184 -> ../../devices/platform/pinctrl/gpio/gpiochip1184
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1216 -> ../../devices/platform/pinctrl/gpio/gpiochip1216
lrwxrwxrwx 1 root root    0 Jul  9 23:43 gpiochip1248 -> ../../devices/platform/pinctrl/gpio/gpiochip1248
--w------- 1 root root 4096 Jul  9 23:43 unexport


As you can see, there are some weird numbers. The only one pin I could find was gpiochip1184. It was pin 184. Others not even match a pattern of last 3 numbers.

Maybe you could help me, what is wrong there?

 

Model: Asus Tinker Board S.

 

Thank you.

Edited by Gaaarfild
Link to comment
Share on other sites

Please provide the output of armbianmonitor -u

 

I had the gpio returned to base 0 (Rockchip decided it should be base 1000 at some point for unclear reasons involving Android if I remember correctly.)

 

If that is not still the case, it could be due to the recent issue with kernels resulting in us reverting to an older kernel source.  Some of the the patches that were no longer needed may again need added.  

Link to comment
Share on other sites

Yes, that one is still counting from 1000. Do you need multimedia or touch screen/camera? If not I recommend a mainline kernel, the legacy kernel has sadly taken a turn for the worse recently and needs some work.

Sent from my Pixel using Tapatalk

Link to comment
Share on other sites

@Igor Thank you very much. It was quite easy :)

Now GPIO looks a bit different. But I still don't see most of the numbers in GPIO table

$ ls /sys/class/gpio/
export  gpiochip0  gpiochip120  gpiochip152  gpiochip184  gpiochip216  gpiochip24  gpiochip248  gpiochip56  gpiochip88  unexport

This is a table:
 

$ sudo gpio readall

 +-----+-----+---------+------+---+--Tinker--+---+------+---------+-----+-----+
 | CPU | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | CPU |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 | 252 |   8 |   SDA.1 |  I2C | 1 |  3 || 4  |   |      | 5v      |     |     |
 | 253 |   9 |   SCL.1 |  I2C | 1 |  5 || 6  |   |      | 0v      |     |     |
 |  17 |   7 | GPIO0C1 |   IN | 0 |  7 || 8  | 1 | SERL | TxD.1   | 15  | 161 |
 |     |     |      0v |      |   |  9 || 10 | 1 | SERL | RxD.1   | 16  | 160 |
 | 164 |   0 |  CTSN.4 | SERL | 1 | 11 || 12 | 1 | I2S  | I2S_CLK | 1   | 184 |
 | 166 |   2 | GPIO5B6 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |
 | 167 |   3 | GPIO5B7 |   IN | 1 | 15 || 16 | 1 | IN   | GPIO5B2 | 4   | 162 |
 |     |     |    3.3v |      |   | 17 || 18 | 1 | IN   | GPIO5B3 | 5   | 163 |
 | 257 |  12 |  MOSI.2 |  SPI | 0 | 19 || 20 |   |      | 0v      |     |     |
 | 256 |  13 |  MISO.2 |  SPI | 1 | 21 || 22 | 0 | IN   | GPIO5C3 | 6   | 171 |
 | 254 |  14 |  SCLK.2 |  SPI | 1 | 23 || 24 | 1 | SPI  | CE0.2   | 10  | 255 |
 |     |     |      0v |      |   | 25 || 26 | 1 | SPI  | CE1.2   | 11  | 251 |
 | 233 |  30 |   SDA.4 |  I2C | 1 | 27 || 28 | 1 | I2C  | SCL.4   | 31  | 234 |
 | 165 |  21 |  RTSN.4 | SERL | 1 | 29 || 30 |   |      | 0v      |     |     |
 | 168 |  22 | GPIO5C0 |   IN | 1 | 31 || 32 | 1 | SERL | GPIO7C7 | 26  | 239 |
 | 238 |  23 | GPIO7C6 | SERL | 1 | 33 || 34 |   |      | 0v      |     |     |
 | 185 |  24 |  I2S_FS |  I2S | 0 | 35 || 36 | 1 | SERL | RxD.3   | 27  | 223 |
 | 224 |  25 |   TxD.3 | SERL | 1 | 37 || 38 | 1 | I2S  | I2S_SDI | 28  | 187 |
 |     |     |      0v |      |   | 39 || 40 | 0 | I2S  | I2S_SDO | 29  | 188 |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | CPU | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | CPU |
 +-----+-----+---------+------+---+--Tinker--+---+------+---------+-----+-----+

Also one more armbianmonitor output: http://ix.io/1d8o

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines