boards: dts: Add fxas21002 interrupt bindings and fix sensor sample

Adds dts bindings for the fxas21002 interrupt pins to all boards that
have this sensor.

The fxas21002 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 fxas21002 sample application has been broken since the refactoring
of the mcux gpio driver to dts in commit
4e8f29f3195464616d465f337622c2a1233c77a6. The sample is now fixed.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
diff --git a/boards/arm/hexiwear_k64/Kconfig.defconfig b/boards/arm/hexiwear_k64/Kconfig.defconfig
index 6701515..d63f66d 100644
--- a/boards/arm/hexiwear_k64/Kconfig.defconfig
+++ b/boards/arm/hexiwear_k64/Kconfig.defconfig
@@ -90,16 +90,6 @@
 
 endif # ADC
 
-if FXAS21002
-
-config FXAS21002_GPIO_NAME
-	default GPIO_MCUX_PORTC_NAME
-
-config FXAS21002_GPIO_PIN
-	default 18
-
-endif # FXAS21002
-
 if PWM_MCUX_FTM
 
 config PWM_3
diff --git a/boards/arm/hexiwear_k64/dts.fixup b/boards/arm/hexiwear_k64/dts.fixup
index d71dc61..c504b4a 100644
--- a/boards/arm/hexiwear_k64/dts.fixup
+++ b/boards/arm/hexiwear_k64/dts.fixup
@@ -7,6 +7,8 @@
 #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
 #define CONFIG_FXAS21002_I2C_ADDRESS	NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_BASE_ADDRESS
+#define CONFIG_FXAS21002_GPIO_NAME		NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_INT2_GPIOS_CONTROLLER
+#define CONFIG_FXAS21002_GPIO_PIN		NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_INT2_GPIOS_PIN
 
 #define CONFIG_MAX30101_NAME			NXP_KINETIS_I2C_40066000_MAX_MAX30101_57_LABEL
 #define CONFIG_MAX30101_I2C_NAME		NXP_KINETIS_I2C_40066000_MAX_MAX30101_57_BUS_NAME
diff --git a/boards/arm/hexiwear_k64/hexiwear_k64.dts b/boards/arm/hexiwear_k64/hexiwear_k64.dts
index 5a85443..b20cf56 100644
--- a/boards/arm/hexiwear_k64/hexiwear_k64.dts
+++ b/boards/arm/hexiwear_k64/hexiwear_k64.dts
@@ -96,6 +96,8 @@
 		compatible = "nxp,fxas21002";
 		reg = <0x20>;
 		label = "FXAS21002";
+		int1-gpios = <&gpiod 1 0>;
+		int2-gpios = <&gpioc 18 0>;
 	};
 };
 
diff --git a/drivers/sensor/fxas21002/Kconfig b/drivers/sensor/fxas21002/Kconfig
index 59a18fb..b59ff25 100644
--- a/drivers/sensor/fxas21002/Kconfig
+++ b/drivers/sensor/fxas21002/Kconfig
@@ -92,12 +92,16 @@
 
 if FXAS21002_TRIGGER
 
+if !HAS_DTS_GPIO_DEVICE
+
 config FXAS21002_GPIO_NAME
 	string "GPIO device name"
 
 config FXAS21002_GPIO_PIN
 	int "GPIO pin"
 
+endif
+
 config FXAS21002_DRDY_INT1
 	bool "Data ready interrupt to INT1 pin"
 	default n
diff --git a/dts/bindings/sensor/nxp,fxas21002.yaml b/dts/bindings/sensor/nxp,fxas21002.yaml
index beaad2a..7156375 100644
--- a/dts/bindings/sensor/nxp,fxas21002.yaml
+++ b/dts/bindings/sensor/nxp,fxas21002.yaml
@@ -18,4 +18,13 @@
     compatible:
       constraint: "nxp,fxas21002"
 
+    int1-gpios:
+      type: compound
+      category: optional
+      generation: define, use-prop-name
+
+    int2-gpios:
+      type: compound
+      category: optional
+      generation: define, use-prop-name
 ...