Skip to content
Permalink
Browse files

dts: arm: nxp: rt: Add PWM nodes

i.MX RT10XX processors have four eFlexPWM modules, each containing
four 2-channels PWM submodules.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
  • Loading branch information...
Loic Poulain authored and MaureenHelm committed Mar 4, 2019
1 parent 453ee5e commit 630e0c7a6e9769ab5dd732fd9413864f51a1fae4
Showing with 297 additions and 0 deletions.
  1. +152 −0 dts/arm/nxp/nxp_rt.dtsi
  2. +20 −0 dts/bindings/pwm/nxp,flexpwm.yaml
  3. +29 −0 dts/bindings/pwm/nxp,imx-pwm.yaml
  4. +96 −0 soc/arm/nxp_imx/rt/dts_fixup.h
@@ -331,6 +331,158 @@
status = "disabled";
};

flexpwm1: flexpwm@403dc000 {
compatible = "nxp,flexpwm";
reg = <0x403dc000 0x4000>;
interrupts = <106 0>;

flexpwm1_pwm0: pwm0 {
compatible = "nxp,imx-pwm";
index = <0>;
label = "FLEXPWM1_PWM0";
interrupts = <102 0>;
#pwm-cells = <2>;
};

flexpwm1_pwm1: pwm1 {
compatible = "nxp,imx-pwm";
index = <1>;
label = "FLEXPWM1_PWM1";
interrupts = <103 0>;
#pwm-cells = <2>;
};

flexpwm1_pwm2: pwm2 {
compatible = "nxp,imx-pwm";
index = <2>;
label = "FLEXPWM1_PWM2";
interrupts = <104 0>;
#pwm-cells = <2>;
};

flexpwm1_pwm3: pwm3 {
compatible = "nxp,imx-pwm";
index = <3>;
label = "FLEXPWM1_PWM3";
interrupts = <105 0>;
#pwm-cells = <2>;
};
};

flexpwm2: flexpwm@403e0000 {
compatible = "nxp,flexpwm";
reg = <0x403e0000 0x4000>;
interrupts = <141 0>;

flexpwm2_pwm0: pwm0 {
compatible = "nxp,imx-pwm";
index = <0>;
label = "FLEXPWM2_PWM0";
interrupts = <137 0>;
#pwm-cells = <2>;
};

flexpwm2_pwm1: pwm1 {
compatible = "nxp,imx-pwm";
index = <1>;
label = "FLEXPWM2_PWM1";
interrupts = <138 0>;
#pwm-cells = <2>;
};

flexpwm2_pwm2: pwm2 {
compatible = "nxp,imx-pwm";
index = <2>;
label = "FLEXPWM2_PWM2";
interrupts = <139 0>;
#pwm-cells = <2>;
};

flexpwm2_pwm3: pwm3 {
compatible = "nxp,imx-pwm";
index = <3>;
label = "FLEXPWM2_PWM3";
interrupts = <140 0>;
#pwm-cells = <2>;
};
};

flexpwm3: flexpwm@403e4000 {
compatible = "nxp,flexpwm";
reg = <0x403e4000 0x4000>;
interrupts = <146 0>;

flexpwm3_pwm0: pwm0 {
compatible = "nxp,imx-pwm";
index = <0>;
label = "FLEXPWM3_PWM0";
interrupts = <142 0>;
#pwm-cells = <2>;
};

flexpwm3_pwm1: pwm1 {
compatible = "nxp,imx-pwm";
index = <1>;
label = "FLEXPWM3_PWM1";
interrupts = <143 0>;
#pwm-cells = <2>;
};

flexpwm3_pwm2: pwm2 {
compatible = "nxp,imx-pwm";
index = <2>;
label = "FLEXPWM3_PWM2";
interrupts = <144 0>;
#pwm-cells = <2>;
};

flexpwm3_pwm3: pwm3 {
compatible = "nxp,imx-pwm";
index = <3>;
label = "FLEXPWM3_PWM3";
interrupts = <145 0>;
#pwm-cells = <2>;
};
};

