boards: nxp: mcxw7x: Add FXLS8964 Sensor Support
Added FXLS8964 Accel Sensor Support for the mcxw71 and mcxw72 devices. Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
This commit is contained in:
parent
b2e29fe0d7
commit
5e35836922
5 changed files with 32 additions and 4 deletions
|
@ -67,6 +67,10 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&gpiob {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&gpioc {
|
&gpioc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@ -89,6 +93,12 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pinctrl-0 = <&pinmux_lpi2c1>;
|
pinctrl-0 = <&pinmux_lpi2c1>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
accelerometer: accelerometer@19 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "nxp,fxls8974";
|
||||||
|
reg = <0x19>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&lpspi1 {
|
&lpspi1 {
|
||||||
|
|
|
@ -54,6 +54,9 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&gpiob {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&gpioc {
|
&gpioc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
@ -133,4 +136,10 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pinctrl-0 = <&pinmux_lpi2c1>;
|
pinctrl-0 = <&pinmux_lpi2c1>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
accelerometer: accelerometer@19 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "nxp,fxls8974";
|
||||||
|
reg = <0x19>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -54,6 +54,9 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&gpiob {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&gpioc {
|
&gpioc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
@ -133,6 +136,12 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pinctrl-0 = <&pinmux_lpi2c1>;
|
pinctrl-0 = <&pinmux_lpi2c1>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
accelerometer: accelerometer@19 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "nxp,fxls8974";
|
||||||
|
reg = <0x19>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
|
|
|
@ -491,11 +491,10 @@ static int fxls8974_init(const struct device *dev)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->whoami == WHOAMI_ID_FXLS8974) {
|
if (data->whoami != WHOAMI_ID_FXLS8964 &&
|
||||||
LOG_DBG("Device ID 0x%x, FXLS8974", data->whoami);
|
data->whoami != WHOAMI_ID_FXLS8974) {
|
||||||
} else {
|
|
||||||
LOG_ERR("Unknown Device ID 0x%x", data->whoami);
|
LOG_ERR("Unknown Device ID 0x%x", data->whoami);
|
||||||
return -EIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fxls8974_get_active(dev, ®Val)) {
|
if (fxls8974_get_active(dev, ®Val)) {
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#define FXLS8974_REG_CTRLREG4 0x18
|
#define FXLS8974_REG_CTRLREG4 0x18
|
||||||
#define FXLS8974_REG_CTRLREG5 0x19
|
#define FXLS8974_REG_CTRLREG5 0x19
|
||||||
|
|
||||||
|
#define WHOAMI_ID_FXLS8964 0x84
|
||||||
#define WHOAMI_ID_FXLS8974 0x86
|
#define WHOAMI_ID_FXLS8974 0x86
|
||||||
|
|
||||||
#define FXLS8974_CTRLREG1_ACTIVE_MASK 0x01
|
#define FXLS8974_CTRLREG1_ACTIVE_MASK 0x01
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue