Commit 25947030 authored by Georgi Vlaev's avatar Georgi Vlaev Committed by Mark Brown

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 9a00630c ("regulator:
tps62360: support force PWM mode via regulator mode"), but a
reference to it remained in the example.
Signed-off-by: default avatarGeorgi Vlaev <g-vlaev@ti.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
Link: https://lore.kernel.org/r/20220308134454.14504-1-g-vlaev@ti.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent bbc7ba0f
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/ti,tps62360.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TPS6236x Voltage Regulators
maintainers:
- Laxman Dewangan <ldewangan@nvidia.com>
description: |
The TPS6236x are a family of step down dc-dc converter with
an input voltage range of 2.5V to 5.5V. The devices provide
up to 3A peak load current, and an output voltage range of
0.77V to 1.4V (TPS62360/62) and 0.5V to 1.77V (TPS62361B/63).
Datasheet is available at:
https://www.ti.com/lit/gpn/tps62360
allOf:
- $ref: "regulator.yaml#"
properties:
compatible:
enum:
- ti,tps62360
- ti,tps62361
- ti,tps62362
- ti,tps62363
reg:
maxItems: 1
ti,vsel0-gpio:
description: |
GPIO for controlling VSEL0 line. If this property
is missing, then assume that there is no GPIO for
VSEL0 control.
maxItems: 1
ti,vsel1-gpio:
description: |
GPIO for controlling VSEL1 line. If this property
is missing, then assume that there is no GPIO for
VSEL1 control.
maxItems: 1
ti,enable-vout-discharge:
description: Enable output discharge.
type: boolean
ti,enable-pull-down:
description: Enable pull down.
type: boolean
ti,vsel0-state-high:
description: |
Initial state of VSEL0 input is high. If this property
is missing, then assume the state as low.
type: boolean
ti,vsel1-state-high:
description: |
Initial state of VSEL1 input is high. If this property
is missing, then assume the state as low.
type: boolean
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
regulator@60 {
compatible = "ti,tps62361";
reg = <0x60>;
regulator-name = "tps62361-vout";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1500000>;
regulator-boot-on;
ti,vsel0-gpio = <&gpio1 16 GPIO_ACTIVE_HIGH>;
ti,vsel1-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
ti,vsel0-state-high;
ti,vsel1-state-high;
ti,enable-pull-down;
ti,enable-vout-discharge;
};
};
...
TPS62360 Voltage regulators
Required properties:
- compatible: Must be one of the following.
"ti,tps62360"
"ti,tps62361",
"ti,tps62362",
"ti,tps62363",
- reg: I2C slave address
Optional properties:
- ti,enable-vout-discharge: Enable output discharge. This is boolean value.
- ti,enable-pull-down: Enable pull down. This is boolean value.
- ti,vsel0-gpio: GPIO for controlling VSEL0 line.
If this property is missing, then assume that there is no GPIO
for vsel0 control.
- ti,vsel1-gpio: Gpio for controlling VSEL1 line.
If this property is missing, then assume that there is no GPIO
for vsel1 control.
- ti,vsel0-state-high: Initial state of vsel0 input is high.
If this property is missing, then assume the state as low (0).
- ti,vsel1-state-high: Initial state of vsel1 input is high.
If this property is missing, then assume the state as low (0).
Any property defined as part of the core regulator binding, defined in
regulator.txt, can also be used.
Example:
abc: tps62360 {
compatible = "ti,tps62361";
reg = <0x60>;
regulator-name = "tps62361-vout";
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1500000>;
regulator-boot-on
ti,vsel0-gpio = <&gpio1 16 0>;
ti,vsel1-gpio = <&gpio1 17 0>;
ti,vsel0-state-high;
ti,vsel1-state-high;
ti,enable-pull-down;
ti,enable-force-pwm;
ti,enable-vout-discharge;
};
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