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

regulator: Convert TPS62360 binding to json-schema

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

This also removes redundant "ti,enable-force-pwm" property
from the example. The property description was removed from the
original text binding file by commit 9a00630c3db8 ("regulator:
tps62360: support force PWM mode via regulator mode"), but a
reference to it remained in the example.

Signed-off-by: Georgi Vlaev <g-vlaev@ti.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Link: https://lore.kernel.org/r/20220308134454.14504-1-g-vlaev@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Georgi Vlaev and committed by
Mark Brown
25947030 bbc7ba0f

+98 -44
+98
Documentation/devicetree/bindings/regulator/ti,tps62360.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/ti,tps62360.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments TPS6236x Voltage Regulators 8 + 9 + maintainers: 10 + - Laxman Dewangan <ldewangan@nvidia.com> 11 + 12 + description: | 13 + The TPS6236x are a family of step down dc-dc converter with 14 + an input voltage range of 2.5V to 5.5V. The devices provide 15 + up to 3A peak load current, and an output voltage range of 16 + 0.77V to 1.4V (TPS62360/62) and 0.5V to 1.77V (TPS62361B/63). 17 + 18 + Datasheet is available at: 19 + https://www.ti.com/lit/gpn/tps62360 20 + 21 + allOf: 22 + - $ref: "regulator.yaml#" 23 + 24 + properties: 25 + compatible: 26 + enum: 27 + - ti,tps62360 28 + - ti,tps62361 29 + - ti,tps62362 30 + - ti,tps62363 31 + 32 + reg: 33 + maxItems: 1 34 + 35 + ti,vsel0-gpio: 36 + description: | 37 + GPIO for controlling VSEL0 line. If this property 38 + is missing, then assume that there is no GPIO for 39 + VSEL0 control. 40 + maxItems: 1 41 + 42 + ti,vsel1-gpio: 43 + description: | 44 + GPIO for controlling VSEL1 line. If this property 45 + is missing, then assume that there is no GPIO for 46 + VSEL1 control. 47 + maxItems: 1 48 + 49 + ti,enable-vout-discharge: 50 + description: Enable output discharge. 51 + type: boolean 52 + 53 + ti,enable-pull-down: 54 + description: Enable pull down. 55 + type: boolean 56 + 57 + ti,vsel0-state-high: 58 + description: | 59 + Initial state of VSEL0 input is high. If this property 60 + is missing, then assume the state as low. 61 + type: boolean 62 + 63 + ti,vsel1-state-high: 64 + description: | 65 + Initial state of VSEL1 input is high. If this property 66 + is missing, then assume the state as low. 67 + type: boolean 68 + 69 + required: 70 + - compatible 71 + - reg 72 + 73 + unevaluatedProperties: false 74 + 75 + examples: 76 + - | 77 + #include <dt-bindings/gpio/gpio.h> 78 + i2c { 79 + #address-cells = <1>; 80 + #size-cells = <0>; 81 + 82 + regulator@60 { 83 + compatible = "ti,tps62361"; 84 + reg = <0x60>; 85 + regulator-name = "tps62361-vout"; 86 + regulator-min-microvolt = <500000>; 87 + regulator-max-microvolt = <1500000>; 88 + regulator-boot-on; 89 + ti,vsel0-gpio = <&gpio1 16 GPIO_ACTIVE_HIGH>; 90 + ti,vsel1-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>; 91 + ti,vsel0-state-high; 92 + ti,vsel1-state-high; 93 + ti,enable-pull-down; 94 + ti,enable-vout-discharge; 95 + }; 96 + }; 97 + 98 + ...
-44
Documentation/devicetree/bindings/regulator/tps62360-regulator.txt
··· 1 - TPS62360 Voltage regulators 2 - 3 - Required properties: 4 - - compatible: Must be one of the following. 5 - "ti,tps62360" 6 - "ti,tps62361", 7 - "ti,tps62362", 8 - "ti,tps62363", 9 - - reg: I2C slave address 10 - 11 - Optional properties: 12 - - ti,enable-vout-discharge: Enable output discharge. This is boolean value. 13 - - ti,enable-pull-down: Enable pull down. This is boolean value. 14 - - ti,vsel0-gpio: GPIO for controlling VSEL0 line. 15 - If this property is missing, then assume that there is no GPIO 16 - for vsel0 control. 17 - - ti,vsel1-gpio: Gpio for controlling VSEL1 line. 18 - If this property is missing, then assume that there is no GPIO 19 - for vsel1 control. 20 - - ti,vsel0-state-high: Initial state of vsel0 input is high. 21 - If this property is missing, then assume the state as low (0). 22 - - ti,vsel1-state-high: Initial state of vsel1 input is high. 23 - If this property is missing, then assume the state as low (0). 24 - 25 - Any property defined as part of the core regulator binding, defined in 26 - regulator.txt, can also be used. 27 - 28 - Example: 29 - 30 - abc: tps62360 { 31 - compatible = "ti,tps62361"; 32 - reg = <0x60>; 33 - regulator-name = "tps62361-vout"; 34 - regulator-min-microvolt = <500000>; 35 - regulator-max-microvolt = <1500000>; 36 - regulator-boot-on 37 - ti,vsel0-gpio = <&gpio1 16 0>; 38 - ti,vsel1-gpio = <&gpio1 17 0>; 39 - ti,vsel0-state-high; 40 - ti,vsel1-state-high; 41 - ti,enable-pull-down; 42 - ti,enable-force-pwm; 43 - ti,enable-vout-discharge; 44 - };