Skip to content

Commit

Permalink
MIMXRT1062-FMURT6: Fix PWM device names.
Browse files Browse the repository at this point in the history
Enable PWM to use unique device names.

Signed-off-by: Benjamin Perseghetti <[email protected]>
  • Loading branch information
bperseghetti committed Jun 8, 2023
1 parent e8c4565 commit 58be408
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 17 deletions.
38 changes: 37 additions & 1 deletion boards/arm/mimxrt1062_fmurt6/mimxrt1062_fmurt6.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,39 @@
led1 = &red_led;
watchdog0 = &wdog0;
sdhc0 = &usdhc1;
pwm-0 = &flexpwm2_pwm0;
gps1 = &lpuart2;
telem1 = &lpuart3;
telem4-gps2 = &lpuart5;
};

pwm_shell: pwm_shell {
compatible = "pwm-leds";
aux1: aux1 {
pwms = <&flexpwm2_pwm0 0 PWM_USEC(2500) PWM_POLARITY_NORMAL>;
};
aux2: aux2 {
pwms = <&flexpwm2_pwm1 0 PWM_USEC(2500) PWM_POLARITY_NORMAL>;
};
aux3: aux3 {
pwms = <&flexpwm2_pwm2 0 PWM_USEC(2500) PWM_POLARITY_NORMAL>;
};
aux4: aux4 {
pwms = <&flexpwm2_pwm3 0 PWM_USEC(2500) PWM_POLARITY_NORMAL>;
};
aux5: aux5 {
pwms = <&flexpwm3_pwm2 0 PWM_USEC(2500) PWM_POLARITY_NORMAL>;
};
aux6: aux6 {
pwms = <&flexpwm3_pwm0 1 PWM_USEC(2500) PWM_POLARITY_NORMAL>;
};
aux7: aux7 {
pwms = <&flexpwm4_pwm2 0 PWM_USEC(2500) PWM_POLARITY_NORMAL>;
};
aux8: aux8 {
pwms = <&flexpwm4_pwm0 1 PWM_USEC(2500) PWM_POLARITY_NORMAL>;
};
};

chosen {
zephyr,flash-controller = &s26ks512s0;
zephyr,flash = &s26ks512s0;
Expand Down Expand Up @@ -143,6 +170,7 @@
pinctrl-0 = <&pinmux_flexcan3>;
pinctrl-names = "default";
bus-speed = <125000>;
bus-speed-data = <1000000>;
can-transceiver {
max-bitrate = <5000000>;
};
Expand Down Expand Up @@ -350,48 +378,56 @@
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch1>;
pinctrl-names = "default";
nxp,prescaler = <8>;
};

&flexpwm2_pwm1 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch2>;
pinctrl-names = "default";
nxp,prescaler = <8>;
};

&flexpwm2_pwm2 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch3>;
pinctrl-names = "default";
nxp,prescaler = <8>;
};

&flexpwm2_pwm3 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch4>;
pinctrl-names = "default";
nxp,prescaler = <8>;
};

&flexpwm3_pwm2 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch5>;
pinctrl-names = "default";
nxp,prescaler = <8>;
};

&flexpwm3_pwm0 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch6>;
pinctrl-names = "default";
nxp,prescaler = <8>;
};

&flexpwm4_pwm2 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch7>;
pinctrl-names = "default";
nxp,prescaler = <8>;
};

&flexpwm4_pwm0 {
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch8>;
pinctrl-names = "default";
nxp,prescaler = <8>;
};

