Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

It is better to keep the decompile.bat in different directory after first decompile, as some changes to the textual device tree file will get lost if we accidentially decompile the blob in the same directory where the modified DTS file is.

Now lets add the GPIO LED binding to the device tree. As I have started with decompiled device tree file, so all node labels are lost, and we have no easy means to reference the nodes by symbolic names. So we add back the label to PS7_GPIO node first.

So at the line:

  ps7-gpio@e000a000 {

We added the label and semicolon:

ps7_gpio_0: ps7-gpio@e000a000 {

Next, somewhere says after the memory node, we add the LEDS node that maps MIO7 to GPIO LED device like this

 memory@0 {
device_type = "memory";
reg = <0x0 0x10000000>;
};
 /* We insert LED's node here */
leds {
compatible = "gpio-leds";
red {
label = "TE0720:Red:On-Board-User-LED";
gpios = <&ps7_gpio_0 7 0>; /* Active High */
};
};
/* End of LED's */

Thats all, now we invoke compile.bat and copy the devicetree.dtb file back the SDd Card.

 

 

 

 

 

Zedboard OOB Design

The SD Card images delivered with zedboard (and available as OOB SD Card images) include a kernel 3.09 with GPIO-LEDS enabled on MIO7 with default trigger set to MMC (SD Card) activity. Writing none to LED trigger would allow direct programmatic control over MIO7 LED on zedboard (labelled LD9!). 

...