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.

DRA829V: Prevent PMIC A and B from turning off

Part Number: DRA829V
Other Parts Discussed in Thread: DRA829

Tool/software:

Hello experts,

Our custom design is similar to the EVM board with one big exception, which is that we have an external stm32 mcu that controls
the power to the DRA829 by controlling the nPWRON/ENABLE pin on PMIC A instead of a switch button directly.

In all other aspects, our PMICs are identical to the EVM setup.

The problem I have is that when Linux shuts down properly, I lose the voltages form the PMICs and the system will stay down until
I toggle power. I want to be able to control this power down from the external stm32.

Power off log:

          Stopping Session c1 of User root...
[  OK  ] Removed slice Slice /system/modprobe.
[  OK  ] Stopped target Multi-User System.
[  OK  ] Stopped target Login Prompts.
[  OK  ] Stopped target Host and Network Name Lookups.
[  OK  ] Stopped target Timer Units.
[  OK  ] Stopped Daily rotation of log files.
[  OK  ] Stopped Generate SSH RSA host key shortly after boot.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  OK  ] Stopped target Hardware activated USB gadget.
[  OK  ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Stopping Memory critical supervisor...
         Stopping Memory supervisor...
         Stopping Avahi mDNS/DNS-SD Stack...
         Stopping Getty on tty1...
[  OK  ] Stopped Oopslog Collector.
         Stopping ResetCPU supervisor...
         Stopping System Logging Service...
         Stopping Serial Getty on ttyS2...
         Stopping Serial Getty on ttyS3...
         Stopping Simple Network Ma…rotocol (SNMP) Trap Daemon....
         Stopping Load/Save Random Seed...
[  OK  ] Stopped OpenSSH Key Generation.
         Stopping logcollector - Log collector...
[  OK  ] Stopped Memory critical supervisor.
[  OK  ] Stopped Memory supervisor.
[  OK  ] Stopped ResetCPU supervisor.
[  OK  ] Stopped Avahi mDNS/DNS-SD Stack.
[  OK  ] Stopped Simple Network Man… Protocol (SNMP) Trap Daemon..
[  OK  ] Stopped Getty on tty1.
[  OK  ] Stopped Serial Getty on ttyS2.
[  OK  ] Stopped Serial Getty on ttyS3.
[  OK  ] Stopped logcollector - Log collector.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Stopped Session c1 of User root.
[  OK  ] Removed slice Slice /system/getty.
[  OK  ] Removed slice Slice /system/serial-getty.
[  OK  ] Stopped target Network is Online.
         Stopping User Login Management...
[  OK  ] Stopped Wait for Network to be Configured.
         Stopping User Manager for UID 0...
         Stopping Ccollector - Crash dump collector...
[  OK  ] Stopped Ccollector - Crash dump collector.
[  OK  ] Stopped User Manager for UID 0.
         Stopping Knut Service...
         Stopping User Runtime Directory /run/user/0...
[  OK  ] Unmounted /run/user/0.
[  OK  ] Stopped Knut Service.
[  OK  ] Stopped User Runtime Directory /run/user/0.
[  OK  ] Removed slice User Slice of UID 0.
         Stopping D-Bus System Message Bus...
         Stopping Permit User Sessions...
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped User Login Management.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped target Network.
[  OK  ] Stopped target Remote File Systems.
         Stopping SE3Linux USB ethernet gadget...
         Stopping Network Name Resolution...
[  OK  ] Stopped Network Name Resolution.
         Stopping Network Configuration...
[  OK  ] Stopped Network Configuration.
[  OK  ] Stopped SE3Linux USB ethernet gadget.
[  OK  ] Stopped target Preparation for Network.
[  OK  ] Stopped IPv6 Packet Filtering Framework.
[  OK  ] Stopped IPv4 Packet Filtering Framework.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Path Units.
[  OK  ] Stopped SE3Linux Avahi service update watcher.
[  OK  ] Stopped Dispatch Password …ts to Console Directory Watch.
[  OK  ] Stopped Forward Password R…uests to Wall Directory Watch.
[  OK  ] Stopped target Slice Units.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped target Socket Units.
[  OK  ] Closed Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Closed sshd.socket.
[  OK  ] Stopped target System Initialization.
[  OK  ] Closed Syslog Socket.
[  OK  ] Closed Network Service Netlink Socket.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Update is Completed.
[  OK  ] Stopped Rebuild Dynamic Linker Cache.
[  OK  ] Stopped Rebuild Journal Catalog.
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped target Local File Systems.
         Unmounting /run/credentials/systemd-sysusers.service...
         Unmounting Temporary Directory /tmp...
         Unmounting /var/app-data...
         Unmounting /var/apps...
         Unmounting /var/sbo...
         Unmounting /var/volatile...
[  OK  ] Unmounted /run/credentials/systemd-sysusers.service.
[  OK  ] Unmounted Temporary Directory /tmp.
[  OK  ] Unmounted /var/app-data.
[  OK  ] Unmounted /var/apps.
[  OK  ] Unmounted /var/sbo.
[  OK  ] Unmounted /var/volatile.
[  OK  ] Stopped target Preparation for Local File Systems.
[  OK  ] Stopped target Swaps.
         Deactivating swap /dev/dis…mmc-G1M15L_0x29f4e78c-part3...
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Create System Users.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target System Shutdown.
[  OK  ] Deactivated swap /dev/disk…b-48a8-437a-9d50-3fe2a77caa0e.
[  OK  ] Deactivated swap /dev/disk…d/mmc-G1M15L_0x29f4e78c-part3.
[  OK  ] Deactivated swap /dev/disk…th/platform-4f80000.mmc-part3.
[  OK  ] Deactivated swap /dev/disk/by-partlabel/swap.
[  OK  ] Deactivated swap /dev/mmcblk0p3.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Reached target Late Shutdown Services.
[  OK  ] Finished System Power Off.
[  OK  ] Reached target System Power Off.
[   71.458298] reboot: Power down

At this point for example my VDA_MCU_1V8 goes low, and I can't wake the system again.

My dts for the PMIC in Linux looks like this:

&wkup_i2c0 {
	bootph-pre-ram;
	pinctrl-names = "default";
	pinctrl-0 = <&wkup_i2c0_pins_default>;
	clock-frequency = <400000>;
	status = "okay";

	tps659413: pmic@48 {
		compatible = "ti,tps6594-q1";
		reg = <0x48>;
		system-power-controller;
		pinctrl-names = "default";
		pinctrl-0 = <&pmic_irq_pins_default>;
		interrupt-parent = <&wkup_gpio0>;
		interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
		ti,primary-pmic;

		gpio-controller;
		#gpio-cells = <2>;

		buck12-supply = <&vsys_3v3>;
		buck3-supply = <&vsys_3v3>;
		buck4-supply = <&vsys_3v3>;
		buck5-supply = <&vsys_3v3>;
		ldo1-supply = <&vsys_3v3>;
		ldo2-supply = <&vsys_3v3>;
		ldo3-supply = <&vsys_3v3>;
		ldo4-supply = <&vsys_3v3>;

		regulators {
			bucka12: buck12 {
				regulator-name = "vdd_cpu_avs";
				regulator-min-microvolt = <600000>;
				regulator-max-microvolt = <900000>;
				regulator-boot-on;
				regulator-always-on;
			};

			bucka3: buck3 {
				regulator-name = "vdd_mcu_0v85";
				regulator-min-microvolt = <850000>;
				regulator-max-microvolt = <850000>;
				regulator-boot-on;
				regulator-always-on;
			};

			bucka4: buck4 {
				regulator-name = "vdd_ddr_1v1";
				regulator-min-microvolt = <1100000>;
				regulator-max-microvolt = <1100000>;
				regulator-boot-on;
				regulator-always-on;
			};

			bucka5: buck5 {
				regulator-name = "vdd_phyio_1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldoa1: ldo1 {
				regulator-name = "vdd1_lpddr4_1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldoa2: ldo2 {
				regulator-name = "vdd_mcuio_1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldoa3: ldo3 {
				regulator-name = "vdda_dll_0v8";
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldoa4: ldo4 {
				regulator-name = "vda_mcu_1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};
		};
	};

	tps659411: pmic@4c {
		compatible = "ti,tps6594-q1";
		reg = <0x4c>;
		system-power-controller;
		interrupt-parent = <&wkup_gpio0>;
		interrupts = <7 IRQ_TYPE_EDGE_FALLING>;

		gpio-controller;
		#gpio-cells = <2>;

		buck1234-supply = <&vsys_3v3>;
		buck5-supply = <&vsys_3v3>;
		ldo1-supply = <&vsys_3v3>;
		ldo2-supply = <&vsys_3v3>;
		ldo3-supply = <&vsys_3v3>;
		ldo4-supply = <&vsys_3v3>;

		regulators {
			buckb1234: buck1234 {
				regulator-name = "vdd_core_0v8";
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			buckb5: buck5 {
				regulator-name = "vdd_ram_0v85";
				regulator-min-microvolt = <850000>;
				regulator-max-microvolt = <850000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldob1: ldo1 {
				regulator-name = "vdd_sd_dv";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldob2: ldo2 {
				regulator-name = "vdd_usb_3v3";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldob3: ldo3 {
				regulator-name = "vdd_io_1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};

			ldob4: ldo4 {
				regulator-name = "vda_pll_1v8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-boot-on;
				regulator-always-on;
			};
		};
	};
};

I have tried to remove the "system-power-controller" without success.

How can I prevent the PMICs from powering off? In our system this is done from the stm32, when it gets a signal from the SoC.

Regards,

/Bo