Jump to content

Recommended Posts

Posted (edited)

Hi! 
When I try to access PWM via procedure described here

https://tinker-board.asus.com/forum/index.php?/topic/15132-direct-gpio-access/

I see that

Quote

pwmchip2

&

Quote

pwmchip3

are not present (although they should be)

 

I can see pwmchip0, but I don't understand what GPIO it is.
Following ASUS docs from GitHub

https://github.com/TinkerBoard/TinkerBoard/wiki/User-Guide#gpio-config-table-for-tinker-board-s--tinker-board-s-r20

 

GPIO32 and GPIO33 should be here:

PWM:/sys/class/pwm/pwmchip3

and PWM:/sys/class/pwm/pwmchip2

 

But those directories are not present.

root@tinkerboard:~# ls -la /sys/class/pwm/
total 0
drwxr-xr-x  2 root root 0 Oct  7 11:47 .
drwxr-xr-x 65 root root 0 Jan  1  1970 ..
lrwxrwxrwx  1 root root 0 Oct  7 11:47 pwmchip0 -> ../../devices/platform/ff680000.pwm/pwm/pwmchip0


 

 

My Armbian Env is:

 

verbosity=0
bootlogo=true
console=serial
overlay_prefix=rockchip
overlays=i2c1 i2c4 spi2 spidev2 uart1 uart2
rootdev=UUID=7a71009a-a5f6-439f-a2d3-38574c1ea09b
rootfstype=ext4
extraargs=vt.global_cursor_default=0 quiet splash plymouth.ignore-serial-consoles systemd.unified_cgroup_hierarchy=0
stdout=serial
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

Edited by SuperMaximus
Added info
Posted

Unfortunately I don't have a Tinkerboard S R2.0 but a Tinkerboard S R1.0.

I took a look into the device trees and in fact I have the confirmation: for the Tinkerboard (all versions) only the pwm0 is enabled. pwm1, 2 and 3 are disabled.

 

If you're still interested, I can provide the necessary device tree overlays to enable them selectively.

Posted

Thanks for your recommendation. I followed it and added pwm1, pwm2, pwm3 to my armbianEnv

verbosity=0
bootlogo=true
console=serial
overlay_prefix=rockchip
overlays=i2c1 i2c4 spi2 spidev2 uart1 uart2 pwm1 pwm2 pwm3
rootdev=UUID=7a71009a-a5f6-439f-a2d3-38574c1ea09b
rootfstype=ext4
extraargs=vt.global_cursor_default=0 quiet splash plymouth.ignore-serial-consoles systemd.unified_cgroup_hierarchy=0
stdout=serial
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

And now my Tinkerboard can't boot at all. I can't even connect via SSH. Is there any way out of it?
Thanks!

Posted

@SuperMaximus oh, that's weird, sorry for the inconvenience!

You should be able to attach an usb cable to the USB micro OTG port and then to a computer: the tinkerboard will appear as a mass storage device and you should be able to revert the changes.

 

By the way, always enable only the overlay you need. I double checked and to use pwm2 or pwm3 ,you need to disable uart2 because some pins are muxed.

Anyway I see something wrong in the device tree for the tinkerboard: all 4 uarts are enabled in the base device tree, thus having the overlays to enable is not useful and, moreover, uart2 should be the debug uart which is not a good idea to disable.

 

I need to investigate a bit in this, but I hope you will be able at least to restore functionality of the board.

Posted

@SuperMaximus I just double checked on a pristine armbian installation on my tinkerboard and enabling pwm1, pwm2 and pwm3 does not incur in any inconvenience.

All the 4 pwms are available in my case:

root@tinkerboard:/sys/class/pwm# ls -lah
total 0
drwxr-xr-x  2 root root 0 Oct 14 12:26 .
drwxr-xr-x 66 root root 0 Oct 14 12:26 ..
lrwxrwxrwx  1 root root 0 Oct 14 12:26 pwmchip0 -> ../../devices/platform/ff680000.pwm/pwm/pwmchip0
lrwxrwxrwx  1 root root 0 Oct 14 12:26 pwmchip1 -> ../../devices/platform/ff680010.pwm/pwm/pwmchip1
lrwxrwxrwx  1 root root 0 Oct 14 12:26 pwmchip2 -> ../../devices/platform/ff680020.pwm/pwm/pwmchip2
lrwxrwxrwx  1 root root 0 Oct 14 12:26 pwmchip3 -> ../../devices/platform/ff680030.pwm/pwm/pwmchip3

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines