0
richardk

Rock64 LED control

Recommended Posts

I have a C++ app that wants to indicate its activity by blinking an LED on the Rock64.

 

How can the LEDs be controlled?  The sysfs leds do not appear to be present.  I'm okay with libgpiod or sysfs gpios, but I don't know what gpio numbers represent the LEDs.

 

Anyone know?  Thanks.

 

Linux rocky64 5.0.0-rockchip64 #5.85 SMP Wed May 8 19:38:28 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux

 

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
Codename:       bionic
 

Share this post


Link to post
Share on other sites
4 minutes ago, richardk said:

How can the LEDs be controlled?

None of the LEDs present on Rock64 is attached to SoC, they are connected to PMIC and VCC_SYS.

You will need to add one directly on GPIO header ...

Share this post


Link to post
Share on other sites

Okay, I see, they are connected to out1 and out2 on the RK805 PMIC.  So they wouldn't be just GPIOs.  But - presumably - the RK805 could be told how to control them...

 

Share this post


Link to post
Share on other sites

Furthermore... these i2cset commands work:

 

i2cset -f -y 1 0x18 0x52 3 # turn off both LEDs

i2cset -f -y 1 0x18 0x52 2 # turn off white, turn on red

i2cset -f -y 1 0x18 0x52 1 # turn off red, turn on white

i2cset -f -y 1 0x18 0x52 0 # turn on both red and white

 

Share this post


Link to post
Share on other sites
3 hours ago, richardk said:

It seems Armbian is missing out in some way.  The Pine64 folks know how to control them.

Good to know !

3 hours ago, richardk said:

Furthermore... these i2cset commands work:

 

i2cset -f -y 1 0x18 0x52 3 # turn off both LEDs

i2cset -f -y 1 0x18 0x52 2 # turn off white, turn on red

i2cset -f -y 1 0x18 0x52 1 # turn off red, turn on white

i2cset -f -y 1 0x18 0x52 0 # turn on both red and white

Thanks for sharing !

But in my case, white led seems to stay on, even with those commands, so only red one is controllable.

Share this post


Link to post
Share on other sites

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...
0