Skip to content

Commit f6c4248

Browse files
committed
Merge tag 'regulator-v6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "There's a bunch of new drivers here, plus a lot of hardening for the supply resolution code which allow us to support systems where we have two PMICs each of which has regulators supplied by the other. This did work a long time ago but got broken as part of improved integration with the device model, it's fairly rare so nobody noticed. - Improvements for supply handling from André Draszik to allow systems with two PMICs with supply/consumer relationships in both directions to instantiate. - New drivers for Maxim MAX776750, Realtek RT8902, Samsung S2MPG11, Texas Instuments TPS65185. This have also pulls in some MFD updates which are build dependencies for the Samsung S2MPG11 support" * tag 'regulator-v6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (42 commits) regulator: s2mps11: more descriptive gpio consumer name regulator: s2mps11: add S2MPG11 regulator regulator: s2mps11: refactor S2MPG10 regulator macros for S2MPG11 reuse regulator: s2mps11: refactor S2MPG10 ::set_voltage_time() for S2MPG11 reuse regulator: s2mps11: add S2MPG10 regulator regulator: s2mps11: refactor handling of external rail control regulator: s2mps11: update node parsing (allow -supply properties) regulator: s2mps11: place constants on right side of comparison tests regulator: s2mps11: use dev_err_probe() where appropriate regulator: s2mps11: drop two needless variable initialisations regulator: add REGULATOR_LINEAR_VRANGE macro regulator: dt-bindings: add s2mpg11-pmic regulators regulator: dt-bindings: add s2mpg10-pmic regulators dt-bindings: firmware: google,gs101-acpm-ipc: convert regulators to lowercase mfd: sec: Add support for S2MPG11 PMIC via ACPM mfd: sec: s2mpg10: Reorder regulators for better probe performance dt-bindings: mfd: Add samsung,s2mpg11-pmic dt-bindings: mfd: samsung,s2mpg10-pmic: Link to its regulators dt-bindings: mfd: samsung,s2mps11: Split s2mpg10-pmic into separate file mfd: sec: Drop now unused struct sec_pmic_dev::irq_data ...
2 parents d5cbd9f + 914809c commit f6c4248

34 files changed

