Skip to content

dts: Added overlay for gpio_ir_recv driver #1199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dtb-$(RPI_DT_OVERLAYS) += at86rf233-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += gpio-poweroff-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb
Expand Down
16 changes: 16 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,22 @@ Params: int_pin GPIO used for INT (default 25)
speed SPI bus speed (default 12000000)


Name: gpio-ir
Info: Use GPIO pin as rc-core style infrared receiver input. The rc-core-
based gpio_ir_recv driver maps received keys directly to a
/dev/input/event* device, all decoding is done by the kernel - LIRC is
not required! The key mapping and other decoding parameters can be
configured by "ir-keytable" tool.
Load: gpio-ir,<param>=<val>
Params: gpio_pin Input pin number. Default is 18.

gpio_pull Desired pull-up/down state (off, down, up)
Default is "down".

linux,rc-map-name Default rc keymap (can also be changed by
ir-keytable), defaults to "rc-rc6-mce"


Name: gpio-poweroff
Info: Drives a GPIO high or low on reboot
Load: gpio-poweroff,<param>=<val>
Expand Down
45 changes: 45 additions & 0 deletions arch/arm/boot/dts/overlays/gpio-ir-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Definitions for ir-gpio module
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

fragment@0 {
target-path = "/";
__overlay__ {
gpio_ir: ir-receiver {
compatible = "gpio-ir-receiver";

// pin number, high or low
gpios = <&gpio 18 1>;

// parameter for keymap name
linux,rc-map-name = "rc-rc6-mce";

status = "okay";
};
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
gpio_ir_pins: gpio_ir_pins {
brcm,pins = <18>; // pin 18
brcm,function = <0>; // in
brcm,pull = <1>; // down
};
};
};

__overrides__ {
// parameters
gpio_pin = <&gpio_ir>,"gpios:4",
<&gpio_ir_pins>,"brcm,pins:0",
<&gpio_ir_pins>,"brcm,pull:0"; // pin number
gpio_pull = <&gpio_ir_pins>,"brcm,pull:0"; // pull-up/down state

rc-map-name = <&gpio_ir>,"linux,rc-map-name"; // default rc map
};
};