FDD-book/examples/part-07/ch32-fdt-embedded/lab04-edled/edled.dts
Edson Brandi 6e6dac94fe Add book companion files under examples/
Organize companion code and materials by book part:

  part-01/      Foundations
  part-02/      Kernel & driver fundamentals
  part-03/      Character & block devices
  part-04/      Networking & storage
  part-05/      Buses & advanced topics
  part-06/      Debugging & performance
  part-07/      Real-world drivers
  appendices/   Supplementary material
  README.md     Overview and build instructions
2026-04-25 16:51:00 +00:00

33 lines
789 B
Text

/*
* edled.dts - Overlay for the edled driver on Raspberry Pi 4
*
* Companion overlay for Chapter 32, Section 7 of
* "FreeBSD Device Drivers: From First Steps to Kernel Mastery."
*
* Adds an edled@0 node under /soc that references GPIO 18 as its
* LED output. Wire an LED with a current-limiting resistor between
* GPIO 18 (pin 12 on the header) and ground.
*
* The third cell of leds-gpios is the flag word:
* 0 = active high (pin drives 3.3V when active)
* 1 = active low (pin drives 0V when active)
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2711";
fragment@0 {
target-path = "/soc";
__overlay__ {
edled0: edled@0 {
compatible = "example,edled";
status = "okay";
leds-gpios = <&gpio 18 0>;
label = "lab-indicator";
};
};
};
};