Skip to content

Commit

Permalink
Merge pull request #1017 from P33M/rpi-4.0.y
Browse files Browse the repository at this point in the history
Add overlays for the DHT11 sensor
  • Loading branch information
pelwell committed Jun 10, 2015
2 parents dc48d12 + b9a6733 commit 5cc3907
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ endif

dtb-$(RPI_DT_OVERLAYS) += ads7846-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) += hifiberry-amp-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb
Expand Down
39 changes: 39 additions & 0 deletions arch/arm/boot/dts/overlays/dht11-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Overlay for the DHT11/21/22 humidity/temperature sensor modules.
*/
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

fragment@0 {
target-path = "/";
__overlay__ {

dht11: dht11@0 {
compatible = "dht11";
pinctrl-names = "default";
pinctrl-0 = <&dht11_pins>;
gpios = <&gpio 4 0>;
status = "okay";
};
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
dht11_pins: dht11_pins {
brcm,pins = <4>;
brcm,function = <0>; // in
brcm,pull = <0>; // off
};
};
};

__overrides__ {
gpiopin = <&dht11_pins>,"brcm,pins:0",
<&dht11>,"gpios:4";
};
};
5 changes: 5 additions & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,11 @@ CONFIG_BCM2708_MBOX=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_EXTCON=m
CONFIG_EXTCON_ARIZONA=m
CONFIG_IIO=m
CONFIG_IIO_BUFFER=y
CONFIG_IIO_BUFFER_CB=y
CONFIG_IIO_KFIFO_BUF=m
CONFIG_DHT11=m
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,11 @@ CONFIG_BCM2708_MBOX=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_EXTCON=m
CONFIG_EXTCON_ARIZONA=m
CONFIG_IIO=m
CONFIG_IIO_BUFFER=y
CONFIG_IIO_BUFFER_CB=y
CONFIG_IIO_KFIFO_BUF=m
CONFIG_DHT11=m
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
Expand Down

0 comments on commit 5cc3907

Please sign in to comment.