MLK-10073-3 cpufreq: imx6q-cpufreq: add arm-soc-shared property
authorRobin Gong <b38343@freescale.com>
Sun, 4 Jan 2015 08:56:11 +0000 (16:56 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:48:37 +0000 (14:48 -0500)
Pfuze200 only provide one power supply for VDDARM_IN and VDDSOC_IN,
for ldo-bypass mode, we have to pretend they are different regulators
otherwise regulator famework will refuse update voltage.

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 1b41ab90288b2accd710f8852c11753007749e4a)

drivers/cpufreq/imx6q-cpufreq.c

index 1a09355..8e6d245 100644 (file)
@@ -236,6 +236,16 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
                goto put_node;
        }
 
+       /*
+        * soc_reg sync  with arm_reg if arm shares the same regulator
+        * with soc. Otherwise, regulator common framework will refuse to update
+        * this consumer's voltage right now while another consumer voltage
+        * still keep in old one. For example, imx6sx-sdb with pfuze200 in
+        * ldo-bypass mode.
+        */
+       of_property_read_u32(np, "fsl,arm-soc-shared", &i);
+       if (i == 1)
+               soc_reg = arm_reg;
        /*
         * We expect an OPP table supplied by platform.
         * Just, incase the platform did not supply the OPP