Hi,
I am working on a device tree overlay for a Verdin iMX8m Mini. One thing required with this is to customize the pin MUX. It is working OK but there is something I do not understand and would like clarified.
Following your document on this (here), I have applied the following overlay:
/* Databerry S36051 Device Tree Overlay
* Device tree customisation:
* - Swap Pin 15 from the default assigned PWM channel to the required GPIO
*/
/dts-v1/;
/plugin/;
/*#include <device-trees/dts-arm64/imx8mm-pinfunc.h>*/
#include "imx8mm-pinfunc.h"
/ {
compatible = "toradex,verdin-imx8mm";
};
&pwm2 {
status = "disabled";
};
&iomuxc {
/* Re-definition of the "default" pinctrl names. This is originally defined in the imx8mm-verdin.dtsi file in the $iomuxc node. It
* is redefined here by keeping the original set of pin control phandles, but then adding the new one which is defined below.
*/
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio1>, <&pinctrl_gpio2>,
<&pinctrl_gpio3>, <&pinctrl_gpio4>,
<&pinctrl_gpio7>, <&pinctrl_gpio8>,
<&pinctrl_gpio_hog1>, <&pinctrl_gpio_hog2>, <&pinctrl_gpio_hog3>,
<&pinctrl_pmic_tpm_ena>,
<&pinctrl_s36051_gpios>;
verdin-imx8mm {
/* New pin control group for the S36051 device tree */
pinctrl_s36051_gpios: s36051_gpio_grp {
fsl,pins = <
MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4 0x106 /* SODIMM 15 -> ALT5 gpio5.IO[4], with Drive Strength = X6, pull-down resistor enabled */
/* Other similar lines could be placed here for other pins */
>;
};
};
};
In your document there is the following note:
*Depending on the SoM you might have to put the pin control node inside another node named after the SoM, like apalis-imx8qm. Check the iomuxc declaration in the Device Tree and use it as reference.
I went and looked at the iomuxc declaration (in imx8mm.dtsi) but could not see anything there that guided me as to whether this was necessary or not, nor what the node should be called (assuming it was necessary).
You will see on line 33 that I have put the pin control node inside a node called “verdin-imx8mm”. This works. However, it also works if I do not put it inside such a node. My guess is that in the case of this SoM, this is not necessary. Please would you clarify this, and if it is required, what should the name be?
Also, what is the meaning of the “grp” suffix used on many on the nodes – does it mean “group”?
Thanks for your help,
Peter