Then its gotta have its own reserved memory space that gets messed up when kernel maps it

I'm playing with reserved memory by adding random reserved part... With this configuration, the kernel panics every time with the same error.

Any idea why ?

[    3.289848] ipq806x-gmac-dwmac 37400000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    3.298733] i2c /dev entries driver
[    3.307827] /cpus/cpu@0: unsupported enable-method property: qcom,kpss-acc-v1
[    3.310026] sdhci: Secure Digital Host Controller Interface driver
[    3.315069] sdhci: Copyright(c) Pierre Ossman
[    3.321263] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.329610] NET: Registered protocol family 10
[    3.333364] Segment Routing with IPv6
[    3.335710] NET: Registered protocol family 17
[    3.340054] 8021q: 802.1Q VLAN Support v1.8
[    3.343689] Registering SWP/SWPB emulation handler
[    3.383998] qcom_rpm 108000.rpm: RPM firmware 3.0.16777364
[    3.402401] s1a: Bringing 0uV into 1050000-1050000uV
[    3.402957] RPM SUCCESS TO 1050000
[    3.403378] s1a: supplied by regulator-dummy
[    3.409983] s1b: Bringing 0uV into 1050000-1050000uV
[    3.414484] RPM SUCCESS TO 1050000
[    3.414823] s1b: supplied by regulator-dummy
[    3.422444] s2a: Bringing 0uV into 775000-775000uV
[    3.427745] RPM SUCCESS TO 775000
[    3.428095] s2a: supplied by regulator-dummy
[    3.434876] s2b: Bringing 0uV into 775000-775000uV
[    3.440253] RPM SUCCESS TO 775000
[    3.440602] s2b: supplied by regulator-dummy
[    3.490078] 8<--- cut here ---
[    3.490131] Unable to handle kernel paging request at virtual address ddffcf7c
[    3.492051] pgd = (ptrval)
[    3.499246] [ddffcf7c] *pgd=00000000
[    3.501953] Internal error: Oops: 5 [#1] SMP ARM
[    3.505674] Modules linked in:
[    3.510281] CPU: 1 PID: 65 Comm: modprobe Not tainted 5.10.2 #0
[    3.513138] Hardware name: Generic DT based system
[    3.518972] PC is at free_unref_page_list+0x7c/0x17c
[    3.523824] LR is at free_pcp_prepare+0x48/0x88
[    3.528937] pc : [<c042a1c4>]    lr : [<c042779c>]    psr: 20000013
[    3.533192] sp : c3c0de28  ip : c31a18e7  fp : fffffc00
[    3.539442] r10: c3290e00  r9 : c32bdd8c  r8 : c3207e84
[    3.544651] r7 : c3c0de58  r6 : ddb54700  r5 : 00042a8f  r4 : dda4a1e0
[    3.549861] r3 : 00fffff0  r2 : dddfcf80  r1 : 0007ffff  r0 : 00000001
[    3.556463] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    3.562970] Control: 10c5787d  Table: 45c1006a  DAC: 00000051
[    3.570174] Process modprobe (pid: 65, stack limit = 0x(ptrval))
[    3.575902] Stack: (0xc3c0de28 to 0xc3c0e000)
[    3.582008] de20:                   c3c12fbc ddaa4ea0 00000092 0000000a c37fa250 00000092
[    3.586275] de40: c3290e00 60000013 c09f207c c03f350c 00000002 00000000 ddaa4ea4 ddb65fc4
[    3.594436] de60: 00000000 c37fa000 c3c0df0c 00000000 c3c0df24 c0300264 00000000 000000f8
[    3.602596] de80: 00000000 c041d058 c32bdda4 00000122 c3c0df0c befae000 c3c12fc0 c0412498
[    3.610755] dea0: 00000100 befadfff 00002000 c3207e84 c37ef180 c37ef300 00000000 c37ef300
[    3.618915] dec0: befab000 c3c0df0c 00002000 00000000 00000000 c0412604 00000000 c04140d8
[    3.627075] dee0: c37ef060 c3c0e000 c3c0c000 c37ef060 c3c0e000 00000000 c3c0e044 c041abf8
[    3.635234] df00: 00000002 c0789cf4 00000020 c3c0e000 ffffffff ffffffff c0a74a01 00000001
[    3.643394] df20: c37fa000 c37fa000 00000000 00000008 ddac1120 ddac1140 ddac1160 ddb65ee0
[    3.651553] df40: ddb54720 ddb65f60 ddb65f80 ddb65fa0 c3c0e000 00000000 c3c0c000 c0319d30
[    3.659713] df60: c3c0e000 c360b480 c3c0c000 c031f7b4 00000008 00000000 00000051 000000f8
[    3.667873] df80: 00000000 c0320d20 ffffffff beb8ceb4 00010ddc 000000f8 c0300264 c0320db0
[    3.676034] dfa0: ffffffff c0300060 ffffffff beb8ceb4 ffffffff beb8cde0 00000000 ffffffff
[    3.684191] dfc0: ffffffff beb8ceb4 00010ddc 000000f8 00000001 00000000 00000020 00000000
[    3.692353] dfe0: 00000001 beb8ce78 b6f48ab4 b6f592c0 60000010 ffffffff 00000000 00000000
[    3.700513] [<c042a1c4>] (free_unref_page_list) from [<c03f350c>] (release_pages+0x270/0x2e8)
[    3.708667] [<c03f350c>] (release_pages) from [<c041d058>] (tlb_finish_mmu+0x64/0x180)
[    3.717161] [<c041d058>] (tlb_finish_mmu) from [<c041abf8>] (exit_mmap+0xe4/0x198)
[    3.724978] [<c041abf8>] (exit_mmap) from [<c0319d30>] (mmput+0x58/0x11c)
[    3.732516] [<c0319d30>] (mmput) from [<c031f7b4>] (do_exit+0x2ac/0x8f8)
[    3.739372] [<c031f7b4>] (do_exit) from [<c0320d20>] (do_group_exit+0x48/0xc4)
[    3.746142] [<c0320d20>] (do_group_exit) from [<c0320db0>] (__wake_up_parent+0x0/0x18)
[    3.753190] Code: e0453003 e1a03523 e1a011a3 e1a03103 (e7922101)
[    3.761066] ---[ end trace 9951955886923ade ]---
[    3.767220] Kernel panic - not syncing: Fatal exception
[    3.771930] CPU0: stopping
[    3.776849] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D           5.10.2 #0
[    3.779628] Hardware name: Generic DT based system
[    3.786849] [<c030e44c>] (unwind_backtrace) from [<c030a2cc>] (show_stack+0x14/0x20)
[    3.791707] [<c030a2cc>] (show_stack) from [<c05c3a7c>] (dump_stack+0x94/0xa8)
[    3.799603] [<c05c3a7c>] (dump_stack) from [<c030d170>] (do_handle_IPI+0x140/0x184)
[    3.806634] [<c030d170>] (do_handle_IPI) from [<c030d1d0>] (ipi_handler+0x1c/0x2c)
[    3.814195] [<c030d1d0>] (ipi_handler) from [<c0369708>] (__handle_domain_irq+0x90/0xf4)
[    3.821838] [<c0369708>] (__handle_domain_irq) from [<c05dde40>] (gic_handle_irq+0x90/0xb8)
[    3.830079] [<c05dde40>] (gic_handle_irq) from [<c0300b0c>] (__irq_svc+0x6c/0x90)
[    3.838136] Exception stack(0xc3201ee0 to 0xc3201f28)
[    3.845798] 1ee0: 00000000 00000000 1a898000 dda36bc0 00000000 dc35ff20 c4162840 00000000
[    3.850838] 1f00: dda35eb0 00000000 00000000 00000000 000451a0 c3201f30 c07488c0 c07488e0
[    3.858977] 1f20: 60000013 ffffffff
[    3.867141] [<c0300b0c>] (__irq_svc) from [<c07488e0>] (cpuidle_enter_state+0x180/0x37c)
[    3.870441] [<c07488e0>] (cpuidle_enter_state) from [<c0748b2c>] (cpuidle_enter+0x3c/0x5c)
[    3.878781] [<c0748b2c>] (cpuidle_enter) from [<c034a8d0>] (do_idle+0x208/0x2a4)
[    3.886846] [<c034a8d0>] (do_idle) from [<c034ac28>] (cpu_startup_entry+0x1c/0x20)
[    3.894401] [<c034ac28>] (cpu_startup_entry) from [<c0b00e88>] (start_kernel+0x510/0x520)
[    3.901775] [<c0b00e88>] (start_kernel) from [<00000000>] (0x0)
[    3.910035] Rebooting in 1 seconds..
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		nss@40000000 {
			reg = <0x40000000 0x1000000>;
			no-map;
		};

		smem: smem@41000000 {
			reg = <0x41000000 0x200000>;
			no-map;
		};

		rsvd@41200000 {
			reg = <0x41200000 0x300000>;
			no-map;
		};

		rsvd@41500000 {
			reg = <0x41500000 0x2500000>;
			no-map;
		};

		rsvd@5fe00000 {
			reg = <0x5fe00000 0x200000>;
			no-map;
		};
	};

