Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

board: MIMXRT1062-FMURT6: Add pinmux support for uart ports used for gps and telemtry. #58047

Merged
6 changes: 0 additions & 6 deletions boards/arm/mimxrt1062_fmurt6/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
# Copyright 2023 NXP
#

if (CONFIG_DISPLAY)
message(WARNING "
CONFIG_DISPLAY: Running this firmware on a board without a display may damage the board
")
endif()

if(CONFIG_NXP_IMX_RT_BOOT_HEADER)
zephyr_library()
if(CONFIG_BOARD_MIMXRT1062_FMURT6)
Expand Down
98 changes: 89 additions & 9 deletions boards/arm/mimxrt1062_fmurt6/mimxrt1062_fmurt6-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,18 @@
};
};

pinmux_fmu_ppm_rc: pinmux_fmu_ppm_rc {
group0 {
pinmux = <&iomuxc_gpio_b1_06_gpt1_capture2>;

drive-strength = "disabled";
bias-pull-up;
bias-pull-up-value = "47k";
slew-rate = "fast";
input-enable;
};
};

pinmux_flexspi1: pinmux_flexspi1 {
group0 {
pinmux = <&iomuxc_gpio_sd_b1_05_flexspi_a_dqs>;
Expand Down Expand Up @@ -231,7 +243,19 @@
group0 {
pinmux = <&iomuxc_gpio_b0_05_lpi2c2_sda>,
<&iomuxc_gpio_b0_04_lpi2c2_scl>;
drive-strength = "r0-6";
drive-strength = "r0-7";
drive-open-drain;
slew-rate = "slow";
nxp,speed = "100-mhz";
input-enable;
};
};

pinmux_lpi2c3: pinmux_lpi2c3 {
group0 {
pinmux = <&iomuxc_gpio_emc_21_lpi2c3_sda>,
<&iomuxc_gpio_emc_22_lpi2c3_scl>;
drive-strength = "r0-7";
drive-open-drain;
slew-rate = "slow";
nxp,speed = "100-mhz";
Expand Down Expand Up @@ -313,6 +337,8 @@
pinmux = <&iomuxc_gpio_emc_32_lpuart7_rx>,
<&iomuxc_gpio_emc_31_lpuart7_tx>;
drive-strength = "r0-6";
bias-pull-up;
bias-pull-up-value = "100k";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
Expand All @@ -330,10 +356,37 @@
};
};

pinmux_lpuart2: pinmux_lpuart2 {
group0 {
pinmux = <&iomuxc_gpio_ad_b1_02_lpuart2_tx>,
<&iomuxc_gpio_ad_b1_03_lpuart2_rx>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
};

pinmux_lpuart2_sleep: pinmux_lpuart2_sleep {
group0 {
pinmux = <&iomuxc_gpio_ad_b1_03_lpuart2_rx>;
drive-strength = "r0";
bias-pull-up;
bias-pull-up-value = "100k";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
group1 {
pinmux = <&iomuxc_gpio_ad_b1_02_lpuart2_tx>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
};

pinmux_lpuart3: pinmux_lpuart3 {
group0 {
pinmux = <&iomuxc_gpio_ad_b1_06_lpuart3_tx>,
<&iomuxc_gpio_ad_b1_07_lpuart3_rx>;
pinmux = <&iomuxc_gpio_b0_08_lpuart3_tx>,
<&iomuxc_gpio_b0_09_lpuart3_rx>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
Expand All @@ -343,10 +396,10 @@
/* Flow control for lpuart3 */
pinmux_lpuart3_flow_control: pinmux_lpuart3_flow_control {
group0 {
pinmux = <&iomuxc_gpio_ad_b1_06_lpuart3_tx>,
<&iomuxc_gpio_ad_b1_07_lpuart3_rx>,
<&iomuxc_gpio_ad_b1_04_lpuart3_cts_b>,
<&iomuxc_gpio_ad_b1_05_lpuart3_rts_b>;
pinmux = <&iomuxc_gpio_b0_08_lpuart3_tx>,
<&iomuxc_gpio_b0_09_lpuart3_rx>,
<&iomuxc_gpio_sd_b1_04_gpio3_io04>,
<&iomuxc_gpio_emc_24_gpio4_io24>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
Expand All @@ -355,15 +408,42 @@

pinmux_lpuart3_sleep: pinmux_lpuart3_sleep {
group0 {
pinmux = <&iomuxc_gpio_ad_b1_06_gpio1_io22>;
pinmux = <&iomuxc_gpio_b0_09_lpuart3_rx>;
drive-strength = "r0";
bias-pull-up;
bias-pull-up-value = "100k";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
group1 {
pinmux = <&iomuxc_gpio_b0_08_lpuart3_tx>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
};

pinmux_lpuart5: pinmux_lpuart5 {
group0 {
pinmux = <&iomuxc_gpio_emc_23_lpuart5_tx>,
<&iomuxc_gpio_b1_13_lpuart5_rx>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
};

pinmux_lpuart5_sleep: pinmux_lpuart5_sleep {
group0 {
pinmux = <&iomuxc_gpio_b1_13_lpuart5_rx>;
drive-strength = "r0";
bias-pull-up;
bias-pull-up-value = "100k";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
group1 {
pinmux = <&iomuxc_gpio_ad_b1_07_lpuart3_rx>;
pinmux = <&iomuxc_gpio_emc_23_lpuart5_tx>;
drive-strength = "r0-6";
slew-rate = "slow";
nxp,speed = "100-mhz";
Expand Down
37 changes: 36 additions & 1 deletion boards/arm/mimxrt1062_fmurt6/mimxrt1062_fmurt6.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
led1 = &red_led;
watchdog0 = &wdog0;
sdhc0 = &usdhc1;
pwm-0 = &flexpwm2_pwm0;
gps1 = &lpuart2;
telem1 = &lpuart3;
telem4-gps2 = &lpuart5;
};

chosen {
Expand Down Expand Up @@ -140,6 +142,7 @@
pinctrl-0 = <&pinmux_flexcan3>;
pinctrl-names = "default";
bus-speed = <125000>;
bus-speed-data = <1000000>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the board changes for bus speed and prescaler settings to another commit, since this one is titled soc: arm: nxp_imxrt1062: fix PWM node names.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Split it out into:

  • board: MIMXRT1062-FMURT6: Set CANFD bus-speed-data
  • board: MIMXRT1062-FMURT6: correct PWM prescaler

and renamed it to be more proper with:

  • soc: nxp_rt10xx: add unique PWM names.

can-transceiver {
max-bitrate = <5000000>;
};
Expand Down Expand Up @@ -284,6 +287,30 @@
pinctrl-names = "default", "sleep";
};

&lpuart2 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&pinmux_lpuart2>;
pinctrl-1 = <&pinmux_lpuart2_sleep>;
pinctrl-names = "default", "sleep";
};

&lpuart3 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&pinmux_lpuart3>;
pinctrl-1 = <&pinmux_lpuart3_sleep>;
pinctrl-names = "default", "sleep";
};

&lpuart5 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&pinmux_lpuart5>;
pinctrl-1 = <&pinmux_lpuart5_sleep>;
pinctrl-names = "default", "sleep";
};

&lpspi1 {
status = "okay";
pinctrl-0 = <&pinmux_lpspi1>;
Expand Down Expand Up @@ -323,48 +350,56 @@
status = "okay";
pinctrl-0 = <&pinmux_flexpwm_fmu_ch1>;
pinctrl-names = "default";
nxp,prescaler = <64>;
};

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

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

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

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

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

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

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

&enet2 {
Expand Down
Loading
Loading