Skip to content
Christian Ferbar edited this page Dec 20, 2016 · 1 revision

rpi3-gpiovirtbuf

Control Raspberry Pi 3's red power LED.

wget https://raw.githubusercontent.com/raspberrypi/firmware/master/extra/dt-blob.dts
nano dt-blob.dts

As above, make the changes:

@@ -1187,7 +1187,7 @@
             pin@p132 { function = "input";  termination = "no_pulling"; polarity = "active_low"; }; // Hotplug
             pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera LED
             pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera shutdown
-            pin@p135 { function = "input";  termination = "no_pulling"; polarity = "active_low"; }; // Power low
+            pin@p135 { function = "output";  termination = "pull_down"; startup_state = "inactive"; }; // Power low
          }; // pin_config

          pin_defines {
@@ -1236,8 +1236,7 @@
                type = "absent";
             };
             pin_define@POWER_LOW {
-               type = "external";
-               number = <7>;
+               type = "absent";
             };
             pin_define@LEDS_DISK_ACTIVITY {
                type = "external";

And

sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob.dts

to compile and install it (sudo apt-get install device-tree-compiler if you haven't already got the compiler installed).

The red power LED then comes on as the Pi initially boots, but is very quickly turned off again. It does come back on when you do sudo halt, but not much can be done about that (I suspect it is the reset condition of the chip).

If you checkout https://github.com/6by9/rpi3-gpiovirtbuf, using rpi3-gpiovirtbuf s 135 1 turns the LED on, and ending 0 turns it off again.

Clone this wiki locally