GPIO_TESTING

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

GPIO_TESTING

1,691 次查看
JesnaK
Contributor I

Hi,

I am using i.mx6ull evk, in that i am trying to test the gpios. I just flashed the board with Linux v6.6.23_2.0.0_images_IMX6UL7D. And I boot the board with microSD after that t I tried testing GPIO1_IO08. As it is gpio1 I tried with following commands:

echo 8 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio8/direction

echo 1 > /sys/class/gpio/gpio8/value   echo 0 > /sys/class/gpio/gpio8/value

Then with multimeter I checked but it was showing value more than always. also, this pin was shown as output when I gave gpioinfo command.

Could you please tell me if there is anything wrong with my procedure and correct me?

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

1,671 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @JesnaK 

If you are using the default device tree, you can see the GPIO1_IO08 is being used by PWM:

Alejandro_Salas_0-1729266529537.png

You need to modify the device tree to use the PAD as GPIO.

 

Best regards,

Salas.

0 项奖励
回复

1,632 次查看
JesnaK
Contributor I
Can you please show me how to modify the device tree
in the image instead of PWM1_OUT change to GPIO8_IO08
what about 0x110b0 ? Can i directly make changes in the dts file?
Could you please help with this?
0 项奖励
回复

1,563 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

The i.MX6ULL 9x9 and 14x14 share the same pinfunc.

You can see the same node of PWM1 on the imx6-14x14-evk.dts.

 

You can delete or just disable the PWM node:

&pwm1 {
	#pwm-cells = <2>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1>;
	status = "disabled";
};

 

You can add the gpio1 node to your device tree:

&gpio1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpio1>;
	status = "okay";
};

 

and add the pinctrl_gpio1 to the iomux:

pinctrl_gpio1: gpio1grp {
		fsl,pins = <
			MX6UL_PAD_GPIO1_IO08__GPIO1_IO08   0x17059
		>;
	};

 

Then you should be able get your GPIO working.

 

Best regards,

Salas.

0 项奖励
回复

1,643 次查看
JesnaK
Contributor I

Hello Salas,

Thank you for your guidance! But the dts file you shown is for imx6ull-9x9-evk.dts but my board is Freescale i.MX6 ULL 14x14 EVK Board.

So can you please help with this board, why I am not able to test gpio as mentioned before.

0 项奖励
回复