overlays: add support for the MLX90640 thermal camera
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Sun, 19 Sep 2021 11:30:43 +0000 (13:30 +0200)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Mon, 27 Sep 2021 07:35:07 +0000 (08:35 +0100)
This allows using the video-i2c camera driver with MLX90640 thermal
infrared sensors, connected to Raspberry Pi. CONFIG_VIDEO_V4L2_I2C
has to be selected to use the camera.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
arch/arm/boot/dts/overlays/Makefile
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/mlx90640-overlay.dts [new file with mode: 0644]

index 44aedc149ff0935b317c66bbe5f2204cd175ad07..5dc1f892934e5b7c3abb855ef548137788306654 100644 (file)
@@ -129,6 +129,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
        midi-uart5.dtbo \
        minipitft13.dtbo \
        miniuart-bt.dtbo \
+       mlx90640.dtbo \
        mmc.dtbo \
        mpu6050.dtbo \
        mz61581.dtbo \
index eb2c9adfb1a86f4afc980ec90fa356ed8cf6a028..06d1dfdbf1cd0a3d23571e4c5950e32382bef7f3 100644 (file)
@@ -2152,6 +2152,12 @@ Params: krnbt                   Set to "on" to enable autoprobing of Bluetooth
                                 driver without need of hciattach/btattach
 
 
+Name:   mlx90640
+Info:   Overlay for i2c connected mlx90640 thermal camera
+Load:   dtoverlay=mlx90640
+Params: <None>
+
+
 Name:   mmc
 Info:   Selects the bcm2835-mmc SD/MMC driver, optionally with overclock
 Load:   dtoverlay=mmc,<param>=<val>
diff --git a/arch/arm/boot/dts/overlays/mlx90640-overlay.dts b/arch/arm/boot/dts/overlays/mlx90640-overlay.dts
new file mode 100644 (file)
index 0000000..a2655ed
--- /dev/null
@@ -0,0 +1,22 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+       compatible = "brcm,bcm2835";
+
+       fragment@0 {
+               target = <&i2c_arm>;
+               __overlay__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "okay";
+                       clock-frequency = <400000>;
+
+                       mlx90640: mlx90640@33 {
+                               compatible = "melexis,mlx90640";
+                               reg = <0x33>;
+                               status = "okay";
+                       };
+               };
+       };
+};