forked from vuorioi/amg88xx-kernel-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
amg88xx-overlay.dts
73 lines (59 loc) · 1.71 KB
/
amg88xx-overlay.dts
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// This is a simple device tree overlay example for RPi
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&gpio>;
__overlay__ {
// This fragment specifies the GPIO pins used
// by the device. There is only one interrupt
// line in use and it should be pulled high.
amg88xx_pins: amg88xx_pins {
brcm,pins = <4>; // Pin: GPIO04
brcm,function = <0>; // Direction: in
brcm,pull = <2>; // Pull-up enabled
};
};
};
fragment@1 {
target = <&i2c1>;
__overlay__ {
// Reg only contains a single value for the device
// address and no size
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
amg88xx: amg88xx {
compatible = "panasonic,amg88xx";
reg = <0x68>;
// Reference to the pinctrl node for this
// device
pinctrl-names = "default";
pinctrl-0 = <&amg88xx_pins>;
// GPIO controller is also our interrupt
//controller
interrupt-parent = <&gpio>;
// Pin: GPIO04, high-to-low edge
interrupts = <4 2>;
// GPIO-pin for reading the value of the
// interrupt line.
interrupt-gpio = <&gpio 4 0>;
};
};
};
// Load time parameters that can be used to overwrite the
// default values. Usage:
// # dtoverlay amg88xx.dtbo <param>=<value>
__overrides__ {
// I2C slave adress. This defaults to 0x68 (i.e.
// amg88xx ad_select pin is pulled low) but can also
// be set to 0x69 (ad_select pulled high).
slave-address = <&amg88xx>,"reg.0";
// Interrupt pin (default: GPIO04). Note that we need
// to set the value to three places.
interrupt = <&amg88xx_pins>,"brcm,pins:0",
<&amg88xx>,"interrupts:0",
<&amg88xx>,"interrupt-gpio:4";
};
};