Skip to content

Commit

Permalink
dts: overlays: max30210: Added example overlay
Browse files Browse the repository at this point in the history
For further information about writing the devicetree for max30210, refer
to bindings/devicetree/iio/temperature/adi,max30210.yaml.

Added max30210.dtbo into Makefile, in order to build it automatically
with make.

Signed-off-by: Daniel Matyas <[email protected]>
  • Loading branch information
DanielMatyas committed Dec 22, 2023
1 parent 894a0c9 commit 5768e80
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
justboom-digi.dtbo \
ltc294x.dtbo \
max31827.dtbo \
max30210.dtbo \
max98357a.dtbo \
maxtherm.dtbo \
mbed-dac.dtbo \
Expand Down
40 changes: 40 additions & 0 deletions arch/arm/boot/dts/overlays/max30210-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// SPDX-License-Identifier: (GPL-2.0+)
/* Overlay for MAX30210
*
* Copyright 2023 Analog Devices Inc.
*/

/dts-v1/;
/plugin/;

/ {
compatible = "bcrm, bcm2711";
};

&{/} {
vdd: regulator {
compatible = "regulator-fixed";
regulator-name = "vdd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
regulator-always-on;
};
};

&i2c1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

temperature-sensor@40 {
compatible = "adi,max30210";
reg = <0x40>;
vdd-supply = <&vdd>;
interrupt-parent = <&gpio>;
// /* IRQ_TYPE_EDGE_BOTH | IRQ_TYPE_LEVEL_HIGH */
interrupts = <17 0x0>;
// adi,external-convert-enable;
// adi,external-convert-rising-edge;
};
};

0 comments on commit 5768e80

Please sign in to comment.