richardk Posted August 15, 2019 Posted August 15, 2019 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
martinayotte Posted August 15, 2019 Posted August 15, 2019 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 ...
richardk Posted August 16, 2019 Author Posted August 16, 2019 Hm. Okay. Posts on the pine64 forum led me to believe that they were controllable. https://forum.pine64.org/showthread.php?tid=5847
richardk Posted August 16, 2019 Author Posted August 16, 2019 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...
richardk Posted August 16, 2019 Author Posted August 16, 2019 It seems Armbian is missing out in some way. The Pine64 folks know how to control them. https://forum.pine64.org/showthread.php?tid=5764
richardk Posted August 16, 2019 Author Posted August 16, 2019 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 1
martinayotte Posted August 16, 2019 Posted August 16, 2019 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.
Recommended Posts