&enet2 {
Expand Down
32 changes: 16 additions & 16 deletions dts/arm/nxp/nxp_rt10xx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@
reg = <0x403dc000 0x4000>;
interrupts = <106 0>;

flexpwm1_pwm0: pwm0 {
flexpwm1_pwm0: flexpwm1_pwm0 {
compatible = "nxp,imx-pwm";
index = <0>;
interrupts = <102 0>;
Expand All @@ -574,7 +574,7 @@
status = "disabled";
};

flexpwm1_pwm1: pwm1 {
flexpwm1_pwm1: flexpwm1_pwm1 {
compatible = "nxp,imx-pwm";
index = <1>;
interrupts = <103 0>;
Expand All @@ -584,7 +584,7 @@
status = "disabled";
};

flexpwm1_pwm2: pwm2 {
flexpwm1_pwm2: flexpwm1_pwm2 {
compatible = "nxp,imx-pwm";
index = <2>;
interrupts = <104 0>;
Expand All @@ -594,7 +594,7 @@
status = "disabled";
};

flexpwm1_pwm3: pwm3 {
flexpwm1_pwm3: flexpwm1_pwm3 {
compatible = "nxp,imx-pwm";
index = <3>;
interrupts = <105 0>;
Expand All @@ -610,7 +610,7 @@
reg = <0x403e0000 0x4000>;
interrupts = <141 0>;

flexpwm2_pwm0: pwm0 {
flexpwm2_pwm0: flexpwm2_pwm0 {
compatible = "nxp,imx-pwm";
index = <0>;
interrupts = <137 0>;
Expand All @@ -620,7 +620,7 @@
status = "disabled";
};

flexpwm2_pwm1: pwm1 {
flexpwm2_pwm1: flexpwm2_pwm1 {
compatible = "nxp,imx-pwm";
index = <1>;
interrupts = <138 0>;
Expand All @@ -630,7 +630,7 @@
status = "disabled";
};

flexpwm2_pwm2: pwm2 {
flexpwm2_pwm2: flexpwm2_pwm2 {
compatible = "nxp,imx-pwm";
index = <2>;
interrupts = <139 0>;
Expand All @@ -640,7 +640,7 @@
status = "disabled";
};

flexpwm2_pwm3: pwm3 {
flexpwm2_pwm3: flexpwm2_pwm3 {
compatible = "nxp,imx-pwm";
index = <3>;
interrupts = <140 0>;
Expand All @@ -656,7 +656,7 @@
reg = <0x403e4000 0x4000>;
interrupts = <146 0>;

flexpwm3_pwm0: pwm0 {
flexpwm3_pwm0: flexpwm3_pwm0 {
compatible = "nxp,imx-pwm";
index = <0>;
interrupts = <142 0>;
Expand All @@ -666,7 +666,7 @@
status = "disabled";
};

flexpwm3_pwm1: pwm1 {
flexpwm3_pwm1: flexpwm3_pwm1 {
compatible = "nxp,imx-pwm";
index = <1>;
interrupts = <143 0>;
Expand All @@ -676,7 +676,7 @@
status = "disabled";
};

flexpwm3_pwm2: pwm2 {
flexpwm3_pwm2: flexpwm3_pwm2 {
compatible = "nxp,imx-pwm";
index = <2>;
interrupts = <144 0>;
Expand All @@ -686,7 +686,7 @@
status = "disabled";
};

flexpwm3_pwm3: pwm3 {
flexpwm3_pwm3: flexpwm3_pwm3 {
compatible = "nxp,imx-pwm";
index = <3>;
interrupts = <145 0>;
Expand All @@ -702,7 +702,7 @@
reg = <0x403e8000 0x4000>;
interrupts = <151 0>;

flexpwm4_pwm0: pwm0 {
flexpwm4_pwm0: flexpwm4_pwm0 {
compatible = "nxp,imx-pwm";
index = <0>;
interrupts = <147 0>;
Expand All @@ -712,7 +712,7 @@
status = "disabled";
};

flexpwm4_pwm1: pwm1 {
flexpwm4_pwm1: flexpwm4_pwm1 {
compatible = "nxp,imx-pwm";
index = <1>;
interrupts = <148 0>;
Expand All @@ -722,7 +722,7 @@
status = "disabled";
};

flexpwm4_pwm2: pwm2 {
flexpwm4_pwm2: flexpwm4_pwm2 {
compatible = "nxp,imx-pwm";
index = <2>;
interrupts = <149 0>;
Expand All @@ -732,7 +732,7 @@
status = "disabled";
};

flexpwm4_pwm3: pwm3 {
flexpwm4_pwm3: flexpwm4_pwm3 {
compatible = "nxp,imx-pwm";
index = <3>;
interrupts = <150 0>;
Expand Down

0 comments on commit 58be408

Please sign in to comment.