summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Khatri <deepaklorkhatri7@gmail.com>2020-10-25 03:36:23 +0530
committerRobert Nelson <robertcnelson@gmail.com>2020-10-24 19:43:45 -0500
commit9a6a1aab133894d522b40137e5cc34fe32269d9e (patch)
tree84d18ccdb25e54212a58445a9e0c35927ea419f7
parent9177d79eef3ac4f1eeb0d303b636213511f4ea7d (diff)
Bone LED P8_03 DT overlay
Demo DT overlay for using Bone LED interface for any P8 header pin, Can be used as a template for any LED project.
-rw-r--r--src/arm/overlays/BONE-LED_P8_03.dts52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/arm/overlays/BONE-LED_P8_03.dts b/src/arm/overlays/BONE-LED_P8_03.dts
new file mode 100644
index 0000000..1666155
--- /dev/null
+++ b/src/arm/overlays/BONE-LED_P8_03.dts
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2020 Deepak Khatri <deepaklorkhatri7@gmail.com>
+ * https://lorforlinux.github.io/GSoC2020_BeagleBoard.org/
+ *
+ * See Cape Interface Spec page for more info on Bone Buses
+ * https://elinux.org/Beagleboard:BeagleBone_cape_interface_spec
+ *
+ * Virtual cape for LED on P8_03
+ * Supports BBB, BBBWL, and BBAI
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/chosen} {
+ overlays {
+ BONE-LED_P8_03 = __TIMESTAMP__;
+ };
+};
+
+/*
+ * Update the default pinmux of the pins.
+ * See these files for the phandles (&P9_* & &P8_*)
+ * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am335x-bone-common-univ.dtsi
+ * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am572x-bone-common-univ.dtsi
+ */
+&ocp {
+ P8_03_pinmux { pinctrl-0 = <&P8_03_gpio_pin>;}; /* lcd: lcd_data0 */
+};
+
+/*
+ * Easy LED control through sysfs (/sys/class/leds/) using gpio-leds driver
+ * See these files for the led_P8_#/led_P9_# definition
+ * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi
+ * https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi
+ *
+ */
+
+&{/} {
+ leds {
+ led_P8_03 {
+ status = "okay";
+ label = "led_P8_03"; // sys/class/leds/<label>
+ linux,default-trigger = "heartbeat";
+ default-state = "on";
+ };
+ };
+}; \ No newline at end of file