Lines changed: 4970 additions & 339 deletions

Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ examples:
7575
interrupts-extended = <&gpa0 6 IRQ_TYPE_LEVEL_LOW>;
7676
7777
regulators {
78-
LDO1 {
78+
ldo1m {
7979
regulator-name = "vdd_ldo1";
8080
regulator-min-microvolt = <700000>;
8181
regulator-max-microvolt = <1300000>;
@@ -84,7 +84,7 @@ examples:
8484
8585
// ...
8686
87-
BUCK1 {
87+
buck8m {
8888
regulator-name = "vdd_mif";
8989
regulator-min-microvolt = <450000>;
9090
regulator-max-microvolt = <1300000>;
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mfd/samsung,s2mpg10-pmic.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Samsung S2MPG10 Power Management IC
8+
9+
maintainers:
10+
- André Draszik <andre.draszik@linaro.org>
11+
12+
description: |
13+
This is part of the device tree bindings for the S2MPG10 Power Management IC
14+
(PMIC).
15+
16+
The Samsung S2MPG10 is a Power Management IC for mobile applications with buck
17+
converters, various LDOs, power meters, RTC, clock outputs, and additional
18+
GPIO interfaces and is typically complemented by S2MPG10 PMIC in a main/sub
19+
configuration as the main PMIC.
20+
21+
properties:
22+
compatible:
23+
const: samsung,s2mpg10-pmic
24+
25+
clocks:
26+
$ref: /schemas/clock/samsung,s2mps11.yaml
27+
description:
28+
Child node describing clock provider.
29+
30+
interrupts:
31+
maxItems: 1
32+
33+
regulators:
34+
type: object
35+
$ref: /schemas/regulator/samsung,s2mpg10-regulator.yaml
36+
description:
37+
List of child nodes that specify the regulators.
38+
39+
system-power-controller: true
40+
41+
wakeup-source: true
42+
43+
patternProperties:
44+
"^vinb([1-9]|10)m-supply$":
45+
description:
46+
Phandle to the power supply for each buck rail of this PMIC. There is a
47+
1:1 mapping of supply to rail, e.g. vinb1m-supply supplies buck1m.
48+
49+
"^vinl([1-9]|1[0-5])m-supply$":
50+
description: |
51+
Phandle to the power supply for one or multiple LDO rails of this PMIC.
52+
The mapping of supply to rail(s) is as follows:
53+
vinl1m - ldo13m
54+
vinl2m - ldo15m
55+
vinl3m - ldo1m, ldo5m, ldo7m
56+
vinl4m - ldo3m, ldo8m
57+
vinl5m - ldo16m
58+
vinl6m - ldo17m
59+
vinl7m - ldo6m, ldo11m, ldo24m, ldo28m
60+
vinl8m - ldo12m
61+
vinl9m - ldo2m, ldo4m
62+
vinl10m - ldo9m, ldo14m, ldo18m, 19m, ldo20m, ldo25m
63+
vinl11m - ldo23m, ldo31m
64+
vinl12m - ldo29m
65+
vinl13m - ldo30m
66+
vinl14m - ldo21m
67+
vinl15m - ldo10m, ldo22m, ldo26m, ldo27m
68+
69+
required:
70+
- compatible
71+
- interrupts
72+
- regulators
73+
74+
additionalProperties: false
75+
76+
examples:
77+
- |
78+
#include <dt-bindings/gpio/gpio.h>
79+
#include <dt-bindings/interrupt-controller/irq.h>
80+
#include <dt-bindings/regulator/samsung,s2mpg10-regulator.h>
81+
82+
pmic {
83+
compatible = "samsung,s2mpg10-pmic";
84+
interrupts-extended = <&gpa0 6 IRQ_TYPE_LEVEL_LOW>;
85+
pinctrl-names = "default";
86+
pinctrl-0 = <&pmic_int>;
87+
system-power-controller;
88+
wakeup-source;
89+
90+
vinl3m-supply = <&buck8m>;
91+
92+
clocks {
93+
compatible = "samsung,s2mpg10-clk";
94+
#clock-cells = <1>;
95+
clock-output-names = "rtc32k_ap", "peri32k1", "peri32k2";
96+
};
97+
98+
regulators {
99+
buck8m {
100+
regulator-name = "vdd_mif";
101+
regulator-min-microvolt = <450000>;
102+
regulator-max-microvolt = <1300000>;
103+
regulator-ramp-delay = <6250>;
104+
};
105+
106+
ldo1m {
107+
regulator-name = "vdd_ldo1";
108+
regulator-min-microvolt = <700000>;
109+
regulator-max-microvolt = <1300000>;
110+
};
111+
112+
ldo20m {
113+
regulator-name = "vdd_dmics";
114+
regulator-min-microvolt = <700000>;
115+
regulator-max-microvolt = <1300000>;
116+
regulator-always-on;
117+
samsung,ext-control = <S2MPG10_EXTCTRL_LDO20M_EN2>;
118+
};
119+
};
120+
};
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mfd/samsung,s2mpg11-pmic.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Samsung S2MPG11 Power Management IC
8+
9+
maintainers:
10+
- André Draszik <andre.draszik@linaro.org>
11+
12+
description: |
13+
This is part of the device tree bindings for the S2MPG11 Power Management IC
14+
(PMIC).
15+
16+
The Samsung S2MPG11 is a Power Management IC for mobile applications with buck
17+
converters, various LDOs, power meters, NTC thermistor inputs, and additional
18+
GPIO interfaces and typically complements an S2MPG10 PMIC in a main/sub
19+
configuration as the sub-PMIC.
20+
21+
properties:
22+
compatible:
23+
const: samsung,s2mpg11-pmic
24+
25+
interrupts:
26+
maxItems: 1
27+
28+
regulators:
29+
type: object
30+
$ref: /schemas/regulator/samsung,s2mpg11-regulator.yaml
31+
description:
32+
List of child nodes that specify the regulators.
33+
34+
wakeup-source: true
35+
36+
patternProperties:
37+
"^vinb(([1-9]|10)s|[abd])-supply$":
38+
description:
39+
Phandle to the power supply for each buck rail of this PMIC. There is a
40+
1:1 mapping of numbered supply to rail, e.g. vinb1s-supply supplies
41+
buck1s. The remaining mapping is as follows
42+
vinba - bucka
43+
vinbb - buck boost
44+
vinbd - buckd
45+
46+
"^vinl[1-6]s-supply$":
47+
description: |
48+
Phandle to the power supply for one or multiple LDO rails of this PMIC.
49+
The mapping of supply to rail(s) is as follows
50+
vinl1s - ldo1s, ldo2s
51+
vinl2s - ldo8s, ldo9s
52+
vinl3s - ldo3s, ldo5s, ldo7s, ldo15s
53+
vinl4s - ldo10s, ldo11s, ldo12s, ldo14s
54+
vinl5s - ldo4s, ldo6s
55+
vinl6s - ldo13s
56+
57+
required:
58+
- compatible
59+
- interrupts
60+
- regulators
61+
62+
additionalProperties: false
63+
64+
examples:
65+
- |
66+
#include <dt-bindings/gpio/gpio.h>
67+
#include <dt-bindings/interrupt-controller/irq.h>
68+
#include <dt-bindings/regulator/samsung,s2mpg10-regulator.h>
69+
70+
pmic {
71+
compatible = "samsung,s2mpg11-pmic";
72+
interrupts-extended = <&gpa0 7 IRQ_TYPE_LEVEL_LOW>;
73+
pinctrl-names = "default";
74+
pinctrl-0 = <&pmic_int>;
75+
wakeup-source;
76+
77+
vinl1s-supply = <&buck8m>;
78+
vinl2s-supply = <&buck6s>;
79+
80+
regulators {
81+
buckd {
82+
regulator-name = "vcc_ufs";
83+
regulator-ramp-delay = <6250>;
84+
enable-gpios = <&gpp0 1 GPIO_ACTIVE_HIGH>;
85+
samsung,ext-control = <S2MPG11_EXTCTRL_UFS_EN>;
86+
};
87+
};
88+
};

Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ description: |
2020
properties:
2121
compatible:
2222
enum:
23-
- samsung,s2mpg10-pmic
2423
- samsung,s2mps11-pmic
2524
- samsung,s2mps13-pmic
2625
- samsung,s2mps14-pmic
@@ -59,42 +58,16 @@ properties:
5958
reset (setting buck voltages to default values).
6059
type: boolean
6160

62-
system-power-controller: true
63-
6461
wakeup-source: true
6562

6663
required:
6764
- compatible
65+
- reg
6866
- regulators
6967

7068
additionalProperties: false
7169

7270
allOf:
73-
- if:
74-
properties:
75-
compatible:
76-
contains:
77-
const: samsung,s2mpg10-pmic
78-
then:
79-
properties:
80-
reg: false
81-
samsung,s2mps11-acokb-ground: false
82-
samsung,s2mps11-wrstbi-ground: false
83-
84-
# oneOf is required, because dtschema's fixups.py doesn't handle this
85-
# nesting here. Its special treatment to allow either interrupt property
86-
# when only one is specified in the binding works at the top level only.
87-
oneOf:
88-
- required: [interrupts]
89-
- required: [interrupts-extended]
90-
91-
else:
92-
properties:
93-
system-power-controller: false
94-
95-
required:
96-
- reg
97-
9871
- if:
9972
properties:
10073
compatible:

0 commit comments

Comments
 (0)