public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: petr.cvek@tul•cz (Petr Cvek)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 11/21] ARM: pxa: magician: Add MAX1586 Vcore regulator support
Date: Tue, 18 Aug 2015 00:01:48 +0200	[thread overview]
Message-ID: <55D259CC.6040307@tul.cz> (raw)
In-Reply-To: <cover.1439843482.git.petr.cvek@tul.cz>

Add support for MAX1586 Vcore regulator.

Signed-off-by: Petr Cvek <petr.cvek@tul•cz>
---
 arch/arm/mach-pxa/magician.c | 50 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 9decd86..8ca0b67 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -96,6 +96,8 @@
 
 #include <sound/uda1380.h>
 
+#include <linux/regulator/max1586.h>
+
 #include "devices.h"
 #include "generic.h"
 
@@ -864,6 +866,52 @@ static struct platform_device vads7846_device = {
 };
 
 /*
+ * Vcore regulator MAX1587A
+ */
+
+static struct regulator_consumer_supply magician_max1587a_consumers[] = {
+	REGULATOR_SUPPLY("vcc_core", NULL),
+};
+
+static struct regulator_init_data magician_max1587a_v3_info = {
+	.constraints = {
+		.name		= "vcc_core range",
+		.min_uV		= 700000,
+		.max_uV		= 1500000,
+		.always_on	= 1,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+	},
+	.consumer_supplies	= magician_max1587a_consumers,
+	.num_consumer_supplies	= ARRAY_SIZE(magician_max1587a_consumers),
+};
+
+static struct max1586_subdev_data magician_max1587a_subdevs[] = {
+	{
+		.name		= "vcc_core",
+		.id		= MAX1586_V3,
+		.platform_data	= &magician_max1587a_v3_info,
+	}
+};
+
+static struct max1586_platform_data magician_max1587a_info = {
+	.subdevs     = magician_max1587a_subdevs,
+	.num_subdevs = ARRAY_SIZE(magician_max1587a_subdevs),
+	/*
+	 * NOTICE measured directly on the PCB (board_id == 0x3a), but
+	 * if R24 is present, it will boost the voltage
+	 * (write 1.475V, get 1.645V and smoke)
+	 */
+	.v3_gain     = MAX1586_GAIN_NO_R24,
+};
+
+static struct i2c_board_info magician_pwr_i2c_board_info[] __initdata = {
+	{
+		I2C_BOARD_INFO("max1586", 0x14),
+		.platform_data	= &magician_max1587a_info,
+	},
+};
+
+/*
  * MMC/SD
  */
 
@@ -1173,6 +1221,8 @@ static void __init magician_init(void)
 	pxa_set_i2c_info(&i2c_info);
 	i2c_register_board_info(0,
 		ARRAY_AND_SIZE(magician_audio_i2c_devices));
+	i2c_register_board_info(1,
+		ARRAY_AND_SIZE(magician_pwr_i2c_board_info));
 
 	pxa_set_mci_info(&magician_mci_info);
 	pxa_set_ohci_info(&magician_ohci_info);
