iMX6SX PXP Register Access

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

iMX6SX PXP Register Access

4,374件の閲覧回数
SamM
Contributor II

I am trying to set the PXP CSC2 registers in an IMX6SX, similar to this post.

To begin with I simply attempt to read the PXP_CTRL register at 0x2218000
My code looks like this:

import ctypes
import mmap

def read_word(address):
  with open('/dev/mem', 'rb') as f:
    mem = mmap.mmap(f.fileno(), mmap.PAGESIZE, mmap.MAP_SHARED, mmap.PROT_READ, offset=address&~(mmap.PAGESIZE-1))
    s = ctypes.c_uint32.from_buffer_copy(mem, address&(mmap.PAGESIZE-1))
    mem.close()
    return s

print(read_word(0x2218000))

 

The result is that the kernel hangs with no error.

I am able to read other registers (for example GPIOs at 0x20E0014).

 

I have the PXP enabled and clocks configured in the device tree:

pxp: pxp@2218000 {
compatible = "fsl,imx6sx-pxp-dma", "fsl,imx6sl-pxp-dma", "fsl,imx6dl-pxp-dma";
reg = <0x02218000 0x4000>;
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_PXP_AXI>,
<&clks IMX6SX_CLK_DISPLAY_AXI>;
clock-names = "pxp-axi", "disp-axi";
power-domains = <&pd_disp>;
status = "okay";
};

Is there anything else I need to set up before I can read/set the PXP registers?

ラベル(1)
タグ(2)
0 件の賞賛
返信
16 返答(返信)

4,282件の閲覧回数
jamesbone
NXP TechSupport
NXP TechSupport

@JosephAtNXP , can you please try to reproduced the issue from @SamM ,  in the NXP board.  

Thanks

4,272件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi @jamesbone @SamM,

I can reproduce on i.MX6UL devices too, we are reviewing this issue and will provide feedback about the workarounds ASAP,

Regards

0 件の賞賛
返信

4,229件の閲覧回数
SamM
Contributor II

Hi @JosephAtNXP 

Is there any update on this?

0 件の賞賛
返信

4,225件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Please update the following:

cat /sys/kernel/debug/clk/clk_summary | grep pxp

Regards,

0 件の賞賛
返信

4,022件の閲覧回数
SamM
Contributor II

Morning @JosephAtNXP

Do you have any more details for me this week?

0 件の賞賛
返信

3,907件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

In PXP driver, runtime PM will dynamic open/close clock. For workaround, you can comment out 'clk_unprepare' in PXP relating driver.

3,966件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

The clocks are not enabled and registers cannot be accessed as a consequence, team is reviewing clock enabling.

Regards

3,992件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

I'm still waiting for feedback from the team,

Regards

0 件の賞賛
返信

4,140件の閲覧回数
SamM
Contributor II

@JosephAtNXP 

Do you have any more information for me?

4,212件の閲覧回数
SamM
Contributor II

Here is the output of

cat /sys/kernel/debug/clk/clk_summary | grep pxp

 

On the iMX6ULL14x14-evk

0 件の賞賛
返信

4,347件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

Could you try with memtool command?

Regards

0 件の賞賛
返信

4,330件の閲覧回数
SamM
Contributor II

I added memtool to my image and tried the command:

memtool -8 2218000 1

The resulting output is:

E

Reading 0x1 count starting at ad

And then the kernel hangs again.

I also tried with -16 and tried reading a couple of the other PXP registers.
The result was the same in all cases (even the same truncation of the output)

At least it seems like my code was probably fine, but there must be something I need to set up to enable the PXP module? Any ideas?

タグ(1)
0 件の賞賛
返信

4,304件の閲覧回数
jamesbone
NXP TechSupport
NXP TechSupport

Hello @SamM ,

Can you please share more details about your project,  are you using your own design with the i.MX6SX, or which board are you using?  how much  DDR memory has it?   which BSP and version are you using? 

Any other details that can help us to narrow the problem, like is there any warning or error during the boot up? if you can share a log, would be good to see if there is anything else that maybe pointing what would be the issue.

Right now,  I think it is a RAM issue, but maybe something else it is consuming your free memory or any other peripheral it is creating a big load to the memory.

0 件の賞賛
返信

4,284件の閲覧回数
SamM
Contributor II

@jamesboneI have just tested an iMX6ULL-14x14-evk that I have on hand, with the NXP V6.6.52-2.2.0 BSP.

I get the same result reading the PXP_HW_PXP_CSC2_CTRL register on that board

memtool -16 21CC1D0 1

Output is truncated and the kernel hangs

I also noted that the pxp_test.out unit test doesn't appear to do anything and the mxc_fb_test.out unit test hangs part way through.

0 件の賞賛
返信

4,282件の閲覧回数
SamM
Contributor II

Sorry, mxc_fb_test.out does eventually terminate but it segfaults.

dmesg output from that board attached.

0 件の賞賛
返信

4,299件の閲覧回数
SamM
Contributor II

Hi James,

Thanks for getting back  to me.

It is a COM board produced by embedded artists
It has 1GB DDR3 (and free says 741MB is currently available)

I'm using a custom BSP provided by embedded artists (slightly modified by me to adjust lvds device timings). It is on kernel version 6.6 and uses meta-imx rel_imx_6.6.23_2.0.0

It seems reasonable to test with the NXP BSP. I'll grab the 6.6.23 BSP and re-test with that.

Output from dmsg attached

0 件の賞賛
返信