forked from RobertCNelson/bb.org-overlays
-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BBB and BBAI compatible relayCape DT overlay
- Loading branch information
1 parent
fc7f653
commit 54f626b
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright (C) 2020 Deepak Khatri <[email protected]> | ||
* | ||
* 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/; | ||
|
||
/* | ||
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ | ||
*/ | ||
&{/chosen} { | ||
overlays { | ||
BBORG_RELAY-00A2 = __TIMESTAMP__; | ||
}; | ||
}; | ||
|
||
/* | ||
* Free up the pins used by the cape from the pinmux helpers. | ||
*/ | ||
&ocp { | ||
P9_41_pinmux { status = "disabled"; }; | ||
P9_42_pinmux { status = "disabled"; }; | ||
P9_30_pinmux { status = "disabled"; }; | ||
P9_27_pinmux { status = "disabled"; }; | ||
}; | ||
|
||
/* | ||
* Enable and Update the default state of the pins | ||
*/ | ||
&ocp { | ||
P9_41_pinmux { status = "okay"; pinctrl-0 = <&P9_41_gpio_pin>;}; | ||
P9_42_pinmux { status = "okay"; pinctrl-0 = <&P9_42_gpio_pin>;}; | ||
P9_30_pinmux { status = "okay"; pinctrl-0 = <&P9_30_gpio_pin>;}; | ||
P9_27_pinmux { status = "okay"; pinctrl-0 = <&P9_27_gpio_pin>;}; | ||
}; | ||
|
||
/* | ||
* Easy realy 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_P9_41{ | ||
status = "okay"; | ||
label = "relay1"; | ||
default-state = "keep"; | ||
}; | ||
|
||
led_P9_42{ | ||
status = "okay"; | ||
label = "relay2"; | ||
default-state = "keep"; | ||
}; | ||
|
||
led_P9_30{ | ||
status = "okay"; | ||
label = "relay3"; | ||
default-state = "keep"; | ||
}; | ||
|
||
led_P9_27{ | ||
status = "okay"; | ||
label = "relay4"; | ||
default-state = "keep"; | ||
}; | ||
}; | ||
}; |