Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Weird GPIOs on Tinker Board

Featured Replies

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

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.  

  • Author

Thank you! Currently, I don't need any cameras or screens at all. How do I forcefully update a kernel? To install the specific version manually?

 

  • Author

@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

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.