-- 
1.7.12.1

  parent reply	other threads:[~2015-08-17 22:01 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1439843482.git.petr.cvek@tul.cz>
2015-08-17 21:56 ` [PATCH v2 01/21] ARM: pxa: magician: Fix Kconfig for magician to always include htc-egpio Petr Cvek
2015-08-18 18:31   ` Robert Jarzmik
2015-08-18 20:02     ` Petr Cvek
2015-08-19  7:29       ` Philipp Zabel
2015-08-24  3:39         ` Petr Cvek
2015-08-17 21:56 ` [PATCH v2 02/21] ARM: pxa: magician: Fix indentation and whitespaces Petr Cvek
2015-08-18 18:32   ` Robert Jarzmik
2015-08-19  7:42   ` Philipp Zabel
2015-08-17 21:57 ` [PATCH v2 03/21] ARM: pxa: magician: Fix comments, debug functions and print strings Petr Cvek
2015-08-18 18:39   ` Robert Jarzmik
2015-08-18 23:09     ` Petr Cvek
2015-08-19  7:57   ` Philipp Zabel
2015-08-17 21:58 ` [PATCH v2 04/21] ARM: pxa: magician: Add, fix and init (new) GPIOs Petr Cvek
2015-08-18 19:01   ` Robert Jarzmik
2015-08-18 22:46     ` Petr Cvek
2015-08-17 21:58 ` [PATCH v2 05/21] ARM: pxa: magician: Add support for ADS7846 touchscreen Petr Cvek
2015-08-19 18:41   ` Robert Jarzmik
2015-08-17 21:59 ` [PATCH v2 06/21] ARM: pxa: magician: Add normal and power I2C definition Petr Cvek
2015-08-19  8:02   ` Philipp Zabel
2015-08-19 18:41   ` Robert Jarzmik
2015-08-17 21:59 ` [PATCH v2 07/21] ARM: pxa: magician: Fix IrDA pdata and redundant GPIO request Petr Cvek
2015-08-19 18:41   ` Robert Jarzmik
2015-08-17 22:00 ` [PATCH v2 08/21] ARM: pxa: magician: Add StrataFlash Vpp GPIO and alternative driver Petr Cvek
2015-08-17 22:01 ` [PATCH v2 09/21] ARM: pxa: magician: Add OV9640 camera support Petr Cvek
2015-08-20 19:48   ` Robert Jarzmik
2015-08-20 20:26     ` Arnd Bergmann
2015-08-20 22:39       ` Petr Cvek
2015-08-21 13:45         ` Arnd Bergmann
2015-08-21 17:36           ` Robert Jarzmik
2015-08-21 22:09             ` Petr Cvek
2015-08-22 12:41               ` Robert Jarzmik
2015-08-24  6:53           ` Lee Jones
2015-08-17 22:01 ` [PATCH v2 10/21] ARM: pxa: magician: Add UDA1380 sound support Petr Cvek
2015-08-20 19:51   ` Robert Jarzmik
2015-08-20 23:01     ` Petr Cvek
2015-08-28  8:48       ` Robert Jarzmik
2015-08-17 22:01 ` Petr Cvek [this message]
2015-08-20 19:32   ` [PATCH v2 11/21] ARM: pxa: magician: Add MAX1586 Vcore regulator support Robert Jarzmik
2015-08-20 22:33     ` Petr Cvek
2015-08-28  8:49       ` Robert Jarzmik
2015-08-17 22:02 ` [PATCH v2 12/21] ARM: pxa: magician: Add PXA27x UDC support Petr Cvek
2015-08-20 17:23   ` Robert Jarzmik
2015-08-20 22:21     ` Petr Cvek
2015-08-28  9:58       ` Robert Jarzmik
2015-08-17 22:03 ` [PATCH v2 13/21] ARM: pxa: magician: Fix charging source and add NiCd backup charging Petr Cvek
2015-08-17 22:18   ` Petr Cvek
2015-08-17 22:03 ` [PATCH v2 14/21] ARM: pxa: magician: Fix PXA USB OHCI port enable flags Petr Cvek
2015-08-17 22:03 ` [PATCH v2 15/21] ARM: pxa: magician: Fix PWM backlight regulator Petr Cvek
2015-08-20 19:58   ` Robert Jarzmik
2015-08-17 22:04 ` [PATCH v2 16/21] ARM: pxa: magician: Add support for alternative LCD backlight Petr Cvek
2015-08-20 20:01   ` Robert Jarzmik
2015-08-23 20:55     ` Petr Cvek
2015-08-24  8:25       ` Robert Jarzmik
2015-08-17 22:04 ` [PATCH v2 17/21] ARM: pxa: magician: Remove (temporarily) pasic3 LED support Petr Cvek
2015-08-22 16:25   ` Robert Jarzmik
2015-08-17 22:05 ` [PATCH v2 18/21] mfd: htc-pasic3: Prepare driver for leds-pasic3 Petr Cvek
2015-08-18  6:52   ` Lee Jones
2015-08-18 21:01     ` Petr Cvek
2015-08-19  6:58       ` Lee Jones
2015-08-17 22:06 ` [PATCH v2 19/21] leds: leds-pasic3: Add support for PASIC3 LED controller Petr Cvek
2015-08-17 22:14   ` Petr Cvek
2015-08-18 10:27   ` Jacek Anaszewski
2015-08-18 21:48     ` Petr Cvek
2015-08-19  8:09       ` Philipp Zabel
2015-08-19  8:49       ` Jacek Anaszewski
2015-08-17 22:06 ` [PATCH v2 20/21] ARM: pxa: magician: Re-add pdata for new leds-pasic3 driver Petr Cvek
2015-08-17 22:07 ` [PATCH v2 21/21] ARM: pxa: magician: Move platform_add_devices() to the end of magician_init() Petr Cvek
2015-08-22 16:27   ` Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55D259CC.6040307@tul.cz \
    --to=petr.cvek@tul$(echo .)cz \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox