i.MX6 DCIC - When I read/write on DCIC registers the linux system gets freezed

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX6 DCIC - When I read/write on DCIC registers the linux system gets freezed

3,919 次查看
jorgeguzman
Contributor I

I'm trying to enable the DCIC. I already have the DCIC test application, but when I try to run it, the linux system gets freezed. I have placed some "printk" in the driver and it seems that the problem is when it's trying to write on the DCICC register, in the function "dcic_configure". Below we can see the line where it's getting stuck:

writel(val, &dcic->regs->dcicc);

So I checked the DCIC Memory Map/Register Definition and I tested those addresses with "devmem" and I got the same result, the whole system it's getting freezed. I tried with other registers from different modules and devmem worked correctly. So my assumption is that there is something wrong with the DCIC registers or maybe I'm only missing some pre-configuration in order to start using DCIC.

This is what I have on my device tree:

&dcic1 {

        compatible = "fsl,imx6q-dcic";

        reg = <0x020e4000 0x4000>;

        interrupts = <0 124 0x04>;

        /*clocks = <&clks 231>, <&clks 231>;*/

        clocks = <&clks 142>, <&clks 173>;

        clock-names = "dcic", "disp-axi";

        gpr = <&gpr>;

        status = "okay";

        dcic_id = <0>; /* dcic device index 0-dcic1, i-dcic2 */

        dcic_mux = "dcic-lvds0"; /* DCIC input select */

};

&dcic2 {

        compatible = "fsl,imx6q-dcic";

        reg = <0x020e8000 0x4000>;

        interrupts = <0 125 0x04>;

        /*clocks = <&clks 232>, <&clks 232>;*/

        clocks = <&clks 143>, <&clks 173>;

        clock-names = "dcic", "disp-axi";

        gpr = <&gpr>;

        status = "okay";

        dcic_id = <1>; /* dcic device index 0-dcic1, i-dcic2 */

        dcic_mux = "dcic-lvds0"; /* DCIC input select */

};

Any advice?

0 项奖励
6 回复数

1,979 次查看
Maddis
Contributor IV

Update. I got the DCIC working (at least the mxc_dcic_test.out works). Turns out that for whatever reason dcic0 causes the problem, but when I configured dcic1 to use lvds0 it worked just fine. I've gone through the device tree and can't find the problem.

0 项奖励

1,979 次查看
Maddis
Contributor IV

I have same problem with iMX6q based hw running 3.14.52 (also tried 3.14.28).

I've set the CCGR0 register to 0x0FC03F3F. (Original value was 0x00C03F3F); Although digging the Linux device tree code I got feeling that it'll set those bits when clocks are configured in device tree.

Either way the system hangs when running mxc_dcic_test.out to first ioctl-call. I've tracked it down to the DCIC register access.

What bothers me that the first write is to _disable_ DCIC so why would that hang the whole system even if the DCIC clock is not enabled? It seems though that system recovers partly after awhile, but at least ethernet remains dead, but for example serial console starts responding. Screen seems to go some sort of reset etc. although nothing is shown there but then again I don't have other graphic application that might update screen.

0 项奖励

1,979 次查看
VladanJovanovic
NXP Employee
NXP Employee

Clock to DCIC might be disabled. Check <u-boot>/board/freescale/mx6sabresd/mx6sabresd.c  and ccgr_init() function, especially CCGR0 register setup. By default clocks to DCIC modules are disabled (at least in 3.14.52 release).

Vladan

0 项奖励

1,979 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Jorge

suggest to check if MXC DCIC driver is selected for build

as described in sect.54.3.2 Menu Configuration Options attached Linux Manual

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励

1,979 次查看
jorgeguzman
Contributor I

Yes, the MXC DCIC driver is already selected.

0 项奖励

1,979 次查看
igorpadykov
NXP Employee
NXP Employee

suggest to test this with NXP/FSL release on Sabre reference board.

Board Support Packages (29)

L3.14.52_1.1.0_MX6QDLSOLO (REV L3.14.52_1.1.0)

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-process...

imx-test 5.3 version (mxc_dcic_test)

http://patches.openembedded.org/patch/110753/

0 项奖励