boards: nxp: frdm_mcxw72: Add Button Support
Add Button Support for frdm_mcxw72 and mcxw72_evk. Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
This commit is contained in:
parent
0a4480ce61
commit
fc1a65d162
2 changed files with 24 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <nxp/nxp_mcxw72.dtsi>
|
||||
#include "frdm_mcxw72-pinctrl.dtsi"
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
/ {
|
||||
model = "NXP FRDM-MCXW72 board";
|
||||
|
@ -16,6 +17,7 @@
|
|||
blue-pwm-led = &blue_pwm_led;
|
||||
green-pwm-led = &green_pwm_led;
|
||||
red-pwm-led = &red_pwm_led;
|
||||
sw0 = &user_button_0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
|
@ -49,6 +51,16 @@
|
|||
pwms = <&tpm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button_0: button_0 {
|
||||
label = "User SW2";
|
||||
gpios = <&gpioc 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpioa {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <nxp/nxp_mcxw72.dtsi>
|
||||
#include "mcxw72_evk-pinctrl.dtsi"
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
/ {
|
||||
model = "NXP MCXW72-EVK board";
|
||||
|
@ -16,6 +17,7 @@
|
|||
blue-pwm-led = &blue_pwm_led;
|
||||
green-pwm-led = &green_pwm_led;
|
||||
red-pwm-led = &red_pwm_led;
|
||||
sw0 = &user_button_0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
|
@ -49,6 +51,16 @@
|
|||
pwms = <&tpm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button_0: button_0 {
|
||||
label = "User SW3";
|
||||
gpios = <&gpioc 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpioa {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue