Skip to contentSkip to conversation

linux-imx: add clock patch for revision T0 1.0 of i.MX6Q

PATCH Superseded Gary Bisson 2 participants 2 messages Dec 3, 2014 Arm i.MX and Layerscape

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 linux-imx: add clock patch for revision T0 1.0 of i.MX6Q

The post dividers do not work on i.MX6Q rev T0 1.0 so they must be fixed to 1. As the table index was wrong, a divider a of 4 could still be requested which implied the clock not to be set properly. This is the root cause of the HDMI not working at high resolution on rev T0 1.0 of the SoC, giving the following error:
mxc_sdc_fb fb.27: timeout when waiting for flip irq

Upstream-Status: Pending

---
Changes since v2:
- Reword commit log as suggested by Diaine

This patch has been tested with a Sabrelite rev D (5-9-12).

However I've realized this patch doesn't fix the HDMI at 1080p60 when testing Eric's patches on mainline. The reason for it is that 6x_bootscript fixes the resolution at 720p30 which now works great when using FSL kernel. But mainline kernel is forcing 1080p60 by default and can't seem to be changed (don't know what video parameters to use).

Doing more testing on FSL kernel proved that it works only up to 1080p30 but using 60fps seems to still be broken. It is to be noted that the error message doesn't appear anymore. I'll try to compare again the IMX_CHIP_REVISION checks between the 3.0.35 and the 3.10.17 as 1080p60 works on 3.0.35.

I figured it might still be worth integrating this patch as the clock index is clearly wrong. In the meantime I'll work on getting 1080p60 fixed. Only then I will submit the patches to the lkml.

Let me know your thoughts.

Thanks!

---
 ...6q-fix-video-divider-for-revision-1.0-of-.patch | 33 ++++++++++++++++++++++
 recipes-kernel/linux/linux-imx_3.10.17.bb          |  2 ++
 2 files changed, 35 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-imx-3.10.17/0001-ARM-clk-imx6q-fix-video-divider-for-revision-1.0-of-.patch
recipes-kernel/linux/linux-imx-3.10.17/0001-ARM-clk-imx6q-fix-video-divider-for-revision-1.0-of-.patch new file +33 -0
new file mode 100644
index 0000000..bcddb16
@@ -0,0 +1,33 @@
+From ffcd8b98f6ba3a2b7a4aecc1e5e454de5fa5c4c3 Mon Sep 17 00:00:00 2001
+From: Gary Bisson <[email protected]>
+Date: Tue, 2 Dec 2014 22:11:14 -0800
+Subject: [PATCH] ARM: clk-imx6q: fix video divider for revision 1.0 of i.MX6q
+
+As post dividers do not work on i.MX6Q revision 1.0 they must be fixed
+to 1. As the table index was wrong, a divider a of 4 could still be
+requested which implied the clock not to be set properly. This is the
+root cause of the HDMI not working at high resolution on T1.0 version of
+the SoC, giving the following error:
+mxc_sdc_fb fb.27: timeout when waiting for flip irq
+
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ arch/arm/mach-imx/clk-imx6q.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
+index e09b1e8..1e5c410 100644
+--- a/arch/arm/mach-imx/clk-imx6q.c
++++ b/arch/arm/mach-imx/clk-imx6q.c
+@@ -279,7 +279,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
+ 		post_div_table[1].div = 1;
+ 		post_div_table[2].div = 1;
+ 		video_div_table[1].div = 1;
+-		video_div_table[2].div = 1;
++		video_div_table[3].div = 1;
+ 	};
+ 
+ 	/*                   type                               name         parent_name  base     div_mask */
+-- 
+2.1.3
+
recipes-kernel/linux/linux-imx_3.10.17.bb +2 -0
index cae1489..143eaab 100644
@@ -15,4 +15,6 @@ SRCBRANCH = "imx_3.10.17_1.0.0_ga"
 SRCREV = "33597e348b2d60dd5c71890ef7b7d3d3fd6e4e97"
 LOCALVERSION = "-1.0.2_ga"
 
+SRC_URI += "file://0001-ARM-clk-imx6q-fix-video-divider-for-revision-1.0-of-.patch"
+
 COMPATIBLE_MACHINE = "(mx6)"
