1e9bf8eeafdb9436dc6b29112c63b5d73d16f588
[openwrt/staging/stintel.git] /
1 From 3fd6d30806724fa8b07ae625d828c49855c42fbe Mon Sep 17 00:00:00 2001
2 From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
3 Date: Sun, 19 Sep 2021 13:30:43 +0200
4 Subject: [PATCH] overlays: add support for the MLX90640 thermal camera
5
6 This allows using the video-i2c camera driver with MLX90640 thermal
7 infrared sensors, connected to Raspberry Pi. CONFIG_VIDEO_V4L2_I2C
8 has to be selected to use the camera.
9
10 Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
11 ---
12 arch/arm/boot/dts/overlays/Makefile | 1 +
13 arch/arm/boot/dts/overlays/README | 6 +++++
14 .../boot/dts/overlays/mlx90640-overlay.dts | 22 +++++++++++++++++++
15 3 files changed, 29 insertions(+)
16 create mode 100644 arch/arm/boot/dts/overlays/mlx90640-overlay.dts
17
18 --- a/arch/arm/boot/dts/overlays/Makefile
19 +++ b/arch/arm/boot/dts/overlays/Makefile
20 @@ -129,6 +129,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
21 midi-uart5.dtbo \
22 minipitft13.dtbo \
23 miniuart-bt.dtbo \
24 + mlx90640.dtbo \
25 mmc.dtbo \
26 mpu6050.dtbo \
27 mz61581.dtbo \
28 --- a/arch/arm/boot/dts/overlays/README
29 +++ b/arch/arm/boot/dts/overlays/README
30 @@ -2152,6 +2152,12 @@ Params: krnbt Set to "
31 driver without need of hciattach/btattach
32
33
34 +Name: mlx90640
35 +Info: Overlay for i2c connected mlx90640 thermal camera
36 +Load: dtoverlay=mlx90640
37 +Params: <None>
38 +
39 +
40 Name: mmc
41 Info: Selects the bcm2835-mmc SD/MMC driver, optionally with overclock
42 Load: dtoverlay=mmc,<param>=<val>
43 --- /dev/null
44 +++ b/arch/arm/boot/dts/overlays/mlx90640-overlay.dts
45 @@ -0,0 +1,22 @@
46 +/dts-v1/;
47 +/plugin/;
48 +
49 +/ {
50 + compatible = "brcm,bcm2835";
51 +
52 + fragment@0 {
53 + target = <&i2c_arm>;
54 + __overlay__ {
55 + #address-cells = <1>;
56 + #size-cells = <0>;
57 + status = "okay";
58 + clock-frequency = <400000>;
59 +
60 + mlx90640: mlx90640@33 {
61 + compatible = "melexis,mlx90640";
62 + reg = <0x33>;
63 + status = "okay";
64 + };
65 + };
66 + };
67 +};