How to set gpio for disable BT on i.mx8mp-evk

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set gpio for disable BT on i.mx8mp-evk

609 Views
ChChang
Contributor II

Hi

My platform is Linux on i.mx8mp-evk.

I am currently executing:
$echo 38 > /sys/class/gpio/export
$echo out > /sys/class/gpio/gpio38/direction
I can successfully control M.2's pin 56, W_DISABLE1, which is PCIe_nDIS,

Now, I want to control BT disable, which is M.2's pin 54, W_DISABLE2.
Which GPIO pin should I set?

imx8mp-evk_M2.jpg

Thanks!

0 Kudos
Reply
7 Replies

583 Views
ChChang
Contributor II

Hi Chavira 

Thans for your reply,

I had tried to execoute gpioset EXP_P0_7 , but it shows 
imx8mp_gpio20230312.jpg

 

Then I tried to execute

$ echo 503 > /sys/class/gpio/export
$ echo out > /sys/class/gpio/gpio503/direction
$ echo 1 > /sys/class/gpio/gpio503/value
$ echo 0 > /sys/class/gpio/gpio503/value

I measured the voltage of EXP_P0_7 and found that it changes, but TP39 always remains at 0.
Does this mean that M.2 pin 54 has been successfully configured?
Or do I need to solder TP39 and EXP_P0_7 together?
Thanks!

Regards,
CH
0 Kudos
Reply

560 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @ChChang!

I modify the device tree to use the gpio more easily.

Sorry for the mistake!

You should use the command:

gpioset -c gpiochip5 7=1

And

gpioset -c gpiochip5 7=0

You can measure pin 22 of the expansion header of the board as the same gpio of the m.2 connector.

Chavira_0-1710261683414.png



Best Regards!
Chavira

0 Kudos
Reply

579 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi! @ChChang!


What BSP are you using?

Yes, you have to solder the resistor "R142", if you see in the schematic the resistor "R142" is not soldered, in consequence, the iMX pin is not connected to the TEST POINT.

Best Regards!
Chavira

0 Kudos
Reply

510 Views
ChChang
Contributor II

Hi Chavira

My i.mx8mp-evk is Rev B2 , 

Do I just need to solder the R142 resistor? How many ohms?
Does R422 not require a resistor to be soldered?

S__21512195_0.jpgS__21512197_0.jpg

Thanks!
Regards,
CH

 

 

0 Kudos
Reply

475 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @ChChang!

According to the Schematic, the value of Resistor R142 is 0 Ohm.

Watching the datasheet of the wifi module I noticed that is not the correct pin to turn off the wifi module pin 56 of the m.2 connector is the correct one to turn off the wifi module.

https://www.azurewave.com/img/nxp/AW-CM276MA-PUR_DS_B3_H_STD.pdf


On our device tree is defined as a regulator

https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/arch/arm64/boot/dts/freescale/imx8mp-evk.dts#L66

If you want to control manually the wifi module you should change the device tree and control it like gpio.

Best Regards!
Chavira

0 Kudos
Reply

576 Views
ChChang
Contributor II

Hi Chavira

My BSP version is L5.15-kirkstone

I also tried directly connecting EXP_P0_7 to TP39 with a wire, but it doesn't affect BT working.
Can only soldering R142 work?
Thanks for yor reply!

Regards,

CH

0 Kudos
Reply

592 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @ChChang!
Thank you for contacting NXP Support!

That pin is connected to the IO expander.

You can control that gpio using the "gpioset" command.

You should use "gpioset EXP_P0_7=1" or "gpioset EXP_P0_7=0" to control that pin.

Best Regards!
Chavira

0 Kudos
Reply