Commit 130ac214 authored by Pascal Paillet's avatar Pascal Paillet Committed by Mark Brown

regulator: Convert stm32-pwr regulator to json-schema

Convert the stm32-pwr regulator binding to DT schema format using
json-schema.
Signed-off-by: default avatarPascal Paillet <p.paillet@st.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20191205161359.20755-1-p.paillet@st.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a14a0b5f
STM32MP1 PWR Regulators
-----------------------
Available Regulators in STM32MP1 PWR block are:
- reg11 for regulator 1V1
- reg18 for regulator 1V8
- usb33 for the swtich USB3V3
Required properties:
- compatible: Must be "st,stm32mp1,pwr-reg"
- list of child nodes that specify the regulator reg11, reg18 or usb33
initialization data for defined regulators. The definition for each of
these nodes is defined using the standard binding for regulators found at
Documentation/devicetree/bindings/regulator/regulator.txt.
- vdd-supply: phandle to the parent supply/regulator node for vdd input
- vdd_3v3_usbfs-supply: phandle to the parent supply/regulator node for usb33
Example:
pwr_regulators: pwr@50001000 {
compatible = "st,stm32mp1,pwr-reg";
reg = <0x50001000 0x10>;
vdd-supply = <&vdd>;
vdd_3v3_usbfs-supply = <&vdd_usb>;
reg11: reg11 {
regulator-name = "reg11";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
};
reg18: reg18 {
regulator-name = "reg18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
usb33: usb33 {
regulator-name = "usb33";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/st,stm32mp1-pwr-reg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STM32MP1 PWR voltage regulators
maintainers:
- Pascal Paillet <p.paillet@st.com>
properties:
compatible:
const: st,stm32mp1,pwr-reg
reg:
maxItems: 1
vdd-supply:
description: Input supply phandle(s) for vdd input
vdd_3v3_usbfs-supply:
description: Input supply phandle(s) for vdd_3v3_usbfs input
patternProperties:
"^(reg11|reg18|usb33)$":
type: object
allOf:
- $ref: "regulator.yaml#"
required:
- compatible
- reg
additionalProperties: false
examples:
- |
pwr@50001000 {
compatible = "st,stm32mp1,pwr-reg";
reg = <0x50001000 0x10>;
vdd-supply = <&vdd>;
vdd_3v3_usbfs-supply = <&vdd_usb>;
reg11 {
regulator-name = "reg11";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
};
reg18 {
regulator-name = "reg18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
usb33 {
regulator-name = "usb33";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
};
...
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment