<?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>topic How to Enable CKO2 in u-boot in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-Enable-CKO2-in-u-boot/m-p/487199#M78014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to enable CKO2 in uboot with a 24mhz output frequency.&amp;nbsp; I've added this function which is called in board_init()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static void setup_camera_clk(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;&lt;/P&gt;&lt;P&gt;&amp;nbsp; int reg;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //set pinmux&lt;/P&gt;&lt;P&gt;SETUP_IOMUX_PAD(PAD_GPIO_3__CCM_CLKO2 | 0x000000b0);&amp;nbsp; //this is how the pin is set up in device tree&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //enable clock output&lt;/P&gt;&lt;P&gt;&amp;nbsp; reg = readl(&amp;amp;mxc_ccm-&amp;gt;ccosr);&lt;/P&gt;&lt;P&gt;&amp;nbsp; printf("ccosr is 0x%x\n",reg);&lt;/P&gt;&lt;P&gt;&amp;nbsp; reg |= (MXC_CCM_CCOSR_CKO2_EN_OFFSET&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //CKO2 enabled&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | MXC_CCM_CCOSR_CLK_OUT_SEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //CKO2 output is selected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | (0x0e &amp;lt;&amp;lt; MXC_CCM_CCOSR_CKO2_SEL_OFFSET)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //clock is derived from osc_clk, should be 24mhz&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; printf("writing ccosr to 0x%x\n",reg);&lt;/P&gt;&lt;P&gt;&amp;nbsp; writel(reg, &amp;amp;mxc_ccm-&amp;gt;ccosr);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like this is setting the registers, but my clock is not outputting. &lt;/P&gt;&lt;P&gt;First of all, is this the proper way to set the pinmux from u-boot?&lt;/P&gt;&lt;P&gt;Second of all, I noticed that some clocks get disabled in u-boot, although I would assume the osc_clk is derived from the main crystal and should be running...&amp;nbsp; Either way I'm not sure I chose correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Dec 2015 00:52:33 GMT</pubDate>
    <dc:creator>chrisroed</dc:creator>
    <dc:date>2015-12-16T00:52:33Z</dc:date>
    <item>
      <title>How to Enable CKO2 in u-boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-Enable-CKO2-in-u-boot/m-p/487199#M78014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to enable CKO2 in uboot with a 24mhz output frequency.&amp;nbsp; I've added this function which is called in board_init()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static void setup_camera_clk(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;&lt;/P&gt;&lt;P&gt;&amp;nbsp; int reg;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //set pinmux&lt;/P&gt;&lt;P&gt;SETUP_IOMUX_PAD(PAD_GPIO_3__CCM_CLKO2 | 0x000000b0);&amp;nbsp; //this is how the pin is set up in device tree&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //enable clock output&lt;/P&gt;&lt;P&gt;&amp;nbsp; reg = readl(&amp;amp;mxc_ccm-&amp;gt;ccosr);&lt;/P&gt;&lt;P&gt;&amp;nbsp; printf("ccosr is 0x%x\n",reg);&lt;/P&gt;&lt;P&gt;&amp;nbsp; reg |= (MXC_CCM_CCOSR_CKO2_EN_OFFSET&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //CKO2 enabled&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | MXC_CCM_CCOSR_CLK_OUT_SEL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //CKO2 output is selected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | (0x0e &amp;lt;&amp;lt; MXC_CCM_CCOSR_CKO2_SEL_OFFSET)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //clock is derived from osc_clk, should be 24mhz&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; printf("writing ccosr to 0x%x\n",reg);&lt;/P&gt;&lt;P&gt;&amp;nbsp; writel(reg, &amp;amp;mxc_ccm-&amp;gt;ccosr);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like this is setting the registers, but my clock is not outputting. &lt;/P&gt;&lt;P&gt;First of all, is this the proper way to set the pinmux from u-boot?&lt;/P&gt;&lt;P&gt;Second of all, I noticed that some clocks get disabled in u-boot, although I would assume the osc_clk is derived from the main crystal and should be running...&amp;nbsp; Either way I'm not sure I chose correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 00:52:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-Enable-CKO2-in-u-boot/m-p/487199#M78014</guid>
      <dc:creator>chrisroed</dc:creator>
      <dc:date>2015-12-16T00:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Enable CKO2 in u-boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-Enable-CKO2-in-u-boot/m-p/487200#M78015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;most simple way is to connect jtag (or output with debug printfs) register&lt;/P&gt;&lt;P&gt;CCM_CCOSR_CKO2 and its address. Issue may be related to different&lt;/P&gt;&lt;P&gt;addresses, since memory map for each i.MX6 processor is different.&lt;/P&gt;&lt;P&gt;So it is necessary to use appropriate Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 08:29:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-Enable-CKO2-in-u-boot/m-p/487200#M78015</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2015-12-16T08:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to Enable CKO2 in u-boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-Enable-CKO2-in-u-boot/m-p/487201#M78016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was writing to the correct addresses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ended up changing the iomux to &lt;/P&gt;&lt;P&gt;SETUP_IOMUX_PAD(PAD_GPIO_3__XTALOSC_REF_CLK_24M | MUX_PAD_CTRL(NO_PAD_CTRL));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that got my 24mhz clock going.&amp;nbsp; Thanks for the response!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 22:40:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-Enable-CKO2-in-u-boot/m-p/487201#M78016</guid>
      <dc:creator>chrisroed</dc:creator>
      <dc:date>2015-12-17T22:40:06Z</dc:date>
    </item>
  </channel>
</rss>

