Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Targeted HardwarephyBOARD-Zeta (i.MX7)
Targeted SoftwarePD18.1.1
Date

 


Summary

This is a summary of the how to.

Step-by-step guide

For u-boot

To change the serial console for u-boot, you'll need to modify the u-boot source here:

/opt/PHYTEC_BSPs/imx7/build/tmp/work/imx7d_phyboard_zeta_001-poky-linux-gnueabi/u-boot-phytec/2016.03+git_v2016.03-phy2-r0/git/include/configs/mx7d_phyboard_zeta.h

https://stash.phytec.com/projects/PUB/repos/uboot-phytec/browse/include/configs/mx7d_phyboard_zeta.h?at=refs%2Ftags%2FBSP-Yocto-FSL-iMX7-PD18.1.1

change

CONFIG_CONS_INDEX and CONFIG_MXC_UART_BASE definitions in the u-boot source:

change CONFIG_CONS_INDEX to indicate the index of the UART that is desired. In this case, we will change it from 5 to 1:

Code Block
Code Block
languagebash
/* allow to overwrite serial and ethaddr */
#define CONFIG_ENV_OVERWRITE
#undef CONFIG_CONS_INDEX
#define CONFIG_CONS_INDEX 5
#define CONFIG_BAUDRATE 115200

...


Code Block
languagebash
/* allow to overwrite serial and ethaddr */
#define CONFIG_ENV_OVERWRITE
#undef CONFIG_CONS_INDEX
#define CONFIG_CONS_INDEX 1
#define CONFIG_BAUDRATE 115200

Make sure the desired UART pins are muxed correctly in u-boot:
/opt/PHYTEC_BSPs/imx7/build/tmp/work/imx7d_phyboard_zeta_001-poky-linux-gnueabi/u-boot-phytec/2016.03+git_v2016.03-phy2-r0/git/board/phytec/mx7d_phyboard_zeta/mx7d_phyboard_zeta.c

https://stash.phytec.com/projects/PUB/repos/uboot-phytec/browse/arch/arm/dts/imx7d-phyboard-zeta-001.dts?at=BSP-Yocto-FSL-iMX7-PD18.1.1


Change CONFIG_MXC_UART_BASE to indicate the UART base address of the UART that is desired. In this case, we will change it from 5 to 1:

Code Block
#define CONFIG_MXC_UART_BASE        UART5_IPS_BASE_ADDR


Code Block
#define CONFIG_MXC_UART_BASE        UART1_IPS_BASE_ADDR


Verify the desired UART pins are muxed correctly in u-boot:https://stash.phytec.com/projects/PUB/repos/uboot-phytec/browse/arch/arm/dts/imx7-peb-eval-02.dtsi?at=refs%2Ftags%2FBSP-Yocto-FSL-iMX7-PD18.1.1

Code Block
&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1>;
	assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>;
	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
	status = "okay";
};

If you would also like to change it for Linux you'll need to make these modifications as well:

/opt/PHYTEC_BSPs/imx7/sources/meta-phytec/meta-phytec-fsl/conf/machine/imx7d-phyboard-zeta-001.conf

change
SERIAL_CONSOLE = "115200 ttymxc4"
to
SERIAL_CONSOLE = "115200 ttymxc0"


For Linux

Change the SERIAL_CONSOLE to indicate the desired 'ttymxc' device in the /opt/PHYTEC_BSPs/imx7/build/tmp/work/imx7d_phyboard_zeta_001 -poky-linux-gnueabi/u-boot-phytec/2016.03+git_v2016.03-phy2-r0/git/include/configs/mx7d_phyboard_zeta.h

https://stash.phytec.com/projects/PUB/repos/meta-phytec/browse/meta-phytec-fsl/conf/machine/imx7d-phyboard-zeta-001.conf?at=refs%2Ftags%2FBSP-Yocto-FSL-iMX7-PD18.1.1

https://stash.phytec.com/projects/PUB/repos/meta-phytec/browse/meta-phytec-fsl/conf/machine/include/imx7-phyboard-zeta.inc?at=refs%2Ftags%2FBSP-Yocto-FSL-iMX7-PD18.1.1

change

machine configuraiton. In this case, we will change it from a 4 to a 0:

Code Block
SERIAL_CONSOLE = "115200 ttymxc4"

to:

Code Block
SERIAL_CONSOLE = "115200 ttymxc0"

/opt/PHYTEC_BSPs/imx7/build/tmp/work/imx7d_phyboard_zeta_001-poky-linux-gnueabi/u-boot-phytec/2016.03+git_v2016.03-phy2-r0/git/include/configs/mx7d_phyboard_zeta.h

change 
#define CONFIG_MXC_UART_BASE        UART5_IPS_BASE_ADDR
to
#define CONFIG_MXC_UART_BASE        UART1_IPS_BASE_ADDR


You'll also want to verify the desired UART pins are muxed in your device tree.:

info
Code Block
&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1>;
	assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>;
	assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
	status = "okay";
};


Content by Label
showLabelsfalse
max5
spacesSUP
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "PRODUCTINFO"
labelskb-how-to-article

...