Skip to content

Commit 362067b

Browse files
committed
Merge tag 'regulator-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "This release is almost all drivers, there's some small improvements in the core but otherwise everything is updates to drivers, mostly the addition of new ones. There's also a bunch of changes pulled in from the MFD subsystem as dependencies, Rockchip and TI core MFD code that the regulator drivers depend on. I've also yet again managed to put a SPI commit in the regulator tree, I don't know what it is about those two trees (this for spi-geni-qcom). Summary: - Support for Renesas RAA215300, Rockchip RK808, Texas Instruments TPS6594 and TPS6287x, and X-Powers AXP15060 and AXP313a" * tag 'regulator-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (43 commits) regulator: Add Renesas PMIC RAA215300 driver regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings regulator: ltc3676: Use maple tree register cache regulator: ltc3589: Use maple tree register cache regulator: helper: Document ramp_delay parameter of regulator_set_ramp_delay_regmap() regulator: mt6358: Use linear voltage helpers for single range regulators regulator: mt6358: Const-ify mt6358_regulator_info data structures regulator: mt6358: Drop *_SSHUB regulators regulator: mt6358: Merge VCN33_* regulators regulator: dt-bindings: mt6358: Drop *_sshub regulators regulator: dt-bindings: mt6358: Merge ldo_vcn33_* regulators regulator: dt-bindings: pwm-regulator: Add missing type for "pwm-dutycycle-unit" regulator: Switch two more i2c drivers back to use .probe() spi: spi-geni-qcom: Do not do DMA map/unmap inside driver, use framework instead soc: qcom: geni-se: Add interfaces geni_se_tx_init_dma() and geni_se_rx_init_dma() regulator: tps6594-regulator: Add driver for TI TPS6594 regulators regulator: axp20x: Add AXP15060 support regulator: axp20x: Add support for AXP313a variant dt-bindings: pfuze100.yaml: Add an entry for interrupts regulator: stm32-pwr: Fix regulator disabling ...
2 parents 4171a9a + 54e47ea commit 362067b

101 files changed

Lines changed: 5618 additions & 608 deletions

File tree

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/rockchip,rk806.yaml

Lines changed: 406 additions & 0 deletions
Large diffs are not rendered by default.

Documentation/devicetree/bindings/regulator/mt6358-regulator.txt

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ Documentation/devicetree/bindings/regulator/regulator.txt.
88

99
The valid names for regulators are::
1010
BUCK:
11-
buck_vdram1, buck_vcore, buck_vcore_sshub, buck_vpa, buck_vproc11,
12-
buck_vproc12, buck_vgpu, buck_vs2, buck_vmodem, buck_vs1
11+
buck_vdram1, buck_vcore, buck_vpa, buck_vproc11, buck_vproc12, buck_vgpu,
12+
buck_vs2, buck_vmodem, buck_vs1
1313
LDO:
1414
ldo_vdram2, ldo_vsim1, ldo_vibr, ldo_vrf12, ldo_vio18, ldo_vusb, ldo_vcamio,
1515
ldo_vcamd, ldo_vcn18, ldo_vfe28, ldo_vsram_proc11, ldo_vcn28, ldo_vsram_others,
16-
ldo_vsram_others_sshub, ldo_vsram_gpu, ldo_vxo22, ldo_vefuse, ldo_vaux18,
17-
ldo_vmch, ldo_vbif28, ldo_vsram_proc12, ldo_vcama1, ldo_vemc, ldo_vio28, ldo_va12,
18-
ldo_vrf18, ldo_vcn33_bt, ldo_vcn33_wifi, ldo_vcama2, ldo_vmc, ldo_vldo28, ldo_vaud28,
19-
ldo_vsim2
16+
ldo_vsram_gpu, ldo_vxo22, ldo_vefuse, ldo_vaux18, ldo_vmch, ldo_vbif28,
17+
ldo_vsram_proc12, ldo_vcama1, ldo_vemc, ldo_vio28, ldo_va12, ldo_vrf18,
18+
ldo_vcn33, ldo_vcama2, ldo_vmc, ldo_vldo28, ldo_vaud28, ldo_vsim2
2019