Setting

rsvd@41500000 {
			reg = <0x41500000 0x1500000>;
			no-map;
		};

Correctly boots but the rpm bug is still present.

On newer IPQ60xx there is a RPM msg reserved RAM area which is mapped outside of the actual RAM MMIO area.
Weird thing is that they dont use RPM for regulators at all.

rpm_msg_ram: rpm_msg_ram@0x60000 {
			no-map;
			reg = <0x0 0x60000 0x0 0x6000>;
		};

Also, this downstream commit looks interesting:

The regulator is not set at all?

On IPQ6018 they use SMD over RPM regulators.

!!!! oss/kernel/linux-msm - Unnamed repository; edit this file 'description' to name the repository. (codeaurora.org)

Did you notice this?
Wonder if we have this workaround in our code... Seems to be related to us...

the first RPM transaction
would work, but the next would stall or raise an error since the
previous transaction was not properly ACKed as the ACK words were
read at the wrong offset.

Ok no we have this also in the upstream code... Will try to implement the disable_mpm code...

No luck... same problem... tried both the reserved space and the disable_mpm

Wow the rpm log actually works and it's readable data!

149.296173: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
149.296173: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1275000")
149.296204: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
149.296204: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
149.296204: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
149.296234: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
149.296234: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1275000")
149.296234: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1275000")
149.296265: rpm_driver_complete (rejected: 0)
149.296326: rpm_sending_message_int (master: "APSS")

