Skip to content

Commit 189ccdc

Browse files
andredlag-linaro
authored andcommitted
dt-bindings: mfd: samsung,s2mps11: Split s2mpg10-pmic into separate file
The samsung,s2mpg10-pmic binding is going to acquire various additional properties. To avoid making the common samsung,s2mps11 binding file too complicated due to additional nesting, split s2mpg10 out into its own file. As a side-effect, the oneOf for the interrupts is not required anymore, as the required: node is at the top-level now. Signed-off-by: André Draszik <andre.draszik@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20260122-s2mpg1x-regulators-v7-4-3b1f9831fffd@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent b31583a commit 189ccdc

2 files changed

Lines changed: 70 additions & 28 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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 S2MPG family of Power
14+
Management IC (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.
19+
20+
properties:
21+
compatible:
22+
const: samsung,s2mpg10-pmic
23+
24+
clocks:
25+
$ref: /schemas/clock/samsung,s2mps11.yaml
26+
description:
27+
Child node describing clock provider.
28+
29+
interrupts:
30+
maxItems: 1
31+
32+
regulators:
33+
type: object
34+
description:
35+
List of child nodes that specify the regulators.
36+
37+
system-power-controller: true
38+
39+
wakeup-source: true
40+
41+
required:
42+
- compatible
43+
- interrupts
44+
- regulators
45+
46+
additionalProperties: false
47+
48+
examples:
49+
- |
50+
#include <dt-bindings/gpio/gpio.h>
51+
#include <dt-bindings/interrupt-controller/irq.h>
52+
53+
pmic {
54+
compatible = "samsung,s2mpg10-pmic";
55+
interrupts-extended = <&gpa0 6 IRQ_TYPE_LEVEL_LOW>;
56+
pinctrl-names = "default";
57+
pinctrl-0 = <&pmic_int>;
58+
system-power-controller;
59+
wakeup-source;
60+
61+
clocks {
62+
compatible = "samsung,s2mpg10-clk";
63+
#clock-cells = <1>;
64+
clock-output-names = "rtc32k_ap", "peri32k1", "peri32k2";
65+
};
66+
67+
regulators {
68+
};
69+
};

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)