Skip to content

Commit 4fd1f50

Browse files
committed
Merge branch 'regulator-4.20' into regulator-next
2 parents 35a7f35 + d8b2a8e commit 4fd1f50

55 files changed

Lines changed: 3108 additions & 1112 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.txt‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
* ROHM BD71837 Power Management Integrated Circuit bindings
1+
* ROHM BD71837 and BD71847 Power Management Integrated Circuit bindings
22

3-
BD71837MWV is a programmable Power Management IC for powering single-core,
4-
dual-core, and quad-core SoCs such as NXP-i.MX 8M. It is optimized for
5-
low BOM cost and compact solution footprint. It integrates 8 Buck
6-
egulators and 7 LDOs to provide all the power rails required by the SoC and
7-
the commonly used peripherals.
3+
BD71837MWV and BD71847MWV are programmable Power Management ICs for powering
4+
single-core, dual-core, and quad-core SoCs such as NXP-i.MX 8M. They are
5+
optimized for low BOM cost and compact solution footprint. BD71837MWV
6+
integrates 8 Buck regulators and 7 LDOs. BD71847MWV contains 6 Buck regulators
7+
and 6 LDOs.
88

9-
Datasheet for PMIC is available at:
9+
Datasheet for BD71837 is available at:
1010
https://www.rohm.com/datasheet/BD71837MWV/bd71837mwv-e
1111

1212
Required properties:
13-
- compatible : Should be "rohm,bd71837".
13+
- compatible : Should be "rohm,bd71837" for bd71837
14+
"rohm,bd71847" for bd71847.
1415
- reg : I2C slave address.
1516
- interrupt-parent : Phandle to the parent interrupt controller.
1617
- interrupts : The interrupt line the device is connected to.

‎Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Regulator nodes are identified by their compatible:
2626
"qcom,rpm-pm8998-regulators"
2727
"qcom,rpm-pma8084-regulators"
2828
"qcom,rpm-pmi8998-regulators"
29+
"qcom,rpm-pms405-regulators"
2930

3031
- vdd_s1-supply:
3132
- vdd_s2-supply:
@@ -188,6 +189,24 @@ Regulator nodes are identified by their compatible:
188189
Definition: reference to regulator supplying the input pin, as
189190
described in the data sheet
190191

192+
- vdd_s1-supply:
193+
- vdd_s2-supply:
194+
- vdd_s3-supply:
195+
- vdd_s4-supply:
196+
- vdd_s5-supply:
197+
- vdd_l1_l2-supply:
198+
- vdd_l3_l8-supply:
199+
- vdd_l4-supply:
200+
- vdd_l5_l6-supply:
201+
- vdd_l7-supply:
202+
- vdd_l3_l8-supply:
203+
- vdd_l9-supply:
204+
- vdd_l10_l11_l12_l13-supply:
205+
Usage: optional (pms405 only)
206+
Value type: <phandle>
207+
Definition: reference to regulator supplying the input pin, as
208+
described in the data sheet
209+
191210
The regulator node houses sub-nodes for each regulator within the device. Each
192211
sub-node is identified using the node's name, with valid values listed for each
193212
of the pmics below.
@@ -222,6 +241,10 @@ pma8084:
222241
pmi8998:
223242
bob
224243

244+
pms405:
245+
s1, s2, s3, s4, s5, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12,
246+
l13
247+
225248
The content of each sub-node is defined by the standard binding for regulators -
226249
see regulator.txt.
227250

‎Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.txt‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
ROHM BD71837 Power Management Integrated Circuit (PMIC) regulator bindings
1+
ROHM BD71837 and BD71847 Power Management Integrated Circuit regulator bindings
22

33
Required properties:
4-
- regulator-name: should be "buck1", ..., "buck8" and "ldo1", ..., "ldo7"
4+
- regulator-name: should be "buck1", ..., "buck8" and "ldo1", ..., "ldo7" for
5+
BD71837. For BD71847 names should be "buck1", ..., "buck6"
6+
and "ldo1", ..., "ldo6"
57

68
List of regulators provided by this controller. BD71837 regulators node
79
should be sub node of the BD71837 MFD node. See BD71837 MFD bindings at
@@ -16,10 +18,14 @@ disabled by driver at startup. LDO5 and LDO6 are supplied by those and
1618
if they are disabled at startup the voltage monitoring for LDO5/LDO6 will
1719
cause PMIC to reset.
1820

