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

Conversation

sumitbatra-nxp
Copy link
Contributor

@sumitbatra-nxp sumitbatra-nxp commented May 19, 2023

  1. This patch configures the correct pinmux settings for -

    lpuart2, lpuart3, lpuart5 ports used for gps and telemetry modules.

  2. It also adds software pull up for the UART console port lpuart7 to

  3. It fixes an issue in ref clock configuration for ETH2 module

  4. It also increases the RAM size

Fixes #59005
Fixes #59010
Fixes #59013

@@ -33,6 +33,9 @@
zephyr,console = &lpuart7;
zephyr,shell-uart = &lpuart7;
zephyr,canbus = &flexcan1;
zephyr,gps1 = &lpuart2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these well known Zephyr chosen node names? I don't see them being used anywhere in the tree. I would rather see these node names be devicetree aliases if these UART connections are being used in a downstream project

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed from Chosen to Aliases as suggested

/* Set ENET2 ref clock to be generated by External OSC,*/
/* direction as output and frequency to 50MHz */
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay)
IOMUXC_GPR->GPR1 |= (IOMUXC_GPR_GPR1_ENET2_CLK_SEL_MASK |
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like it should be handled at the soc_rt10xx.c level, not within the driver. Also, is there an IOMUXC API present for this bit, like kIOMUXC_GPR_ENET1TxClkOutputDir for ENET1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @danieldegrasse .. I have modified as per your recommendation.. please check now..

@sumitbatra-nxp sumitbatra-nxp force-pushed the pr-mimxrt1062-fmurt6 branch 5 times, most recently from e4d2baf to e8c4565 Compare June 4, 2023 18:27
@sumitbatra-nxp
Copy link
Contributor Author

@danieldegrasse .. can you please re-check..
@dleach02.. @mmahadevan108 can you please review

@bperseghetti bperseghetti force-pushed the pr-mimxrt1062-fmurt6 branch 2 times, most recently from 19b49b3 to 7b6d353 Compare June 7, 2023 09:14
@sumitbatra-nxp sumitbatra-nxp force-pushed the pr-mimxrt1062-fmurt6 branch 2 times, most recently from 251e5e6 to bb7e50c Compare June 7, 2023 11:27
@bperseghetti
Copy link
Member

@danieldegrasse we added the issues for the bug report fixs and linked them.

@bperseghetti bperseghetti force-pushed the pr-mimxrt1062-fmurt6 branch 3 times, most recently from d6c09e9 to 58be408 Compare June 8, 2023 19:00
gps1 = &lpuart2;
telem1 = &lpuart3;
telem4-gps2 = &lpuart5;
};

pwm_shell: pwm_shell {
Copy link
Collaborator

Choose a reason for hiding this comment

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

the commit title MIMXRT1062-FMURT6: Fix PWM device names. Should be updated to something like the following:
soc: arm: nxp_imx: fix PWM node names

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed !!

@sumitbatra-nxp sumitbatra-nxp force-pushed the pr-mimxrt1062-fmurt6 branch 4 times, most recently from a375f58 to 460e409 Compare June 16, 2023 09:44
sumitbatra-nxp and others added 2 commits June 16, 2023 21:55
used for gps and telemtry.

This patch configures the correct pinmux settings for

lpuart2, lpuart3, lpuart5 ports used for gps and telemetry modules.

It also adds software pull up for the UART console port lpuart7.

Signed-off-by: Sumit Batra <[email protected]>
Co-authored-by: Benjamin Perseghetti <[email protected]>
Co-authored-by: Iain Galloway <[email protected]>
…ists

This patch removes an unncessary message for presence or absence of DISPLAY

Signed-off-by: Sumit Batra <[email protected]>
@@ -66,7 +66,12 @@ const clock_enet_pll_config_t ethPllConfig = {
#else
.enableClkOutput25M = false,
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Commit message here needs to be to something like- soc: rt10xx: fix the sequence of Enet2 ref clk enablement

Copy link
Member

Choose a reason for hiding this comment

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

Commit title/message now updated.

@@ -143,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.

sumitbatra-nxp and others added 6 commits June 27, 2023 14:11
This patch sets ENET2 ref clock to be generated by External OSC

ENET2 ref clock direction as output

ENET2 ref clk frequency to 50MHz

Signed-off-by: Sumit Batra <[email protected]>
Enable PWM to use unique device names.

Signed-off-by: Benjamin Perseghetti <[email protected]>
This commit adds the Pinmux and Pad settings for FMU PPM Input Pin

Signed-off-by: Sumit Batra <[email protected]>
This patch adds the pinmux and pad settings for I2C3 SDA and SCL pins

Signed-off-by: Sumit Batra <[email protected]>
Set the PWM clock prescaler values to 64 for controlling standard servo
50Hz carrier frequency.

Signed-off-by: Benjamin Perseghetti <[email protected]>
Set the flexcan3 bus-speed-data to allow for correct CANFD data-speed.

Signed-off-by: Benjamin Perseghetti <[email protected]>
@sumitbatra-nxp
Copy link
Contributor Author

@mmahadevan108 .. Can you kindly review, as we need a second approver as well.

@mmahadevan108 mmahadevan108 merged commit fe0efb4 into zephyrproject-rtos:main Jul 3, 2023
16 checks passed
@bperseghetti bperseghetti deleted the pr-mimxrt1062-fmurt6 branch July 3, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants