EC25 mini pcie is not detected on Verdin am62

We still have a problem with MCU_GPIO pins. Is there some special configuration needed in device tree for them to work. We use on our carrier board SODIMM 141, 206, 208, 210, 212 and 244. All of witch are in MCU_GPIO0 and none of them work. When we write gpioset 0 0=1 and read back with gpioget 0 0 the value is still reported 0 and there is no change in voltage on the trace. However when we run gpioinfo it shows that SODIMM 244 changes into output after the gpioset command.
mcugpio
Any idea how to make these pins act as gpio?

Hi @SmartStuff

You will likely need to make a custom device tree overlay for this. Details are here: Pin Multiplexing - Changing Pin Functionalities in the Linux Device Tree | Toradex Developer Center

In short, you will disable the nodes that are currently using those pins with their alternate functionality and add device nodes to declare them as GPIO. The example on that page is for Apalis i.MX8 but should give you the idea.

Drew

Hi @SmartStuff,

My colleague pointed out to me that the gpioset utility only holds the value while the process is running. You can run it and add --mode=time --sec=5 to the command line to have it run and hold the value for 5 seconds. In another window, while that process is active, you should see the updated values using gpioget.

Drew

One other thing, to get PPP connection working you need to set the following via menuconfig of the kernel

This is from the .config file that is created via menuconfig

#
# PCS device drivers
#
# end of PCS device drivers

CONFIG_PPP=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOE=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y

#
# USB Device Class drivers
#
CONFIG_USB_ACM=y

see this document for info Embedded Linux Systems - GSM/3G/4G

Those kernel configs should be enabled by default (as a module) if you are using our Torizon OS. It may be that the BSP reference images do not enable them by default.

Drew

Hi Drew,

We got the MCU_GPIO also working but in our board there is button on UART0_RTSn line and we thought that we can define UART0 only with RX and TX lines and RTS line is free to use as GPIO.
But when the fingerprint_uart2 is defined as shown below the device tree compiler gives error without any explanation.
So did we compose our device tree overlay with some mistakes or is it not allowed to use only part of devices pins? It compiles when we comment out the &fingerprint_uart2 block.

/dts-v1/;
/plugin/;

#include <k3-pinctrl.h>

/ {
    compatible = "toradex,verdin-am62";
};

&mcu_pmx0 {
		
	/* Button */		
	pinctrl_gpio_button: button_grp {		
		pinctrl-single,pins = <		
			AM62X_MCU_IOPAD(0x0030, PIN_INPUT, 7) /* (A4) WKUP_UART0_RTSn.MCU_GPIO0_12 	*/	/* SODIMM 141 */
		>;
	};
	
	/* Fingerprint reader UART 2 */
	pinctrl_fingerprint_uart2: fingerprint_grp {
		pinctrl-single,pins = <
			AM62X_MCU_IOPAD(0x0024, PIN_INPUT_PULLUP, 0) /* (B4) WKUP_UART0_RXD  */ 		/* SODIMM 137 */
			AM62X_MCU_IOPAD(0x0028, PIN_OUTPUT,       0) /* (C5) WKUP_UART0_TXD  */ 		/* SODIMM 139 */
		>;
	};
};

/* Verdin UART_2 */  // disabled, conflicts with button and fingerprint reader 
&wkup_uart0 {
	status = "disabled";
};

/* Fingerprint UART 2 */
&fingerprint_uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_fingerprint_uart2>;
	status = "okay";
};

&main_gpio0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_gpio_button>;
};

Hi @SmartStuff !

Could you please share any output you get from the compilation of this device tree overlay you shared?

Best regards,

Hello,

we figured out that we can’t use just any name like β€œ&fingerprint_uart2”. As I understand there are device names that are predefined in files like k3-am62-main.dtsi.

Good to hear. Thanks for reporting back.