19-
The valid names for regulator nodes are:
21+
The valid names for BD71837 regulator nodes are:
2022
BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, BUCK7, BUCK8
2123
LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7
2224

25+
The valid names for BD71847 regulator nodes are:
26+
BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6
27+
LDO1, LDO2, LDO3, LDO4, LDO5, LDO6
28+
2329
Optional properties:
2430
- Any optional property defined in bindings/regulator/regulator.txt
2531

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
STMicroelectronics STPMIC1 Voltage regulators
2+
3+
Regulator Nodes are optional depending on needs.
4+
5+
Available Regulators in STPMIC1 device are:
6+
- buck1 for Buck BUCK1
7+
- buck2 for Buck BUCK2
8+
- buck3 for Buck BUCK3
9+
- buck4 for Buck BUCK4
10+
- ldo1 for LDO LDO1
11+
- ldo2 for LDO LDO2
12+
- ldo3 for LDO LDO3
13+
- ldo4 for LDO LDO4
14+
- ldo5 for LDO LDO5
15+
- ldo6 for LDO LDO6
16+
- vref_ddr for LDO Vref DDR
17+
- boost for Buck BOOST
18+
- pwr_sw1 for VBUS_OTG switch
19+
- pwr_sw2 for SW_OUT switch
20+
21+
Switches are fixed voltage regulators with only enable/disable capability.
22+
23+
Optional properties:
24+
- st,mask-reset: mask reset for this regulator: the regulator configuration
25+
is maintained during pmic reset.
26+
- regulator-pull-down: enable high pull down
27+
if not specified light pull down is used
28+
- regulator-over-current-protection:
29+
if set, all regulators are switched off in case of over-current detection
30+
on this regulator,
31+
if not set, the driver only sends an over-current event.
32+
- interrupt-parent: phandle to the parent interrupt controller
33+
- interrupts: index of current limit detection interrupt
34+
- <regulator>-supply: phandle to the parent supply/regulator node
35+
each regulator supply can be described except vref_ddr.
36+
37+
Example:
38+
regulators {
39+
compatible = "st,stpmic1-regulators";
40+
41+
ldo6-supply = <&v3v3>;
42+
43+
vdd_core: buck1 {
44+
regulator-name = "vdd_core";
45+
interrupts = <IT_CURLIM_BUCK1 0>;
46+
interrupt-parent = <&pmic>;
47+
st,mask-reset;
48+
regulator-pull-down;
49+
regulator-min-microvolt = <700000>;
50+
regulator-max-microvolt = <1200000>;
51+
};
52+
53+
v3v3: buck4 {
54+
regulator-name = "v3v3";
55+
interrupts = <IT_CURLIM_BUCK4 0>;
56+
interrupt-parent = <&mypmic>;
57+
58+
regulator-min-microvolt = <3300000>;
59+
regulator-max-microvolt = <3300000>;
60+
};
61+
62+
v1v8: ldo6 {
63+
regulator-name = "v1v8";
64+
regulator-min-microvolt = <1800000>;
65+
regulator-max-microvolt = <1800000>;
66+
regulator-over-current-protection;
67+
};
68+
};

‎arch/arm/mach-imx/mach-mx21ads.c‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/mtd/mtd.h>
1919
#include <linux/mtd/physmap.h>
2020
#include <linux/gpio/driver.h>
21+
#include <linux/gpio/machine.h>
2122
#include <linux/gpio.h>
2223
#include <linux/regulator/fixed.h>
2324
#include <linux/regulator/machine.h>
@@ -175,6 +176,7 @@ static struct resource mx21ads_mmgpio_resource =
175176
DEFINE_RES_MEM_NAMED(MX21ADS_IO_REG, SZ_2, "dat");
176177

177178
static struct bgpio_pdata mx21ads_mmgpio_pdata = {
179+
.label = "mx21ads-mmgpio",
178180
.base = MX21ADS_MMGPIO_BASE,
179181
.ngpio = 16,
180182
};
@@ -203,7 +205,6 @@ static struct regulator_init_data mx21ads_lcd_regulator_init_data = {
203205
static struct fixed_voltage_config mx21ads_lcd_regulator_pdata = {
204206
.supply_name = "LCD",
205207
.microvolts = 3300000,
206-
.gpio = MX21ADS_IO_LCDON,
207208
.enable_high = 1,
208209
.init_data = &mx21ads_lcd_regulator_init_data,
209210
};
@@ -216,6 +217,14 @@ static struct platform_device mx21ads_lcd_regulator = {
216217
},
217218
};
218219