2120
Example:
2221

@@ -305,15 +304,8 @@ Example:
305304
regulator-enable-ramp-delay = <120>;
306305
};
307306

308-
mt6358_vcn33_bt_reg: ldo_vcn33_bt {
309-
regulator-name = "vcn33_bt";
310-
regulator-min-microvolt = <3300000>;
311-
regulator-max-microvolt = <3500000>;
312-
regulator-enable-ramp-delay = <270>;
313-
};
314-
315-
mt6358_vcn33_wifi_reg: ldo_vcn33_wifi {
316-
regulator-name = "vcn33_wifi";
307+
mt6358_vcn33_reg: ldo_vcn33 {
308+
regulator-name = "vcn33";
317309
regulator-min-microvolt = <3300000>;
318310
regulator-max-microvolt = <3500000>;
319311
regulator-enable-ramp-delay = <270>;
@@ -354,17 +346,5 @@ Example:
354346
regulator-max-microvolt = <3100000>;
355347
regulator-enable-ramp-delay = <540>;
356348
};
357-
358-
mt6358_vcore_sshub_reg: buck_vcore_sshub {
359-
regulator-name = "vcore_sshub";
360-
regulator-min-microvolt = <500000>;
361-
regulator-max-microvolt = <1293750>;
362-
};
363-
364-
mt6358_vsram_others_sshub_reg: ldo_vsram_others_sshub {
365-
regulator-name = "vsram_others_sshub";
366-
regulator-min-microvolt = <500000>;
367-
regulator-max-microvolt = <1293750>;
368-
};
369349
};
370350
};

Documentation/devicetree/bindings/regulator/pfuze100.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ properties:
3636
reg:
3737
maxItems: 1
3838

39+
interrupts:
40+
maxItems: 1
41+
3942
fsl,pfuze-support-disable-sw:
4043
$ref: /schemas/types.yaml#/definitions/flag
4144
description: |

Documentation/devicetree/bindings/regulator/pwm-regulator.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ properties:
6464
defined, <100> is assumed, meaning that
6565
pwm-dutycycle-range contains values expressed in
6666
percent.
67+
$ref: /schemas/types.yaml#/definitions/uint32
6768
default: 100
6869

