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?
Hello @JesnaK
If you are using the default device tree, you can see the GPIO1_IO08 is being used by PWM:
You need to modify the device tree to use the PAD as GPIO.
Best regards,
Salas.
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.
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.