220+
static struct gpiod_lookup_table mx21ads_lcd_regulator_gpiod_table = {
221+
.dev_id = "reg-fixed-voltage.0", /* Let's hope ID 0 is what we get */
222+
.table = {
223+
GPIO_LOOKUP("mx21ads-mmgpio", 9, NULL, GPIO_ACTIVE_HIGH),
224+
{ },
225+
},
226+
};
227+
219228
/*
220229
* Connected is a portrait Sharp-QVGA display
221230
* of type: LQ035Q7DB02
@@ -311,6 +320,7 @@ static void __init mx21ads_late_init(void)
311320
{
312321
imx21_add_mxc_mmc(0, &mx21ads_sdhc_pdata);
313322

323+
gpiod_add_lookup_table(&mx21ads_lcd_regulator_gpiod_table);
314324
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
315325

316326
mx21ads_cs8900_resources[1].start =

‎arch/arm/mach-imx/mach-mx27ads.c‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/gpio/driver.h>
1717
/* Needed for gpio_to_irq() */
1818
#include <linux/gpio.h>
19+
#include <linux/gpio/machine.h>
1920
#include <linux/platform_device.h>
2021
#include <linux/mtd/mtd.h>
2122
#include <linux/mtd/map.h>
@@ -230,10 +231,17 @@ static struct regulator_init_data mx27ads_lcd_regulator_init_data = {
230231
static struct fixed_voltage_config mx27ads_lcd_regulator_pdata = {
231232
.supply_name = "LCD",
232233
.microvolts = 3300000,
233-
.gpio = MX27ADS_LCD_GPIO,
234234
.init_data = &mx27ads_lcd_regulator_init_data,
235235
};
236236

237+
static struct gpiod_lookup_table mx27ads_lcd_regulator_gpiod_table = {
238+
.dev_id = "reg-fixed-voltage.0", /* Let's hope ID 0 is what we get */
239+
.table = {
240+
GPIO_LOOKUP("LCD", 0, NULL, GPIO_ACTIVE_HIGH),
241+
{ },
242+
},
243+
};
244+
237245
static void __init mx27ads_regulator_init(void)
238246
{
239247
struct gpio_chip *vchip;
@@ -247,6 +255,8 @@ static void __init mx27ads_regulator_init(void)
247255
vchip->set = vgpio_set;
248256
gpiochip_add_data(vchip, NULL);
249257

258+
gpiod_add_lookup_table(&mx27ads_lcd_regulator_gpiod_table);
259+
250260
platform_device_register_data(NULL, "reg-fixed-voltage",
251261
PLATFORM_DEVID_AUTO,
252262
&mx27ads_lcd_regulator_pdata,

‎arch/arm/mach-mmp/brownstone.c‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/platform_device.h>
1616
#include <linux/io.h>
1717
#include <linux/gpio-pxa.h>
18+
#include <linux/gpio/machine.h>
1819
#include <linux/regulator/machine.h>
1920
#include <linux/regulator/max8649.h>
2021
#include <linux/regulator/fixed.h>
@@ -148,7 +149,6 @@ static struct regulator_init_data brownstone_v_5vp_data = {
148149
static struct fixed_voltage_config brownstone_v_5vp = {
149150
.supply_name = "v_5vp",
150151
.microvolts = 5000000,
151-
.gpio = GPIO_5V_ENABLE,
152152
.enable_high = 1,
153153
.enabled_at_boot = 1,
154154
.init_data = &brownstone_v_5vp_data,
@@ -162,6 +162,15 @@ static struct platform_device brownstone_v_5vp_device = {
162162
},
163163
};
164164

165+
static struct gpiod_lookup_table brownstone_v_5vp_gpiod_table = {
166+
.dev_id = "reg-fixed-voltage.1", /* .id set to 1 above */
167+
.table = {
168+
GPIO_LOOKUP("gpio-pxa", GPIO_5V_ENABLE,
169+
NULL, GPIO_ACTIVE_HIGH),
170+
{ },
171+
},
172+
};
173+
165174
static struct max8925_platform_data brownstone_max8925_info = {
166175
.irq_base = MMP_NR_IRQS,
167176
};
@@ -217,6 +226,7 @@ static void __init brownstone_init(void)
217226
mmp2_add_isram(&mmp2_isram_platdata);
218227

219228
/* enable 5v regulator */
229+
gpiod_add_lookup_table(&brownstone_v_5vp_gpiod_table);
220230
platform_device_register(&brownstone_v_5vp_device);
221231
}
222232

‎arch/arm/mach-omap1/board-ams-delta.c‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ static struct regulator_init_data modem_nreset_data = {
300300
static struct fixed_voltage_config modem_nreset_config = {
301301
.supply_name = "modem_nreset",
302302
.microvolts = 3300000,
303-
.gpio = AMS_DELTA_GPIO_PIN_MODEM_NRESET,
304303
.startup_delay = 25000,
305304
.enable_high = 1,
306305
.enabled_at_boot = 1,
@@ -315,6 +314,15 @@ static struct platform_device modem_nreset_device = {
315314
},
316315
};
317316

317+
static struct gpiod_lookup_table ams_delta_nreset_gpiod_table = {
318+
.dev_id = "reg-fixed-voltage",
319+
.table = {
320+
GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_MODEM_NRESET,
321+
NULL, GPIO_ACTIVE_HIGH),
322+
{ },
323+
},
324+
};
325+
318326
struct modem_private_data {
319327
struct regulator *regulator;
320328
};
@@ -568,7 +576,6 @@ static struct regulator_init_data keybrd_pwr_initdata = {
568576
static struct fixed_voltage_config keybrd_pwr_config = {
569577
.supply_name = "keybrd_pwr",
570578
.microvolts = 5000000,
571-
.gpio = AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
572579
.enable_high = 1,
573580
.init_data = &keybrd_pwr_initdata,
574581
};
@@ -602,6 +609,7 @@ static struct platform_device *ams_delta_devices[] __initdata = {
602609
};
603610

604611
static struct gpiod_lookup_table *ams_delta_gpio_tables[] __initdata = {
612+
&ams_delta_nreset_gpiod_table,
605613
&ams_delta_audio_gpio_table,
606614
&keybrd_pwr_gpio_table,
607615
&ams_delta_lcd_gpio_table,

‎arch/arm/mach-omap2/pdata-quirks.c‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/clk.h>
1111
#include <linux/davinci_emac.h>
1212
#include <linux/gpio.h>
13+
#include <linux/gpio/machine.h>
1314
#include <linux/init.h>
1415
#include <linux/kernel.h>
1516
#include <linux/of_platform.h>
@@ -328,7 +329,6 @@ static struct regulator_init_data pandora_vmmc3 = {
328329
static struct fixed_voltage_config pandora_vwlan = {
329330
.supply_name = "vwlan",
330331
.microvolts = 1800000, /* 1.8V */
331-
.gpio = PANDORA_WIFI_NRESET_GPIO,
332332
.startup_delay = 50000, /* 50ms */
333333
.enable_high = 1,
334334
.init_data = &pandora_vmmc3,
@@ -342,6 +342,19 @@ static struct platform_device pandora_vwlan_device = {
342342
},
343343
};
344344

345+
static struct gpiod_lookup_table pandora_vwlan_gpiod_table = {
346+
.dev_id = "reg-fixed-voltage.1",
347+
.table = {
348+
/*
349+
* As this is a low GPIO number it should be at the first
350+
* GPIO bank.
351+
*/
352+
GPIO_LOOKUP("gpio-0-31", PANDORA_WIFI_NRESET_GPIO,
353+
NULL, GPIO_ACTIVE_HIGH),
354+
{ },
355+
},
356+
};
357+
345358
static void pandora_wl1251_init_card(struct mmc_card *card)
346359
{
347360
/*
@@ -403,6 +416,7 @@ static void __init pandora_wl1251_init(void)
403416
static void __init omap3_pandora_legacy_init(void)
404417
{
405418
platform_device_register(&pandora_backlight);
419+
gpiod_add_lookup_table(&pandora_vwlan_gpiod_table);
406420
platform_device_register(&pandora_vwlan_device);
407421
omap_hsmmc_init(pandora_mmc3);
408422
omap_hsmmc_late_init(pandora_mmc3);

‎arch/arm/mach-pxa/em-x270.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,6 @@ static struct fixed_voltage_config camera_dummy_config = {
986986
.supply_name = "camera_vdd",
987987
.input_supply = "vcc cam",
988988
.microvolts = 2800000,
989-
.gpio = -1,
990989
.enable_high = 0,
991990
.init_data = &camera_dummy_initdata,
992991
};

0 commit comments

Comments
 (0)