From: petr.cvek@tul•cz (Petr Cvek)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 20/26] ARM: pxa: magician: Add support for MAX1587A Vcore regulator
Date: Fri, 18 Sep 2015 03:19:04 +0200 [thread overview]
Message-ID: <55FB6688.3010505@tul.cz> (raw)
In-Reply-To: <cover.1442462898.git.petr.cvek@tul.cz>
HTC Magician contains a MAX1587A voltage regulator for a Vcore supply.
The Vcore regulation is required for a CPU speed switching. This patch adds
declaration for the max1586 driver.
Notice:
- MAX1587A version does not support the V6 (USIM) output.
- A boost resistor was directly measured for a board_id 0x3a.
Signed-off-by: Petr Cvek <petr.cvek@tul•cz>
---
arch/arm/mach-pxa/magician.c | 52 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index d844b9c..490d79f 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -52,6 +52,8 @@
#include <linux/platform_data/camera-pxa.h>
#include <media/soc_camera.h>
+#include <linux/regulator/max1586.h>
+
#include "devices.h"
#include "generic.h"
@@ -787,6 +789,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
*/
@@ -1066,6 +1114,10 @@ static void __init magician_init(void)
pxa_set_ficp_info(&magician_ficp_info);
pxa27x_set_i2c_power_info(&magician_i2c_power_info);
pxa_set_i2c_info(&i2c_info);
+
+ 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
next prev parent reply other threads:[~2015-09-18 1:19 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1442462898.git.petr.cvek@tul.cz>
2015-09-17 4:54 ` [PATCH v3 01/26] ARM: pxa: magician: Fix indentation in machine files Petr Cvek
2015-09-26 11:44 ` Robert Jarzmik
2015-09-17 4:55 ` [PATCH v3 02/26] ARM: pxa: magician: Change comments to be more informative Petr Cvek
2015-09-26 11:52 ` Robert Jarzmik
2015-09-17 4:55 ` [PATCH v3 03/26] ARM: pxa: magician: Print more specific error message for global GPIOs Petr Cvek
2015-09-26 11:54 ` Robert Jarzmik
2015-09-17 4:55 ` [PATCH v3 04/26] ARM: pxa: magician: Optimize debug messages for LCD power Petr Cvek
2015-09-26 11:55 ` Robert Jarzmik
2015-09-17 4:55 ` [PATCH v3 05/26] ARM: pxa: magician: Change description of LCD power GPIO Petr Cvek
2015-09-26 11:55 ` Robert Jarzmik
2015-09-17 4:56 ` [PATCH v3 06/26] ARM: pxa: magician: Add new discovered EGPIO pins Petr Cvek
2015-09-26 11:59 ` Robert Jarzmik
2015-09-17 4:56 ` [PATCH v3 07/26] ARM: pxa: magician: Fix HTC Magician pin mux definitions Petr Cvek
2015-09-26 14:34 ` Robert Jarzmik
2015-09-17 4:57 ` [PATCH v3 08/26] ARM: pxa: magician: Rename abstract LCD GPIOs Petr Cvek
2015-09-26 14:35 ` Robert Jarzmik
2015-09-17 4:57 ` [PATCH v3 09/26] ARM: pxa: magician: Optimize powerup delays for Samsung LCD Petr Cvek
2015-09-26 14:37 ` Robert Jarzmik
2015-09-17 4:57 ` [PATCH v3 10/26] ARM: pxa: magician: Optimize Samsung LCD refresh to 50Hz Petr Cvek
2015-09-26 14:39 ` Robert Jarzmik
2015-09-17 4:58 ` [PATCH v3 11/26] ARM: pxa: magician: Optimize EGPIO initial values Petr Cvek
2015-09-26 14:40 ` Robert Jarzmik
2015-09-17 4:58 ` [PATCH v3 12/26] ARM: pxa: magician: Rename charger cable detection EGPIOs Petr Cvek
2015-09-26 14:41 ` Robert Jarzmik
2015-09-17 4:59 ` [PATCH v3 13/26] ARM: pxa: magician: Fix and add charging detection functions Petr Cvek
2015-09-26 14:45 ` Robert Jarzmik
2015-09-17 4:59 ` [PATCH v3 14/26] ARM: pxa: magician: Fix platform data for both PXA27x I2C controllers Petr Cvek
2015-09-26 14:47 ` Robert Jarzmik
2015-09-17 4:59 ` [PATCH v3 15/26] ARM: pxa: magician: Fix redundant GPIO request for pxaficp_ir Petr Cvek
2015-09-26 14:51 ` Robert Jarzmik
2015-09-18 1:16 ` [PATCH v3 16/26] ARM: pxa: magician: Fix support for Intel Strata NOR Flash Petr Cvek
2015-09-26 14:56 ` Robert Jarzmik
2015-09-18 1:17 ` [PATCH v3 17/26] ARM: pxa: magician: Fix wrongly enabled USB host ports Petr Cvek
2015-09-26 14:57 ` Robert Jarzmik
2015-09-18 1:18 ` [PATCH v3 18/26] ARM: pxa: magician: Add support for ADS7846 Petr Cvek
2015-09-26 15:00 ` Robert Jarzmik
2015-09-18 1:18 ` [PATCH v3 19/26] ARM: pxa: magician: Add support for Omnivision OV9640 camera Petr Cvek
2015-09-18 1:19 ` Petr Cvek [this message]
2015-09-26 15:02 ` [PATCH v3 20/26] ARM: pxa: magician: Add support for MAX1587A Vcore regulator Robert Jarzmik
2015-09-18 1:19 ` [PATCH v3 21/26] ARM: pxa: magician: Add support for PXA27x UDC Petr Cvek
2015-09-26 15:04 ` Robert Jarzmik
2015-09-18 1:20 ` [PATCH v3 22/26] ARM: pxa: magician: Remove pdata for pasic3-leds Petr Cvek
2015-09-18 1:20 ` [PATCH v3 23/26] ARM: pxa: magician: Remove definition of the STUART port Petr Cvek
2015-09-26 15:05 ` Robert Jarzmik
2015-09-18 1:20 ` [PATCH v3 24/26] ARM: pxa: magician: Add debug message for backlight brightness function Petr Cvek
2015-09-26 15:06 ` Robert Jarzmik
2015-09-18 1:21 ` [PATCH v3 25/26] ARM: pxa: magician: Add missing regulator for PWM backlight Petr Cvek
2015-09-26 15:07 ` Robert Jarzmik
2015-09-18 1:21 ` [PATCH v3 26/26] ARM: pxa: magician: Move platform_add_devices() to the end of magician_init() Petr Cvek
2015-09-26 15:09 ` 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=55FB6688.3010505@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