Message ID | 20250606-s2mpg1x-regulators-v2-4-b03feffd2621@linaro.org |
---|---|
State | New |
Headers | show |
Series | Samsung S2MPG10 regulator and S2MPG11 PMIC drivers | expand |
On Fri, Jun 06, 2025 at 04:03:00PM GMT, André Draszik wrote: > Add a regulators node to the s2mpg10-pmic to describe the regulators > available on this PMIC. > > Additionally, describe the supply inputs of the regulator rails, with > the supply names matching the datasheet. > > Note 1: S2MPG10 is typically used as the main-PMIC together with an > S2MPG11 PMIC in a main/sub configuration, hence the datasheet and the > binding both suffix the supplies with an 'm'. > > Note 2: The binding needs to switch from 'additionalProperties' to > 'unevaluatedProperties', to allow adding the specific -supply > properties for S2MPG10 only, as otherwise we'd have to resort to a > global wildcard with negating inside each of the compatible matches. I think this binding is getting too complicated. Maybe s2mpgXX should have their own file. Best regards, Krzysztof
Hi Krzysztof, On Wed, 2025-06-11 at 11:03 +0200, Krzysztof Kozlowski wrote: > On Fri, Jun 06, 2025 at 04:03:00PM GMT, André Draszik wrote: > > Add a regulators node to the s2mpg10-pmic to describe the regulators > > available on this PMIC. > > > > Additionally, describe the supply inputs of the regulator rails, with > > the supply names matching the datasheet. > > > > Note 1: S2MPG10 is typically used as the main-PMIC together with an > > S2MPG11 PMIC in a main/sub configuration, hence the datasheet and the > > binding both suffix the supplies with an 'm'. > > > > Note 2: The binding needs to switch from 'additionalProperties' to > > 'unevaluatedProperties', to allow adding the specific -supply > > properties for S2MPG10 only, as otherwise we'd have to resort to a > > global wildcard with negating inside each of the compatible matches. > > I think this binding is getting too complicated. Maybe s2mpgXX should > have their own file. Will do. Cheers, Andre'
diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml index d6b9e29147965b6d8eef786b0fb5b5f198ab69ab..0b834a02368f7867a2d093cbb3a9f374bb2acf41 100644 --- a/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml +++ b/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml @@ -67,7 +67,7 @@ required: - compatible - regulators -additionalProperties: false +unevaluatedProperties: false allOf: - if: @@ -78,9 +78,40 @@ allOf: then: properties: reg: false + + regulators: + $ref: /schemas/regulator/samsung,s2mpg10-regulator.yaml + samsung,s2mps11-acokb-ground: false samsung,s2mps11-wrstbi-ground: false + patternProperties: + "^vinb([1-9]|10)m-supply$": + description: + Phandle to the power supply for each buck rail of this PMIC. There + is a 1:1 mapping of supply to rail, e.g. vinb1m-supply supplies + buck1m. + + "^vinl([1-9]|1[0-5])m-supply$": + description: | + Phandle to the power supply for one or multiple LDO rails of this + PMIC. The mapping of supply to rail(s) is as follows + vinl1m - ldo13m + vinl2m - ldo15m + vinl3m - ldo1m, ldo5m, ldo7m + vinl4m - ldo3m, ldo8m + vinl5m - ldo16m + vinl6m - ldo17m + vinl7m - ldo6m, ldo11m, ldo24m, ldo28m + vinl8m - ldo12m + vinl9m - ldo2m, ldo4m + vinl10m - ldo9m, ldo14m, ldo18m, 19m, ldo20m, ldo25m + vinl11m - ldo23m, ldo31m + vinl12m - ldo29m + vinl13m - ldo30m + vinl14m - ldo21m + vinl15m - ldo10m, ldo22m, ldo26m, ldo27m + oneOf: - required: [interrupts] - required: [interrupts-extended]
Add a regulators node to the s2mpg10-pmic to describe the regulators available on this PMIC. Additionally, describe the supply inputs of the regulator rails, with the supply names matching the datasheet. Note 1: S2MPG10 is typically used as the main-PMIC together with an S2MPG11 PMIC in a main/sub configuration, hence the datasheet and the binding both suffix the supplies with an 'm'. Note 2: The binding needs to switch from 'additionalProperties' to 'unevaluatedProperties', to allow adding the specific -supply properties for S2MPG10 only, as otherwise we'd have to resort to a global wildcard with negating inside each of the compatible matches. Signed-off-by: André Draszik <andre.draszik@linaro.org> --- .../devicetree/bindings/mfd/samsung,s2mps11.yaml | 33 +++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-)