2021-02-25 07:39 AM
This is might save someone the few hours I spent tracking this down. I am wondering if this is a bug. It would seem like a reason that you have m4 sections in the device tree. So linux can be aware not to touch an M4 resource.
Linux shuts off the vdda shortly after booting thinking no one is using vdda and then it seems like the DAC is not working as we control it from M4.
So I am not sure if this is considered a bug or not. The solution is to set vdda as "regulator-always-on"
&m4_dac{
pinctrl-names = "default";
pinctrl-0 = <&m4_dac1_pins_mx>;
status = "okay";
vref-supply = <&vdda>; // Does not prevent vdda from being shut off.
};
vdda:ldo5{
regulator-name = "vdda";
regulator-min-microvolt = <2900000>;
regulator-max-microvolt = <2900000>;
interrupts = <IT_CURLIM_LDO5 0>;
regulator-always-on; // <--added
};
2021-03-01 06:15 AM
Hi,
thanks a lot for your findings.
We are clarifying that internally, but the regulator-always-on; seems the right solution, which seems missing in our wiki.
See this similar post https://community.st.com/s/question/0D53W00000Y4kuGSAR/stm32mp157dk2-how-to-enable-vdda-and-vref-regulators
Regards,
2021-03-17 02:01 AM
Hello,
Sorry for late answer.
Seems regulator-always-on is not needed if you enable the resource manager in the DT as stated in the wiki.
As I understand, this will tell Linux to bind M4 resources to remoteproc status to avoid shutting down VDDA if Cortex-M4 is running.
&m4_rproc {
m4_system_resources {
status = "okay";
};
};
Regards,
Patrick