This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: GPIO test

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: SK-AM62, SYSCONFIG

Hi,

I would like to test GPIO pins output and input for sk-AM62 EVM by connecting to either external or internal LEDs(if any).

I tried using echo 244>/sys/class/gpio/export but nothing happened.

Currently MCU_GPIO0_2 is connected to the LED.

Thanks in advance.

  • Hi,

    Did you add the GPIO pinmux in the kernel device tree?

  • Yes I have added the GPIO pinmux in the device tree.

    led-0 {
    	label = "am62-sk:green:heartbeat";
    	gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>;
    	linux,default-trigger = "heartbeat";
    	function = LED_FUNCTION_HEARTBEAT;
    	default-state = "off";
    };
    
    led-1 {
    	label = "led1";
    	gpios = <&main_gpio0 42 GPIO_ACTIVE_HIGH>;
    	linux,default-trigger = "timer";
    	led-pattern = <500 500>;
    	default-state = "off";
    };
    
    led-2 {
    	label = "led2";
    	gpios = <&main_gpio0 16 GPIO_ACTIVE_HIGH>;
    	linux,default-trigger = "timer";
    	led-pattern = <500 500>;
    	default-state = "off";
    };
    
    led-3 {
    	label = "led3";
    	gpios = <&main_gpio0 17 GPIO_ACTIVE_HIGH>;
    	linux,default-trigger = "timer";
    	led-pattern = <500 500>;
    	default-state = "off";
    };
    
    led-4 {
    	label = "led4";
    	gpios = <&main_gpio0 18 GPIO_ACTIVE_HIGH>;
    	linux,default-trigger = "timer";
    	led-pattern = <500 500>;
    	default-state = "off";
    };
    
    led-5 {
    	label = "led5";
    	gpios = <&main_gpio0 19 GPIO_ACTIVE_HIGH>;
    	linux,default-trigger = "timer";
    	led-pattern = <500 500>;
    	default-state = "off";
    };
    
    usr_led_pins_default: usr-led-pins-default {
    	pinctrl-single,pins = <
    		AM62X_IOPAD(0x244, PIN_OUTPUT, 7) /* (C17) MMC1_SDWP.GPIO1_49 */
    		AM62X_IOPAD(0x0ac, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
    		AM62X_IOPAD(0x1b8, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
    		AM62X_IOPAD(0x1bc, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
    		AM62X_IOPAD(0x1c0, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
    		AM62X_IOPAD(0x1c4, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
    	>;
    };

  • Your device tree setting above only adds the led nodes. Did you add the PINMUX for the GPIO pins used to control the LEDs?

  • Are you referring to using PINMUX tool? If that's the case, I haven't. I have tried configuring it but I don't know how to include it in the project build.

  • Yes, you need to set the PINMUX for the GPIO pins you needed in the kernel device tree file. Otherwise, the pins won't work in GPIO mode.

    You can refer to "usr_led_pins_default" in k3-am62x-sk-common.dtsi to understand how GPIO1_49 PINMUX is configured and used in "leds" DT node. The PINMUX configuration itself can be generated using Sysconfig tool (recommended) or manually by referring to the device Datesheet.

  • You mean I need to configure more than just following?

    I followed the "usr_led_pins_default". I tried Sysconfig tool but I don't know how to include the .syscfg file when I build the dtb files as I am not using CCS.

    usr_led_pins_default: usr-led-pins-default {
    	pinctrl-single,pins = <
    	    AM62X_IOPAD(0x0ac, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
    	>;
    ;

    led-1 {
    	label = "led1";
    	gpios = <&main_gpio0 42 GPIO_ACTIVE_HIGH>;
    	linux,default-trigger = "timer";
    	led-pattern = <500 500>;
    	default-state = "off";
    };

  • Hi Cyra,

    You mean I need to configure more than just following?

    No. You are almost there.

    You need to copy the pinmux data (devicetree.dtsi) you got from Sysconfig tool into the section "&main_pmx0". You can refer to how "usr_led_pins_default" sits in the same section in the board device tree file.

    Please note that the line 5 misses '}' in the pinmux setting you posted above. I guess it is just a copy&paste error. Sysconfig should generate the correct format.

  • i have added the main_pmx0 to device tree file. But still not working. I have attached the k3-am62x-custom.dts file and k3-am62x-sk-common.dtsi file.

    Please let me me know whether i am doing anything wrong.

    // SPDX-License-Identifier: GPL-2.0
    /*
     * AM625 Minimal dts file
     * Copyright (C) 2021-2022 Texas Instruments Incorporated - https://www.ti.com/
     */
    
    /dts-v1/;
    
    #include <dt-bindings/leds/common.h>
    #include <dt-bindings/gpio/gpio.h>
    #include "k3-am625.dtsi"
    #include "k3-am62x-sk-common.dtsi"
    
    / {
    	compatible =  "ti,am625-generic", "ti,am625";
    	model = "Texas Instruments AM625 Generic";
    
    	chosen {
    		stdout-path = "serial2:115200n8";
    		bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
    	};
    
    	cpus {
    		/delete-node/ cpu@1;
    		/delete-node/ cpu@2;
    		/delete-node/ cpu@3;
    	};
    
    	memory@80000000 {
    		device_type = "memory";
    		/* 2G RAM */
    		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
    
    	};
    
    	reserved-memory {
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		secure_tfa_ddr: tfa@9e780000 {
    			reg = <0x00 0x9e780000 0x00 0x80000>;
    			alignment = <0x1000>;
    			no-map;
    		};
    
    		secure_ddr: optee@9e800000 {
    			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
    			alignment = <0x1000>;
    			no-map;
    		};
    
    		main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0xa0000000 0x00 0x200000>;
    			no-map;
    		};
    
    		lpm_ctx_ddr: lpm-memory@a1000000 {
    			reg = <0x00 0xa1000000 0x00 0x40000>;
    			alignment = <0x1000>;
    			no-map;
    		};
    	};
    
    	leds
    	{
    		compatible = "gpio-leds";
    		pinctrl-names = "default";
    		pinctrl-0 = <&usr_led_pins_test>;
    		
    		led-1 {
    			label = "led1";
    			gpios = <&main_gpio0 21 GPIO_ACTIVE_HIGH>;
    			linux,default-trigger = "heartbeat";
    			function = LED_FUNCTION_HEARTBEAT;
    			default-state = "off";
    		};
    	}
    };
    
    &cluster0 {
    	/delete-node/ core1;
    	/delete-node/ core2;
    	/delete-node/ core3;
    };
    
    &main_pmx0 {
    	main_uart0_pins_default: main-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x1d0, PIN_INPUT, 0) /* (A15) UART0_CTSn */
    			AM62X_IOPAD(0x1d4, PIN_OUTPUT, 0) /* (B15) UART0_RTSn */
    			AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14) UART0_RXD */
    			AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
    		>;
    	};
    
    	main_uart1_pins_default: main-uart1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19) MCASP0_AXR3.UART1_CTSn */
    			AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19) MCASP0_AXR2.UART1_RTSn */
    			AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19) MCASP0_AFSR.UART1_RXD */
    			AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20) MCASP0_ACLKR.UART1_TXD */
    		>;
    	};
    
    	main_uart5_pins_default: main-uart5-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x01d8, PIN_INPUT, 1) /* (C15) MCAN0_TX.UART5_RXD */
    			AM62X_IOPAD(0x01dc, PIN_OUTPUT, 1) /* (E15) MCAN0_RX.UART5_TXD */
    		>;
    	};
    };
    
    &mcu_pmx0 {
    	wkup_uart0_pins_default: wkup-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C6) WKUP_UART0_CTSn */
    			AM62X_MCU_IOPAD(0x030, PIN_OUTPUT, 0) /* (A4) WKUP_UART0_RTSn */
    			AM62X_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (B4) WKUP_UART0_RXD */
    			AM62X_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (C5) WKUP_UART0_TXD */
    		>;
    	};
    };
    
    
    &oc_sram {
    	status = "disabled";
    };
    
    &main_uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart0_pins_default>;
    };
    
    &main_uart1 {
            pinctrl-names = "default";
            pinctrl-0 = <&main_uart1_pins_default>;
            /* Main UART1 is used by TIFS firmware */
    	status = "reserved";
    };
    
    &main_uart2 {
    	status = "disabled";
    };
    
    &main_uart3 {
    	status = "disabled";
    };
    
    &main_uart4 {
    	status = "disabled";
    };
    
    &main_uart5 {
    	// status = "disabled";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart5_pins_default>;
    };
    
    &main_uart6 {
    	status = "disabled";
    };
    
    &main_i2c0 {
    	status = "disabled";
    
    };
    
    &main_i2c1 {
    	status = "disabled";
    };
    
    &main_i2c2 {
    	status = "disabled";
    };
    
    &main_i2c3 {
    	status = "disabled";
    };
    
    &main_gpio_intr {
    	status = "disabled";
    };
    
    &main_gpio0 {
    	status = "disabled";
    };
    
    &main_gpio1 {
    	status = "disabled";
    };
    
    &sdhci0 {
    	status = "disabled";
    };
    
    &sdhci1 {
    	status = "disabled";
    };
    
    &sdhci2 {
    	status = "disabled";
    };
    
    &fss {
    	status = "disabled";
    };
    
    &ospi0 {
    	status = "disabled";
    };
    
    &main_conf {
    	status = "disabled";
    };
    
    &inta_main_dmss {
    	status = "disabled";
    };
    
    &main_bcdma {
    	status = "disabled";
    };
    
    &main_pktdma {
    	status = "disabled";
    };
    
    &cpsw3g {
    	status = "disabled";
    };
    
    /* MCU periperhals */
    &mcu_uart0 {
    	status = "disabled";
    };
    
    &mcu_i2c0 {
    	status = "disabled";
    };
    
    &mcu_gpio_intr {
    	status = "disabled";
    };
    
    &mcu_gpio0 {
    	status = "disabled";
    };
    
    /* WKUP periperhals */
    &wkup_conf {
    	status = "disabled";
    };
    
    &chipid {
    	status = "disabled";
    };
    
    /* wkup_uart0 is reserved for firmware usage */
    &wkup_uart0 {
    	pinctrl-names = "default";
            pinctrl-0 = <&wkup_uart0_pins_default>;
            /* WKUP UART0 is used by DM firmware */
    	status = "reserved";
    };
    
    &wkup_i2c0 {
    	status = "disabled";
    };
    
    &usbss0 {
    	status = "disabled";
    };
    
    &usbss1 {
    	status = "disabled";
    };
    
    &gpu {
    	status = "disabled";
    };
    
    &dss {
    	status = "disabled";
    };
    
    &mcu_m4fss {
    	status = "disabled";
    };
    
    &hwspinlock {
    	status = "disabled";
    };
    
    &mailbox0_cluster0 {
    	status = "disabled";
    };
    
    &pruss {
    	status = "disabled";
    };
    
    &rtc0 {
    	status = "disabled";
    };
    
    &epwm0 {
    	status = "disabled";
    };
    
    &epwm1 {
    	status = "disabled";
    };
    
    &epwm2 {
    	status = "disabled";
    };
    
    &ecap0 {
    	status = "disabled";
    };
    
    &ecap1 {
    	status = "disabled";
    };
    
    &ecap2 {
    	status = "disabled";
    };
    
    &main_rti0 {
    	status = "disabled";
    };
    
    &main_rti1 {
    	status = "disabled";
    };
    
    &ti_csi2rx0 {
    	status = "disabled";
    };
    
    &dphy0 {
    	status = "disabled";
    };

    // k3-am62x-sk-common.dtsi
    // SPDX-License-Identifier: GPL-2.0
    /*
     * Common dtsi for AM62x SK and derivatives
     *
     * Copyright (C) 2021-2022 Texas Instruments Incorporated - https://www.ti.com/
     */  
    
    / {
    	aliases {
    		serial2 = &main_uart0;
    		mmc0 = &sdhci0;
    		mmc1 = &sdhci1;
    		mmc2 = &sdhci2;
    		spi0 = &ospi0;
    		usb0 = &usb0;
    		usb1 = &usb1;
    		ethernet0 = &cpsw_port1;
    		ethernet1 = &cpsw_port2;
    	};
    
    	chosen {
    		stdout-path = "serial2:115200n8";
    		bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
    	};
    
    	opp-table {
    		/* Add 1.4GHz OPP for am625-sk board. Requires VDD_CORE to be at 0.85V */
    		opp-1400000000 {
    			opp-hz = /bits/ 64 <1400000000>;
    			opp-supported-hw = <0x01 0x0004>;
    			clock-latency-ns = <6000000>;
    		};
    	};
    
    	memory@80000000 {
    		device_type = "memory";
    		/* 2G RAM */
    		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
    
    	};
    
    	reserved-memory {
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		rtos_ipc_memory_region: ipc-memories@9c800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9c800000 0x00 0x00300000>;
    			no-map;
    		};
    
    		mcu_m4fss_dma_memory_region: m4f-dma-memory@9cb00000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9cb00000 0x00 0x100000>;
    			no-map;
    		};
    
    		mcu_m4fss_memory_region: m4f-memory@9cc00000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9cc00000 0x00 0xe00000>;
    			no-map;
    		};
    
    		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9da00000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9da00000 0x00 0x00100000>;
    			no-map;
    		};
    
    		wkup_r5fss0_core0_memory_region: r5f-memory@9db00000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9db00000 0x00 0x00c00000>;
    			no-map;
    		};
    
    		lpm_ctx_ddr: lpm-memory@9e700000 {
    			reg = <0x00 0x9e700000 0x00 0x80000>;
    			alignment = <0x1000>;
    		};
    
    		secure_tfa_ddr: tfa@9e780000 {
    			reg = <0x00 0x9e780000 0x00 0x80000>;
    			alignment = <0x1000>;
    			no-map;
    		};
    
    		secure_ddr: optee@9e800000 {
    			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
    			alignment = <0x1000>;
    			no-map;
    		};
    	};
    
    	vmain_pd: regulator-0 {
    		/* TPS65988 PD CONTROLLER OUTPUT */
    		compatible = "regulator-fixed";
    		regulator-name = "vmain_pd";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vcc_5v0: regulator-1 {
    		/* Output of TPS630702 */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_5v0";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		vin-supply = <&vmain_pd>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vcc_3v3_sys: regulator-2 {
    		/* output of LM61460-Q1 */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_3v3_sys";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		vin-supply = <&vmain_pd>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vdd_mmc1: regulator-3 {
    		/* TPS22918DBVR */
    		compatible = "regulator-fixed";
    		regulator-name = "vdd_mmc1";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		enable-active-high;
    		vin-supply = <&vcc_3v3_sys>;
    		gpio = <&exp1 3 GPIO_ACTIVE_HIGH>;
    	};
    
    	vdd_sd_dv: regulator-4 {
    		/* Output of TLV71033 */
    		compatible = "regulator-gpio";
    		regulator-name = "tlv71033";
    		pinctrl-names = "default";
    		pinctrl-0 = <&vdd_sd_dv_pins_default>;
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		vin-supply = <&vcc_5v0>;
    		gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
    		states = <1800000 0x0>,
    			 <3300000 0x1>;
    	};
    
    	wlan_lten: regulator-5 {
    		compatible = "regulator-fixed";
    		regulator-name = "wlan_lten";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-always-on;
    		vin-supply = <&vcc_3v3_sys>;
    		gpios = <&exp1 11 GPIO_ACTIVE_LOW>;
    	};
    
    	wlan_en: regulator-6 {
    		/* OUTPUT of SN74AVC2T244DQMR */
    		compatible = "regulator-fixed";
    		regulator-name = "wlan_en";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <1800000>;
    		enable-active-high;
    		regulator-always-on;
    		vin-supply = <&wlan_lten>;
    		gpios = <&main_gpio0 71 GPIO_ACTIVE_HIGH>;
    		pinctrl-names = "default";
    		pinctrl-0 = <&wlan_en_pins_default>;
    	};
    
    	vcc_1v8: regulator-7 {
    		/* output of TPS6282518DMQ */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_1v8";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <1800000>;
    		vin-supply = <&vcc_3v3_sys>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	tlv320_mclk: clk-0 {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <12288000>;
    	};
    
    	codec_audio: sound {
    		compatible = "simple-audio-card";
    		simple-audio-card,name = "AM62x-SKEVM";
    		simple-audio-card,widgets =
    			"Headphone", "Headphone Jack";
    		simple-audio-card,routing =
    			"Headphone Jack",	"HPLOUT",
    			"Headphone Jack",	"HPROUT";
    		simple-audio-card,format = "dsp_b";
    		simple-audio-card,bitclock-master = <&sound_master>;
    		simple-audio-card,frame-master = <&sound_master>;
    		simple-audio-card,bitclock-inversion;
    
    		simple-audio-card,cpu {
    			sound-dai = <&mcasp1>;
    		};
    
    		sound_master: simple-audio-card,codec {
    			sound-dai = <&tlv320aic3106>;
    			clocks = <&tlv320_mclk>;
    		};
    	};
    
    	leds {
    		compatible = "gpio-leds";
    		pinctrl-names = "default";
    		pinctrl-0 = <&usr_led_pins_default>;
    
    		led-0 {
    			label = "am62-sk:green:heartbeat";
    			gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>;
    			linux,default-trigger = "heartbeat";
    			function = LED_FUNCTION_HEARTBEAT;
    			default-state = "off";
    		};
    	};
    
    	hdmi_mstrclk: hdmi-mstrclk {
    		compatible = "fixed-clock";
    		#clock-cells = <0>;
    		clock-frequency = <12288000>;
    	};
    
    	hdmi: connector {
    		compatible = "hdmi-connector";
    		label = "hdmi";
    		type = "a";
    		port {
    			hdmi_connector_in: endpoint {
    				remote-endpoint = <&sii9022_out>;
    			};
    		};
    	};
    };
    
    &main_pmx0 {
    	main_uart0_pins_default: main-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14) UART0_RXD */
    			AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
    		>;
    	};
    
    	main_i2c0_pins_default: main-i2c0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */
    			AM62X_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */
    		>;
    	};
    
    	main_i2c1_pins_default: main-i2c1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */
    			AM62X_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SDA */
    		>;
    	};
    
    	main_i2c2_pins_default: main-i2c2-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (K22) GPMC0_CSn2.I2C2_SCL */
    			AM62X_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */
    		>;
    	};
    
    	main_mmc0_pins_default: main-mmc0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
    			AM62X_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
    			AM62X_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
    			AM62X_IOPAD(0x210, PIN_INPUT, 0) /* (AA1) MMC0_DAT1 */
    			AM62X_IOPAD(0x20c, PIN_INPUT, 0) /* (AA3) MMC0_DAT2 */
    			AM62X_IOPAD(0x208, PIN_INPUT, 0) /* (Y4) MMC0_DAT3 */
    			AM62X_IOPAD(0x204, PIN_INPUT, 0) /* (AB2) MMC0_DAT4 */
    			AM62X_IOPAD(0x200, PIN_INPUT, 0) /* (AC1) MMC0_DAT5 */
    			AM62X_IOPAD(0x1fc, PIN_INPUT, 0) /* (AD2) MMC0_DAT6 */
    			AM62X_IOPAD(0x1f8, PIN_INPUT, 0) /* (AC2) MMC0_DAT7 */
    		>;
    	};
    
    	main_mmc1_pins_default: main-mmc1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
    			AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
    			AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
    			AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
    			AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
    			AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */
    			AM62X_IOPAD(0x240, PIN_INPUT, 0) /* (D17) MMC1_SDCD */
    		>;
    	};
    
    	wlan_en_pins_default: wlan-en-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x124, PIN_OUTPUT, 7) /* (A23) MMC2_SDCD.GPIO0_71 */
    		>;
    	};
    
    	main_mmc2_pins_default: main-mmc2-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD */
    			AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK */
    			AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0 */
    			AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1 */
    			AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2 */
    			AM62X_IOPAD(0x108, PIN_INPUT, 0) /* (D24) MMC2_DAT3 */
    			AM62X_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */
    		>;
    	};
    
    	main_wlirq_pins_default: main-wlirq-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x128, PIN_INPUT, 7) /* (B23) MMC2_SDWP.GPIO0_72 */
    		>;
    	};
    
    	usr_led_pins_default: usr-led-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x244, PIN_OUTPUT, 7) /* (C17) MMC1_SDWP.GPIO1_49 */
    		>;
    	};
    
    	usr_led_pins_test: usr-led-pins-test {
    		pinctrl-single,pins = <
    			AM62X_MCU_IOPAD(0x0008, PIN_OUTPUT, 7) /* (A7) MCU_SPI0_CLK.MCU_GPIO0_2 */
    		>;
    	};
    
    	main_mdio1_pins_default: main-mdio1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x160, PIN_OUTPUT, 0) /* (AD24) MDIO0_MDC */
    			AM62X_IOPAD(0x15c, PIN_INPUT, 0) /* (AB22) MDIO0_MDIO */
    		>;
    	};
    
    	main_rgmii1_pins_default: main-rgmii1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x14c, PIN_INPUT, 0) /* (AB17) RGMII1_RD0 */
    			AM62X_IOPAD(0x150, PIN_INPUT, 0) /* (AC17) RGMII1_RD1 */
    			AM62X_IOPAD(0x154, PIN_INPUT, 0) /* (AB16) RGMII1_RD2 */
    			AM62X_IOPAD(0x158, PIN_INPUT, 0) /* (AA15) RGMII1_RD3 */
    			AM62X_IOPAD(0x148, PIN_INPUT, 0) /* (AD17) RGMII1_RXC */
    			AM62X_IOPAD(0x144, PIN_INPUT, 0) /* (AE17) RGMII1_RX_CTL */
    			AM62X_IOPAD(0x134, PIN_OUTPUT, 0) /* (AE20) RGMII1_TD0 */
    			AM62X_IOPAD(0x138, PIN_OUTPUT, 0) /* (AD20) RGMII1_TD1 */
    			AM62X_IOPAD(0x13c, PIN_OUTPUT, 0) /* (AE18) RGMII1_TD2 */
    			AM62X_IOPAD(0x140, PIN_OUTPUT, 0) /* (AD18) RGMII1_TD3 */
    			AM62X_IOPAD(0x130, PIN_OUTPUT, 0) /* (AE19) RGMII1_TXC */
    			AM62X_IOPAD(0x12c, PIN_OUTPUT, 0) /* (AD19) RGMII1_TX_CTL */
    		>;
    	};
    
    	main_rgmii2_pins_default: main-rgmii2-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x184, PIN_INPUT, 0) /* (AE23) RGMII2_RD0 */
    			AM62X_IOPAD(0x188, PIN_INPUT, 0) /* (AB20) RGMII2_RD1 */
    			AM62X_IOPAD(0x18c, PIN_INPUT, 0) /* (AC21) RGMII2_RD2 */
    			AM62X_IOPAD(0x190, PIN_INPUT, 0) /* (AE22) RGMII2_RD3 */
    			AM62X_IOPAD(0x180, PIN_INPUT, 0) /* (AD23) RGMII2_RXC */
    			AM62X_IOPAD(0x17c, PIN_INPUT, 0) /* (AD22) RGMII2_RX_CTL */
    			AM62X_IOPAD(0x16c, PIN_OUTPUT, 0) /* (Y18) RGMII2_TD0 */
    			AM62X_IOPAD(0x170, PIN_OUTPUT, 0) /* (AA18) RGMII2_TD1 */
    			AM62X_IOPAD(0x174, PIN_OUTPUT, 0) /* (AD21) RGMII2_TD2 */
    			AM62X_IOPAD(0x178, PIN_OUTPUT, 0) /* (AC20) RGMII2_TD3 */
    			AM62X_IOPAD(0x168, PIN_OUTPUT, 0) /* (AE21) RGMII2_TXC */
    			AM62X_IOPAD(0x164, PIN_OUTPUT, 0) /* (AA19) RGMII2_TX_CTL */
    		>;
    	};
    
    	ospi0_pins_default: ospi0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x000, PIN_OUTPUT, 0) /* (H24) OSPI0_CLK */
    			AM62X_IOPAD(0x02c, PIN_OUTPUT, 0) /* (F23) OSPI0_CSn0 */
    			AM62X_IOPAD(0x00c, PIN_INPUT, 0) /* (E25) OSPI0_D0 */
    			AM62X_IOPAD(0x010, PIN_INPUT, 0) /* (G24) OSPI0_D1 */
    			AM62X_IOPAD(0x014, PIN_INPUT, 0) /* (F25) OSPI0_D2 */
    			AM62X_IOPAD(0x018, PIN_INPUT, 0) /* (F24) OSPI0_D3 */
    			AM62X_IOPAD(0x01c, PIN_INPUT, 0) /* (J23) OSPI0_D4 */
    			AM62X_IOPAD(0x020, PIN_INPUT, 0) /* (J25) OSPI0_D5 */
    			AM62X_IOPAD(0x024, PIN_INPUT, 0) /* (H25) OSPI0_D6 */
    			AM62X_IOPAD(0x028, PIN_INPUT, 0) /* (J22) OSPI0_D7 */
    			AM62X_IOPAD(0x008, PIN_INPUT, 0) /* (J24) OSPI0_DQS */
    		>;
    	};
    
    	main_dss0_pins_default: main-dss0-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x0100, PIN_OUTPUT, 0) /* (AC25) VOUT0_VSYNC */
    			AM62X_IOPAD(0x00f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC */
    			AM62X_IOPAD(0x0104, PIN_OUTPUT, 0) /* (AC24) VOUT0_PCLK */
    			AM62X_IOPAD(0x00fc, PIN_OUTPUT, 0) /* (Y20) VOUT0_DE */
    			AM62X_IOPAD(0x00b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */
    			AM62X_IOPAD(0x00bc, PIN_OUTPUT, 0) /* (V24) VOUT0_DATA1 */
    			AM62X_IOPAD(0x00c0, PIN_OUTPUT, 0) /* (W25) VOUT0_DATA2 */
    			AM62X_IOPAD(0x00c4, PIN_OUTPUT, 0) /* (W24) VOUT0_DATA3 */
    			AM62X_IOPAD(0x00c8, PIN_OUTPUT, 0) /* (Y25) VOUT0_DATA4 */
    			AM62X_IOPAD(0x00cc, PIN_OUTPUT, 0) /* (Y24) VOUT0_DATA5 */
    			AM62X_IOPAD(0x00d0, PIN_OUTPUT, 0) /* (Y23) VOUT0_DATA6 */
    			AM62X_IOPAD(0x00d4, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA7 */
    			AM62X_IOPAD(0x00d8, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA8 */
    			AM62X_IOPAD(0x00dc, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA9 */
    			AM62X_IOPAD(0x00e0, PIN_OUTPUT, 0) /* (V20) VOUT0_DATA10 */
    			AM62X_IOPAD(0x00e4, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA11 */
    			AM62X_IOPAD(0x00e8, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA12 */
    			AM62X_IOPAD(0x00ec, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA13 */
    			AM62X_IOPAD(0x00f0, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA14 */
    			AM62X_IOPAD(0x00f4, PIN_OUTPUT, 0) /* (AA21) VOUT0_DATA15 */
    			AM62X_IOPAD(0x005c, PIN_OUTPUT, 1) /* (R24) GPMC0_AD8.VOUT0_DATA16 */
    			AM62X_IOPAD(0x0060, PIN_OUTPUT, 1) /* (R25) GPMC0_AD9.VOUT0_DATA17 */
    			AM62X_IOPAD(0x0064, PIN_OUTPUT, 1) /* (T25) GPMC0_AD10.VOUT0_DATA18 */
    			AM62X_IOPAD(0x0068, PIN_OUTPUT, 1) /* (R21) GPMC0_AD11.VOUT0_DATA19 */
    			AM62X_IOPAD(0x006c, PIN_OUTPUT, 7) /* Mode 1 (T22) GPMC0_AD12.VOUT0_DATA20 */ 
    			AM62X_IOPAD(0x0070, PIN_OUTPUT, 1) /* (T24) GPMC0_AD13.VOUT0_DATA21 */
    			AM62X_IOPAD(0x0074, PIN_OUTPUT, 1) /* (U25) GPMC0_AD14.VOUT0_DATA22 */
    			AM62X_IOPAD(0x0078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
    		>;
    	};
    
    	vdd_sd_dv_pins_default: vdd-sd-dv-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x07c, PIN_OUTPUT, 7) /* (P25) GPMC0_CLK.GPIO0_31 */
    		>;
    	};
    
    	main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */
    		>;
    	};
    
    	main_usb1_pins_default: main-usb1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */
    		>;
    	};
    
    	main_mcasp1_pins_default: main-mcasp1-pins-default {
    		pinctrl-single,pins = <
    			AM62X_IOPAD(0x0090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
    			AM62X_IOPAD(0x0098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
    			AM62X_IOPAD(0x008c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
    			AM62X_IOPAD(0x0084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
    		>;
    	};
    
    	// main_uart5_pins_default: main-uart5-pins-default {
    	// 	pinctrl-single,pins = <
    	// 		AM62X_IOPAD(0x1d8, PIN_INPUT, 1) /* (C15) UART0_RXD */
    	// 		AM62X_IOPAD(0x1dc, PIN_OUTPUT, 1) /* (E15) UART0_TXD */
    	// 	>;
    	// };
    };
    
    &wkup_uart0 {
    	/* WKUP UART0 is used by DM firmware */
    	status = "reserved";
    };
    
    &mcu_uart0 {
    	status = "disabled";
    };
    
    &main_uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart0_pins_default>;
    };
    
    &main_uart1 {
    	/* Main UART1 is used by TIFS firmware */
    	status = "reserved";
    };
    
    &main_uart2 {
    	status = "disabled";
    };
    
    &main_uart3 {
    	status = "disabled";
    };
    
    &main_uart4 {
    	status = "disabled";
    };
    
    &main_uart5 {
    	status = "disabled";
    	// pinctrl-names = "default";
    	// pinctrl-0 = <&main_uart5_pins_default>;
    };
    
    &main_uart6 {
    	status = "disabled";
    };
    
    &mcu_i2c0 {
    	status = "disabled";
    };
    
    &wkup_i2c0 {
    	status = "disabled";
    };
    
    &main_i2c0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c0_pins_default>;
    	clock-frequency = <400000>;
    
    	typec_pd: usb-pd@3f {
    		compatible = "ti,tps6598x";
    		reg = <0x3f>;
    
    		connector {
    			ports {
    				#address-cells = <1>;
    				#size-cells = <0>;
    
    				port@1 {
    					reg = <1>;
    
    					usb_con_hs: endpoint {
    						remote-endpoint = <&typec_hs>;
    					};
    				};
    			};
    		};
    	};
    };
    
    &main_i2c1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c1_pins_default>;
    	clock-frequency = <100000>;
    
    	exp1: gpio@22 {
    		compatible = "ti,tca6424";
    		reg = <0x22>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
    				   "PRU_DETECT", "MMC1_SD_EN",
    				   "VPP_LDO_EN", "EXP_PS_3V3_En",
    				   "EXP_PS_5V0_En", "EXP_HAT_DETECT",
    				   "GPIO_AUD_RSTn", "GPIO_eMMC_RSTn",
    				   "UART1_FET_BUF_EN", "WL_LT_EN",
    				   "GPIO_HDMI_RSTn", "CSI_GPIO1",
    				   "CSI_GPIO2", "PRU_3V3_EN",
    				   "HDMI_INTn", "TEST_GPIO2",
    				   "MCASP1_FET_EN", "MCASP1_BUF_BT_EN",
    				   "MCASP1_FET_SEL", "UART1_FET_SEL",
    				   "TSINT#", "IO_EXP_TEST_LED";
    
    		interrupt-parent = <&main_gpio1>;
    		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    
    		pinctrl-names = "default";
    		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
    	};
    
    	sii9022: sii9022@3b {
    		#sound-dai-cells = <0>;
    		compatible = "sil,sii9022";
    		reg = <0x3b>;
    
    		clocks = <&hdmi_mstrclk>;
    		clock-names = "mclk";
    
    		interrupt-parent = <&exp1>;
    		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
    
    		sil,i2s-data-lanes = < 0 >;
    
    		ports {
    			#address-cells = <1>;
    			#size-cells = <0>;
    
    			port@0 {
    				reg = <0>;
    
    				sii9022_in: endpoint {
    					remote-endpoint = <&dpi1_out>;
    				};
    			};
    
    			port@1 {
    				reg = <1>;
    
    				sii9022_out: endpoint {
    					remote-endpoint = <&hdmi_connector_in>;
    				};
    			};
    		};
    	};
    
    	tlv320aic3106: audio-codec@1b {
    		#sound-dai-cells = <0>;
    		compatible = "ti,tlv320aic3106";
    		reg = <0x1b>;
    
    		/* Regulators */
    		AVDD-supply = <&vcc_3v3_sys>;
    		IOVDD-supply = <&vcc_3v3_sys>;
    		DRVDD-supply = <&vcc_3v3_sys>;
    		DVDD-supply = <&vcc_1v8>;
    	};
    };
    
    &main_i2c2 {
    	status = "disabled";
    };
    
    &main_i2c3 {
    	status = "disabled";
    };
    
    &sdhci0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc0_pins_default>;
    	ti,driver-strength-ohm = <50>;
    	disable-wp;
    };
    
    &sdhci1 {
    	/* SD/MMC */
    	vmmc-supply = <&vdd_mmc1>;
    	vqmmc-supply = <&vdd_sd_dv>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc1_pins_default>;
    	ti,driver-strength-ohm = <50>;
    	disable-wp;
    	no-1-8-v;
    };
    
    &usbss0 {
    	ti,vbus-divider;
    };
    
    &usb0 {
    	#address-cells = <1>;
    	#size-cells = <0>;
    	usb-role-switch;
    
    	port@1 {
    		reg = <1>;
    
    		typec_hs: endpoint {
    			remote-endpoint = <&usb_con_hs>;
    		};
    	};
    };
    
    &usb1 {
    	dr_mode = "host";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usb1_pins_default>;
    };
    
    &cpsw3g {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mdio1_pins_default
    		     &main_rgmii1_pins_default
    		     &main_rgmii2_pins_default>;
    };
    
    &cpsw_port1 {
    	phy-mode = "rgmii-rxid";
    	phy-handle = <&cpsw3g_phy0>;
    };
    
    &cpsw_port2 {
    	phy-mode = "rgmii-rxid";
    	phy-handle = <&cpsw3g_phy1>;
    };
    
    &cpsw3g_mdio {
    	cpsw3g_phy0: ethernet-phy@0 {
    		reg = <0>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    	};
    
    	cpsw3g_phy1: ethernet-phy@1 {
    		reg = <1>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    	};
    };
    
    &dss {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_dss0_pins_default>;
    };
    
    &dss_ports {
    	#address-cells = <1>;
    	#size-cells = <0>;
    
    	/* VP2: DPI Output */
    	port@1 {
    		reg = <1>;
    
    		dpi1_out: endpoint {
    			remote-endpoint = <&sii9022_in>;
    		};
    	};
    };
    
    &mcasp0 {
    	status = "disabled";
    };
    
    &mcasp1 {
    	status = "okay";
    	#sound-dai-cells = <0>;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mcasp1_pins_default>;
    
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	tdm-slots = <2>;
    
    	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
    	       1 0 0 0
    	       0 0 0 0
    	       0 0 0 0
    	       0 0 0 0
    	>;
    	tx-num-evt = <32>;
    	rx-num-evt = <32>;
    };
    
    &mcasp2 {
    	status = "disabled";
    };
    
    &mailbox0_cluster0 {
    	mbox_m4_0: mbox-m4-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    
    	mbox_r5_0: mbox-r5-0 {
    		ti,mbox-rx = <2 0 0>;
    		ti,mbox-tx = <3 0 0>;
    	};
    };
    
    &ospi0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&ospi0_pins_default>;
    };
    
    &mcu_m4fss {
    	mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
    	memory-region = <&mcu_m4fss_dma_memory_region>,
    			<&mcu_m4fss_memory_region>;
    };
    
    &wkup_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
    	memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
    			<&wkup_r5fss0_core0_memory_region>;
    };
    
    &main_mcan0 {
    	status = "disabled";
    };
    
    &mcu_rti0 {
    	/* MCU RTI0 is used by M4F firmware */
    	status = "reserved";
    };
    
    &wkup_rti0 {
    	/* WKUP RTI0 is used by DM firmware */
    	status = "reserved";
    };
    
    &epwm0 {
    	status = "disabled";
    };
    
    &epwm1 {
    	status = "disabled";
    };
    
    &epwm2 {
    	status = "disabled";
    };
    
    &ecap0 {
    	status = "disabled";
    };
    
    &ecap1 {
    	status = "disabled";
    };
    
    &ecap2 {
    	status = "disabled";
    };
    

  • I am unable to tell what changes you have made in the dts. Please provide the changes in patch format.

  • --- ti-processor-sdk-linux-am62xx-evm-08.04.01.09/board-support/linux-5.10.145+gitAUTOINC+8b51d20b6e-g8b51d20b6e/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi	2022-12-08 16:55:46.260982357 +0800
    +++ "sdk back up/am62xx-evm-linux-sdk-src-08.04.01.09/board-support/linux-5.10.145+gitAUTOINC+8b51d20b6e-g8b51d20b6e/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi"	2022-11-07 14:09:52.000000000 +0800
    @@ -3,12 +3,11 @@
      * Common dtsi for AM62x SK and derivatives
      *
      * Copyright (C) 2021-2022 Texas Instruments Incorporated - https://www.ti.com/
    - */  
    + */
     
     / {
     	aliases {
     		serial2 = &main_uart0;
    -		serial5 = &main_uart5;
     		mmc0 = &sdhci0;
     		mmc1 = &sdhci1;
     		mmc2 = &sdhci2;
    @@ -255,22 +254,6 @@
     			AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
     		>;
     	};
    -	main_uart1_pins_default: main-uart1-pins-default {
    -		pinctrl-single,pins = <
    -			AM62X_IOPAD(0x01e8, PIN_INPUT, 1) /* (B17) I2C1_SCL.UART1_RXD */
    -			AM62X_IOPAD(0x01ec, PIN_OUTPUT, 1) /* (A17) I2C1_SDA.UART1_TXD */
    -			AM62X_IOPAD(0x0194, PIN_INPUT, 2) /* (B19) MCASP0_AXR3.UART1_CTSn */
    -			AM62X_IOPAD(0x0198, PIN_OUTPUT, 2) /* (A19) MCASP0_AXR2.UART1_RTSn */
    -		>;
    -	};
    -	main_uart5_pins_default: main-uart5-pins-default {
    -		pinctrl-single,pins = <
    -			AM62X_IOPAD(0x0074, PIN_INPUT, 2) /* (U25) GPMC0_AD14.UART5_RXD */
    -			AM62X_IOPAD(0x0078, PIN_OUTPUT, 2) /* (U24) GPMC0_AD15.UART5_TXD */
    -			AM62X_IOPAD(0x0008, PIN_INPUT, 5) /* (J24) OSPI0_DQS.UART5_CTSn */
    -			AM62X_IOPAD(0x0004, PIN_OUTPUT, 5) /* (G25) OSPI0_LBCLKO.UART5_RTSn */
    -		>;
    -	};
     
     	main_i2c0_pins_default: main-i2c0-pins-default {
     		pinctrl-single,pins = <
    @@ -350,12 +333,6 @@
     		>;
     	};
     
    -	usr_led_pins_test: usr-led-pins-test {
    -		pinctrl-single,pins = <
    -			AM62X_MCU_IOPAD(0x0008, PIN_OUTPUT, 7) /* (A7) MCU_SPI0_CLK.MCU_GPIO0_2 */
    -		>;
    -	};
    -
     	main_mdio1_pins_default: main-mdio1-pins-default {
     		pinctrl-single,pins = <
     			AM62X_IOPAD(0x160, PIN_OUTPUT, 0) /* (AD24) MDIO0_MDC */
    @@ -439,7 +416,7 @@
     			AM62X_IOPAD(0x0060, PIN_OUTPUT, 1) /* (R25) GPMC0_AD9.VOUT0_DATA17 */
     			AM62X_IOPAD(0x0064, PIN_OUTPUT, 1) /* (T25) GPMC0_AD10.VOUT0_DATA18 */
     			AM62X_IOPAD(0x0068, PIN_OUTPUT, 1) /* (R21) GPMC0_AD11.VOUT0_DATA19 */
    -			AM62X_IOPAD(0x006c, PIN_OUTPUT, 7) /* Mode 1 (T22) GPMC0_AD12.VOUT0_DATA20 */ 
    +			AM62X_IOPAD(0x006c, PIN_OUTPUT, 1) /* (T22) GPMC0_AD12.VOUT0_DATA20 */
     			AM62X_IOPAD(0x0070, PIN_OUTPUT, 1) /* (T24) GPMC0_AD13.VOUT0_DATA21 */
     			AM62X_IOPAD(0x0074, PIN_OUTPUT, 1) /* (U25) GPMC0_AD14.VOUT0_DATA22 */
     			AM62X_IOPAD(0x0078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
    @@ -506,9 +483,7 @@
     };
     
     &main_uart5 {
    -	// status = "disabled";
    -	pinctrl-names = "default";
    -	pinctrl-0 = <&main_uart5_pins_default>;
    +	status = "disabled";
     };
     
     &main_uart6 {
    
    // SPDX-License-Identifier: GPL-2.0
    /*
     * AM625 Minimal dts file
     * Copyright (C) 2021-2022 Texas Instruments Incorporated - https://www.ti.com/
     */
    
    /dts-v1/;
    
    #include <dt-bindings/leds/common.h>
    #include <dt-bindings/gpio/gpio.h>
    #include "k3-am625.dtsi"
    #include "k3-am62x-sk-common.dtsi"
    
    / {
    	compatible =  "ti,am625-generic", "ti,am625";
    	model = "Texas Instruments AM625 Generic";
    
    	leds
    	{
    		compatible = "gpio-leds";
    		pinctrl-names = "default";
    		pinctrl-0 = <&usr_led_pins_test>;
    		
    		led-1 {
    			label = "led1";
    			gpios = <&main_gpio0 21 GPIO_ACTIVE_HIGH>;
    			linux,default-trigger = "heartbeat";
    			function = LED_FUNCTION_HEARTBEAT;
    			default-state = "off";
    		};
    	}
    };

  • Hi,

    Is there any new findings on this?

  • Cyra,

    I don't understand your patches.

    The first file you attached is a patch to file k3-am62x-sk-common.dtsi, but the patch removes usr_led_pins_test pinmux. Is it supposed to add a pinmux for the GPIO pin you are going to use?

    The first patch removes pinmux setting for gpio0_2, while the second file, which defines the led-1 node, specifies gpio0_21. Which GPIO pin do you use?

  • Hi,

    I am using the pin number 13 of user expansion connector.

    Below is the patch format of k2-am62x-sk-common.dtsi. I combined the previous two files (k3-am62x-custom.dts file and k3-am62x-sk-common.dtsi) into this k3-am62x-custom.dtsi.

    I also attached the gpioinfo result.

    gpioinfo
    
    gpiochip0 - 24 lines:
            line   0:      unnamed       unused   input  active-high 
            line   1:      unnamed       unused   input  active-high 
            line   2:      unnamed       unused   input  active-high 
            line   3:      unnamed       unused   input  active-high 
            line   4:      unnamed       unused   input  active-high 
            line   5:      unnamed       unused   input  active-high 
            line   6:      unnamed       unused   input  active-high 
            line   7:      unnamed       unused   input  active-high 
            line   8:      unnamed       unused   input  active-high 
            line   9:      unnamed       unused   input  active-high 
            line  10:      unnamed       unused   input  active-high 
            line  11:      unnamed       unused   input  active-high 
            line  12:      unnamed       unused   input  active-high 
            line  13:      unnamed       unused   input  active-high 
            line  14:      unnamed       unused   input  active-high 
            line  15:      unnamed       unused   input  active-high 
            line  16:      unnamed       unused   input  active-high 
            line  17:      unnamed       unused   input  active-high 
            line  18:      unnamed       unused   input  active-high 
            line  19:      unnamed       unused   input  active-high 
            line  20:      unnamed       unused   input  active-high 
            line  21:      unnamed       unused   input  active-high 
            line  22:      unnamed       unused   input  active-high 
            line  23:      unnamed       unused   input  active-high 
    gpiochip1 - 87 lines:
            line   0:      unnamed       unused   input  active-high 
            line   1:      unnamed       unused   input  active-high 
            line   2:      unnamed       unused   input  active-high 
            line   3:      unnamed       unused   input  active-high 
            line   4:      unnamed       unused   input  active-high 
            line   5:      unnamed       unused   input  active-high 
            line   6:      unnamed       unused   input  active-high 
            line   7:      unnamed       unused   input  active-high 
            line   8:      unnamed       unused   input  active-high 
            line   9:      unnamed       unused   input  active-high 
            line  10:      unnamed       unused   input  active-high 
            line  11:      unnamed       unused   input  active-high 
            line  12:      unnamed       unused   input  active-high 
            line  13:      unnamed       unused   input  active-high 
            line  14:      unnamed       unused   input  active-high 
            line  15:      unnamed       unused   input  active-high 
            line  16:      unnamed       unused   input  active-high 
            line  17:      unnamed       unused   input  active-high 
            line  18:      unnamed       unused   input  active-high 
            line  19:      unnamed       unused   input  active-high 
            line  20:      unnamed       unused   input  active-high 
            line  21:      unnamed       unused   input  active-high 
            line  22:      unnamed       unused   input  active-high 
            line  23:      unnamed       unused   input  active-high 
            line  24:      unnamed       unused   input  active-high 
            line  25:      unnamed       unused   input  active-high 
            line  26:      unnamed       unused   input  active-high 
            line  27:      unnamed       unused   input  active-high 
            line  28:      unnamed       unused   input  active-high 
            line  29:      unnamed       unused   input  active-high 
            line  30:      unnamed       unused   input  active-high 
            line  31:      unnamed   "tlv71033"  output  active-high [used]
            line  32:      unnamed       unused   input  active-high 
            line  33:      unnamed       unused   input  active-high 
            line  34:      unnamed       unused   input  active-high 
            line  35:      unnamed       unused   input  active-high 
            line  36:      unnamed       unused   input  active-high 
            line  37:      unnamed       unused   input  active-high 
            line  38:      unnamed       unused   input  active-high 
            line  39:      unnamed       unused   input  active-high 
            line  40:      unnamed       unused   input  active-high 
            line  41:      unnamed       unused   input  active-high 
            line  42:      unnamed "am62-sk:test" output active-high [used]
            line  43:      unnamed       unused   input  active-high 
            line  44:      unnamed       unused   input  active-high 
            line  45:      unnamed       unused   input  active-high 
            line  46:      unnamed       unused   input  active-high 
            line  47:      unnamed       unused   input  active-high 
            line  48:      unnamed       unused   input  active-high 
            line  49:      unnamed       unused   input  active-high 
            line  50:      unnamed       unused   input  active-high 
            line  51:      unnamed       unused   input  active-high 
            line  52:      unnamed       unused   input  active-high 
            line  53:      unnamed       unused   input  active-high 
            line  54:      unnamed       unused   input  active-high 
            line  55:      unnamed       unused   input  active-high 
            line  56:      unnamed       unused   input  active-high 
            line  57:      unnamed       unused   input  active-high 
            line  58:      unnamed       unused   input  active-high 
            line  59:      unnamed       unused   input  active-high 
            line  60:      unnamed       unused   input  active-high 
            line  61:      unnamed       unused   input  active-high 
            line  62:      unnamed       unused   input  active-high 
            line  63:      unnamed       unused   input  active-high 
            line  64:      unnamed       unused   input  active-high 
            line  65:      unnamed       unused   input  active-high 
            line  66:      unnamed       unused   input  active-high 
            line  67:      unnamed       unused   input  active-high 
            line  68:      unnamed       unused   input  active-high 
            line  69:      unnamed       unused   input  active-high 
            line  70:      unnamed       unused   input  active-high 
            line  71:      unnamed "regulator-6" output active-high [used]
            line  72:      unnamed       unused   input  active-high 
            line  73:      unnamed       unused   input  active-high 
            line  74:      unnamed       unused   input  active-high 
            line  75:      unnamed       unused   input  active-high 
            line  76:      unnamed       unused   input  active-high 
            line  77:      unnamed       unused   input  active-high 
            line  78:      unnamed       unused   input  active-high 
            line  79:      unnamed       unused   input  active-high 
            line  80:      unnamed       unused   input  active-high 
            line  81:      unnamed       unused   input  active-high 
            line  82:      unnamed       unused   input  active-high 
            line  83:      unnamed       unused   input  active-high 
            line  84:      unnamed       unused   input  active-high 
            line  85:      unnamed       unused   input  active-high 
            line  86:      unnamed       unused   input  active-high 
    gpiochip2 - 88 lines:
            line   0:      unnamed       unused   input  active-high 
            line   1:      unnamed       unused   input  active-high 
            line   2:      unnamed       unused   input  active-high 
            line   3:      unnamed       unused   input  active-high 
            line   4:      unnamed       unused   input  active-high 
            line   5:      unnamed       unused   input  active-high 
            line   6:      unnamed       unused   input  active-high 
            line   7:      unnamed       unused   input  active-high 
            line   8:      unnamed       unused   input  active-high 
            line   9:      unnamed       unused   input  active-high 
            line  10:      unnamed       unused   input  active-high 
            line  11:      unnamed       unused   input  active-high 
            line  12:      unnamed       unused   input  active-high 
            line  13:      unnamed       unused   input  active-high 
            line  14:      unnamed       unused   input  active-high 
            line  15:      unnamed       unused   input  active-high 
            line  16:      unnamed       unused   input  active-high 
            line  17:      unnamed       unused   input  active-high 
            line  18:      unnamed       unused   input  active-high 
            line  19:      unnamed       unused   input  active-high 
            line  20:      unnamed       unused   input  active-high 
            line  21:      unnamed       unused   input  active-high 
            line  22:      unnamed       unused   input  active-high 
            line  23:      unnamed       unused   input  active-high 
            line  24:      unnamed       unused   input  active-high 
            line  25:      unnamed       unused   input  active-high 
            line  26:      unnamed       unused   input  active-high 
            line  27:      unnamed       unused   input  active-high 
            line  28:      unnamed       unused   input  active-high 
            line  29:      unnamed       unused   input  active-high 
            line  30:      unnamed       unused   input  active-high 
            line  31:      unnamed       unused   input  active-high 
            line  32:      unnamed       unused   input  active-high 
            line  33:      unnamed       unused   input  active-high 
            line  34:      unnamed       unused   input  active-high 
            line  35:      unnamed       unused   input  active-high 
            line  36:      unnamed       unused   input  active-high 
            line  37:      unnamed       unused   input  active-high 
            line  38:      unnamed       unused   input  active-high 
            line  39:      unnamed       unused   input  active-high 
            line  40:      unnamed       unused   input  active-high 
            line  41:      unnamed       unused   input  active-high 
            line  42:      unnamed       unused   input  active-high 
            line  43:      unnamed       unused   input  active-high 
            line  44:      unnamed       unused   input  active-high 
            line  45:      unnamed       unused   input  active-high 
            line  46:      unnamed       unused   input  active-high 
            line  47:      unnamed       unused   input  active-high 
            line  48:      unnamed       unused   input  active-high 
            line  49:      unnamed "am62-sk:green:heartbeat" output active-high [used]
            line  50:      unnamed       unused   input  active-high 
            line  51:      unnamed       unused   input  active-high 
            line  52:      unnamed       unused   input  active-high 
            line  53:      unnamed       unused   input  active-high 
            line  54:      unnamed       unused   input  active-high 
            line  55:      unnamed       unused   input  active-high 
            line  56:      unnamed       unused   input  active-high 
            line  57:      unnamed       unused   input  active-high 
            line  58:      unnamed       unused   input  active-high 
            line  59:      unnamed       unused   input  active-high 
            line  60:      unnamed       unused   input  active-high 
            line  61:      unnamed       unused   input  active-high 
            line  62:      unnamed       unused   input  active-high 
            line  63:      unnamed       unused   input  active-high 
            line  64:      unnamed       unused   input  active-high 
            line  65:      unnamed       unused   input  active-high 
            line  66:      unnamed       unused   input  active-high 
            line  67:      unnamed       unused   input  active-high 
            line  68:      unnamed       unused   input  active-high 
            line  69:      unnamed       unused   input  active-high 
            line  70:      unnamed       unused   input  active-high 
            line  71:      unnamed       unused   input  active-high 
            line  72:      unnamed       unused   input  active-high 
            line  73:      unnamed       unused   input  active-high 
            line  74:      unnamed       unused   input  active-high 
            line  75:      unnamed       unused   input  active-high 
            line  76:      unnamed       unused   input  active-high 
            line  77:      unnamed       unused   input  active-high 
            line  78:      unnamed       unused   input  active-high 
            line  79:      unnamed       unused   input  active-high 
            line  80:      unnamed       unused   input  active-high 
            line  81:      unnamed       unused   input  active-high 
            line  82:      unnamed       unused   input  active-high 
            line  83:      unnamed       unused   input  active-high 
            line  84:      unnamed       unused   input  active-high 
            line  85:      unnamed       unused   input  active-high 
            line  86:      unnamed       unused   input  active-high 
            line  87:      unnamed       unused   input  active-high 
    gpiochip3 - 24 lines:
            line   0: "GPIO_CPSW2_RST" unused input active-high 
            line   1: "GPIO_CPSW1_RST" unused input active-high 
            line   2: "PRU_DETECT"       unused   input  active-high 
            line   3: "MMC1_SD_EN" "regulator-3" output active-high [used]
            line   4: "VPP_LDO_EN"       unused   input  active-high 
            line   5: "EXP_PS_3V3_En" unused input active-high 
            line   6: "EXP_PS_5V0_En" unused input active-high 
            line   7: "EXP_HAT_DETECT" unused input active-high 
            line   8: "GPIO_AUD_RSTn" unused input active-high 
            line   9: "GPIO_eMMC_RSTn" unused input active-high 
            line  10: "UART1_FET_BUF_EN" unused input active-high 
            line  11:   "WL_LT_EN" "regulator-5" output active-low [used]
            line  12: "GPIO_HDMI_RSTn" unused input active-high 
            line  13:  "CSI_GPIO1"       unused   input  active-high 
            line  14:  "CSI_GPIO2"       unused   input  active-high 
            line  15: "PRU_3V3_EN"       unused   input  active-high 
            line  16:  "HDMI_INTn"  "interrupt"   input  active-high [used]
            line  17: "TEST_GPIO2"       unused   input  active-high 
            line  18: "MCASP1_FET_EN" unused input active-high 
            line  19: "MCASP1_BUF_BT_EN" unused input active-high 
            line  20: "MCASP1_FET_SEL" unused input active-high 
            line  21: "UART1_FET_SEL" unused input active-high 
            line  22:     "TSINT#"       unused   input  active-high 
            line  23: "IO_EXP_TEST_LED" unused input active-high 
    

    231a232,245
    > 	led2 {
    > 		compatible = "gpio-leds";
    > 		pinctrl-names = "default";
    > 		pinctrl-0 = <&usr_led_pins_exp_test>;
    > 
    > 		led-0 {
    > 			label = "test";
    > 			gpios = <&exp1 44 GPIO_ACTIVE_HIGH>;
    > 			linux,default-trigger = "heartbeat";
    > 			function = LED_FUNCTION_HEARTBEAT;
    > 			default-state = "on";
    > 		};
    > 	};
    > 
    332a347,352
    > 		>;
    > 	};
    > 
    > 	usr_led_pins_exp_test: usr-led-pins-exp-test {
    > 		pinctrl-single,pins = <
    > 			AM62X_IOPAD(0x00ac, PIN_OUTPUT, 7) /* (L21) GPMC0_CSn1.GPIO0_42 */
    

  • The user expansion connector pin 13 is GPIO0_42, but

    >             gpios = <&exp1 44 GPIO_ACTIVE_HIGH>;

    Where does this "exp1 44" come from?

    I think it should be "gpio0 42" to match the gpio pin name you set in the pinmux, isn't it?

  • Is there any command that can be used to use user expansion pin 13 without modifying any device tree?

  • I have changed from
    >             gpios = <&exp1 44 GPIO_ACTIVE_HIGH>;

    to

    > gpios = <&main_gpio0 42 GPIO_ACTIVE_HIGH>;

    but LEDs still not lighting up.

  • Have you tried the instructions in the link below to manipulate the GPIO and the LED?

    https://dev.ti.com/tirex/explore/node?node=A__ACvGZCy-OoTBFobwK32Img__linux_academy_am62x__XaWts8R__LATEST&placeholder=true

    Have you probed the GPIO pin if it is high as intended?

  • Thanks. It's working now.