IMX8mq in kernel version 4.14.98 not able to toggle SAI1_MCLK when configured as GPIO

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX8mq in kernel version 4.14.98 not able to toggle SAI1_MCLK when configured as GPIO

Jump to solution
256 Views
agnel_terry
Contributor III

Hi 

In our custom board with IMX8mq, we are using  pin SAI1_MCLK or SAI5_MCLK for power enables for a backlight led driver,

I am configuring them as GPIO in u-boot and setting them as high, when the unit boots up , the u-boot set those pin as high, but when kernel boots up it becomes low,  

I had removed all SAI1 and SAI5 related configuration (with respect to audio from DT ). still it becomes low while boot up. 

I tried toggling the GPIO after boot up, not change ( tried both GPIO sysfs and  libgpiod). bot behaves same.

but in the same place if I use PIN SAI3_RXD - i am able to use it as expected and I ma able to toggle it after bootup.

does it means that I cannot use MCLK pin as GPIO ?  or is there something  I am missing at my end. 

Thank you for the help.

 

Thanks and Regards

Terry

 

 

 

 

 

0 Kudos
1 Solution
198 Views
agnel_terry
Contributor III

HI Aldo,

Thank you for the response, Found the issue , it was HW issue , because of the soldering , tried with a new board, it works as expected. Thank you for the help, highly appreciate it.

Thanks and Regards

Terry

 

 

View solution in original post

4 Replies
244 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Could you share the dts or the pinmux configuration you have used?

Best regards,
Aldo.

0 Kudos
231 Views
agnel_terry
Contributor III

Hi Aldo 

I configured the SAI1_MCLK as GPIO in pincntrl_hog, and tried to access the GPIO through sysfs and libgpiod.

pinctrl_hog: hoggrp {
fsl,pins = <
MX8MQ_IOMUXC_SAI1_MCLK_GPIO4_IO20 0x19
MX8MQ_IOMUXC_SAI5_MCLK_GPIO3_IO25 0x19
>;
};

for sysfs : I did a echo of the gpio number (bank-1)*32 + pinnumber  to the /sys/class/gpio/export. and then tried setting the value after setting the direction.

with both the MCLK , I am not able to toggle it, but I am able to do the same for SAI3_RXD.(able to toggle).

 

Thanks and Regards

Terry

 

 

0 Kudos
211 Views
AldoG
NXP TechSupport
NXP TechSupport

Hi,

Please check that you don’t have both SAI1_MCLK & SAI5_MCLK, muxed to other pads.

Also, if you could share the dts so I may take a look to it may be great.

Best regards,
Aldo.

0 Kudos
199 Views
agnel_terry
Contributor III

HI Aldo,

Thank you for the response, Found the issue , it was HW issue , because of the soldering , tried with a new board, it works as expected. Thank you for the help, highly appreciate it.

Thanks and Regards

Terry