-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lirc-rpi: Add device tree support, and a suitable overlay
The overlay supports DT parameters that match the old module parameters, except that gpio_in_pull should be set using the strings "up", "down" or "off". lirc-rpi: Also support pinctrl-bcm2835 in non-DT mode
- Loading branch information
1 parent
567c62f
commit 0282021
Showing
2 changed files
with
183 additions
and
28 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,57 @@ | ||
// Definitions for lirc-rpi module | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
/ { | ||
compatible = "brcm,bcm2708"; | ||
|
||
fragment@0 { | ||
target-path = "/"; | ||
__overlay__ { | ||
lirc_rpi: lirc_rpi { | ||
compatible = "rpi,lirc-rpi"; | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&lirc_pins>; | ||
status = "okay"; | ||
|
||
// Override autodetection of IR receiver circuit | ||
// (0 = active high, 1 = active low, -1 = no override ) | ||
rpi,sense = <0xffffffff>; | ||
|
||
// Software carrier | ||
// (0 = off, 1 = on) | ||
rpi,softcarrier = <1>; | ||
|
||
// Invert output | ||
// (0 = off, 1 = on) | ||
rpi,invert = <0>; | ||
|
||
// Enable debugging messages | ||
// (0 = off, 1 = on) | ||
rpi,debug = <0>; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@1 { | ||
target = <&gpio>; | ||
__overlay__ { | ||
lirc_pins: lirc_pins { | ||
brcm,pins = <17 18>; | ||
brcm,function = <1 0>; // out in | ||
brcm,pull = <0 1>; // off down | ||
}; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
gpio_out_pin = <&lirc_pins>,"brcm,pins:0"; | ||
gpio_in_pin = <&lirc_pins>,"brcm,pins:4"; | ||
gpio_in_pull = <&lirc_pins>,"brcm,pull:4"; | ||
|
||
sense = <&lirc_rpi>,"rpi,sense:0"; | ||
softcarrier = <&lirc_rpi>,"rpi,softcarrier:0"; | ||
invert = <&lirc_rpi>,"rpi,invert:0"; | ||
debug = <&lirc_rpi>,"rpi,debug:0"; | ||
}; | ||
}; |
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