<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: IMX6 CCM control from device tree</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1384104#M184196</link>
    <description>&lt;P&gt;After some digging, I discovered that there is a way to set the LDB clocks from the device tree.&amp;nbsp; Just for the record, I'm using kernel source from yocto sumo, 4.9.88 (&amp;nbsp;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/log/?h=imx_4.9.88_2.0.0_ga" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/log/?h=imx_4.9.88_2.0.0_ga )&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In your device tree you can change the assigned parent clocks (only for ldb) with this code.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;amp;clks {
    assigned-clocks = &amp;lt;&amp;amp;clks IMX6QDL_CLK_LDB_DI0_SEL&amp;gt;,
        &amp;lt;&amp;amp;clks IMX6QDL_CLK_LDB_DI1_SEL&amp;gt;;
    assigned-clock-parents = &amp;lt;&amp;amp;clks IMX6QDL_CLK_PLL3_USB_OTG&amp;gt;,
	&amp;lt;&amp;amp;clks IMX6QDL_CLK_PLL3_USB_OTG&amp;gt;;
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to do some more research on the implications of this, as it seems to have messed with both my uart terminal and my GPU clock at the very least.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp; There was no problem with the GPU clock.&amp;nbsp; The yocto version that I was using built a different version of the vivante module than is in the kernel source.&amp;nbsp; I just grabbed that code to compile the newer version.&amp;nbsp; I never figured out why this messed with the UART clock though&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 22:14:46 GMT</pubDate>
    <dc:creator>chrisroed</dc:creator>
    <dc:date>2021-12-20T22:14:46Z</dc:date>
    <item>
      <title>IMX6 CCM control from device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1380871#M183902</link>
      <description>&lt;P&gt;&amp;nbsp;I'm trying to configure an LDB display.&amp;nbsp; I'm noticing a discrepancy in what I set as the clock-frequency and what is actually done.&lt;/P&gt;&lt;P&gt;In my device tree, I specify these values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;/* LVDS data bridge */
