Skip to contentSkip to conversation

ARM: mx6: pmu: Expose PMU LDO configuration interface

PATCH New Marek Vasut 2 participants 2 messages Nov 26, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mx6: pmu: Expose PMU LDO configuration interface

Make the PMU LDO configuration interface available to board code, so that board code can reconfigure the internal LDOs of the SoC.

Cc Eric Nelson <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
---
 arch/arm/include/asm/arch-mx6/sys_proto.h | 8 ++++++++
 arch/arm/mach-imx/mx6/soc.c               | 8 +-------
 2 files changed, 9 insertions(+), 7 deletions(-)
arch/arm/include/asm/arch-mx6/sys_proto.h +8 -0
index 4bf7dff8b4..1e5fa1a75e 100644
@@ -20,6 +20,14 @@
 int imx6_pcie_toggle_power(void);
 int imx6_pcie_toggle_reset(void);
 
+enum ldo_reg {
+	LDO_ARM,
+	LDO_SOC,
+	LDO_PU,
+};
+
+int set_ldo_voltage(enum ldo_reg ldo, u32 mv);
+
 /**
  * iomuxc_set_rgmii_io_voltage - set voltage level of RGMII/USB pins
  *
arch/arm/mach-imx/mx6/soc.c +1 -7
index 6dccee484c..3560dd7ee7 100644
@@ -23,12 +23,6 @@
 #include <imx_thermal.h>
 #include <mmc.h>
 
-enum ldo_reg {
-	LDO_ARM,
-	LDO_SOC,
-	LDO_PU,
-};
-
 struct scu_regs {
 	u32	ctrl;
 	u32	config;
@@ -254,7 +248,7 @@ static void clear_ldo_ramp(void)
  * Possible values are from 0.725V to 1.450V in steps of
  * 0.025V (25mV).
  */
-static int set_ldo_voltage(enum ldo_reg ldo, u32 mv)
+int set_ldo_voltage(enum ldo_reg ldo, u32 mv)
 {
 	struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
 	u32 val, step, old, reg = readl(&anatop->reg_core);
Signature · 1 line
2.24.0
#1 lore raw

PATCH 1/1 ARM: mx6: pmu: Expose PMU LDO configuration interface

Hi Marek,

Quoted 50 lines · Marek Vasut

Make the PMU LDO configuration interface available to board code, so that board code can reconfigure the internal LDOs of the SoC.

Cc Eric Nelson <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
---
  arch/arm/include/asm/arch-mx6/sys_proto.h | 8 ++++++++
  arch/arm/mach-imx/mx6/soc.c               | 8 +-------
  2 files changed, 9 insertions(+), 7 deletions(-)
arch/arm/include/asm/arch-mx6/sys_proto.h +8 -0
index 4bf7dff8b4..1e5fa1a75e 100644
@@ -20,6 +20,14 @@
  int imx6_pcie_toggle_power(void);
  int imx6_pcie_toggle_reset(void);
 
+enum ldo_reg {
+	LDO_ARM,
+	LDO_SOC,
+	LDO_PU,
+};
+
+int set_ldo_voltage(enum ldo_reg ldo, u32 mv);
+
  /**
   * iomuxc_set_rgmii_io_voltage - set voltage level of RGMII/USB pins
   *
arch/arm/mach-imx/mx6/soc.c +0 -6
index 6dccee484c..3560dd7ee7 100644
@@ -23,12 +23,6 @@
  #include <imx_thermal.h>
  #include <mmc.h>
 
-enum ldo_reg {
-	LDO_ARM,
-	LDO_SOC,
-	LDO_PU,
-};
-
  struct scu_regs {
  	u32	ctrl;
  	u32	config;

arch/arm/mach-imx/mx6/soc.c static void clear_ldo_ramp(void) · line 254

Quoted 8 lines
arch/arm/mach-imx/mx6/soc.c +1 -1
@@ -254,7 +248,7 @@ static void clear_ldo_ramp(void)
   * Possible values are from 0.725V to 1.450V in steps of
   * 0.025V (25mV).
   */
-static int set_ldo_voltage(enum ldo_reg ldo, u32 mv)
+int set_ldo_voltage(enum ldo_reg ldo, u32 mv)
  {
  	struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
  	u32 val, step, old, reg = readl(&anatop->reg_core);