imx23. Increase PIXCLOCK in linux 4.x

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx23. Increase PIXCLOCK in linux 4.x

ソリューションへジャンプ
3,814件の閲覧回数
anatolivanov
Contributor I

HI!

When i use fbset to set pixclock value 21000 picosecond and it fails: real clock does not exceed 24 MHz. That is because bit 1 of HW_CLKCTRL_CLKSEQ register is set to 0 so ref_xtal is selected to clock lcdif. I need to select ref_pix and enable PIX fractional divider in HW_CLKCTRL_FRAC with setting it`s value. I think its possible to do this by modify .dts file because driver code file drivers/clk/mxs/clk-imx23.c contains string

clks[lcdif_sel] = mxs_clk_mux("lcdif_sel", CLKSEQ, 1, 1, sel_pix, ARRAY_SIZE(sel_pix));

So can anybody show me way how to do this or advice something else?

Thanks,

Anatol

ラベル(3)
0 件の賞賛
返信
1 解決策
3,586件の閲覧回数
lategoodbye
Senior Contributor I

Please do not change dts. I create a patch for the clock driver, which should do the trick. But i can't test it.

元の投稿で解決策を見る

0 件の賞賛
返信
12 返答(返信)
3,586件の閲覧回数
lategoodbye
Senior Contributor I

Hi Anatol,

how do you come to the conclusion to change the dts file instead of the clock driver?

0 件の賞賛
返信
3,586件の閲覧回数
anatolivanov
Contributor I

Hi Stefan,

Unfortunately i do not understand well how linux clock framework works and how it communicates with dts blob. I saw in the clk-imx23.c implemented something about multiplexing clock which used to clock lcdif. I thought as its possible to select clock in dts file, so its possible to set mux parametrs.

Am i wrong? Do you know what is "lcdif_sel" in the clocks list?

0 件の賞賛
返信
3,586件の閲覧回数
lategoodbye
Senior Contributor I

Hi Anatol,

the device tree source (dts) usually describe the static hardware not the configuration. The clock muxing must be dynamic and should be done by clock driver and the clock framework.

I hope this little gist answer your last question.

Stefan

Edit: Maybe this reference is helpful.

0 件の賞賛
返信
3,586件の閲覧回数
anatolivanov
Contributor I

I understand about the gist. I dont understand how to select ref_pix as clock source. I tried to set "clocks = <&clks 4>;" to bind lcdif with ref_pix. But then i got CLK_PIX gated off by bit 31 (CLKGATE == 1) of register HW_CLKCTRL_PIX.

May be i should to use lcdif_sel somehow?

0 件の賞賛
返信
3,587件の閲覧回数
lategoodbye
Senior Contributor I

Please do not change dts. I create a patch for the clock driver, which should do the trick. But i can't test it.

0 件の賞賛
返信
3,586件の閲覧回数
anatolivanov
Contributor I

Stefan, thank you!

Your method works fine.

Also exist alternative method suggested by Marek Vasut at [PATCH] clk: mxs: source LCD clock from PLL instead of from ref_xtal.

0 件の賞賛
返信
3,586件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

It would be nice if someone could resend Hector's patch.

Thanks

0 件の賞賛
返信
3,586件の閲覧回数
lategoodbye
Senior Contributor I

Is there a reason why the patch was never applied?

0 件の賞賛
返信
3,586件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Probably because the clock maintainer was not Cc'ed. It got an Acked-by from Shawn too.

0 件の賞賛
返信
3,586件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Yes, that was the case:

[PATCH] clk: mxs: source LCD clock from PLL instead of from ref_xtal

Stefan, do you plan to resend it?

Regards,

Fabio Estevam

0 件の賞賛
返信
3,586件の閲覧回数
lategoodbye
Senior Contributor I

Currently i don't have a test environment for i.MX23 or i.MX28.

Do you know any drawbacks of the this patch (higher power consumption etc)?

Is this patch compatible with i.MX280 since it has no lcdif interface?

0 件の賞賛
返信
3,586件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Not aware of any drawbacks. Don't have access to mx280 here.

0 件の賞賛
返信