gpioset not working when adding kernel-modules in yocto project imx8mmini dev board.

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

gpioset not working when adding kernel-modules in yocto project imx8mmini dev board.

Jump to solution
1,990 Views
vivek338
Contributor IV

gpioset not working when adding kernel-modules in yocto project imx8mmini.

gpiodetect and gpioinfo is working but gpioset not working. On removing kernel-modules from yocto project gpioset is working. The pin is permamnently high on imx8mmini dev board. Using pin 40 on J1003.

 

Please help!!!

0 Kudos
Reply
1 Solution
1,854 Views
vivek338
Contributor IV

Hi @Sanket_Parekh 

 

Issue resolved by disabling sound-card in kernel menu-config.

View solution in original post

0 Kudos
Reply
6 Replies
1,935 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @vivek338 ,

I hope you are doing well.

In I.MX8MM EVK, pin 40 on J1003 which is the SAI5_RXC pad is used by the micfil device node for PDM_CLK

Please try applying the below change in the kernel device tree file(/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi)

&micfil {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pdm>;
assigned-clocks = <&clk IMX8MM_CLK_PDM>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <196608000>;
- status = "okay";
+ status = "disabled";

};

Thanks & Regards,
Sanket Parekh

0 Kudos
Reply
1,911 Views
vivek338
Contributor IV

Hi Sanket_Parekh ,

Thank you for your reply !!!
But I am new to Yocto project so where to find this file or how to reach at that location.

Also UART3 pins are not working

 

root@imx8mmevk:~# echo "text" > /dev/ttymxc2

Broadcast message from systemd-journald@imx8mmevk (Thu 2023-03-30 05:50:44 UTC):

kernel[241]: [ 659.412754] Internal error: Oops: 96000044 [#1] PREEMPT SMP


Broadcast message from systemd-journald@imx8mmevk (Thu 2023-03-30 05:50:44 UTC):

kernel[241]: [ 659.622255] Code: b90026c0 52800400 531b6ab5 72a03060 (b90002e0)

 

 

Please help!!!!

0 Kudos
Reply
1,901 Views
vivek338
Contributor IV

I found that location and modify

 

&micfil {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pdm>;
assigned-clocks = <&clk IMX8MM_CLK_PDM>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <196608000>;
- status = "okay";
+ status = "disabled";
};

 

But still problem is same

 

Please help!!!!

0 Kudos
Reply
1,887 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport
 
I hope you are doing well.
 
Please make sure that the changes are correctly applied to dtb in the final build.
 
Please mention the BSP version and output of the below command,
 # cat /sys/kernel/debug/gpio
 
Please add the below changes to the iomuxc node in dts.
 
&iomuxc {
          
          /delete-node/ pinctrl_pdm;
          pinctrl_hog: hoggrp {
              fsl,pins = <
                      MX8MM_IOMUXC_SAI5_RXC_GPIO3_IO20 0x11
              >;
 };

};
 
Please provide me with the commands used to toggle gpio and boot logs.
 
Regarding UART, please make sure that the sdma firmware is correctly loaded.
 
Thanks & Regards,
Sanket Parekh

 

 

0 Kudos
Reply
1,864 Views
vivek338
Contributor IV

Hi @Sanket_Parekh 

Thanks for replying!!!!!

I have done changes in dtsi file and i follow below commands;-

 

$ bitbake -c devshell virtual/kernel  
$ make dtbs  
$ bitbake my-image

 

but issue still same...

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

gpiochip1: GPIOs 32-63, parent: platform/30210000.gpio, 30210000.gpio:
gpio-42 ( |reset ) out hi ACTIVE LOW
gpio-51 ( |regulator-usdhc2 ) 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-141 ( |spi1 CS0 ) out hi ACTIVE LOW
gpio-149 ( |wlf,mute ) out hi ACTIVE LOW
root@imx8mmevk:~#

command to toggle led:-

root@imx8mmevk:~# gpioset gpiochip2 20=1
root@imx8mmevk:~# gpioset gpiochip2 20=0
root@imx8mmevk:~# gpioset gpiochip2 20=1

 

How to find boot logs?

How to check sdma firmware??

 

Please help!!!!

0 Kudos
Reply
1,855 Views
vivek338
Contributor IV

Hi @Sanket_Parekh 

 

Issue resolved by disabling sound-card in kernel menu-config.

0 Kudos
Reply