boards: rddrone_fmuk66 dts: fxos8700 on SPI

Added support for fxos8700 sensor over SPI bus on
RDDRONE board and proper selection through dts.
Tested with fxos8700 sensor on RDDRONE.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Sumit Batra <sumit.batra@nxp.com>
This commit is contained in:
Benjamin Perseghetti 2022-10-28 12:03:58 -04:00 committed by Maureen Helm
parent 2870b38379
commit a0418f9cf0
4 changed files with 36 additions and 3 deletions

View File

@ -9,6 +9,7 @@
#include <nxp/nxp_k66.dtsi>
#include <zephyr/dt-bindings/pwm/pwm.h>
#include "rddrone_fmuk66-pinctrl.dtsi"
#include <freq.h>
/ {
model = "NXP RDDRONE FMUK66 board";
@ -329,6 +330,24 @@ zephyr_udc0: &usbotg {
status = "okay";
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
/*
* cs-gpios needs to be populated as per the schematics
* fxos8700 - CS#0
*/
cs-gpios = <&gpiob 10 GPIO_ACTIVE_LOW>;
clock-frequency = <DT_FREQ_M(1)>;
fxos8700@0 {
compatible = "nxp,fxos8700";
reg = <0>;
spi-max-frequency = <DT_FREQ_M(1)>;
reset-gpios = <&gpioa 25 GPIO_ACTIVE_HIGH>;
int1-gpios = <&gpioe 9 GPIO_ACTIVE_LOW>;
int2-gpios = <&gpioe 10 GPIO_ACTIVE_LOW>;
status = "okay";
};
};
/* external spi */

View File

@ -3,9 +3,7 @@
description: FXOS8700 6-axis accelerometer/magnetometer sensor
compatible: "nxp,fxos8700"
include: [sensor-device.yaml, i2c-device.yaml]
include: sensor-device.yaml
properties:
reset-gpios:

View File

@ -0,0 +1,8 @@
# Copyright (c) 2018, NXP
# SPDX-License-Identifier: Apache-2.0
description: FXOS8700 6-axis accelerometer/magnetometer sensor
compatible: "nxp,fxos8700"
include: ["i2c-device.yaml", "nxp,fxos8700-common.yaml"]

View File

@ -0,0 +1,8 @@
# Copyright (c) 2018, NXP
# SPDX-License-Identifier: Apache-2.0
description: FXOS8700 6-axis accelerometer/magnetometer sensor
compatible: "nxp,fxos8700"
include: ["spi-device.yaml", "nxp,fxos8700-common.yaml"]