Skip to content

Commit f111213

Browse files
cristicclag-linaro
authored andcommitted
dt-bindings: mfd: rk817: Merge support for RK809
The Rockchip RK809 PMIC is compatible with RK817 and provides the same capabilities, except for the battery charger manager. There are also minor regulator related differences: BOOST and OTG_SWITCH are specific to RK817, while DCDC_REG5, SWITCH_REG1 and SWITCH_REG2 are provided RK809. The current binding for RK809 doesn't document the audio codec properties, although it has been already in use by several boards: rk3566-quartz64-b, k3566-roc-pc, rk3568-evb1-v10, rk3568-lubancat-2, rk3568-odroid-m1, rk3568-rock-3a. Therefore dtbs_check fails for all of them: DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dtb rk3568-rock-3a.dtb: pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks', 'clock-names', 'clocks', 'codec' do not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml# Additionally, the example in rockchip,rk809 binding is not able to actually test the schema since it uses a wrong compatible 'rockchip,rk808' instead of the expected 'rockchip,rk809'. Instead of duplicating even more content, merge the RK809 support into the more inclusive RK817 schema and drop the now obsolete rockchip,rk809 related file. Fixes: 6c38ca0 ("dt-bindings: mfd: rk808: Convert bindings to yaml") Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent e7865de commit f111213

File tree

2 files changed

+27
-298
lines changed

2 files changed

+27
-298
lines changed

Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml

Lines changed: 0 additions & 288 deletions
This file was deleted.

Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@
44
$id: http://devicetree.org/schemas/mfd/rockchip,rk817.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: RK817 Power Management Integrated Circuit
7+
title: RK809/RK817 Power Management Integrated Circuit
88

99
maintainers:
1010
- Chris Zhong <[email protected]>
1111
- Zhang Qing <[email protected]>
1212

1313
description: |
14-
Rockchip RK817 series PMIC. This device consists of an i2c controlled MFD
15-
that includes regulators, an RTC, a power button, an audio codec, and a
16-
battery charger manager.
14+
Rockchip RK809/RK817 series PMIC. This device consists of an i2c controlled
15+
MFD that includes regulators, an RTC, a power button and an audio codec.
16+
The RK817 variant also provides a battery charger manager.
1717
1818
properties:
1919
compatible:
2020
enum:
21+
- rockchip,rk809
2122
- rockchip,rk817
2223

2324
reg:
@@ -89,20 +90,20 @@ properties:
8990

9091
vcc8-supply:
9192
description:
92-
The input supply for BOOST.
93+
The input supply for BOOST on RK817, or for SWITCH_REG2 on RK809.
9394

9495
vcc9-supply:
9596
description:
96-
The input supply for OTG_SWITCH.
97+
The input supply for OTG_SWITCH on RK817,
98+
or for DCDC_REG5 and SWITCH_REG1 on RK809.
9799

98100
regulators:
99101
type: object
100102
patternProperties:
101-
"^(LDO_REG[1-9]|DCDC_REG[1-4]|BOOST|OTG_SWITCH)$":
102-
type: object
103+
"^(LDO_REG[1-9]|DCDC_REG[1-5]|BOOST|OTG_SWITCH|SWITCH_REG[1-2])$":
104+
$ref: /schemas/regulator/regulator.yaml
103105
unevaluatedProperties: false
104-
$ref: /schemas/regulator/regulator.yaml#
105-
unevaluatedProperties: false
106+
additionalProperties: false
106107

107108
codec:
108109
type: object
@@ -172,6 +173,22 @@ allOf:
172173
clock-output-names:
173174
maxItems: 2
174175

176+
- if:
177+
properties:
178+
compatible:
179+
contains:
180+
const: rockchip,rk817
181+
then:
182+
properties:
183+
regulators:
184+
patternProperties:
185+
"^(DCDC_REG5|SWITCH_REG[1-2])$": false
186+
else:
187+
properties:
188+
regulators:
189+
patternProperties:
190+
"^(BOOST|OTG_SWITCH)$": false
191+
175192
required:
176193
- compatible
177194
- reg

0 commit comments

Comments
 (0)