flexpwm4: flexpwm@403e8000 {
compatible = "nxp,flexpwm";
reg = <0x403e8000 0x4000>;
interrupts = <151 0>;

flexpwm4_pwm0: pwm0 {
compatible = "nxp,imx-pwm";
index = <0>;
label = "FLEXPWM4_PWM0";
interrupts = <147 0>;
#pwm-cells = <2>;
};

flexpwm4_pwm1: pwm1 {
compatible = "nxp,imx-pwm";
index = <1>;
label = "FLEXPWM4_PWM1";
interrupts = <148 0>;
#pwm-cells = <2>;
};

flexpwm4_pwm2: pwm2 {
compatible = "nxp,imx-pwm";
index = <2>;
label = "FLEXPWM4_PWM2";
interrupts = <149 0>;
#pwm-cells = <2>;
};

flexpwm4_pwm3: pwm3 {
compatible = "nxp,imx-pwm";
index = <3>;
label = "FLEXPWM4_PWM3";
interrupts = <150 0>;
#pwm-cells = <2>;
};
};

eth: ethernet@402d8000 {
compatible = "nxp,kinetis-ethernet";
reg = <0x402D8000 0x628>;
@@ -0,0 +1,20 @@
---
title: MCUX PWM
version: 0.1

description: >
This binding gives a base representation of the NXP eFLEX PWM module which
is supposed to contain mcux-pwm submodules.
inherits:
!include base.yaml

properties:
compatible:
constraint: "nxp,flexpwm"

reg:
category: required

interrupts:
category: required
@@ -0,0 +1,29 @@
---
title: MCUX PWM
version: 0.1

description: >
This binding gives a base representation of the NXP MCUX PWM
inherits:
!include base.yaml

properties:
compatible:
constraint: "nxp,imx-pwm"

index:
type: int
description: flexpwm submodule index
generation: define
category: required

interrupts:
category: required

label:
category: required

"#cells":
- channel
...
@@ -137,4 +137,100 @@
#define DT_USBD_MCUX_EHCI_NUM_BIDIR_EP DT_NXP_KINETIS_USBD_402E0000_NUM_BIDIR_ENDPOINTS
#define DT_USBD_MCUX_EHCI_MAXIMUM_SPEED DT_NXP_KINETIS_USBD_402E0000_MAXIMUM_SPEED

#define DT_PWM_MCUX_0_BASE_ADDRESS DT_NXP_FLEXPWM_403DC000_BASE_ADDRESS
#define DT_PWM_MCUX_0_IRQ DT_NXP_IMX_PWM_403DC000_PWM0_IRQ_0
#define DT_PWM_MCUX_0_IRQ_PRI DT_NXP_IMX_PWM_403DC000_PWM0_IRQ_0_PRIORITY
#define DT_PWM_MCUX_0_NAME DT_NXP_IMX_PWM_403DC000_PWM0_LABEL
#define DT_PWM_MCUX_0_INDEX DT_NXP_IMX_PWM_403DC000_PWM0_INDEX

#define DT_PWM_MCUX_1_BASE_ADDRESS DT_NXP_FLEXPWM_403DC000_BASE_ADDRESS
#define DT_PWM_MCUX_1_IRQ DT_NXP_IMX_PWM_403DC000_PWM1_IRQ_0
#define DT_PWM_MCUX_1_IRQ_PRI DT_NXP_IMX_PWM_403DC000_PWM1_IRQ_0_PRIORITY
#define DT_PWM_MCUX_1_NAME DT_NXP_IMX_PWM_403DC000_PWM1_LABEL
#define DT_PWM_MCUX_1_INDEX DT_NXP_IMX_PWM_403DC000_PWM1_INDEX

#define DT_PWM_MCUX_2_BASE_ADDRESS DT_NXP_FLEXPWM_403DC000_BASE_ADDRESS
#define DT_PWM_MCUX_2_IRQ DT_NXP_IMX_PWM_403DC000_PWM2_IRQ_0
#define DT_PWM_MCUX_2_IRQ_PRI DT_NXP_IMX_PWM_403DC000_PWM2_IRQ_0_PRIORITY
#define DT_PWM_MCUX_2_NAME DT_NXP_IMX_PWM_403DC000_PWM2_LABEL
#define DT_PWM_MCUX_2_INDEX DT_NXP_IMX_PWM_403DC000_PWM2_INDEX

#define DT_PWM_MCUX_3_BASE_ADDRESS DT_NXP_FLEXPWM_403DC000_BASE_ADDRESS
#define DT_PWM_MCUX_3_IRQ DT_NXP_IMX_PWM_403DC000_PWM3_IRQ_0
#define DT_PWM_MCUX_3_IRQ_PRI DT_NXP_IMX_PWM_403DC000_PWM3_IRQ_0_PRIORITY
#define DT_PWM_MCUX_3_NAME DT_NXP_IMX_PWM_403DC000_PWM3_LABEL
#define DT_PWM_MCUX_3_INDEX DT_NXP_IMX_4PWM_03DC000_PWM3_INDEX

#define DT_PWM_MCUX_4_BASE_ADDRESS DT_NXP_FLEXPWM_403E0000_BASE_ADDRESS
#define DT_PWM_MCUX_4_IRQ DT_NXP_IMX_PWM_403E0000_PWM0_IRQ_0
#define DT_PWM_MCUX_4_IRQ_PRI DT_NXP_IMX_PWM_403E0000_PWM0_IRQ_0_PRIORITY
#define DT_PWM_MCUX_4_NAME DT_NXP_IMX_PWM_403E0000_PWM0_LABEL
#define DT_PWM_MCUX_4_INDEX DT_NXP_IMX_PWM_403E0000_PWM0_INDEX

#define DT_PWM_MCUX_5_BASE_ADDRESS DT_NXP_FLEXPWM_403E0000_BASE_ADDRESS
#define DT_PWM_MCUX_5_IRQ DT_NXP_IMX_PWM_403E0000_PWM1_IRQ_0
#define DT_PWM_MCUX_5_IRQ_PRI DT_NXP_IMX_PWM_403E0000_PWM1_IRQ_0_PRIORITY
#define DT_PWM_MCUX_5_NAME DT_NXP_IMX_PWM_403E0000_PWM1_LABEL
#define DT_PWM_MCUX_5_INDEX DT_NXP_IMX_PWM_403E0000_PWM1_INDEX

#define DT_PWM_MCUX_6_BASE_ADDRESS DT_NXP_FLEXPWM_403E0000_BASE_ADDRESS
#define DT_PWM_MCUX_6_IRQ DT_NXP_IMX_PWM_403E0000_PWM2_IRQ_0
#define DT_PWM_MCUX_6_IRQ_PRI DT_NXP_IMX_PWM_403E0000_PWM2_IRQ_0_PRIORITY
#define DT_PWM_MCUX_6_NAME DT_NXP_IMX_PWM_403E0000_PWM2_LABEL
#define DT_PWM_MCUX_6_INDEX DT_NXP_IMX_PWM_403E0000_PWM2_INDEX

#define DT_PWM_MCUX_7_BASE_ADDRESS DT_NXP_FLEXPWM_403E0000_BASE_ADDRESS
#define DT_PWM_MCUX_7_IRQ DT_NXP_IMX_PWM_403E0000_PWM3_IRQ_0
#define DT_PWM_MCUX_7_IRQ_PRI DT_NXP_IMX_PWM_403E0000_PWM3_IRQ_0_PRIORITY
#define DT_PWM_MCUX_7_NAME DT_NXP_IMX_PWM_403E0000_PWM3_LABEL
#define DT_PWM_MCUX_7_INDEX DT_NXP_IMX_PWM_403E0000_PWM3_INDEX

#define DT_PWM_MCUX_8_BASE_ADDRESS DT_NXP_FLEXPWM_403E4000_BASE_ADDRESS
#define DT_PWM_MCUX_8_IRQ DT_NXP_IMX_PWM_403E4000_PWM0_IRQ_0
#define DT_PWM_MCUX_8_IRQ_PRI DT_NXP_IMX_PWM_403E4000_PWM0_IRQ_0_PRIORITY
#define DT_PWM_MCUX_8_NAME DT_NXP_IMX_PWM_403E4000_PWM0_LABEL
#define DT_PWM_MCUX_8_INDEX DT_NXP_IMX_PWM_403E4000_PWM0_INDEX

#define DT_PWM_MCUX_9_BASE_ADDRESS DT_NXP_FLEXPWM_403E4000_BASE_ADDRESS
#define DT_PWM_MCUX_9_IRQ DT_NXP_IMX_PWM_403E4000_PWM1_IRQ_0
#define DT_PWM_MCUX_9_IRQ_PRI DT_NXP_IMX_PWM_403E4000_PWM1_IRQ_0_PRIORITY
#define DT_PWM_MCUX_9_NAME DT_NXP_IMX_PWM_403E4000_PWM1_LABEL
#define DT_PWM_MCUX_9_INDEX DT_NXP_IMX_PWM_403E4000_PWM1_INDEX

#define DT_PWM_MCUX_10_BASE_ADDRESS DT_NXP_FLEXPWM_403E4000_BASE_ADDRESS
#define DT_PWM_MCUX_10_IRQ DT_NXP_IMX_PWM_403E4000_PWM2_IRQ_0
#define DT_PWM_MCUX_10_IRQ_PRI DT_NXP_IMX_PWM_403E4000_PWM2_IRQ_0_PRIORITY
#define DT_PWM_MCUX_10_NAME DT_NXP_IMX_PWM_403E4000_PWM2_LABEL
#define DT_PWM_MCUX_10_INDEX DT_NXP_IMX_PWM_403E4000_PWM2_INDEX

#define DT_PWM_MCUX_11_BASE_ADDRESS DT_NXP_FLEXPWM_403E4000_BASE_ADDRESS
#define DT_PWM_MCUX_11_IRQ DT_NXP_IMX_PWM_403E4000_PWM3_IRQ_0
#define DT_PWM_MCUX_11_IRQ_PRI DT_NXP_IMX_PWM_403E4000_PWM3_IRQ_0_PRIORITY
#define DT_PWM_MCUX_11_NAME DT_NXP_IMX_PWM_403E4000_PWM3_LABEL
#define DT_PWM_MCUX_11_INDEX DT_NXP_IMX_PWM_403E4000_PWM3_INDEX

#define DT_PWM_MCUX_12_BASE_ADDRESS DT_NXP_FLEXPWM_403E8000_BASE_ADDRESS
#define DT_PWM_MCUX_12_IRQ DT_NXP_IMX_PWM_403E8000_PWM0_IRQ_0
#define DT_PWM_MCUX_12_IRQ_PRI DT_NXP_IMX_PWM_403E8000_PWM0_IRQ_0_PRIORITY
#define DT_PWM_MCUX_12_NAME DT_NXP_IMX_PWM_403E8000_PWM0_LABEL
#define DT_PWM_MCUX_12_INDEX DT_NXP_IMX_PWM_403E8000_PWM0_INDEX

#define DT_PWM_MCUX_13_BASE_ADDRESS DT_NXP_FLEXPWM_403E8000_BASE_ADDRESS
#define DT_PWM_MCUX_13_IRQ DT_NXP_IMX_PWM_403E8000_PWM1_IRQ_0
#define DT_PWM_MCUX_13_IRQ_PRI DT_NXP_IMX_PWM_403E8000_PWM1_IRQ_0_PRIORITY
#define DT_PWM_MCUX_13_NAME DT_NXP_IMX_PWM_403E8000_PWM1_LABEL
#define DT_PWM_MCUX_13_INDEX DT_NXP_IMX_PWM_403E8000_PWM1_INDEX

#define DT_PWM_MCUX_14_BASE_ADDRESS DT_NXP_FLEXPWM_403E8000_BASE_ADDRESS
#define DT_PWM_MCUX_14_IRQ DT_NXP_IMX_PWM_403E8000_PWM2_IRQ_0
#define DT_PWM_MCUX_14_IRQ_PRI DT_NXP_IMX_PWM_403E8000_PWM2_IRQ_0_PRIORITY
#define DT_PWM_MCUX_14_NAME DT_NXP_IMX_PWM_403E8000_PWM2_LABEL
#define DT_PWM_MCUX_14_INDEX DT_NXP_IMX_PWM_403E8000_PWM2_INDEX

#define DT_PWM_MCUX_15_BASE_ADDRESS DT_NXP_FLEXPWM_403E8000_BASE_ADDRESS
#define DT_PWM_MCUX_15_IRQ DT_NXP_IMX_PWM_403E8000_PWM3_IRQ_0
#define DT_PWM_MCUX_15_IRQ_PRI DT_NXP_IMX_PWM_403E8000_PWM3_IRQ_0_PRIORITY
#define DT_PWM_MCUX_15_NAME DT_NXP_IMX_PWM_403E8000_PWM3_LABEL
#define DT_PWM_MCUX_15_INDEX DT_NXP_IMX_PWM_403E8000_PWM3_INDEX

/* End of SoC Level DTS fixup file */

0 comments on commit 630e0c7

Please sign in to comment.
You can’t perform that action at this time.