Skip to content

Commit 7c3b003

Browse files
Elgin-Perumbillykartben
authored andcommitted
boards: silabs: slstk3701a: Enable Si7210 Hall-effect sensor
Enable Si7210 Hall-effect sensor node under I2C2 in slstk3701a DTS for magnetic field sensing. Include a 3.3V fixed regulator (sensor-enable) via GPIO for power control. Signed-off-by: Elgin Perumbilly <[email protected]>
1 parent cfb1ae4 commit 7c3b003

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

boards/silabs/starter_kits/slstk3701a/slstk3701a.dts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@
3030
watchdog0 = &wdog0;
3131
};
3232

33+
/* GPIOs that power up different sensors */
34+
sensor_enable: sensor-enable {
35+
compatible = "regulator-fixed";
36+
regulator-name = "sensor_enable";
37+
enable-gpios = <&gpiob 3 GPIO_ACTIVE_HIGH>;
38+
regulator-boot-on;
39+
startup-delay-us = <100000>;
40+
};
41+
3342
leds {
3443
compatible = "gpio-leds";
3544

@@ -100,6 +109,12 @@
100109
pinctrl-0 = <&i2c2_default>;
101110
pinctrl-names = "default";
102111
status = "okay";
112+
113+
si7210: si7210@30 {
114+
compatible = "silabs,si7210";
115+
reg = <0x30>;
116+
vin-supply = <&sensor_enable>;
117+
};
103118
};
104119

105120
&rtcc0 {

boards/silabs/starter_kits/slstk3701a/slstk3701a_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ CONFIG_SERIAL=y
99
CONFIG_GPIO=y
1010
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
1111
CONFIG_CMU_HFCLK_HFRCO=y
12+
CONFIG_REGULATOR=y

0 commit comments

Comments
 (0)