IMX6Q: pin mux functionalty is changed during run time

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

IMX6Q: pin mux functionalty is changed during run time

1,236 次查看
shreeharsha_ind
Contributor II

Hi All,

SOC: IMX6Q Kernel: 4.1.15

In one of our programme we have confgured "PAD_KEY_ROW4" to GPIO4_IO15 as below in DTS file:

MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x80000000

This gpi111 happens to be the input for SoC from Dirana. 

Issue is we see the pad mux functionalty changed during android auto voice.

we have captured the pad mux register (IOMUXC_SW_MUX_CTL_PAD_KEY_ROW4) value before,  during and after android auto voice.

Before android auto voice: 

devmem 0x20E021C 32 --------->0x00000005

During active Android Auto voice output: 

devmem 0x20E021C 32 --------->0x00000000

After active Android Auto voice output:

devmem 0x20E021C 32 --------->0x00000005

We want to know 

1. why pad muxing fuctionality is changed during android auto voice output.

2. what are the ways userspace can modify pad mux.

3. Is it possible us to know which process is doing it if its being modified (any debug options)

4. In specific we would like to know which pinctrl function in kernel modifies the register value.

 

 

 

标签 (1)
0 项奖励
回复
4 回复数

1,193 次查看
justin_jiang
NXP Employee
NXP Employee
  1. why pad muxing fuctionality is changed during android auto voice output.

Before android auto voice: 

devmem 0x20E021C 32 --------->0x00000005    # this is correct for ALT5 — Select signal GPIO4_IO15.

During active Android Auto voice output: 

devmem 0x20E021C 32 --------->0x00000000    # 000 ALT0 — Select signal FLEXCAN2_RX.

After active Android Auto voice output:

devmem 0x20E021C 32 --------->0x00000005    # this is correct for ALT5 — Select signal GPIO4_IO15.

 

    [Q] What’s the Android auto voice output, is this a application ? What’s purpose for this pin configured as GPIO4_IO15, is this pin used for audio?

 

  1. what are the ways userspace can modify pad mux.

[A] As I know userspace won’t modify pad mux and it can’t access the register directly.

 

  1. Is it possible us to know which process is doing it if its being modified (any debug options)

[A] Please look the android voice application, what will it do ? Is there any other driver also control the pin of PAD_KEY_ROW4?

 

  1. In specific we would like to know which pinctrl function in kernel modifies the register value.

    [A] kernel/drivers/pinctrl/pinctrl-imx.c

kernel/drivers/pinctrl/pinctrl-imx6q.c

0 项奖励
回复

1,228 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Shreeharsha

 

there is some misunderstanding:

0x20E021C refer toregister IOMUXC_SW_MUX_CTL_PAD_KEY_ROW4, described in

sect.36.4.131 Pad Mux Register (IOMUXC_SW_MUX_CTL_PAD_KEY_ROW4)36.4.131 Pad Mux Register
(IOMUXC_SW_MUX_CTL_PAD_KEY_ROW4) i.MX 6Dual/6Quad Applications Processor Reference Manual

 

while dts description of MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x80000000 refer to register

IOMUXC_SW_PAD_CTL_PAD_KEY_ROW4 described in sect.36.4.375 Pad Control Register
(IOMUXC_SW_PAD_CTL_PAD_KEY_ROW4)

 

"0x80000000" meaning is described in linux documentation

https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/devicetree/bindings/pinctrl/...

 

One can try to find place in code where register is changed using AN4553

 

Best regards
igor

0 项奖励
回复

1,224 次查看
shreeharsha_ind
Contributor II

Thanks for the quick reply and clarification. 

But am looking answers for below question.

1. why pad muxing fuctionality is changed during android auto voice output.

2. what are the ways userspace can modify pad mux.

3. Is it possible us to know which process is doing it if its being modified (any debug options)

4. In specific we would like to know which pinctrl function in kernel modifies the register value.

0 项奖励
回复

1,213 次查看
igorpadykov
NXP Employee
NXP Employee

answers on all these questions can be obtained by debugging, please try

AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors


https://www.nxp.com/docs/en/application-note/AN4553.pdf

 

Best regards
igor

0 项奖励
回复