how to pull low the wifi and BT reset pin in yocto

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

how to pull low the wifi and BT reset pin in yocto

2,682 次查看
joshua_jhan
Contributor III

device is  i.MX 8M mini

yocto version is imx-4.14.98-2.0.0_ga

I try to pull low the wifi and BT reset pin IMX8MM

but I have had no success yet.

first, I know the wifi and bt reset pin is gpio2-10 and gpio2-6
so I tried to modify the dts file as below

tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.98-r0/git/arch/arm64/boot/dts/freescale/imx8mm-evk.dts

modem_reset: modem-reset {
compatible = "gpio-reset";
reset-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; //modify to GPIO_ACTIVE_HIGH
reset-delay-us = <2000>;
reset-post-delay-ms = <40>;
#reset-cells = <0>;
};

ir_recv: ir-receiver {
compatible = "gpio-ir-receiver";
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ir_recv>;
};

regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;

reg_sd1_vmmc: sd1_regulator {
compatible = "regulator-fixed";
regulator-name = "WLAN_EN";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>;
off-on-delay = <20000>;
startup-delay-us = <100>;
// enable-active-high; remove the description

};

but the wifi reset pin still high

root@imx8mmevk:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/30200000.gpio, 30200000.gpio:
gpio-13 ( |gpio-ir-recv ) in hi IRQ
gpio-15 ( |cd ) in lo IRQ

gpiochip1: GPIOs 32-63, parent: platform/30210000.gpio, 30210000.gpio:
gpio-38 ( |? ) out lo
gpio-42 ( |WLAN_EN ) out hi
gpio-51 ( |VSD_3V3 ) out hi

gpiochip2: GPIOs 64-95, parent: platform/30220000.gpio, 30220000.gpio:
gpio-80 ( |status ) out hi

gpiochip3: GPIOs 96-127, parent: platform/30230000.gpio, 30230000.gpio:

gpiochip4: GPIOs 128-159, parent: platform/30240000.gpio, 30240000.gpio:
gpio-149 ( |wlf,mute ) out hi

gpiochip5: GPIOs 496-511, parent: i2c/2-0020, tca6416, can sleep:
gpio-497 ( |EXT_PWREN ) out hi
gpio-499 ( |ak5558,pdn ) out lo

and I tried to control the GPIO pin in the system, but will Device or resource busy

root@imx8mmevk:~# echo 42 > /sys/class/gpio/export
-sh: echo: write error: Device or resource busy
root@imx8mmevk:~# echo 38 > /sys/class/gpio/export
-sh: echo: write error: Device or resource busy

so how should I control the wifi and BT reset pin correctly?

Thanks

0 项奖励
回复
3 回复数

2,130 次查看
joshua_jhan
Contributor III

Hi,

does anyone can help me to solve this problem?

I think it's some program to pull high the wifi and BT pin so I can't control it,

but I don't know what is the program.

0 项奖励
回复

2,130 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Joshua

one can look at variscite gpio tutorial:

DART-MX8M GPIO - Variscite Wiki 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

2,130 次查看
joshua_jhan
Contributor III

Hi igorpadykov,

I tried to control the GPIO pin using command line and modify the dts file, but still failed.

I don't know what application is using the wifi and BT reset pin so I can't control it.

Or there are other ways to control it in the yocto, please let me know.

Thanks

0 项奖励
回复