6970
pwm-dutycycle-range:
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/renesas,raa215300.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Renesas RAA215300 Power Management Integrated Circuit (PMIC)
8+
9+
maintainers:
10+
- Biju Das <biju.das.jz@bp.renesas.com>
11+
12+
description: |
13+
The RAA215300 is a high-performance, low-cost 9-channel PMIC designed for
14+
32-bit and 64-bit MCU and MPU applications. It supports DDR3, DDR3L, DDR4,
15+
and LPDDR4 memory power requirements. The internally compensated regulators,
16+
built-in Real-Time Clock (RTC), 32kHz crystal oscillator, and coin cell
17+
battery charger provide a highly integrated, small footprint power solution
18+
ideal for System-On-Module (SOM) applications. A spread spectrum feature
19+
provides an ease-of-use solution for noise-sensitive audio or RF applications.
20+
21+
This device exposes two devices via I2C. One for the integrated RTC IP, and
22+
one for everything else.
23+
24+
Link to datasheet:
25+
https://www.renesas.com/in/en/products/power-power-management/multi-channel-power-management-ics-pmics/ssdsoc-power-management-ics-pmic-and-pmus/raa215300-high-performance-9-channel-pmic-supporting-ddr-memory-built-charger-and-rtc
26+
27+
properties:
28+
compatible:
29+
enum:
30+
- renesas,raa215300
31+
32+
reg:
33+
maxItems: 2
34+
35+
reg-names:
36+
items:
37+
- const: main
38+
- const: rtc
39+
40+
interrupts:
41+
maxItems: 1
42+
43+
clocks:
44+
description: |
45+
The clocks are optional. The RTC is disabled, if no clocks are
46+
provided(either xin or clkin).
47+
maxItems: 1
48+
49+
clock-names:
50+
description: |
51+
Use xin, if connected to an external crystal.
52+
Use clkin, if connected to an external clock signal.
53+
enum:
54+
- xin
55+
- clkin
56+
57+
required:
58+
- compatible
59+
- reg
60+
- reg-names
61+
62+
additionalProperties: false
63+
64+
examples:
65+
- |
66+
/* 32.768kHz crystal */
67+
x2: x2-clock {
68+
compatible = "fixed-clock";
69+
#clock-cells = <0>;
70+
clock-frequency = <32768>;
71+
};
72+
73+
i2c {
74+
#address-cells = <1>;
75+
#size-cells = <0>;
76+
77+
raa215300: pmic@12 {
78+
compatible = "renesas,raa215300";
79+
reg = <0x12>, <0x6f>;
80+
reg-names = "main", "rtc";
81+
82+
clocks = <&x2>;
83+
clock-names = "xin";
84+
};
85+
};
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/ti,tps62870.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: TI TPS62870/TPS62871/TPS62872/TPS62873 voltage regulator
8+
9+
maintainers:
10+
- Mårten Lindahl <marten.lindahl@axis.com>
11+
12+
allOf:
13+
- $ref: regulator.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- ti,tps62870
19+
- ti,tps62871
20+
- ti,tps62872
21+
- ti,tps62873
22+
23+
reg:
24+
maxItems: 1
25+
26+
regulator-initial-mode:
27+
enum: [ 1, 2 ]
28+
description: 1 - Forced PWM mode, 2 - Low power mode
29+
30+
required:
31+
- compatible
32+
- reg
33+
34+
unevaluatedProperties: false
35+
36+
examples:
37+
- |
38+
i2c {
39+
#address-cells = <1>;
40+
#size-cells = <0>;
41+
42+
regulator@41 {
43+
compatible = "ti,tps62873";
44+
reg = <0x41>;
45+
regulator-name = "+0.75V";
46+
regulator-min-microvolt = <400000>;
47+
regulator-max-microvolt = <1675000>;
48+
regulator-initial-mode = <1>;
49+
};
50+
};
51+
52+
...

drivers/clk/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ config COMMON_CLK_MAX9485
8282

8383
config COMMON_CLK_RK808
8484
tristate "Clock driver for RK805/RK808/RK809/RK817/RK818"
85-
depends on MFD_RK808
85+
depends on MFD_RK8XX
8686
help
8787
This driver supports RK805, RK809 and RK817, RK808 and RK818 crystal oscillator clock.
8888
These multi-function devices have two fixed-rate oscillators, clocked at 32KHz each.

drivers/clk/clk-rk808.c

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
#include <linux/slab.h>
1313
#include <linux/platform_device.h>
1414
#include <linux/mfd/rk808.h>
15-
#include <linux/i2c.h>
1615

1716
struct rk808_clkout {
18-
struct rk808 *rk808;
17+
struct regmap *regmap;
1918
struct clk_hw clkout1_hw;
2019
struct clk_hw clkout2_hw;
2120
};
@@ -31,9 +30,8 @@ static int rk808_clkout2_enable(struct clk_hw *hw, bool enable)
3130
struct rk808_clkout *rk808_clkout = container_of(hw,
3231
struct rk808_clkout,
3332
clkout2_hw);
34-
struct rk808 *rk808 = rk808_clkout->rk808;
3533

36-
return regmap_update_bits(rk808->regmap, RK808_CLK32OUT_REG,
34+
return regmap_update_bits(rk808_clkout->regmap, RK808_CLK32OUT_REG,
3735
CLK32KOUT2_EN, enable ? CLK32KOUT2_EN : 0);
3836
}
3937

@@ -52,10 +50,9 @@ static int rk808_clkout2_is_prepared(struct clk_hw *hw)
5250
struct rk808_clkout *rk808_clkout = container_of(hw,
5351
struct rk808_clkout,
5452
clkout2_hw);
55-
struct rk808 *rk808 = rk808_clkout->rk808;
5653
uint32_t val;
5754

58-
int ret = regmap_read(rk808->regmap, RK808_CLK32OUT_REG, &val);
55+
int ret = regmap_read(rk808_clkout->regmap, RK808_CLK32OUT_REG, &val);
5956

