boards/arm/efr32_thunderboard: add Si7210 sensor
Enable Si7210 hall & temp sensor on BG22 and BG27 thunderboards. Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
This commit is contained in:
parent
d641be7fc8
commit
56c38bd75d
5 changed files with 61 additions and 9 deletions
|
@ -18,7 +18,6 @@
|
|||
aliases {
|
||||
led0 = &led0;
|
||||
sw0 = &button0;
|
||||
i2c-pin = &i2c_pin;
|
||||
spi-flash0 = &mx25r80;
|
||||
spi0 = &usart0;
|
||||
watchdog0 = &wdog0;
|
||||
|
@ -59,3 +58,17 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sw_sensor_enable {
|
||||
enable-gpios = <&gpioa GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
|
||||
&sw_mic_enable {
|
||||
enable-gpios = <&gpioa GECKO_PIN(0) GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
|
||||
&sw_imu_enable {
|
||||
enable-gpios = <&gpiob GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
|
|
@ -20,3 +20,6 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=76800000
|
|||
CONFIG_GECKO_BURTC_TIMER=y
|
||||
CONFIG_CMU_BURTCCLK_LFXO=y
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1024
|
||||
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_SI7210=y
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
aliases {
|
||||
led0 = &led0;
|
||||
sw0 = &button0;
|
||||
i2c-pin = &i2c_pin;
|
||||
spi-flash0 = &mx25r80;
|
||||
spi0 = &usart0;
|
||||
watchdog0 = &wdog0;
|
||||
|
@ -29,6 +28,20 @@
|
|||
gpios = <&gpioa GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&sw_sensor_enable {
|
||||
enable-gpios = <&gpioc GECKO_PIN(6) GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
|
||||
&sw_mic_enable {
|
||||
enable-gpios = <&gpioc GECKO_PIN(7) GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
|
||||
&sw_imu_enable {
|
||||
enable-gpios = <&gpiob GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&button0 {
|
||||
gpios = <&gpiob GECKO_PIN(3) GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
|
|
@ -20,3 +20,6 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=76800000
|
|||
CONFIG_GECKO_BURTC_TIMER=y
|
||||
CONFIG_CMU_BURTCCLK_LFXO=y
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1024
|
||||
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_SI7210=y
|
||||
|
|
|
@ -18,10 +18,6 @@
|
|||
gpios = <&gpiob GECKO_PIN(0) GPIO_ACTIVE_HIGH>;
|
||||
label = "LED 0";
|
||||
};
|
||||
/* Set this pin to high to enable I2C to board sensors */
|
||||
i2c_pin: pin {
|
||||
gpios = <&gpioa GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
buttons {
|
||||
|
@ -37,10 +33,28 @@
|
|||
gpios = <&gpioa GECKO_PIN(5) GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
spi_enable: peripheral-enable {
|
||||
/* GPIOs that power up different sensors */
|
||||
sw_sensor_enable: gpio_switch_0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "spi-enable-ctrl";
|
||||
enable-gpios = <&gpiob GECKO_PIN(4) GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
regulator-name = "sw_sensor_enable";
|
||||
startup-delay-us = <100000>;
|
||||
/* Always on since sensor drivers won't enable it automatically */
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sw_mic_enable: gpio_switch_1 {
|
||||
compatible = "regulator-fixed";
|
||||
status = "okay";
|
||||
regulator-name = "sw_mic_enable";
|
||||
startup-delay-us = <100000>;
|
||||
};
|
||||
|
||||
sw_imu_enable: gpio_switch_2 {
|
||||
compatible = "regulator-fixed";
|
||||
status = "okay";
|
||||
regulator-name = "sw_imu_enable";
|
||||
startup-delay-us = <100000>;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -127,6 +141,12 @@
|
|||
location-sda = <GECKO_LOCATION(3) GECKO_PORT_D GECKO_PIN(2)>;
|
||||
location-scl = <GECKO_LOCATION(3) GECKO_PORT_D GECKO_PIN(3)>;
|
||||
status = "okay";
|
||||
|
||||
si7210@30 {
|
||||
compatible = "silabs,si7210";
|
||||
status = "okay";
|
||||
reg = <0x30>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue