Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - DIM2 (MediaLB), i.MX6, clocks, porting Linux function: (4 Items)
   
DIM2 (MediaLB), i.MX6, clocks, porting Linux function  
I'm porting the Linux DIM2 (IP for the MediaLB) driver to the QNX.
The BSP is BSP_freescale_imx6x-sabreARD_br-660_be-660_SVN737103_JBN5.zip
The hardware is the i.MX6Q SABRE for Automotive Infotainment.

I can access the DIM2 IP using its register wall and it responses according to
the DIM2 manuals.

What makes me unsure, if I look into the BSP, is missing functionality around the
PLL6_MLB in the QNX BSP.  For example the definition of MX6X_ANATOP_PLL6_MLB in
mx6.h has no usage at all.  See how it is done for the MX6X_ANATOP_PLL8_ENET.

I'm looking for the ideas how to initialize the MediaLB clocks in the QNX like
it is done in the Linux function fsl_mx6_enable() from the link
https://elixir.bootlin.com/linux/v4.20/source/drivers/staging/most/dim2/dim2.c#L935

I also want to know what could be the equivalent to the Linux patch
https://github.com/microchip-ais/meta-mchp-most-fsl/blob/master/recipes-kernel/linux/linux-imx-3.14.28/0001-add-medialb-
clk.patch
that describes the clocks for the MediaLB.

Thanks,
Andrey.
Re: DIM2 (MediaLB), i.MX6, clocks, porting Linux function  
Hi Andrey,
regarding the mx6x.h header file, I think that this is continuous work: As soon as a new driver or component is added 
that accesses some registers not yet defined, it will be added and part of the next BSP release.

What we do in our own i.MX6 BSP is to hold and maintain a private version of mx6x.h where we can add definitions as 
needed. We keep our section at the very bottom of the file so that a merge with a newer version from QNX is still 
possible.

Regards,
Albrecht
Re: DIM2 (MediaLB), i.MX6, clocks, porting Linux function  
Hi Albrecht,

I appreciate your quick respond.

Could you please share the code that just activates the clocks mlb150_clk and pll6 on the i.MX6Q?

Thanks,
Andrey
Re: DIM2 (MediaLB), i.MX6, clocks, porting Linux function  
Hi Andrey,
I don't have this code at hand, haven't used MediaLB explicitly myself. I just explained the general procedure.

Regards,
Al