6057
if (ret < 0)
6158
return ret;
@@ -93,9 +90,8 @@ static int rk817_clkout2_enable(struct clk_hw *hw, bool enable)
9390
struct rk808_clkout *rk808_clkout = container_of(hw,
9491
struct rk808_clkout,
9592
clkout2_hw);
96-
struct rk808 *rk808 = rk808_clkout->rk808;
9793

98-
return regmap_update_bits(rk808->regmap, RK817_SYS_CFG(1),
94+
return regmap_update_bits(rk808_clkout->regmap, RK817_SYS_CFG(1),
9995
RK817_CLK32KOUT2_EN,
10096
enable ? RK817_CLK32KOUT2_EN : 0);
10197
}
@@ -115,10 +111,9 @@ static int rk817_clkout2_is_prepared(struct clk_hw *hw)
115111
struct rk808_clkout *rk808_clkout = container_of(hw,
116112
struct rk808_clkout,
117113
clkout2_hw);
118-
struct rk808 *rk808 = rk808_clkout->rk808;
119114
unsigned int val;
120115

121-
int ret = regmap_read(rk808->regmap, RK817_SYS_CFG(1), &val);
116+
int ret = regmap_read(rk808_clkout->regmap, RK817_SYS_CFG(1), &val);
122117

123118
if (ret < 0)
124119
return 0;
@@ -153,18 +148,21 @@ static const struct clk_ops *rkpmic_get_ops(long variant)
153148
static int rk808_clkout_probe(struct platform_device *pdev)
154149
{
155150
struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent);
156-
struct i2c_client *client = rk808->i2c;
157-
struct device_node *node = client->dev.of_node;
151+
struct device *dev = &pdev->dev;
158152
struct clk_init_data init = {};
159153
struct rk808_clkout *rk808_clkout;
160154
int ret;
161155

162-
rk808_clkout = devm_kzalloc(&client->dev,
156+
dev->of_node = pdev->dev.parent->of_node;
157+
158+
rk808_clkout = devm_kzalloc(dev,
163159
sizeof(*rk808_clkout), GFP_KERNEL);
164160
if (!rk808_clkout)
165161
return -ENOMEM;
166162

167-
rk808_clkout->rk808 = rk808;
163+
rk808_clkout->regmap = dev_get_regmap(pdev->dev.parent, NULL);
164+
if (!rk808_clkout->regmap)
165+
return -ENODEV;
168166

169167
init.parent_names = NULL;
170168
init.num_parents = 0;
@@ -173,10 +171,10 @@ static int rk808_clkout_probe(struct platform_device *pdev)
173171
rk808_clkout->clkout1_hw.init = &init;
174172

175173
/* optional override of the clockname */
176-
of_property_read_string_index(node, "clock-output-names",
174+
of_property_read_string_index(dev->of_node, "clock-output-names",
177175
0, &init.name);
178176

179-
ret = devm_clk_hw_register(&client->dev, &rk808_clkout->clkout1_hw);
177+
ret = devm_clk_hw_register(dev, &rk808_clkout->clkout1_hw);
180178
if (ret)
181179
return ret;
182180

@@ -185,10 +183,10 @@ static int rk808_clkout_probe(struct platform_device *pdev)
185183
rk808_clkout->clkout2_hw.init = &init;
186184

187185
/* optional override of the clockname */
188-
of_property_read_string_index(node, "clock-output-names",
186+
of_property_read_string_index(dev->of_node, "clock-output-names",
189187
1, &init.name);
190188

191-
ret = devm_clk_hw_register(&client->dev, &rk808_clkout->clkout2_hw);
189+
ret = devm_clk_hw_register(dev, &rk808_clkout->clkout2_hw);
192190
if (ret)
193191
return ret;
194192

drivers/input/misc/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ config INPUT_PWM_VIBRA
609609

610610
config INPUT_RK805_PWRKEY
611611
tristate "Rockchip RK805 PMIC power key support"
612-
depends on MFD_RK808
612+
depends on MFD_RK8XX
613613
help
614614
Select this option to enable power key driver for RK805.
615615

0 commit comments

Comments
 (0)