imx6ull: Fix missing initial output from UART
Subsystems (5)
cover imx6ull: Fix missing initial output from UART
For Colibri iMX6ULL we have to set pinmux for uart configuration ASAP (ideally before relocation) to get serial console working. Without this we miss almost the half of output (U-boot version, CPU defails, Reset cause, DRAM details etc.).
To achieve this we need to force pinctrl-mx6 to get probed before relocation and add u-boot,dm-pre-reloc properties to uart pinmux configuration nodes. Setting pinmux configuration for UART before was done in board_early_init_f().
Igor Opaniuk (2):
pinctrl: nxp: mx6: DM_FLAG_PRE_RELOC by default
ARM: dts: imx6ull-colibri: pre-reloc for uart pinmux modes
arch/arm/dts/imx6ull-colibri.dts | 2 ++ drivers/pinctrl/nxp/pinctrl-imx6.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/2 pinctrl: nxp: mx6: DM_FLAG_PRE_RELOC by default
From: Igor Opaniuk <[email protected]>
For Colibri iMX6ULL we have to set pinmux configuration ASAP (ideally before relocation) to get serial console working. Without this we miss almost the half of output (U-boot version, CPU defails, Reset cause, DRAM details etc.).
To achieve this we need to force pinctrl-mx6 to get probed before relocation. Setting pinmux configuration for UART before was done in board_early_init_f().
---
drivers/pinctrl/nxp/pinctrl-imx6.c | 2 -- 1 file changed, 2 deletions(-)
drivers/pinctrl/nxp/pinctrl-imx6.c +0 -2
@@ -49,7 +49,5 @@ U_BOOT_DRIVER(imx6_pinctrl) = { .remove = imx_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv), .ops = &imx_pinctrl_ops, -#if !CONFIG_IS_ENABLED (OF_CONTROL ) .flags = DM_FLAG_PRE_RELOC, -#endif };
Signature · 1 line
2.17.1
Fabio Estevam
maintainerPATCH 1/2 pinctrl: nxp: mx6: DM_FLAG_PRE_RELOC by default
Hi Igor,
Quoted 24 lines · Igor Opaniuk
From: Igor Opaniuk <[email protected]>
For Colibri iMX6ULL we have to set pinmux configuration ASAP (ideally before relocation) to get serial console working. Without this we miss almost the half of output (U-boot version, CPU defails, Reset cause, DRAM details etc.).
To achieve this we need to force pinctrl-mx6 to get probed before relocation. Setting pinmux configuration for UART before was done in
board_early_init_f().Fixes cd69e8ef9b ("colibri-imx6ull: migrate pinctrl and regulators to dtb/dm")Signed-off-by Igor Opaniuk <[email protected]>---
drivers/pinctrl/nxp/pinctrl-imx6.c | 2 -- 1 file changed, 2 deletions(-)drivers/pinctrl/nxp/pinctrl-imx6.c +0
-0
drivers/pinctrl/nxp/pinctrl-imx6.c U_BOOT_DRIVER(imx6_pinctrl) = { · line 54
Quoted 6 lines
drivers/pinctrl/nxp/pinctrl-imx6.c +0
-2@@ -49,7 +49,5 @@ U_BOOT_DRIVER(imx6_pinctrl) = { .remove = imx_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv), .ops = &imx_pinctrl_ops, -#if !CONFIG_IS_ENABLED (OF_CONTROL ) .flags = DM_FLAG_PRE_RELOC, -#endif
It seems that this is not i.MX6 specific (maybe not even i.MX specific. I noticed this issue on i.MX7 too).
Could this be handled in the drivers/pinctrl core instead?
Just wanted to see if we can get a more generic solution for this issue.
Thanks
PATCH 1/2 pinctrl: nxp: mx6: DM_FLAG_PRE_RELOC by default
Hi Fabio,
Quoted 23 lines · Fabio Estevam
Hi Igor,
Quoted 19 lines · Igor Opaniuk
From: Igor Opaniuk <[email protected]>
For Colibri iMX6ULL we have to set pinmux configuration ASAP (ideally before relocation) to get serial console working. Without this we miss almost the half of output (U-boot version, CPU defails, Reset cause, DRAM details etc.).
To achieve this we need to force pinctrl-mx6 to get probed before relocation. Setting pinmux configuration for UART before was done in
board_early_init_f().Fixes cd69e8ef9b ("colibri-imx6ull: migrate pinctrl and regulators to dtb/dm")Signed-off-by Igor Opaniuk <[email protected]>---
drivers/pinctrl/nxp/pinctrl-imx6.c | 2 -- 1 file changed, 2 deletions(-)
Quoted 14 lines
drivers/pinctrl/nxp/pinctrl-imx6.c U_BOOT_DRIVER(imx6_pinctrl) = { · line 54
Quoted 11 lines
drivers/pinctrl/nxp/pinctrl-imx6.c +0
-2@@ -49,7 +49,5 @@ U_BOOT_DRIVER(imx6_pinctrl) = { .remove = imx_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv), .ops = &imx_pinctrl_ops, -#if !CONFIG_IS_ENABLED (OF_CONTROL ) .flags = DM_FLAG_PRE_RELOC, -#endif It seems that this is not i.MX6 specific (maybe not even i.MX specific. I noticed this issue on i.MX7 too).
Right. Currently there are no any output issues on Colibri iMX7 because board_early_init_f() does apply initial pinmux configuration for uart [1].
Quoted 6 lines
Could this be handled in the
drivers/pinctrlcore instead?Just wanted to see if we can get a more generic solution for this issue.
Thanks
AFAIK, DM_FLAG_PRE_RELOC flag can be set for a driver, not for the whole uclass (but I might be mistaken). Also taking into account memory limitations (small malloc pool etc) before U-boot is relocated, I would force driver to be bounded only in the cases when it's really vital (like this particular case with serial console issue).
Thanks!
[1] board/toradex/colibri_imx7/colibri_imx7.c
--
Best regards - Freundliche Grüsse - Meilleures salutations
Igor Opaniuk
mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk
PATCH 1/2 pinctrl: nxp: mx6: DM_FLAG_PRE_RELOC by default
Hi Fabio,
Quoted 51 lines · Igor Opaniuk
Hi Fabio,
Quoted 23 lines · Fabio Estevam
Hi Igor,
Quoted 19 lines · Igor Opaniuk
From: Igor Opaniuk <[email protected]>
For Colibri iMX6ULL we have to set pinmux configuration ASAP (ideally before relocation) to get serial console working. Without this we miss almost the half of output (U-boot version, CPU defails, Reset cause, DRAM details etc.).
To achieve this we need to force pinctrl-mx6 to get probed before relocation. Setting pinmux configuration for UART before was done in
board_early_init_f().Fixes cd69e8ef9b ("colibri-imx6ull: migrate pinctrl and regulators to dtb/dm")Signed-off-by Igor Opaniuk <[email protected]>---
drivers/pinctrl/nxp/pinctrl-imx6.c | 2 -- 1 file changed, 2 deletions(-)Quoted 14 lines
drivers/pinctrl/nxp/pinctrl-imx6.c U_BOOT_DRIVER(imx6_pinctrl) = { · line 54
Quoted 11 lines
drivers/pinctrl/nxp/pinctrl-imx6.c +0
-2@@ -49,7 +49,5 @@ U_BOOT_DRIVER(imx6_pinctrl) = { .remove = imx_pinctrl_remove, .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv), .ops = &imx_pinctrl_ops, -#if !CONFIG_IS_ENABLED (OF_CONTROL ) .flags = DM_FLAG_PRE_RELOC, -#endif It seems that this is not i.MX6 specific (maybe not even i.MX specific. I noticed this issue on i.MX7 too).
Right. Currently there are no any output issues on Colibri iMX7 because
board_early_init_f()does apply initial pinmux configuration for uart [1].Quoted 5 lines
Could this be handled in the
drivers/pinctrlcore instead?Just wanted to see if we can get a more generic solution for this issue.
Quoted 8 lines
Quoted 1 line
Thanks
AFAIK,
DM_FLAG_PRE_RELOCflag can be set for a driver, not for the whole uclass (but I might be mistaken). Also taking into account memory limitations (small malloc pool etc) before U-boot is relocated, I would force driver to be bounded only in the cases when it's really vital (like this particular case with serial console issue).
I'm currently in the middle of preparing v2, just wanted to know if you do agree with this point and in general have any additional suggestions regarding this?
Quoted 8 lines
Thanks!
[1]
board/toradex/colibri_imx7/colibri_imx7.c--
Best regards - Freundliche Grüsse - Meilleures salutations
Quoted 6 lines
Igor Opaniuk
mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk
Thanks
Signature · 8 lines
Best regards - Freundliche Grüsse - Meilleures salutations Senior Development Engineer, Igor Opaniuk Toradex AG Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 48 00 (main line)
Fabio Estevam
maintainerPATCH 1/2 pinctrl: nxp: mx6: DM_FLAG_PRE_RELOC by default
Hi Igor,
Quoted 2 lines · Igor Opaniuk
I'm currently in the middle of preparing v2, just wanted to know if you do agree with this point and in general have any additional suggestions regarding this?
My only suggestion is to do a single patch that touches all the drivers/pinctrl/nxp/ drivers, not ony the mx6 one.
Thanks
PATCH 2/2 ARM: dts: imx6ull-colibri: pre-reloc for uart pinmux modes
In reply to Igor OpaniukFrom: Igor Opaniuk <[email protected]>
Add u-boot,dm-pre-reloc property for uart pinmux configuration nodes, which enables UART as early as possible (before relocation).
Without this we miss almost the half of output (U-boot version, CPU defails, Reset cause, DRAM details etc.).
---
arch/arm/dts/imx6ull-colibri.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/dts/imx6ull-colibri.dts +2 -0
@@ -458,6 +458,7 @@ }; pinctrl_uart1: uart1-grp { + u-boot,dm-pre-reloc; fsl,pins = < MX6UL_PAD_UART1_TX_DATA__UART1_DTE_RX 0x1b0b1 MX6UL_PAD_UART1_RX_DATA__UART1_DTE_TX 0x1b0b1
@@ -467,6 +468,7 @@ }; pinctrl_uart1_ctrl1: uart1-ctrl1-grp { /* Additional DTR, DCD */ + u-boot,dm-pre-reloc; fsl,pins = < MX6UL_PAD_JTAG_TDI__GPIO1_IO13 0x1b0b1 /* DCD */ MX6UL_PAD_LCD_DATA18__GPIO3_IO23 0x1b0b1 /* DSR */
Signature · 1 line
2.17.1
Fabio Estevam
maintainerPATCH 2/2 ARM: dts: imx6ull-colibri: pre-reloc for uart pinmux modes
Hi Igor,
arch/arm/dts/imx6ull-colibri.dts line 461
Quoted 9 lines · Igor Opaniuk
arch/arm/dts/imx6ull-colibri.dts +1
-0@@ -458,6 +458,7 @@ }; pinctrl_uart1: uart1-grp { + u-boot,dm-pre-reloc;
Shouldn't this U-Boot specific property go toarch/arm/dts/imx6ull-colibri-uboot.dtsi instead?
This way you could keep arch/arm/dts/imx6ull-colibri.dts in sync with Linux.
PATCH 2/2 ARM: dts: imx6ull-colibri: pre-reloc for uart pinmux modes
Hi Fabio,
Quoted 12 lines · Fabio Estevam
Hi Igor,
Quoted 7 lines · Igor Opaniuk
arch/arm/dts/imx6ull-colibri.dts +0
-0@@ -458,6 +458,7 @@ };
Quoted 7 lines
arch/arm/dts/imx6ull-colibri.dts line 461
Quoted 2 lines
arch/arm/dts/imx6ull-colibri.dts +1
-0pinctrl_uart1: uart1-grp { + u-boot,dm-pre-reloc;Shouldn't this U-Boot specific property go to
arch/arm/dts/imx6ull-colibri-uboot.dtsiinstead?This way you could keep
arch/arm/dts/imx6ull-colibri.dtsin sync with Linux.
Thanks for the suggestion, will do in v2.
Signature · 8 lines
Best regards - Freundliche Grüsse - Meilleures salutations Igor Opaniuk mailto: igor.opaniuk at gmail.com skype: igor.opanyuk +380 (93) 836 40 67 http://ua.linkedin.com/in/iopaniuk