How to modify the register in Debian



We want to modify the register 0x5A5B for PMIC feature.
How could I modify this register?
Is there any command or source code that I can modify it?


Best regards,


Hi Johnny

There’s a degree of guesswork on my side (which I hope @ndec can correct if needed) but I think the PMIC is “owned” by the RPM firmware meaning any attempt to alter a PMIC register would have to be brokered by the RPM.

Assuming I’m right about that then I don’t think Debian currently allows userspace to interact directly. The Debian kernel does provide a means to send command the RPM (qcom_rpm_smd_write() in drivers/soc/qcom/clk-smd-rpm.c). This is used from the clock, regulator and “msm_bus” drivers but I can’t see anything that allows userspace to send commands for debug/exploration purposes.



Hi Daniel,

Happy Chinese New Year~
Thanks for the response.
Because I’m in CNY last week, I just back to work today.
According to your response, if I want to set 0x5A5B to 0xD0, I can use the qcom_rpm_smd_write() to set this value.
But it seems this command only used for clock, regulator and msm_bus now.
On the other hand, it seems it only can set the value to 1 or 0 now. (EX:rpm_reg_write_active(), rpm_reg_enable())
So if I want to set 0x5A5B to 0xD0, I may need to use this command to add one more function to achieve it by myself, right?


Best regards,


Hi Johnny,

Would something like devmem/devmem2 work?


Hi vchong,

I have downloaded it and build it.
But it seems not work.

root@linaro-alip:~# devmem2 0x5a5b

/dev/mem opened.
Memory mapped at address 0x7fa618d000.
[   32.729761] Unhandled fault: alignment fault (0x92000021) at0x0000007fa618da5b

Bus error


Best regards,


Ok. Maybe the register is within the pmic and not accessible to the main system via memory mapping. Sorry.