aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/overlays/dht11-overlay.dts
blob: 6feeeb402493eb70f695280ace1db73606dfc858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Overlay for the DHT11/21/22 humidity/temperature sensor modules.
 */
/dts-v1/;
/plugin/;

/ {
	compatible = "brcm,bcm2835";

	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@0 {
				brcm,pins = <4>;
				brcm,function = <0>; // in
				brcm,pull = <0>; // off
			};
		};
	};

	__overrides__ {
		gpiopin = <&dht11_pins>,"brcm,pins:0",
			<&dht11_pins>, "reg:0",
			<&dht11>,"gpios:4",
			<&dht11>,"reg:0";
	};
};