CSI Test Generator Mode: Yocto on i.MX6 Sabre eval board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CSI Test Generator Mode: Yocto on i.MX6 Sabre eval board

Jump to solution
2,231 Views
bradgrissom
Contributor II

Does anybody know of an existing driver to enable the CSI interface Test Generator (chess pattern) mode for Yocto?  The only applicable conversation I could find on the forums is here:

Using CSI test generator mode

Which includes an demo driver attachment for the i.MX5 for an older kernel.  I started trying to port that example to the newer Yocto 3.10 kernel, but the CSI software stack has changed a bit (the I2C drivers now seem to be separate from the "platform" (mxc_v4l2_capture.c) which calls functions like ipu_csi_init_interface() as described in the BSP porting guide).

Background:

  • The Yocto documentation here (Documentation -> Linux -> Linux 3.10.53)  i.MX 6 Series Software and Development Tool R|Freescale includes i.MX_6_BSP_Porting_Guide.pdf which describes 7.1.3 Configuring the CSI Unit in Test Mode
  • That documentation gives some pointers on how to enable Test Generator mode, but is a far cry from something I can cut and paste.  Furthermore, it seems to contradict the current state of the CSI stack as I mentioned above.

I was thinking there had to be somebody who has already enabled this test mode who could share some code.

Thanks!

Labels (4)
Tags (3)
0 Kudos
1 Solution
1,335 Views
bradgrissom
Contributor II

This is part of an e-mail sent to my team member:

The SDK I'm referring to can be found under the below link then click Software & Tools -> Software Development Tools -> Software Development Kits -> i.MX6 Series Platform SDK

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREBRD#

This morning I finally got the SDK to compile and I was looking thru the directions to figure out how to run the demo apps.  I was surprised to see that you run them directly over JTAG, MFG Tool, or SD card.  Meaning they aren't launched from U-Boot or from a Linux command-line like I assumed.  Looking further, this is a bare-metal SDK which really surprised me.  Sure enough, each demo app configures the processor from the ground-up with a few calls to their API.

This is funny because yesterday we were complaining to each other about the incredible complexity of our uboot/Linux software stack.  We are having some low-level bringup issues right now and it would be handy to have a simple bare-bones software stack for debugging.  Well this SDK is exactly that.

It took some mad Google skills to find and download the old Mentor Graphics cross-compilers for the SDK.  I had to find old URLs to the binary downloads on their site, which is not available by navigating their current site.  They're making people pay for the current ARM cross compilers.  Anyway, I have it built and ready to use.

For reference, here is the URL I used with wget to download a version of the old depricated CodeSourcery compilers that works with the SDK:

https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2012.09-63-arm-none-eabi.bin

In summary, this SDK doesn't solve my original problem of getting a driver up and running CSI test mode using the Yocto/Linux framework.  But it is a demo of CSI test mode nonetheless.

View solution in original post

0 Kudos
4 Replies
1,335 Views
gusarambula
NXP TechSupport
NXP TechSupport

It is true that the porting guide does not go as deep as to be actually implemented just from that information. Have you looked at the code on the i.MX6 SDK (link below, you may need to login in order to download it)? There is source code for the CSI that perhaps may help as complement to the documentation you already have.

https://www.freescale.com/webapp/Download?colCode=i.MX6_PLATFORM_SDK&location=null&fr=gtl&Parent_nod...

0 Kudos
1,335 Views
bradgrissom
Contributor II

Hi gusarambula, thank you very much for the reference to the SDK!  This looks very promising as seen in this file:

sdk/drivers/ipu/src/ipu_csi.c

in this function:

void ipu_csi_config()

79 } else if (csi_interface == CSI_TEST_MODE) {
80     data_fmt = CSI_YUV444;
81     clock_mode = CSI_CLK_MODE_NONGATED_CLK;
82     ipu_write_field(ipu_index, IPU_CSI0_TST_CTRL__CSI0_TEST_GEN_MODE, 1);
83 } else {
84     printf("Unsupport CSI interface\n");
85 }

I'll leave this question unanswered until I verify the functionality of CSI_TEST_MODE on the Sabre eval board.  I'll also post instructions on how to test in that mode.  Thanks.

0 Kudos
1,336 Views
bradgrissom
Contributor II

This is part of an e-mail sent to my team member:

The SDK I'm referring to can be found under the below link then click Software & Tools -> Software Development Tools -> Software Development Kits -> i.MX6 Series Platform SDK

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREBRD#

This morning I finally got the SDK to compile and I was looking thru the directions to figure out how to run the demo apps.  I was surprised to see that you run them directly over JTAG, MFG Tool, or SD card.  Meaning they aren't launched from U-Boot or from a Linux command-line like I assumed.  Looking further, this is a bare-metal SDK which really surprised me.  Sure enough, each demo app configures the processor from the ground-up with a few calls to their API.

This is funny because yesterday we were complaining to each other about the incredible complexity of our uboot/Linux software stack.  We are having some low-level bringup issues right now and it would be handy to have a simple bare-bones software stack for debugging.  Well this SDK is exactly that.

It took some mad Google skills to find and download the old Mentor Graphics cross-compilers for the SDK.  I had to find old URLs to the binary downloads on their site, which is not available by navigating their current site.  They're making people pay for the current ARM cross compilers.  Anyway, I have it built and ready to use.

For reference, here is the URL I used with wget to download a version of the old depricated CodeSourcery compilers that works with the SDK:

https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2012.09-63-arm-none-eabi.bin

In summary, this SDK doesn't solve my original problem of getting a driver up and running CSI test mode using the Yocto/Linux framework.  But it is a demo of CSI test mode nonetheless.

0 Kudos
1,335 Views
mcergun
Contributor III

have you made any progress on the CSI Test Mode drivers so far? I am facing the exact same issue now. I need a starting point. Trying to figure out non-existing functions and replace them with newer versions is a tiresome job. (trying to use mx53 as base now)

0 Kudos