&amp;amp;ldb {
  status = "okay";

  lvds-channel@0 {
    fsl,data-mapping = "spwg";
    fsl,data-width = &amp;lt;24&amp;gt;;
    status = "okay";
    crtc = "ipu1-di0";
    primary;

    display-timings {
      native-mode = &amp;lt;&amp;amp;timing0&amp;gt;;
      timing0: display0 {
        clock-frequency = &amp;lt;71980800&amp;gt;;
        hactive = &amp;lt;800&amp;gt;;
        hback-porch = &amp;lt;24&amp;gt;;
        hfront-porch = &amp;lt;72&amp;gt;;
        hsync-len = &amp;lt;24&amp;gt;;
        vactive = &amp;lt;1280&amp;gt;;
        vback-porch = &amp;lt;10&amp;gt;;
        vfront-porch = &amp;lt;12&amp;gt;;
        vsync-len = &amp;lt;2&amp;gt;;
      };
    };
  };
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that when I actually use this device tree, the clock is NOT set according to `clock-frequency`&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@imx6dl:~# cat /sys/kernel/debug/clk/clk_summary | grep ldb
    ldb_di0_sel                 1            1   396000000          0 0  
        ldb_di0_div_7           0            0    56571428          0 0  
            ldb_di0_div_sel     0            0    56571428          0 0  
        ldb_di0_div_3_5         1            1   113142857          0 0  
            ldb_di0_podf        1            1    56571429          0 0  
                ldb_di0         1            1    56571429          0 0  
    ldb_di1_sel                 0            0   396000000          0 0  
        ldb_di1_div_7           0            0    56571428          0 0  
            ldb_di1_div_sel     0            0    56571428          0 0  
        ldb_di1_div_3_5         0            0   113142857          0 0  
            ldb_di1_podf        0            0    56571429          0 0  
                ldb_di1         0            0    56571429          0 0  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried modified the `clock-frequency` variable in the device tree higher and lower with no success.&amp;nbsp; I realized that these clocks are generated from PLLs and and in order to get the correct frequency I need to modify the "CS2CDR" register in the CCM.&amp;nbsp; I'm not sure where to do this...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't need to change the pll once I'm running, so my ideal situation would be that I set it in the devicetree or on boot (or u-boot) and not worry about it anymore.&lt;/P&gt;&lt;P&gt;What is the appropriate way to make this selection?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 23:06:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1380871#M183902</guid>
      <dc:creator>chrisroed</dc:creator>
      <dc:date>2021-12-02T23:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 CCM control from device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1380894#M183906</link>
      <description>&lt;P&gt;Hi Chris&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;may be useful below&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/LVDS-pixel-clock-on-i-MX6/m-p/289733" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/LVDS-pixel-clock-on-i-MX6/m-p/289733&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;EB821&amp;nbsp; &lt;A id="relatedDocsClick_8" href="https://www.nxp.com/docs/en/engineering-bulletin/EB821.pdf" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LDB Clock Switch Procedure &amp;amp; i.MX6 Asynchronous Clock Switching Guidelines&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 01:21:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1380894#M183906</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-12-03T01:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 CCM control from device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1381371#M183954</link>
      <description>&lt;P&gt;Yes, I understand that the PLL clock parent needs to be changed.&amp;nbsp; What I'm asking is *where* do I make that change?&lt;/P&gt;&lt;P&gt;Can I change it in the device tree?&amp;nbsp; (this is ideal)&lt;/P&gt;&lt;P&gt;Can I change it in u-boot?&lt;/P&gt;&lt;P&gt;Do I need to modify the kernel?&amp;nbsp; If so, do I need to modify the clock setup ( drivers/clk/imx/clk-imx6q.c) or do I modify the ldb driver ( drivers/video/fbdev/mxc/ldb.c) or is there some other place to make the change?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 18:17:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1381371#M183954</guid>
      <dc:creator>chrisroed</dc:creator>
      <dc:date>2021-12-03T18:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 CCM control from device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1381446#M183958</link>
      <description>&lt;P&gt;&amp;gt;What I'm asking is *where* do I make that change?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;on suggested link it is done in clock driver (clk-imx6q.c), also please look at attached patch :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/clk/imx/clk-imx6q.c?h=lf-5.10.y" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/clk/imx/clk-imx6q.c?h=lf-5.10.y&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/LVDS-pixel-clock-on-i-MX6/m-p/289733" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors/LVDS-pixel-clock-on-i-MX6/m-p/289733&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/164076iBB3864ACA26590C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Sat, 04 Dec 2021 00:23:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1381446#M183958</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-12-04T00:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 CCM control from device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1384104#M184196</link>
      <description>&lt;P&gt;After some digging, I discovered that there is a way to set the LDB clocks from the device tree.&amp;nbsp; Just for the record, I'm using kernel source from yocto sumo, 4.9.88 (&amp;nbsp;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/log/?h=imx_4.9.88_2.0.0_ga" target="_blank" rel="noopener"&gt;https://source.codeaurora.org/external/imx/linux-imx/log/?h=imx_4.9.88_2.0.0_ga )&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In your device tree you can change the assigned parent clocks (only for ldb) with this code.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;amp;clks {
    assigned-clocks = &amp;lt;&amp;amp;clks IMX6QDL_CLK_LDB_DI0_SEL&amp;gt;,
        &amp;lt;&amp;amp;clks IMX6QDL_CLK_LDB_DI1_SEL&amp;gt;;
    assigned-clock-parents = &amp;lt;&amp;amp;clks IMX6QDL_CLK_PLL3_USB_OTG&amp;gt;,
	&amp;lt;&amp;amp;clks IMX6QDL_CLK_PLL3_USB_OTG&amp;gt;;
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to do some more research on the implications of this, as it seems to have messed with both my uart terminal and my GPU clock at the very least.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp; There was no problem with the GPU clock.&amp;nbsp; The yocto version that I was using built a different version of the vivante module than is in the kernel source.&amp;nbsp; I just grabbed that code to compile the newer version.&amp;nbsp; I never figured out why this messed with the UART clock though&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 22:14:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1384104#M184196</guid>
      <dc:creator>chrisroed</dc:creator>
      <dc:date>2021-12-20T22:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 CCM control from device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1387482#M184516</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37066"&gt;@igorpadykov&lt;/a&gt;&amp;nbsp;can you tell me what version of the kernel that patch is for?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 17:03:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1387482#M184516</guid>
      <dc:creator>chrisroed</dc:creator>
      <dc:date>2021-12-15T17:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 CCM control from device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1387659#M184531</link>
      <description>&lt;P&gt;&lt;A href="https://dev.sigmadrone.org/sigmadrone/linux-colibri/commit/eecbe9a52587cf9eec30132fb9b8a6761f3a1e6d" target="_blank"&gt;https://dev.sigmadrone.org/sigmadrone/linux-colibri/commit/eecbe9a52587cf9eec30132fb9b8a6761f3a1e6d&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 00:28:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1387659#M184531</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-12-16T00:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 CCM control from device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1717744#M212084</link>
      <description>&lt;P&gt;I'm also facing the same issue. I have set clock frequency 71Mhz in device tree but I'm getting 37 mhz at out display output. I'm also using imx6 quad only&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 06:42:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-CCM-control-from-device-tree/m-p/1717744#M212084</guid>
      <dc:creator>krishna_b</dc:creator>
      <dc:date>2023-09-06T06:42:51Z</dc:date>
    </item>
  </channel>
</rss>

