Skip to content
Merged
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
6 changes: 3 additions & 3 deletions boards/arm/lpcxpresso54114/lpcxpresso54114_m4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
compatible = "gpio-keys";
user_button_1: button_0 {
label = "User SW1";
gpios = <&gpio0 24 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
};
user_button_2: button_1 {
label = "User SW2";
gpios = <&gpio0 31 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
};
user_button_3: button_2 {
label = "User SW3";
gpios = <&gpio0 4 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
};
};
};
Expand Down
1 change: 1 addition & 0 deletions boards/arm/lpcxpresso54114/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ static int lpcxpresso_54114_pinmux_init(struct device *dev)
IOCON_PIO_OPENDRAIN_DI
);
pinmux_pin_set(port0, 4, port0_pin4_config);

#endif

#ifdef CONFIG_GPIO_MCUX_LPC_PORT1
Expand Down
6 changes: 3 additions & 3 deletions boards/arm/lpcxpresso55s69/lpcxpresso55s69_cpu0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
compatible = "gpio-keys";
user_button_1: button_0 {
label = "User SW1";
gpios = <&gpio0 5 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
};
user_button_2: button_1 {
label = "User SW2";
gpios = <&gpio1 18 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
};
user_button_3: button_2 {
label = "User SW3";
gpios = <&gpio1 9 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};
};
};
Expand Down
21 changes: 10 additions & 11 deletions boards/arm/lpcxpresso55s69/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,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 +58,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 +71,11 @@ static int lpcxpresso_55s69_pinmux_init(struct device *dev)
IOCON_PIO_SLEW_STANDARD |
IOCON_PIO_OPENDRAIN_DI
);
pinmux_pin_set(port1, DT_ALIAS_SW1_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 +84,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_SW2_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