summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-ux500/board-mop500-mcde.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500-mcde.h4
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c1098
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.h29
-rw-r--r--arch/arm/mach-ux500/board-mop500.c76
5 files changed, 933 insertions, 276 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-mcde.c b/arch/arm/mach-ux500/board-mop500-mcde.c
index 79c09f98a50..85e486f4732 100644
--- a/arch/arm/mach-ux500/board-mop500-mcde.c
+++ b/arch/arm/mach-ux500/board-mop500-mcde.c
@@ -419,7 +419,7 @@ static struct mcde_display_hdmi_platform_data av8100_hdmi_pdata = {
.rgb_2_yCbCr_transform = &rgb_2_yCbCr_transform,
};
-static struct mcde_display_device av8100_hdmi = {
+struct mcde_display_device av8100_hdmi = {
.name = "av8100_hdmi",
.id = AV8100_DISPLAY_ID,
.port = &port2,
diff --git a/arch/arm/mach-ux500/board-mop500-mcde.h b/arch/arm/mach-ux500/board-mop500-mcde.h
index 66447c95828..f84b70cc568 100644
--- a/arch/arm/mach-ux500/board-mop500-mcde.h
+++ b/arch/arm/mach-ux500/board-mop500-mcde.h
@@ -13,4 +13,8 @@
#include <video/mcde_display.h>
+#ifdef CONFIG_DISPLAY_AV8100_TERTIARY
+extern struct mcde_display_device av8100_hdmi;
+#endif
+
#endif /* __BOARD_MOP500_MCDE_H */
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index d2bd668c8dc..22f54b0bb63 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -1,202 +1,54 @@
/*
+ * Copyright (C) STMicroelectronics 2009
* Copyright (C) ST-Ericsson SA 2010
*
* License Terms: GNU General Public License v2
*
- * Authors: Sundar Iyer <sundar.iyer@stericsson.com>
- * Bengt Jonsson <bengt.g.jonsson@stericsson.com>
+ * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
+ * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
*
* MOP500 board specific initialization for regulators
*/
-#include <linux/kernel.h>
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/amba/bus.h>
#include <linux/regulator/machine.h>
-#include <linux/regulator/ab8500.h>
+
#include "board-mop500-regulators.h"
#include "board-mop500-mcde.h"
#ifdef CONFIG_U8500_REGULATOR_DEBUG
-#define REGULATOR_SUPPLY_DEBUG REGULATOR_SUPPLY
+#define REGULATOR_SUPPLY_DEBUG REGULATOR_SUPPLY
#else
#define REGULATOR_SUPPLY_DEBUG(_name, _dev_name)
#endif
/*
- * GPIO regulator controlled by the ab8500 GPIO16
- */
-static struct regulator_consumer_supply gpio_wlan_vbat_consumers[] = {
- /* for cg2900 chip */
- REGULATOR_SUPPLY("vdd", "cg2900-uart.0"),
- /* for cw1200 chip */
- REGULATOR_SUPPLY("vdd", "cw1200_wlan"),
-};
-
-struct regulator_init_data gpio_wlan_vbat_regulator = {
- .constraints = {
- .name = "WLAN-VBAT",
- .min_uV = 3600000,
- .max_uV = 3600000,
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .num_consumer_supplies = ARRAY_SIZE(gpio_wlan_vbat_consumers),
- .consumer_supplies = gpio_wlan_vbat_consumers,
-};
-
-/*
- * TPS61052 regulator
+ * AB8500 Regulator Configuration
*/
-static struct regulator_consumer_supply tps61052_vaudio_consumers[] = {
- /*
- * Boost converter supply to raise voltage on audio speaker, this
- * is actually connected to three pins, VInVhfL (left amplifier)
- * VInVhfR (right amplifier) and VIntDClassInt - all three must
- * be connected to the same voltage.
- */
- REGULATOR_SUPPLY("vintdclassint", "ab8500-codec.0"),
-};
-
-struct regulator_init_data tps61052_regulator = {
- .constraints = {
- .name = "vaudio-hf",
- .min_uV = 4500000,
- .max_uV = 4500000,
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .num_consumer_supplies = ARRAY_SIZE(tps61052_vaudio_consumers),
- .consumer_supplies = tps61052_vaudio_consumers,
-};
-
-static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
- /* External displays, connector on board 2v5 power supply */
- REGULATOR_SUPPLY("vaux12v5", "mcde_disp_generic.0"),
- /* SFH7741 proximity sensor */
- REGULATOR_SUPPLY("vcc", "gpio-keys.0"),
- /* BH1780GLS ambient light sensor */
- REGULATOR_SUPPLY("vcc", "2-0029"),
- /* lsm303dlh accelerometer */
- REGULATOR_SUPPLY("vdd", "lsm303dlh.0"),
- /* lsm303dlh magnetometer */
- REGULATOR_SUPPLY("vdd", "lsm303dlh.1"),
- /* Rohm BU21013 Touchscreen devices */
- REGULATOR_SUPPLY("avdd", "3-005c"),
- REGULATOR_SUPPLY("avdd", "3-005d"),
- /* Synaptics RMI4 Touchscreen device */
- REGULATOR_SUPPLY("vdd", "3-004b"),
- /* L3G4200D Gyroscope device */
- REGULATOR_SUPPLY("vdd", "l3g4200d"),
- /* Camera sensors */
- REGULATOR_SUPPLY("v-mmio-camera", "mmio_camera"),
- REGULATOR_SUPPLY_DEBUG("aux1", "reg-virt-consumer.0")
-};
-
-static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
- /* On-board eMMC power */
- REGULATOR_SUPPLY("vmmc", "sdi4"),
- /* AB8500 audio codec */
- REGULATOR_SUPPLY("vcc-avswitch", "ab8500-codec.0"),
- REGULATOR_SUPPLY("vcc-avswitch", "ab8500-acc-det.0"),
-#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
- REGULATOR_SUPPLY("v-ab8500-AV-switch", "mcde_tv_ab8500.2"),
-#endif
-#ifdef CONFIG_DISPLAY_AV8100_TERTIARY
- REGULATOR_SUPPLY("v-av8100-AV-switch", "av8100_hdmi.0"),
- REGULATOR_SUPPLY("v-av8100-AV-switch", "av8100_hdmi.1"),
-#endif
- REGULATOR_SUPPLY_DEBUG("aux2", "reg-virt-consumer.1")
-};
-
-static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
- /* External MMC slot power */
- REGULATOR_SUPPLY("vmmc", "sdi0"),
- REGULATOR_SUPPLY_DEBUG("aux3", "reg-virt-consumer.2")
-};
-
-static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
- /* SoC core supply, no device */
- REGULATOR_SUPPLY("v-intcore", NULL),
- /* USB Transciever */
- REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
- REGULATOR_SUPPLY_DEBUG("intcore", "reg-virt-consumer.3")
-};
-
-static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
- /* TV-out DENC supply */
- REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
- /* Internal general-purpose ADC */
- REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
- REGULATOR_SUPPLY("vddadc", "ab8500-charger.0"),
-#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
- REGULATOR_SUPPLY("v-tvout", "mcde_tv_ab8500.2"),
-#endif
- REGULATOR_SUPPLY_DEBUG("tvout", "reg-virt-consumer.4")
-};
-
-static struct regulator_consumer_supply ab8500_vaudio_consumers[] = {
- /* vaudio regulator, supply for ab8500-vaudio */
- REGULATOR_SUPPLY("v-audio", NULL),
- REGULATOR_SUPPLY_DEBUG("audio", "reg-virt-consumer.5")
-};
-
-static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
- /* vamic1 regulator */
- REGULATOR_SUPPLY("v-amic1", NULL),
- REGULATOR_SUPPLY_DEBUG("anamic1", "reg-virt-consumer.6")
-};
-
-static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
- /* vamic2 regulator */
- REGULATOR_SUPPLY("v-amic2", NULL),
- REGULATOR_SUPPLY_DEBUG("anamic2", "reg-virt-consumer.7")
-};
-
-static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
- /* supply for v-dmic, VDMIC LDO */
- REGULATOR_SUPPLY("v-dmic", NULL),
- REGULATOR_SUPPLY_DEBUG("dmic", "reg-virt-consumer.8")
-};
-
-static struct regulator_consumer_supply ab8500_vana_consumers[] = {
- /* External displays, connector on board, 1v8 power supply */
- REGULATOR_SUPPLY("vsmps2", "mcde.0"),
- /* for analogue part of displays */
- REGULATOR_SUPPLY("v-ana", "mcde"),
- /* camera supply */
- REGULATOR_SUPPLY("v-ana", "mmio_camera"),
- REGULATOR_SUPPLY_DEBUG("ana", "reg-virt-consumer.9")
-};
-
-/* supply for CG2900 */
-static struct regulator_consumer_supply ab8500_sysclkreq_2_consumers[] = {
- REGULATOR_SUPPLY("gbf_1v8", "cg2900-uart.0"),
- REGULATOR_SUPPLY_DEBUG("sysclkreq-2", "reg-virt-consumer.10")
-};
-
-/* supply for CW1200 */
-static struct regulator_consumer_supply ab8500_sysclkreq_4_consumers[] = {
- REGULATOR_SUPPLY("wlan_1v8", "cw1200"),
- REGULATOR_SUPPLY_DEBUG("sysclkreq-4", "reg-virt-consumer.11")
-};
/* ab8500 regulator register initialization */
struct ab8500_regulator_reg_init
-ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
+ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
/*
* VanaRequestCtrl = HP/LP depending on VxRequest
* VpllRequestCtrl = HP/LP depending on VxRequest
* VextSupply1RequestCtrl = HP/LP depending on VxRequest
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0xfc, 0x00),
/*
* VextSupply2RequestCtrl = HP/LP depending on VxRequest
* VextSupply3RequestCtrl = HP/LP depending on VxRequest
* Vaux1RequestCtrl = HP/LP depending on VxRequest
* Vaux2RequestCtrl = HP/LP depending on VxRequest
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0xff, 0x00),
/*
* Vaux3RequestCtrl = HP/LP depending on VxRequest
* SwHPReq = Control through SWValid disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x07, 0x00),
/*
* Vsmps1SysClkReq1HPValid = enabled
* Vsmps2SysClkReq1HPValid = enabled
@@ -207,44 +59,44 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
* Vaux2SysClkReq1HPValid = disabled
* Vaux3SysClkReq1HPValid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x17),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0xff, 0x17),
/*
* VextSupply1SysClkReq1HPValid = disabled
* VextSupply2SysClkReq1HPValid = disabled
* VextSupply3SysClkReq1HPValid = SysClkReq1 controlled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x40),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x70, 0x40),
/*
* VanaHwHPReq1Valid = disabled
* Vaux1HwHPreq1Valid = disabled
* Vaux2HwHPReq1Valid = disabled
* Vaux3HwHPReqValid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0xe8, 0x00),
/*
* VextSupply1HwHPReq1Valid = disabled
* VextSupply2HwHPReq1Valid = disabled
* VextSupply3HwHPReq1Valid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x07, 0x00),
/*
* VanaHwHPReq2Valid = disabled
* Vaux1HwHPReq2Valid = disabled
* Vaux2HwHPReq2Valid = disabled
* Vaux3HwHPReq2Valid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0xe8, 0x00),
/*
* VextSupply1HwHPReq2Valid = disabled
* VextSupply2HwHPReq2Valid = disabled
* VextSupply3HwHPReq2Valid = HWReq2 controlled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x04),
+ INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x07, 0x04),
/*
* VanaSwHPReqValid = disabled
* Vaux1SwHPReqValid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0xa0, 0x00),
/*
* Vaux2SwHPReqValid = disabled
* Vaux3SwHPReqValid = disabled
@@ -252,7 +104,7 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
* VextSupply2SwHPReqValid = disabled
* VextSupply3SwHPReqValid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x1f, 0x00),
/*
* SysClkReq2Valid1 = SysClkReq2 controlled
* SysClkReq3Valid1 = disabled
@@ -262,7 +114,7 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
* SysClkReq7Valid1 = disabled
* SysClkReq8Valid1 = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0x2a),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0xfe, 0x2a),
/*
* SysClkReq2Valid2 = disabled
* SysClkReq3Valid2 = disabled
@@ -272,7 +124,7 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
* SysClkReq7Valid2 = disabled
* SysClkReq8Valid2 = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0x20),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0xfe, 0x20),
/*
* VTVoutEna = disabled
* Vintcore12Ena = disabled
@@ -280,73 +132,55 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
* Vintcore12LP = inactive (HP)
* VTVoutLP = inactive (HP)
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0x10),
+ INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0xfe, 0x10),
/*
* VaudioEna = disabled
* VdmicEna = disabled
* Vamic1Ena = disabled
* Vamic2Ena = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x1e, 0x00),
/*
* Vamic1_dzout = high-Z when Vamic1 is disabled
* Vamic2_dzout = high-Z when Vamic2 is disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x00),
- /*
- * VBBN = force OFF
- * VBBP = force OFF
- * NOTE! PRCMU register
- */
- INIT_REGULATOR_REGISTER(AB8500_ARMREGU2, 0x00),
- /*
- * VBBNSel1 = VBBP = VBBPFB
- * VBBPSel1 = 0 V
- * NOTE! PRCMU register
- */
- INIT_REGULATOR_REGISTER(AB8500_VBBSEL1, 0x00),
- /*
- * VBBNSel2 = VBBP = VBBPFB
- * VBBPSel2 = 0 V
- * NOTE! PRCMU register
- */
- INIT_REGULATOR_REGISTER(AB8500_VBBSEL2, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x03, 0x00),
/*
* Vsmps1Regu = HW control
* Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2
*/
- INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x06),
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x0f, 0x06),
/*
* Vsmps2Regu = HW control
* Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2
*/
- INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x06),
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x0f, 0x06),
/*
* Vsmps3Sel2 = 1.2125 V
* NOTE! PRCMU register
*/
- INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL2, 0x29),
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL2, 0x7f, 0x29),
/*
* Vsmps3Regu = HW control
* Vsmps3SelCtrl = Vsmps3 voltage defined by Vsmps3Sel2
* NOTE! PRCMU register
*/
- INIT_REGULATOR_REGISTER(AB8500_VSMPS3REGU, 0x06),
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS3REGU, 0x0f, 0x06),
/*
- * Vsmps3Sel1 = 1.0 V
+ * Vsmps3Sel1 = 0.925V
* NOTE! PRCMU register
*/
- INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL1, 0x18),
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL1, 0x7f, 0x12),
/*
* VPll = Hw controlled
* VanaRegu = force off
*/
- INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x02),
+ INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x0f, 0x02),
/*
* VrefDDREna = disabled
* VrefDDRSleepMode = inactive (no pulldown)
*/
- INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x03, 0x00),
/*
* VextSupply1Regu = HW control
* VextSupply2Regu = HW control
@@ -354,37 +188,37 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
* ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0
* ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0
*/
- INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0x1a),
+ INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0xff, 0x1a),
/*
* Vaux1Regu = force HP
* Vaux2Regu = force off
*/
- INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x01),
+ INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x0f, 0x01),
/*
* Vrf1Regu = HW control
* Vaux3Regu = force off
*/
- INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x08),
+ INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x0f, 0x08),
/*
* Vsmps1Sel1 = 1.2 V
*/
- INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x28),
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x3f, 0x28),
/*
- * Vaux1Sel = 2.5 V
+ * Vaux1Sel = 2.8 V
*/
- INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x08),
+ INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x0C),
/*
* Vaux2Sel = 2.9 V
*/
- INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0d),
+ INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0f, 0x0d),
/*
* Vaux3Sel = 2.91 V
*/
- INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07),
+ INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07, 0x07),
/*
* VextSupply12LP = disabled (no LP)
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x01, 0x00),
/*
* Vaux1Disch = short discharge time
* Vaux2Disch = short discharge time
@@ -393,33 +227,241 @@ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
* VTVoutDisch = short discharge time
* VaudioDisch = short discharge time
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0xfc, 0x00),
/*
* VanaDisch = short discharge time
* VdmicPullDownEna = pulldown disabled when Vdmic is disabled
* VdmicDisch = short discharge time
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x16, 0x00),
+};
+
+/* vana regulator configuration, for analogue part of displays */
+static struct regulator_consumer_supply ab8500_vana_consumers[] = {
+ /* External displays, connector on board, 1v8 power supply */
+ REGULATOR_SUPPLY("vsmps2", "mcde.0"),
+ {
+ .dev_name = "mcde",
+ .supply = "v-ana",
+ },
+ {
+ .dev_name = "mmio_camera",
+ .supply = "v-ana",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.9",
+ .supply = "ana",
+ },
+#endif
};
-/* AB8500 regulators */
+#ifdef CONFIG_SENSORS1P_MOP
+extern struct platform_device sensors1p_device;
+#endif
+
+/* vaux1 regulator configuration */
+static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
+ /* External displays, connector on board 2v5 power supply */
+ REGULATOR_SUPPLY("vaux12v5", "mcde_disp_generic.0"),
+ /* SFH7741 proximity sensor */
+ REGULATOR_SUPPLY("vcc", "gpio-keys.0"),
+ /* BH1780GLS ambient light sensor */
+ REGULATOR_SUPPLY("vcc", "2-0029"),
+ /* lsm303dlh accelerometer */
+ REGULATOR_SUPPLY("vdd", "lsm303dlh.0"),
+ /* lsm303dlh magnetometer */
+ REGULATOR_SUPPLY("vdd", "lsm303dlh.1"),
+ /* Rohm BU21013 Touchscreen devices */
+ REGULATOR_SUPPLY("avdd", "3-005c"),
+ REGULATOR_SUPPLY("avdd", "3-005d"),
+ /* Synaptics RMI4 Touchscreen device */
+ REGULATOR_SUPPLY("vdd", "3-004b"),
+ /* L3G4200D Gyroscope device */
+ REGULATOR_SUPPLY("vdd", "l3g4200d"),
+ REGULATOR_SUPPLY("v-mmio-camera", "mmio_camera"),
+
+ {
+ .dev = NULL,
+ .supply = "v-display",
+ },
+#ifdef CONFIG_SENSORS1P_MOP
+ {
+ .dev = &sensors1p_device.dev,
+ .supply = "v-proximity",
+ },
+ {
+ .dev = &sensors1p_device.dev,
+ .supply = "v-hal",
+ },
+#endif
+#ifdef CONFIG_SENSORS_BH1780
+ {
+ .dev_name = "bh1780",
+ .supply = "v-als",
+ },
+#endif
+ {
+ .dev_name = "spi8.0",
+ .supply = "vcpin",
+ },
+ REGULATOR_SUPPLY_DEBUG("aux1", "reg-virt-consumer.0")
+};
+
+/* vaux2 regulator configuration */
+static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
+ /* On-board eMMC power */
+ REGULATOR_SUPPLY("vmmc", "sdi4"),
+ /* AB8500 audio codec */
+ REGULATOR_SUPPLY("vcc-avswitch", "ab8500-codec.0"),
+ REGULATOR_SUPPLY("vcc-avswitch", "ab8500-acc-det.0"),
+ {
+ .dev_name = "sdi4",
+ .supply = "v-eMMC",
+ },
+#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
+ {
+ .dev = &tvout_ab8500_display.dev,
+ .supply = "v-ab8500-AV-switch",
+ },
+#endif
+#ifdef CONFIG_DISPLAY_AV8100_TERTIARY
+ {
+ .dev = &av8100_hdmi.dev,
+ .supply = "v-av8100-AV-switch",
+ },
+#endif
+ REGULATOR_SUPPLY_DEBUG("aux2", "reg-virt-consumer.1")
+};
+
+/* vaux3 regulator configuration */
+static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
+ /* External MMC slot power */
+ REGULATOR_SUPPLY("vmmc", "sdi0"),
+
+ {
+ .dev_name = "sdi0",
+ .supply = "v-MMC-SD"
+ },
+ REGULATOR_SUPPLY_DEBUG("aux3", "reg-virt-consumer.2")
+};
+
+/* vtvout regulator configuration, supply for tvout, gpadc, TVOUT LDO */
+static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
+ /* TV-out DENC supply */
+ REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
+ /* Internal general-purpose ADC */
+ REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
+ REGULATOR_SUPPLY("vddadc", "ab8500-charger.0"),
+#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
+ {
+ .dev = &tvout_ab8500_display.dev,
+ .supply = "v-tvout",
+ },
+#endif
+ REGULATOR_SUPPLY_DEBUG("tvout", "reg-virt-consumer.4")
+};
+
+/* vaudio regulator configuration, supply for ab8500-vaudio, VAUDIO LDO */
+static struct regulator_consumer_supply ab8500_vaudio_consumers[] = {
+ /* vaudio regulator, supply for ab8500-vaudio */
+ REGULATOR_SUPPLY("v-audio", NULL),
+ REGULATOR_SUPPLY_DEBUG("audio", "reg-virt-consumer.5")
+};
+
+/* vamic1 regulator configuration */
+static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
+ {
+ .supply = "v-amic1",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.6",
+ .supply = "anamic1",
+ },
+#endif
+};
+
+/* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
+static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
+ {
+ .supply = "v-amic2",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.7",
+ .supply = "anamic2",
+ },
+#endif
+};
+
+/* supply for v-dmic, VDMIC LDO */
+static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
+ {
+ .supply = "v-dmic",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.8",
+ .supply = "dmic",
+ },
+#endif
+};
+
+/* supply for v-intcore12, VINTCORE12 LDO */
+static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
+ /* SoC core supply, no device */
+ REGULATOR_SUPPLY("v-intcore", NULL),
+ /* USB Transciever */
+ REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
+ {
+ .dev_name = "ab8500-usb.0",
+ .supply = "v-intcore",
+ },
+ REGULATOR_SUPPLY_DEBUG("intcore", "reg-virt-consumer.3")
+};
+
+/* supply for CG2900 */
+static struct regulator_consumer_supply ab8500_sysclkreq_2_consumers[] = {
+ {
+ .dev_name = "cg2900-uart.0",
+ .supply = "gbf_1v8",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.10",
+ .supply = "sysclkreq-2",
+ },
+#endif
+};
+
+/* supply for CW1200 */
+static struct regulator_consumer_supply ab8500_sysclkreq_4_consumers[] = {
+ {
+ .dev_name = "cw1200",
+ .supply = "wlan_1v8",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.11",
+ .supply = "sysclkreq-4",
+ },
+#endif
+};
+
+/*
+ * AB8500 regulators
+ */
struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supplies to the display/camera */
[AB8500_LDO_AUX1] = {
.constraints = {
- .name = "V-DISPLAY",
- .min_uV = 2500000,
- .max_uV = 2900000,
+ .name = "ab8500-vaux1",
+ .min_uV = 2800000,
+ .max_uV = 3300000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_STATUS,
- .boot_on = 1, /* display is on at boot */
- /*
- * This voltage cannot be disabled right now because
- * it is somehow affecting the external MMC
- * functionality, though that typically will use
- * AUX3.
- */
- .always_on = 1,
+ .boot_on = 1, /* must be on for display */
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
.consumer_supplies = ab8500_vaux1_consumers,
@@ -427,7 +469,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supplies to the on-board eMMC */
[AB8500_LDO_AUX2] = {
.constraints = {
- .name = "V-eMMC1",
+ .name = "ab8500-vaux2",
.min_uV = 1100000,
.max_uV = 3300000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
@@ -442,7 +484,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for VAUX3, supplies to SDcard slots */
[AB8500_LDO_AUX3] = {
.constraints = {
- .name = "V-MMC-SD",
+ .name = "ab8500-vaux3",
.min_uV = 1100000,
.max_uV = 3300000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
@@ -457,7 +499,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for tvout, gpadc, TVOUT LDO */
[AB8500_LDO_TVOUT] = {
.constraints = {
- .name = "V-TVOUT",
+ .name = "ab8500-vtvout",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vtvout_consumers),
@@ -466,7 +508,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for ab8500-vaudio, VAUDIO LDO */
[AB8500_LDO_AUDIO] = {
.constraints = {
- .name = "V-AUD",
+ .name = "ab8500-vaudio",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vaudio_consumers),
@@ -475,7 +517,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for v-anamic1 VAMic1-LDO */
[AB8500_LDO_ANAMIC1] = {
.constraints = {
- .name = "V-AMIC1",
+ .name = "ab8500-vamic1",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers),
@@ -484,7 +526,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
[AB8500_LDO_ANAMIC2] = {
.constraints = {
- .name = "V-AMIC2",
+ .name = "ab8500-vamic2",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers),
@@ -493,7 +535,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for v-dmic, VDMIC LDO */
[AB8500_LDO_DMIC] = {
.constraints = {
- .name = "V-DMIC",
+ .name = "ab8500-vdmic",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers),
@@ -502,7 +544,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for v-intcore12, VINTCORE12 LDO */
[AB8500_LDO_INTCORE] = {
.constraints = {
- .name = "V-INTCORE",
+ .name = "ab8500-vintcore",
.min_uV = 1250000,
.max_uV = 1350000,
.input_uV = 1800000,
@@ -519,7 +561,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for U8500 CSI/DSI, VANA LDO */
[AB8500_LDO_ANA] = {
.constraints = {
- .name = "V-CSI-DSI",
+ .name = "ab8500-vana",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers),
@@ -546,3 +588,593 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
.consumer_supplies = ab8500_sysclkreq_4_consumers,
},
};
+
+/*
+ * Power State Regulator Configuration
+ */
+#define U8500_VAPE_REGULATOR_MIN_VOLTAGE 1800000
+#define U8500_VAPE_REGULATOR_MAX_VOLTAGE 2000000
+
+/* vape regulator configuration */
+static struct regulator_consumer_supply u8500_vape_consumers[] = {
+ {
+ .supply = "v-ape",
+ },
+ {
+ .dev_name = "nmk-i2c.0",
+ .supply = "v-i2c",
+ },
+ {
+ .dev_name = "nmk-i2c.1",
+ .supply = "v-i2c",
+ },
+ {
+ .dev_name = "nmk-i2c.2",
+ .supply = "v-i2c",
+ },
+ {
+ .dev_name = "nmk-i2c.3",
+ .supply = "v-i2c",
+ },
+ {
+ .dev_name = "sdi0",
+ .supply = "v-mmc",
+ },
+ {
+ .dev_name = "sdi1",
+ .supply = "v-mmc",
+ },
+ {
+ .dev_name = "sdi2",
+ .supply = "v-mmc",
+ },
+ {
+ .dev_name = "sdi4",
+ .supply = "v-mmc",
+ },
+ {
+ .dev_name = "dma40.0",
+ .supply = "v-dma",
+ },
+ {
+ .dev_name = "ab8500-usb.0",
+ .supply = "v-ape",
+ },
+ {
+ .dev_name = "uart0",
+ .supply = "v-uart",
+ },
+ {
+ .dev_name = "uart1",
+ .supply = "v-uart",
+ },
+ {
+ .dev_name = "uart2",
+ .supply = "v-uart",
+ },
+ {
+ .dev_name = "nmk-ske-keypad",
+ .supply = "v-ape",
+ },
+ {
+ .dev_name = "ste_hsi.0",
+ .supply = "v-hsi",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.12",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_vape_regulator = {
+ .constraints = {
+ .name = "u8500-vape",
+ .min_uV = U8500_VAPE_REGULATOR_MIN_VOLTAGE,
+ .max_uV = U8500_VAPE_REGULATOR_MAX_VOLTAGE,
+ .input_uV = 1, /* notional, for set_mode* */
+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+ REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_DRMS |
+ REGULATOR_CHANGE_STATUS,
+ .valid_modes_mask = REGULATOR_MODE_NORMAL |
+ REGULATOR_MODE_IDLE,
+ },
+ .consumer_supplies = u8500_vape_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_vape_consumers),
+};
+
+/* varm regulator_configuration */
+static struct regulator_consumer_supply u8500_varm_consumers[] = {
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.13",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_varm_regulator = {
+ .constraints = {
+ .name = "u8500-varm",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_varm_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_varm_consumers),
+};
+
+/* vmodem regulator configuration */
+static struct regulator_consumer_supply u8500_vmodem_consumers[] = {
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.14",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_vmodem_regulator = {
+ .constraints = {
+ .name = "u8500-vmodem",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_vmodem_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_vmodem_consumers),
+};
+
+/* vpll regulator configuration */
+static struct regulator_consumer_supply u8500_vpll_consumers[] = {
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.15",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_vpll_regulator = {
+ .constraints = {
+ .name = "u8500-vpll",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_vpll_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_vpll_consumers),
+};
+
+/* vsmps1 regulator configuration */
+static struct regulator_consumer_supply u8500_vsmps1_consumers[] = {
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.16",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_vsmps1_regulator = {
+ .constraints = {
+ .name = "u8500-vsmps1",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_vsmps1_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_vsmps1_consumers),
+};
+
+/* vsmsp2 regulator configuration */
+static struct regulator_consumer_supply u8500_vsmps2_consumers[] = {
+ {
+ .dev_name = "ab8500-usb.0",
+ .supply = "musb_1v8",
+ },
+ {
+ .dev_name = "0-0070",
+ .supply = "hdmi_1v8",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.17",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_vsmps2_regulator = {
+ .constraints = {
+ .name = "u8500-vsmps2",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_vsmps2_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_vsmps2_consumers),
+};
+
+/* vsmps3 regulator configuration */
+static struct regulator_consumer_supply u8500_vsmps3_consumers[] = {
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.18",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_vsmps3_regulator = {
+ .constraints = {
+ .name = "u8500-vsmps3",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_vsmps3_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_vsmps3_consumers),
+};
+
+/* vrf1 regulator configuration */
+static struct regulator_consumer_supply u8500_vrf1_consumers[] = {
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.19",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_vrf1_regulator = {
+ .constraints = {
+ .name = "u8500-vrf1",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_vrf1_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_vrf1_consumers),
+};
+
+/*
+ * Power Domain Switch Configuration
+ */
+
+/* SVA MMDSP regulator switch */
+static struct regulator_consumer_supply u8500_svammdsp_consumers[] = {
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-sva-mmdsp",
+ },
+ {
+ .dev_name = "cm_control",
+ .supply = "sva-mmdsp",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.20",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_svammdsp_regulator = {
+ /* dependency to u8500-vape is handled outside regulator framework */
+ .constraints = {
+ .name = "u8500-sva-mmdsp",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_svammdsp_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_svammdsp_consumers),
+};
+
+/* SVA MMDSP retention regulator switch */
+static struct regulator_consumer_supply u8500_svammdspret_consumers[] = {
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-sva-mmdsp-ret",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.21",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_svammdspret_regulator = {
+ .constraints = {
+ .name = "u8500-sva-mmdsp-ret",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_svammdspret_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_svammdspret_consumers),
+};
+
+/* SVA pipe regulator switch */
+static struct regulator_consumer_supply u8500_svapipe_consumers[] = {
+ /* Add SVA pipe device supply here */
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-sva-pipe",
+ },
+ {
+ .dev_name = "cm_control",
+ .supply = "sva-pipe",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.22",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_svapipe_regulator = {
+ /* dependency to u8500-vape is handled outside regulator framework */
+ .constraints = {
+ .name = "u8500-sva-pipe",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_svapipe_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_svapipe_consumers),
+};
+
+/* SIA MMDSP regulator switch */
+static struct regulator_consumer_supply u8500_siammdsp_consumers[] = {
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-sia-mmdsp",
+ },
+ {
+ .dev_name = "cm_control",
+ .supply = "sia-mmdsp",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.23",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_siammdsp_regulator = {
+ /* dependency to u8500-vape is handled outside regulator framework */
+ .constraints = {
+ .name = "u8500-sia-mmdsp",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_siammdsp_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_siammdsp_consumers),
+};
+
+/* SIA MMDSP retention regulator switch */
+static struct regulator_consumer_supply u8500_siammdspret_consumers[] = {
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-sia-mmdsp-ret",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.24",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_siammdspret_regulator = {
+ .constraints = {
+ .name = "u8500-sia-mmdsp-ret",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_siammdspret_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_siammdspret_consumers),
+};
+
+/* SIA pipe regulator switch */
+static struct regulator_consumer_supply u8500_siapipe_consumers[] = {
+ /* Add SIA pipe device supply here */
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-sia-pipe",
+ },
+ {
+ .dev_name = "cm_control",
+ .supply = "sia-pipe",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.25",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_siapipe_regulator = {
+ /* dependency to u8500-vape is handled outside regulator framework */
+ .constraints = {
+ .name = "u8500-sia-pipe",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_siapipe_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_siapipe_consumers),
+};
+
+/* SGA regulator switch */
+static struct regulator_consumer_supply u8500_sga_consumers[] = {
+ /* Add SGA device supply here */
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-sga",
+ },
+ {
+ /*
+ * The Mali driver doesn't have access to the device when
+ * requesting the SGA regulator. Therefore only supply name.
+ */
+ .supply = "v-mali",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.26",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_sga_regulator = {
+ .supply_regulator = "u8500-vape",
+ .constraints = {
+ .name = "u8500-sga",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_sga_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_sga_consumers),
+};
+
+/* B2R2-MCDE regulator switch */
+static struct regulator_consumer_supply u8500_b2r2_mcde_consumers[] = {
+ {
+ .dev_name = "b2r2_bus",
+ .supply = "vsupply",
+ },
+ {
+ .dev_name = "mcde",
+ .supply = "vsupply",
+ },
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-b2r2",
+ },
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-mcde",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.27",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_b2r2_mcde_regulator = {
+ .supply_regulator = "u8500-vape",
+ .constraints = {
+ .name = "u8500-b2r2-mcde",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_b2r2_mcde_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_b2r2_mcde_consumers),
+};
+
+/* ESRAM1 and 2 regulator switch */
+static struct regulator_consumer_supply u8500_esram12_consumers[] = {
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-esram1",
+ },
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-esram2",
+ },
+ {
+ .dev_name = "cm_control",
+ .supply = "esram12",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.28",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_esram12_regulator = {
+ .supply_regulator = "u8500-vape",
+ .constraints = {
+ .name = "u8500-esram12",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_esram12_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_esram12_consumers),
+};
+
+/* ESRAM1 and 2 retention regulator switch */
+static struct regulator_consumer_supply u8500_esram12ret_consumers[] = {
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-esram1-ret",
+ },
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-esram2-ret",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.29",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_esram12ret_regulator = {
+ .constraints = {
+ .name = "u8500-esram12-ret",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_esram12ret_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_esram12ret_consumers),
+};
+
+/* ESRAM3 and 4 regulator switch */
+static struct regulator_consumer_supply u8500_esram34_consumers[] = {
+ {
+ .dev_name = "mcde",
+ .supply = "v-esram34",
+ },
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-esram3",
+ },
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-esram4",
+ },
+ {
+ .dev_name = "cm_control",
+ .supply = "esram34",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.30",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_esram34_regulator = {
+ .supply_regulator = "u8500-vape",
+ .constraints = {
+ .name = "u8500-esram34",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_esram34_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_esram34_consumers),
+};
+
+/* ESRAM3 and 4 retention regulator switch */
+static struct regulator_consumer_supply u8500_esram34ret_consumers[] = {
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-esram3-ret",
+ },
+ {
+ /* NOTE! This is a temporary supply for prcmu_set_hwacc */
+ .supply = "hwacc-esram4-ret",
+ },
+#ifdef CONFIG_U8500_REGULATOR_DEBUG
+ {
+ .dev_name = "reg-virt-consumer.31",
+ .supply = "test",
+ },
+#endif
+};
+
+struct regulator_init_data u8500_esram34ret_regulator = {
+ .constraints = {
+ .name = "u8500-esram34-ret",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .consumer_supplies = u8500_esram34ret_consumers,
+ .num_consumer_supplies = ARRAY_SIZE(u8500_esram34ret_consumers),
+};
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h
index d8c5694a35d..5a4f9560b1e 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.h
+++ b/arch/arm/mach-ux500/board-mop500-regulators.h
@@ -14,10 +14,33 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/ab8500.h>
+/* AB8500 regulators */
extern struct ab8500_regulator_reg_init
-ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
+ ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
-extern struct regulator_init_data tps61052_regulator;
-extern struct regulator_init_data gpio_wlan_vbat_regulator;
+
+/* U8500 specific regulators */
+extern struct regulator_init_data u8500_vape_regulator;
+extern struct regulator_init_data u8500_varm_regulator;
+extern struct regulator_init_data u8500_vmodem_regulator;
+extern struct regulator_init_data u8500_vpll_regulator;
+extern struct regulator_init_data u8500_vsmps1_regulator;
+extern struct regulator_init_data u8500_vsmps2_regulator;
+extern struct regulator_init_data u8500_vsmps3_regulator;
+extern struct regulator_init_data u8500_vrf1_regulator;
+
+/* U8500 specific regulator switches */
+extern struct regulator_init_data u8500_svammdsp_regulator;
+extern struct regulator_init_data u8500_svammdspret_regulator;
+extern struct regulator_init_data u8500_svapipe_regulator;
+extern struct regulator_init_data u8500_siammdsp_regulator;
+extern struct regulator_init_data u8500_siammdspret_regulator;
+extern struct regulator_init_data u8500_siapipe_regulator;
+extern struct regulator_init_data u8500_sga_regulator;
+extern struct regulator_init_data u8500_b2r2_mcde_regulator;
+extern struct regulator_init_data u8500_esram12_regulator;
+extern struct regulator_init_data u8500_esram12ret_regulator;
+extern struct regulator_init_data u8500_esram34_regulator;
+extern struct regulator_init_data u8500_esram34ret_regulator;
#endif
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 4de538717c3..d4ecdb82408 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -23,7 +23,6 @@
#include <linux/mfd/ab8500.h>
#include <linux/regulator/ab8500.h>
#include <linux/mfd/tc3589x.h>
-#include <linux/mfd/tps6105x.h>
#include <linux/mfd/ab8500/gpio.h>
#include <linux/regulator/fixed.h>
#include <linux/leds-lp5521.h>
@@ -63,6 +62,7 @@
#include "devices-db8500.h"
#include "board-mop500.h"
#include "board-mop500-regulators.h"
+#include "regulator-u8500.h"
#include "board-mop500-bm.h"
#include "board-mop500-wlan.h"
#include "board-mop500-usb.h"
@@ -237,6 +237,38 @@ static struct platform_device snowball_sbnet_dev = {
},
};
+static struct regulator_init_data *u8500_regulators[U8500_NUM_REGULATORS] = {
+ [U8500_REGULATOR_VAPE] = &u8500_vape_regulator,
+ [U8500_REGULATOR_VARM] = &u8500_varm_regulator,
+ [U8500_REGULATOR_VMODEM] = &u8500_vmodem_regulator,
+ [U8500_REGULATOR_VPLL] = &u8500_vpll_regulator,
+ [U8500_REGULATOR_VSMPS1] = &u8500_vsmps1_regulator,
+ [U8500_REGULATOR_VSMPS2] = &u8500_vsmps2_regulator,
+ [U8500_REGULATOR_VSMPS3] = &u8500_vsmps3_regulator,
+ [U8500_REGULATOR_VRF1] = &u8500_vrf1_regulator,
+ [U8500_REGULATOR_SWITCH_SVAMMDSP] = &u8500_svammdsp_regulator,
+ [U8500_REGULATOR_SWITCH_SVAMMDSPRET] = &u8500_svammdspret_regulator,
+ [U8500_REGULATOR_SWITCH_SVAPIPE] = &u8500_svapipe_regulator,
+ [U8500_REGULATOR_SWITCH_SIAMMDSP] = &u8500_siammdsp_regulator,
+ [U8500_REGULATOR_SWITCH_SIAMMDSPRET] = &u8500_siammdspret_regulator,
+ [U8500_REGULATOR_SWITCH_SIAPIPE] = &u8500_siapipe_regulator,
+ [U8500_REGULATOR_SWITCH_SGA] = &u8500_sga_regulator,
+ [U8500_REGULATOR_SWITCH_B2R2_MCDE] = &u8500_b2r2_mcde_regulator,
+ [U8500_REGULATOR_SWITCH_ESRAM12] = &u8500_esram12_regulator,
+ [U8500_REGULATOR_SWITCH_ESRAM12RET] = &u8500_esram12ret_regulator,
+ [U8500_REGULATOR_SWITCH_ESRAM34] = &u8500_esram34_regulator,
+ [U8500_REGULATOR_SWITCH_ESRAM34RET] = &u8500_esram34ret_regulator,
+};
+
+static struct platform_device u8500_regulator_dev = {
+ .name = "u8500-regulators",
+ .id = 0,
+ .dev = {
+ .platform_data = u8500_regulators,
+ },
+};
+
+
#ifdef CONFIG_MODEM_U8500
static struct platform_device u8500_modem_dev = {
.name = "u8500-modem",
@@ -291,28 +323,6 @@ struct platform_device ab8500_device = {
};
/*
- * TPS61052
- */
-
-static struct tps6105x_platform_data mop500_tps61052_data = {
- .mode = TPS6105X_MODE_VOLTAGE,
- .regulator_data = &tps61052_regulator,
-};
-
-/*
- * GPIO-regulator wlan vbat data
- */
-
-static struct fixed_voltage_config snowball_gpio_wlan_vbat_data = {
- .supply_name = "WLAN-VBAT",
- .gpio = SNOWBALL_EN_3V6_GPIO,
- .microvolts = 3600000,
- .enable_high = 1,
- .init_data = &gpio_wlan_vbat_regulator,
- .startup_delay = 3500, /* Startup time */
-};
-
-/*
* TC35892
*/
@@ -403,10 +413,6 @@ static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
.platform_data = &av8100_plat_data,
},
/* I2C0 devices only available prior to HREFv60 */
- {
- I2C_BOARD_INFO("tps61052", 0x33),
- .platform_data = &mop500_tps61052_data,
- },
};
#define NUM_PRE_V60_I2C0_DEVICES 1
@@ -503,14 +509,6 @@ static struct platform_device mop500_gpio_keys_device = {
},
};
-static struct platform_device snowball_gpio_wlan_vbat_regulator_device = {
- .name = "reg-fixed-voltage",
- .id = 0,
- .dev = {
- .platform_data = &snowball_gpio_wlan_vbat_data,
- },
-};
-
static int mop500_sensors1p_activate(struct device *dev)
{
sensors1p_regulator = regulator_get(&mop500_gpio_keys_device.dev,
@@ -940,7 +938,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
&snowball_led_dev,
&snowball_key_dev,
&snowball_sbnet_dev,
- &snowball_gpio_wlan_vbat_regulator_device,
&u8500_mcde_device,
&u8500_b2r2_device,
};
@@ -963,6 +960,10 @@ static void __init mop500_init_machine(void)
{
int i2c0_devs;
+#ifdef CONFIG_REGULATOR
+ platform_device_register(&u8500_regulator_dev);
+#endif
+
/*
* The HREFv60 board removed a GPIO expander and routed
* all these GPIO pins to the internal GPIO controller
@@ -1010,9 +1011,6 @@ static void __init mop500_init_machine(void)
platform_device_register(&ab8500_device);
i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
- if (machine_is_hrefv60())
- i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
-
i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
i2c_register_board_info(2, mop500_i2c2_devices,
ARRAY_SIZE(mop500_i2c2_devices));