Commit 9a491a1b authored by Benjamin Perseghetti's avatar Benjamin Perseghetti Committed by Maureen Helm
Browse files

boards: rddrone_fmuk66 dts: fxas21002 on SPI



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

Signed-off-by: default avatarBenjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: default avatarSumit Batra <sumit.batra@nxp.com>
parent 3906860a
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -333,8 +333,10 @@ zephyr_udc0: &usbotg {
	/*
	 * cs-gpios needs to be populated as per the schematics
	 * fxos8700  - CS#0
	 * fxas21002 - CS#1
	 */
	cs-gpios = <&gpiob 10 GPIO_ACTIVE_LOW>;
	cs-gpios = <&gpiob 10 GPIO_ACTIVE_LOW>,
		   <&gpiob 9 GPIO_ACTIVE_LOW>;
	clock-frequency = <DT_FREQ_M(1)>;


@@ -348,6 +350,16 @@ zephyr_udc0: &usbotg {
		status = "okay";
	};

	fxas21002@1 {
		compatible = "nxp,fxas21002";
		reg = <1>;
		spi-max-frequency = <DT_FREQ_M(1)>;
		reset-gpios = <&gpiod 12 GPIO_ACTIVE_LOW>;
		int1-gpios = <&gpioe 7 GPIO_ACTIVE_LOW>;
		int2-gpios = <&gpioe 6 GPIO_ACTIVE_LOW>;
		status = "okay";
	};

};

/* external spi */
+10 −3
Original line number Diff line number Diff line
@@ -3,11 +3,18 @@

description: FXAS21002 3-axis gyroscope sensor

compatible: "nxp,fxas21002"

include: [sensor-device.yaml, i2c-device.yaml]
include: sensor-device.yaml

properties:
    reset-gpios:
      type: phandle-array
      required: false
      description: |
        RST pin
        This pin defaults to active low when consumed by the sensor.
        The property value should ensure the flags properly describe
        the signal that is presented to the driver.

    int1-gpios:
      type: phandle-array
      required: false
+8 −0
Original line number Diff line number Diff line
# Copyright (c) 2018, NXP
# SPDX-License-Identifier: Apache-2.0

description: FXAS21002 3-axis gyroscope sensor

compatible: "nxp,fxas21002"

include: ["i2c-device.yaml", "nxp,fxas21002-common.yaml"]
+8 −0
Original line number Diff line number Diff line
# Copyright (c) 2018, NXP
# SPDX-License-Identifier: Apache-2.0

description: FXAS21002 3-axis gyroscope sensor

compatible: "nxp,fxas21002"

include: ["spi-device.yaml", "nxp,fxas21002-common.yaml"]