boards: dts: Add fxos8700 interrupt bindings and fix sensor sample
Adds dts bindings for the fxos8700 interrupt pins to all boards that
have this sensor. The frdm_k64f and hexiwear_k64 connect both sensor
interrupt pins to the mcu, but the frdm_kw41z connects only one.
The fxos8700 driver is currently only aware of one sensor interrupt pin,
therefore the routing of INT1 or INT2 to the driver is handled in each
board's dts.fixup.
The fxos8700 sample application has been broken since the refactoring of
the mcux gpio driver to dts in commit
4e8f29f319. The sample is now fixed.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
57904102fd
commit
90ac25f736
@ -3,4 +3,5 @@ config BOARD_FRDM_K64F
|
||||
bool "Freescale FRDM-K64F"
|
||||
depends on SOC_SERIES_KINETIS_K6X
|
||||
select SOC_PART_NUMBER_MK64FN1M0VLL12
|
||||
select HAS_DTS_GPIO_DEVICE
|
||||
select HAS_DTS_I2C_DEVICE
|
||||
|
||||
@ -87,16 +87,6 @@ config ADC_1
|
||||
|
||||
endif # ADC
|
||||
|
||||
if FXOS8700
|
||||
|
||||
config FXOS8700_GPIO_NAME
|
||||
default GPIO_MCUX_PORTC_NAME
|
||||
|
||||
config FXOS8700_GPIO_PIN
|
||||
default 13
|
||||
|
||||
endif # FXOS8700
|
||||
|
||||
if PWM_MCUX_FTM
|
||||
|
||||
config PWM_3
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#define CONFIG_FXOS8700_NAME NXP_KINETIS_I2C_40066000_NXP_FXOS8700_1D_LABEL
|
||||
#define CONFIG_FXOS8700_I2C_NAME NXP_KINETIS_I2C_40066000_NXP_FXOS8700_1D_BUS_NAME
|
||||
#define CONFIG_FXOS8700_I2C_ADDRESS NXP_KINETIS_I2C_40066000_NXP_FXOS8700_1D_BASE_ADDRESS
|
||||
#define CONFIG_FXOS8700_GPIO_NAME NXP_KINETIS_I2C_40066000_NXP_FXOS8700_1D_INT2_GPIOS_CONTROLLER
|
||||
#define CONFIG_FXOS8700_GPIO_PIN NXP_KINETIS_I2C_40066000_NXP_FXOS8700_1D_INT2_GPIOS_PIN
|
||||
|
||||
@ -89,6 +89,8 @@
|
||||
compatible = "nxp,fxos8700";
|
||||
reg = <0x1d>;
|
||||
label = "FXOS8700";
|
||||
int1-gpios = <&gpioc 6 0>;
|
||||
int2-gpios = <&gpioc 13 0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -9,4 +9,5 @@ config BOARD_FRDM_KW41Z
|
||||
bool "NXP FRDM-KW41Z"
|
||||
depends on SOC_SERIES_KINETIS_KWX
|
||||
select SOC_PART_NUMBER_MKW41Z512VHT4
|
||||
select HAS_DTS_GPIO_DEVICE
|
||||
select HAS_DTS_I2C_DEVICE
|
||||
|
||||
@ -68,12 +68,6 @@ endif # ADC
|
||||
|
||||
if FXOS8700
|
||||
|
||||
config FXOS8700_GPIO_NAME
|
||||
default GPIO_MCUX_PORTC_NAME
|
||||
|
||||
config FXOS8700_GPIO_PIN
|
||||
default 1
|
||||
|
||||
config FXOS8700_DRDY_INT1
|
||||
def_bool y
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#define CONFIG_FXOS8700_NAME NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1F_LABEL
|
||||
#define CONFIG_FXOS8700_I2C_NAME NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1F_BUS_NAME
|
||||
#define CONFIG_FXOS8700_I2C_ADDRESS NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1F_BASE_ADDRESS
|
||||
#define CONFIG_FXOS8700_GPIO_NAME NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1F_INT1_GPIOS_CONTROLLER
|
||||
#define CONFIG_FXOS8700_GPIO_PIN NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1F_INT1_GPIOS_PIN
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
compatible = "nxp,fxos8700";
|
||||
reg = <0x1f>;
|
||||
label = "FXOS8700";
|
||||
int1-gpios = <&gpioc 1 0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -9,4 +9,5 @@ config BOARD_HEXIWEAR_K64
|
||||
bool "NXP Hexiwear K64"
|
||||
depends on SOC_SERIES_KINETIS_K6X
|
||||
select SOC_PART_NUMBER_MK64FN1M0VDC12
|
||||
select HAS_DTS_GPIO_DEVICE
|
||||
select HAS_DTS_I2C_DEVICE
|
||||
|
||||
@ -90,16 +90,6 @@ config BATTERY_SENSE
|
||||
|
||||
endif # ADC
|
||||
|
||||
if FXOS8700
|
||||
|
||||
config FXOS8700_GPIO_NAME
|
||||
default GPIO_MCUX_PORTD_NAME
|
||||
|
||||
config FXOS8700_GPIO_PIN
|
||||
default 13
|
||||
|
||||
endif # FXOS8700
|
||||
|
||||
if FXAS21002
|
||||
|
||||
config FXAS21002_GPIO_NAME
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#define CONFIG_FXOS8700_NAME NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1E_LABEL
|
||||
#define CONFIG_FXOS8700_I2C_NAME NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1E_BUS_NAME
|
||||
#define CONFIG_FXOS8700_I2C_ADDRESS NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1E_BASE_ADDRESS
|
||||
#define CONFIG_FXOS8700_GPIO_NAME NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1E_INT2_GPIOS_CONTROLLER
|
||||
#define CONFIG_FXOS8700_GPIO_PIN NXP_KINETIS_I2C_40067000_NXP_FXOS8700_1E_INT2_GPIOS_PIN
|
||||
|
||||
#define CONFIG_FXAS21002_NAME NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_LABEL
|
||||
#define CONFIG_FXAS21002_I2C_NAME NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_BUS_NAME
|
||||
|
||||
@ -88,6 +88,8 @@
|
||||
compatible = "nxp,fxos8700";
|
||||
reg = <0x1e>;
|
||||
label = "FXOS8700";
|
||||
int1-gpios = <&gpioc 1 0>;
|
||||
int2-gpios = <&gpiod 13 0>;
|
||||
};
|
||||
|
||||
fxas21002@20 {
|
||||
|
||||
@ -109,6 +109,8 @@ config FXOS8700_TRIGGER
|
||||
depends on FXOS8700
|
||||
default n
|
||||
|
||||
if !HAS_DTS_GPIO_DEVICE
|
||||
|
||||
config FXOS8700_GPIO_NAME
|
||||
string "GPIO device name"
|
||||
depends on FXOS8700_TRIGGER
|
||||
@ -117,6 +119,8 @@ config FXOS8700_GPIO_PIN
|
||||
int "GPIO pin"
|
||||
depends on FXOS8700_TRIGGER
|
||||
|
||||
endif
|
||||
|
||||
config FXOS8700_DRDY_INT1
|
||||
bool "Data ready interrupt to INT1 pin"
|
||||
depends on FXOS8700_TRIGGER
|
||||
|
||||
@ -19,4 +19,13 @@ properties:
|
||||
compatible:
|
||||
constraint: "nxp,fxos8700"
|
||||
|
||||
int1-gpios:
|
||||
type: compound
|
||||
category: optional
|
||||
generation: define, use-prop-name
|
||||
|
||||
int2-gpios:
|
||||
type: compound
|
||||
category: optional
|
||||
generation: define, use-prop-name
|
||||
...
|
||||
|
||||
Loading…
Reference in New Issue
Block a user