Hello,
I created an overlay for my device tree 2-3 months ago and it worked fine.
I have some trouble using some GPIO that should already be accessible without modifiying the device tree :
I am using gpiod to try to switch on and off some GPIO with the imx8m-mini non wifi SoM.
Here the gpio that i can’t set :
SODIMM_206, SODIMM_208, SODIMM_210, SODIMM_212, SODIMM_216
I use the command on for exemple SODIMM_206:2. 3.
gpiofind SODIMM_206 //gpiochip2, line 4
gpioget 2 4 // the output is 0 for me
gpioset 2 4=1
gpioget 2 4 // output is still 0 for me
if i do the same commands on : SODIMM_ : 218, 220, 222, 17, 21, 30 it works
i modified SODIMM_: 17, 21 and 30 on my overlay to have them working.
Here is my custom overlay :
/dts-v1/;
/plugin/;
#include "../dts-arm64/imx8mm-pinfunc.h"
/ {
compatible = "toradex,verdin-imx8mm";
};
&sai2 {
status="disabled";
};
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio7>,
<&pinctrl_gpio8>, <&pinctrl_gpio_hog1>,
<&pinctrl_gpio_hog2>, <&pinctrl_gpio_hog3>,
<&pinctrl_sai5>, <&pinctrl_pmic_tpm_ena>, <&pinctrl_my_gpios>;
pinctrl_my_gpios: my_example_grp {
fsl,pins = <
MX8MM_IOMUXC_SAI2_TXC_GPIO4_IO25 0x184 /* SODIMM_30 */
MX8MM_IOMUXC_NAND_RE_B_GPIO3_IO15 0x184 /* SODIMM_17 */
MX8MM_IOMUXC_NAND_CE2_B_GPIO3_IO3 0x184 /* SODIMM_21 */
>;
};
pinctrl_pwm_4: pwm4grp {
fsl,pins = <
MX8MM_IOMUXC_GPIO1_IO15_PWM4_OUT 0x6 /* SODIMM 187 */
>;
};
};
I have many question :
- I can’t remember what the “0x184” or “0x6” are for ?
- How can i know if i have an conflict and i need to disable something ? like the sai2 that i disabled ?
- Does you have a documentation for writing a device tree ? i also can’t remember the usage of the file : “…/dts-arm64/imx8mm-pinfunc.h”
here are my overlays :
ls /proc/device-tree/chosen/overlays/
name verdin-imx8mm_disable_can1.dtbo verdin-imx8mm_extra_gpios_overlay.dtbo verdin-imx8mm_spidev_overlay.dtbo
Thank you for the answer !