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.

AM62A7: Unable to Wakeup the Board from deep sleep.

Part Number: AM62A7

Tool/software:

Hello,

I am currently using the AM62A7 board for implementing deep sleep functionality. To put the system into deep sleep, I am using the following command:

echo mem > /sys/power/state

For waking up the system, I am using GPIO 40 on gpiochip1, which is connected to a PIR sensor. However, I’ve observed that the board sometimes fails to wake up even after the PIR sensor detects motion and the GPIO is triggered.

Could you please suggest any possible solutions or required configurations to ensure reliable wake-up from deep sleep via GPIO?

Best regards,
Harsh Shende

  • Hi Harsh,

    What Linux SDK version are you using?

    How was this pin configured to wakeup in the device tree?

    Best Regards,

    Anshu

  • Hi Anshu,
    I'm using edgeai 9.2 build.
    Below I'm attaching the device tree I'm using for my application
    kindly review it
    for your reference in this way I'm using this

    &main_pmx0 {
    	main_uart0_pins_default: main-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1c8, PIN_INPUT_PULLUP, 0) /* (E14) UART0_RXD */
    			AM62AX_IOPAD(0x1cc, PIN_OUTPUT_PULLUP, 0) /* (D15) UART0_TXD */
    		>;
    	};
    	
    	/PIR handled seperately to not affect poweroff sequence
    	pir_keys: pir-keys {
    	compatible = "gpio-keys";
    	pinctrl-names = "default";
    	autorepeat;
    
    	pir-gpio {
    			label = "PIR";
    			linux,code = <KEY_X>;
    			interrupts-extended = <&main_gpio0 40 IRQ_TYPE_EDGE_RISING>,   //mcu_gpio0 12 
    				<&main_pmx0 0x0a4>;
    			interrupt-names = "irq", "wakeup";
    		};
    	};


    regards,

    Harsh shende

  • // SPDX-License-Identifier: GPL-2.0
    /*
     * AM62A SK: https://www.ti.com/lit/zip/sprr459
     *
     * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
     */
    
    /dts-v1/;
    
    #include <dt-bindings/leds/common.h>
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/net/ti-dp83867.h>
    #include "k3-am62a7.dtsi"
    
    #include <dt-bindings/pwm/pwm.h>
    
    / {
    	compatible =  "ti,am62a7-sk", "ti,am62a7";
    	model = "Texas Instruments AM62A7 SK";
    
    	aliases {
    		serial0 = &mcu_uart0;
    		serial1 = &wkup_uart0;
    		serial2 = &main_uart0;
    		serial3 = &main_uart1;
    		serial4 = &main_uart5;
    		serial5 = &main_uart6;
    		mmc0 = &sdhci0;
    		mmc1 = &sdhci1;
    		mmc2 = &sdhci2;
    	};
    
    	chosen {
    		stdout-path = "serial2:115200n8";
    		bootargs = "console=ttyS2,115200 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait fsck.mode=skip sysrq_always_enabled";
    	};
    
    	memory@80000000 {
    		device_type = "memory";
    		/* 4G RAM */
    		reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
    		      <0x00000008 0x80000000 0x00000000 0x80000000>;
    	};
    
    	battery: battery {
    		compatible = "simple-battery";
    		// NEEDS TO CHECK
    		constant-charge-current-max-microamp 	= <2500000>;  // 5 A > I > 0.05 A   //9 A to for body but ic support only 5ASS
    		constant-charge-voltage-max-microvolt 	= <4200000>;  // 18.8 > V > 3 V  //4.2 for 1S bodycam
    		precharge-current-microamp 		= <180000>;
    		charge-term-current-microamp 	= <180000>;
        };
    
    	dma_buf_phys {
    		compatible = "ti,dma-buf-phys";
    	};
    
    	reserved-memory {
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		/* global cma region */
    		linux,cma {
    			compatible = "shared-dma-pool";
    			reusable;
    			size = <0x00 0x24000000>;
    			alloc-ranges = <0x00 0xc0000000 0x00 0x24000000>;
    			linux,cma-default;
    		};
    
    		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;
    		};
    
    		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9c800000 0x00 0x100000>;
    			no-map;
    		};
    
    		wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9c900000 0x00 0x01e00000>;
    			no-map;
    		};
    
    		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@9b800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9b800000 0x00 0x100000>;
    			no-map;
    		};
    
    		mcu_r5fss0_core0_memory_region: r5f-dma-memory@9b900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9b900000 0x00 0x0f00000>;
    			no-map;
    		};
    
    		c7x_0_dma_memory_region: c7x-dma-memory@99800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x99800000 0x00 0x100000>;
    			no-map;
    		};
    
    		c7x_0_memory_region: c7x-memory@99900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x99900000 0x00 0x01efffff>;
    			no-map;
    		};
    
    		edgeai_rtos_ipc_memory_region: edgeai-rtos-ipc-memory-region {
    			reg = <0x00 0xa0000000 0x00 0x01000000>;
    			no-map;
    		};
    
    		edgeai_memory_region: edgeai-dma-memory@a1000000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0xa1000000 0x00 0x02000000>;
    			no-map;
    		};
    
    		edgeai_shared_region: edgeai_shared-memories {
    			compatible = "dma-heap-carveout";
    			reg = <0x00 0xa3000000 0x00 0x0b000000>;
    		};
    
    		edgeai_core_heaps: edgeai-core-heap-memory@ae000000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0xae000000 0x00 0x12000000>;
    			no-map;
    		};
    	};
    
    	vmain_pd: regulator-0 {
    		/* TPS25750 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 TPS63070 */
    		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_main: regulator-2 {
    		/* output of LM5141-Q1 */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_3v3_main";
    		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;
    	};
    
    	vcc_3v3_sys: regulator-4 {
    		/* output of TPS222965DSGT */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_3v3_sys";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		vin-supply = <&vcc_3v3_main>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vddshv_sdio: regulator-5 {
    		compatible = "regulator-gpio";
    		regulator-name = "vddshv_sdio";
    		pinctrl-names = "default";
    		pinctrl-0 = <&vddshv_sdio_pins_default>;
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		vin-supply = <&ldo1>;
    		gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
    		states = <1800000 0x0>,
    			 <3300000 0x1>;
    	};
    
    	wlan_en: regulator-7 {
    		compatible = "regulator-fixed";
    		regulator-name = "wlan_en";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <1800000>;
    		vin-supply = <&vcc_3v3_main>;
    		enable-active-high;
    		gpios = <&exp1 17 GPIO_ACTIVE_HIGH>;
    		pinctrl-names = "default";
    	};
    
    	leds {
    		compatible = "gpio-leds";
    		pinctrl-names = "default";
    		pinctrl-0 = <&peripheral_enable_pins_default>;
    
    		motor-drive-1 {
    			label = "motor-drive-1";
    			gpios = <&main_gpio1 9 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		motor-drive-2 {
    			label = "motor-drive-2";
    			gpios = <&main_gpio1 11 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		motor-drive-sleep {
    			label = "motor-drive-sleep";
    			gpios = <&main_gpio1 22 GPIO_ACTIVE_LOW>;
    			default-state = "on";
          		retain-state-suspended;
    		};
    
    		backlight {
    			label = "backlight";
    			gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
    			default-state = "on";
    		};
    
    		vibration {
    			label = "vibration";
    			gpios = <&exp1 3 GPIO_ACTIVE_LOW>;
    			default-state = "off";
          		retain-state-suspended;
    		};
    
    		// audio_l {
    		// 	label = "audio_l";
    		// 	gpios = <&exp1 12 GPIO_ACTIVE_HIGH>;
    		// 	default-state = "off";
    		// };
    
    		// audio_r {
    		// 	label = "audio_r";
    		// 	gpios = <&exp1 11 GPIO_ACTIVE_HIGH>;
    		// 	default-state = "off";
    		// };
    
    		// wifi {
    		// 	label = "wifi";
    		// 	gpios = <&exp1 2 GPIO_ACTIVE_HIGH>;
    		// 	default-state = "on";
    		// };
    
    		sdcard {
    			label = "sdcard";
    			gpios = <&exp1 23 GPIO_ACTIVE_HIGH>;
    			default-state = "on";
    			retain-state-suspended;
    		};
    
    		// emmc {
    		// 	label = "emmc";
    		// 	gpios = <&exp1 10 GPIO_ACTIVE_HIGH>;
    		// 	default-state = "off";
    		// 	retain-state-suspended;
    		// };
    
    		gps {
    			label = "gps";
    			gpios = <&exp1 20 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    
    		lte {
    			label = "lte";
    			gpios = <&main_gpio0 12 GPIO_ACTIVE_LOW>;
    			default-state = "on";
    			retain-state-suspended;
    		};
    
    		ir-enable {
    			label = "ir-enable";
    			gpios = <&exp1 7 GPIO_ACTIVE_LOW>;
    			default-state = "off";
    		};
    
    		power-kill {
    			label = "power-kill";
    			gpios = <&main_gpio1 50 GPIO_ACTIVE_HIGH>;
    			default-state = "on";
    			retain-state-suspended;
    		};
    	};
    
    	trailcam_keys: trailcam-keys {
    		compatible = "gpio-keys";
    		autorepeat;
    		pinctrl-names = "default";
    		pinctrl-0 = <&keypad_pins_default>;
    
    		switch-right {
    			label = "Key-Right";
    			linux,code = <KEY_RIGHT>;
    			gpios = <&main_gpio0 39 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 39 IRQ_TYPE_EDGE_RISING>,
    				<&main_pmx0 0x0a0>;
    			interrupt-names = "irq", "wakeup";
    		};
    
    		switch-left {
    			label = "Key-Left";
    			linux,code = <KEY_LEFT>;
    			gpios = <&main_gpio0 41 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 41 IRQ_TYPE_EDGE_RISING>,
    				<&main_pmx0 0x0a8>;
    			interrupt-names = "irq", "wakeup";
    		};
    
    		switch-up {
    			label = "Key-Up";
    			linux,code = <KEY_UP>;
    			gpios = <&main_gpio0 33 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 33 IRQ_TYPE_EDGE_RISING>,
    				<&main_pmx0 0x088>;
    			interrupt-names = "irq", "wakeup";
    		};
    
    		switch-down {
    			label = "Key-Down";
    			linux,code = <KEY_DOWN>;
    			gpios = <&main_gpio1 10 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio1 10 IRQ_TYPE_EDGE_RISING>,
    				<&main_pmx0 0x1a0>;
    			interrupt-names = "irq", "wakeup";
    		};
    
    		switch-enter {
    			label = "Key-Enter";
    			linux,code = <KEY_ENTER>;
    			gpios = <&main_gpio0 42 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 42 IRQ_TYPE_EDGE_RISING>,
    				<&main_pmx0 0x0ac>;
    			interrupt-names = "irq", "wakeup";
    		};
    
    		switch-escape {
    			label = "Key-Escape";
    			linux,code = <KEY_ESC>;
    			gpios = <&main_gpio0 36 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 36 IRQ_TYPE_EDGE_RISING>,
    				<&main_pmx0 0x094>;
    			interrupt-names = "irq", "wakeup";
    		};
    
    		switch-super {
    			label = "Key-Super";
    			linux,code = <KEY_LEFTMETA>;
    			gpios = <&main_gpio0 38 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 38 IRQ_TYPE_EDGE_RISING>,
    				<&main_pmx0 0x09c>;
    			interrupt-names = "irq", "wakeup";
    		};
    
    		switch-power {
    			label = "Key-Power";
    			linux,code = <KEY_P>;
    			gpios = <&exp1 6 GPIO_ACTIVE_LOW>;
    		};
    
    		// Key I is used to raise interrupt for the GUI during poweroff.
    		// For a dummy key to work, You have to define a GPIO for it.
    		// In this case, AUD_SHT_SDL# is used as a fake GPIO as it is NC in the design.
    		switch-interrupt {
    			label = "Key-Interrupt";
    			linux,code = <KEY_I>;
    			gpios = <&exp1 12 GPIO_ACTIVE_HIGH>;
    		};
    
    		// pir-gpio {
    		// 	label = "PIR";
    		// 	linux,code = <KEY_X>;
    		// 	interrupts-extended = <&main_gpio0 40 IRQ_TYPE_EDGE_RISING>,
    		// 		<&main_pmx0 0x0a4>;
    		// 	interrupt-names = "irq", "wakeup";
    		// };
    
    		ring-indicator {
    			label = "Ring Indicator";
    			linux,code = <KEY_R>;
    			interrupts-extended = <&main_gpio1 15 IRQ_TYPE_EDGE_RISING>,
    				<&main_pmx0 0x1b4>;
    			interrupt-names = "irq", "wakeup";
    		};
    	};
    	
    	//PIR handled seperately to not affect poweroff sequence
    	pir_keys: pir-keys {
    	compatible = "gpio-keys";
    	pinctrl-names = "default";
    	autorepeat;
    
    	pir-gpio {
    			label = "PIR";
    			linux,code = <KEY_X>;
    			interrupts-extended = <&main_gpio0 40 IRQ_TYPE_EDGE_RISING>,   //mcu_gpio0 12 
    				<&main_pmx0 0x0a4>;
    			interrupt-names = "irq", "wakeup";
    		};
    	};
    
    	backlight {
    		compatible = "pwm-backlight";
    		pwms = <&ecap0 0 1000000 PWM_POLARITY_INVERTED>;
    		brightness-levels = <100 100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0>;
    		default-brightness-level = <1>;
    	};
    }; 
    
    &main_pmx0 {
    	main_uart0_pins_default: main-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1c8, PIN_INPUT_PULLUP, 0) /* (E14) UART0_RXD */
    			AM62AX_IOPAD(0x1cc, PIN_OUTPUT_PULLUP, 0) /* (D15) UART0_TXD */
    		>;
    	};
    
    	main_uart1_pins_default: main-uart1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1ac, PIN_INPUT_PULLUP, 2) /* (B21) MCASP0_AFSR.UART1_RXD */
    			AM62AX_IOPAD(0x1b0, PIN_OUTPUT_PULLUP, 2) /* (A21) MCASP0_ACLKR.UART1_TXD */
    		>;
    	};
    
    	main_uart5_pins_default: main-uart5-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x034, PIN_INPUT, 5) /* (K20) OSPI0_CSn2.UART5_RXD */
    			AM62AX_IOPAD(0x038, PIN_OUTPUT, 5) /* (G20) OSPI0_CSn3.UART5_TXD */
    			AM62AX_IOPAD(0x008, PIN_INPUT, 5) /* (L21) OSPI0_DQS.UART5_CTSn */
    			AM62AX_IOPAD(0x004, PIN_OUTPUT, 5) /* (K22) OSPI0_LBCLKO.UART5_RTSn */
    		>;
    	};
    
    	main_uart6_pins_default: main-uart6-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x194, PIN_INPUT, 3) /* (C19) MCASP0_AXR3.UART6_RXD */
    			AM62AX_IOPAD(0x198, PIN_OUTPUT, 3) /* (B19) MCASP0_AXR2.UART6_TXD */
    		>;
    	};
    
    	main_i2c0_pins_default: main-i2c0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (D17) I2C0_SCL */
    			AM62AX_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (E16) I2C0_SDA */
    		>;
    	};
    
    	main_i2c1_pins_default: main-i2c1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (C17) I2C1_SCL */
    			AM62AX_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (E17) I2C1_SDA */
    		>;
    	};
    
    	main_i2c2_pins_default: main-i2c2-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (M22) GPMC0_CSn2.I2C2_SCL */
    			AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (M20) GPMC0_CSn3.I2C2_SDA */
    		>;
    	};
    
    	main_mmc1_pins_default: main-mmc1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
    			AM62AX_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
    			AM62AX_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
    			AM62AX_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
    			AM62AX_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
    			AM62AX_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */
    			AM62AX_IOPAD(0x240, PIN_INPUT, 0) /* (D17) MMC1_SDCD */
    		>;
    	};
    
    	main_spi0_pins_default: main-spi0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1bc, PIN_OUTPUT, 0)  /* (A17) SPI0_CLK */
    			AM62AX_IOPAD(0x1c0, PIN_INPUT, 0) /* (B15) SPI0_D0  */	/* MISO */
    			AM62AX_IOPAD(0x1c4, PIN_OUTPUT, 0)  /* (E15) SPI0_D1  */	/* MOSI */
    		    AM62AX_IOPAD(0x1b8, PIN_OUTPUT, 0) /* (C16) SPI0_CS1 */
    		>;
    	};
    
    	keypad_pins_default: keypad-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x088, PIN_INPUT_PULLUP, 7) /* (L17) GPMC0_OEn_REn.GPIO0_33 */
    			AM62AX_IOPAD(0x094, PIN_INPUT_PULLUP, 7) /* (M18) GPMC0_BE1n.GPIO0_36 */
    			AM62AX_IOPAD(0x09c, PIN_INPUT_PULLUP, 7) /* (R17) GPMC0_WAIT1.GPIO0_38 */
    			AM62AX_IOPAD(0x0a0, PIN_INPUT_PULLUP, 7) /* (K17) GPMC0_WPn.GPIO0_39 */
    			AM62AX_IOPAD(0x0a8, PIN_INPUT_PULLUP, 7) /* (M19) GPMC0_CSn0.GPIO0_41 */
    			AM62AX_IOPAD(0x0ac, PIN_INPUT_PULLUP, 7) /* (M21) GPMC0_CSn1.GPIO0_42 */
    			AM62AX_IOPAD(0x1a0, PIN_INPUT_PULLUP, 7) /* (B20) MCASP0_AXR0.GPIO1_10 */
    			AM62AX_IOPAD(0x0a4, PIN_INPUT_PULLUP, 7) /* (K18) GPMC0_DIR.GPIO0_40 */
    			AM62AX_IOPAD(0x1b4, PIN_INPUT_PULLUP, 7) /* (D16) SPI0_CS0.GPIO1_15 */
    		>;
    	};
    
    	ecap0_pins_default: ecap0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1f0, PIN_OUTPUT_PULLDOWN, 8) /* (B16) EXT_REFCLK1.ECAP0_IN_APWM_OUT */
    		>;
    	};
    
    	peripheral_enable_pins_default: peripheral-enable-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x19c, PIN_INPUT, 7) /* (B18) MCASP0_AXR1.GPIO1_9 */
    			AM62AX_IOPAD(0x1a4, PIN_INPUT, 7) /* (A19) MCASP0_ACLKX.GPIO1_11 */
    			AM62AX_IOPAD(0x1d0, PIN_INPUT, 7) /* (F14) UART0_CTSn.GPIO1_22 */
    			AM62AX_IOPAD(0x030, PIN_INPUT, 7) /* (G19) OSPI0_CSn1.GPIO0_12 */
    			AM62AX_IOPAD(0x254, PIN_OUTPUT, 7) /* (C20) USB0_DRVVBUS.GPIO1_50 */
    		>;
    	};
    
    	main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x01d4, PIN_INPUT_PULLUP, 7) /* (C15) UART0_RTSn.GPIO1_23 */
    		>;
    	};
    
    	main_dss0_pins_default: main-dss0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x100, PIN_OUTPUT, 0) /* (V17) VOUT0_VSYNC */
    			AM62AX_IOPAD(0x0f8, PIN_OUTPUT, 0) /* (T18) VOUT0_HSYNC */
    			AM62AX_IOPAD(0x104, PIN_OUTPUT, 0) /* (AA22) VOUT0_PCLK */
    			AM62AX_IOPAD(0x0fc, PIN_OUTPUT, 0) /* (U17) VOUT0_DE */
    			AM62AX_IOPAD(0x0b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */
    			AM62AX_IOPAD(0x0bc, PIN_OUTPUT, 0) /* (U21) VOUT0_DATA1 */
    			AM62AX_IOPAD(0x0c0, PIN_OUTPUT, 0) /* (U20) VOUT0_DATA2 */
    			AM62AX_IOPAD(0x0c4, PIN_OUTPUT, 0) /* (U19) VOUT0_DATA3 */
    			AM62AX_IOPAD(0x0c8, PIN_OUTPUT, 0) /* (T19) VOUT0_DATA4 */
    			AM62AX_IOPAD(0x0cc, PIN_OUTPUT, 0) /* (U18) VOUT0_DATA5 */
    			AM62AX_IOPAD(0x0d0, PIN_OUTPUT, 0) /* (V22) VOUT0_DATA6 */
    			AM62AX_IOPAD(0x0d4, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA7 */
    			AM62AX_IOPAD(0x0d8, PIN_OUTPUT, 0) /* (V19) VOUT0_DATA8 */
    			AM62AX_IOPAD(0x0dc, PIN_OUTPUT, 0) /* (V18) VOUT0_DATA9 */
    			AM62AX_IOPAD(0x0e0, PIN_OUTPUT, 0) /* (W22) VOUT0_DATA10 */
    			AM62AX_IOPAD(0x0e4, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA11 */
    			AM62AX_IOPAD(0x0e8, PIN_OUTPUT, 0) /* (W20) VOUT0_DATA12 */
    			AM62AX_IOPAD(0x0ec, PIN_OUTPUT, 0) /* (W19) VOUT0_DATA13 */
    			AM62AX_IOPAD(0x0f0, PIN_OUTPUT, 0) /* (Y21) VOUT0_DATA14 */
    			AM62AX_IOPAD(0x0f4, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA15 */
    			AM62AX_IOPAD(0x05c, PIN_OUTPUT, 1) /* (P22) GPMC0_AD8.VOUT0_DATA16 */
    			AM62AX_IOPAD(0x060, PIN_OUTPUT, 1) /* (R19) GPMC0_AD9.VOUT0_DATA17 */
    		>;
    	};
    
    	main_mmc0_pins_default: main-mmc0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
    			AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLKLB */
    			AM62AX_IOPAD(0x21c, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
    			AM62AX_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
    			AM62AX_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
    			AM62AX_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
    			AM62AX_IOPAD(0x208, PIN_INPUT_PULLUP, 0) /* (Y4) MMC0_DAT3 */
    			AM62AX_IOPAD(0x204, PIN_INPUT_PULLUP, 0) /* (AB2) MMC0_DAT4 */
    			AM62AX_IOPAD(0x200, PIN_INPUT_PULLUP, 0) /* (AC1) MMC0_DAT5 */
    			AM62AX_IOPAD(0x1fc, PIN_INPUT_PULLUP, 0) /* (AD2) MMC0_DAT6 */
    			AM62AX_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
    		>;
    	};
    
    	main_mmc2_pins_default: main-mmc2-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x120, PIN_INPUT, 0) /* (G22) MMC2_CMD */
    			AM62AX_IOPAD(0x118, PIN_INPUT, 0) /* (H22) MMC2_CLK */
    			AM62AX_IOPAD(0x114, PIN_INPUT, 0) /* (E20) MMC2_DAT0 */
    			AM62AX_IOPAD(0x110, PIN_INPUT, 0) /* (F21) MMC2_DAT1 */
    			AM62AX_IOPAD(0x10c, PIN_INPUT, 0) /* (F20) MMC2_DAT2 */
    			AM62AX_IOPAD(0x108, PIN_INPUT, 0) /* (G21) MMC2_DAT3 */
    			AM62AX_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */
    		>;
    	};
    
    	main_wlirq_pins_default: main-wlirq-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x128, PIN_INPUT, 7) /* (E21) MMC2_SDWP.GPIO0_72 */
    		>;
    		
    	};
    
    	vddshv_sdio_pins_default: vddshv-sdio-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x07c, PIN_OUTPUT, 7) /* (M19) GPMC0_CLK.GPIO0_31 */
    		>;
    	};
    
    	// csi_gpio_pins_default: csi-gpio-pins-default {
    	// 	pinctrl-single,pins = <
    	// 		AM62AX_IOPAD(0x00c, PIN_INPUT, 7) /* (J21) OSPI0_D0.GPIO0_3 */
    	// 		AM62AX_IOPAD(0x010, PIN_INPUT, 7) /* (J18) OSPI0_D1.GPIO0_4 */
    	// 	>;
    	// };
    
    };
    
    &mcu_pmx0 {
    	status = "okay";
    
    	pmic_irq_pins_default: pmic-irq-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_MCU_IOPAD(0x000, PIN_INPUT, 7) /* (E11) MCU_GPIO0_0 */
    		>;
    	};
    
    	mcu_uart0_pins_default: mcu-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_MCU_IOPAD(0x01c, PIN_INPUT, 0) /* (B11) MCU_UART0_CTSn */
    			AM62AX_MCU_IOPAD(0x020, PIN_OUTPUT, 0) /* (D10) MCU_UART0_RTSn */
    			AM62AX_MCU_IOPAD(0x014, PIN_INPUT, 0) /* (D8) MCU_UART0_RXD */
    			AM62AX_MCU_IOPAD(0x018, PIN_OUTPUT_PULLUP, 0) /* (F8) MCU_UART0_TXD */
    		>;
    	};
    
    	wkup_uart0_pins_default: wkup-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (C9) WKUP_UART0_RXD */
    			AM62AX_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (E9) WKUP_UART0_TXD */
    		>;
    	};
    };
    
    &mcu_gpio0 {
    	status = "okay";
    };
    
    &main_i2c0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c0_pins_default>;
    	clock-frequency = <400000>;
    
    	// PD-CONTROLLER @ 21
    	// power-on only a charger is connected
    
    	tps659312: pmic@48 {
    		compatible = "ti,tps6593-q1";
    		reg = <0x48>;
    		ti,primary-pmic;
    		system-power-controller;
    
    		gpio-controller;
    		#gpio-cells = <2>;
    
    		pinctrl-names = "default";
    		pinctrl-0 = <&pmic_irq_pins_default>;
    		interrupt-parent = <&mcu_gpio0>;
    		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
    
    		buck123-supply = <&vcc_3v3_sys>;
    		buck4-supply = <&vcc_3v3_sys>;
    		buck5-supply = <&vcc_3v3_sys>;
    		ldo1-supply = <&vcc_3v3_sys>;
    		ldo2-supply = <&vcc_3v3_sys>;
    		ldo3-supply = <&buck5>;
    		ldo4-supply = <&vcc_3v3_sys>;
    
    		regulators {
    			buck123: buck123 {
    				regulator-name = "vcc_core";
    				regulator-min-microvolt = <715000>;
    				regulator-max-microvolt = <895000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			buck4: buck4 {
    				regulator-name = "vcc_1v1";
    				regulator-min-microvolt = <1100000>;
    				regulator-max-microvolt = <1100000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			buck5: buck5 {
    				regulator-name = "vcc_1v8_sys";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			ldo1: ldo1 {
    				regulator-name = "vddshv5_sdio";
    				regulator-min-microvolt = <3300000>;
    				regulator-max-microvolt = <3300000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			ldo2: ldo2 {
    				regulator-name = "vpp_1v8";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			ldo3: ldo3 {
    				regulator-name = "vcc_0v75";
    				regulator-min-microvolt = <750000>;
    				regulator-max-microvolt = <750000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			ldo4: ldo4 {
    				regulator-name = "vdda_1v8";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    		};
    	};
    
    	// FUEL GUAGE @ 55
    
    	charger@6b {
    		compatible = "ti,bq25790";
    		reg = <0x6b>;
    		monitored-battery 		= <&battery>;
    		ti,watchdog-timeout-ms 			= <40000>;		// 160000 > W > 0
    		input-voltage-limit-microvolt 	= <4500000>;	// 4.5 or 4.7
    		input-current-limit-microamp 	= <3300000>;	// 3300000 > I > 100000
    		status = "okay";
    	};
    };
    
    &main_i2c1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c1_pins_default>;
    	clock-frequency = <400000>;
    
    	exp1: gpio@22 {
    		compatible = "ti,tca6424";
    		reg = <0x22>;
    		gpio-controller;
    		#gpio-cells = <2>;
    
    		interrupt-parent = <&main_gpio1>;
    		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    
    		gpio-line-names = "CSI_GPIO1", 	"CSI_GPIO0",
    				   "SOC_WIFI_PWR", 		"MMC1_HPT_EN",
    				   "EXP_GPIO22", 		"EXP_GPIO24",
    				   "SW_INT", 			"SW_KILL",
    				   "VPP_EN", 			"GPIO_AUD_RSTn",
    				   "GPIO_eMMC_RSTn", 	"AUD_SHT_SDR#",
    				   "AUD_SHT_SDL#", 		"SOC_DISP_EN",
    				   "CPSW_RST", 			"GPOUT",
    				   "DISP_RST", 			"LT_WLAN_SDIO_RST",
    				   "GPS_EXTINT", 		"GPS_RST_N",
    				   "SOC_GPS_ENABLE", 	"MMC1_SDCARD_EN1",
    				   "LT_RTC_SQW", 		"MMC1_SD_EN";
    
    		pinctrl-names = "default";
    		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
    	};
    };
    
    &main_i2c2 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c2_pins_default>;
    	clock-frequency = <100000>;
    
    	#address-cells = <1>;
    	#size-cells = <0>;
    
    	lux-sensor@10{
    		compatible = "vishay,veml7700";
    		reg = <0x10>;
    	};
    
    	temperature-sensor@38 {
            compatible = "aht10";
            reg = <0x38>;
        };
    
    	ap1302: camera@3d {
    		compatible = "tn,tevi-ap1302";
    		reg = <0x3d>;
    		// pinctrl-names = "default";
    		// pinctrl-0 = <&csi_gpio_pins_default>;
    
    		// host-power-gpios 	= <&main_gpio0 3 GPIO_ACTIVE_HIGH>;
    		// reset-gpios 		= <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
    
    		nvmem = <&tevi_ap1302_otp>;
    		nvmem-names = "calib-data";
    		data-lanes = <4>;
    		continuous-clock = <0>;
    		status = "okay";
    
    		port {
    			csi2_cam0: endpoint {
    				remote-endpoint = <&csi2rx0_in_sensor>;
    				clock-lanes = <0>;
    				data-lanes = <1 2 3 4>;
    			};
    		};
    	};
    
    	tevi_ap1302_otp: tevi_ap1302_otp@54 {
    		compatible = "atmel,24c1024";
    		reg = <0x54>;
    		pagesize = <128>;
    		status = "okay";
    	};
    
    	rtc@68{
    		compatible = "dallas,ds1307";
    		reg = <0x68>;
    		#clock-cells = <1>;
    	};
    
    	gyro@6a {
    		compatible = "st,lsm6dsm";
    		reg = <0x6a>;
    	};
    };
    
    &main_spi0{
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_spi0_pins_default>;
    
    	num_cs = <2>;
    	cs-gpios  = <0>,<&main_gpio1 16 GPIO_ACTIVE_LOW>;
    
    	#address-cells = <1>;
    	#size-cells = <0>;
    
    	panel@1 {
    		compatible = "sitronix,st7789v";
    		reg = <1>;
    
    		reset-gpios		= <&exp1 16 GPIO_ACTIVE_LOW>;
    		power-supply	= <&vcc_3v3_sys>;
    
    		spi-max-frequency = <1000000>;
    		spi-cpol;
    		port {
    			panel_in: endpoint {
    				remote-endpoint = <&dpi1_out>;
    			};
    		};
    	};
    };
    
    &sdhci1 {
    	/* SD/MMC */
    	status = "okay";
    	vmmc-supply = <&vdd_mmc1>;
    	vqmmc-supply = <&vddshv_sdio>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc1_pins_default>;
    	disable-wp;
    };
    
    &sdhci2 {
    	status = "okay";
    	vmmc-supply = <&wlan_en>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc2_pins_default>;
    	bus-width = <4>;
    	non-removable;
    	ti,fails-without-test-cd;
    	cap-power-off-card;
    	keep-power-in-suspend;
    	ti,driver-strength-ohm = <50>;
    
    	#address-cells = <1>;
    	#size-cells = <0>;
    	wlcore: wlcore@2 {
    	        status="okay";
    		compatible = "ti,cc33xx";
    		reg = <2>;
    		pinctrl-names = "default";
    		pinctrl-0 = <&main_wlirq_pins_default>;
    		interrupt-parent = <&main_gpio0>;
    		interrupts = <72 IRQ_TYPE_EDGE_RISING>;
    	};
    };
    
    &csi0_port0 {
    	status = "okay";
    
    	csi2rx0_in_sensor: endpoint {
    		remote-endpoint = <&csi2_cam0>;
    		bus-type = <4>; /* CSI2 DPHY. */
    		clock-lanes = <0>;
    		data-lanes = <1 2 3 4>;
    	};
    };
    
    &main_gpio0 {
    	status = "okay";
    };
    
    &main_gpio1 {
    	status = "okay";
    };
    
    &main_gpio_intr {
    	status = "okay";
    };
    
    &main_uart0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart0_pins_default>;
    	interrupts-extended = <&gic500 GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
    			<&main_pmx0 0x1c8>; /* (D14) UART0_RXD PADCONFIG114 */
    	interrupt-names = "irq", "wakeup";
    };
    
    &usbss0 {
    	status = "okay";
    	ti,vbus-divider;
    };
    
    &usb0 {
    	dr_mode = "otg";
    };
    
    &usbss1 {
    	status = "okay";
    };
    
    &usb1 {
    	dr_mode = "host";
    };
    
    &main_uart1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart1_pins_default>;
    };
    
    &main_uart5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart5_pins_default>;
    };
    
    &main_uart6 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart6_pins_default>;
    };
    
    &mcu_uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcu_uart0_pins_default>;
    	status = "okay";
    };
    
    &wkup_uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&wkup_uart0_pins_default>;
    	status = "okay";
    };
    
    &ecap0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&ecap0_pins_default>;
    };
    
    &ti_csi2rx0 {
    	status = "okay";
    };
    
    &dphy0 {
    	status = "okay";
    };
    
    &dss {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_dss0_pins_default>;
    };
    
    &dss_ports {
    	/* VP2: DPI Output */
    	hdmi0_dss: port@0 {
    		reg = <0>;
    
    		dpi1_out: endpoint {
    			remote-endpoint = <&panel_in>;
    		};
    	};
    };
    
    &mailbox0_cluster0 {
    	ti,mbox-num-fifos = <2>;
    	mbox_r5_0: mbox-r5-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &mailbox0_cluster1 {
    	ti,mbox-num-fifos = <2>;
    	mbox_c7x_0: mbox-c7x-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &mailbox0_cluster2 {
    	ti,mbox-num-fifos = <2>;
    	mbox_mcu_r5_0: mbox-mcu_r5-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &c7x_0 {
    	mboxes = <&mailbox0_cluster1 &mbox_c7x_0>;
    	memory-region = <&c7x_0_dma_memory_region>,
    			<&c7x_0_memory_region>;
    };
    
    &wkup_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
    	memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
    		<&wkup_r5fss0_core0_memory_region>;
    };
    
    &mcu_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster2 &mbox_mcu_r5_0>;
    	memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
    			<&mcu_r5fss0_core0_memory_region>;
    };
    
    #define K3_TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x10000 | val)
    
    &sdhci0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc0_pins_default>;
    	disable-wp;
    };
    
    /delete-node/&fss;
    /delete-node/&cpsw3g;
    /delete-node/&timesync_router;
    
    /delete-node/&epwm0;
    /delete-node/&epwm1;
    /delete-node/&epwm2;
    
    /delete-node/&eqep0;
    /delete-node/&eqep1;
    /delete-node/&eqep2;
    
    /delete-node/&ecap1;
    /delete-node/&ecap2;
    
    /delete-node/&main_uart2;
    /delete-node/&main_uart3;
    /delete-node/&main_uart4;
    
    /delete-node/&main_spi1;
    /delete-node/&main_spi2;
    
    /delete-node/&main_i2c3;
    
    /delete-node/&mcasp0;
    /delete-node/&mcasp1;
    /delete-node/&mcasp2;
     
    /delete-node/&main_conf;
     
    /delete-node/&main_timer0;
    /delete-node/&main_timer1;
    /delete-node/&main_timer2;
    /delete-node/&main_timer3;
    /delete-node/&main_timer4;
    /delete-node/&main_timer5;
    /delete-node/&main_timer6;
    /delete-node/&main_timer7;
    /delete-node/&main_mcan0;
    
    //Deleted Nodes
    // WAKEUP RTC
    //delete-node/&wkup_uart0;
    /delete-node/&wkup_i2c0;
    /delete-node/&wkup_rtc0;
    
    // MCU CORE DISABLE
    /delete-node/&mailbox0_cluster1;
    /delete-node/&mailbox0_cluster2;
    /delete-node/&mailbox0_cluster3;
     
    /delete-node/&hwspinlock;
     
    /delete-node/&mcu_r5fss0;
    /delete-node/&mcu_r5fss0_core0_dma_memory_region;
    /delete-node/&mcu_r5fss0_core0_memory_region;
    
    /delete-node/&mcu_spi0;
    /delete-node/&mcu_spi1;
    
    /delete-node/&mcu_timer0;
    /delete-node/&mcu_timer1;
    /delete-node/&mcu_timer2;
    /delete-node/&mcu_timer3;
    
    // DSP
    /delete-node/&c7x_0;
    /delete-node/&c7x_0_dma_memory_region;
    /delete-node/&c7x_0_memory_region;

  • if edgeai 9.2 build does not support deep sleep and wakeup which build supports it . Can you help me

  • Hi Harsh, I am looking into this and will get back to you tomorrow.

    In the meantime, you can look at the documentation for Main GPIO wakeup here: https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_01_00/exports/docs/linux/Foundational_Components/Power_Management/pm_wakeup_sources.html#main-i-o-daisy-chain

    An example of enabling Main GPIO wakeup can be found in the k3-am62x-sk-lpm-wkup-sources.dtso: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-lpm-wkup-sources.dtso?h=10.00.07

    Let me know if any progress is made.

    Best,

    Kendall

  • Hi Kendall,

    We are currently using the AM62A7 processor and had initially implemented wakeup using a daisy-chain I/O method. However, we encountered an issue where the board runs normally for a while but then fails to wake up from deep sleep. It is unclear whether the CPU hangs or enters a non-recoverable state. Our setup includes custom services and scripts to handle application logic. We're using EdgeAI 9.2,.

    Due to the unreliability of the daisy-chain method, we recently switched to using MCU (WKUP) GPIO as the wakeup source. While testing this new method with our application, we noticed the system still sometimes fails to wake up—even when no application is running.

    Could you please confirm if there are any known limitations on the processor or with the EdgeAI build? Any insights or recommended solutions would be greatly appreciated.

    Thanks & regards,
    Harsh Shende

  • Hi Harsh,

    After some further investigation, there is no EdgeAI build that supports any low power mode. 

    If you do not need to use EdgeAI, you can try building and installing Linux and U-Boot. For Linux, use the ti-linux-kernel repository on branch ti-linux-6.12.y. For U-Boot, use the ti-u-boot repository on branch ti-u-boot-2025.01. With this configuration, DeepSleep functionality should be supported. 

    If DeepSleep does not work using the above, you can try removing the TI Linux modules as certain modules might affect DeepSleep functionality.

    ti-linux-kernel repository: git.ti.com/.../

    ti-u-boot repository: git.ti.com/.../

    How to build U-Boot and the Kernel can be found in the SDK documentation under the corresponding section: https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_01_00/exports/docs/linux/Foundational_Components.html

    Let me know if this helps.

    Best,

    Kendall

  • Hi Kendall,
    It is clearly mentioned in the documentation for the 9.2 in power management section about low power modes and from this only I'm successfully able to take my board into deep sleep below I'm attaching link kindly check :-
    https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/09_02_00/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management/pm_low_power_modes.html

    let me tell you my problem once again .
    I'm using Processor SDK Linux for AM62Ax  09_02_00 .Now I'm able to put my board into deep sleep perfectly fine. But when we keep it in sleep for sometime and then try to wake it up from the sleep using pir event which is connected to main_gpio0 40 sometimes that was not waking up. I checked the log using UART and that shows  something cpu_stall logs for your reference I'm also sharing that logs below. I don't know what's happening but this is affecting our functionality and when this happens we need to reboot the board that we don't want please suggest me some solution for this.
    And in above answer you told to remove some plugins and modules can you tell me which modules should i remove ?

    [13343.225539]  do_idle+0x248/0x2c0
    [13343.228763]  cpu_startup_entry+0x38/0x40
    [13343.232678]  secondary_start_kernel+0x11c/0x140
    [13343.237204]  __secondary_switched+0xb0/0xb4
    [13343.241383] ---[ end trace 0000000000000000 ]---
    [13343.821082] omap_i2c 20000000.i2c: controller timed out
    [13349.972903] rcu: INFO: rcu_preempt self-detected stall on CPU
    [13349.978684] rcu: 	0-....: (5344 ticks this GP) idle=4304/0/0x3 softirq=2511677/2511678 fqs=1859
    [13349.987375] 	(t=5250 jiffies g=3162545 q=9527 ncpus=4)
    [13349.992509] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O       6.1.80-ti-g2e423244f8c0 #1
    [13350.001365] Hardware name: Texas Instruments AM62A7 SK (DT)
    [13350.006925] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [13350.013874] pc : _raw_spin_unlock_irqrestore+0xc/0x50
    [13350.018935] lr : vblank_disable_fn+0x84/0xa0 [drm]
    [13350.024006] sp : ffff800008003e30
    [13350.027310] x29: ffff800008003e30 x28: 0000000000000005 x27: 0000000000000020
    [13350.034440] x26: ffff800000c29a60 x25: ffff8000091379c0 x24: ffff00087f8251a8
    [13350.041567] x23: 0000000000000000 x22: ffff000801886c80 x21: ffff000803242000
    [13350.048692] x20: ffff000803242144 x19: 0000000000000000 x18: ffff800000e69000
    [13350.055820] x17: ffff800876847000 x16: ffff800008000000 x15: 000000000000003c
    [13350.062953] x14: ffffffffffffffff x13: 0000000000000001 x12: 000000000000003c
    [13350.070079] x11: 0000000000000901 x10: 0000000000000002 x9 : 0000000000000031
    [13350.077205] x8 : 000000000000002b x7 : ffff800000e695c0 x6 : 0000026cdd9ca857
    [13350.084330] x5 : 03ffffffffffffff x4 : ffff00080014edc0 x3 : 0000000000000000
    [13350.091456] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000803242144
    [13350.098583] Call trace:
    [13350.101023]  _raw_spin_unlock_irqrestore+0xc/0x50
    [13350.105730]  call_timer_fn.constprop.0+0x24/0x80
    [13350.110342]  __run_timers.part.0+0x1f4/0x234
    [13350.114603]  run_timer_softirq+0x3c/0x7c
    [13350.118516]  _stext+0x124/0x28c
    [13350.121649]  ____do_softirq+0x10/0x20
    [13350.125305]  call_on_irq_stack+0x24/0x4c
    [13350.129217]  do_softirq_own_stack+0x1c/0x30
    [13350.133391]  __irq_exit_rcu+0xb4/0xe0
    [13350.137047]  irq_exit_rcu+0x10/0x20
    [13350.140527]  el1_interrupt+0x38/0x70
    [13350.144098]  el1h_64_irq_handler+0x18/0x2c
    [13350.148189]  el1h_64_irq+0x64/0x68
    [13350.151582]  arch_cpu_idle+0x18/0x2c
    [13350.155152]  default_idle_call+0x30/0x6c
    [13350.159070]  do_idle+0x248/0x2c0
    [13350.162297]  cpu_startup_entry+0x34/0x40
    [13350.166212]  kernel_init+0x0/0x130
    [13350.169610]  arch_post_acpi_subsys_init+0x0/0x18
    [13350.174224]  start_kernel+0x650/0x694
    [13350.177881]  __primary_switched+0xbc/0xc4
    [13374.604501] omap_i2c 20020000.i2c: controller timed out
    [13374.609793] rtc-ds1307 2-0068: write error -110
    [13375.660491] omap_i2c 20020000.i2c: controller timed out
    [13375.665780] rtc-ds1307 2-0068: read error -110
    [13376.716458] omap_i2c 20020000.i2c: controller timed out
    [13376.721753] rtc-ds1307 2-0068: write error -110
    [13377.768447] omap_i2c 20020000.i2c: controller timed out
    [13377.773739] rtc-ds1307 2-0068: read error -110
    [13378.824424] omap_i2c 20020000.i2c: controller timed out
    [13378.829720] rtc-ds1307 2-0068: write error -110
    [13379.884412] omap_i2c 20020000.i2c: controller timed out
    [13379.889700] rtc-ds1307 2-0068: read error -110
    [13380.940382] omap_i2c 20020000.i2c: controller timed out
    [13380.945679] rtc-ds1307 2-0068: write error -110
    [13381.992363] omap_i2c 20020000.i2c: controller timed out
    [13381.997659] rtc-ds1307 2-0068: read error -110
    [13383.052343] omap_i2c 20020000.i2c: controller timed out
    [13383.057639] rtc-ds1307 2-0068: write error -110
    [13384.104333] omap_i2c 20020000.i2c: controller timed out
    [13384.109623] rtc-ds1307 2-0068: read error -110
    [13385.164316] omap_i2c 20020000.i2c: controller timed out
    [13385.169611] rtc-ds1307 2-0068: write error -110
    [13386.220289] omap_i2c 20020000.i2c: controller timed out
    [13386.225584] rtc-ds1307 2-0068: read error -110
    [13387.276276] omap_i2c 20020000.i2c: controller timed out
    [13387.281576] rtc-ds1307 2-0068: write error -110
    [13388.328251] omap_i2c 20020000.i2c: controller timed out
    [13388.333550] rtc-ds1307 2-0068: read error -110
    [13389.388230] omap_i2c 20020000.i2c: controller timed out
    [13389.393534] rtc-ds1307 2-0068: write error -110
    [13390.444236] omap_i2c 20020000.i2c: controller timed out
    [13390.449563] rtc-ds1307 2-0068: read error -110
    [13391.500197] omap_i2c 20020000.i2c: controller timed out
    [13391.505504] rtc-ds1307 2-0068: write error -110
    [13392.556177] omap_i2c 20020000.i2c: controller timed out
    [13392.561471] rtc-ds1307 2-0068: read error -110
    [13393.612155] omap_i2c 20020000.i2c: controller timed out
    [13393.617453] rtc-ds1307 2-0068: write error -110
    [13394.664143] omap_i2c 20020000.i2c: controller timed out
    [13394.669440] rtc-ds1307 2-0068: read error -110
    [13395.720175] omap_i2c 20020000.i2c: controller timed out
    [13395.725500] rtc-ds1307 2-0068: write error -110
    [13396.780101] omap_i2c 20020000.i2c: controller timed out
    [13396.785394] rtc-ds1307 2-0068: read error -110
    [13397.832082] omap_i2c 20020000.i2c: controller timed out
    [13397.837376] rtc-ds1307 2-0068: write error -110
    [13398.892068] omap_i2c 20020000.i2c: controller timed out
    [13398.897394] rtc-ds1307 2-0068: read error -110
    [13399.948049] omap_i2c 20020000.i2c: controller timed out
    [13399.953347] rtc-ds1307 2-0068: write error -110
    [13401.004028] omap_i2c 20020000.i2c: controller timed out
    [13401.009316] rtc-ds1307 2-0068: read error -110
    [13402.060007] omap_i2c 20020000.i2c: controller timed out
    [13402.065307] rtc-ds1307 2-0068: write error -110
    [13403.112011] omap_i2c 20020000.i2c: controller timed out
    [13403.117305] rtc-ds1307 2-0068: read error -110
    [13404.171984] omap_i2c 20020000.i2c: controller timed out
    [13404.177279] rtc-ds1307 2-0068: write error -110
    [13405.227964] omap_i2c 20020000.i2c: controller timed out
    [13405.233251] rtc-ds1307 2-0068: read error -110
    [13406.283938] omap_i2c 20020000.i2c: controller timed out
    [13406.289231] rtc-ds1307 2-0068: write error -110
    [13407.339947] omap_i2c 20020000.i2c: controller timed out
    [13407.345237] rtc-ds1307 2-0068: read error -110
    [13408.395890] omap_i2c 20020000.i2c: controller timed out
    [13408.401188] rtc-ds1307 2-0068: write error -110
    [13409.447878] omap_i2c 20020000.i2c: controller timed out
    [13409.453171] rtc-ds1307 2-0068: read error -110
    [13410.507861] omap_i2c 20020000.i2c: controller timed out
    [13410.513157] rtc-ds1307 2-0068: write error -110
    [13411.563842] omap_i2c 20020000.i2c: controller timed out
    [13411.569135] rtc-ds1307 2-0068: read error -110
    [13412.615822] omap_i2c 20020000.i2c: controller timed out
    [13412.621157] rtc-ds1307 2-0068: write error -110
    [13413.187779] rcu: INFO: rcu_preempt self-detected stall on CPU
    [13413.193558] rcu: 	0-....: (21097 ticks this GP) idle=4304/0/0x3 softirq=2511677/2511678 fqs=7353
    [13413.202333] 	(t=21054 jiffies g=3162545 q=17882 ncpus=4)
    [13413.207641] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O       6.1.80-ti-g2e423244f8c0 #1
    [13413.216497] Hardware name: Texas Instruments AM62A7 SK (DT)
    [13413.222057] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [13413.229006] pc : _raw_spin_unlock_irqrestore+0xc/0x50
    [13413.234065] lr : vblank_disable_fn+0x84/0xa0 [drm]
    [13413.239129] sp : ffff800008003e30
    [13413.242433] x29: ffff800008003e30 x28: 0000000000000005 x27: 0000000000000020
    [13413.249563] x26: ffff800000c29a60 x25: ffff8000091379c0 x24: ffff00087f8251a8
    [13413.256688] x23: 0000000000000000 x22: ffff000801886c80 x21: ffff000803242000
    [13413.263813] x20: ffff000803242144 x19: 0000000000000000 x18: ffff800000e69000
    [13413.270940] x17: ffff800876847000 x16: ffff800008000000 x15: 000000000000003c
    [13413.278065] x14: ffffffffffffffff x13: 0000000000000001 x12: 000000000000003c
    [13413.285190] x11: 0000000000000901 x10: 0000000000000002 x9 : 0000000000000031
    [13413.292315] x8 : 000000000000002b x7 : ffff800000e695c0 x6 : 0000026cdd9ca857
    [13413.299440] x5 : 03ffffffffffffff x4 : ffff00080014edc0 x3 : 0000000000000000
    [13413.306565] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000803242144
    [13413.313692] Call trace:



    Thanks & regards
    Harsh

  • Hi Harsh,

    For the modules to remove, try removing the ti_k3_dsp_remoteproc by using the following command:

    modprobe -rf ti_k3_dsp_remoteproc

    If that does not work, could you send a full log starting from:

    echo mem > /sys/power/state

    You can also enter the following command before sending the system to sleep in order to see logs during suspend:

    echo N > /sys/module/printk/parameters/console_suspend

    Best,

    Kendall

  • Hi Kendall,
    I tried removing the modules,
    and put the board in the sleep mode but after some time it hangs(means my board is on but it is not responding to the pir event, I'm using MCU for pir )
    and for logs kindly check the above reply in that i had provided logs.
    Kindly tell me the reason why cpu is stalling when it is in sleep

    Thanks
    Harsh shende

  • Hi Harsh,

    I am going to try to recreate this issue on my side and I will get back to you on Thursday after I have run some tests.

    Best,

    Kendall

  • Hi Kendall,
    I'm waiting for your reply 
    kindly tell me the solution for this problem

    Thanks

  • Hi Harsh,

    When I ran a stress test where the system would continuously go into DeepSleep and be woken up by Main_GPIO0_40, I was able to replicate DeepSleep hanging after 1800 iterations. I did not see any logs where the CPU stalled, however. 

    I am unsure if this bug still exists in Edge AI 10.1, so I will need an additional day to test that. I will get back to you on Monday about the results of that test.

    In the meantime, if you have any pointers on how to test to better replicate your system, please let me know. Additionally, could you run the following command before entering DeepSleep:

    echo N > /sys/module/printk/parameters/console_suspend

    This will may show some additional logs. Then could you send a full log starting from before the entry to DeepSleep?

    Best,

    Kendall

  • Hi Kendall,
    Thank you for testing from your side and sharing the results.

    However, we are still facing the issue — although I am not sure if calling it a "hang" is entirely appropriate. In this state, the system remains powered on, and all voltages are being correctly generated by the PMIC (we verified this by probing).
    Despite that, we are unable to wake up the board, and the UART is also non-functional in this state. The only way to recover is by rebooting the system, which we would prefer to avoid, as we are using it in a standalone setup.

    Additionally, we tested with loglevel=14, expecting it to provide extended logs or maintain UART output even during sleep. I have captured the logs and saved them into a file, which I am attaching here.
    Kindly review the logs and let us know your observations.

    This is log file and I'm also attaching last few logs kindly check
    and I will provide the logs with
    echo N > /sys/module/printk/parameters/console_suspend
    by monday

    [ 1884.260717] ------------[ cut here ]------------
    [ 1884.260735] WARNING: CPU: 0 PID: 406 at drivers/gpio/gpiolib.c:3140 gpiod_set_value+0x5c/0xcc
    [ 1884.260761] Modules linked in: md5 des_generic libdes usb_f_eem g_ether usb_f_rndis u_ether libcomposite v4l2loopback(O) st_lsm6dsx_spi cdc_ether option usb_wwan usbnet usbserial mii cc33xx mac80211 libarc4 xhci_plat_hcd rpmsg_ctrl cfg80211 rfkill rpmsg_char dwc3 cdns_csi2rx panel_sitronix_st7789v cc33xx_sdio crct10dif_ce ti_k3_r5_remoteproc leds_gpio virtio_rpmsg_bus k3_j72xx_bandgap rpmsg_ns e5010_jpeg_enc dwc3_am62 st_lsm6dsx_i2c st_lsm6dsx tevi_ap1302 kfifo_buf v4l2_fwnode tidss at24 drm_dma_helper wave5 veml6030 rtc_ds1307 j721e_csi2rx videobuf2_dma_contig v4l2_mem2mem videobuf2_memops drm_kms_helper videobuf2_v4l2 syscopyarea videobuf2_common cdns_dphy_rx v4l2_async sysfillrect sysimgblt videodev fb_sys_fops mc pwm_tiecap sa2ul spi_omap2_mcspi pwm_bl cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6 [last unloaded: bq25790_charger]
    [ 1884.260977] CPU: 0 PID: 406 Comm: mytest Tainted: G        W  O       6.1.80-ti-g2e423244f8c0 #1
    [ 1884.260985] Hardware name: Texas Instruments AM62A7 SK (DT)
    [ 1884.260991] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [ 1884.260999] pc : gpiod_set_value+0x5c/0xcc
    [ 1884.261007] lr : st7789v_prepare+0x108/0x810 [panel_sitronix_st7789v]
    [ 1884.261024] sp : ffff80000ad73800
    [ 1884.261028] x29: ffff80000ad73800 x28: ffff00080a74aac0 x27: 0000000000000000
    [ 1884.261040] x26: ffff800000e3be68 x25: ffff000804d63880 x24: ffff800000dd18c0
    [ 1884.261052] x23: ffff00080a607e00 x22: 0000000000000066 x21: 0000000000000000
    [ 1884.261063] x20: 0000000000000000 x19: ffff0008012fbe80 x18: 00000000000000ff
    [ 1884.261074] x17: 0000000000000001 x16: ffff800000e3cdf8 x15: 0000000000000203
    [ 1884.261086] x14: 00000000000001c6 x13: 000001aaa84c9b48 x12: 0000000000000000
    [ 1884.261097] x11: 0000000000000000 x10: 00000000000009b0 x9 : ffff80000ad73700
    [ 1884.261108] x8 : ffff00087f825180 x7 : ffff000801af8e00 x6 : 0000000000000000
    [ 1884.261120] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
    [ 1884.261130] x2 : 0000000000000000 x1 : ffff0008012fb100 x0 : 0000000000000001
    [ 1884.261144] Call trace:
    [ 1884.261147]  gpiod_set_value+0x5c/0xcc
    [ 1884.261155]  st7789v_prepare+0x108/0x810 [panel_sitronix_st7789v]
    [ 1884.261168]  drm_panel_prepare+0x28/0x40 [drm]
    [ 1884.261388]  panel_bridge_pre_enable+0x14/0x20 [drm_kms_helper]
    [ 1884.261489]  drm_atomic_bridge_call_pre_enable+0x68/0x80 [drm]
    [ 1884.261646]  drm_atomic_bridge_chain_pre_enable+0x4c/0x14c [drm]
    [ 1884.261802]  drm_atomic_helper_commit_modeset_enables+0x218/0x32c [drm_kms_helper]
    [ 1884.261872]  tidss_atomic_commit_tail+0x48/0x80 [tidss]
    [ 1884.261896]  commit_tail+0xa4/0x190 [drm_kms_helper]
    [ 1884.261966]  drm_atomic_helper_commit+0x16c/0x180 [drm_kms_helper]
    [ 1884.262036]  drm_atomic_commit+0xac/0xf0 [drm]
    [ 1884.262192]  drm_atomic_helper_commit_duplicated_state+0xf0/0x10c [drm_kms_helper]
    [ 1884.262261]  drm_atomic_helper_resume+0x98/0x184 [drm_kms_helper]
    [ 1884.262331]  drm_mode_config_helper_resume+0x24/0x90 [drm_kms_helper]
    [ 1884.262403]  tidss_resume+0x14/0x20 [tidss]
    [ 1884.262423]  __device_resume+0xe0/0x25c
    [ 1884.262435]  dpm_resume+0x9c/0x124
    [ 1884.262444]  dpm_resume_end+0x18/0x30
    [ 1884.262453]  suspend_devices_and_enter+0x1b8/0x4d4
    [ 1884.262462]  pm_suspend+0x1ec/0x264
    [ 1884.262468]  state_store+0x8c/0x110
    [ 1884.262474]  kobj_attr_store+0x18/0x30
    [ 1884.262486]  sysfs_kf_write+0x44/0x54
    [ 1884.262494]  kernfs_fop_write_iter+0x118/0x1b0
    [ 1884.262500]  vfs_write+0x228/0x2b4
    [ 1884.262508]  ksys_write+0x6c/0x100
    [ 1884.262515]  __arm64_sys_write+0x1c/0x30
    [ 1884.262522]  invoke_syscall+0x48/0x114
    [ 1884.262532]  el0_svc_common.constprop.0+0xd4/0xfc
    [ 1884.262540]  do_el0_svc+0x20/0x30
    [ 1884.262547]  el0_svc+0x28/0xa0
    [ 1884.262558]  el0t_64_sync_handler+0xbc/0x140
    [ 1884.262567]  el0t_64_sync+0x18c/0x190
    [ 1884.262575] ---[ end trace 0000000000000000 ]---
    [ 1884.388552] st7789v spi0.1: Unrecognized panel IDs [4294967291]
    [ 1884.518069] wlcore: mac80211 start
    [ 1884.522386] wlcore: mac80211 add interface type 2 mac fe:23:34:d1:08:37
    [ 1884.522412] wlcore: using pre-allocated hw queue base 0
    [ 1884.530157] wlcore: mac80211 config psm off power 0 idle changed 0xffffff9d
    [ 1884.530171] wlcore: mac80211 configure filter, FIF_ALLMULTI = 0
    [ 1884.530659] wlcore: mac80211 conf tx 0
    [ 1884.531280] wlcore: mac80211 conf tx 1
    [ 1884.531899] wlcore: mac80211 conf tx 2
    [ 1884.532522] wlcore: mac80211 conf tx 3
    [ 1884.533147] wlcore: mac80211 bss info role 0 changed 0x20674ff
    [ 1885.625050] OOM killer enabled.
    [ 1885.628210] Restarting tasks ... done.
    [ 1885.635419] random: crng reseeded on system resumption
    [ 1885.656014] PM: suspend exit
    [ 1888.949482] v4l2_get_link_freq: Link frequency estimated using pixel rate: result might be inaccurate
    [ 1888.958858] v4l2_get_link_freq: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver
    [ 1894.418592] wlcore: mac80211 hw scan
    [ 1894.973594] Deferred event dump:00000000: 00000100 000c0017 000000c0 0000002c
    [ 1894.980885] Deferred event dump:00000010: 000000b0 00000000 00000000 00000000
    [ 1894.988389] Deferred event dump:00000020: 00000000 00000000 00000000 00000000
    [ 1894.997264] Deferred event dump:00000030: 00000000 00000000 00000000 00000000
    [ 1902.135113] v4l2_get_link_freq: Link frequency estimated using pixel rate: result might be inaccurate
    [ 1902.144390] v4l2_get_link_freq: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver
    [ 1925.195149] wlcore: mac80211 hw scan
    [ 1925.836352] Deferred event dump:00000000: 00000100 00100015 00070001 00820000
    [ 1925.843684] Deferred event dump:00000010: 24051642 00000102 00000000 00000000
    [ 1925.850946] Deferred event dump:00000020: 00000000 00000000 00000000 00000000
    [ 1925.858196] Deferred event dump:00000030: 00000000 00000000 00000000 00000000
    [ 1926.695938] wlcore: mac80211 hw scan
    [ 1927.310723] Deferred event dump:00000000: 00000100 000c0016 000000c0 0000002c
    [ 1927.317986] Deferred event dump:00000010: 000000b0 00000000 00000000 00000000
    [ 1927.325272] Deferred event dump:00000020: 00000000 00000000 00000000 00000000
    [ 1927.332541] Deferred event dump:00000030: 00000000 00000000 00000000 00000000
    [ 1954.796063] PM: suspend entry (deep)
    [ 1954.817602] Filesystems sync: 0.017 seconds
    [ 1954.825689] Freezing user space processes
    [ 1954.834298] Freezing user space processes completed (elapsed 0.004 seconds)
    [ 1954.841455] OOM killer disabled.
    [ 1954.844762] Freezing remaining freezable tasks
    [ 1954.851615] Freezing remaining freezable tasks completed (elapsed 0.002 seconds)
    [ 1954.859139] printk: Suspending console(s) (use no_console_suspend to debug)
    
    U-Boot SPL 2023.04-ti-gf9b966c67473 (Mar 19 2024 - 20:31:40 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
    am62a_init: board_init_f done
    SPL initial stack usage: 17064 bytes
    am62a_init: spl_boot_device: devstat = 0x43 bootmedia = 0x9 bootindex = 0
    Trying to boot from MMC1
    am62a_init: spl_boot_device: devstat = 0x43 bootmedia = 0x9 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x43 bootmedia = 0x9 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x43 bootmedia = 0x9 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x43 bootmedia = 0x9 bootindex = 0
    Authentication passed
    am62a_init: spl_boot_device: devstat = 0x43 bootmedia = 0x9 bootindex = 0
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
    NOTICE:  BL31: Built : 16:09:05, Feb  9 2024

    trail_25_Apr.log

    Thanks 

  • Hi Kendall
    below im attaching kernel logs which i stored as you mentioned to give the command

    echo N > /sys/module/printk/parameters/console_suspend

    before going into sleep(systemctl suspend)
    kindly check the logs tell me the issue how can i fix this issue so that my system works propery

    Thanks & regards
    Harsh rtc_log_28-4-25_with_ti_log_request.txt

  • Hi Harsh,

    Based on the logs you have sent, it would be worth it to remove any GPIO you are not using since the following warning is showing up for each sleep cycle:

    WARNING: CPU: 0 PID: 406 at drivers/gpio/gpiolib.c:3140 gpiod_set_value+0x5c/0xcc

    Additionally there are errors from the gpio-keys in every sleep cycle:

    gpio-keys trailcam-keys: failed to get gpio state: -16

    These errors look like they can be fixed by fixing the device tree. Fixing these errors could at least help narrow down if that is the problem or not. 

    Also, I looked at the error logs you sent originally again. It looks like there could be a problem with the rtc-ds1307 device. The logs look like there might be an irq not being serviced or a race condition. I would recommend trying your setup without that device if possible to see if the issue is still happening.

    Best,

    Kendall

  • Hi Kendall,

    I tried the previous suggestions, but unfortunately, they didn't work.

    What I did next was switch the PIR connection from the SoC to the MCU. After this change, we tested the setup and it initially worked without any issues. However, during further testing, we noticed that the board occasionally gets stuck for a short time and then reboots on its own without performing any expected action. This has now happened multiple times.

    I'm attaching the device tree file for your reference. Could you please take a look and help us identify what might be causing this issue and how we can resolve it?

    Thanks,
    Harsh

    // SPDX-License-Identifier: GPL-2.0
    /*
    * AM62A SK: https://www.ti.com/lit/zip/sprr459
    *
    * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
    */
    
    /dts-v1/;
    
    #include <dt-bindings/leds/common.h>
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/net/ti-dp83867.h>
    #include "k3-am62a7.dtsi"
    
    #include <dt-bindings/pwm/pwm.h>
    
    / {
    	compatible =  "ti,am62a7-sk", "ti,am62a7";
    	model = "Texas Instruments AM62A7 SK";
    	
    	aliases {
    		serial0 = &mcu_uart0;
    		serial1 = &wkup_uart0;
    		serial2 = &main_uart0;
    		serial3 = &main_uart1;
    		serial4 = &main_uart5;
    		serial5 = &main_uart6;
    		mmc0 = &sdhci0;
    		mmc1 = &sdhci1;
    		mmc2 = &sdhci2;
    	};
    	
    	chosen {
    		stdout-path = "serial2:115200n8";
    		bootargs = "console=ttyS2,115200 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait fsck.mode=skip sysrq_always_enabled";
    	};
    	
    	memory@80000000 {
    		device_type = "memory";
    		/* 4G RAM */
    		reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
    		<0x00000008 0x80000000 0x00000000 0x80000000>;
    	};
    	
    	battery: battery {
    		compatible = "simple-battery";
    		// NEEDS TO CHECK
    		constant-charge-current-max-microamp 	= <2500000>;// 5 A > I > 0.05 A   //9 A to for body but ic support only 5ASS
    		constant-charge-voltage-max-microvolt 	= <4200000>;// 18.8 > V > 3 V  //4.2 for 1S bodycam
    		precharge-current-microamp 		= <180000>;
    		charge-term-current-microamp 	= <180000>;
    	};
    	
    	dma_buf_phys {
    		compatible = "ti,dma-buf-phys";
    	};
    	
    	reserved-memory {
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    		
    		/* global cma region */
    		linux,cma {
    			compatible = "shared-dma-pool";
    			reusable;
    			size = <0x00 0x24000000>;
    			alloc-ranges = <0x00 0xc0000000 0x00 0x24000000>;
    			linux,cma-default;
    		};
    		
    		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;
    		};
    		
    		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9c800000 0x00 0x100000>;
    			no-map;
    		};
    		
    		wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9c900000 0x00 0x01e00000>;
    			no-map;
    		};
    		
    		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@9b800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9b800000 0x00 0x100000>;
    			no-map;
    		};
    		
    		mcu_r5fss0_core0_memory_region: r5f-dma-memory@9b900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9b900000 0x00 0x0f00000>;
    			no-map;
    		};
    		
    		c7x_0_dma_memory_region: c7x-dma-memory@99800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x99800000 0x00 0x100000>;
    			no-map;
    		};
    		
    		c7x_0_memory_region: c7x-memory@99900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x99900000 0x00 0x01efffff>;
    			no-map;
    		};
    		
    		edgeai_rtos_ipc_memory_region: edgeai-rtos-ipc-memory-region {
    			reg = <0x00 0xa0000000 0x00 0x01000000>;
    			no-map;
    		};
    		
    		edgeai_memory_region: edgeai-dma-memory@a1000000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0xa1000000 0x00 0x02000000>;
    			no-map;
    		};
    		
    		edgeai_shared_region: edgeai_shared-memories {
    			compatible = "dma-heap-carveout";
    			reg = <0x00 0xa3000000 0x00 0x0b000000>;
    		};
    		
    		edgeai_core_heaps: edgeai-core-heap-memory@ae000000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0xae000000 0x00 0x12000000>;
    			no-map;
    		};
    	};
    	
    	vmain_pd: regulator-0 {
    		/* TPS25750 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 TPS63070 */
    		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_main: regulator-2 {
    		/* output of LM5141-Q1 */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_3v3_main";
    		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;
    	};
    	
    	vcc_3v3_sys: regulator-4 {
    		/* output of TPS222965DSGT */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_3v3_sys";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		vin-supply = <&vcc_3v3_main>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    	
    	vddshv_sdio: regulator-5 {
    		compatible = "regulator-gpio";
    		regulator-name = "vddshv_sdio";
    		pinctrl-names = "default";
    		pinctrl-0 = <&vddshv_sdio_pins_default>;
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		vin-supply = <&ldo1>;
    		gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
    		states = <1800000 0x0>,
    		<3300000 0x1>;
    	};
    	
    	wlan_en: regulator-7 {
    		compatible = "regulator-fixed";
    		regulator-name = "wlan_en";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <1800000>;
    		vin-supply = <&vcc_3v3_main>;
    		enable-active-high;
    		gpios = <&exp1 17 GPIO_ACTIVE_HIGH>;
    		pinctrl-names = "default";
    	};
    	
    	leds {
    		compatible = "gpio-leds";
    		pinctrl-names = "default";
    		pinctrl-0 = <&peripheral_enable_pins_default>;
    		
    		motor-drive-1 {
    			label = "motor-drive-1";
    			gpios = <&main_gpio1 9 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    		
    		motor-drive-2 {
    			label = "motor-drive-2";
    			gpios = <&main_gpio1 11 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    		
    		motor-drive-sleep {
    			label = "motor-drive-sleep";
    			gpios = <&main_gpio1 22 GPIO_ACTIVE_LOW>;
    			default-state = "on";
    			retain-state-suspended;
    		};
    		
    		backlight {
    			label = "backlight";
    			gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
    			default-state = "on";
    		};
    		
    		vibration {
    			label = "vibration";
    			gpios = <&exp1 3 GPIO_ACTIVE_LOW>;
    			default-state = "off";
    			retain-state-suspended;
    		};
    		
    		// audio_l {
    		// 	label = "audio_l";
    		// 	gpios = <&exp1 12 GPIO_ACTIVE_HIGH>;
    		// 	default-state = "off";
    		// };
    		
    		// audio_r {
    		// 	label = "audio_r";
    		// 	gpios = <&exp1 11 GPIO_ACTIVE_HIGH>;
    		// 	default-state = "off";
    		// };
    		
    		// wifi {
    		// 	label = "wifi";
    		// 	gpios = <&exp1 2 GPIO_ACTIVE_HIGH>;
    		// 	default-state = "on";
    		// };
    		
    		sdcard {
    			label = "sdcard";
    			gpios = <&exp1 23 GPIO_ACTIVE_HIGH>;
    			default-state = "on";
    			retain-state-suspended;
    		};
    		
    		// emmc {
    		// 	label = "emmc";
    		// 	gpios = <&exp1 10 GPIO_ACTIVE_HIGH>;
    		// 	default-state = "off";
    		// 	retain-state-suspended;
    		// };
    		
    		gps {
    			label = "gps";
    			gpios = <&exp1 20 GPIO_ACTIVE_HIGH>;
    			default-state = "off";
    		};
    		
    		lte {
    			label = "lte";
    			gpios = <&main_gpio0 12 GPIO_ACTIVE_LOW>;
    			default-state = "on";
    			retain-state-suspended;
    		};
    		
    		ir-enable {
    			label = "ir-enable";
    			gpios = <&exp1 7 GPIO_ACTIVE_LOW>;
    			default-state = "off";
    		};
    		
    		power-kill {
    			label = "power-kill";
    			gpios = <&main_gpio1 50 GPIO_ACTIVE_HIGH>;
    			default-state = "on";
    			retain-state-suspended;
    		};
    	};
    	
    	trailcam_keys: trailcam-keys {
    		compatible = "gpio-keys";
    		autorepeat;
    		pinctrl-names = "default";
    		pinctrl-0 = <&keypad_pins_default>;
    		
    		switch-right {
    			label = "Key-Right";
    			linux,code = <KEY_RIGHT>;
    			gpios = <&main_gpio0 39 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 39 IRQ_TYPE_EDGE_RISING>,
    			<&main_pmx0 0x0a0>;
    			interrupt-names = "irq", "wakeup";
    		};
    		
    		switch-left {
    			label = "Key-Left";
    			linux,code = <KEY_LEFT>;
    			gpios = <&main_gpio0 41 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 41 IRQ_TYPE_EDGE_RISING>,
    			<&main_pmx0 0x0a8>;
    			interrupt-names = "irq", "wakeup";
    		};
    		
    		switch-up {
    			label = "Key-Up";
    			linux,code = <KEY_UP>;
    			gpios = <&main_gpio0 33 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 33 IRQ_TYPE_EDGE_RISING>,
    			<&main_pmx0 0x088>;
    			interrupt-names = "irq", "wakeup";
    		};
    		
    		switch-down {
    			label = "Key-Down";
    			linux,code = <KEY_DOWN>;
    			gpios = <&main_gpio1 10 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio1 10 IRQ_TYPE_EDGE_RISING>,
    			<&main_pmx0 0x1a0>;
    			interrupt-names = "irq", "wakeup";
    		};
    		
    		switch-enter {
    			label = "Key-Enter";
    			linux,code = <KEY_ENTER>;
    			gpios = <&main_gpio0 42 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 42 IRQ_TYPE_EDGE_RISING>,
    			<&main_pmx0 0x0ac>;
    			interrupt-names = "irq", "wakeup";
    		};
    		
    		switch-escape {
    			label = "Key-Escape";
    			linux,code = <KEY_ESC>;
    			gpios = <&main_gpio0 36 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 36 IRQ_TYPE_EDGE_RISING>,
    			<&main_pmx0 0x094>;
    			interrupt-names = "irq", "wakeup";
    		};
    		
    		switch-super {
    			label = "Key-Super";
    			linux,code = <KEY_LEFTMETA>;
    			gpios = <&main_gpio0 38 GPIO_ACTIVE_LOW>;
    			interrupts-extended = <&main_gpio0 38 IRQ_TYPE_EDGE_RISING>,
    			<&main_pmx0 0x09c>;
    			interrupt-names = "irq", "wakeup";
    		};
    		
    		switch-power {
    			label = "Key-Power";
    			linux,code = <KEY_P>;
    			gpios = <&exp1 6 GPIO_ACTIVE_LOW>;
    		};
    		
    		// Key I is used to raise interrupt for the GUI during poweroff.
    		// For a dummy key to work, You have to define a GPIO for it.
    		// In this case, AUD_SHT_SDL# is used as a fake GPIO as it is NC in the design.
    		switch-interrupt {
    			label = "Key-Interrupt";
    			linux,code = <KEY_I>;
    			gpios = <&exp1 12 GPIO_ACTIVE_HIGH>;
    		};
    		
    		// pir-gpio {
    		// 	label = "PIR";
    		// 	linux,code = <KEY_X>;
    		// 	interrupts-extended = <&main_gpio0 40 IRQ_TYPE_EDGE_RISING>,
    		// 		<&main_pmx0 0x0a4>;
    		// 	interrupt-names = "irq", "wakeup";
    		// };
    		
    		ring-indicator {
    			label = "Ring Indicator";
    			linux,code = <KEY_R>;
    			interrupts-extended = <&main_gpio1 15 IRQ_TYPE_EDGE_RISING>,
    			<&main_pmx0 0x1b4>;
    			interrupt-names = "irq", "wakeup";
    		};
    	};
    	
    	//PIR handled seperately to not affect poweroff sequence
    	pir_keys: pir-keys {
    		compatible = "gpio-keys";
    		pinctrl-names = "default";
    		pinctrl-0 = <&wake_mcugpio1_pins_default>;
    		interrupt-parent = <&mcu_gpio0>;
    		interrupts = <12 IRQ_TYPE_EDGE_RISING>;
    		autorepeat;
    		
    		pir-gpio {
    			label = "MCU_PIR";
    			linux,code = <KEY_X>;
    			interrupts-extended = <&mcu_gpio0 12 IRQ_TYPE_EDGE_RISING>;
    			// <&main_pmx0 0x0a4>;
    			interrupt-names = "irq", "wakeup";
    			wakeup-source;
    		};
    	};
    	
    	backlight {
    		compatible = "pwm-backlight";
    		pwms = <&ecap0 0 1000000 PWM_POLARITY_INVERTED>;
    		brightness-levels = <100 100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0>;
    		default-brightness-level = <1>;
    	};
    };
    
    &main_pmx0 {
    	main_uart0_pins_default: main-uart0-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x1c8, PIN_INPUT_PULLUP, 0) /* (E14) UART0_RXD */
    		AM62AX_IOPAD(0x1cc, PIN_OUTPUT_PULLUP, 0) /* (D15) UART0_TXD */
    		>;
    	};
    	
    	main_uart1_pins_default: main-uart1-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x1ac, PIN_INPUT_PULLUP, 2) /* (B21) MCASP0_AFSR.UART1_RXD */
    		AM62AX_IOPAD(0x1b0, PIN_OUTPUT_PULLUP, 2) /* (A21) MCASP0_ACLKR.UART1_TXD */
    		>;
    	};
    	
    	main_uart5_pins_default: main-uart5-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x034, PIN_INPUT, 5) /* (K20) OSPI0_CSn2.UART5_RXD */
    		AM62AX_IOPAD(0x038, PIN_OUTPUT, 5) /* (G20) OSPI0_CSn3.UART5_TXD */
    		AM62AX_IOPAD(0x008, PIN_INPUT, 5) /* (L21) OSPI0_DQS.UART5_CTSn */
    		AM62AX_IOPAD(0x004, PIN_OUTPUT, 5) /* (K22) OSPI0_LBCLKO.UART5_RTSn */
    		>;
    	};
    	
    	main_uart6_pins_default: main-uart6-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x194, PIN_INPUT, 3) /* (C19) MCASP0_AXR3.UART6_RXD */
    		AM62AX_IOPAD(0x198, PIN_OUTPUT, 3) /* (B19) MCASP0_AXR2.UART6_TXD */
    		>;
    	};
    	
    	main_i2c0_pins_default: main-i2c0-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (D17) I2C0_SCL */
    		AM62AX_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (E16) I2C0_SDA */
    		>;
    	};
    	
    	main_i2c1_pins_default: main-i2c1-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (C17) I2C1_SCL */
    		AM62AX_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (E17) I2C1_SDA */
    		>;
    	};
    	
    	main_i2c2_pins_default: main-i2c2-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (M22) GPMC0_CSn2.I2C2_SCL */
    		AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (M20) GPMC0_CSn3.I2C2_SDA */
    		>;
    	};
    	
    	main_mmc1_pins_default: main-mmc1-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
    		AM62AX_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
    		AM62AX_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
    		AM62AX_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
    		AM62AX_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
    		AM62AX_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */
    		AM62AX_IOPAD(0x240, PIN_INPUT, 0) /* (D17) MMC1_SDCD */
    		>;
    	};
    	
    	main_spi0_pins_default: main-spi0-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x1bc, PIN_OUTPUT, 0)  /* (A17) SPI0_CLK */
    		AM62AX_IOPAD(0x1c0, PIN_INPUT, 0) /* (B15) SPI0_D0  */	/* MISO */
    		AM62AX_IOPAD(0x1c4, PIN_OUTPUT, 0)  /* (E15) SPI0_D1  */	/* MOSI */
    		AM62AX_IOPAD(0x1b8, PIN_OUTPUT, 0) /* (C16) SPI0_CS1 */
    		>;
    	};
    	
    	keypad_pins_default: keypad-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x088, PIN_INPUT_PULLUP, 7) /* (L17) GPMC0_OEn_REn.GPIO0_33 */
    		AM62AX_IOPAD(0x094, PIN_INPUT_PULLUP, 7) /* (M18) GPMC0_BE1n.GPIO0_36 */
    		AM62AX_IOPAD(0x09c, PIN_INPUT_PULLUP, 7) /* (R17) GPMC0_WAIT1.GPIO0_38 */
    		AM62AX_IOPAD(0x0a0, PIN_INPUT_PULLUP, 7) /* (K17) GPMC0_WPn.GPIO0_39 */
    		AM62AX_IOPAD(0x0a8, PIN_INPUT_PULLUP, 7) /* (M19) GPMC0_CSn0.GPIO0_41 */
    		AM62AX_IOPAD(0x0ac, PIN_INPUT_PULLUP, 7) /* (M21) GPMC0_CSn1.GPIO0_42 */
    		AM62AX_IOPAD(0x1a0, PIN_INPUT_PULLUP, 7) /* (B20) MCASP0_AXR0.GPIO1_10 */
    		AM62AX_IOPAD(0x0a4, PIN_INPUT_PULLUP, 7) /* (K18) GPMC0_DIR.GPIO0_40 */
    		AM62AX_IOPAD(0x1b4, PIN_INPUT_PULLUP, 7) /* (D16) SPI0_CS0.GPIO1_15 */
    		>;
    	};
    	
    	ecap0_pins_default: ecap0-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x1f0, PIN_OUTPUT_PULLDOWN, 8) /* (B16) EXT_REFCLK1.ECAP0_IN_APWM_OUT */
    		>;
    	};
    	
    	peripheral_enable_pins_default: peripheral-enable-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x19c, PIN_INPUT, 7) /* (B18) MCASP0_AXR1.GPIO1_9 */
    		AM62AX_IOPAD(0x1a4, PIN_INPUT, 7) /* (A19) MCASP0_ACLKX.GPIO1_11 */
    		AM62AX_IOPAD(0x1d0, PIN_INPUT, 7) /* (F14) UART0_CTSn.GPIO1_22 */
    		AM62AX_IOPAD(0x030, PIN_INPUT, 7) /* (G19) OSPI0_CSn1.GPIO0_12 */
    		AM62AX_IOPAD(0x254, PIN_OUTPUT, 7) /* (C20) USB0_DRVVBUS.GPIO1_50 */
    		>;
    	};
    	
    	main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x01d4, PIN_INPUT_PULLUP, 7) /* (C15) UART0_RTSn.GPIO1_23 */
    		>;
    	};
    	
    	main_dss0_pins_default: main-dss0-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x100, PIN_OUTPUT, 0) /* (V17) VOUT0_VSYNC */
    		AM62AX_IOPAD(0x0f8, PIN_OUTPUT, 0) /* (T18) VOUT0_HSYNC */
    		AM62AX_IOPAD(0x104, PIN_OUTPUT, 0) /* (AA22) VOUT0_PCLK */
    		AM62AX_IOPAD(0x0fc, PIN_OUTPUT, 0) /* (U17) VOUT0_DE */
    		AM62AX_IOPAD(0x0b8, PIN_OUTPUT, 0) /* (U22) VOUT0_DATA0 */
    		AM62AX_IOPAD(0x0bc, PIN_OUTPUT, 0) /* (U21) VOUT0_DATA1 */
    		AM62AX_IOPAD(0x0c0, PIN_OUTPUT, 0) /* (U20) VOUT0_DATA2 */
    		AM62AX_IOPAD(0x0c4, PIN_OUTPUT, 0) /* (U19) VOUT0_DATA3 */
    		AM62AX_IOPAD(0x0c8, PIN_OUTPUT, 0) /* (T19) VOUT0_DATA4 */
    		AM62AX_IOPAD(0x0cc, PIN_OUTPUT, 0) /* (U18) VOUT0_DATA5 */
    		AM62AX_IOPAD(0x0d0, PIN_OUTPUT, 0) /* (V22) VOUT0_DATA6 */
    		AM62AX_IOPAD(0x0d4, PIN_OUTPUT, 0) /* (V21) VOUT0_DATA7 */
    		AM62AX_IOPAD(0x0d8, PIN_OUTPUT, 0) /* (V19) VOUT0_DATA8 */
    		AM62AX_IOPAD(0x0dc, PIN_OUTPUT, 0) /* (V18) VOUT0_DATA9 */
    		AM62AX_IOPAD(0x0e0, PIN_OUTPUT, 0) /* (W22) VOUT0_DATA10 */
    		AM62AX_IOPAD(0x0e4, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA11 */
    		AM62AX_IOPAD(0x0e8, PIN_OUTPUT, 0) /* (W20) VOUT0_DATA12 */
    		AM62AX_IOPAD(0x0ec, PIN_OUTPUT, 0) /* (W19) VOUT0_DATA13 */
    		AM62AX_IOPAD(0x0f0, PIN_OUTPUT, 0) /* (Y21) VOUT0_DATA14 */
    		AM62AX_IOPAD(0x0f4, PIN_OUTPUT, 0) /* (Y22) VOUT0_DATA15 */
    		AM62AX_IOPAD(0x05c, PIN_OUTPUT, 1) /* (P22) GPMC0_AD8.VOUT0_DATA16 */
    		AM62AX_IOPAD(0x060, PIN_OUTPUT, 1) /* (R19) GPMC0_AD9.VOUT0_DATA17 */
    		>;
    	};
    	
    	main_mmc0_pins_default: main-mmc0-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
    		AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLKLB */
    		AM62AX_IOPAD(0x21c, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
    		AM62AX_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
    		AM62AX_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
    		AM62AX_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
    		AM62AX_IOPAD(0x208, PIN_INPUT_PULLUP, 0) /* (Y4) MMC0_DAT3 */
    		AM62AX_IOPAD(0x204, PIN_INPUT_PULLUP, 0) /* (AB2) MMC0_DAT4 */
    		AM62AX_IOPAD(0x200, PIN_INPUT_PULLUP, 0) /* (AC1) MMC0_DAT5 */
    		AM62AX_IOPAD(0x1fc, PIN_INPUT_PULLUP, 0) /* (AD2) MMC0_DAT6 */
    		AM62AX_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
    		>;
    	};
    	
    	main_mmc2_pins_default: main-mmc2-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x120, PIN_INPUT, 0) /* (G22) MMC2_CMD */
    		AM62AX_IOPAD(0x118, PIN_INPUT, 0) /* (H22) MMC2_CLK */
    		AM62AX_IOPAD(0x114, PIN_INPUT, 0) /* (E20) MMC2_DAT0 */
    		AM62AX_IOPAD(0x110, PIN_INPUT, 0) /* (F21) MMC2_DAT1 */
    		AM62AX_IOPAD(0x10c, PIN_INPUT, 0) /* (F20) MMC2_DAT2 */
    		AM62AX_IOPAD(0x108, PIN_INPUT, 0) /* (G21) MMC2_DAT3 */
    		AM62AX_IOPAD(0x11c, PIN_INPUT, 0) /* (#N/A) MMC2_CLKB */
    		>;
    	};
    	
    	main_wlirq_pins_default: main-wlirq-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x128, PIN_INPUT, 7) /* (E21) MMC2_SDWP.GPIO0_72 */
    		>;
    		
    	};
    	
    	vddshv_sdio_pins_default: vddshv-sdio-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_IOPAD(0x07c, PIN_OUTPUT, 7) /* (M19) GPMC0_CLK.GPIO0_31 */
    		>;
    	};
    	
    	// csi_gpio_pins_default: csi-gpio-pins-default {
    	// 	pinctrl-single,pins = <
    	// 		AM62AX_IOPAD(0x00c, PIN_INPUT, 7) /* (J21) OSPI0_D0.GPIO0_3 */
    	// 		AM62AX_IOPAD(0x010, PIN_INPUT, 7) /* (J18) OSPI0_D1.GPIO0_4 */
    	// 	>;
    	// };
    	
    };
    
    &mcu_pmx0 {
    	status = "okay";
    	
    	wake_mcugpio1_pins_default: wake-mcugpio1-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_MCU_IOPAD(0x0030, PIN_INPUT, 7) /* (D8) MCU_SPI0_D1.MCU_GPIO0_4 */
    		>;
    	};
    	
    	pmic_irq_pins_default: pmic-irq-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_MCU_IOPAD(0x000, PIN_INPUT, 7) /* (E11) MCU_GPIO0_0 */
    		>;
    	};
    	
    	mcu_uart0_pins_default: mcu-uart0-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_MCU_IOPAD(0x01c, PIN_INPUT, 0) /* (B11) MCU_UART0_CTSn */
    		AM62AX_MCU_IOPAD(0x020, PIN_OUTPUT, 0) /* (D10) MCU_UART0_RTSn */
    		AM62AX_MCU_IOPAD(0x014, PIN_INPUT, 0) /* (D8) MCU_UART0_RXD */
    		AM62AX_MCU_IOPAD(0x018, PIN_OUTPUT_PULLUP, 0) /* (F8) MCU_UART0_TXD */
    		>;
    	};
    	
    	wkup_uart0_pins_default: wkup-uart0-pins-default {
    		pinctrl-single,pins = <
    		AM62AX_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (C9) WKUP_UART0_RXD */
    		AM62AX_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (E9) WKUP_UART0_TXD */
    		>;
    	};
    };
    
    &mcu_gpio0 {
    	status = "okay";
    };
    
    &main_i2c0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c0_pins_default>;
    	clock-frequency = <400000>;
    	
    	// PD-CONTROLLER @ 21
    	// power-on only a charger is connected
    	
    	tps659312: pmic@48 {
    		compatible = "ti,tps6593-q1";
    		reg = <0x48>;
    		ti,primary-pmic;
    		system-power-controller;
    		
    		gpio-controller;
    		#gpio-cells = <2>;
    		
    		pinctrl-names = "default";
    		pinctrl-0 = <&pmic_irq_pins_default>;
    		interrupt-parent = <&mcu_gpio0>;
    		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
    		
    		buck123-supply = <&vcc_3v3_sys>;
    		buck4-supply = <&vcc_3v3_sys>;
    		buck5-supply = <&vcc_3v3_sys>;
    		ldo1-supply = <&vcc_3v3_sys>;
    		ldo2-supply = <&vcc_3v3_sys>;
    		ldo3-supply = <&buck5>;
    		ldo4-supply = <&vcc_3v3_sys>;
    		
    		regulators {
    			buck123: buck123 {
    				regulator-name = "vcc_core";
    				regulator-min-microvolt = <715000>;
    				regulator-max-microvolt = <895000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    			
    			buck4: buck4 {
    				regulator-name = "vcc_1v1";
    				regulator-min-microvolt = <1100000>;
    				regulator-max-microvolt = <1100000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    			
    			buck5: buck5 {
    				regulator-name = "vcc_1v8_sys";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    			
    			ldo1: ldo1 {
    				regulator-name = "vddshv5_sdio";
    				regulator-min-microvolt = <3300000>;
    				regulator-max-microvolt = <3300000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    			
    			ldo2: ldo2 {
    				regulator-name = "vpp_1v8";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    			
    			ldo3: ldo3 {
    				regulator-name = "vcc_0v75";
    				regulator-min-microvolt = <750000>;
    				regulator-max-microvolt = <750000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    			
    			ldo4: ldo4 {
    				regulator-name = "vdda_1v8";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    		};
    	};
    	
    	// FUEL GUAGE @ 55
    	
    	charger@6b {
    		compatible = "ti,bq25790";
    		reg = <0x6b>;
    		monitored-battery 		= <&battery>;
    		ti,watchdog-timeout-ms 			= <40000>;// 160000 > W > 0
    		input-voltage-limit-microvolt 	= <4500000>;// 4.5 or 4.7
    		input-current-limit-microamp 	= <3300000>;// 3300000 > I > 100000
    		status = "okay";
    	};
    };
    
    &main_i2c1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c1_pins_default>;
    	clock-frequency = <400000>;
    	
    	exp1: gpio@22 {
    		compatible = "ti,tca6424";
    		reg = <0x22>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		
    		interrupt-parent = <&main_gpio1>;
    		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		
    		gpio-line-names = "CSI_GPIO1", 	"CSI_GPIO0",
    		"SOC_WIFI_PWR", 		"MMC1_HPT_EN",
    		"EXP_GPIO22", 		"EXP_GPIO24",
    		"SW_INT", 			"SW_KILL",
    		"VPP_EN", 			"GPIO_AUD_RSTn",
    		"GPIO_eMMC_RSTn", 	"AUD_SHT_SDR#",
    		"AUD_SHT_SDL#", 		"SOC_DISP_EN",
    		"CPSW_RST", 			"GPOUT",
    		"DISP_RST", 			"LT_WLAN_SDIO_RST",
    		"GPS_EXTINT", 		"GPS_RST_N",
    		"SOC_GPS_ENABLE", 	"MMC1_SDCARD_EN1",
    		"LT_RTC_SQW", 		"MMC1_SD_EN";
    		
    		pinctrl-names = "default";
    		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
    	};
    };
    
    &main_i2c2 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c2_pins_default>;
    	clock-frequency = <100000>;
    	
    	#address-cells = <1>;
    	#size-cells = <0>;
    	
    	lux-sensor@10{
    		compatible = "vishay,veml7700";
    		reg = <0x10>;
    	};
    	
    	temperature-sensor@38 {
    		compatible = "aht10";
    		reg = <0x38>;
    	};
    	
    	ap1302: camera@3d {
    		compatible = "tn,tevi-ap1302";
    		reg = <0x3d>;
    		// pinctrl-names = "default";
    		// pinctrl-0 = <&csi_gpio_pins_default>;
    		
    		// host-power-gpios 	= <&main_gpio0 3 GPIO_ACTIVE_HIGH>;
    		// reset-gpios 		= <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
    		
    		nvmem = <&tevi_ap1302_otp>;
    		nvmem-names = "calib-data";
    		data-lanes = <4>;
    		continuous-clock = <0>;
    		status = "okay";
    		
    		port {
    			csi2_cam0: endpoint {
    				remote-endpoint = <&csi2rx0_in_sensor>;
    				clock-lanes = <0>;
    				data-lanes = <1 2 3 4>;
    			};
    		};
    	};
    	
    	tevi_ap1302_otp: tevi_ap1302_otp@54 {
    		compatible = "atmel,24c1024";
    		reg = <0x54>;
    		pagesize = <128>;
    		status = "okay";
    	};
    	
    	rtc@68{
    		compatible = "dallas,ds1307";
    		reg = <0x68>;
    		#clock-cells = <1>;
    	};
    	
    	gyro@6a {
    		compatible = "st,lsm6dsm";
    		reg = <0x6a>;
    	};
    };
    
    &main_spi0{
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_spi0_pins_default>;
    	
    	num_cs = <2>;
    	cs-gpios  = <0>,<&main_gpio1 16 GPIO_ACTIVE_LOW>;
    	
    	#address-cells = <1>;
    	#size-cells = <0>;
    	
    	panel@1 {
    		compatible = "sitronix,st7789v";
    		reg = <1>;
    		
    		reset-gpios		= <&exp1 16 GPIO_ACTIVE_LOW>;
    		power-supply	= <&vcc_3v3_sys>;
    		
    		spi-max-frequency = <1000000>;
    		spi-cpol;
    		port {
    			panel_in: endpoint {
    				remote-endpoint = <&dpi1_out>;
    			};
    		};
    	};
    };
    
    &sdhci1 {
    	/* SD/MMC */
    	status = "okay";
    	vmmc-supply = <&vdd_mmc1>;
    	vqmmc-supply = <&vddshv_sdio>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc1_pins_default>;
    	disable-wp;
    };
    
    &sdhci2 {
    	status = "okay";
    	vmmc-supply = <&wlan_en>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc2_pins_default>;
    	bus-width = <4>;
    	non-removable;
    	ti,fails-without-test-cd;
    	cap-power-off-card;
    	keep-power-in-suspend;
    	ti,driver-strength-ohm = <50>;
    	
    	#address-cells = <1>;
    	#size-cells = <0>;
    	wlcore: wlcore@2 {
    		status="okay";
    		compatible = "ti,cc33xx";
    		reg = <2>;
    		pinctrl-names = "default";
    		pinctrl-0 = <&main_wlirq_pins_default>;
    		interrupt-parent = <&main_gpio0>;
    		interrupts = <72 IRQ_TYPE_EDGE_RISING>;
    	};
    };
    
    &csi0_port0 {
    	status = "okay";
    	
    	csi2rx0_in_sensor: endpoint {
    		remote-endpoint = <&csi2_cam0>;
    		bus-type = <4>; /* CSI2 DPHY. */
    		clock-lanes = <0>;
    		data-lanes = <1 2 3 4>;
    	};
    };
    
    &main_gpio0 {
    	status = "okay";
    };
    
    &main_gpio1 {
    	status = "okay";
    };
    
    &main_gpio_intr {
    	status = "okay";
    };
    
    &main_uart0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart0_pins_default>;
    	interrupts-extended = <&gic500 GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
    	<&main_pmx0 0x1c8>; /* (D14) UART0_RXD PADCONFIG114 */
    	interrupt-names = "irq", "wakeup";
    };
    
    &usbss0 {
    	status = "okay";
    	ti,vbus-divider;
    };
    
    &usb0 {
    	dr_mode = "otg";
    };
    
    &usbss1 {
    	status = "okay";
    };
    
    &usb1 {
    	dr_mode = "host";
    };
    
    &main_uart1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart1_pins_default>;
    };
    
    &main_uart5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart5_pins_default>;
    };
    
    &main_uart6 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart6_pins_default>;
    };
    
    &mcu_uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcu_uart0_pins_default>;
    	status = "okay";
    };
    
    &wkup_uart0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&wkup_uart0_pins_default>;
    	status = "okay";
    };
    
    &ecap0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&ecap0_pins_default>;
    };
    
    &ti_csi2rx0 {
    	status = "okay";
    };
    
    &dphy0 {
    	status = "okay";
    };
    
    &dss {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_dss0_pins_default>;
    };
    
    &dss_ports {
    	/* VP2: DPI Output */
    	hdmi0_dss: port@0 {
    		reg = <0>;
    		
    		dpi1_out: endpoint {
    			remote-endpoint = <&panel_in>;
    		};
    	};
    };
    
    &mailbox0_cluster0 {
    	ti,mbox-num-fifos = <2>;
    	mbox_r5_0: mbox-r5-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &mailbox0_cluster1 {
    	ti,mbox-num-fifos = <2>;
    	mbox_c7x_0: mbox-c7x-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &mailbox0_cluster2 {
    	ti,mbox-num-fifos = <2>;
    	mbox_mcu_r5_0: mbox-mcu_r5-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &c7x_0 {
    	mboxes = <&mailbox0_cluster1 &mbox_c7x_0>;
    	memory-region = <&c7x_0_dma_memory_region>,
    	<&c7x_0_memory_region>;
    };
    
    &wkup_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
    	memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
    	<&wkup_r5fss0_core0_memory_region>;
    };
    
    &mcu_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster2 &mbox_mcu_r5_0>;
    	memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
    	<&mcu_r5fss0_core0_memory_region>;
    };
    
    #define K3_TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x10000 | val)
    
    &sdhci0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc0_pins_default>;
    	disable-wp;
    };
    
    /delete-node/&fss;
    /delete-node/&cpsw3g;
    /delete-node/&timesync_router;
    
    /delete-node/&epwm0;
    /delete-node/&epwm1;
    /delete-node/&epwm2;
    
    /delete-node/&eqep0;
    /delete-node/&eqep1;
    /delete-node/&eqep2;
    
    /delete-node/&ecap1;
    /delete-node/&ecap2;
    
    /delete-node/&main_uart2;
    /delete-node/&main_uart3;
    /delete-node/&main_uart4;
    
    /delete-node/&main_spi1;
    /delete-node/&main_spi2;
    
    /delete-node/&main_i2c3;
    
    /delete-node/&mcasp0;
    /delete-node/&mcasp1;
    /delete-node/&mcasp2;
    
    /delete-node/&main_conf;
    
    /delete-node/&main_timer0;
    /delete-node/&main_timer1;
    /delete-node/&main_timer2;
    /delete-node/&main_timer3;
    /delete-node/&main_timer4;
    /delete-node/&main_timer5;
    /delete-node/&main_timer6;
    /delete-node/&main_timer7;
    /delete-node/&main_mcan0;
    
    //Deleted Nodes
    // WAKEUP RTC
    //delete-node/&wkup_uart0;
    /delete-node/&wkup_i2c0;
    /delete-node/&wkup_rtc0;
    
    // MCU CORE DISABLE
    /delete-node/&mailbox0_cluster1;
    /delete-node/&mailbox0_cluster2;
    /delete-node/&mailbox0_cluster3;
    
    /delete-node/&hwspinlock;
    
    /delete-node/&mcu_r5fss0;
    /delete-node/&mcu_r5fss0_core0_dma_memory_region;
    /delete-node/&mcu_r5fss0_core0_memory_region;
    
    /delete-node/&mcu_spi0;
    /delete-node/&mcu_spi1;
    
    /delete-node/&mcu_timer0;
    /delete-node/&mcu_timer1;
    /delete-node/&mcu_timer2;
    /delete-node/&mcu_timer3;
    
    // DSP
    /delete-node/&c7x_0;
    /delete-node/&c7x_0_dma_memory_region;
    /delete-node/&c7x_0_memory_region;

  • Hi Harsh,

    The interrupts-extended and interrupt-names are not needed for MCU GPIO wakeup on lines 431-433. You can change that code to the following and test to see if that helps:

    gpios = <&mcu_gpio0 12 GPIO_ACTIVE_LOW>;

    If the issue does not go away, enter this command before suspending the system:

    echo N > /sys/module/printk/parameters/console_suspend

    Then attach the full logs to your comment.

    Best,

    Kendall