Skip to content

Commit ce7925d

Browse files
MikeDKpopcornmix
authored andcommitted
overlays: Add apds9960 overlay
Add an overlay for the AVAGO APDS9960 digital proximity, ambient light, rgb and gesture sensor. Also update overlay README and Makefile. Signed-off-by: Michael Kaplan <[email protected]>
1 parent 35e5dbd commit ce7925d

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
1515
allo-katana-dac-audio.dtbo \
1616
allo-piano-dac-pcm512x-audio.dtbo \
1717
allo-piano-dac-plus-pcm512x-audio.dtbo \
18+
apds9960.dtbo \
1819
applepi-dac.dtbo \
1920
at86rf233.dtbo \
2021
audioinjector-addons.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,14 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec
441441
better voice quality. (default Off)
442442

443443

444+
Name: apds9960
445+
Info: Configures the AVAGO APDS9960 digital proximity, ambient light, RGB and
446+
gesture sensor
447+
Load: dtoverlay=apds9960,<param>=<val>
448+
Params: gpiopin GPIO used for INT (default 4)
449+
noints Disable the interrupt GPIO line.
450+
451+
444452
Name: applepi-dac
445453
Info: Configures the Orchard Audio ApplePi-DAC audio card
446454
Load: dtoverlay=applepi-dac
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Definitions for APDS-9960 ambient light and gesture sensor
2+
3+
/dts-v1/;
4+
/plugin/;
5+
6+
/ {
7+
compatible = "brcm,bcm2835";
8+
9+
fragment@0 {
10+
target = <&i2c1>;
11+
__overlay__ {
12+
status = "okay";
13+
};
14+
};
15+
16+
fragment@1 {
17+
target = <&gpio>;
18+
__overlay__ {
19+
apds9960_pins: apds9960_pins@39 {
20+
brcm,pins = <4>;
21+
brcm,function = <0>;
22+
};
23+
};
24+
};
25+
26+
fragment@2 {
27+
target = <&i2c1>;
28+
__overlay__ {
29+
#address-cells = <1>;
30+
#size-cells = <0>;
31+
32+
apds9960: apds@39 {
33+
compatible = "avago,apds9960";
34+
reg = <0x39>;
35+
status = "okay";
36+
};
37+
};
38+
};
39+
40+
fragment@3 {
41+
target = <&i2c1>;
42+
__overlay__ {
43+
apds9960_irq: apds@39 {
44+
#interrupt-cells=<2>;
45+
interrupt-parent = <&gpio>;
46+
interrupts = <4 1>;
47+
};
48+
};
49+
};
50+
51+
__overrides__ {
52+
gpiopin = <&apds9960_pins>,"brcm,pins:0",
53+
<&apds9960_irq>,"interrupts:0";
54+
noints = <0>,"!1!3";
55+
};
56+
};
57+

0 commit comments

Comments
 (0)