Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boards/arm/lpcxpresso55s69/lpcxpresso55s69_cpu0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
compatible = "gpio-keys";
user_button_1: button_0 {
label = "User SW1";
gpios = <&gpio0 5 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpio0 5 GPIO_INT_ACTIVE_HIGH>;
};
user_button_2: button_1 {
label = "User SW2";
Expand Down
22 changes: 11 additions & 11 deletions boards/arm/lpcxpresso55s69/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <fsl_common.h>
#include <fsl_iocon.h>
#include <soc.h>
#include <LPC55S69_cm33_core0.h>

static int lpcxpresso_55s69_pinmux_init(struct device *dev)
{
Expand Down Expand Up @@ -48,8 +49,8 @@ static int lpcxpresso_55s69_pinmux_init(struct device *dev)

#endif

#ifdef CONFIG_GPIO_MCUX_LPC_PORT0
const u32_t port0_pin5_config = (
#ifdef DT_GPIO_KEYS_SW0_GPIO_CONTROLLER
const u32_t sw0_config = (
IOCON_PIO_FUNC0 |
IOCON_PIO_MODE_PULLUP |
IOCON_PIO_INV_DI |
Expand All @@ -58,12 +59,11 @@ static int lpcxpresso_55s69_pinmux_init(struct device *dev)
IOCON_PIO_SLEW_STANDARD |
IOCON_PIO_OPENDRAIN_DI
);

pinmux_pin_set(port0, 5, port0_pin5_config);
pinmux_pin_set(port0, DT_ALIAS_SW0_GPIOS_PIN, sw0_config);
#endif

#ifdef CONFIG_GPIO_MCUX_LPC_PORT0
const u32_t port1_pin18_config = (
#ifdef DT_GPIO_KEYS_SW1_GPIO_CONTROLLER
const u32_t sw1_config = (
IOCON_PIO_FUNC0 |
IOCON_PIO_MODE_PULLUP |
IOCON_PIO_INV_DI |
Expand All @@ -72,10 +72,11 @@ static int lpcxpresso_55s69_pinmux_init(struct device *dev)
IOCON_PIO_SLEW_STANDARD |
IOCON_PIO_OPENDRAIN_DI
);
pinmux_pin_set(port1, DT_ALIAS_SW0_GPIOS_PIN, sw1_config);
#endif

pinmux_pin_set(port1, 18, port1_pin18_config);

const u32_t port1_pin9_config = (
#ifdef DT_GPIO_KEYS_SW2_GPIO_CONTROLLER
const u32_t sw2_config = (
IOCON_PIO_FUNC0 |
IOCON_PIO_MODE_PULLUP |
IOCON_PIO_INV_DI |
Expand All @@ -84,8 +85,7 @@ static int lpcxpresso_55s69_pinmux_init(struct device *dev)
IOCON_PIO_SLEW_STANDARD |
IOCON_PIO_OPENDRAIN_DI
);

pinmux_pin_set(port1, 9, port1_pin9_config);
pinmux_pin_set(port1, DT_ALIAS_SW0_GPIOS_PIN, sw2_config);
#endif

return 0;
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/Kconfig.mcux_lpc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
menuconfig GPIO_MCUX_LPC
bool "MCUX LPC GPIO driver"
depends on HAS_MCUX
select HAS_DTS_GPIO
help
Enable the MCUX LPC pinmux driver.

Expand Down
Loading