Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: Convert stm32-pwr regulator to json-schema

Convert the stm32-pwr regulator binding to DT schema format using
json-schema.

Signed-off-by: Pascal Paillet <p.paillet@st.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20191205161359.20755-1-p.paillet@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Pascal Paillet and committed by
Mark Brown
130ac214 a14a0b5f

+64 -43
-43
Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.txt
··· 1 - STM32MP1 PWR Regulators 2 - ----------------------- 3 - 4 - Available Regulators in STM32MP1 PWR block are: 5 - - reg11 for regulator 1V1 6 - - reg18 for regulator 1V8 7 - - usb33 for the swtich USB3V3 8 - 9 - Required properties: 10 - - compatible: Must be "st,stm32mp1,pwr-reg" 11 - - list of child nodes that specify the regulator reg11, reg18 or usb33 12 - initialization data for defined regulators. The definition for each of 13 - these nodes is defined using the standard binding for regulators found at 14 - Documentation/devicetree/bindings/regulator/regulator.txt. 15 - - vdd-supply: phandle to the parent supply/regulator node for vdd input 16 - - vdd_3v3_usbfs-supply: phandle to the parent supply/regulator node for usb33 17 - 18 - Example: 19 - 20 - pwr_regulators: pwr@50001000 { 21 - compatible = "st,stm32mp1,pwr-reg"; 22 - reg = <0x50001000 0x10>; 23 - vdd-supply = <&vdd>; 24 - vdd_3v3_usbfs-supply = <&vdd_usb>; 25 - 26 - reg11: reg11 { 27 - regulator-name = "reg11"; 28 - regulator-min-microvolt = <1100000>; 29 - regulator-max-microvolt = <1100000>; 30 - }; 31 - 32 - reg18: reg18 { 33 - regulator-name = "reg18"; 34 - regulator-min-microvolt = <1800000>; 35 - regulator-max-microvolt = <1800000>; 36 - }; 37 - 38 - usb33: usb33 { 39 - regulator-name = "usb33"; 40 - regulator-min-microvolt = <3300000>; 41 - regulator-max-microvolt = <3300000>; 42 - }; 43 - };
+64
Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/st,stm32mp1-pwr-reg.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: STM32MP1 PWR voltage regulators 8 + 9 + maintainers: 10 + - Pascal Paillet <p.paillet@st.com> 11 + 12 + properties: 13 + compatible: 14 + const: st,stm32mp1,pwr-reg 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + vdd-supply: 20 + description: Input supply phandle(s) for vdd input 21 + 22 + vdd_3v3_usbfs-supply: 23 + description: Input supply phandle(s) for vdd_3v3_usbfs input 24 + 25 + patternProperties: 26 + "^(reg11|reg18|usb33)$": 27 + type: object 28 + 29 + allOf: 30 + - $ref: "regulator.yaml#" 31 + 32 + required: 33 + - compatible 34 + - reg 35 + 36 + additionalProperties: false 37 + 38 + examples: 39 + - | 40 + pwr@50001000 { 41 + compatible = "st,stm32mp1,pwr-reg"; 42 + reg = <0x50001000 0x10>; 43 + vdd-supply = <&vdd>; 44 + vdd_3v3_usbfs-supply = <&vdd_usb>; 45 + 46 + reg11 { 47 + regulator-name = "reg11"; 48 + regulator-min-microvolt = <1100000>; 49 + regulator-max-microvolt = <1100000>; 50 + }; 51 + 52 + reg18 { 53 + regulator-name = "reg18"; 54 + regulator-min-microvolt = <1800000>; 55 + regulator-max-microvolt = <1800000>; 56 + }; 57 + 58 + usb33 { 59 + regulator-name = "usb33"; 60 + regulator-min-microvolt = <3300000>; 61 + regulator-max-microvolt = <3300000>; 62 + }; 63 + }; 64 + ...