Signature · 1 line
2.1.3
#1 lore raw
Quoted 8 lines · Gary Bisson

The post dividers do not work on i.MX6Q rev T0 1.0 so they must be fixed to 1. As the table index was wrong, a divider a of 4 could still be requested which implied the clock not to be set properly. This is the root cause of the HDMI not working at high resolution on rev T0 1.0 of the SoC, giving the following error:
mxc_sdc_fb fb.27: timeout when waiting for flip irq

Upstream-Status: Pending

This goes in the patch file, not commit log here. (in the patch file commit log :))

Quoted 84 lines

---
Changes since v2:
- Reword commit log as suggested by Diaine

This patch has been tested with a Sabrelite rev D (5-9-12).

However I've realized this patch doesn't fix the HDMI at 1080p60 when testing Eric's patches on mainline. The reason for it is that 6x_bootscript fixes the resolution at 720p30 which now works great when using FSL kernel. But mainline kernel is forcing 1080p60 by default and can't seem to be changed (don't know what video parameters to use).

Doing more testing on FSL kernel proved that it works only up to 1080p30 but using 60fps seems to still be broken. It is to be noted that the error message doesn't appear anymore. I'll try to compare again the IMX_CHIP_REVISION checks between the 3.0.35 and the 3.10.17 as 1080p60 works on 3.0.35.

I figured it might still be worth integrating this patch as the clock index is clearly wrong. In the meantime I'll work on getting 1080p60 fixed. Only then I will submit the patches to the lkml.

Let me know your thoughts.

Thanks!

---
 ...6q-fix-video-divider-for-revision-1.0-of-.patch | 33 ++++++++++++++++++++++
 recipes-kernel/linux/linux-imx_3.10.17.bb          |  2 ++
 2 files changed, 35 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-imx-3.10.17/0001-ARM-clk-imx6q-fix-video-divider-for-revision-1.0-of-.patch
recipes-kernel/linux/linux-imx-3.10.17/0001-ARM-clk-imx6q-fix-video-divider-for-revision-1.0-of-.patch new file +33 -0
new file mode 100644
index 0000000..bcddb16
@@ -0,0 +1,33 @@
+From ffcd8b98f6ba3a2b7a4aecc1e5e454de5fa5c4c3 Mon Sep 17 00:00:00 2001
+From: Gary Bisson <[email protected]>
+Date: Tue, 2 Dec 2014 22:11:14 -0800
+Subject: [PATCH] ARM: clk-imx6q: fix video divider for revision 1.0 of i.MX6q
+
+As post dividers do not work on i.MX6Q revision 1.0 they must be fixed
+to 1. As the table index was wrong, a divider a of 4 could still be
+requested which implied the clock not to be set properly. This is the
+root cause of the HDMI not working at high resolution on T1.0 version of
+the SoC, giving the following error:
+mxc_sdc_fb fb.27: timeout when waiting for flip irq
+
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ arch/arm/mach-imx/clk-imx6q.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
+index e09b1e8..1e5c410 100644
+--- a/arch/arm/mach-imx/clk-imx6q.c
++++ b/arch/arm/mach-imx/clk-imx6q.c
+@@ -279,7 +279,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
+               post_div_table[1].div = 1;
+               post_div_table[2].div = 1;
+               video_div_table[1].div = 1;
+-              video_div_table[2].div = 1;
++              video_div_table[3].div = 1;
+       };
+
+       /*                   type                               name         parent_name  base     div_mask */
+--
+2.1.3
+
recipes-kernel/linux/linux-imx_3.10.17.bb +2 -1
index cae1489..143eaab 100644
@@ -15,4 +15,6 @@ SRCBRANCH = "imx_3.10.17_1.0.0_ga"
 SRCREV = "33597e348b2d60dd5c71890ef7b7d3d3fd6e4e97"
 LOCALVERSION = "-1.0.2_ga"
 
+SRC_URI += "file://0001-ARM-clk-imx6q-fix-video-divider-for-revision-1.0-of-.patch"
+
 COMPATIBLE_MACHINE = "(mx6)"
--

2.1.3

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750