Skip to content

Commit

Permalink
boards: mimxrt1180_evk: Enable PWM for RT1180 EVK
Browse files Browse the repository at this point in the history
Enables PWM for RT1180 EVK. Tested with sample led_pwm

Signed-off-by: Lucien Zhao <[email protected]>
  • Loading branch information
lucien-nxp committed Sep 1, 2024
1 parent fe11226 commit fd0b7c0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boards/nxp/mimxrt1180_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+

The default configuration can be found in the defconfig file:
:zephyr_file:`boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33_defconfig`
Expand Down
8 changes: 8 additions & 0 deletions boards/nxp/mimxrt1180_evk/mimxrt1180_evk-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,12 @@
input-enable;
};
};

pinmux_flexpwm2: pinmux_flexpwm2 {
group0 {
pinmux = <&iomuxc_gpio_ad_27_flexpwm2_pwm1_b>;
drive-strength = "high";
slew-rate = "fast";
};
};
};
14 changes: 14 additions & 0 deletions boards/nxp/mimxrt1180_evk/mimxrt1180_evk.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
aliases {
led0 = &green_led;
sw0 = &user_button;
pwm-led0 = &green_pwm_led;
};

leds {
Expand All @@ -29,6 +30,13 @@
zephyr,code = <INPUT_KEY_0>;
};
};

pwmleds {
compatible = "pwm-leds";
green_pwm_led: green_pwm_led {
pwms = <&flexpwm2_pwm1 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
};

&lpuart1 {
Expand Down Expand Up @@ -81,3 +89,9 @@
pinctrl-0 = <&pinmux_lpi2c3>;
pinctrl-names = "default";
};

&flexpwm2_pwm1 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm2>;
pinctrl-names = "default";
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ supported:
- uart
- i2c
- counter
- pwm
vendor: nxp
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ supported:
- uart
- i2c
- counter
- pwm
vendor: nxp

0 comments on commit fd0b7c0

Please sign in to comment.