149.316620: rpm_message_int_received (master: "APSS")
149.316650: rpm_request_queued (master: "APSS") (index: 0)
149.316711: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
149.316772: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
149.316772: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1275000")
149.316772: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
149.316803: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
149.316803: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
149.316803: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
149.316803: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1275000")
149.316833: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1275000")
149.316864: rpm_driver_complete (rejected: 0)
149.316895: rpm_sending_message_int (master: "APSS")

149.357971: rpm_message_int_received (master: "APSS")
149.358002: rpm_request_queued (master: "APSS") (index: 0)
149.358063: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
149.358093: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
149.358093: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1275000")
149.358124: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
149.358124: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
149.358124: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
149.358154: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
149.358154: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1275000")
149.358154: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1275000")
149.358185: rpm_driver_complete (rejected: 0)
149.358246: rpm_sending_message_int (master: "APSS")

Fun thing i had a project some time ago... ipq806x from what i had seen used the rpm buffer to store the kernel crashlog. The watchdog is full of code to use this but I didn't have at times the script to parse the log.

That looks like an awesome thing for debugging.
Any usefull clues?

The log is from hardcoding the voltage to the max value... for some reason that works and rpm accepts the change (could be that in the internal firmware, it just skip any change if it's requested to change the voltage to the old voltage)
Anyway we can try and dump the log from the original netgear firmware and compare them.

Mhe... not that useful (this is a log from rpm rejecting some voltage... i hardcoded the voltage... this is the code

	if (test) {
		cust = 1275000;
		test = 0;
	} else {
		cust = 1100000;
		test = 1;
	}

This is the log..

[  404.146029] RPM REJECT TO 1100000
[  404.311630] RPM SUCCESS TO 1275000
[  404.332716] RPM REJECT TO 1100000
[  404.583231] RPM SUCCESS TO 1275000
[  404.604304] RPM REJECT TO 1100000
[  404.645182] RPM SUCCESS TO 1275000
[  404.667436] RPM REJECT TO 1100000
[  404.729073] RPM SUCCESS TO 1275000
[  404.746565] RPM SUCCESS TO 1100000
[  404.751132] RPM SUCCESS TO 1275000
[  404.777907] RPM REJECT TO 1100000
[  404.789373] RPM REJECT TO 1275000
[  404.804639] RPM REJECT TO 1100000
[  404.815246] RPM REJECT TO 1275000
[  404.817111] RPM REJECT TO 1100000
[  404.830916] RPM REJECT TO 1275000
[  404.850849] RPM REJECT TO 1100000
[  404.852466] RPM REJECT TO 1275000
[  405.229052] RPM REJECT TO 1100000
[  405.249948] RPM SUCCESS TO 1275000
[  405.499723] RPM SUCCESS TO 1100000
[  405.544417] RPM REJECT TO 1275000
[  405.563910] RPM SUCCESS TO 1100000
[  405.607295] RPM REJECT TO 1275000
[  405.627135] RPM SUCCESS TO 1100000
[  405.670830] RPM REJECT TO 1275000
[  405.689840] RPM SUCCESS TO 1100000
[  405.733665] RPM REJECT TO 1275000
[  405.753439] RPM SUCCESS TO 1100000
[  405.796613] RPM REJECT TO 1275000
[  405.816605] RPM SUCCESS TO 1100000
[  405.858238] RPM SUCCESS TO 1275000
[  405.880588] RPM REJECT TO 1100000

133.616394: rpm_driver_dispatch (resource: "VDD_APC1") (effective_immediately: yes)
133.616425: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 0")
133.616425: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 1275000")
133.616425: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.616455: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.616455: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.616455: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC1 "  (Initial level: 1100000 ) (Requested Level: 1275000")
133.617554: Resource Request Info: " "VDD_APC1" "  (Initial Val: 0 ) (Requested Val: 1275000")
133.617584: rpm_driver_complete (rejected: 1)
133.617615: rpm_sending_message_int (master: "APSS")

133.635193: rpm_message_int_received (master: "APSS")
133.635223: rpm_request_queued (master: "APSS") (index: 0)
133.635284: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
133.635315: rpm_driver_dispatch (resource: "VDD_APC1") (effective_immediately: yes)
133.635345: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 0")
133.635345: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 1100000")
133.635345: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.635376: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.635376: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.635376: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC1 "  (Initial level: 1100000 ) (Requested Level: 1100000")
133.635406: Resource Request Info: " "VDD_APC1" "  (Initial Val: 0 ) (Requested Val: 1100000")
133.635437: rpm_driver_complete (rejected: 0)
133.635468: rpm_sending_message_int (master: "APSS")

133.654358: rpm_message_int_received (master: "APSS")
133.654388: rpm_request_queued (master: "APSS") (index: 0)
133.654449: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
133.654510: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
133.654510: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1275000")
133.654541: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
133.654541: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.654541: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.654541: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.654572: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1275000")
133.654572: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1275000")
133.654602: rpm_driver_complete (rejected: 0)
133.654663: rpm_sending_message_int (master: "APSS")

133.714935: rpm_message_int_received (master: "APSS")
133.714966: rpm_request_queued (master: "APSS") (index: 0)
133.715027: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
133.715057: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
133.715088: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1100000")
133.715088: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
133.715088: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.715118: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.715118: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.715118: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1100000")
133.716217: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1100000")
133.716248: rpm_driver_complete (rejected: 1)
133.716278: rpm_sending_message_int (master: "APSS")

133.735382: rpm_message_int_received (master: "APSS")
133.735413: rpm_request_queued (master: "APSS") (index: 0)
133.735474: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
133.735504: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
133.735535: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1275000")
133.735535: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
133.735535: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.735565: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.735565: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.735565: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1275000")
133.735596: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1275000")
133.735596: rpm_driver_complete (rejected: 0)
133.735657: rpm_sending_message_int (master: "APSS")

133.856110: rpm_message_int_received (master: "APSS")
133.856140: rpm_request_queued (master: "APSS") (index: 0)
133.856201: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
133.856232: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
133.856232: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1100000")
133.856262: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
133.856262: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.856262: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.856293: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.856293: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1100000")
133.857391: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1100000")
133.857391: rpm_driver_complete (rejected: 1)
133.857452: rpm_sending_message_int (master: "APSS")

133.875702: rpm_message_int_received (master: "APSS")
133.875732: rpm_request_queued (master: "APSS") (index: 0)
133.875793: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
133.875854: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
133.875854: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1275000")
133.875854: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
133.875885: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.875885: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.875885: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.875885: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1275000")
133.875916: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1275000")
133.875946: rpm_driver_complete (rejected: 0)
133.875977: rpm_sending_message_int (master: "APSS")

133.916626: rpm_message_int_received (master: "APSS")
133.916687: rpm_request_queued (master: "APSS") (index: 0)
133.916748: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
133.916779: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
133.916809: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1100000")
133.916809: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
133.916809: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.916840: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.916840: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.916840: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1100000")
133.917938: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1100000")
133.917969: rpm_driver_complete (rejected: 1)
133.917999: rpm_sending_message_int (master: "APSS")

133.936188: rpm_message_int_received (master: "APSS")
133.936218: rpm_request_queued (master: "APSS") (index: 0)
133.936279: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
133.936310: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
133.936340: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1275000")
133.936340: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
133.936340: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
133.936371: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
133.936371: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
133.936371: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1275000 ) (Requested Level: 1275000")
133.936401: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1275000")
133.936401: rpm_driver_complete (rejected: 0)
133.936462: rpm_sending_message_int (master: "APSS")

This is the log from the init of the rpm firmware to the first rejection (after the free)

75.768127: rpm_driver_dispatch (resource: "NSS0 Fabric Clock") (effective_immediately: yes)
75.768158: Resource Request Info: " "NSS0 Fabric Clock" "  (Initial Val: 400 ) (Requested Val: 533")
75.768158: SMB Vote Info: " CLKRGM_SMB_CLIENT_NSS0FAB "  (Initial level: 115000 ) (Requested Level: 115000")
75.768250: rpm_driver_complete (rejected: 0)
75.768280: rpm_new_worst_case (resource: "NSS0 Fabric Clock") (observed: 4)
75.768280: rpm_new_worst_case (resource: "NSS0 Fabric Clock") (observed: 4)
75.768311: rpm_sending_message_int (master: "APSS")

75.768372: rpm_message_int_received (master: "APSS")
75.768402: rpm_request_queued (master: "APSS") (index: 0)
75.768494: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.768524: rpm_driver_dispatch (resource: "NSS0 Fabric Clock") (effective_immediately: no)
75.768524: rpm_driver_complete (rejected: 0)
75.768585: rpm_sending_message_int (master: "APSS")

75.768646: rpm_message_int_received (master: "APSS")
75.768677: rpm_request_queued (master: "APSS") (index: 0)
75.768768: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.768799: rpm_driver_dispatch (resource: "NSS0 Fabric Clock") (effective_immediately: yes)
75.768799: rpm_driver_complete (rejected: 0)
75.768860: rpm_sending_message_int (master: "APSS")

75.768921: rpm_message_int_received (master: "APSS")
75.768951: rpm_request_queued (master: "APSS") (index: 0)
75.769043: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.769073: rpm_driver_dispatch (resource: "NSS0 Fabric Clock") (effective_immediately: no)
75.769073: rpm_driver_complete (rejected: 0)
75.769135: rpm_sending_message_int (master: "APSS")

75.769196: rpm_message_int_received (master: "APSS")
75.769226: rpm_request_queued (master: "APSS") (index: 0)
75.769318: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.769348: rpm_driver_dispatch (resource: "NSS1 Clock") (effective_immediately: yes)
75.769379: Resource Request Info: " "NSS1 Clock" "  (Initial Val: 200 ) (Requested Val: 266")
75.769379: SMB Vote Info: " CLKRGM_SMB_CLIENT_NSS1FAB "  (Initial level: 115000 ) (Requested Level: 115000")
75.769440: rpm_driver_complete (rejected: 0)
75.769470: rpm_new_worst_case (resource: "NSS1 Clock") (observed: 4)
75.769501: rpm_new_worst_case (resource: "NSS1 Clock") (observed: 4)
75.769501: rpm_sending_message_int (master: "APSS")

75.769592: rpm_message_int_received (master: "APSS")
75.769623: rpm_request_queued (master: "APSS") (index: 0)
75.769684: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.769745: rpm_driver_dispatch (resource: "NSS1 Clock") (effective_immediately: no)
75.769745: rpm_driver_complete (rejected: 0)
75.769806: rpm_sending_message_int (master: "APSS")

75.769867: rpm_message_int_received (master: "APSS")
75.769897: rpm_request_queued (master: "APSS") (index: 0)
75.769958: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.770020: rpm_driver_dispatch (resource: "NSS1 Clock") (effective_immediately: yes)
75.770020: rpm_driver_complete (rejected: 0)
75.770081: rpm_sending_message_int (master: "APSS")

75.770142: rpm_message_int_received (master: "APSS")
75.770172: rpm_request_queued (master: "APSS") (index: 0)
75.770233: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.770294: rpm_driver_dispatch (resource: "NSS1 Clock") (effective_immediately: no)
75.770294: rpm_driver_complete (rejected: 0)
75.770355: rpm_sending_message_int (master: "APSS")

75.776764: rpm_message_int_received (master: "APSS")
75.776825: rpm_request_queued (master: "APSS") (index: 0)
75.776855: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.776917: rpm_driver_dispatch (resource: "VDD_CX") (effective_immediately: yes)
75.776917: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 0")
75.776917: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
75.776947: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 1100000")
75.776947: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 1050000")
75.776947: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 1150000")
75.776978: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_VCX "  (Initial level: 1150000 ) (Requested Level: 1150000")
75.776978: Resource Request Info: " "VDD_CX" "  (Initial Val: 0 ) (Requested Val: 1050000")
75.777008: rpm_driver_complete (rejected: 0)
75.777039: rpm_new_worst_case (resource: "VDD_CX") (observed: 5)
75.777039: rpm_new_worst_case (resource: "VDD_CX") (observed: 5)
75.777069: rpm_sending_message_int (master: "APSS")

75.789154: rpm_message_int_received (master: "APSS")
75.789215: rpm_request_queued (master: "APSS") (index: 0)
75.789276: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.789307: rpm_driver_dispatch (resource: "VDD_UBI") (effective_immediately: yes)
75.789337: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 0")
75.789337: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
75.789337: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 1050000")
75.789337: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 1050000")
75.789368: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_CX "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 1150000")
75.789368: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_UBI "  (Initial level: 1150000 ) (Requested Level: 1150000")
75.789368: Resource Request Info: " "VDD_UBI" "  (Initial Val: 0 ) (Requested Val: 1050000")
75.789398: rpm_driver_complete (rejected: 0)
75.789429: rpm_new_worst_case (resource: "VDD_UBI") (observed: 4)
75.789459: rpm_new_worst_case (resource: "VDD_UBI") (observed: 4)
75.789459: rpm_sending_message_int (master: "APSS")

75.802551: rpm_message_int_received (master: "APSS")
75.802612: rpm_request_queued (master: "APSS") (index: 0)
75.802673: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.802704: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
75.802734: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 775000")
75.802734: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
75.802734: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
75.802734: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
75.802765: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
75.802765: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1100000 ) (Requested Level: 775000")
75.803467: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 775000")
75.803497: rpm_driver_complete (rejected: 0)
75.803528: rpm_sending_message_int (master: "APSS")

75.815521: rpm_message_int_received (master: "APSS")
75.815582: rpm_request_queued (master: "APSS") (index: 0)
75.815613: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
75.815674: rpm_driver_dispatch (resource: "VDD_APC1") (effective_immediately: yes)
75.815674: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 0")
75.815674: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 775000")
75.815704: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
75.815704: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
75.815704: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
75.815735: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC1 "  (Initial level: 1100000 ) (Requested Level: 775000")
75.816406: Resource Request Info: " "VDD_APC1" "  (Initial Val: 0 ) (Requested Val: 775000")
75.816437: rpm_driver_complete (rejected: 0)
75.816498: rpm_sending_message_int (master: "APSS")

76.303955: rpm_message_int_received (master: "APSS")
76.303986: rpm_request_queued (master: "APSS") (index: 0)
76.304047: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
76.304077: rpm_driver_dispatch (resource: "VDD_APC1") (effective_immediately: yes)
76.304108: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 0")
76.304108: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 1075000")
76.304108: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
76.304108: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
76.304138: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
76.304138: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC1 "  (Initial level: 775000 ) (Requested Level: 1075000")
76.304840: Resource Request Info: " "VDD_APC1" "  (Initial Val: 0 ) (Requested Val: 1075000")
76.304871: rpm_driver_complete (rejected: 0)
76.304901: rpm_sending_message_int (master: "APSS")

76.305206: rpm_message_int_received (master: "APSS")
76.305237: rpm_request_queued (master: "APSS") (index: 0)
76.305328: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
76.305359: rpm_driver_dispatch (resource: "VDD_APC1") (effective_immediately: yes)
76.305359: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 0")
76.305389: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 1075000")
76.305389: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
76.305389: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
76.305420: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
76.305420: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC1 "  (Initial level: 1075000 ) (Requested Level: 1075000")
76.305420: Resource Request Info: " "VDD_APC1" "  (Initial Val: 0 ) (Requested Val: 1075000")
76.305450: rpm_driver_complete (rejected: 0)
76.305481: rpm_new_worst_case (resource: "VDD_APC1") (observed: 4)
76.305511: rpm_new_worst_case (resource: "VDD_APC1") (observed: 4)
76.305511: rpm_sending_message_int (master: "APSS")

76.318451: rpm_message_int_received (master: "APSS")
76.318481: rpm_request_queued (master: "APSS") (index: 0)
76.318573: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
76.318604: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
76.318604: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1075000")
76.318634: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
76.318634: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
76.318634: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
76.318665: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
76.318665: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 775000 ) (Requested Level: 1075000")
76.319366: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1075000")
76.319366: rpm_driver_complete (rejected: 0)
76.319427: rpm_sending_message_int (master: "APSS")

76.319641: rpm_message_int_received (master: "APSS")
76.319672: rpm_request_queued (master: "APSS") (index: 0)
76.319763: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
76.319794: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
76.319824: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1075000")
76.319824: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
76.319824: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
76.319855: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
76.319855: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
76.319855: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1075000 ) (Requested Level: 1075000")
76.319855: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1075000")
76.319885: rpm_driver_complete (rejected: 0)
76.319946: rpm_new_worst_case (resource: "VDD_APC0") (observed: 4)
76.319946: rpm_new_worst_case (resource: "VDD_APC0") (observed: 4)
76.319977: rpm_sending_message_int (master: "APSS")

76.340607: rpm_message_int_received (master: "APSS")
76.340637: rpm_request_queued (master: "APSS") (index: 0)
76.340729: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
76.340759: rpm_driver_dispatch (resource: "VDD_APC1") (effective_immediately: yes)
76.340759: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 0")
76.340790: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 1150000")
76.340790: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
76.340790: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
76.340820: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC1 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
76.340820: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC1 "  (Initial level: 1075000 ) (Requested Level: 1150000")
76.341125: Resource Request Info: " "VDD_APC1" "  (Initial Val: 0 ) (Requested Val: 1150000")
76.341125: rpm_driver_complete (rejected: 0)
76.341187: rpm_new_worst_case (resource: "VDD_APC1") (observed: 14)
76.341187: rpm_sending_message_int (master: "APSS")

77.396667: rpm_message_int_received (master: "APSS")
77.396698: rpm_request_queued (master: "APSS") (index: 0)
77.396759: rpm_servicing_master (master: "APSS") (state: pre_dispatch) (preempt: 0) (stop_time: 0xffffffff)
77.396790: rpm_driver_dispatch (resource: "VDD_APC0") (effective_immediately: yes)
77.396820: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC0 " (Requested Level: 1150000")
77.396820: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_APC1 " (Requested Level: 0")
77.396820: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_UBI " (Requested Level: 0")
77.396851: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_VCX " (Requested Level: 0")
77.396851: IPQ_PMIC Client Vote Info: " IPQ_PMIC_VDD_APC0 "  " IPQ_PMIC_CLIENTS_FABRIC " (Requested Level: 0")
77.396851: IPQ_PMIC Vote Info: " IPQ_PMIC_CLIENTS_APC0 "  (Initial level: 1075000 ) (Requested Level: 1150000")
77.397827: Resource Request Info: " "VDD_APC0" "  (Initial Val: 0 ) (Requested Val: 1150000")
77.397858: rpm_driver_complete (rejected: 1)
77.397888: rpm_sending_message_int (master: "APSS")

Exporting the log from the oem firmware, i can confirm that the firmware issue regulator change command... The main difference is that the oem firmware does less call and call periodically the EBI CLK command.
The rpm_worst_case is suspect... wonder if that locks the rpm (some type of failsafe?)

Well, QSDK also defines some clocks under RPM powered by the rpm-clock driver.
Maybe these are needed as well?

I see that you added support to the upstream rpmcc driver for IPQ806x.
If calls to the firmware for the clock are missing, is it possible that rpmcc is not working at all?

The upstream version have the rpm clk hardcoded in the driver. I checked them

But where is the call for it in the log?

The rpm log is limited to 33kb (it's a circular buffer that gets recycled and overwritten)
In theory we don't have the first part where the clock are enabled
What I can't find is what issue the ebi clock in the original firmware many times.

Anyway another test I had done to test if the new_worst_value from the log was related was hammering the write...
I changed the code and forced the write 20 times and I can see that even with the rpm reporting the new_worst_value, the next value gets accepted anyway.
Also i tried to print every regs that gets written and they doesn't change after the free... BUT as we already know... right after the free, rpm broke and start to reject every value except the very last one (as I think that the firmware just skip every kind of operation and just report a successful ack if the old voltage is equal to the new one)

I still can't understand if this is actually something related to memory... Would be very useful to know what the kernel does right after the free. (Clk disable if unused? Interrupt handling change?)

@robimarko analyzing the original code i notice a discrepancy... (aside from the fact that the original firmware used the rpm firmware mainly for the msm-bus interface that looks absent upstream)
I notice that the ack interrupt is set as

rc = request_irq(data->irq_ack, msm_rpm_ack_interrupt,
			IRQF_TRIGGER_RISING | IRQF_NO_SUSPEND,
			"rpm_drv", msm_rpm_ack_interrupt);

While the upstream code has

	ret = devm_request_irq(&pdev->dev,
			       irq_ack,
			       qcom_rpm_ack_interrupt,
			       IRQF_TRIGGER_RISING,
			       "qcom_rpm_ack",
			       rpm);
	if (ret) {
		dev_err(&pdev->dev, "failed to request ack interrupt\n");
		return ret;
	}

Also the original code has the irq_set_irq_wake used instead of disabled.

Interestingly, adding the missing interrupt type trigger the following bugs...

Any idea what is this about?
Also do you mind if you can try to reproduce this? In theory you should just add the interrupt type...

Hm, can you try defining the ACK interrupt(Most likely other RPM) ones as rising edge as its defines as level high in the DTS?

This could be a common Qualcomm IRQ issue as their downstream DTS definitions don't always match the upstream kernel ones.
For example, IPQ6018 has QPIC BAM IRQ defined as rising edge while in reality its level high.
And trying to define it as rising edge will cause a ton of errors in the kernel.

I wont be able to build this until monday/tuesday as I have a really full weekend.

Didn't even notice that the definition is wrong in the dts... isn't that bad?
But anyway isn't strange that a memory bug is caused by an interrupt set wrong?
Also also isn't strange that it does work with the current setup?

Hm, actually the RPM driver is ignoring the DT flags anyway and forcing the rising edge trigger as it's passed in the flags field instead of 0 which would tell the kernel to use the ones from DTS.
So that is why it's working even with the wrong IRQ level in the DTS.

IRQF_NO_SUSPEND should not really matter as all it does is not disable the IRQ in suspend state.
As far as I know we dont even have suspend enabled at all?

well we have some power saving feature defined... but in theory is never used... Isn't strange that the introduction of suspend triggered that bug?
the enabled-propriety in the cpu is used for the power saving feature