summaryrefslogtreecommitdiff
path: root/boards
diff options
context:
space:
mode:
authorMaureen Helm <maureen.helm@nxp.com>2016-12-12 11:15:27 -0600
committerKumar Gala <kumar.gala@linaro.org>2017-01-12 09:46:27 -0600
commitbd40ca87413aec0b0556e460b5d3feb999fed497 (patch)
tree18a60b4b03dae21166fe5b05abbc088e40a579df /boards
parentd71f2468552f30d45f18685fe332a8fedde12b8d (diff)
frdm_k64f: hexiwear_k64: Add defaults for the mcux gpio driver
Jira: ZEP-1394 Change-Id: I1371e5a1a65dd85a8dd93b2c5d113d7520d5656f Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Diffstat (limited to 'boards')
-rw-r--r--boards/arm/frdm_k64f/Kconfig.defconfig22
-rw-r--r--boards/arm/frdm_k64f/board.h28
-rw-r--r--boards/arm/hexiwear_k64/Kconfig.defconfig22
-rw-r--r--boards/arm/hexiwear_k64/board.h20
4 files changed, 90 insertions, 2 deletions
diff --git a/boards/arm/frdm_k64f/Kconfig.defconfig b/boards/arm/frdm_k64f/Kconfig.defconfig
index 4fccc08ae..2764e788c 100644
--- a/boards/arm/frdm_k64f/Kconfig.defconfig
+++ b/boards/arm/frdm_k64f/Kconfig.defconfig
@@ -131,6 +131,25 @@ config GPIO_K64_E
endif # GPIO_K64
+if GPIO_MCUX
+
+config GPIO_MCUX_PORTA
+ def_bool y
+
+config GPIO_MCUX_PORTB
+ def_bool y
+
+config GPIO_MCUX_PORTC
+ def_bool y
+
+config GPIO_MCUX_PORTD
+ def_bool y
+
+config GPIO_MCUX_PORTE
+ def_bool y
+
+endif # GPIO_MCUX
+
if I2C
config I2C_0
@@ -170,7 +189,8 @@ config FXOS8700_I2C_ADDRESS
default 0x1d
config FXOS8700_GPIO_NAME
- default GPIO_K64_C_DEV_NAME
+ default GPIO_K64_C_DEV_NAME if GPIO_K64
+ default GPIO_MCUX_PORTC_NAME if GPIO_MCUX
config FXOS8700_GPIO_PIN
default 13
diff --git a/boards/arm/frdm_k64f/board.h b/boards/arm/frdm_k64f/board.h
index 806d68546..9166551ca 100644
--- a/boards/arm/frdm_k64f/board.h
+++ b/boards/arm/frdm_k64f/board.h
@@ -19,6 +19,8 @@
#include <soc.h>
+#ifdef CONFIG_GPIO_K64
+
/* Push button switch 2 */
#define SW2_GPIO_NAME CONFIG_GPIO_K64_C_DEV_NAME
#define SW2_GPIO_PIN 6
@@ -39,6 +41,32 @@
#define BLUE_GPIO_NAME CONFIG_GPIO_K64_B_DEV_NAME
#define BLUE_GPIO_PIN 21
+#endif /* CONFIG_GPIO_K64 */
+
+#ifdef CONFIG_GPIO_MCUX
+
+/* Push button switch 2 */
+#define SW2_GPIO_NAME CONFIG_GPIO_MCUX_PORTC_NAME
+#define SW2_GPIO_PIN 6
+
+/* Push button switch 3 */
+#define SW3_GPIO_NAME CONFIG_GPIO_MCUX_PORTA_NAME
+#define SW3_GPIO_PIN 4
+
+/* Red LED */
+#define RED_GPIO_NAME CONFIG_GPIO_MCUX_PORTB_NAME
+#define RED_GPIO_PIN 22
+
+/* Green LED */
+#define GREEN_GPIO_NAME CONFIG_GPIO_MCUX_PORTE_NAME
+#define GREEN_GPIO_PIN 26
+
+/* Blue LED */
+#define BLUE_GPIO_NAME CONFIG_GPIO_MCUX_PORTB_NAME
+#define BLUE_GPIO_PIN 21
+
+#endif /* CONFIG_GPIO_MCUX */
+
/* LED0. There is no physical LED on the board with this name, so create an
* alias to the green LED to make the basic blinky sample work.
*/
diff --git a/boards/arm/hexiwear_k64/Kconfig.defconfig b/boards/arm/hexiwear_k64/Kconfig.defconfig
index ef2494f0e..90c6444ff 100644
--- a/boards/arm/hexiwear_k64/Kconfig.defconfig
+++ b/boards/arm/hexiwear_k64/Kconfig.defconfig
@@ -131,6 +131,25 @@ config GPIO_K64_E
endif # GPIO_K64
+if GPIO_MCUX
+
+config GPIO_MCUX_PORTA
+ def_bool n
+
+config GPIO_MCUX_PORTB
+ def_bool y
+
+config GPIO_MCUX_PORTC
+ def_bool y
+
+config GPIO_MCUX_PORTD
+ def_bool y
+
+config GPIO_MCUX_PORTE
+ def_bool y
+
+endif # GPIO_MCUX
+
if I2C
config I2C_0
@@ -170,7 +189,8 @@ config FXOS8700_I2C_ADDRESS
default 0x1e
config FXOS8700_GPIO_NAME
- default GPIO_K64_D_DEV_NAME
+ default GPIO_K64_D_DEV_NAME if GPIO_K64
+ default GPIO_MCUX_PORTD_NAME if GPIO_MCUX
config FXOS8700_GPIO_PIN
default 13
diff --git a/boards/arm/hexiwear_k64/board.h b/boards/arm/hexiwear_k64/board.h
index da1fec183..1333c1dba 100644
--- a/boards/arm/hexiwear_k64/board.h
+++ b/boards/arm/hexiwear_k64/board.h
@@ -19,6 +19,8 @@
#include <soc.h>
+#ifdef CONFIG_GPIO_K64
+
/* Red LED */
#define RED_GPIO_NAME CONFIG_GPIO_K64_C_DEV_NAME
#define RED_GPIO_PIN 8
@@ -31,6 +33,24 @@
#define BLUE_GPIO_NAME CONFIG_GPIO_K64_C_DEV_NAME
#define BLUE_GPIO_PIN 9
+#endif /* CONFIG_GPIO_K64 */
+
+#ifdef CONFIG_GPIO_MCUX
+
+/* Red LED */
+#define RED_GPIO_NAME CONFIG_GPIO_MCUX_PORTC_NAME
+#define RED_GPIO_PIN 8
+
+/* Green LED */
+#define GREEN_GPIO_NAME CONFIG_GPIO_MCUX_PORTD_NAME
+#define GREEN_GPIO_PIN 0
+
+/* Blue LED */
+#define BLUE_GPIO_NAME CONFIG_GPIO_MCUX_PORTC_NAME
+#define BLUE_GPIO_PIN 9
+
+#endif /* CONFIG_GPIO_MCUX */
+
/* LED0. There is no physical LED on the board with this name, so create an
* alias to the green LED to make the basic blinky sample work.
*/